Page 1 of 1

Help with connecting php and mysql

Posted: Sat Jun 24, 2006 9:52 am
by Koursaros
Hi All,

I am new in PHP and MySQL so I would appreciate it a lot if you could help me(I am using php5 & mysql server 5)! My problem is that at first I had a "Fatal error: Call to undefined function mysql_connect()" I tried to solve that by following those steps :

1. Made sure "c:\php" is in the PATH string
2. Put "libmySQL.dll" in the "c:\php" directory
3. Set: extension_dir = "c:\php\ext" (which is where "php_mysql.dll" and "php_mysqli.dll" are) in the "Paths and Directories" Section of php.ini
4. Enabled those DLL's by adding:
extension=php_mysql.dll
extension=php_mysqli.dll
to the Dynamic Extensions section of php.ini

After that I tried to run a simple program but instead of the fatal error i received the following notice " Notice: Object of class mysqli_result could not be converted to int in C:\PHP\phpFiles\mysql_up.php on line 15"

I do get the phpinfo() working but in the first table in the line of configure command it doesn't say with_sql!

I would be very gratefull if you could help me with that!!!
Thanks a lot!

Posted: Sat Jun 24, 2006 4:49 pm
by andym01480
If you are trying to run a "development" server on a windows/linux pc or a mac, uninstall php and mysql and then download the xampp package from
http://www.apachefriends.org/en/xampp.html

It is an installer that makes php 5 and mysql5 work out of the box. All you have to do is follow the instructions to make it secure. Job done, then you can play!

Or wait for someone who is good at getting installations working to come along!