LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   php install and test,maybe... (https://www.linuxquestions.org/questions/linux-software-2/php-install-and-test-maybe-379116/)

backpacker 11-01-2005 07:56 PM

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.

backpacker 11-01-2005 07:57 PM

For question(1),I use php-4.2.23.

alfal 11-01-2005 08:03 PM

1.Are you ./configure php with mysql? Such as:./confiugre --with-mysql=/usr/local/myql

2.you ./configure is successed? no error?

fouldsy 11-02-2005 03:11 AM

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?

backpacker 11-02-2005 11:42 PM

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.

backpacker 11-03-2005 02:09 AM

"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!

backpacker 11-03-2005 02:12 AM

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.