cant connect to mysql databases using php


i have php5 mysql4.0.2 and apache2.0.5 installed on my windows xp. mysql on its own works fine. php works with the apache server fine too. for some reaseon my php doesnt recognize any of the mysql functions.
when i run phpinfo there is no mysql info box there but there is a “sqlite” one. i tried installing everything from scratch but it just wont work.

any ideas??


PHP is not shipped with the MySQL extension by default anymore (this should come back, it’s a licence problem).

Under Linux, I just have to compile PHP with MySQL support and point to the right folder, but I don’t think it’s as easy under windows. You can probably find informations about that on


problem solved:
php 5.0.0 doesnt come with a built in support for mysql
installed php 4.3.8 and everything works fine.


You can compile PHP 5 --with-mysql and it will work just fine. As long as the mysql and mysql-devel packages are installed, you will have the right libraries and header files.


with php 5 you have to remove the ; from the mysql extension in the php.ini file and and if I remember right make sure you have the .dll in the proper places - like your extension file. I can’t remember if you have a .dll file copied to the system 32 file also for mysql (some extensions require one there) so you may want to look into that.