PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
i tried to auto restart the mysql server if it was stuck doing a large query. i used the following code. It emailed me fine but never resterted the services.
If you're trying to run that command inside a web page, then the user is going to be whatever is defined in httpd.conf. Apache starts as root, but the child processes start as the user defined in httpd.conf
To be honest, if you're running into a problem with a query taking too on a web page, modify your php.ini file to restrict the query execution time.
Look for the Resource Limits section of the php.ini file
Is there any other way I can run the same command as a webpage outside the httpdocs folders on apache servers?
I was thinking in the cron commands them selves?
The query that was taking too long has been found and ammended. In the future if this was too happen I would rather the server restart itself and send me a log file and email to notify me of the problem. I'm just trying to prevent the same thing happening in the future.
PHP execution time is set too 7 mins. The reason is that I am in the process of uploading large csv files to upload some data. I need the extra time for processing. This is for something I am doing internal. So no choice in cutting that limit down.
by running a php script in the command line I will need to put the php script in a httpdocs folder (web directory). The httpd.conf files for the web directory will need to be changed (How can I avoid this to give admin permissions to restart the services) - this is where i'm getting confused.
Is there away around, rather than changing the httpd.conf files