How to set maximal debugging/log level output from PHP command line?

I am starting a PHP daemon from command line in env A successfully. Yet, in env B, it stops right after being started. Same code. No error message.

I was wondering how I could set the maximum debug/log level output when launching the daemon. Is there a specific parameter I can pass? I am willing to collect more information than nothing.

Upvotes: 2

Views: 1129

Answers (1)

You can enable reporting of all messages like this:

$ php -d error_log= -d log_errors=1 -d error_reporting=E_ALL e.php
HAI

file e.php contents

<?php

error_log('HAI');

You should also inspect the exit code of the daemon as that may be a standard unix exit code that would give you some clue.

php e.php ; echo $?

Refs

http://www.php.net/manual/en/errorfunc.configuration.php

Upvotes: 2

Related Questions