|  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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
New email:
PHP Version: OS:


 [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 01 18:03:56 2023 UTC