Re: PHP program running from shell ends silently [SOLVED]
| From: | Ruben | Date: | Mon, 17 Mar 2003 17:06:04 +0000 |
| Subject: | Re: PHP program running from shell ends silently [SOLVED] | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-139978@lists.php.net to get a copy of this message | ||
Thanks a lot Chris:
'memory_limit' is the responsible. I have done a couple of tests and AFAIK PHP shows no error at all when this limit is surpassed (I have error_reporting = E_ALL & ~E_NOTICE in php.ini).
Ruben.
Chris Hewitt wrote:
Ruben wrote:I'm running a 'batch' PHP program from the shell with "#!/usr/bin/php -q" as the first line. After some processing, it ends silently without any visible notice or error. It processes information from a PostgreSQL database and shows its progression (via echoes) until it suddenly stops. This behaviour occurs when it treats a high volume of information, with just a few records it works fine. I guess it may be a problem of lack of memory but I have tried to look for any trace in /var/logs and I cannot find any sign of the program. How can I know what is happening? Where can I look for the error?Its not much to go on. I'd put some more debug code in an log it, e.g. append a file, so you can see what is happening. If it is only occuring when there is a lot of data, are you running into the max_execution_time (by default 30 seconds) in php.ini. If you feel it may be memory, maybe the memory_limit parameter is too low for your application. HTH Chris