I had some free time today to try and see if I could replicate this C:\php5 issue on my XAMPP installation which, because of a mod_perl issue in Apache 2.2.6 in the latest XAMPP 1.6.5, I still have XAMPP version 1.6.3a but it did not make any difference to my replication attempt.
This line in the pear.bat file gave a clue:
:: Check PEAR global ENV, set them if they do not exist
And this line hints at adding those path lines that may be missing:
REM change this lines to match the paths of your system
Here is what I found, but I ran out of time to find the actual code that inserted the C:\ or the php5 - which may be related to having a php5.ini file in this xampp\php directory???:
DesiredUsername wrote:... I discovered this while typing in the command pear config-show in a command prompt at the xampp directory. There were about three paths which used C:\php5. I changed them to what they should be by using pear config-set. This may have removed the traces of the problem.
Check and see if config-set entered or changed any entry in the pear.bat file which will be a further clue that this pear.bat file is at the top of the suspects list - the pear.bat file has been known to cause issues in the past.
Here is what I see on issuing the config-show command on my installed XAMPP - no C:\php5 or odd environment variables evident:
- Code: Select all
C:\xampp>pear config-show
CONFIGURATION (CHANNEL PEAR.PHP.NET):
=====================================
Auto-discover new Channels auto_discover <not set>
Default Channel default_channel pear.php.net
HTTP Proxy Server Address http_proxy <not set>
PEAR server [DEPRECATED] master_server pear.php.net
Default Channel Mirror preferred_mirror pear.php.net
Remote Configuration File remote_config <not set>
PEAR executables directory bin_dir \xampp\php
PEAR documentation directory doc_dir \xampp\php\pear\docs
PHP extension directory ext_dir \xampp\php\ext
PEAR directory php_dir \xampp\php\pear
PEAR Installer cache directory cache_dir \xampp\tmp
PEAR data directory data_dir \xampp\php\pear\data
PHP CLI/CGI binary php_bin \xampp\php\php.exe
PEAR test directory test_dir \xampp\php\pear\tests
Cache TimeToLive cache_ttl 3600
Preferred Package State preferred_state stable
Unix file mask umask 0
Debug Log Level verbose 1
PEAR password (for password <not set>
maintainers)
Signature Handling Program sig_bin c:\gnupg\gpg.exe
Signature Key Directory sig_keydir \xampp\php\pearkeys
Signature Key Id sig_keyid <not set>
Package Signature Type sig_type gpg
PEAR username (for username <not set>
maintainers)
User Configuration File Filename \xampp\php\pear.ini
System Configuration File Filename \xampp\php\pearsys.ini
C:\xampp\php>
Which pretty much mirrors the return of this command in the link you provided.
BTW, did you add the C:\Program Files\xampp\php path to your System Variables as suggested in this article?
Set PHP Paths
Add c:\xampp\php to the end of the PATH in ControlPanel/System/Advanced/EnvironmentVariables
Make sure that in this section of the php.ini file in the apache\bin directory it has the correct entries which on my installation looks like this but yours may be different
- Code: Select all
;;;;;;;;;;;;;;;;;;;;;;;;;
; Paths and Directories ;
;;;;;;;;;;;;;;;;;;;;;;;;;
; UNIX: "/path1:/path2"
;include_path = ".:/php/includes"
;
; Windows: "\path1;\path2"
include_path = ".;C:\xampp\php\pear\;C:\xampp\php\zf\library;C:\xampp\php\zf\incubator\library"
Make sure you use the full path and in your case, for example, it may look like this:
".;C:\Program Files\xampp\php\pear\ ...."... and the same applies to this entry:
- Code: Select all
; Directory in which the loadable extensions (modules) reside.
extension_dir = "C:\Program Files\xampp\php\ext"
... and any other paths in the php.ini file that may not have the full path to the locations.
Not setting the correct paths in this ini file may well be the root cause of your original issue so I did some configuration changes to try and replicate your issue.
I have been successful in replicating your
C:\php5 issue by adding
C:\ to the above php.ini path:
include_path = ".;
C:\;C:\xampp\php\pear\;C:\xampp\php\zf\library;C:\xampp\php\zf\incubator\library"
I get the same result if the line looks like this:
include_path = ""Which is how it looks in the php5.ini file in the .\xampp\php directory and is of course the wrong php.ini file to use, the correct file to use is in the .\xampp\apache\bin directory.
This is the result using the incorrect paths in the .\xampp\apache\bin\php.ini file:
- Code: Select all
C:\xampp>pear config-show
CONFIGURATION (CHANNEL PEAR.PHP.NET):
=====================================
Auto-discover new Channels auto_discover <not set>
Default Channel default_channel pear.php.net
HTTP Proxy Server Address http_proxy <not set>
PEAR server [DEPRECATED] master_server pear.php.net
Default Channel Mirror preferred_mirror pear.php.net
Remote Configuration File remote_config <not set>
PEAR executables directory bin_dir \xampp\php
PEAR documentation directory doc_dir C:\php5\pear\docs
PHP extension directory ext_dir C:\xampp\php\ext\
PEAR directory php_dir \xampp\php\pear
PEAR Installer cache directory cache_dir C:\DOCUME~1\IZZYAN~1\LOCALS~1\Temp\pear\cache
PEAR configuration file cfg_dir C:\php5\pear\cfg
directory
PEAR data directory data_dir C:\php5\pear\data
PEAR Installer download download_dir C:\DOCUME~1\IZZYAN~1\LOCALS~1\Temp\pear\download
directory
PHP CLI/CGI binary php_bin \xampp\php\php.exe
php.ini location php_ini <not set>
PEAR Installer temp directory temp_dir C:\DOCUME~1\IZZYAN~1\LOCALS~1\Temp\pear\temp
PEAR test directory test_dir C:\php5\pear\tests
PEAR www files directory www_dir C:\php5\pear\www
Cache TimeToLive cache_ttl 3600
Preferred Package State preferred_state stable
Unix file mask umask 0
Debug Log Level verbose 1
PEAR password (for password <not set>
maintainers)
Signature Handling Program sig_bin c:\gnupg\gpg.exe
Signature Key Directory sig_keydir C:\WINDOWS\pearkeys
Signature Key Id sig_keyid <not set>
Package Signature Type sig_type gpg
PEAR username (for username <not set>
maintainers)
User Configuration File Filename C:\WINDOWS\pear.ini
System Configuration File Filename C:\WINDOWS\pearsys.ini
C:\xampp>
As you can clearly see the C:\php5 has now reared it's ugly head.
So if the path in the php.ini is incorrect or missing or the directory or file Pear is looking for is missing or incorrect it defaults to a global environment variable or adds php5 to the C:\ directory and I believe this behavior is set by a Pear file and not by XAMPP.
DesiredUsername wrote:... The following site also reports the problem
http://trac.symfony-project.com/wiki/BeginningSymfonyWithPear. They ran xampp-setup.bat, and had it installed in C:\xampp. So I have to conclude that there is something else which is a problem, besides where I set it up or how I did so.
Perhaps you might also like to point out in the above link you provided where exactly your C:\php5 issue is being reported.
Finally if you would prefer, you can delete the Pear installation included in XAMPP and download and install the latest version from
http://pear.php.net/
If you install into it's current location there is no need to change any include paths in the php.ini file.
As always, when posting my comments on these types of subjects, I stand to be corrected by anyone with more knowledge and a deeper understanding of the subject than I.