[RESOLVED] Php Run from Command line shows mysql loaded, phpinfo doesn't
Results 1 to 8 of 8

Thread: [RESOLVED] Php Run from Command line shows mysql loaded, phpinfo doesn't

  1. #1
    Junior Member
    Join Date
    Mar 2013
    Posts
    3

    resolved [RESOLVED] Php Run from Command line shows mysql loaded, phpinfo doesn't

    Hi-
    I recently tried to upgrade my PHP version on a Windows machine - which didn't work well, so I am trying to revert to my old setup which worked fine until I messed with it. I'm running PHP 5.2.6, MySQL 5 on Windows IIS6.0

    Status:
    PHP is installed and works
    MySQL is installed and works
    mysql.dlls' are uncommented in php.ini
    My path to php and extension directory is correct in the web version
    My PHPRC is set up, as well as, my path to PHP in environment variables


    My problem is that if I run PHP from from the command line: php -m it shows both mysql dlls loaded as well as mbstring - which is what I want. However, if I run PhpInfo() from inside a webpage it doesn't show mysql or mbstring loaded - any when I tried to use WordPress which used to work, it says mySQL is not loaded in my PHP installation.

    I've searched and searched for an answer to this and can not find anything that works, so now, any thoughts of what else to check would be most welcome.

    Thanks in Advance

    I do have the server set up with .php loading php5isapi.dll

  2. #2
    Settled 4 red convertible dalecosp's Avatar
    Join Date
    Jul 2002
    Location
    Accelerating Windows at 9.81 m/s....
    Posts
    7,707
    Did you restart the web server software after the installation of PHP?
    /!!\ mysql_ is deprecated --- don't use it! Tell your hosting company you will switch if they don't upgrade! /!!!\ ereg() is deprecated --- don't use it!

    dalecosp "God doesn't play dice." --- Einstein "Perl is hardly a paragon of beautiful syntax." --- Weedpacket

    Getting Help at All --- Collected Solutions to Common Problems --- Debugging 101 --- Unanswered Posts --- OMBE: Office Machines, Business Equipment

  3. #3
    Junior Member
    Join Date
    Mar 2013
    Posts
    3
    Hi-
    Yes, the webserver has been restarted and the entire machine rebooted several times.

  4. #4
    Pna lbh ernq guvf¿
    Join Date
    Jul 2004
    Location
    Kansas City area
    Posts
    19,420
    Where is your php.ini file located? In the phpinfo() readout viewed via the webserver, does it show that it loaded that file?

  5. #5
    Junior Member
    Join Date
    Mar 2013
    Posts
    3
    Thanks everyone for your help. It is finally resolved. Here was the solution:
    Apparently, I had the wrong mysql.dll's in the extension directory. I was running mysql 5.0.51b and has those dlls in my extension directory. When I replaced them with mysql 5.0.51a dll's, it worked.

  6. #6
    Settled 4 red convertible dalecosp's Avatar
    Join Date
    Jul 2002
    Location
    Accelerating Windows at 9.81 m/s....
    Posts
    7,707
    Quote Originally Posted by LMatts View Post
    Thanks everyone for your help. It is finally resolved. Here was the solution:
    Apparently, I had the wrong mysql.dll's in the extension directory. I was running mysql 5.0.51b and has those dlls in my extension directory. When I replaced them with mysql 5.0.51a dll's, it worked.
    Glad to hear it. Please consider using the "Thread Tools" dropdown near the top right of the thread to mark this thread as having been "RESOLVED".

    And welcome to PHPBuilder.
    /!!\ mysql_ is deprecated --- don't use it! Tell your hosting company you will switch if they don't upgrade! /!!!\ ereg() is deprecated --- don't use it!

    dalecosp "God doesn't play dice." --- Einstein "Perl is hardly a paragon of beautiful syntax." --- Weedpacket

    Getting Help at All --- Collected Solutions to Common Problems --- Debugging 101 --- Unanswered Posts --- OMBE: Office Machines, Business Equipment

  7. #7
    Pedantic Curmudgeon Weedpacket's Avatar
    Join Date
    Aug 2002
    Location
    General Systems Vehicle "Thrilled To Be Here"
    Posts
    21,876
    Mind you, PHP 5.2.6 and MySQL 5.0.5 doesn't make for a very ambitious "upgrade".... And I'm guessing you're using an old version of Windows, or you wouldn't be using IIS6.
    THERE IS AS YET INSUFFICIENT DATA FOR A MEANINGFUL ANSWER
    FAQs! FAQs! FAQs! Most forums have them!
    Search - Debugging 101 - Collected Solutions - General Guidelines - Getting help at all

  8. #8
    Settled 4 red convertible dalecosp's Avatar
    Join Date
    Jul 2002
    Location
    Accelerating Windows at 9.81 m/s....
    Posts
    7,707
    Quote Originally Posted by Weedpacket View Post
    Mind you, PHP 5.2.6 and MySQL 5.0.5 doesn't make for a very ambitious "upgrade".... And I'm guessing you're using an old version of Windows, or you wouldn't be using IIS6.
    Lol, darn tootin' ... what I wish I could get one of ours to at least MySQL 5.5 ... the improvement in some of the query handling is fairly impressive (if, indeed, somewhat past due).
    /!!\ mysql_ is deprecated --- don't use it! Tell your hosting company you will switch if they don't upgrade! /!!!\ ereg() is deprecated --- don't use it!

    dalecosp "God doesn't play dice." --- Einstein "Perl is hardly a paragon of beautiful syntax." --- Weedpacket

    Getting Help at All --- Collected Solutions to Common Problems --- Debugging 101 --- Unanswered Posts --- OMBE: Office Machines, Business Equipment

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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