php install and test,maybe...
(1)I tested my php file,I got message said that "Call to undefined function:mysql_connect() in /var/www/html line 2".My test.php is <?php $link=mysql_connect();...?>.
(2)I downloaded php-5.0.5 and ./configure it.But there was no Makefile in the file I downloaded. Hope someone help me.Thanks. |
For question(1),I use php-4.2.23.
|
1.Are you ./configure php with mysql? Such as:./confiugre --with-mysql=/usr/local/myql
2.you ./configure is successed? no error? |
Have you actually got PHP + MySQL server installed + configured correctly? I don't understand your problems installing PHP if you've already been able to run PHP scripts from your webserver. Anyways, what distro are you using - can you not find pre-compiled packages available that install + tie the two together correctly? Assuming PHP + MySQL is installed, it might be your PHP code based on the error returned. What was the rest of your PHP code to connect to your MySQL database?
|
My distro RedHat9,adn mysq-5;php-4;apache-2.0.55.
My php code is an example from php official web site:<?php $link=mysql_connect('localhost','user','password');...?>,and I tested <?php phpinfo();> work OK.In fact my trouble came since I upgrated to mysql-5,before that my php code seems get correct output. It's weird. |
"Fatal Error:Call to undefined function:mysql_connect() in /var/www/html/test.php on line 2" meant php parser can not be able to find its function library?Some wrong with path setting?Terroble!
|
I posted for help on the forum of php.net but nobody answers me.Please!
|
All times are GMT -5. The time now is 08:19 PM. |