EasyPHP + PEAR on Windows: Get PHP, MySQL, PHPMyAdmin and my tweak for getting PEAR to work
I’m not a system admin by any means, but I see clear value in getting PHP running on my laptop. Of course, getting MySQL and PHPMyAdmin working would help. Plus, while I don’t know much about these yet, I think it would be wise to have the MDB2 and PEAR classes installed. Please don’t ask me what these mean
This refers to EasyPHP 2.0b1 (which is current as of this writing), but hopefully applies to other versions too. Better yet, maybe the kind EasyPHP people will update EasyPHP as such. Of course, I make no guarantee that this will work for you.
Here’s how to do it:
- Install EasyPHP - it bundles PHP, MySQL and PHPMyAdmin. To install it, download it here. (For more info, visit EasyPHP.org.) Download and click on the *.exe file to install.
- EasyPHP comes packaged with a version of PEAR that doesn’t work. To fix it, right click here on go-pear.phar and save it to “C:\Program Files\EasyPHP 2.0b1\php5\PEAR” - overwriting the version that is already there.
- Now setup PEAR. Start up what I call the DOS prompt (not sure if this is still the name). Go to Start > Run and type in CMD. Then using DOS commands navigate over to “C:\Program Files\EasyPHP 2.0b1\php5″. Then type in “go-pear” to run the batch file go-pear.bat. No need to type in anything here, so just hit ENTER whenever you’re asked to do something.
- You’ll get an error message at the end saying something about php.ini. This is because EasyPHP hasn’t told PHP where to find PHP. So head on over to “C:\Windows\” and edit “php.ini” in your favorite text browser (I use EditPlus). Change line 509 (or thereabouts) from “.;C:\php5\pear” to “C:\Program Files\EasyPHP 2.0b1\php5\pear\”.
- Congrats, you’ve now installed PEAR! But it doesn’t stop there. There are tons of PEAR add-ons. I recommend PEAR’s latest MySQL helper package called MDB2 (replaces DB). Installing is weird — it’s a DOS prompt thing. Go to “C:\Program Files\EasyPHP 2.0b1\php5\” and type in “pear install MDB2″.
If you don’t want PEAR, all you have to do is install EasyPHP. But if you want to do anything serious, people smarter than me would recommend PEAR.
Comments(5)