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

Support/Development for PHP
TasteOfPower
New Forum User
New Forum User
Posts: 2
Joined: Sat Jul 08, 2006 11:39 am

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

Unread post 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
TasteOfPower
New Forum User
New Forum User
Posts: 2
Joined: Sat Jul 08, 2006 11:39 am

Unread post by TasteOfPower »

I fixed it. I just use mysqli instead of mysql.

Thx.
pedrodj
Forum User
Forum User
Posts: 28
Joined: Tue Jul 04, 2006 7:14 am

Unread post 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 ;)
scott
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 8355
Joined: Wed Dec 31, 1969 8:00 pm
Location: earth
Contact:

Unread post by scott »

Post Reply