php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #14563 include_path in Apache SAPI on Win2K very broken...
Submitted: 2001-12-17 11:01 UTC Modified: 2001-12-18 15:17 UTC
Votes:2
Avg. Score:5.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:2 (100.0%)
Same OS:2 (100.0%)
From: garth at utmail dot to Assigned:
Status: Not a bug Package: Reproducible crash
PHP Version: 4.05,4.06,4.08,4.1.0 OS: Windows 2000 (Win2K)
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: garth at utmail dot to
New email:
PHP Version: OS:

 

 [2001-12-17 11:01 UTC] garth at utmail dot to
I've seen a few bugs registered on this before and the 
dev team hasn't seemed to have been able to replicate
this bug...

The bug is very strange in that it effects the SAPI
version of the code on Win2K, but the same build running
as a CGI .EXE is not effected.

Specifically, when one puts ANYTHING as the value for 
*include_path* in the PHP.ini file the apache SAPI will
fail.   

When I say anything this includes setting it to only ".", 
which should work for the local directory's includes.

Here is the message you get (fyi the file being processed
has no include/require statements and it there is no prepend
or append file set in PHP.ini -- 4.1.0)

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

I have observed this bug 4.06, 4.08, 4.1.0 ...
I'm not sure if other breeds of Win32 are effected.

-Garth

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-12-17 11:04 UTC] sander@php.net
This is a problem with your permissions. Check if the webserver has read access to the file.
 [2001-12-17 11:06 UTC] sander@php.net
(reclassified for the stats ;)
 [2001-12-17 11:35 UTC] garth at utmail dot to
When my PHP.ini is set with:
include_path = 
-> I have no problems with SAPI version

When it is set to: 
include_path = "."
-> It gives that error...   

I don't understand how this could be a permissions
issue, why would the web server be able to read the 
file when include_path is blank but not when the 
include_path is set to the local directory?

I've seen the error on UNIX systems when you have
a file set to 600, but this is Win2K.

 [2001-12-17 11:42 UTC] derick@php.net
There is no specific need to set it to ".". It's the default.
 [2001-12-17 11:53 UTC] sander@php.net
Windows NT & 2000 have a permission-system (NTFS). Check it out.
 [2001-12-17 11:53 UTC] garth at utmail dot to
> There is no specific need to set it to ".". It's the default.

If it is the same as the default, shouldn't it work?

If I can't get 
  include_path="." 
to work under Win2K SAPI, how would
 include_path=".;C:\PHP\includes"
ever be able to function?

 [2001-12-17 11:54 UTC] garth at utmail dot to
> Windows NT & 2000 have a permission-system (NTFS). Check it out.

Thanks, I'll try the folder permissions thing.
 [2001-12-17 12:03 UTC] garth at utmail dot to
Apache was able to read static HTML, before I did
the the following:
- set "Full control" to user "Everyone" 
- set PHP.ini -> include_path = ".:/php/includes"

I still get the same error:

Warning: Failed opening '/apache/htdocs/curl_banking.php' for inclusion (include_path='.:/php/includes') in Unknown on line 0

(again the file has no include/require statements)

Please advise.

 [2001-12-17 12:06 UTC] garth at utmail dot to
sorry, 
changed it back to 

include_path = "."

restarted apache

Warning: Failed opening '/apache/htdocs/curl_banking.php' for inclusion (include_path='.') in Unknown on line 0
 [2001-12-17 12:07 UTC] derick@php.net
Windows needs a ; as seperator between include paths, not :
 [2001-12-17 12:10 UTC] garth at utmail dot to
> Windows needs a ; as seperator between include paths, not :

yep I know, uncommented the wrong line... effect is the same... 

Changed PHP.ini to
include_path = ".;y:\apache\includes"

restarted apache

Warning: Failed opening '/apache/htdocs/curl_banking.php' for inclusion (include_path='.;y:\apache\includes') in Unknown on line 0


 [2001-12-18 15:17 UTC] garth at utmail dot to
I think this is a duplicate of bug #11612
http://bugs.php.net/bug.php?id=11612

Here's a summary of the bug:

Error Message:
Warning: Failed opening '/apache/htdocs/helloworld.php' for inclusion (include_path='.')
in Unknown on line 0

Script to create error:
<?php
echo "hello world";
?>

When it appears:
- Appears only in PHP SAPI/APX plug-in for Apache on 
Windows 2000... 4.06, 4.08, 4.1.0 are all effected.
- The error occurs only when include_path is given 
a value (any value including '.')

When it doesn't appear:
- In PHP SAPI/APX plug-in when include_path is not set,
there's no problem.
- When running the CGI version (PHP.EXE) of the same releases there's no problem.

Possible workarounds that were tried and don't work:
- Opening folder permissions to 'Everyone' with 'Full Control'.
- Using just setting include_path to '.'
- Switching the order of include_path dirs
  i.e. 'C:\Apache\includes\;.'
- Using php_value include_path '.' in Apache's httpd.conf


 [2002-01-10 07:40 UTC] m at rtin-burger dot de
See: http://bugs.php.net/bug.php?id=14797
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri May 17 10:01:32 2024 UTC