LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 08-05-2010, 05:59 PM   #1
kapshure
LQ Newbie
 
Registered: Mar 2010
Posts: 29

Rep: Reputation: 1
PHP 5.1.6 & MySQL 5.0.34 connectivity test, php-mysql & libmysqlclient_15


Part of a larger project that I have, one task is to test PHP connectivity to MySQL, but I've currently been given the requirement of certain legacy binary versions - otherwise I would just YUM this and be done with it. However, I've been rolling everything via RPM's - now the problem:

This is on CentOS 5.5 x86_64, PHP 5.1.6, and MySQL 5.0.34

I have a mysqltest.php file:

Code:
<?php
$dbhost = 'localhost';
$dbuser = 'root';
$dbpass = 'mydb;

$conn = mysql_connect($dbhost, $dbuser, $dbpass) or die                      ('Error connecting to mysql');

$dbname = 'mydb';
mysql_select_db($dbname);
?>
so I execute the test file, and I get the following error

Code:
[root@CentOS5 html]# php mysqltest.php 
PHP Fatal error:  Call to undefined function mysql_connect() in
/var/www/html/mysqltest.php on line 6
Some research shows me that I need php-mysql installed. Except when I try to yum this, I get:

Code:
Resolving Dependencies
--> Running transaction check
---> Package php-mysql.x86_64 0:5.1.6-27.el5 set to be updated
--> Processing Dependency: libmysqlclient.so.15(libmysqlclient_15)(64bit) for package: php-mysql
--> Processing Dependency: libmysqlclient.so.15()(64bit) for package: php-mysql
--> Running transaction check
---> Package mysql.x86_64 0:5.0.77-4.el5_5.3 set to be updated
--> Processing Conflict: mysql conflicts MySQL
--> Finished Dependency Resolution
mysql-5.0.77-4.el5_5.3.x86_64 from updates has depsolving problems
  --> mysql conflicts with MySQL-server-enterprise-gpl
Error: mysql conflicts with MySQL-server-enterprise-gpl
 You could try using --skip-broken to work around the problem
 You could try running: package-cleanup --problems
                        package-cleanup --dupes
                        rpm -Va --nofiles --nodigest
I actually dug around and finally found a copy of php-mysql-5.1.6-1.4.x86_64.rpm, but it's complaining about libmysqlclient.so.15

I thought that this libmysqlclient would be handled by this package: MySQL-devel-enterprise-gpl-5.0.34-0.rhel4.x86_64.rpm - even though I ran "rpm -ivh" on it, and it showed 100% completion.. when I run "rpm -ql MySQL-devel-enterprise-gpl-5.0.34-0.rhel4.x86_64.rpm" it says its not installed.

there are some copies of libmysqlclient.so.15 on Rpm.Pbone - but they are for OpenSuse and Mandriva - nothing for FC, RHEL, CentOS, etc

Do I just need to keep sleuthing through the interwebs till I find this, or is there a better way to skin this cat?

[EDIT]:

I did a "yum whatprovides libmysqlclient.so.15" and am just pointed to the mysql-5.0.77 installs

[EDIT#2]:

I did find a copy of libmysqlclient.so.15, downloaded, moved to /usr/lib64 - but running "rpm -ivh php-mysql-5.1.6" still produces same missing dependency. This is probably super noob - but how do I force it to see this?
Thanks in advance

other info:

Installed Packages
php.x86_64 5.1.6-27.el5 installed
php-cli.x86_64 5.1.6-27.el5 installed
php-common.x86_64 5.1.6-27.el5 installed
php-devel.x86_64 5.1.6-27.el5 installed
php-pdo.x86_64 5.1.6-27.el5 installed
php-pear.noarch 1:1.4.9-6.el5 installed
php-pgsql.x86_64 5.1.6-27.el5 installed


MySQL-client-enterprise-gpl.x86_64 5.0.34-0.rhel4 installed
MySQL-devel-enterprise-gpl.x86_64 5.0.34-0.rhel4 installed
MySQL-server-enterprise-gpl.x86_64 5.0.34-0.rhel4 installed

Last edited by kapshure; 08-05-2010 at 06:42 PM.
 
Old 08-05-2010, 08:11 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,004
Blog Entries: 11

Rep: Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903
Not sure which route you should go down... you can't force yum (rpm)
to see a file you manually copied - it uses its database.

You could try a forced install of the old packages and HOPE it
all works (man rpm, /force /-no-deps)

You could build mysql & php from source, and install those
in different directories from the distro provided ones.


Personally I'd choose the source builds.


Cheers,
Tink
 
  


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
Slackware guide for AMP Apache MySQL & PHP xushi Slackware 35 05-11-2006 12:18 PM
PHP & MySQL Count on PHP Gerardoj Programming 1 06-01-2004 11:43 AM
From RedHat9 to FreeBSD (Apache 2 & Mysql & PHP 4) guardian653 *BSD 5 12-11-2003 06:31 PM
Apache & PHP & Mysql thomas050682 Linux - Networking 5 03-03-2003 04:21 PM
Apache & Php & MySql te_conway Linux - Software 2 12-21-2001 05:06 PM


All times are GMT -5. The time now is 11:42 PM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration