php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #11612 php_include completely non-functional
Submitted: 2001-06-22 01:54 UTC Modified: 2002-02-14 02:05 UTC
Votes:2
Avg. Score:3.5 ± 1.5
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:2 (100.0%)
From: uhl at cis dot ohio-state dot edu Assigned:
Status: Closed Package: Documentation problem
PHP Version: 4.0.5 OS: Win2k Server
Private report: No CVE-ID: None
 [2001-06-22 01:54 UTC] uhl at cis dot ohio-state dot edu
Using Apache 1.3.19 on win2k with php as a library.

If i put any value at all for include_path in php.ini, it causes a message like this on every page served:

Warning: Failed opening '/path/to/file.php' for inclusion (include_path='\include\path;.') in Unknown on line 0

So, for an actual example, it would look like this:

Warning: Failed opening '/www/demoxpress.com/html/test/phpinfo.php' for inclusion (include_path='\php\pear;.') in Unknown on line 0


As long as I keep the include_path commented out or only assign an empty string, it works fine (except for not having an include path).  

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-06-22 09:22 UTC] sniper@php.net
Try this:

include_path=".;C:\path\to\something;C:\path\to\something\else"

Notice the "'s around the path.

--Jani

 [2001-06-22 10:34 UTC] uhl at cis dot ohio-state dot edu
I have it like that, with double quotes.  This is an excerpt from my php.ini:

;;;;;;;;;;;;;;;;;;;;;;;;;
; Paths and Directories ;
;;;;;;;;;;;;;;;;;;;;;;;;;

; UNIX: "/path1:/path2"  Windows: "\path1;\path2"
include_path = ".;c:\www\demoxpress.com\html\test"



 [2001-06-23 06:29 UTC] sniper@php.net
reopened

 [2001-06-23 06:30 UTC] sniper@php.net
Does it work with PHP 4.0.6?

 [2001-06-24 02:28 UTC] uhl at cis dot ohio-state dot edu
nope, exactly the same. :(
 [2001-12-18 15:56 UTC] cmk@php.net
On my Win2k box it works just fine, include_path has always been '.' only.
It worked with PHP 4.0.6 and still works with 4.1.0.
Your problem must be caused by something else.
 [2001-12-18 16:21 UTC] cmk@php.net
Did more testing, always works for me.
 [2002-01-13 13:09 UTC] tobi at xonline dot de
Still have the same problem:

Some configuartion: Win2000 pro, apache 1.3.14 and PHP4.1.1

if the include_path is empty.. no problem
if I put anything in eg 'include_path = ".;\apache\htdocs\" error message is like this: 'Warning: Failed opening '/apache/htdocs/phpinfo.php' for inclusion (include_path='.') in Unknown on line 0'

Everything works fine, if there?s nothing in the include_path.

Do you have a solution in the meantime?
 [2002-01-13 13:34 UTC] msopacua at idg dot nl
Should be reclassified as documentation problem.

Use:
1) a full reference including the disk, i.e.: .;c:\include\path
2) For virtual hosts, the document root in Apache httpd.conf should follow the same principles, i.e.:
DocumentRoot "c:\www\demoxpress.com\html"
 [2002-01-13 15:02 UTC] yohgaki@php.net
Make this to doc problem.

Current http://www.php.net/manual/en/configuration.php uses full path.
What should be fixed?
 [2002-01-13 15:23 UTC] msopacua at idg dot nl
The warning should probably go into:
http://www.php.net/manual/en/install.windows.php

The root of this problem, is not the include_path, but the DocumentRoot Apache directive - or any document root setting on a windows webserver.

While any path syntax works for Apache, only windows native works for php. This goes for ISAPI as well, under other webservers, like Sambar. Don't have IIS, so I haven't tested it there. Further more "\" is not always the root of the current disk. I suppose it is, but current probably is current for c:\winnt\system32\php4_ts.dll instead of the webserver executable. Haven't fully debugged that.

In any case, specifying document roots in the windows native path syntax, prefixed with the drive letter, fixes all of the above.
 [2002-01-13 15:49 UTC] tobi at xonline dot de
Sorry, problem is still alive:
Now I use the following:

; Windows: "\path1;\path2"
include_path = ".;c:\apache\htdocs\eucarkunden"
; The root of the PHP pages, used only if nonempty.
doc_root = c:\apache\htdocs

Problem is the same 'Warning: Failed opening '/apache/htdocs/index.php' for inclusion (include_path='.;c:\apache\htdocs\eucarkunden') in Unknown on line 0'
 [2002-01-13 16:26 UTC] msopacua at idg dot nl
Please read:

The document root in -->> Apache's httpd.conf <<--.

Look at your warning:
'Warning: Failed opening '/apache/htdocs/index.php'

Why doesn't that read:
'Warning: Failed opening 'c:\apache\htdocs\index.php'

?
 [2002-01-13 16:40 UTC] tobi at xonline dot de
You?re right. It works now!
Thank You
 [2002-02-14 00:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 [2002-02-14 02:05 UTC] cnewbill@php.net
See this?

>>You?re right. It works now!
>>Thank You

Closing...

-Chris
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 00:01:29 2024 UTC