Devilzc0de Forum Follow @devilzc0de
  • Home
  • Hacking
  • Networking
  • Programming
  • O.S
  • Server
  • Tweets
  • Search
  • Member List
  • Calendar
Current time: 05-23-2013, 07:12 AM Hello There, Guest! (Login — Register)
Devilzc0de Forum › Information Technology › Programming › PHP v
« Previous 1 ... 20 21 22 23 24 ... 31 Next »

[Solved] php squid

Home General Computer Multimedia Business Lounge

Post Reply 
Tweet
Threaded Mode | Linear Mode
Solved php squid
01-10-2012, 10:38 AM
Post: #1
bulbul Offline
./Devilz 1st Cadet
Posts: 1
Joined: Jan 2012
Reputation: 0
php squid
Gan ini mo tanya ... Dapet tugas bikin php tampilan sendiri untuk restart squid
<?php

echo "<h1>Squid Service</h1>";

if ($_POST['submit'])
{
system("service squid restart");
//$result = shell_exec('squid -k reconfigure');
}
?>


<form action="<?php echo $_SERVER["PHP_SELF"] ?>" method="post">
<input type='submit' name='submit' value='Restart Squid'>
</form>
Salah di mana ya gan ?? tiap di klik kluar tulisan stopping squid failed starting squid failed
Find all posts by this user
Quote this message in a reply
01-10-2012, 12:30 PM
Post: #2
Super Moderator Offline
Wahyu Adi Prasetyo
****
Global Moderators
Posts: 6,944
Joined: Jan 2010
Reputation: 237
RE: php squid
(01-10-2012 10:38 AM)bulbul Wrote:  Gan ini mo tanya ... Dapet tugas bikin php tampilan sendiri untuk restart squid
<?php

echo "<h1>Squid Service</h1>";

if ($_POST['submit'])
{
system("service squid restart");
//$result = shell_exec('squid -k reconfigure');
}
?>


<form action="<?php echo $_SERVER["PHP_SELF"] ?>" method="post">
<input type='submit' name='submit' value='Restart Squid'>
</form>
Salah di mana ya gan ?? tiap di klik kluar tulisan stopping squid failed starting squid failed

Code:
system("service squid restart");
coba diganti dengan command lain om
#/etc/init.d/squid restart
Visit this user's website Find all posts by this user
Quote this message in a reply
01-10-2012, 12:40 PM (This post was last modified: 01-10-2012 12:43 PM by ditatompel.)
Post: #3
ditatompel Offline
Administrator
*******
Administrators
Posts: 2,168
Joined: Dec 2010
Reputation: 367
RE: php squid
Itu failed, user (http) nya berwenang melakukan reconfigure / restart proxy server ga bro?
Find all posts by this user
Quote this message in a reply
01-10-2012, 03:11 PM
Post: #4
mariachi Away
has been reboot
**
Moderators
Posts: 2,362
Joined: Nov 2010
Reputation: 55
RE: php squid
bener kata om dita, hak aksesnya yg jadi masalah... ketawa
Find all posts by this user
Quote this message in a reply
01-10-2012, 03:32 PM
Post: #5
Super Moderator Offline
Wahyu Adi Prasetyo
****
Global Moderators
Posts: 6,944
Joined: Jan 2010
Reputation: 237
RE: php squid
hit n run lagi tsnya capedeh
Visit this user's website Find all posts by this user
Quote this message in a reply
01-10-2012, 04:36 PM
Post: #6
ketek Offline
bocah ingusan
*******
Administrators
Posts: 2,168
Joined: Jan 2010
Reputation: 369
RE: php squid
(01-10-2012 10:38 AM)bulbul Wrote:  Gan ini mo tanya ... Dapet tugas bikin php tampilan sendiri untuk restart squid
<?php

echo "<h1>Squid Service</h1>";

if ($_POST['submit'])
{
system("service squid restart");
//$result = shell_exec('squid -k reconfigure');
}
?>


<form action="<?php echo $_SERVER["PHP_SELF"] ?>" method="post">
<input type='submit' name='submit' value='Restart Squid'>
</form>
Salah di mana ya gan ?? tiap di klik kluar tulisan stopping squid failed starting squid failed



sayangnya setuid gak bisa untuk bash script
jadi om harus buat program kecil c seperti ini kira-kira kalau mau restart squid

misal nama file -> restartsquid.c
Code:
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <unistd.h>

int main(){
    setuid( 0 );
    // sesuaikan dengan perintah untuk restart di distro
    system( "/etc/init.d/squid restart" );
    return 0;
}

