Troubleshooting PEAR on EasyPHP (WAMP)

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:

  1. Download go-pear.phar
  2. Run the command php.exe go-pear.phar
  3. Follow the steps and be done with it

However they turned out to be a little more complicated. Here are some of the issues:

Path variable is non existant

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:

  1. Click Start
  2. Right click Computer
  3. Click Properties
  4. Click on Advanced system settings in the sidebar
  5. Click Environmental Variables...
  6. Add the path to EasyPHP to the Path variable both as a User variable and as a System variable

Unfortunately I had no luck! My solution turned out to be replace the references to ${path} with the actual path to my EasyPHP installation.

Missing xdebug

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!

Input Error: Can not find script file "C:\Users\Kevin\AppData\Local\Temp\tmp7A26.tmp\bf.vbs"

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.

Choosing the correct paths

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.

Fatal error: Call to undefined method PEAR_Error::set()

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.

Tags:

Comments

The education essay writing task is bit difficult to complete from the students side. Even the evaluation is very different in the academics. The essay writing evaluation on academy must be well organized, and student’s thoughts must circulation rationally from one point to the next. So students should be mentioned properly according to their self-discipline in writing. So these things should be followed by the service writers. Present language and opinions on the subject in an impartial and extensive way. Writing a self essay requires the huge amount of knowledge and skill sets. The uk writing company will always keep good format and high-quality essay for the students.