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:

  1. 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.
  2. 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.
  3. 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.
  4. 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\”.
  5. 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.


12 comments so far

  1. Michael on

    I have never actually used easyphp but i can’t imagine that it would be better then xampp. There is worl of knowledge out there on xampp. I would consider taking a look at it.

  2. Siva on

    Good job there! by you!!

  3. Siva on

    Good job there! by you!!
    step 4. Unable to find php.ini in c:\windows
    however there is pear.ini in c:\windows which does not have to be changed as the paths seem to be correct.

  4. Vinayak Shankar on

    I found your article extremly useful. Thank you so much! It was very simple and I am sure all the new bees to EasyPHP would find it very useful.

  5. Mryozo on

    Thank you all!!!
    I was stuck with pear installation using EasyPHP because of wrong archive go-pear.phar. Replacing file was exactly the solve. I’ve found php.ini into dir instead in Windows dir.

  6. Verbally on

    Somehow i missed the point. Probably lost in translation 🙂 Anyway … nice blog to visit.

    cheers, Verbally.

  7. jeff on

    thanks for the post..it helped getting the DB module working..i can’t seem to switch to MDB2 however. I have windows xp…easyPHP 2.0b1, when I type ‘pear install MDB2’ i get a message that the install is ignored as I alread have it, yet when I type ‘pear install MDB2_Driver_mysql’ or mysqli, I get a message that I need the php extension for either mysql or mysqli…cqn’t seem to get past thi point..any helpful hints?

  8. Nicolas on

    That’s all, folks !
    What for a good surprise, to finally find a soution to my problem : trying to install eGroupware as a test setup on my laptop and no way to have PEAR working. Great job, and so helpful ! I think you should give a word to easyphp team, in order for them to correct their package with your .phar file… Thanks a lot again

  9. […] PEAR, alors qu’il faut le faire Ă  la main avec EasyPHP, et en consultant la page de Mike Reynolds qui donne les indications nĂ©cessaires pour contourner un bug dans l’installation de […]

  10. […] extensions PEAR, alors qu’il faut le faire Ă  la main avec EasyPHP, et en consultant la page de Mike Reynolds qui donne les indications nĂ©cessaires pour contourner un bug dans l’installation de […]

  11. BBK on

    Was stuck and going in loops during PEAR installation, your article came to the rescue. Kudos to you.

  12. Momekh on

    Had to just tell you … that is exactly the problem I had and your tutorial solved…

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: