php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #17421 hardcoded include path in Php4ts.dll set to c:\php4\pear
Submitted: 2002-05-24 17:40 UTC Modified: 2002-05-24 19:56 UTC
From: spluess at creative dot net Assigned:
Status: Not a bug Package: PEAR related
PHP Version: 4.2.1 OS: Windows x.x
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: spluess at creative dot net
New email:
PHP Version: OS:

 

 [2002-05-24 17:40 UTC] spluess at creative dot net
Hi

installed php 4.2.1 on windows 2000 in the default directory it proposes, which is C:\php, with apache 1.3.x and also tried apache 2.x

I then tried to code my first pear code and immediately got the error:
Fatal Error: Failed opening required 'DB.php' (include_path='.;c:\php4\pear') in .....
I also looked at the output of php_info and sure enough the include path is .;c:\php4\pear
So I started a search for who/what was setting that include path as setting the include path in php.ini didn't change the result.

After doing a search on all the files in the php distribution I found that it is hardcoded in the dynaminc library 'PHP4TS.DLL'  as ".;c:\php4\pear"

Now after I renamed the directory to php4 and changed my apache conf files it worked.
But I also saw that various files (conf or utilities like pear.bat) have the default set to c:\php and the PHP manual also refers to c:\php as the default.

Wonder if it wouldn't be better not to have such a path hardcoded and have it added to php.ini or something similar.

Thanks

Serge

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-05-24 19:56 UTC] edink@php.net
The path you mention is just a default that can be overriden in your %WINDIR%\php.ini. For example:

include_path = ".;c:\php\pear"
 [2002-05-28 11:49 UTC] spluess at creative dot net
Ok, I just tried that and it works. I had done searches on google, etc. before I posted this here.
Would it be at least possible to get some consistency in the 'default' install. I downloaded both php-4.2.1-Win32.zip and php-4.2.1-installer.exe
They include examples for php.ini (php.ini-dist and php.ini-recommended) and both have as example for the include path on windows:
;include_path = ".;c:\php\includes"

Neither of the two windows installer or zip file even create such a folder.

Also the pear.bat file has as defaults all the paths set to c:\php ....

The install.txt file is referring c:\php as a good start:
"...Extract the distribution file to a directory of your choice. C:\PHP is a good start..."

Just some thoughts:

Would C:\php be a better default than C:\php4 ?

Would the same 'default' in the php.ini-* examples be
a better 'default' in php4ts.dll ?

Should the 'c:\php\pear' directory be part of the 'default' include path or should it be mentioned in the php-ini* example files ?

Thank you for the reply.

Serge
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jan 02 12:01:29 2025 UTC