how to start/stop Squid service using PHP?
Hi everyone,
Im using PHP and Sun Solaris to do something for Squid Proxy Server. im using...... - LAMP / SAMP - Linux / Solaris 10 - Squid Server - PHP actually i need to know that someone knows about how to start/stop Squid Service using PHP code. Regards. Adnan Khawer. |
Hi, my first idea would be:
- Write an script to start/stop the squid service (probably you alread have one) - Configure sudo to allow the httpd or apache user to execute your script without asking for passwd. - Create a php script, which uses system() or exec() to execute the start/stop squid script. - Make sure your php page is secure and only can be executed from a few places. Why are you trying to start/stop your squid server from php ? is there any special need for that ? Best regards, |
Dear jhcaiced,
Thanks for ur response, actually im creating GUI for Squid configuration using PHP and my 1st version is to start/stop Squid using basic configuration on LOCAL HOST........ Script is OK bt what if i use exec() or system() directly e.g. system('service squid start', ......) i have not tried bt i will try it... in fact i have not used PHP for this type of programming i.e. other than Web/Database. Regards. Adnan Khawer. |
All times are GMT -5. The time now is 12:45 PM. |