开发者

OS X PHP server with Crons

开发者 https://www.devze.com 2023-03-31 15:37 出处:网络
I have an OS X 10.6 Server running apache, php. I have CronniX installed to help me manage my cron jobs. I have a php script like this:

I have an OS X 10.6 Server running apache, php. I have CronniX installed to help me manage my cron jobs. I have a php script like this:

<?
ini_set('display_errors', 1);
$a = array('a', 'b', 'c');
foreach ($a as $v):
echo $v;
?>

As you can see the endforeach; command is missing, but the cron output (as seen from CronniX Task's tab) does not show any errors, it just dies.

This 开发者_StackOverflow中文版is not a foreach / endforeach vs. { } issue, none work.

Of course error reporting is valuable for me in more complex scripts, where it's impossible to debug without it.

Thanks!


I think it has something to do with the fact that it's a parse error. In order to be able to catch parse errors you would need to append the php file

php_value auto_prepend_file /Volumes/dev1/http/auto-prepend.php

and user register_shutdown_function in auto-prepend.php.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号