LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 12-13-2007, 09:11 AM   #1
milkteeth
LQ Newbie
 
Registered: Dec 2007
Posts: 11

Rep: Reputation: 0
PHP-MYSQL error at installation


Hi!
I am using Centos4.5 + PHP5 + mySQL5
After installing phpMyAdmin, this is the error that i got from phpMyAdmin:
PhpMyAdmin - Error
Cannot load mysqli-extension. Check the PHP configuration-Documentation.
And in the documentation it says that i need to uncomment mysql.so in php.ini file.but,
# updatedb
# locate mysql.so
gives no results!
so i googled and found out that i need to install php-mysql to get this mysql.so. But when i try,

# yum install php-mysql
Setting up Install Process
Setting up repositories
adobe-linux-i386 100% |=========================| 951 B 00:00
update 100% |=========================| 951 B 00:00
base 100% |=========================| 1.1 kB 00:00
centosplus 100% |=========================| 951 B 00:00
addons 100% |=========================| 951 B 00:00
extras 100% |=========================| 1.1 kB 00:00
Reading repository metadata in from local files
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for php-mysql to pack into transaction set.
php-mysql-5.1.6-3.el4s1.8 100% |=========================| 17 kB 00:00
---> Package php-mysql.i386 0:5.1.6-3.el4s1.8 set to be updated
--> Running transaction check
--> Processing Dependency: php-common = 5.1.6-3.el4s1.8 for package: php-mysql
--> Finished Dependency Resolution
Error: Missing Dependency: php-common = 5.1.6-3.el4s1.8 is needed by package php-mysql

and if i try:

# rpm -Uvh --force php-common-5.1.6-3.el4s1.8.i386.rpm
error: Failed dependencies:
php-common = 5.2.4-2 is needed by (installed) php-cli-5.2.4-2.i386
php-common = 5.2.4-2 is needed by (installed) php-5.2.4-2.i386
php-common = 5.2.4-2 is needed by (installed) php-pdo-5.2.4-2.i386
php-common = 5.2.4-2 is needed by (installed) php-gd-5.2.4-2.i386
php-common = 5.2.4-2 is needed by (installed) php-imap-5.2.4-2.i386
php-common = 5.2.4-2 is needed by (installed) php-mbstring-5.2.4-2.i386
php-common = 5.2.4-2 is needed by (installed) php-xml-5.2.4-2.i386
php-common = 5.2.4-2 is needed by (installed) php-xmlrpc-5.2.4-2.i386
php-common = 5.2.4-2 is needed by (installed) php-soap-5.2.4-2.i386
php-common = 5.2.4-2 is needed by (installed) php-ncurses-5.2.4-2.i386
php-common = 5.2.4-2 is needed by (installed) php-dba-5.2.4-2.i386
php-common = 5.2.4-2 is needed by (installed) php-mcrypt-5.2.4-2.i386
php-common = 5.2.4-2 is needed by (installed) php-mhash-5.2.4-2.i386

In the beginning i was getting this error:
Error: Missing Dependency: php = 4.3.9-3.22.9 is needed by package php-mysql

and
# yum list | grep php-mysql
php-mysql.i386 4.3.9-3.22.9 update

and after enabling centos plus repo from /etc/yum.repos.d/
I started to get this error:
Error: Missing Dependency: php-common = 5.1.6-3.el4s1.8 is needed by package php-mysql

and
# yum list | grep php-mysql
php-mysql.i386 5.1.6-3.el4s1.8 centosplus

can someone help me ?!
thanks in advance!
 
Old 12-13-2007, 09:23 AM   #2
Acron_0248
Member
 
Registered: Feb 2006
Location: Venezuela
Distribution: Gentoo
Posts: 453

Rep: Reputation: 33
Hi,

Clarifications:

- You have configured your config.inc.php (phpmyadmin configuration file) to use 'mysqli' not mysql, they aren't the same. Your system already have mysql installed, so, what you have to do is modify the config.inc.php to use mysql instead of mysqli

So, will be something like, changing this line:

Code:
$cfg['Servers'][$i]['extension'] = 'mysqli';
to

Code:
$cfg['Servers'][$i]['extension'] = 'mysql';


Regards
 
Old 12-13-2007, 10:02 AM   #3
milkteeth
LQ Newbie
 
Registered: Dec 2007
Posts: 11

