php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #41556 bug in ini_set(), include_path function
Submitted: 2007-06-01 05:22 UTC Modified: 2007-06-01 06:41 UTC
From: flexibill2001 at hotmail dot com Assigned:
Status: Not a bug Package: *Configuration Issues
PHP Version: 4.4.7 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.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: flexibill2001 at hotmail dot com
New email:
PHP Version: OS:

 

 [2007-06-01 05:22 UTC] flexibill2001 at hotmail dot com
Description:
------------
ini_set('include_path',ini_get('include_path').';'.$_SERVER['DOCUMENT_ROOT'].'/Dynamic_Form2/pear');

i use this instruction on one of my php file.This worked fine for windows but when i call this page from linux machine it did not work and give error.

solution : make sure when you using linux for include new path use ":" and for windows use ";" .



Reproduce code:
---------------
<?ini_set('include_path',ini_get('include_path').';'.$_SERVER['DOCUMENT_ROOT'].'/Dynamic_Form2/pear');

require_once "HTML/QuickForm.php";

      $form = new HTML_QuickForm('frmTest', 'get');
      $form->addElement('header', 'MyHeader', 'Testing QuickForm');
      $form->display();
?>

Expected result:
----------------
when run this coude on windows it work fine.but on linux give following error:

Warning: main(HTML/QuickForm.php) [function.main]: failed to open stream: No such file or directory in F:\apache2triad\htdocs\Dynamic_Form2\delme.php on line 5


Actual result:
--------------
when run this coude on windows it work fine.but on linux give following error:

Warning: main(HTML/QuickForm.php) [function.main]: failed to open stream: No such file or directory in F:\apache2triad\htdocs\Dynamic_Form2\delme.php on line 5


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-06-01 06:41 UTC] tony2001@php.net
http://php.net/manual/en/ini.core.php#ini.include-path

The format is like the system's PATH environment variable: a list of directories separated with a colon in Unix or semicolon in Windows.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 13:01:30 2024 UTC