php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #5125 mod_php stops without warning because of incorrect code
Submitted: 2000-06-19 14:48 UTC Modified: 2000-08-05 05:56 UTC
From: webmaster at peda dot net Assigned:
Status: Closed Package: Parser error
PHP Version: 3.0.16 OS: Linux 2.2.14-5 (RH6.2)
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.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: webmaster at peda dot net
New email:
PHP Version: OS:

 

 [2000-06-19 14:48 UTC] webmaster at peda dot net
Including or inserting following non-php code as php3 code causes parser to stop before running any code and mod_php returns document without data (= browser sees length 0 bytes). It should be noted that following code isn't supposed to work but parser doesn't give any reason for failure - nothing goes into logs or browser. Interesting enough php doesn't even enter forever loop - child quits normally.

Tested with mod_php distributed with Mandrake 7.1 and mod_php build with "./configure '--with-apxs=/usr/sbin/apxs' '--with-mysql=/usr/local/mysql'".

<?php
# Note that we DO NOT run following function - parser just stops??
function phpDie()
{
# comment following to make script working.
	@($a,$b) = print("PHP3 - Yet another parser bug");
	return 1;
}
print("It works now?!?");
?>

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-08-05 05:56 UTC] hholzgra@php.net
well, the '@' operator suppresses error messages,
thats what it is made for in php

wheter it should swallow parse errors may be questionable,
but it is not an error in itself

PS: php4 will report a parse error here
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 16:01:27 2024 UTC