Page 1 of 1

FC3: yum upgraded PHP to version 5.0.4 and now i get a..

Posted: Sat Jul 08, 2006 11:47 am
by TasteOfPower
yum upgraded PHP to version 5.0.4 and now i get a
Fatal error: Call to undefined function mysql_connect() in ...

I have everything needed installed. See below:

[root@206-225-86-186 etc]# rpm -qa | grep php
phpAds-2.0.5-7506
phpDig-1.85-7505
phpWiki-1.3.11-7508
php-imap-5.0.4-13.rhfc3.art
php-pear-5.0.4-13.rhfc3.art
phpBB-2.0.17-7518
php-mbstring-5.0.4-13.rhfc3.art
php-mysql-5.0.4-13.rhfc3.art
phpBugTracker-1.19-7506
phpMoney-1.3-7510
phpsurveyor-0.98-7510
php-5.0.4-13.rhfc3.art
php-gd-5.0.4-13.rhfc3.art
phpBook-1.50-7507
phpMyFamily-1.4.1-7508
php-ioncube-loader-1.0-fc3.build051222.05
php-pgsql-5.0.4-13.rhfc3.art
php-xml-5.0.4-13.rhfc3.art



I restarted everything....even the server. mySQL clearly hasnt started for some reason....although when I start it....it seems to start fine. PLESK is running fine, and plesk uses mysql and php, correct? BUT! when I use this test script to check.....

Code: Select all

<?

if(extension_loaded('mysql')) {
echo 'mysql is loaded';
} else {
echo 'mysql is not loaded!';
}


$link = mysql_connect('localhost', 'public', 'password');
if (!$link) {
   die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully';
mysql_close($link);

?>
I doesnt connect.

Either I need to rollback PHP.....or i would be very appreciative if someone could just help me fix this problem instead of rolling back.

I have read that i need to compile PHP with support for mysql, but i dont believe rpmbuild is allowed on FEDORA CORE 3, and the rpm is a binary file anyway...correct?




thx for any help at all in advance

Posted: Sat Jul 08, 2006 2:48 pm
by TasteOfPower
I fixed it. I just use mysqli instead of mysql.

Thx.

Posted: Tue Jul 11, 2006 9:22 am
by pedrodj
TasteOfPower wrote:I fixed it. I just use mysqli instead of mysql.

Thx.
can you explain me step by step how solve mysql functions in PHP 5.0.4 ?

thank you ;)

Posted: Tue Jul 11, 2006 10:23 am
by scott