[PHP] shedule a php script
hi friends , when running this php script we can make a log file with relavent to the mysql data base. but i need to executethis script after every 2 min time. that is mean theremust be a 2 min sleep time . can somebody help medo this function plz .? ?php require ('connectMySql.php'); $select= " select ServiceNo, ServiceName, Status, DateTime from ServiceStatus "; $add_member = $db_object-query($select); $result=mysql_query($select); while($row=mysql_fetch_array ($result)) { $output1 =$row['ServiceNo']; $output2 =$row['ServiceName']; $output3 =$row['Status']; $output4 =$row['DateTime']; $your_data .= " $output1.\t $output2 - $output3 - $output4 \n"; $output = "$your_data \n"; } // Open the file and erase the contents if any$fp = fopen("vas_status.log", "a"); // Write the data to the filefwrite($fp, $output); // Close the filefclose($fp); if (DB::isError($add_member)) { die($add_member-getMessage()); } $db_object-disconnect(); ? thanx in advance curlys -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: shedule a php script/ plz help
yes, i did as u said .., i have added that file into the /etc/cron.d , directory also vi /etc/crontab SHELL=/bin/bash PATH=/sbin:/bin:/usr/sbin:/usr/bin MAILTO=root HOME=/ # run-parts 01 * * * * root run-parts /etc/cron.hourly 02 4 * * * root run-parts /etc/cron.daily 22 4 * * 0 root run-parts /etc/cron.weekly 42 4 1 * * root run-parts /etc/cron.monthly * * * * * root run-parts /etc/cron.d/abc.php am i correct , plz help me ..but it is still not running ? thank u - Original Message - From: Ben Ramsey [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, June 05, 2004 10:07 PM Subject: [PHP] Re: shedule a php script If you're on a Unix-like system, add the following at the top of your script: #!/usr/local/bin/php Of course, modify the path to the location of your php binary, since it may not be in the same location. Then, make the file executable with: chmod +x filename.php Then, create a cron job to run the script however often you want. Curlybraces Technologies Ltd wrote: hi friends , when running this php script we can make a log file with relavent to the mysql data base. but i need to execute this script after every 2 min time. that is mean there must be a 2 min sleep time . can somebody help me do this function plz .? ?php require ('connectMySql.php'); $select= select ServiceNo, ServiceName, Status, DateTime from ServiceStatus ; $add_member = $db_object-query($select); $result=mysql_query($select); while($row=mysql_fetch_array ($result)) { $output1 =$row['ServiceNo']; $output2 =$row['ServiceName']; $output3 =$row['Status']; $output4 =$row['DateTime']; $your_data .= $output1.\t $output2 - $output3 - $output4 \n; $output = $your_data \n; } // Open the file and erase the contents if any $fp = fopen(vas_status.log, a); // Write the data to the file fwrite($fp, $output); // Close the file fclose($fp); if (DB::isError($add_member)) { die($add_member-getMessage()); } $db_object-disconnect(); ? thanx in advance curlys -- Regards, Ben Ramsey http://benramsey.com --- http://www.phpcommunity.org/ Open Source, Open Community Visit for more information or to join the movement. --- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: shedule a php script
alright , thank u very much, i successfully run with that while loop . it is working. so thank u , very much curlys - Original Message - From: Marek Kilimajer [EMAIL PROTECTED] To: Thomas Seifert [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Saturday, June 05, 2004 10:49 PM Subject: Re: [PHP] Re: shedule a php script Thomas Seifert wrote: I would recommend the cronjob too but if you want to just keep the script running, do a while-loop around your code, i.e. while(1) { ... your code sleep(120); // sleep 120 seconds } --- the require should be outside of the loop IMHO ;). Or if you want to run the script from the browser, use meta-refresh, see Refresh Page thread on this list. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] kill a script...plz help
sorry for asking such questions , ... If u all don't have codings for such cases , could u plz direct me with some steps ? Thank u # i used this script to run that abc.pl in command prompt. It is perfectly running. ?php //$ExhibitA = shell_exec('/root/whole/abc.pl'); // Perfect.$ExhibitB = shell_exec('env -i /root/whole/abc.pl'); ? * Actually i need to stop that as well , i got this result by ps -e 1182 pts/0 00:00:00 abc.pl so , plz help for that , thank u curlys -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] hyperlink to the mysql data
hi , i haveretrived some perticular data from mysql , and them show in the web browser.( It is very few data ) When clicking on one of that that perticular data , i want to show thewhole information with related to the above mentioned part. So , can some body help me to add like this hyper link to the mysql data ? thanx in advance curlys -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] kill a script
i used this script to run that abc.pl in command prompt. It is perfectly running. ?php //$ExhibitA = shell_exec('/root/whole/abc.pl'); // Perfect.$ExhibitB = shell_exec('env -i /root/whole/abc.pl'); ? * Actually i need to stop that as well , i got this result by ps -e 1182 pts/0 00:00:00 abc.pl so , plz help for that , thank u curlys -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] export mysql to excel
hi , i want to export data in mysql to excel .. but problem is mysql runs in the linux machine , How can i get that data from mysql-Linux machine to windows-Excel machine , plz help asap thanx in advance curlys -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] start/stop deamon
can some body tell me how to start/stop a deamon ( eg: dhcpd ) from php ? and also can v apply that same method to start/stop a some script by php ? thanx in advance curlys -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Stop/Start a perl script
by using php technology, is there any possibility to stop/start perl script ina remote machine ? thanx in advance curlys -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Fw: plz help
- Original Message - From: CurlyBraces Technologies ( Pvt ) Ltd To: PHP ; Curt Zirzow ; Vail, Warren Sent: Sunday, March 28, 2004 10:56 AM Subject: plz help hi , i have an apache web server in linux . Those php scripts runs in that pc. Mean while another perl scrips runs associate with that php scripts . altogether they develop a out put and store in the mysql database.That process perfectly running.There is no any dout. Once this web server started , no body can access this machine directly . This machnie is behind the firewall . This machnie assingned as a web server . That's mean all the ports has been blocked by the firewall except port 80 ( this web server running under port 80 ). ping also has been blocked. That certain url can access from any other out side pcs. Some request handling purpose i want to stop that perl script where it is runing in the web server . But from the web server we do it ctrl+c perl.pl I want to do this through the web browser. when pressing a stop button , it should effect to the perl script in the web server and also when pressing start button it should start again . . i think u all can understand my problem , ..plz help , can some body help me to coverup the php scripting part, thanx in advance curlys -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] plz help
hi , i have an apache web server in linux . Those php scripts runs in that pc. Mean while another perl scrips runs associate with that php scripts . altogether they develop a out put and store in the mysql database.That process perfectly running.There is no any dout. Once this web server started , no body can access this machine directly . This machnie is behind the firewall . This machnie assingned as a web server . That's mean all the ports has been blocked by the firewall except port 80 ( this web server running under port 80 ). ping also has been blocked. That certain url can access from any other out side pcs. Some request handling purpose i want to stop that perl script where it is runing in the web server . But from the web server we do it ctrl+c perl.pl I want to do this through the web browser. when pressing a stop button , it should effect to the perl script in the web server and also when pressing start button it should start again . . i think u all can understand my problem , ..plz help , can some body help me to coverup the php scripting part, thanx in advance curlys -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] tail -f into web page
hi friends , Ihave a log file that is creating while running a perl script.That log can i read ( using, tail -f log.file ) in to a web interface from php ? Is there any possibility , plz help ..., Thanx in advance, curlys -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Fw: remote stop/start the applications
Tell me even , is it possible to do so ?? plz reply asap - Original Message - From: CurlyBraces Technologies ( Pvt ) Ltd To: PHP Sent: Friday, March 05, 2004 6:40 PM Subject: Fw: remote stop/start the applications - Original Message - From: CurlyBraces Technologies ( Pvt ) Ltd To: PHP Sent: Friday, March 05, 2004 3:30 PM Subject: remote stop/start the applications hi , My OS = Red Hat Linux 8 webserver = apache In that machine , there is some perl , and php scrpts r running. This perl script is the application that i have to run over the web. This will effect for the whole process. Some times i want to stop/run that perl script from the other machine over the web. So can i do that over the web , because it is running on the intranet. can somebody help me to do this php scripting ...plz thanx curlys -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Fw: remote stop/start the applications
By using php web page of a certain webserver can i go into the some other local plase in the same web server ? Because for the special request i want kill some prosess which are runs in the webserver. All Telent and other remote login restricted from the firewall . thanx - Original Message - From: Jason Wong [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, March 07, 2004 7:16 PM Subject: Re: [PHP] Fw: remote stop/start the applications On Sunday 07 March 2004 20:50, CurlyBraces Technologies \( Pvt \) Ltd wrote: Tell me even , is it possible to do so ?? Yes. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* The very remembrance of my former misfortune proves a new one to me. -- Miguel de Cervantes */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Fw: remote stop/start the applications
sorry , u didn't get my point ..i will explain it again. 1.web server runs with some php scripts 2.It will show the out put of a certain executable file's result. 3.This file run in the /usr/local/src/./asd.pl 4.I need stop the function of that file , like ctrl+c can u hel me further ? thanx - Original Message - From: Raditha Dissanayake [EMAIL PROTECTED] Cc: PHP [EMAIL PROTECTED] Sent: Sunday, March 07, 2004 8:31 PM Subject: Re: [PHP] Fw: remote stop/start the applications You can only kill your own processes or you have to rely on a suexec mechanism. What you should be doing is SFTA because this topic has been discussed many times in the past. all the best CurlyBraces Technologies ( Pvt ) Ltd wrote: By using php web page of a certain webserver can i go into the some other local plase in the same web server ? Because for the special request i want kill some prosess which are runs in the webserver. All Telent and other remote login restricted from the firewall . thanx - Original Message - From: Jason Wong [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, March 07, 2004 7:16 PM Subject: Re: [PHP] Fw: remote stop/start the applications On Sunday 07 March 2004 20:50, CurlyBraces Technologies \( Pvt \) Ltd wrote: Tell me even , is it possible to do so ?? Yes. -- Jason Wong - Gremlins Associab.php -- Raditha Dissanayake. --- http://www.radinks.net/ftp/applet/ An applet that breaks all the rules. Reads, Writes and Deletes files on your hard disk. Uploads what's left to a third party server. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] remote stop/start the applications
hi , My OS = Red Hat Linux 8 webserver = apache In that machine , there is some perl , and php scrpts r running. This perl script is the application that i have to run over the web. This will effect for the whole process. Some times i want to stop/run that perl script from the other machine over the web. So can i do that over the web , because it is running on the intranet. can somebody help me to do this php scripting ...plz thanx curlys -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Fw: remote stop/start the applications
- Original Message - From: CurlyBraces Technologies ( Pvt ) Ltd To: PHP Sent: Friday, March 05, 2004 3:30 PM Subject: remote stop/start the applications hi , My OS = Red Hat Linux 8 webserver = apache In that machine , there is some perl , and php scrpts r running. This perl script is the application that i have to run over the web. This will effect for the whole process. Some times i want to stop/run that perl script from the other machine over the web. So can i do that over the web , because it is running on the intranet. can somebody help me to do this php scripting ...plz thanx curlys -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php