Hi
i made the following change to the /etc/php.d/mysql.ini original was extension=mysql.so extension=/usr/lib/php/modules/mysql.so now it works, was this the problem, i would like to think so. anyway thanks to all who replied. vnb400 |
Hi,
You said that it is working so that is great! There are two ways to get an extension in php, the windows approach is to load the extension, whilst the typical Linux approach is to compile it into the code. However since your system has the library it can be loaded, which is what you have just done with that change. The .ini file has a directive called extension_dir you can set that up to the path of your extensions meaning that, so long as all your .so files are in the same directory you will not need to change the extension part of the ini file. Giving you something like: extension_dir="/usr/lib/php/modules/" ... extension=mysql.so extension=mysqli.so |
Hi
It seems that specifying the location of .so file was not the actual problem. Next day after after i had succeded i get the connect to MySQL, i tried it again and it got stuck again on the line mysql_connect("", "" ""). So i did the one thing i am good at, re-installed Linux O/S afresh and it worked the first time i tried , but on the next try it again go stuck on mysql_connect("", "", ""); The only reason this ccould be happening is maybe due to the connection not being closed. Is that possible, funniest thing is even if i reboot again it still does not work. Any helpful advice is welcome. vnb400 |
The helpfull advice was already given in this thread. You are using fedora core 4 (you should put that in your profile by the way so that can be seen instantly). Guessing
Code:
yum install php-mysql |
add this i your connect line
or die(mysql_error()); so the whole line will look like this mysql_connect("host","password", "root") or die(mysql_error()); then, it will show what's the real error... if you can't solve it, try posting it here again and we'll see what we can do... |
sorry not like that but like this ;-)
mysql_connect("host","user", "password") or die(mysql_error()); |
All times are GMT -5. The time now is 10:35 AM. |