I just spent several hours attempting to get PEAR installed into my EasyPHP distribution (EasyPHP is my current choice for a Windows Apache MySQL PHP development server). For whatever reason it was a complete mess to get working. Below I'll list some of the problems I had as well as some workarounds (not necessarily solutions) that allowed me to get PEAR up and running.
The steps should have been the following:
php.exe go-pear.phar
However they turned out to be a little more complicated. Here are some of the issues:
The biggest problem I seemed to have was related to the Windows environmental variable, Path, for EasyPHP being at first non-existent and second not recognized. This may be due to my copy of EasyPHP residing in a directory that's been copied from computer to computer and hasn't actually been installed in a while. Needless to say, EasyPHP should be portable but without the Path variable set, php.exe cannot be executed.
I tried to add this as an environmental variable using the following methods:
Unfortunately I had no luck! My solution turned out to be replace the references to ${path}
with the actual path to my EasyPHP installation.
For some reason my copy of EasyPHP had no xdebug. A quick Google search turned up the http://xdebug.org/download.php page where I downloaded the version which matched the filename EasyPHP was asking for, PHP 5.3 VC9 TS (32 bit) and put this in an xdebug
directory I created. Now running php.exe go-pear.phar
didn't crash!
Still no explanation for this one. Once I could run go-pear.phar
I still got this error when attempting to change the default paths. The only method that worked for me was the 'all'
option.
No idea if this is the recommended configuration but I found the following seemed to be close to the default on Linux distributions.
1. Installation base ($prefix) : D:\Development\EasyPHP-5.3.9\php\php539x120210180815
2. Temporary directory for processing : D:\Development\EasyPHP-5.3.9\php\php539x120210180815\tmp
3. Temporary directory for downloads : D:\Development\EasyPHP-5.3.9\php\php539x120210180815\tmp
4. Binaries directory : D:\Development\EasyPHP-5.3.9\php\php539x120210180815
5. PHP code directory ($php_dir) : D:\Development\EasyPHP-5.3.9\php\php539x120210180815\PEAR
6. Documentation directory : D:\Development\EasyPHP-5.3.9\php\php539x120210180815\PEAR\docs
7. Data directory : D:\Development\EasyPHP-5.3.9\php\php539x120210180815\PEAR\data
8. User-modifiable configuration files directory : D:\Development\EasyPHP-5.3.9\php\php539x120210180815\PEAR\cfg
9. Public Web Files directory : D:\Development\EasyPHP-5.3.9\www
10. Tests directory : D:\Development\EasyPHP-5.3.9\php\php539x120210180815\PEAR\tests
11. Name of configuration file : D:\Development\EasyPHP-5.3.9\conf_files\pear.ini
12. Path to CLI php.exe : D:\Development\EasyPHP-5.3.9\php\php539x120210180815
I may be a little off here (particularly with the temporary directories) but for the most part everything seemed to match what I saw in Linux PEAR distributions. Make sure you remember that 11. Name of configuration file
is actually a filename and not a path like the rest or you will encounter the below error.
This likely means you have entered a directory path instead of a filename for 11. Name of configuration file
change it to a path followed by pear.ini
and you should be good.