PDA

View Full Version : MySQL and PHP5 experts, this way please



mister harbies
07-03-2005, 08:04 PM
Hi fellow F1ers,

I am running a winxp sp2 computer with apache running as a server and I have php and mysql set up too. The versions are apache 2.0.52, mysql 4.0.21 and php 5.0.2.

The apache monitor and mysql's traffic lights are running fine. I run phpinfo.php and it works, but there is nothing there to show that mysql is installed.

I am working on a content management system for a website, but the installation tells me that mysql is not supported. I have tried to check all the relevant .ini and config files for anything I must change to enable mysql support.

Can anyone shed some light on what I may have missed out?

Many thanks,

gibler
07-03-2005, 11:21 PM
Usually MySQL support in PHP is compiled into PHP itself (and PHP is just an Apache module, usually).

You can tell if it has been compilied into your PHP installer as in the phpinfo page there shoud be a section MySQL.


from install notes for windows php

* Enable the extension(s) in php.ini you want to use by uncommenting
the extension=php_*.dll lines in php.ini. This is done by deleting
the leading ; form the extension you want to load.

mister harbies
08-03-2005, 11:20 AM
Ok, cool I did that, and now when I restart the apache server, a dialog box xomes up saying "php startup: Unable to load dynamic library './php_mysql.dll' - the specificied module could not be found"

I tried to copy the dll file into the apache folder, windows system 32 and windows system folders.

I cannot find the right folder to put this dll into. Im not good at reading those config files, so hardly understand them, but hopefully will get the knack of it when I get php etc running.


So, where should the dll file go?

mister harbies
08-03-2005, 11:21 AM
Oh, and by the way, there is no section in the phpinfo result page about mysql

gibler
08-03-2005, 11:48 PM
looks like it should go in a folder named ext which is in the same directory your php.ini file is..

but check the php.ini file for a line that says: extension_dir

put ya .dlls in there

mister harbies
09-03-2005, 08:49 AM
php.ini should be stored in c:/windows/ (that is if you are using windows).

I have uninstalled all the applications, and will read the instructions carefully(ier) and see if that works. Might have made a small mistake somewhere.

mister harbies
09-03-2005, 11:05 AM
Okay, I reinstalled my applications, but still had the same problem, but I searched the net again, but broadened my search and found the answer.

It is simply just adding the following line to your httpd.conf file in apache:

LoadFile C:/PHP/libmysql.dll

This should be inserted just below the LoadModules section. I was using c:/PHP5/ so change the folder name to whatever yours is.