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 8 of 8
  1. #1
    New to the CF scene
    Join Date
    Feb 2010
    Posts
    9
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Getting Mysql Extension to load in PHP

    [note to moderator: the other answers similar to this on this forum do not solve my problem]

    Although I have checked everything I can think of, the mysql extebsion in PHP will not intitlaise. Can you help?

    When I run phpinfo() "mysql" is not mentioned at all; consequently PHPMyAdmin won't start (Error message: phpMyAdmin - Error
    Cannot load mysql extension. Please check your PHP configuration.)

    What I am using:
    PHP version: 5.2.12
    MySQL version: 5.1.44
    Windows 7
    IIS7.5



    In Php.ini
    I have uncommented:
    extension=php_mysql.dll
    extension=php_mysqli.dll
    (The DLLs exist in /ext)
    I have confirmed from phpinfo()that loaded configuration file is correct


    The paths in php.ini are correct:
    C:\PHP
    C:\PHP\ext
    They are both in the Windows PATH statement

    What have I missed?

    TIA

    B

  • #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
    Has the C:/PHP/ext been included in you're system environment path as well?
    Also, whenever you make changes you should restart you're service (in this case IIS).
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 

  • #3
    New to the CF scene
    Join Date
    Feb 2010
    Posts
    9
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Yes, Fou-lu
    Quote Originally Posted by teaorcoffee View Post

    The paths in php.ini are correct:
    C:\PHP
    C:\PHP\ext
    They are both in the Windows PATH statement
    I have rebooted the machine several times also. That should handle the IIS restart :-)

  • #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
    Quote Originally Posted by teaorcoffee View Post
    Yes, Fou-lu


    I have rebooted the machine several times also. That should handle the IIS restart :-)
    Sorry, missed that you had added them to the system path.
    Yes it should restart the IIS, so no worries there. I'll take a look over at the api to see if there is anything specific to IIS, but in the meantime you should check you're event logs to see if IIS is triggering an error when attempting to load the dll. I had trouble with this way back myself, not because of the system path itself, rather the system path order found an older version of the dll than the version I was trying to use (which PHP did not like. One bit.).

    Edit:
    Oh, you know what it is I was thinking of? Not the mysql.dll, but the libmysql.dll. Do you have that one located in a system path?
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 

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

    teaorcoffee (02-19-2010)

  • #5
    New to the CF scene
    Join Date
    Feb 2010
    Posts
    9
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Well, it fixed itself. (?)

    I don't understand how, as a number of computer reboots had not fixed this...

    But this is what I did:
    1. I restarted the mysql service
    2. Checked phpinfo() (in IE8) but no change.
    3. Thought I'd check in FF3.6 and phpinfo() reported mysql was active and PHPmyAdmin worked!
    4. Checked AGAIN in IE8 and this time it worked...

    There's no reason why the error presented itself in the first place and IMHO there's no sense in the how it got cured; but I post the result anyway in the hope it may help someone and thank those who have tried to help me.

    B

  • #6
    New to the CF scene
    Join Date
    Feb 2010
    Posts
    9
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Fou-Lu View Post
    Edit:
    Oh, you know what it is I was thinking of? Not the mysql.dll, but the libmysql.dll. Do you have that one located in a system path?
    Yes it's there. But see my other post. It's fixed, but the fix was as enigmatic as the problem! :-)

  • #7
    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
    Great, that is an oddity.
    I can see the phpinfo() itself showing incorrect data if it were cached or anything like that (easiest way is to just make up a query string: phpinfo.php?t=4464kjfasdklj to get an update), but with an attachment to phpmyadmin, I'm not sure why it was struggling.
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 

  • #8
    New to the CF scene
    Join Date
    Feb 2010
    Posts
    9
    Thanks
    1
    Thanked 0 Times in 0 Posts
    I thought about the cache also. I used my way of dealing with it a lot! (ctrl-F5) :-)

    ISTM that with every upgrade of OS/PHP etc. things like this get increasingly difficult! I wonder when there'll be a simple all-in-one installer for IIS/PHP/MySQL along the lines of xampp??? :-)


  •  

    Posting Permissions

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