PHP 5.04 and MySQL 4.1.1
Moderator: General Moderators
-
php_wiz_kid
- Forum Contributor
- Posts: 181
- Joined: Tue Jun 24, 2003 7:33 pm
PHP 5.04 and MySQL 4.1.1
Hey everyone,
I looked around on the forum for this but I couldn't find it. I can't get PHP 5.0.4 to connecto to a MySQL 4.1.1 database. When I do a mysql_connect() it will connect to the server, but the mysql_select_db() won't work. The mysqli functions won't work either. I copied the latest libmysql.dll over to my root PHP folder. I read that PHP 5 isn't built with MySQL or something like that. How can I use MySQL with PHP then?
I looked around on the forum for this but I couldn't find it. I can't get PHP 5.0.4 to connecto to a MySQL 4.1.1 database. When I do a mysql_connect() it will connect to the server, but the mysql_select_db() won't work. The mysqli functions won't work either. I copied the latest libmysql.dll over to my root PHP folder. I read that PHP 5 isn't built with MySQL or something like that. How can I use MySQL with PHP then?
-
php_wiz_kid
- Forum Contributor
- Posts: 181
- Joined: Tue Jun 24, 2003 7:33 pm
-
php_wiz_kid
- Forum Contributor
- Posts: 181
- Joined: Tue Jun 24, 2003 7:33 pm
-
php_wiz_kid
- Forum Contributor
- Posts: 181
- Joined: Tue Jun 24, 2003 7:33 pm
I have another problem with these versions working together.
I use winxp pro,php 5.0.4 and mysql 4.1 .they work fine but my php cant load mysql
I copy libmuSQL.dll to php root and remove ; before php_mysql.dll in my php.ini,however,it says cant load dynamic library and when I rename the mysql.dll to libmysql.dll in php.ini it says its not a correct php library
what should I do???
thanks
I use winxp pro,php 5.0.4 and mysql 4.1 .they work fine but my php cant load mysql
I copy libmuSQL.dll to php root and remove ; before php_mysql.dll in my php.ini,however,it says cant load dynamic library and when I rename the mysql.dll to libmysql.dll in php.ini it says its not a correct php library
what should I do???
thanks
-
php_wiz_kid
- Forum Contributor
- Posts: 181
- Joined: Tue Jun 24, 2003 7:33 pm
Ok, here's what I'd check.
Make sure you have mysql.dll uncommented in php.ini (which you said you already did).
Make sure C:/php (or whatever your directory path to PHP) is set in your PATH environment variable. (I bet this is your problem). If you don't know how to set environment variables then just ask. I'll help.
Make sure mysql.dll is actually in your C:/php/ext folder.
Make sure that you have the latest version of libmysql.dll (you'll find this somewhere in your MySQL directory path). You can use phpinfo() to check if you have the latest version.
Copy the latest version of libmysql.dll into your PHP and Apache (if you're using Apache and if you don't already have the latest version) folder. I don't know if this is actually necessary but I read this somewhere and I did it, and my MySQL works with PHP but I don't know if that made a difference.
Make sure you have mysql.dll uncommented in php.ini (which you said you already did).
Make sure C:/php (or whatever your directory path to PHP) is set in your PATH environment variable. (I bet this is your problem). If you don't know how to set environment variables then just ask. I'll help.
Make sure mysql.dll is actually in your C:/php/ext folder.
Make sure that you have the latest version of libmysql.dll (you'll find this somewhere in your MySQL directory path). You can use phpinfo() to check if you have the latest version.
Copy the latest version of libmysql.dll into your PHP and Apache (if you're using Apache and if you don't already have the latest version) folder. I don't know if this is actually necessary but I read this somewhere and I did it, and my MySQL works with PHP but I don't know if that made a difference.
-
php_wiz_kid
- Forum Contributor
- Posts: 181
- Joined: Tue Jun 24, 2003 7:33 pm
-
php_wiz_kid
- Forum Contributor
- Posts: 181
- Joined: Tue Jun 24, 2003 7:33 pm
It SHOULD have came with your PHP distro. If it didn't then download PHP 5.0.4 from http://www.php.net. Just copy it from the zipped file (it should be in the ext folder) to your C:/php/ext directory.
Sorry for calling php_mysql.dll, mysql.dll. I didn't mean to give you wrong information.
Sorry for calling php_mysql.dll, mysql.dll. I didn't mean to give you wrong information.