#47542 [Bgs]: configuration variable doesn't work for includes,requires

From: Date: Tue, 03 Mar 2009 03:16:35 +0000
Subject: #47542 [Bgs]: configuration variable doesn't work for includes,requires
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-134358@lists.php.net to get a copy of this message
ID: 47542 Updated by: kalle@php.net Reported By: vivekanandan8 at yahoo dot com Status: Bogus Bug Type: *Configuration Issues Operating System: debian linux PHP Version: 5.2.9 New Comment: You can't use ini_set('display_errors') to hide errors because your script have not reached the execution state yet. Previous Comments: ------------------------------------------------------------------------ [2009-03-02 22:34:02] jani@php.net Please do not submit the same bug more than once. An existing bug report already describes this very problem. Even if you feel that your issue is somewhat different, the resolution is likely to be the same. Thank you for your interest in PHP. ------------------------------------------------------------------------ [2009-03-02 11:52:42] vivekanandan8 at yahoo dot com Description: ------------ When setting configuration variable using ini_set for displaying errors does not work when we set in line before the error when we are using include or require.but it works when we set in main page. Reproduce code: --------------- //This is includeFile.php <? ini_set("display_errors",1); print "This is includefile.php ?> //This is test.php <? ini_set("display_errors",0); print "before include"; require_once 'includefile.php'; ?> Expected result: ---------------- before include Parse error: syntax error, unexpected $end in /var/www/cof1/bk/sivam/test1/includefile.php on line 5 Actual result: -------------- before include ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=47542&edit=1

« previous php.bugs (#134358) next »