| 3:19 pm on Feb 12, 2006 (gmt 0)|
Probably cause your script is exceeding the "max_execution_time" which is usually 30 seconds by default. You can change this in your php.ini file. Better solution, though, might be running your script from the command line.
| 3:25 pm on Feb 12, 2006 (gmt 0)|
No need to modify your pnp.ini just for that, you can set the max_execution_time on the fly using ini_set(). But anyway I think appache has its own time out (about 5 mins?), but as said above, becacuse it is your local pc (server), you must be able to run it from the command line with with no restrictions, the timeout restrictions apply to web sessions only as so far I know.
PM me if you need more help.
| 3:49 pm on Feb 12, 2006 (gmt 0)|
Jamesa and Caspita - thanks for your help.
What do I enter to run it from the Run program?
Is all my php / mysql connections ok for this or do I need to change aspects of the code?
| 4:04 pm on Feb 12, 2006 (gmt 0)|
Well in Unix it'd be:
might need the full path to php:
On Windows it'd probably something like
Now if you have anything in the query string, for example
scriptname.php?id=1234&color=blue, that wouldn't work on the command line. Instead you can do this:
C:\path\to\php scriptname.php "1234" "blue"
and in the script:
$id = $_SERVER["argv"];
$color = $_SERVER["argv"];
| 4:42 pm on Feb 12, 2006 (gmt 0)|
Thanks - I've now got the script running fine and continuously using a big while loop :)
One last thing - how do I redirect from one script to another using the command line?
E.g. in my script I could have:
| 5:08 pm on Feb 12, 2006 (gmt 0)|
I don't think re-direct will work because what you are setting there are the headers for the browser/web server, etc. In the command line you are not using the browser nor the web sever at all. Instead you may want to check into some other php functions like exec, shell_exec, etc. This doc will show you more: