rolling_titan Posted October 21, 2003 Share Posted October 21, 2003 Hello all, I have on RH-9 installed apache server, mysql and PHP. I could view the test page via the browser, hence Apache is installed correctly. I could create databases / tables, hence mysql is working fine. Using the vi editor i could create a sample .php file and saved it in the default document root \"/var/www/html\". I could view this file, but when i add a database connection using mysql_connect i get the following error :Call to undefined function: mysql_connect(). In php.ini file i have left the default_port blank. default_socket as /var/lib/mysql/mysql.sock default_host as the server name where LAMP is installed default_user as root default_password as blank. my syntax for db connection is :mysql_connect(\"servername\",\"root\",\"\"); httpd version :httpd-2.0.40-21.5 mysql :MySQL-3.23.51-1 php :php-4.2.2-17.2 php-mysql :php-mysql-4.2.2-17.2 Quote Link to comment Share on other sites More sharing options...
shivabharat Posted October 21, 2003 Share Posted October 21, 2003 I am not sure if PHP 4.2 has mysql function inbulit. You can either try to upgrade or try to edit the php.ini file. You may see mysql library file name in the extension just uncomment the line and see if it helps. Quote Link to comment Share on other sites More sharing options...
rolling_titan Posted October 21, 2003 Author Share Posted October 21, 2003 In the php.ini file I found extension =msql.so commented so i uncommented it and also changed the value to mysql.so Quote Link to comment Share on other sites More sharing options...
shivabharat Posted October 21, 2003 Share Posted October 21, 2003 Did that work also ensure that you have the mysql.so file in the exetsnion path you sepicified. Quote Link to comment Share on other sites More sharing options...
rolling_titan Posted October 21, 2003 Author Share Posted October 21, 2003 Fatal Error still exists. I added extension=mysql.so extension=msql.so extension imap.so extension ldap.so extension odbc.so extension pgsql.so anything to be added in LoadModule of httpd.conf ? Quote Link to comment Share on other sites More sharing options...
spacecowboy Posted March 20, 2004 Share Posted March 20, 2004 Wondering if the problem has been solved in the meantime. I have a similar problem. The same fatal error when implementing the most simple database functionality in a php page. A message was posted on this board today, describing the problem. After some searching for info on this, it turned out the file "mysql.so" is required. Your references also point to this file. When doing a search (locate / find) on your system, you might find that this "mysql.so" shared object file is not present on the system. If you have solved the problem, please let me know how you did it. As far as I can see it comes down to getting the required file on the system. However, I have not the faintest idea anymore how I can realize that. Thanx in advance for your reply. Grtz, spacecowboy. B) Quote Link to comment Share on other sites More sharing options...
stephenk Posted September 26, 2005 Share Posted September 26, 2005 Wondering if the problem has been solved in the meantime. I have a similar problem. The same fatal error when implementing the most simple database functionality in a php page. A message was posted on this board today, describing the problem. After some searching for info on this, it turned out the file "mysql.so" is required. Your references also point to this file. When doing a search (locate / find) on your system, you might find that this "mysql.so" shared object file is not present on the system. If you have solved the problem, please let me know how you did it. As far as I can see it comes down to getting the required file on the system. However, I have not the faintest idea anymore how I can realize that. Thanx in advance for your reply. Grtz, spacecowboy. B) 65316[/snapback] I used to have this problem too but I downloaded WAMP which has apache, mysql and PHP all in one and the latest versions too! Quote Link to comment Share on other sites More sharing options...
Zane Posted September 26, 2005 Share Posted September 26, 2005 check this link out http://www.phpfreaks.com/forums/index.php?...hl=libmysql.dll just replace libmysql.dll with libmysql.so Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.