|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #22895 PHP cli outputs errors in text AND html
Submitted: 2003-03-26 07:08 UTC Modified: 2003-03-30 08:12 UTC
From: Assigned: helly (profile)
Status: Closed Package: Output Control
PHP Version: 5CVS-2003-03-26 (dev) OS: Linux
Private report: No CVE-ID: None
 [2003-03-26 07:08 UTC]
PHP cli outputs errors in text AND html when using it like:
php application.php

However, it does _not_ output HTML errors if you use the '-r' syntax:

$ php -r try
Command line code(1) : Parse error - parse error, unexpected $end, expecting '{'

But from a file:

$ cat application.php
<?php try ?>

$ php application.php
<br />
<b>Parse error</b>:  parse error, unexpected ';', expecting '{' in <b>/home/mfischer/src/php/ze2/apptest/application.php</b> on line <b>1</b><br />
/home/mfischer/src/php/ze2/apptest/application.php(1) : Parse error - parse error, unexpected ';', expecting '{'


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2003-03-26 07:45 UTC]
Marcus, could you have a look at this?
 [2003-03-30 08:12 UTC]
This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at
In case this was a documentation problem, the fix will show up soon at

In case this was a website problem, the change will show
up on the site and on the mirror sites in short time.
Thank you for the report, and for helping us make PHP better.

The error output is controlled by these settings:

having all of them to 1 and setting log file to stdout
results in every error reported thrice.

I changed some defaults now.
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Wed Feb 08 00:05:48 2023 UTC