WordPress.org

Ready to get started?Download WordPress

Forums

Your PHP installation appears to be missing the MySQL extension which is require (34 posts)

  1. a2vr6
    Member
    Posted 6 years ago #

    Just installed ver 2.5 on RHEL 5. I confirmed everything is isntalled (php,mysql and apache). But i get the following when loading the install script:

    install.php

    Your PHP installation appears to be missing the MySQL extension which is required.

    I followed all the instructions on creating the DB etc and It all seemed to go through without a hitch. There was mention to put in a line on php.ini extension=mysql.so but that has not fixed it either.

    Can someone help, I have tried everything that has come up in google.

  2. Samuel Wood (Otto)
    Tech Ninja
    Posted 6 years ago #

    Your PHP installation appears to be missing the MySQL extension which is required.

    Only one thing causes that error. Your PHP.INI doesn't have the mysql line uncommented, so it's not loading the mysql module (or the module is simply missing entirely).

    Restart your webserver after you fix the PHP.INI file.

  3. a2vr6
    Member
    Posted 6 years ago #

    Thanks for the reply, I found the resolution:

    1) yum install -y mysql mysql-server - Ensure that MySQL and MySQL server are installed

    2) yum install -y php php-mysql - Ensure that PHP and the PHP MySQL components are installed

    3) Restart Apache

  4. etsianblogs
    Member
    Posted 6 years ago #

    Hi there,

    I've set up the SQL db on GoDaddy. I am getting that error, I'm assuming I can't restart the GoDaddy server ... any suggestions?

    (speak slowly, I"m not a programmer! I'm a lowly graphic designer.)

    Sincerely,
    In Over Her Head

  5. donroberto
    Member
    Posted 6 years ago #

    I am getting the same error message. I am also using GoDaddy. I've been using WordPress on a GoDaddy website and SQL database for years.

    Downstream is another user having the same problem and the recommendation there is to switch from Windows OS to Linux. I have done that and am awaiting the switchover to see if that helps.

    Please keep us notified if this is resolved and what the solution is.

    I too am just a lowly graphic designer and need step by step instructions.

    Thanks!

  6. donroberto
    Member
    Posted 6 years ago #

    Instant update:

    Switching the GoDaddy server's OS to Linux did the trick for me. I was able to log into the blog, update WordPress, etc.

    All functions of the blog are working better with the upgrade.

  7. bpc22
    Member
    Posted 6 years ago #

    I came across this error under Windows XP. (Don't worry, I'm just using it as my development site, not production.).

    Environment: Windows XP, Apache-2.2, PHP-5.2.5, MySQL-5.0, WordPress-2.5

    These were the steps which I followed to install WordPress without it resulting in that nasty error message.
    1. Install Apache
    2. Install My-SQL. Note: in WordPress' installation instructions this step comes after PHP installation. However, I read somewhere someone suggesting to install PHP after My-SQL. Don't know if this was the determining factor, but it was the way I took.
    3. Install PHP. Here is were I think you'll make it or break it. When installing PHP,
    a) be sure to point to Apache's conf directory when asked where its configuration directory resides, don't just point to Apache's install directory,
    b) when asked which items to install, navigate down into Extensions and select MySQL and MySQLi. By default, these won't be installed.
    4. Copy wordpress directory contents into Apache's htdocs directory (just my choice, but there are ofcourse other variations which will work).
    5. Restart Apache.
    6. navigate to http://localhost/wp-admin/install.php This time it should work.

    I make no claims to being an Apache/PHP/MySQL/WordPress guru or even a dimly enlightened student. Some of the steps above are probably unnecessary, but they seemed the right thing to do, and hey - IT WORKED!

    I hope this helps.

  8. writerbee
    Member
    Posted 6 years ago #

    Okay, so tried exactly what was outlined above, but am still getting this error on http://localhost/wordpress/wp-admin/install.php.

    Anyone have any other suggestions? I've checked the php.ini file to confirm that all MySQL entensions are enabled as well and still no-go.

    I'm trying to install WP on my localhost running Apache, MySQL, and phpMyAdmin on a Windows XP. Everything is working great - I can get to phpMyAdmin and create new MySQL databases with no trouble, it's only the WP install that's giving me issues.

    At a loss - can anyone help?

  9. rjoshicool
    Member
    Posted 6 years ago #

    hi,
    when trying to run the script install.php, I am getting the same error.

    I've checked everything and made all the required settings in the php.ini file but the problem still persists.

    Earlier it was all working fine but after formatting my pc an reinstalling php and mysql, the problem has started coming.

    please help me out!

  10. idahostevens
    Member
    Posted 6 years ago #

    Otto42 is correct

    ; 6-6-08 uncommented next line
    extension=mysql.so

    This worked

  11. meglish
    Member
    Posted 6 years ago #

    For those of us using GoDaddy with the Windows XP OS and consequently running into this issue, how do we switch to Linux? I'm assuming it's the best way to fix the problem?

  12. doctorclark
    Member
    Posted 6 years ago #

    For those of us using GoDaddy with the Windows XP OS and consequently running into this issue, how do we switch to Linux? I'm assuming it's the best way to fix the problem?

    Here is the GoDaddy how-to, with detailed instructions:
    http://help.godaddy.com/article/1285

  13. bagelboy
    Member
    Posted 5 years ago #

    I am having this problem too, and i can not find this PHP.INI file to correct it, where is it.. and is there any other easy quick way to fix this problem ?

  14. moshu
    Member
    Posted 5 years ago #

    Are you hosting your own website on your machine?
    If not, don't bother. And next time read more carefully.

    Who is your host?

  15. postmodern_monk
    Member
    Posted 5 years ago #

    I'm hosted by Go Daddy, and was having the same error.

    After I switched the OS to Linux I was still getting an error, just a better-composed one. I solved the problem by changing 'DB_HOST' field in wp-config.php from 'localhost' to the IP where my database existed, which can be easily had by signing into Go Daddy's database management site.

    Guess I was part of the 1% with this problem.

  16. lqpman
    Member
    Posted 5 years ago #

    Hi there,

    Same problem as above: after following all steps for installing WordPress, get the same

    "Your PHP installation appears to be missing the MySQL extension which is required by WordPress"

    message when trying to load wp-admin/install.php to complete the WordPress installation. I've checked _all_ possibilities discussed above: the php.ini file of _both_ my php4 and php5 installations have uncommented "extension=mysql.so" lines (also "extension=mysqli.so" for php5), these modules _are_ present, and my Apache-PHP-MySQL setup _does_ seem to work, for I have phpmyadmin installed and it _does_ work as it should - all MySQL management can be done by PHP from my Firefox web browser. The WordPress files are the _only_ ones which complain as if there was something missing.

    My machine runs Ubuntu Linux 6.06 ("Dapper Drake"), and all versions of the needed packages seem to be up to date.

  17. spage
    Member
    Posted 5 years ago #

    Otto42 is correct, but he didn't provide any details! I'm just a lowly programmer, and I need things spelled out, too.

    The php.ini file is in the PHP installation directory. The line to un-comment (for Windows) is
    ; extension=msql.dll
    Note that the "y" is missing.

    I also believe that
    AddType application/x-httpd-php .php
    must be added to httpd.conf if you are using Apache.

    Well, PHP is still complaining, so I have to reboot. I'll add another post if this doesn't work...

  18. spage
    Member
    Posted 5 years ago #

    Ignore my previous post. No wonder everyone says to use Linux. PHP does not play nicely with MySQL on Windows.

    Here is a link that discusses the problem and what to do. Given the complexity, and that I'm a Java developer, I'm giving up...

  19. Samuel Wood (Otto)
    Tech Ninja
    Posted 5 years ago #

    PHP works just fine with MySql on Windows. I use it on several systems. It's literally as simple as adding or uncommenting extension=mysql.dll. There's no more "mysql" related configuration to be done with PHP at all.

    However, be sure that you're editing the correct PHP.INI file. In a webserver context, your PHP.INI file might be in the apache bin directory instead.

    The reason everybody says to use Linux is because of the hosting services. When a hosting service offers a choice of systems, then generally speaking the "Linux" configuration is a "LAMP" stack (Linux, Apache, MySql, PHP), while the "Windows" configuration is an IIS system geared to run ASP type stuff.

    So, it's perfectly possible to do it yourself without any trouble (a "WAMP" stack), and in fact several premade packages exist to do just that (Google for "XAMPP"). But if you're using somebody else's services, you don't have the kind of flexibility to do that sort of thing. In which case, you want a Linux based hosting system, probably.

  20. erizo-mongol
    Member
    Posted 5 years ago #

    i recently bought my domain, and then my hosting plan with godaddy.(deluxe hosting)

    when i try to install wordpress i get the same error as above, and following the indications, i did not find the php.ini file.
    did the download go wrong? is there any other way to fix this problem?
    Thanks

  21. Samuel Wood (Otto)
    Tech Ninja
    Posted 5 years ago #

    i recently bought my domain, and then my hosting plan with godaddy.(deluxe hosting)

    I don't know how many times we can say it:

    GoDaddy's Windows based hosting plans do not work with WordPress.

    Switch it to a Linux hosting plan instead. The cost is exactly the same.

  22. Cdogg007
    Member
    Posted 5 years ago #

    For you IIS people that are wondering why the instructions still don't work even with a perfectly configured PHP.INI file. This may help: You MUST copy the "libmysql.dll" file from you "\PHP" folder to the "Windows\System32" for it to work. Even if you have commented out the appropriate lines, and done everything else perfectly, and that file is missing from your system32 folder, you'll get that message. Reboot your machine after you've copied the file.

  23. KimMcCall
    Member
    Posted 5 years ago #

    Some PHP binaries come with mysql support built in. Some don't. You can find out about yours by running a script like this:

    <?php
    phpinfo();
    ?>

    If the output includes "--without-mysql" then you need to install php mysql support another way, as mentioned in one very useful post above. This is how I did it:

    # yum install php-mysql

    Then restart apache. For me, that's done by

    # /etc/init.d/httpd restart

  24. nigeljohnwade
    Member
    Posted 5 years ago #

    This may help: You MUST copy the "libmysql.dll" file from you "\PHP" folder to the "Windows\System32" for it to work.

    This only appears to be the case with PHP 5.x.x
    I couldn't get WordPress on my localmachine to work until I changed back to PHP 4.4.7, which is the same as my hosting company uses, and it ran fine without the libmysql.dll in the system32 folder.

  25. nigeljohnwade
    Member
    Posted 5 years ago #

    In fact I've just copied libnysql.dll over to system32, restarted my computer and wamp and still no joy with PHP 5.x.

  26. childheart82
    Member
    Posted 5 years ago #

    i solved activating php_mysql.dll extension instead of the recommended php_mysqli.dll and i have been able to install wp

  27. sterlingwater
    Member
    Posted 5 years ago #

    Hi all -
    I encountered the same issue and this is how I solved the problem:

    I have RHEL 4 x64 and it came with apache webserver (httpd-2.0.52-22.ent). It also came with PHP installed 4.3.9. I had already installed mysql 5.0.22 for my previous moonlighting project. All that I needed to do was to install wordpress to get it going.

    However, I encounted the ' Your PHP installation appears to be missing the MySQL extension which is required' problem. After investigating for a couple of hours I found that:
    (1) mysql extention was not enabled in /etc/php.ini and
    (2) the mysql.so was missing. This took me the longest to figure out. After searching around a bit I realised that my pre-packaged php server did not have the necessary libraries to connect to PHP. Hence I needed php-mysql-4.3.9-3.9 package (php-mysql-4.3.9-3.9.x86_64.rpm) which has mysql.so. However, this package has a dependency on mysql compatibility library MySQL-shared-compat-5.1.30-0.rhel4.x86_64.rpm. After installing these two (rpm -ivh <name>.rpm) I restarted the apache (apachectl -k restart). Thats it. It works now.

    Happy blogging and installing.

    Thanks -
    Karthik

  28. Steve Taylor
    Member
    Posted 5 years ago #

    I've just encountered this error. I've got Apache, MySQL & PHP on my Windows XP desktop, I'm trying to develop a WP site locally.

    It's been working fine for the past few days, installation was OK. I booted up today and got this error. php_mysql.dll is uncommented, in the right php.ini.

    phpMyAdmin no longer works, Firefox downloads the index.php. I've seen this behaviour - downloading instead of running PHP scripts - a few times before, and it's always mystified me.

    Anyway, I've gone back to the FTP back-and-forth of developing on my web server for now. Just thought I'd pop this here in case anyone has any ideas.

  29. davidahall
    Member
    Posted 5 years ago #

    I also had the problem, thanks to all this info I've fixed it.

    I'd just like to add this - (on win-xp with php5) I have php installed at c:\php, the php.ini is there, and all the .dll files are there - be sure to copy php_mysql.dll from phpext folder to where ever php actually uses .dll files (for me it's c:\php). On your dev box (that you have access to) you can change the location of where php finds the ini and dll files (I think it's in the apache/httpd config file).

    I now have both mysql and mysqli installed, and only had to change php.ini and copy the .dll file to make it work. The WordPress install (and error message) *should* mention that WordPress doesn't work with mysqli. As someone mentioned above you can create a php script and show all php modules installed with phpinfo() and see that both mysql modules are installed.

  30. castelosnoar
    Member
    Posted 5 years ago #

    Hi!

    If you're on Windows, have uncommented the right extensions in php.ini and are still experiencing this problem, you might want to try the new recommended way of installing PHP, described in its installing manual, that doesn't require moving any DLL. This did the trick to me. Similar procedure might be applicable to Linux, but I didn't try it (I would recommend reading the applicable section of the install manual that comes with every distribution).

    From the manual:

    "Previous editions of the manual suggest moving various ini and DLL files into your SYSTEM (i.e. C:\WINDOWS) folder and while this simplifies the installation procedure it makes upgrading difficult. We advise you remove all of these files (like php.ini and PHP related DLLs from the Windows SYSTEM folder) before moving on with a new PHP installation. Be sure to backup these files as you might break the entire system. The old php.ini might be useful in setting up the new PHP as well. And as you'll soon learn, the preferred method for installing PHP is to keep all PHP related files in one directory and have this directory available to your systems PATH.
    (...)

    How do I add my PHP directory to the PATH on Windows?

    On Windows NT, 2000, XP and 2003:

    * Go to Control Panel and open the System icon (Start -> Settings -> Control Panel -> System, or just Start -> Control Panel -> System for Windows XP/2003)
    * Go to the Advanced tab
    * Click on the 'Environment Variables' button
    * Look into the 'System Variables' pane
    * Find the Path entry (you may need to scroll to find it)
    * Double click on the Path entry
    * Enter your PHP directory at the end, including ';' before (e.g.
    ;C:\php)
    * Press OK and restart your computer
    (...)
    How do I make the php.ini file available to PHP on windows?

    (...)You must set the PHPRC environment variable:

    On Windows NT, 2000, XP and 2003:

    * Go to Control Panel and open the System icon (Start -> Settings -> Control Panel -> System, or just Start -> Control Panel -> System for Windows XP/2003)
    * Go to the Advanced tab
    * Click on the 'Environment Variables' button
    * Look into the 'System variables' pane
    * Click on 'New' and enter 'PHPRC' as the variable name and the
    directory where php.ini is located as the variable value (e.g.
    C:\php)
    * Press OK and restart your computer"

    HTH!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags