php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #48775 php-5.2.10 treats include_path as url/hostname
Submitted: 2009-07-02 13:22 UTC Modified: 2009-07-25 20:45 UTC
Votes:4
Avg. Score:4.0 ± 1.0
Reproduced:2 of 4 (50.0%)
Same Version:2 (100.0%)
Same OS:1 (50.0%)
From: alexander at sulfrian dot net Assigned:
Status: Closed Package: Streams related
PHP Version: 5.2.10 OS: Linux
Private report: No CVE-ID: None
 [2009-07-02 13:22 UTC] alexander at sulfrian dot net
Description:
------------
Hi,
I updated recently to php-5.2.10 and some scripts are not working anymore. The scripts added some elements to the include_path. While including some files from the include_path php echos the error that it cannot resolve the host name. I think that this error is caused by the change, that stream wrappers could be used in the include path and the PATH_SEPERATOR and the stream wrappers collidate.

Downgrading to php-5.2.9-r2 solves the problem again.

Actual result:
--------------
[02-Jul-2009 13:21:47] PHP Warning:  require() [<a href='function.require'>function.require</a>]: Couldn't resolve host name in <file> on line <line>
[02-Jul-2009 13:21:47] PHP Warning:  require(rcube_user.php) [<a href='function.require'>function.require</a>]: failed to open stream: operation failed in <file> on line <line>

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-07-02 15:17 UTC] jani@php.net
What scripts..? When you install PHP from sources, any existing ini files ARE NOT TOUCHED. Did you use some RPM or what?
 [2009-07-03 08:59 UTC] alexander at sulfrian dot net
Noticed while trying to install roundcube webmail 0.2.0. I just tried to create a minimal testing script and didn't get it. 

One strange thing is, that if i call the script via php cli from shell, it is working. Don't know how i could debug it. roundcube using the __autoload function and all includes seems to be ok. Is there any possibility to echo the hostname, that could not be resolved if such error occur?

I am using Gentoo Linux and so installed php from source via the portage system of gentoo. I not changed the config and so used the original that is installed by gentoo. (Do not know if it is 100% identical to the original from the php source package.)
 [2009-07-03 14:09 UTC] bugs+php at nospam dot obeliks dot de
I can confirm that I'm having the same problem with php-5.2.10 on Gentoo linux.

Here it occurs with Horde Webmail, which uses the following call to change the include_path (which worked fine on any previous version of php):
> ini_set('include_path', dirname(__FILE__) . PATH_SEPARATOR . dirname(__FILE__) . '/../pear');
 [2009-07-05 01:26 UTC] till@php.net
Because I work on RoundCube, I double-checked this bug submission.

Just compiled PHP 5.2.10 from source with this:

./configure --with-mysql  --enable-fastcgi --enable-force-cgi-redirect
make

And then put the "sapi/cgi/php-cgi" into the webserver as the fcgi 
binary it uses to serve PHP to test it. And, absolutely no issues.

It seems to me like the Gentoo packages are borked. I suggest you guys 
verify that it works for you when you compile PHP from source.
 [2009-07-06 23:02 UTC] hoffie at gentoo dot org
I don't think we are shipping any intrusive patches here at gentoo anymore, and those we do ship haven't changed for some time.
Also, I'm using roundcube without problems on one of my machines with the latest php and another dev just told me he's using horde without problems.
Please retry with a vanilla php build (tarball from php.net)
 [2009-07-09 00:56 UTC] alexander at sulfrian dot net
Same problem with the latest snapshot.

But I got the problem. Problem with roundcube is fixed if I ./configure laltest snapshot (or 5.2.10) without --with-curlwrappers (means --without-curlwrappers).

With 5.2.9 it worked with --with-curlwrappers. Maybe it is a side condition of the stream_wrapper in include (change from 5.2.9 to 5.2.10). Would be nice if it is fixable :)

Thanks
Alexander
 [2009-07-10 22:12 UTC] jani@php.net
Same problem as in bug #48603 then.
 [2009-07-10 22:25 UTC] alexander at sulfrian dot net
Quote from that bug:

> Seems to be caused by the changes to curl to avoid serving file://
> urls when open_basedir or safe_mode are enabled combined with the
> "--with-curlwrappers" option.

But my config contains that:

;open_basedir =
safe_mode = Off


Alex
 [2009-07-25 20:45 UTC] jani@php.net
This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Dec 06 17:01:27 2024 UTC