php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #6336 setting include_path breaks top index.php
Submitted: 2000-08-24 12:29 UTC Modified: 2001-06-01 15:33 UTC
From: peter dot kocks at bayagte dot com Assigned: jmoore (profile)
Status: Closed Package: Documentation problem
PHP Version: 4.0 Latest CVS (24/08/2000) OS: Solaris 2.7
Private report: No CVE-ID: None
 [2000-08-24 12:29 UTC] peter dot kocks at bayagte dot com
php version php4.0.2RC1
solaris 7

Create this simplest of php scripts called "index.php" in your Document Root.

<?
   echo "hello world<br>";
?>

in php.ini change include_path to whatever

include_path    = "/usr/test/include"

Point your browser to the index.php.  I get the warning message:

Warning: Failed opening 'index.php' for inclusion (include_path='/usr/test/include') in Unknown on line 0

This is new behaviour that will cause problems when php is released.  

Details on my build:

        ./configure \
        --with-apxs=/usr/local/apache/bin/apxs \
        --with-config-file-path=/var/baygate/www/conf \
        --enable-track-vars \
        --enable-trans-sid \
        --with-ndbm \
        --with-informix=/opt/informix/prod \
        --with-system-regex \
        --enable-sysvsem \
        --enable-sysvshm 

APACHE = apache_1.3.12
PHP = php-4.0.2RC1
MODSSL  = mod_ssl-2.6.6-1.3.12
Solaris 2.7


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-08-25 06:19 UTC] jmoore@php.net
try putting . in your include path.

include_path    = ".:/usr/test/include"

Please give feedback

James

 [2000-08-30 21:05 UTC] jmoore@php.net
FW On behalf of Peter Kocks:

Yes, ".:" does work in almost every case.  The case where it does not is when there is a chdir() in a auto prepend file.
 
However, the real point of this bug report has to do with backwards compatibility, documentation, and error messages.
 
Compatibility:  Changes in behavior should be announced in some formal place.  So, when people upgrade they can check for potential problems.
 
Documentation: the php.ini-dist should be changed to suggest you put in a ".:" in the include_path().
 
Error message: Should be more informative in the case where the script_name is not accessible via the include path.  If it is the script name, say something about "." in path or something.
 [2001-05-13 02:40 UTC] sbergmann@php.net
Can we close this bug? Shall we change php.ini-dist?

 [2001-06-01 15:33 UTC] sniper@php.net
This is already fixed.

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 11:01:33 2024 UTC