ID: 25482
Updated by: [email][/email]
Reported By: tim dot lokot at printsoft dot com
-Status: Open
+Status: Bogus
Bug Type: CGI related
Operating System: Debian GNU/Linux 3.0
PHP Version: 4.3.2
New Comment:

Report this to Zend. Not PHP bug.

Previous Comments:

[2003-09-10 21:58:07] tim dot lokot at printsoft dot com

If I run a script with p errors using the CLI on Debian with some
of the Zend software installed on it, p errors are not reported at
all by default.

This is fine, seeing as I can run "php -l file.php" and it "should"
report something more meaningful than:

"Errors parsing file.php"

If I put this file onto Windows and run it using the 4.3.3 CLI, I get

"P error: p error, unexpected '{' in virtuele-backup.php on
line 45
Errors parsing virtuele-backup.php"

output of php -v
PHP 4.3.2 (cli) (built: Jul 16 2003 15:43:08)
Copyright (c) 1997-2003 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2003 Zend Technologies
with Zend Extension Manager v1.0.0, Copyright (c) 2003, by Zend
with Zend Optimizer v2.1.0, Copyright (c) 1998-2003, by Zend
with <b>DISABLED</b> Zend Performance Suite v3.5.0, Copyright (c)
1999-2003, by The Accelerator presently supports only Apache, ISAPI and

output of php -m
[PHP Modules]
Zend Optimizer

[Zend Modules]
<b>DISABLED</b> Zend Performance Suite
Zend Extension Manager
Zend Optimizer

I think it is the Zend stuff that is suppressing the errors as I have
another server that is reporting errors without the Zend stuff
installed. This server is exactly the same is every other respect.

* Please note that I will not be able to install higher versions of php
to test this as it is a production server and the Zend software we have
is not certified for higher versions *

Reproduce code:
Sorry this is more than 20 lines long, but I have no other way of
getting this to you:


// Check if mysql extension is loaded or not. CLI is not compiled with
mysql support?

if (!extension_loaded ('mysql'))
dl ('');

// Get current working directory

$cwd = getcwd();

// Create .offline file to stop Virtuele from accessing the database

$retVal = `touch /var/www/webroot/.offline`;

// Connect to MySQL

$db = mysql_connect ('localhost', '*******', '*******') or die ('Cant
connect to mysql: ' . mysql_error());
$db = mysql_select_db ('virtuele', $db) or die ('Cant connect to
Virtuele database: ' . mysql_error());

// Lock database tables


if (!mysql_query ($sql))
echo "ERR: Could not establish table locks: " . mysql_error() .

// Backup the database

// Current timestamp
$dt = date("Ymd-His", time());

chdir ('/var/lib/mysql');
$retVal = `tar zcvf /backup/virtuele_$dt.tgz virtuele/`;
echo $retVal . "\n";

// Unlock database tables


if (!mysql_query ($sql)
echo "ERR: Could not unlock database tables" . mysql_error() . "\n";

// Close MySQL connection

mysql_close ($db);

// Remove the .offline file

$retVal = `rm /var/www/webroot/.offline`;

// Put the focus back into the same directory we started in
chdir ($cwd);

Expected result:
"P error: p error, unexpected '{' in virtuele-backup.php on
line 45
Errors parsing virtuele-backup.php"

Actual result:
"Errors parsing virtuele-backup.php"


Edit this bug report at