By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
460,034 Members | 1,225 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 460,034 IT Pros & Developers. It's quick & easy.

Manually add MySQL access to PHP via php.ini

P: 11
I saw on the web saying that MYSQL is no longer bulit in PHP 5 and need some manually add in "libmySQL.dll" in system32, then remove the ";" in front of "extension=php_msql.dll ." in php.ini

but below is the only extension i could find inside the php.ini, there is only extension=mysql.so but no extension=php_msql.dll

If you wish to have an extension loaded automatically, use the following
Expand|Select|Wrap|Line Numbers
  1. ; syntax:
  2. ;
  3. ;   extension=modulename.extension
  4. ;
  5. ; For example, on Windows:
  6. ;
  7. ;extension=mysql.so 
  8. ;
  9. ; ... or under UNIX:
  10. ;
  11. ;   extension=php5_msql.so
  12.  
What should i do to make it work? when i changed the bolded statment to extension=php_msql.dll, Apache is having error.
Mar 22 '10 #1

✓ answered by Atli

Hey.

If the line isn't in your php.ini you can just add it. Make sure the "extension_dir" directive is also set correctly and that the DLL (php_mysql.dll) is actually in there.

If you are just trying to set up a local server to work on, you may want to try something like the XAMPP package. It sets up Apache, PHP, MySQL, and a bunch of other commonly used things, so you don't have to manually set it all up yourself. (Note, this should only be used for development server, not production servers! Not without some major config changes, at least.)

Share this Question
Share on Google+
4 Replies


P: 50
Make sure the extension directory is correct.

Also msql is not mysql its mini sql ( which isn't installed by default ) you need to comment out the one with php_mysql.dll.
Mar 22 '10 #2

Atli
Expert 5K+
P: 5,058
Hey.

If the line isn't in your php.ini you can just add it. Make sure the "extension_dir" directive is also set correctly and that the DLL (php_mysql.dll) is actually in there.

If you are just trying to set up a local server to work on, you may want to try something like the XAMPP package. It sets up Apache, PHP, MySQL, and a bunch of other commonly used things, so you don't have to manually set it all up yourself. (Note, this should only be used for development server, not production servers! Not without some major config changes, at least.)
Mar 22 '10 #3

P: 11
Thanks Atli, XAMPP does help a lot.
Mar 23 '10 #4

Markus
Expert 5K+
P: 6,050
For future referrence, the documentation covers this (http://uk3.php.net/manual/en/mysql.installation.php - Installation on Windows PHP5+)

And don't put your .dlls in the system32 directory!
Mar 23 '10 #5

Post your reply

Sign in to post your reply or Sign up for a free account.