php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #47542 configuration variable doesn't work for includes,requires
Submitted: 2009-03-02 11:52 UTC Modified: 2009-03-03 03:16 UTC
From: vivekanandan8 at yahoo dot com Assigned:
Status: Not a bug Package: *Configuration Issues
PHP Version: 5.2.9 OS: debian linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: vivekanandan8 at yahoo dot com
New email:
PHP Version: OS:

 

 [2009-03-02 11:52 UTC] 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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-03-02 22:34 UTC] 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-03 03:16 UTC] kalle@php.net
You can't use ini_set('display_errors') to hide errors because your script have not reached the execution state yet.
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Sun Aug 14 00:05:44 2022 UTC