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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
49 + 30 = ?
Subscribe to this entry?

 
 [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 05:01:29 2024 UTC