Jump to content

mysql driver is not currently installed


Recommended Posts

Hi,

 

I'm having some issues with my Mysql driver, Zendframeworks is telling me that the driver isn't installed and also on another project tail is stating that it cannot use mysql_connect, which I'm presumming is the same issue. I am running PHP 5.3 and I know that they have altered the way MySQL works in this version but I thought I had it setup correctly in my PHP.ini

 

I have read that you're suppose to have the following line uncommented in the php.ini

 

extension=php_pdo_mysql.dll
extension=php_pdo_mysql.so

 

Is this still the case in php 5.3? As when I search for these lines vi and nano both cannot find them, so should I add them?

 

Also another thing I read was the following;

 

However, running php (5.3) as an apache (2.2) module on my machine (windows 7), it still wouldn't work. I figured out the extension_dir value in php.ini needs to be set using an absolute path (relative just wouldn't work)!

 

However, when I uncommented and changed extension_dir from ./ to / and restarted, it caused the zend to fall over and die. Any ideas of what I am missing in my PHP.ini pretty sure thats where the issue lies.

Link to comment
Share on other sites

You enabled the MySQL PDO extension. Which is something entirely different. You need to uncomment this line:

 

;extension=php_mysql.dll

 

That said mysql_* is deprecated and you should use mysqli instead which is almost the same as mysql except your functions start with mysqli_* and the $dblink is required and the first parameter to a function.

Link to comment
Share on other sites

Yes you can use mysqli with a mysql database. The i stands for improved. It allows for preparing queries, and variable binding and the like.

 

Check first if php_mysql.dll exists in your ext/ directory. If not and you have PHP 5.3+, download it from:

http://dev.mysql.com/downloads/connector/php-mysqlnd/

 

Then add it to your php.ini.

Link to comment
Share on other sites

This isn't in the php.ini file though extension=php_mysql.dll would I need to add it and where?

 

That's an indication that you installed php using the .msi installer or via one of the all in one packages and you must enable extensions either through the windows control panel add/remove or the all in one control panel. How did you obtain and install php? The .msi installer, the .zip package and manually install it, or one of the wamp all in one packages?

Link to comment
Share on other sites

That said mysql_* is deprecated and you should use mysqli instead which is almost the same as mysql except your functions start with mysqli_* and the $dblink is required and the first parameter to a function.

 

While it's not quite deprecated yet (thought so too, until told otherwise), it is still recommended to use MySQLi or PDO instead. So my suggestion to you, OAFC_Rob, is to drop the mysql library and use MySQLi instead. Or PDO, if you prefer, since you already have it installed.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.