ID: 14797 User updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Open Bug Type: Scripting Engine problem Operating System: Windows 98 SE PHP Version: 4.1.0 New Comment:
Hello, I tried: DocumentRoot "d:/foo/htdocs" DocumentRoot "d:/foo/htdocs/" DocumentRoot "d:\foo/htdocs" DocumentRoot "d:\foo/htdocs/" I used 'php.ini-dist' with include_path set to ".". Nevertheless, I can't include files with an absolute path. Statements with a relative path work properly. Regards, Martin Previous Comments: ------------------------------------------------------------------------ [2002-01-15 23:25:31] [EMAIL PROTECTED] Oh yeah, the other reason I think it's a bug is because the behaviour is not consistant between the CGI version and the SAPI version of the same build. If it has to be inconsistant it should be documented. (proably a blurb on top of include_path in php.ini would be the best place for it, since people will find that include_path causes the problem when their doc_root is set wrong) ------------------------------------------------------------------------ [2002-01-15 23:21:44] [EMAIL PROTECTED] The Solution: ------------- You need to add the drive letter as follows DocumentRoot "D:\apache/htdocs/" ^ | emphasis on the "\" then relative include_path statements should work. I still think this is a bug, because apache runs fine with DocumentRoot "/apache/htdocs/", it's only PHP that has problems when include_path is set. ------------------------------------------------------------------------ [2002-01-10 07:36:40] [EMAIL PROTECTED] Hello, when I add the drive letter to the include statement (e.g. 'd:/foo/test.php'), then the inclusion works properly. But then all scripts only run on a window machine or we have to change every script before uploading it to our "real" webserver, respectively. Regards, Martin ------------------------------------------------------------------------ [2002-01-10 06:26:27] [EMAIL PROTECTED] Hello, whenever I add the drive letter (d:) to the DocumentRoot of the VirtualHost, there is the same error as with PHP running as "Server API CGI": - It's possible to set the include-path in php.ini. - Scripts without any include statement work well. - include statements with a relative path work. - include statements with an absolute path do not work, there is the following error: Failed opening '/foo/test.php' for inclusion However, it is now possible to start PHP with include-path in php.ini set to a non-empty value. But for me, it's very important to use include with an absolute path. I tried to put the file "test.php" into the folder "foo" on drive c:, but this doesn't work properly too. I thought PHP is looking for the file on the wrong disk, but this seems to be not the underlying problem. Regards, Martin ------------------------------------------------------------------------ [2002-01-09 21:17:13] [EMAIL PROTECTED] Martin, Did my suggestion work for you? Where you missing the drive letter? -Garth ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/?id=14797 Edit this bug report at http://bugs.php.net/?id=14797&edit=1 -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]