Getting PEAR to work on XAMPP (Apache/MySQL stack on Windows)
You need to fix your include_path
system variable to point to the correct location.
To fix it edit the php.ini
file. In that file you will find a line that says, "include_path = ...
". (You can find out what the location of php.ini by running phpinfo()
on a page.) Fix the part of the line that says, "\xampplite\php\pear\PEAR
" to read "C:\xampplite\php\pear
". Make sure to leave the semi-colons before and/or after the line in place.
Restart PHP and you should be good to go. To restart PHP in IIS you can restart the application pool assigned to your site or, better yet, restart IIS all together.
Trouble with Pear in XAMPP
You cannot fix the pear.ini-in-c:\windows
problem unfortunately.
A solution is to run the terminal as administrator, and run the pear install command in it.
If you want to modify the locations, use pear config-set key value
.
Xampp - Incorrect PEAR data_dir setting
I fixed the issue by resetting phing parameters using the commands
pear config-set doc_dir C:\xampp\php\pear\docs
pear config-set cfg_dir C:\xampp\php\pear\cfg
pear config-set data_dir C:\xampp\php\pear\data
pear config-set cache_dir C:\xampp\php\pear\cache
pear config-set download_dir C:\xampp\php\pear\download
pear config-set temp_dir C:\xampp\php\pear\temp
pear config-set test_dir C:\xampp\php\pear\tests
pear config-set www_dir C:\xampp\php\pear\www
Then reinstalled phing by
pear install phing/phing
Now build is working fine.
Current directory (./) is not within PHP include path XAMMP
You need to fix your include_path
in php.ini.
In that file you will find a line that says something similar to:
include_path = C:\xampp7\php\PEAR
.
To fix change the line below
frominclude_path=C:\xampp7\php\PEAR
toinclude_path=".;C:\xampp7\php\PEAR"
Why won't PEAR work on my PHP Windows installation?
Based on your comments, it looks like your include_path
is wrong. Go change your PHP.ini and set your include path to:
include_path = ".;C:\wamp\bin\php\php5.3.10\pear"
Related Topics
Simple HTML Dom File_Get_HTML Not Working - Is There Any Workaround
Fatal Error: Call to Undefined Function Imap_Open() in PHP
Cannot Use String Offset as an Array in PHP
How to Allow Duplicate Keys in PHP Array
Mysqli Binding Params Using Call_User_Func_Array
Intl Extension PHP_Intl.Dll with Wamp
MySQL Diacritic Insensitive Search (Spanish Accents)
Output Is in Seconds. Convert to Hh:Mm:Ss Format in PHP
Getting Actual Value from PHP Simplexml Node
PHP Serial Port Data Return from Arduino
How to Detect the Browser with PHP or JavaScript
How to Encrypt PHP Source or Compile It So Others Can't See It? and How
How to Re-Format Datetime String in PHP
Php: Check If Variable Exist But Also If Has a Value Equal to Something
Explode a String to Associative Array Without Using Loops