Receiving unusual messages when running a PHP script on the command line.

Follow

Issue

When a script is run from the command line, irrelevant messages are printed at the beginning of execution.  For example:

C:\>php hello.php
[18.09.2014 16:47:59 p3740/t3948 NOTICE] Successfully established connection to the database
Hello World!

Environment

Zend Server

Windows

Resolution

Ensure that the directory C:\Program Files (x86)\Zend\ZendServer\logs and the files within the directory are writable by the user that is running the script.  Alternately, you can execute the script as a user with elevated permissions.

Details

If the user executing the script cannot write to the logs, the messages are printed to the command line instead of the logs.  These messages are relevant in the context of Zend Server and likely are not relevant to your script.

 

 

Have more questions? Submit a request

Comments

Powered by Zendesk