Click to find out more about our Work
April 19th, 2009

Tutorial : Installing Apache 2.2.11, PHP 5.3, MySQL 5.1.34 & PhpMyAdmin 3.1.4 in Windows Vista/XP

547 Comments

The most recent version of this tutorial has been completely re-written at WebDev Codex.

Learn how to Install PHP 5.3,

To view the latest version, Goto Screencast #1 : Installing Apache 2.2, PHP 5.3, MySQL 5.1 & PHPMyAdmin 3.2 for Windows 7/Vista

If you want to see the screencast of this tutorial, then goto
Screencast #1 : Installing Apache 2.2, PHP 5.3, MySQL 5.1 & PHPMyAdmin 3.2 for Windows 7/Vista

Not everyone would spend money online to buy webspace just so that they can test out how their latest application works, Well… Welcome to Vision Master Designs Blog. This tutorial will teach you to set up a developer environment for PHP/MySQL in your computer in no time.

Index :

If you are aware of the basics then Click Here to jump below, else read on.

Normally we can view HTML pages on our computer without the need of uploading them to the server, since HTML is a Client Side Language. You don`t need any extra software to view html files, just any browser will do the trick.
But if you want to make your pages dynamic using any Server Side Language (PHP,ASP,JSP) & want to the see the results then you must upload the file to the webserver which supports that language so it can execute the file & return the results on your browser

We can set up a developers environment from which you can create and execute PHP/MySQL scripts by installing the above mentioned applications.

Now, The Pre-Requisites :

  1. Apache HTTP Server (2.2.11): The best open source webserver. You need this to turn your humble computer to a powerful webserver to execute your applications.
    Direct Download apache_2.2.11-win32-x86-no_ssl-r2.msi
    Apache Download Page – Please Download the Win32 Binary without crypto (no mod_ssl) (MSI Installer) – apache_2.2.11-win32-x86-no_ssl.msi~ 4.3MB
  2. PHP (5.2.9) : One of the most powerful web programming languages.
    Direct Download PHP 5.2.9 -2 zip package
    PHP Download Page – Download the PHP 5.2.9 – 2 Zip package ~ 10MB
  3. MySQL (5.1.34) : One of the best DBMS packages which is free.
    The latest version is 5.1.34 which is stable and used in production servers. Although MySQL 5.1 and MySQL 6 are also available as beta releases, they are not used in production servers as of now.
    MySQL Download Page – Please download Windows ZIP/Setup.EXE (x86) 5.1.34 ~ 35.2MB
  4. PhpMyAdmin (3.1.4) : Used to manage your MySQL databases directly using your web browser.
    Direct Download phpMyAdmin-3.1.4-all-languages.zip
    PHPMyAdmin Download Page – Please download the latest release from the 3.x rooster.

The above downloads are compatible with Windows Vista/Vista SP1 (32 bit OS).

Pages : 1 2 3 4 5 6

This website uses IntenseDebate comments, but they are not currently loaded because either your browser doesn't support JavaScript, or they didn't load fast enough.

547 Responses to “Tutorial : Installing Apache 2.2.11, PHP 5.3, MySQL 5.1.34 & PhpMyAdmin 3.1.4 in Windows Vista/XP”

  1. Corky
    August 21, 2009 at 5:58 am

    I ran into a couple of issues when installing this on XP Pro when I already had IIS installed and would like to point out a couple of things so others don’t run into the same problems. (I didn’t read the posts, so forgive me if all of this has already been addressed)

    Apache Port Issue
    - If you run into a conflict on port 80 due to it already being used by IIS, change the httpd.conf file to listen to a different port: Listen 420
    - If you changed the file to listen to a different port, then you need to use that port in your web address: http://myserver.dev:420

    MySQL port issue
    - If you have an anti virus program running with a firewall, make sure you allow TCP access on port 3306 (or whatever port you choose) before installing MySQL

    MySQL error 1045 during installation
    - This one is annoying since there is no password set for the root user to begin with, so it tries to login with a password and fails. To resolve this:

    Open a command prompt type “mysql -u root -p” then hit enter again when it requests a password.

    You should now have access to the mysql monitor…

    type the following at the prompts…

    mysql>use mysql
    mysql>select user, host, password from user;
    # Now you should see that u have 3 entries
    +—————————–+
    | user | host | password |
    +—————————–+
    | root | localhost | |
    | root | 127.0.0.1 | |
    | | localhost | |
    +—————————–+

    mysql> delete from user where host=”localhost” and user=”";
    mysql> update user set password=password(“xxxx”) where user=”root”;
    mysql> flush tables;
    mysql> flush privileges;
    mysql> quit

    Then restart the install of MySQL

    PHPMyAdmin warning:
    - If you get an error saying something like “mcrypt.dll is not enabled”, uncomment this line in the php.ini file: extension=php_mcrypt.dll

  2. Lucson
    August 18, 2009 at 12:06 am

    Dear Michael,

    Back to your August 1st response, I tried everything you suggested but it’s still not working. I turned my Windows and Norton firewalls off but with no success. PHP and Apache are properly installed. Any more ideas?

    Regards,

    Lucson

  3. Bryan
    August 15, 2009 at 7:00 pm

    Also to add onto my last request. The mysql did load the final step just fine. The mysql command line client shows it is running. I don’t know if this helps determine anything….

  4. Bryan
    August 15, 2009 at 9:14 am

    Hi,

    I have almost made it to the end of my journey in this fun set up process, but like most I just can’t figure out where I have gone wrong in this last part. Once I get to:

    8) After it has restarted (green play icon will be displayed), point your favourite web browser to http://www.myserver.dev.

    I tried that and the following appears in my browser

    1.

    Can you please help me?

    Thanks in advance!

  5. Elena
    August 2, 2009 at 4:54 am

    Hello and thank you for brilliant tutorial!!!
    Did everything as you said and it is working!
    The only problem I have is on my phpmyadming panel i’ve got the message”The additional features for working with linked tables have been deactivated.” and “Cannot load mcrypt extension. Please check your PHP configuration.”
    Any ideas how to fix it? Thank you very much in advance for any suggestions!!!!

  6. Lucson
    July 31, 2009 at 7:06 am

    Dear Michael,
    Back to my question on May 7 and your response on may 10.
    Thanks again for your insight. The semicolon was not missing. Now when I launch http://www.myserver.dev, I am able to see that only the Apache+PHP5 installation was completed. MySQL & mysqli heading (as shown on step 9) is not showing. Any hint please. I am really eager to work on this thing now. Any hint would be appreciated.

    Regards,

    Lucson

    • Michael
      August 1, 2009 at 10:38 am

      Hello Lucson,

      Sometimes, mysqli doesn`t show up even though mysql has been successfully installed because PHP may not be able to connect to MySQL. You can check to see whether the firewall is on and blocking mysql from connecting. Sometimes rebooting the system also helps discover mysqli to show up.

      Just confirm whether mysql server is running or not. Goto your command prompt. type in C:\>mysql -u root – p
      it`ll prompt for a password, type in root, you`ll be successfully logged into it. type \s to see the status of the mysql server which shows connectivity, uptime and a host of other parameters.

      Regards

  7. Mike M
    July 14, 2009 at 1:18 am

    I have not read all the comments, so I apologize if I am restating something that has already been said – there is a very easy way to edit httpd.conf in Vista. Click Start Button – Type notepad.exe in the box – hit CTRL + ALT + SHIFT + ENTER (or right-click notepad.exe to run as administrator – this key-cut is the same thing.) Then open httpd.conf using notepad’s file->Open menu. Then you can save and all will be saved.

  8. bryan
    July 11, 2009 at 7:37 am

    the error when signing into phpmyadmin with root is an obvious one after looking for a while..

    you set the pass in the config instance, so use that pass, even if the config.inc says root…root still username though

    should work then, and in the phpmyadmin code to change, take a space away before the < ?php, prob obvious as well, but for new comers.

    • mrahman
      July 11, 2009 at 5:36 pm

      thanks bryan
      Still same error. I tried both with space befor < ?php and without <?php. And I used the user name as root and passeard as root.

      could u tell me little more please. After a while the browser showed the message "Apache HTTP server has stopped working". I’m using Vista ultimate. Even when I try to connect to mysql it shows the same error.
      connect code:
      <?php
      $conn = mysql_connect (’localhost’,’root’,’root’);
      die(’Error connecting to server!’);
      else
      echo "Connected to mysql successfully";

      ?>

      the error description:
      It’s generate a error message “Apache HTTP server has stopped working”.
      Error Details:
      Problem Event Name: APPCRASH
      Application Name: httpd.exe
      Application Version: 2.2.11.0
      Application Timestamp: 493f5d44
      Fault Module Name: php5ts.dll
      Fault Module Version: 5.2.9.9
      Fault Module Timestamp: 49dda255
      Exception Code: c0000005
      Exception Offset: 0000ac7a
      OS Version: 6.0.6000.2.0.0.256.1
      Locale ID: 2057
      Additional Information 1: 7a0a
      Additional Information 2: 0846cb5a80b5731d8e2e88171beb576c
      Additional Information 3: 5c7b
      Additional Information 4: eeaf468d0c282b7b6b46a28a72de6818

  9. mrahman
    July 10, 2009 at 9:19 pm

    Hi Michael,
    thanks michael, u r the boss man.
    Could u help me out please?
    I’ve problem with mySQL connection. apache can handle php file and info.php can show the mySQL and ODBC and PHP ext. But when I try to connect with mySQL database using the following code:

    <?php
    $conn = mysql_connect (‘localhost’,'root’,'root’);
    die(‘Error connecting to server!’);
    else
    echo "Connected to mysql successfully";

    ?>

    It’s generate a error message “Apache HTTP server has stopped working”.
    Error Details:
    Problem Event Name: APPCRASH
    Application Name: httpd.exe
    Application Version: 2.2.11.0
    Application Timestamp: 493f5d44
    Fault Module Name: php5ts.dll
    Fault Module Version: 5.2.9.9
    Fault Module Timestamp: 49dda255
    Exception Code: c0000005
    Exception Offset: 0000ac7a
    OS Version: 6.0.6000.2.0.0.256.1
    Locale ID: 2057
    Additional Information 1: 7a0a
    Additional Information 2: 0846cb5a80b5731d8e2e88171beb576c
    Additional Information 3: 5c7b
    Additional Information 4: eeaf468d0c282b7b6b46a28a72de6818

    Could u help me please.

  10. mrahman
    July 10, 2009 at 9:12 pm

    Hi there!
    Very good tutorial. thanks whoever hosted. I’ve a problem : my apache server can show the php file (info file as well). It can show the mySQL and php but when I try to connect with mySQL its takes long time to process and finally display this message ” apache HTTP server stopped working” here is the problem details below: Please help me out,
    Problem Event Name: APPCRASH
    Application Name: httpd.exe
    Application Version: 2.2.11.0
    Application Timestamp: 493f5d44
    Fault Module Name: php5ts.dll
    Fault Module Version: 5.2.9.9
    Fault Module Timestamp: 49dda255
    Exception Code: c0000005
    Exception Offset: 0000ac7a
    OS Version: 6.0.6000.2.0.0.256.1
    Locale ID: 2057
    Additional Information 1: 7a0a
    Additional Information 2: 0846cb5a80b5731d8e2e88171beb576c
    Additional Information 3: 5c7b
    Additional Information 4: eeaf468d0c282b7b6b46a28a72de6818

  11. mrahman
    July 10, 2009 at 8:40 pm

    Hi,
    I’ve install successfuuly, everything is working but when I try to connect mySQL database is not connecting. browser takes long time and finally windows return a message ” Apache HTTP server stopded woking.”

    Any ONe have any idea?

  12. Daniel
    July 10, 2009 at 9:30 am

    Hey thanx for the tutorial it helped me out alot… now I followed all the steps in the tutorial and my apache web server is working and mysql is working fine, now I have a problem with php, before the tutorial i used to install everything and no php files would open in my web server, now it opens php files but it only shows the code, what can I do, hope you or anyone could help me out.
    I tried the simple script but it shows the samething in the browser.
    Well I hope to hear from you soon.
    Thanx

    • Daniel
      July 16, 2009 at 11:44 pm

      wellI found the problem and I think it’ll help most of you the php script here shows “< ?php" and the < and ? should be together not with a space between.

  13. Pedro
    July 9, 2009 at 9:08 pm

    Important to say that the phpmyadmin password will be your mysql root password.
    If somebody is getting error messages when login, try to see what is your mysql password.

  14. Paul
    July 8, 2009 at 12:34 am

    Hi, thanks for this tutorial. I have never done this before but have followed your tutorial through to the letter. However I can’t seem to get the MySQL bit working. I was getting the forbidden error in my browser quite a bit, but after a bit of tweaking I now just get this:

    ?php//index.php phpinfo(); ?>

    Do you know what the problem is, as I cant seem to figure it out due to lack of experience I think hehe.

  15. riry
    July 6, 2009 at 2:45 pm

    Hi michael, when i try to connect to the http://www.myserver.dev only appear : “”
    i already make sure that the index.php not save as text.
    need your help, thanks before

  16. Brendan
    June 22, 2009 at 7:59 am

    I am on Vista x64 and followed the instructions in this tutorial to a T. I kept getting the Error 1045: Access Denied problem and tried all kinds of solutions.
    Finally I managed to get the instructions here:
    http://www.geekpedia.com/KB105_How-to-reset-your-MySQL-root-password-under-Windows.html
    to work, provided you use mysqld-debug instead of mysqld.

  17. anerudh
    June 20, 2009 at 12:42 am

    Great tutorial !! Still even with my apache running with the php as shown in the tut , when i create php scripts,its not running in my browser..on chrome it says link not found….

    I created a php file called test.php

    and http://localhost/test.php

  18. pratha
    June 18, 2009 at 5:30 pm

    hi,
    i followed everything given in this tutorial…but something went wrong
    when i type http://www.myserver.dev i get the following

    Index of /
    index.php.txt

    when i click “index.php.txt” the php program is displayed…..
    i am new to php
    plz help me…
    waiting for your reply…………

    • ayu9176
      June 18, 2009 at 7:11 pm

      I face the same problem as u then found out this comment from Michael on page 7..

      Please rename the file index.php.txt to index.php

      See what u got then..for me..I got another problem..
      The code in index.php was displayed in browser when i type http://www.myserver.dev.
      Don’t know..maybe something wrong with my code.
      Someone..please help!!!

      • pratha
        June 19, 2009 at 12:00 pm

        hi ayu9176,
        thanks got it..
        did you rename it as “index.php”(within double quotes) as said by j123 in page 7…

        • ayu9176
          June 20, 2009 at 11:21 am

          yes..i rename it with double quotes but the browser display code in index.php
          :(

  19. Yves
    June 8, 2009 at 6:08 pm

    Thank you for this tutorial !
    I got an Apache crash with PHP 5.2.9 – 2 when executing phpMyAdmin or Wordpress on my dev computer running Win XP SP2…
    The solution for me was to install PHP 5.3 (5.3.0RC3-dev)…
    If it can help comebody ;-)

  20. Bob K
    June 7, 2009 at 1:27 am

    Micheal, you had responded to another Bob on May 31 that had the exact same symptom as mine. In his case, you found an extra http in the httdpd.conf file(AddType application/x-httpd-php .php .html). I’ve scoured mine and have no http on that line. He did not respond back as to whether the httpd.conf file you sent him fixed the problem or not. But since I have the same symtpoms, would it be possible for you to send me that corrected httpd.conf file for me to try? Since I used your file structure and paths, it should just drop in place.

    Thanks,
    Bob

    • Michael
      June 7, 2009 at 10:13 am

      Hey Bob,

      Please give me your email address, I`ll send you the modified httpd.conf file.
      If you are having lot of errors and problems, I would suggest you to follow the tutorial exactly i.e follow the same file structure and paths. Once you get the hang of how it is done, you can reinstall it later with your own file structure and paths.

    • James E.
      June 7, 2009 at 10:14 am

      Thank you for this – it finally enabled me to get through this after a week – I did follow this link to make it work, though:

      http://forums.mysql.com/read.php?11,39440,62685#msg-62685

      I kept getting the access denied error – by using the MySQL admin program I was able to get around this. I’m new, so maybe this wasn’t the best, but it worked. (so far)

  21. Kurt
    June 4, 2009 at 3:19 pm

    Hi,

    Very good tutorial. I just have a problem with the username and password in myphpadmin. When I enter root/root in the login there is no reaction….any ideers???

    • Michael
      June 5, 2009 at 9:22 pm

      Hey,
      It tends to happen sometimes, jus try checking the config file inside the phpmyadmin directory to see what is the username and password. Just reboot your computer and then try.

  22. Bob
    May 30, 2009 at 11:02 pm

    Bob
    May 29, 2009 at 6:24 am

    Michael,
    Any luck with my httpd? I’m still looking for any suggestions.

    Thanks

    • Michael
      May 31, 2009 at 12:30 am

      Hello Bob,

      I am so sorry for not replying earlier, my exams just got over so from now on I can devot all my time here :)

      Anyways, I saw your httpd.conf file. I think your problem may be because you added a extra .html in AddType line.

      1)Please search for this line
      AddType application/x-httpd-php .php .html
      AddType application/x-httpd-php-source .phps

      and replace with
      AddType application/x-httpd-php .php
      AddType application/x-httpd-php-source .phps

      2) Also Please remove
      DefaultType text/plain
      AddType application/x-gzip .tgz
      AddType application/x-httpd-php .php .html
      AddType application/x-httpd-php-source .phps

      above <ifmodule mime_module></ifmodule>.

      I have also sent you the modified file via email.

      Lemme know :)

      • Bob K.
        May 31, 2009 at 12:40 am

        Hi Michael, I saw your reply to the other Bob and went back to look at mine. I did have a line as follows:

        AddType application/x-httpd-php .php .php5

        and so took off the .php5 but it didn’t make a difference.

        Should we be removing the lines:
        DefaultType text/plain
        AddType application/x-gzip .tgz
        AddType application/x-httpd-php .php .html
        AddType application/x-httpd-php-source .phps

        All four of them? I did comment out the DefaultType and .tgz lines. Made no difference. I just see the php line echoed back to me.

        • Michael
          May 31, 2009 at 12:43 am

          Yes, that is not supposed to be there.
          This error is due to this line AddType application/x-httpd-php .php .html.

          I would suggest to strongly follow the tutorial. Also please remove all the 4 lines and add the lines as mentioned. :)

          • Bob K
            June 2, 2009 at 9:48 am

            Hi Michael,
            I did a clean ground-up install following your instructions. I got the same result as before. I looked for the line
            AddType application/x-httpd-php .php .html
            and it doesn’t exist.
            I do have
            AddType application/x-httpd-php .php
            and even tried
            AddType application/x-httpd-php .php .php5

            I also tried installing WAMP so I could compare their .conf files but haven’t actually done the compare yet.

          • Bob K
            June 5, 2009 at 2:43 am

            Hi Michael, I’m at my wit’s end! I’ve reinstalled three times now. The last time, I went back and redownloaded the distribution files. I’ve gone through this with a fine-tooth comb and every time, the result is the same. Outwardly it looks like Apache and PHP installed right but whenever I go to localhost (or http://www.myserver.dev or myserver.dev), I get the PHP code echoed back.

            I’m running a Windows7 64 bit machine but with all 32 bit apps for web development. IIS is turned off and so is UAC. I’ve even set all executables to run as administrator and turned on compatibility mode. One of those three reinstalls was even using another similar tutorial which essentially took me through the same steps as yours.

            If it is a typo, I find it hard to believe that I made the same typo each and every time. But being as I’ve pored over the files, I don’t think there’s a typo.

            When I did a WAMP install, the results were the same and there were no material differences between config files.

  23. sHyuAn
    May 29, 2009 at 3:20 pm

    ignore the previous comment from me.. as i already get through it.. it was my mistakes :) however, i am having problems with mysql.. why am i having “current root password”? before this, i installed xampp mysql.. and i think the password is still not cleared.. what should i do to clean up the password? or it is not important and can just let it be?

    anyway, i typed the current password and new root password to continue the steps.. i reached the last step of mysql where i will need to let it configure 4 things.. my problem arise where there’s the error “Could not start the service MySQL5.Error 0″ what should I do?

    Note: i put the name as MySQL5 because the setup said “MySQL” has been used..

    kindly help on my issues..
    thanks a lot..

    • Michael
      May 31, 2009 at 12:36 am

      Hello,

      I would suggest you to completely remove mysql. Also note that the data folder has been removed after uninstallation. (very important)

      While installing again, please install mysql in another directory.

      follow the steps and it should work fine :)

      • sHyuAn
        May 31, 2009 at 1:20 am

        now my port and name are working.. i do not need to choose other name like mysql5 already.. but i still have current root password to be typed in.. am i missing something? and also couldnt start the service during executing the configuration.. should i try to install the previous xampp services and stop them all?

        • Michael
          May 31, 2009 at 1:33 am

          If you had a previously installed mysql, make sure to delete the data folder inside the installation folder !

          mysql tends to retain all the data and only delete the program files.

          Also if you have followed this tutorial to install mysql, then the password will be root.

          I would suggest to restart your computer once and then uninstall mysql. Then reinstall it in another folder or drive.

          If you are not able to start the execution, then either mysql service is already there or there is some other problem.

          Also please check whether mysql service is on by
          Start->Run – Type “cmd”
          then in the prompt type
          mysql -u root -p (press enter)
          if mysql service is on, then it`ll ask for a password else bad file name error

          • sHyuAn
            May 31, 2009 at 2:00 am

            in the cmd i typed as what u mentioned.. however, it says “mysql” is not recognized as an external or internal command..its invalid command..

        • Michael
          May 31, 2009 at 5:03 pm

          Hey,
          that means mysql doesn`t exist in your system or the service is not on.

          While configuring via the Instance Manager do make it a point to check
          1. “Include Bin Directory in Windows path”
          2. “Install as Windows Service”
          3. “Launch MySQL Server automatically”

  24. Bob
    May 29, 2009 at 10:46 am

    Hi Michael,

    Excellent tutorial. I’m somewhat new to this and am installing on a Windows7 RC system. I’ve installed Apache and PHP according to your directions. Problem is that when I point to http://localhost (or http://www.myserver.dev) it only types out the php command but doesn’t display the PHP information screen. It’s as if PHP isn’t running and it doesn’t know what to do with the command. In my Apache service monitor I see Apache/2.2.11 (Win32) PHP/5.2.9-2 so it appears that it is running. I’ve gone over all your config changes in my files with a fine tooth comb but cannot find anything amiss. Could there be a win7 compatibility issue with PHP5?

    • Michael
      May 31, 2009 at 12:40 am

      Hello,

      I have php installed in my win 7 system. There are no compatibility issues as of such. Its normal.
      Please check httpd.conf file. Search for the statement
      AddType application/x-httpd-php .php if not then search for AddType application/x-httpd-php .php .html. If the latter exists, please remove the .html part from it. (just like the first statement given here)

      Lemme know

  25. sHyuAn
    May 29, 2009 at 1:44 am

    As earlier I had tried to install apache and php using another tutorial. however, it failed to load the php with a message something like “failed to LoadModule php5_module “C:/myserver/php/php5apache2.dll”". i go back the php.ini in notepad, i thought i could modify the loadmodule thingy.. however, the php.ini seems be changed already.. i dunno what to do, and i uninstall both apache and php.. i reinstall them when i found your tutorial.. unfortunately, the php.ini is still the same as the previous one, which it is not a brand new php.ini-recommend anymore.. what should i do now? how to get back the original php.ini-recommend? should i run go regedit or run any command? please help..thanks..

  26. Jocelito
    May 26, 2009 at 7:53 pm

    Parabens Michael. estive com problemas de configuracao e nao conseguia coneccar e nem executar minhas paginas PHP por varios dias, e com esse seu tutorial eu consegui com muita facilidade pois esta muito bem explicado..

    parabens. e obrigado pela ajuda..

    thanks .. jocelito

  27. nirav
    May 25, 2009 at 10:28 pm

    i want to configure asp php mysql apache.. all that i can use same time.. plz reply me as fast as possible. thanks.

  28. Paddu
    May 21, 2009 at 5:30 pm

    Hi, Michael,

    I got a similar error message:
    #1045 – Access denied for user ‘root’@’localhost’ (using password: YES)

    I had already turned off Windows Firewall and AVG Anti-Virus as well.

    Would appreciate help as all has worked fine up til this!

    Thanks!

    • Michael
      May 22, 2009 at 10:24 am

      Hello Paddu,

      Where exactly do you get this error message ?? While trying to run phpmyadmin ??
      I suggest you to perform the MySQLInstance Configuration step once again (Start->Programs->MySQL) . Please note the username|password should be root|root

    • Corky
      August 21, 2009 at 6:01 am

      If you haven’t solved this yet, you need to do the following:

      Open a command prompt type “mysql -u root -p” then hit enter again when it requests a password.

      You should now have access to the mysql monitor…

      type the following at the prompts…

      mysql>use mysql
      mysql>select user, host, password from user;
      # Now you should see that u have 3 entries
      +—————————–+
      | user | host | password |
      +—————————–+
      | root | localhost | |
      | root | 127.0.0.1 | |
      | | localhost | |
      +—————————–+

      mysql> delete from user where host=”localhost” and user=”";
      mysql> update user set password=password(“xxxx”) where user=”root”;
      mysql> flush tables;
      mysql> flush privileges;
      mysql> quit

      Then restart the install of MySQL

  29. Bob
    May 19, 2009 at 11:43 pm

    Michael,
    I am very very new to this. I thought I had done everything exactly as you have listed in the tutorial. When I use either FireFox or IE to display the URL:
    http://myserver.dev/

    both browsers just display the source code:
    < ?php phpinfo(); ?>

    Have I missed something saying to interpret the .php as a script? I’ve confirmed I have the following lines in my conf/httpd:

    # If the AddEncoding directives above are commented-out, then you
    # probably should define those extensions to indicate media types:
    #
    AddType application/x-compress .Z
    AddType application/x-gzip .gz .tgz
    AddType application/x-httpd-php .php
    AddType application/x-httpd-php-source .phps

    • Michael
      May 21, 2009 at 12:01 am

      Hey Bob,
      Thats kinda odd,
      Create an html file inside public_html called test.html, then try accessing it by http://www.myserver.dev/test.html

      Lemme know whether you can view the page or not ?

      Also Please make sure php is configured with Apache (you can check that by viewing the Apache Moniter (or the icon on the taskbar)). If php is installed it should show Apache/2.2.11 (Win32) PHP 5.2.9

      Regards

      • Bob
        May 22, 2009 at 2:05 am

        Michael,
        I ran the html test and it output the html as expected in the browser. I also verified in the Apache Monitor that Apache 2.2.11 and PHP 5.2.9 were in harmony (lower left corner).

        On a whim, I moved the following lines outside if the tags, restarted the server, with no luck.

        AddType application/x-gzip .tgz
        AddType application/x-httpd-php .php
        AddType application/x-httpd-php-source .phps

        I was thinking about adding the html type into the php AddType as follows:
        AddType application/x-httpd-php .php .html

        Then I could retry the test.html… if it still displays the HTML correctly, I could insert the PHP code from index.php into the test.html file to see if it works. thoughts??

        If you want, I can send you my conf file for your review too.

        • Michael
          May 22, 2009 at 10:29 am

          Hey Bob,

          I suggest you send me the conf file for review at rowoot@gmail.com.

          I`ll check it out and let you know.

        • Bob
          May 29, 2009 at 6:24 am

          Michael,
          Any luck with my httpd? I’m still looking for any suggestions.

          Thanks

          • Razzi
            July 19, 2009 at 4:52 pm

            Michael,

            Great tute! However im having the same issue Bob has, the myserver.dev is showing the source code . i did a test.html in the public_html folder & it works. Any ideas?

          • Avi
            August 18, 2009 at 2:48 pm

            Try to replace the content of index.php with this:

            <?php
            phpinfo();
            ?>

  30. frank the dog
    May 16, 2009 at 11:56 am

    very good tute, all worked first off no problems. thanks very much.
    ftd

  31. Lucson
    May 7, 2009 at 8:13 pm

    Hi Michael.
    Once again thanks for such a great turorial. Now I am receiving an error message on the last step (8) of MySQL installation. When I launch http://myserver.dev on my browser, I receive this error message:”Parse error: parse error in C:\server\www\myserver.dev\public_html\index.php on line 7″. Would you please help on this?

    Lucson

    • Michael
      May 10, 2009 at 12:01 am

      Hey,
      I assume you forgot a semicolon at the end of the code.

      < ?php
      phpinfo();
      ?>
      
      • Lucson
        July 31, 2009 at 7:04 am

        Dear Michael,

        Thanks again for your insight. The semicolon was not missing. Now when I launch http://www.myserver.dev, I am able to see that only the Apache+PHP5 installation was completed. MySQL & mysqli heading (as shown on step 9) is not showing. Any hint please. I am really eager to work on this thing now. Any hint would be appreciated.

        Regards,

        Lucson

  32. sarah
    May 2, 2009 at 3:12 pm

    Just wanted to say thank you so much for your tutorial. It was very good of you to take the time to do this. I couldn’t have got all this running without your tutorial. Thanks :)

    • Michael
      May 3, 2009 at 12:53 pm

      You are welcome Sarah. I am really glad the tutorial helped you out :) Do keep visiting :)

  33. Sean
    April 27, 2009 at 3:24 am

    Great tutorial. Thank you for taking the time to publish this. I love to develop and tutorials like this allow me to do that without having to spend too much time setting up for it.

  34. Marguerite
    April 25, 2009 at 4:44 am

    I installed Apache, PHP and MySQl as directed; the Apache/PHP services are up and running, no problem. However when I browse for http://www.myserver.dev, I get Error Message 403, that Windows Explorer is connected to the website but has no permission to view the webpage-likely need to log in somewhere? I have added Apache and MySQL to list of allowed programs in Windows Firewall; also added ports # 3306 and 80. Also have deselected and selected the User Administration Control setting, makes no difference. I use AVG virus control and there is no area provided to add allowed programs, only dis-allow programs. I am using a Vista 64-bit operating system. Any suggestions?

  35. Shingo
    April 23, 2009 at 6:20 am

    Hi Michael..turn off the alarms. Thanks for a great tutorial, I’ve even enjoyed the debugging.

    I finally got phpMyAdmin to load but hit a security error: #1045 access denied. So, in the end, the user name is ‘root’ but the password is the one I had specified during the MySQL configuration. I’m in and completed the tutorial.

  36. Shingo
    April 22, 2009 at 10:12 pm

    Shingo :

    Hi Michael, Followed tutorial with minor hurdles but at last step, after navigating to http://www.myserver.dev/pma/index.php, I get the following error message:

    phpMyAdmin – ErrorCannot load mysql extension. Please check your PHP configuration. – Documentation.

    Any thoughts on this or directions to answer if already previously asked.

    Additional comments: The back slahes are missing from all the paths you stated in the tutotial, for some reason, at least in my browser. So the first time I configured ‘Path’ in ‘environmental variables’, I copied and pasted. I detected it and went back to change it and reboot. Still I am getting this error “..cannot load mySQL extension…”

  37. Shingo
    April 22, 2009 at 11:17 am

    Hi Michael, Followed tutorial with minor hurdles but at last step, after navigating to http://www.myserver.dev/pma/index.php, I get the following error message:

    phpMyAdmin – Error
    Cannot load mysql extension. Please check your PHP configuration. – Documentation.

    Any thoughts on this or directions to answer if already previously asked.

  38. Michael
    April 16, 2009 at 9:44 pm

    @kurt vestergaard
    I think you haven`t specified the path to php.ini properly inside Control Panel -> System -> Advanced -> Environment Settings

    Please check the path once again to make sure it is pointing to the php directory which it is currently not.

  39. kurt vestergaard
    April 15, 2009 at 1:01 am

    Hi, very nice tutorial……

    Why do I get the following output when running phpinfo():

    Configuration File (php.ini) Path: C:\WINDOWS
    Loaded Configuration File: (none)

    Can’t find out why the php.ini file is not loaded???
    Pleace help…..

  40. alexandre beaudry
    April 10, 2009 at 10:31 am

    for YOU folks with an error #1045 when installing MySQL. Follow wht ather said on his post. (#230)

    Only a password problem. do not reinstall everything for nothing.

  41. [tokenizer]
    April 10, 2009 at 9:17 am

    @Julia

    Error message:
    —————————————————————-
    Connection Error:
    The Security Settings could not be applied to the database because the connection has failed with the following error.
    Error Nr. 1045
    Access denied for user ‘root@localhost’ (using password: YES)
    —————————————————————-

    Usually this error message means that you entered the wrong password to your root account. That is why you are not able to access the mysql server.

  42. Julia
    April 7, 2009 at 1:43 pm

    HI Michael,

    I have proceed all the way untill finish installation.

    However, I encounter this error message towards the end of Installing and Configuring MySQL5(Step 4).

    Error message:
    —————————————————————-
    Connection Error:
    The Security Settings could not be applied to the database because the connection has failed with the following error.
    Error Nr. 1045
    Access denied for user ‘root@localhost’ (using password: YES)
    —————————————————————-

    I Click ‘CANCEL” and ignore it.

    To my surprise, when i type in “http://www.myserver.dev” in web browser;
    I saw exactly wut it is shown in your sample screen shot in tutorial matching to my own web server result.
    I thought it has succeed.

    Then , i proceed to last step (Step 5 : Installing and Configuring PhpMyAdmin3).
    After following instructions and point my web browser to ” http://www.myserver.dev/pma/index.php“;

    I saw the welcome Log In screen:

    With 2 error message box :

    Error message box 1:
    —————————————————————–
    #1045 – Access denied for user ‘root’@'localhost’ (using password: YES)
    —————————————————————–

    Error message box 2:
    —————————————————————–
    Cannot load mcrypt extension. Please check your PHP configuration.
    —————————————————————–

    Between the 2 error message box; I saw
    “Language selection drop down box -English”,

    Log In
    Username field: “a box for me to enter my username”
    Password field : ” a box for me to enter the password”

    Is there any configuration i missed?

    I have disabled WIndow fire wall, and even uninstall my AVG anti virus.

    Please help..

    Thanks a lot.

    Regards,
    Julia

  43. loz
    April 7, 2009 at 1:19 am

    @ micheal

    did you get to look at my error log and find the problem with the error that comes up just as i log onto mysqladmin ?

  44. Julia
    April 6, 2009 at 5:29 pm

    Hi Tokenizer,

    Thanks a lot for your suggestion.

    I have move forward and is now “stuck” at MySQL (step 4).

    While I click “Execute”, before completion, the error as below is returned, thus not able to complete the installation of MySQL successfully.

    Connection Error:
    The Security Settings could not be applied to the database because the connection has failed with the following error.
    Error Nr. 1045
    Access denied for user ‘root@localhost’ (using password: YES)

    If a personal firewall is running on ur machine, pls makesure u have opened the TCP port 3306 for connections. Otherwise no client application can connect to the server. After you have opened the port please press [Retry] to apply the security settings.

    If you are reinstalling after you just uninstalled the MySQL server please note that the data directory was not removed automatically. Therefore old password from your last installation is still needed to connect to the server. In this case please select skip now and re-run the configuration Wizard from the start menu. ”

    I selected “SKIP”, but what other configuration shall i change to screen shot number10th (under procedure step 5. Now just follow the following image….)

    Thanks a lot.

    Best Regards,
    Julia

  45. [tokenizer]
    April 6, 2009 at 9:33 am

    @Julia
    Julia,

    The problem is due to conflicting port. There is already a service using port 80 where Apache is trying to listen to. You need to remove this service that is listening with port 80 for you to be able to allow Apache service to listen to it.

  46. Julia
    April 6, 2009 at 8:55 am

    HI Michael,

    I am a newbie to Apache,PHP,MySQL.

    I have follow the first step, but never see “It Works” after installing Apache.

    However, i saw this message(in DOS screen) just after Apache installation:”
    Installing the Apache2.2 service
    The Apache2.2 service is successfully installed.
    Testing httpd.conf….
    Errors reported here must be corrected before the service can be started.
    Only one usage of each socket address (protocol/network/address/port) is normally permitted. : make_sock: could not bind to address 0.0.0.0:80
    no listening sockets available, shutting down
    Unable to open logs
    Note the errors or message above, and press the key to exit. ”

    May i know what files or configuration went wrong?

    Thanks for ur kind advice in advance.

  47. Lucson
    April 4, 2009 at 2:14 am

    Dear Michael, Thanks for this great tutorial. On January 30, 2009, I posted the following comments. Would you please provide some hints?

    “This is a great tutorial indeed. After days of trying, I finally have everything set up. My only problem is that mysql & mysqli is not showing up as in step 4 , bullet 10. Would you please help. Would it be with my firewall setting? I tried to turn Norton off with no luck.”

    Lucson

    • Michael
      April 5, 2009 at 6:39 pm

      Hey Lucson,

      I am extremely sorry for not replying then.

      But as I can see, If still mysql and mysqli are not shown in the index page, then please perform a clean re-install.

      Please not after modifiying the php.ini, u need to restart apache server or reboot your computer. After modifying php.ini, Also please see whether you have given the proper extensions dir (also take note of slash “/”)

      If you are stil not able to get through, please contact me via email
      Regards
      michael

  48. ARUN
    April 3, 2009 at 4:53 am

    Hey dude!
    yes, i did it.
    Thanks

  49. ARUN
    April 3, 2009 at 4:38 am

    Hi there!
    I have finished all the steps, and I got Login screen also, but I could not Login to the page, because you din’t tell how to configure the user name. when I configured mySQL I din’t get any option for user name. please help me ro solve this problem.
    Thanks

  50. loz
    April 2, 2009 at 10:46 pm

    this just from last night the log is too big to be posted

    [Thu Apr 02 17:57:49 2009] [warn] pid file C:/Program Files/Apache Software Foundation/Apache2.2/logs/httpd.pid overwritten — Unclean shutdown of previous Apache run?
    [Thu Apr 02 17:57:49 2009] [notice] Apache/2.2.11 (Win32) PHP/5.2.8 configured — resuming normal operations
    [Thu Apr 02 17:57:49 2009] [notice] Server built: Dec 10 2008 00:10:06
    [Thu Apr 02 17:57:49 2009] [notice] Parent: Created child process 1252
    Warning: DocumentRoot [C:/Program Files/Apache Software Foundation/Apache2.2/docs/dummy-host2.myserver.dev] does not exist
    httpd.exe: Could not reliably determine the server’s fully qualified domain name, using 192.168.1.200 for ServerName
    Warning: DocumentRoot [C:/Program Files/Apache Software Foundation/Apache2.2/docs/dummy-host2.myserver.dev] does not exist
    httpd.exe: Could not reliably determine the server’s fully qualified domain name, using 192.168.1.200 for ServerName
    [Thu Apr 02 17:57:49 2009] [notice] Child 1252: Child process is running
    [Thu Apr 02 17:57:50 2009] [notice] Child 1252: Acquired the start mutex.
    [Thu Apr 02 17:57:50 2009] [notice] Child 1252: Starting 64 worker threads.
    [Thu Apr 02 17:57:50 2009] [notice] Child 1252: Starting thread to listen on port 80.

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code lang=""> <del datetime=""> <em> <i> <p> <q cite=""> <strike> <strong>