tags:

views:

1796

answers:

4
+1  A: 

In the php.ini file, check if the extention path configuration is valid.

vIceBerg
See note regarding extension_dir in question above.
Zack Peterson
It's bad I do not have access to my PHO box right now.I think the extention dir must be unique. Try "c:\windows\system32"Try it with a final "\" also.Try it with "c:\\windows\\system32".
vIceBerg
+1  A: 

You will need to enable the extension=php_mysql.dll option in the php.ini as well. Also, make sure that the file is in the extension_dir you set.

You can read more about it at:

http://us3.php.net/manual/en/install.windows.extensions.php

Harrison Fisk
+3  A: 

As the others say these two values in php.ini are crucial.

I have the following in my php.ini: note the trailing slash - not sure if it is needed - but it does work.

extension_dir = "H:\apps\php\ext\"
extension=php_mysql.dll

Also it is worth ensuring that you only have one copy of php.ini on your machine - I've had problems with this where I've been editting a php.ini file which php isn't using and getting very frustrated until I realised.

Also if php is running as a module within apache you will need to restart the apache server to pickup the changes. Wise to do this in anycase if you're not sure.

a "php -m" from the cmd prompt will show you the modules that are loaded from the ini file.

Richard Harrison
The clues "php.ini extension_dir" and "restart the apache server" (IIS in my case) were key. Thank you.
Zack Peterson
"Also it is worth ensuring that you only have one copy of php.ini on your machine." If you have more than one and want to know which one is being used, add `phpinfo()` to a page. One of the first pieces of info "loaded configuration file" - the location of the `php.ini` file it's using.
Nathan Long
+1  A: 

On a completely different note, might I suggest WampServer? It should get you up and running with a Apache/PHP/MySQL install in no time.

You could even compare the WampServer config files with your own to see where you originally went wrong.

leek