SitePoint Sponsor

User Tag List

Results 1 to 14 of 14
  1. #1
    SitePoint Enthusiast
    Join Date
    Nov 2006
    Posts
    44
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    connecting phpmyadmin to mysql

    Hello there a small problem here at my end im using "winxp pro sp2" with "IIS v5.1" "MySQL v5.0.27" "PHP V5.20" and "phpmyadmin v2.9.1.1" on a portable laptop..This set up is almost exactly thesame as i have at home on my main PC except i think PHP is "v5.1"..(which i have tried in this queery im now posting) Im following Mr Yanks set up guide directly from the sitepoint manual "BYO database driven website" i havnt missed out any steps, thing is its just not connecting Phpmyadmin to MySQL..throwing up the error down below
    phpMyAdmin - Error

    Cannot load mysql extension. Please check your PHP configuration. - Documentation
    then when clicking the link i get the error could be

    1.20] I receive the error "cannot load MySQL extension, please check PHP Configuration".

    To connect to a MySQL server, PHP needs a set of MySQL functions called "MySQL extension". This extension may be part of the PHP distribution (compiled-in), otherwise it needs to be loaded dynamically. Its name is probably mysql.so or php_mysql.dll. phpMyAdmin tried to load the extension but failed.

    Usually, the problem is solved by installing a software package called "PHP-MySQL" or something similar.
    any advice would be appreciated, been at it for around 4-5 hours now and as many of you know,its either the most simplest of things or absolutly frustrating and its now gotten to the latter point..

    PS...i have uncomented the "mbstring extension" as i have found this a problem in the past..thanks for taking the time to read my thread..MJ

  2. #2
    SitePoint Wizard silver trophy
    Join Date
    Mar 2006
    Posts
    6,132
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    basically, mysql is either not installed, or not installed with php.

    make a call to phpinfo()

    use it to find the location of the correct php.ini file to edit.

    uncomment the line:
    extension=php_mysql.dll

    restart webserver.

  3. #3
    SitePoint Enthusiast
    Join Date
    Nov 2006
    Posts
    44
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the prompt reply clamcrusher
    I have done as you recommend and the corect .ini file is
    Configuration File (php.ini) Path C:\WINDOWS
    which is the one that i've already edited as per Mr yanks book.. ie*

    uncommented line
    extension=php_mysql.dll and added line underneath
    extension=php_mysqli.dll ....

  4. #4
    Umm. PHP Guru....Naaaah jaswinder_rana's Avatar
    Join Date
    Jul 2004
    Location
    canada
    Posts
    3,193
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Do you need to include it?

    If i am not wrong, then at some point after PHP3 (maybe i mentioned wrong version) the MySQL support is inbuilt. You dont need load that extention.

    But, then i haven't worked with PHP5 so it might be different.
    ---------------------------
    Errors = Improved Programming.
    My Site

  5. #5
    Umm. PHP Guru....Naaaah jaswinder_rana's Avatar
    Join Date
    Jul 2004
    Location
    canada
    Posts
    3,193
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Do you need to include it?

    If i am not wrong, then at some point after PHP3 (maybe i mentioned wrong version) the MySQL support is inbuilt. You dont need load that extention.

    But, then i haven't worked with PHP5 so it might be different.
    ---------------------------
    Errors = Improved Programming.
    My Site

  6. #6
    Umm. PHP Guru....Naaaah jaswinder_rana's Avatar
    Join Date
    Jul 2004
    Location
    canada
    Posts
    3,193
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Do you need to include it?

    If i am not wrong, then at some point after PHP3 (maybe i mentioned wrong version) the MySQL support is inbuilt. You dont need load that extention.

    But, then i haven't worked with PHP5 so it might be different.
    ---------------------------
    Errors = Improved Programming.
    My Site

  7. #7
    Umm. PHP Guru....Naaaah jaswinder_rana's Avatar
    Join Date
    Jul 2004
    Location
    canada
    Posts
    3,193
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Do you need to include it?

    If i am not wrong, then at some point after PHP3 (maybe i mentioned wrong version) the MySQL support is inbuilt. You dont need load that extention.

    But, then i haven't worked with PHP5 so it might be different.
    ---------------------------
    Errors = Improved Programming.
    My Site

  8. #8
    SitePoint Enthusiast
    Join Date
    Nov 2006
    Posts
    44
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    @ jaswinder_rana..these are direct instructions from the sitepoint book "building your own database driven website" written by Kevin Yank ..his detail for install works perfectly on my PC, with only a slight hitch which was soon corrected, maybe its a configuration clash on my laptop, however OS and everything is exactly the same as my PC.. i've just done another install and am still getting the same error reported from phpmyadmin, my test.php is definatley showing that i am editing the correct php.ini file in C:\WINDOWS.... very confusing to say the least

  9. #9
    SitePoint Enthusiast
    Join Date
    Nov 2006
    Posts
    44
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    EDIT>>>>>>> there is one difference between both machines, my pc is 32bit sempron 2800 and laptop (one im having difficulties with is 64bit x2AMD Turion)..would this matter so much?

  10. #10
    Theoretical Physics Student bronze trophy Jake Arkinstall's Avatar
    Join Date
    May 2006
    Location
    Lancaster University, UK
    Posts
    7,062
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    just make a PHP file and call it php_info.php. In that file, just put the following code
    PHP Code:
    <? 
    phpinfo
    ();
    ?>
    then, in the row that says "Configuration File (php.ini) Path ", copy the path, go into notepad, then press ctrl+o, then paste the path, then click open.

    press ctrl+f, then type "php_mysql.dll". click 'find'.

    then, you should see that the line that is found looks like:

    ;extension=php_mysql.dll

    all you have to do is take away the semi-colon, and mysql is included as an extention
    Jake Arkinstall
    "Sometimes you don't need to reinvent the wheel;
    Sometimes its enough to make that wheel more rounded"-Molona

  11. #11
    SitePoint Enthusiast
    Join Date
    Nov 2006
    Posts
    44
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks for the reply arkinstall but thats already done as you can see from the list below

    1)installed MySQL (working perfectly through CMD)
    2) edited the my.ini to include "old-passwords"
    3) installed PHP
    4)copied libmysql.dll and php5ts.dll to sys32
    5)copied and renamed php.ini.dist to C:\WINDOWS (renamed to php.ini)
    5)added extension_dir in php.ini to C:\PHP\ext (php is installed in C:\
    6)uncommented mbstring.dll
    uncommented mysql.dll
    added new line mysqli.dll
    the above all preceded with php_
    7) set session save path to C:\WINDOWS\Temp
    8)set up IIS server as per normal (the IIS server is working as required)

  12. #12
    Theoretical Physics Student bronze trophy Jake Arkinstall's Avatar
    Join Date
    May 2006
    Location
    Lancaster University, UK
    Posts
    7,062
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    ah. sorry i didn't see the other post.

    I think your problem is you have to get a special mysql package for IIS, and ususally the same with PHP.

    I would actually recommend not using ISS, but actually using a package called WAMP. Its a package of APACHE, PHP, MYSQL and PHPMyAdmin. The upsides of using wamp are:
    -All the extentions are pre-installed
    -It's a normal, widely used PHP package.
    -Because of the above, it has no installation problems like ISS, because PHP installations are made for this kind of configeration
    Last edited by Jake Arkinstall; Dec 24, 2006 at 09:31. Reason: spelling, SPELLING
    Jake Arkinstall
    "Sometimes you don't need to reinvent the wheel;
    Sometimes its enough to make that wheel more rounded"-Molona

  13. #13
    SitePoint Evangelist
    Join Date
    May 2004
    Location
    Germany
    Posts
    550
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    you could try and copy libmysql.dll and php5ts.dll in c:\php\ . Thats where i have them and everything works fine (using apache, but that shouldn't matter as it's a problem with php)

  14. #14
    SitePoint Enthusiast
    Join Date
    Nov 2006
    Posts
    44
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    @ arkinstall... Gone with your suggestion of WAMP..1 click install and sorted straight away...still cant fathom out why i couldnt get the other install to work on an almost identical setup other than processor though


Bookmarks

Posting Permissions

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