View Full Version : execute php file with exec() error

05-03-2009, 09:43 PM
hi, i wrote main.php that execute 15-20 php file with exec ("php myfile.php >/dev/null &");

main.php works great and runs myfile.php.

myfile.php has curl commands and it connect to another website and it should be go on about 5mins. When i execute the file from ssh it works nicely, but when main.php calls this execute command, running of myfile.php is stopped when the curl commands coming ( i put the insert sql command to some locations of page and there is no row after curl command =) ). i though it related with memory or execution time problems... i tried everything like

ini_set('memory_limit', '500M');
ini_set('max_input_time', '0');
ini_set('max_execution_time', '0');


did you have any idea? can be any cpu limit ? or connection limit?

i have root access to my centos vps.

05-04-2009, 10:23 PM
have you checked permissions? chech all files have execute permission, and if you are writing data anywher, check it has Write permissions allowed...