Your PHP installation appears to be missing the MySQL extension which is require
-
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.
-
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…
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…
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.
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?
Thanksi 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.
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.
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
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.In fact I’ve just copied libnysql.dll over to system32, restarted my computer and wamp and still no joy with PHP 5.x.
i solved activating php_mysql.dll extension instead of the recommended php_mysqli.dll and i have been able to install wp
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 –
KarthikI’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.
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.
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!
The environment variable is really the key here, it absolutely works on Windows installs. Many thanks to the individual I credit with this fix: https://bigmojo.net/monsters/?p=33
- The topic ‘Your PHP installation appears to be missing the MySQL extension which is require’ is closed to new replies.