abis itu compile script tersebut
lalu change ownership ke root
truz set flag setuid nya
Code:
gcc -o restartsquid restartsquid.c
sudo chown root:root restartsquid
sudo chmod 4755 restartsquid

dah abis itu sekarang kalo dirun tuh restartsquid
maka dia akan ngerestart squid.. tinggal dipanggil itu file dari php
Find all posts by this user
Quote this message in a reply
 Reputed by :  ditatompel(+1)
01-10-2012, 04:55 PM
Post: #7
mr_nothing Offline
./Devilz Officer
Posts: 53
Joined: Dec 2011
Reputation: 3
RE: php squid
(01-10-2012 04:36 PM)Niketek Willy Wrote:  
(01-10-2012 10:38 AM)bulbul Wrote:  Gan ini mo tanya ... Dapet tugas bikin php tampilan sendiri untuk restart squid
<?php

echo "<h1>Squid Service</h1>";

if ($_POST['submit'])
{
system("service squid restart");
//$result = shell_exec('squid -k reconfigure');
}
?>


<form action="<?php echo $_SERVER["PHP_SELF"] ?>" method="post">
<input type='submit' name='submit' value='Restart Squid'>
</form>
Salah di mana ya gan ?? tiap di klik kluar tulisan stopping squid failed starting squid failed



sayangnya setuid gak bisa untuk bash script
jadi om harus buat program kecil c seperti ini kira-kira kalau mau restart squid

misal nama file -> restartsquid.c
Code:
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <unistd.h>

int main(){
    setuid( 0 );
    // sesuaikan dengan perintah untuk restart di distro
    system( "/etc/init.d/squid restart" );
    return 0;
}

abis itu compile script tersebut
lalu change ownership ke root
truz set flag setuid nya
Code:
gcc -o restartsquid restartsquid.c
sudo chown root:root restartsquid
sudo chmod 4755 restartsquid

dah abis itu sekarang kalo dirun tuh restartsquid
maka dia akan ngerestart squid.. tinggal dipanggil itu file dari php

Edan belajar
Find all posts by this user
Quote this message in a reply
01-10-2012, 05:19 PM
Post: #8
ditatompel Offline
Administrator
*******
Administrators
Posts: 2,168
Joined: Dec 2010
Reputation: 367
RE: php squid
(01-10-2012 04:36 PM)Niketek Willy Wrote:  
(01-10-2012 10:38 AM)bulbul Wrote:  Gan ini mo tanya ... Dapet tugas bikin php tampilan sendiri untuk restart squid
<?php

echo "<h1>Squid Service</h1>";

if ($_POST['submit'])
{
system("service squid restart");
//$result = shell_exec('squid -k reconfigure');
}
?>


<form action="<?php echo $_SERVER["PHP_SELF"] ?>" method="post">
<input type='submit' name='submit' value='Restart Squid'>
</form>
Salah di mana ya gan ?? tiap di klik kluar tulisan stopping squid failed starting squid failed



sayangnya setuid gak bisa untuk bash script
jadi om harus buat program kecil c seperti ini kira-kira kalau mau restart squid

misal nama file -> restartsquid.c
Code:
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <unistd.h>

int main(){
    setuid( 0 );
    // sesuaikan dengan perintah untuk restart di distro
    system( "/etc/init.d/squid restart" );
    return 0;
}

abis itu compile script tersebut
lalu change ownership ke root
truz set flag setuid nya
Code:
gcc -o restartsquid restartsquid.c
sudo chown root:root restartsquid
sudo chmod 4755 restartsquid

dah abis itu sekarang kalo dirun tuh restartsquid
maka dia akan ngerestart squid.. tinggal dipanggil itu file dari php

istimewa isi daging rusa....
Find all posts by this user
Quote this message in a reply
« Next Oldest | Next Newest »
Post Reply 


Topic Tools
Topic Link :
BBCode :
HTML Code :
View a Printable Version Send Thread to a Friend Subscribe to this thread
Submit Google Submit Face book Submit to Digg Submit to Reddit Submit to Furl Submit to Del.icio.us Submit to Jeqq

Users Browsing
1 Guest(s)

  • Contact Us
  • devilzc0de
  • Return to Top
  • Mobile Version
  • RSS Syndication
  • Help
Current time: 05-23-2013, 07:12 AM Powered By MyBB, © 2002-2013 MyBB Group. Theme created by Justin S. | Mixed By Chaer.Newbie | Fixed By Aditya

USING THIS SITE INDICATES THAT YOU HAVE READ AND ACCEPT OUR TERMS. IF YOU DO NOT ACCEPT THESE TERMS, YOU ARE NOT AUTHORIZED TO USE THIS SITE