Original Poster
Rep: Reputation: 0
Thanks Acron_0248...
i did change it to mysql...
but now it says, cannot load mysql extention!
i have also changed in /etc/php.ini the folowing:


;;;;;;;;;;;;;;;;;;;;;;
; Dynamic Extensions ;
;;;;;;;;;;;;;;;;;;;;;;
....
....
extension=mysqli.so
extension=msqli.so
extension=mysql.so
extension=msql.so
but it still doesn't works.
 
Old 12-13-2007, 01:28 PM   #4
Acron_0248
Member
 
Registered: Feb 2006
Location: Venezuela
Distribution: Gentoo
Posts: 453

Rep: Reputation: 33
Hi,

First, you don't need to have uncommented this lines in order to use mysql:

Code:
extension=mysqli.so
extension=msqli.so
extension=msql.so
So, you can comment those lines.

Second, you already have installed php-mysql, so, the libraries have to be in /usr/lib/..., anyway, you could use the following to check if it exist:
Code:
find / -name mysql.so
You should check also that mysqld is running:

Code:
netstat -tap | grep mysql
If that doesn't show anything, then, you should start mysql before trying to access phpmyadmin:

Code:
/etc/init.d/mysqld start

Regards
 
Old 12-13-2007, 01:51 PM   #5
milkteeth
LQ Newbie
 
Registered: Dec 2007
Posts: 11

Original Poster
Rep: Reputation: 0
Thanks again Acron!
The thing is that i don't have this mysql.so on my system!
and that is what i want to intall somehow!
After changing things I restart mysql and httpd everytime.
I think i'll have to reinstall PHP5 again.
everything was going good on PHP4 till i needed to install PHP5 as most of the frontends(TUPA, Poweradmin, FreshDNS) for PowerDNS would work without PHP5. I just wanted to try them one by one.
To get a good overview of things I installed phpMyAdmin.
Then it went wrong.
So now I just can't install this mysql.so file from anywhere.
And that is what i need!
 
Old 12-13-2007, 02:19 PM   #6
Acron_0248
Member
 
Registered: Feb 2006
Location: Venezuela
Distribution: Gentoo
Posts: 453

Rep: Reputation: 33
And I understand your point, but your system is telling that already have installed php-mysl, which is the package which install mysql.so, so, in theory, that library should have been installed, but assuming that actually locate's result is correct, then here are some options:

Since the php installed in your systems is newer that the one listed in your repos, you could deinstall php, then, install it using the centosplus repo.

Other option will be, download the php-mysql and install it using for instance

Code:
rpm -ivh --nodeps php-mysql-5.1.6-3.el4s1.8.i386.rpm
But this could generate incompatibility problems, so, it is up to you.




Regards

Last edited by Acron_0248; 12-13-2007 at 05:32 PM.
 
Old 12-13-2007, 03:27 PM   #7
milkteeth
LQ Newbie
 
Registered: Dec 2007
Posts: 11

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Acron_0248 View Post
And I understand your point, but your system is telling that already have installed php-mysl, which is the package which install mysql.so, so, in teory, that library should have been installed, but assuming that actually locate's result is correct, then here are some options:

Since the php installed in your systems is newer that the one listed in your repos, you could deinstall php, then, install it using the centosplus repo.

Other option will be, download the php-mysql and install it using for instance

Code:
rpm -ivh --nodeps php-mysql-5.1.6-3.el4s1.8.i386.rpm
But this could generate incompatibility problems, so, it is up to you.




Regards
Thanks a lot Acron!
I think I will reinstall PHP.
Thankyou very much for your help!
 
Old 12-13-2007, 05:34 PM   #8
Acron_0248
Member
 
Registered: Feb 2006
Location: Venezuela
Distribution: Gentoo
Posts: 453

Rep: Reputation: 33
No problem, let us know if there are any problems reinstalling php, if you decide to do that.



Regards
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
mysql works from command line, but mysql.sock (13) error from php.. leif_84 Linux - Server 0 07-23-2007 12:59 PM
php/mysql installation saifurab Linux - Server 2 07-03-2007 08:10 AM
Installation of PHP 5.1.4 and MySQL 5.0.21 anjanesh Linux - Software 6 05-26-2006 04:58 AM
php4 mysql, installation, php-pages with mysql info stay empty dnla Linux - Software 2 03-14-2004 02:54 PM
php and mysql installation siphi Linux - Newbie 9 11-02-2003 09:26 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 01:26 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration