Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7
  1. #1
    ubh
    ubh is offline
    Regular Coder ubh's Avatar
    Join Date
    Apr 2008
    Location
    Portland, Oregon U.S.A.
    Posts
    443
    Thanks
    108
    Thanked 15 Times in 14 Posts

    phpMyAdmin wont work.

    I have been running an Apache HTTP server for months now along with PHP / MySQL and phpMyAdmin. Yesterday I went to try and access MySQL with phpMyAdmin and I get this error.

    Code:
    Cannot load mysql extension. Please check your PHP configuration. - Documentation
    Naturaly I am confused because I have had the same setup for months without ever changing my php.ini file. Never the less I went to try and re-enable mysql exstention in PHP but found it already was. I have since then reinstalled from the ground up Apache 2.2.11 , PHP 5.2.9, MySQL 5.1.3 and phpMyAdmin 3.1.3.

    Web Server is installed correctly and works.
    PHP Installed / tested and mysql exstention or rather extension=php_mssql.dll is enabled.
    MySQL installed and tested on DOS prompt.
    phpMyAdmin installed, but still wont come up and still throws the above error at me when going to http://localhost/phpmyadmin/index.php

    Web server and machine has been rested upon each installation of the above.


    Anyone have a clue what might of went wrong here?

    Thanks.

  • #2
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,987
    Thanks
    4
    Thanked 2,660 Times in 2,629 Posts
    Is the php_mssql.dll a typeo? I assume you mean php_mysql.dll.
    Anyway, have you configured you're phpmyadmin client? You need to alter the config.inc.php to match you're host, authentication methods, connection types, sockets and or ports. If you did a standard apache, php, mysql install, these won't be configured in the phpmyadmin.
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 

  • #3
    ubh
    ubh is offline
    Regular Coder ubh's Avatar
    Join Date
    Apr 2008
    Location
    Portland, Oregon U.S.A.
    Posts
    443
    Thanks
    108
    Thanked 15 Times in 14 Posts
    Um nope thats not a typo, seems my copy of PHP didnt come with a php_mysql.dll.

    C:\PHP\ext\ finds no php_mysql.dll

    I used the PHP installer instead of the zip file on this last install. That's weird, I guess I will download the zip file and place the php_mysql.dll in my ext folder and see what happens.

  • #4
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,987
    Thanks
    4
    Thanked 2,660 Times in 2,629 Posts
    Definitely. The source is a much better option, but the zip will contain more of what you need (the source includes the .so files and .c files). I find the installers are far to limited.
    I must have misinterpreted you're original post, I had thought that you said you've used the mysql in you're pages already, which is why I assumed you meant php_mysql.dll.
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 

  • #5
    ubh
    ubh is offline
    Regular Coder ubh's Avatar
    Join Date
    Apr 2008
    Location
    Portland, Oregon U.S.A.
    Posts
    443
    Thanks
    108
    Thanked 15 Times in 14 Posts
    Ok well, I did some stabbing in the dark and ditched the PHP installer version and just replaced everything that was in C:\PHP\ folder with a fresh download of php in zip format from php.net.

    Once I did that I opened the php.ini file and turned on the extension for php_mysql.dll again along with the php_mcrypt.dll and reset the server.

    Still nothing.

    I then grabbed the php_mcrypt.dll and php_mysql.dll an copied them out of the ext folder and into the root directory of my C:\PHP\ folder.

    Then in my php root folder I grabed php_mysql.dll, php_mcrypt.dll and libmysql.dll an copied them to my C:\WINDOWS\system32\ folder and reset the server.

    Vola!! Works again!

    The last part is a bit confusing to me because I configured my php extensions to be located in the C:\PHP\ext\ folder not C:\PHP\ but oh well.

    The last part of copying files to my system23 folder I found on some back page of Google search and figured I had tried everything else why not.

    I am bookmarking this page from now on in case I run into this again.

  • #6
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,987
    Thanks
    4
    Thanked 2,660 Times in 2,629 Posts
    NP, glad it worked.
    BTW, the reason you need to copy the file is because C:\Windows\System32 is included in you're system path, while C:\PHP\ext is not. You can add this into you're path by command line or gui (I'll give you the gui): Start > right click My Computer > properties > advanced > environment variables > scroll to 'Path' > click edit > and in variable value go to the very end and add '; C:\PHP\ext', making sure you have the semi-colon to terminate the current one.
    Adding you're paths to the system has the advantage of letting you configure you're extensions correctly at run time, with different versions of PHP on you're local host. Otherwise you'd need to copy these resource extensions to a pathed directory every time you make the switch. What a pain.
    Hope that helps too!
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 

  • Users who have thanked Fou-Lu for this post:

    ubh (03-02-2009)

  • #7
    ubh
    ubh is offline
    Regular Coder ubh's Avatar
    Join Date
    Apr 2008
    Location
    Portland, Oregon U.S.A.
    Posts
    443
    Thanks
    108
    Thanked 15 Times in 14 Posts
    Oh crap you are right, like always

    I did forget to add the \ext\ to my environment path.

    Oops.

    Oh well lesson learned.

    Thanks again Fou-Lu.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •