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 11-27-2012, 11:01 AM   #16
deswarf
LQ Newbie
 
Registered: Jan 2012
Posts: 26

Rep: Reputation: Disabled

Nothing to thank for yet.
MySQL 5.5.9?
I still suppose that problem is in versions incompatible or installation errors not in the config files. Selinux,theoretically, shouldn't affect that.
How about paths, did your php know where to find mysql directory while installation? Is php client installed,php5-common?

Last edited by deswarf; 11-27-2012 at 11:20 AM.
 
Old 11-27-2012, 11:18 AM   #17
cheddarcheese
Member
 
Registered: Aug 2011
Location: Massachusetts, USA
Distribution: Fedora; Centos; Puppy
Posts: 82

Original Poster
Rep: Reputation: 5
MySQL 5.5.9 ... Hmmm, not saying that you couldn't be right, or that it's not a good idea to upgrade it anyway, but it's on a live DB server, so would prefer to upgrade MySQL as a last resort really, if possible.

PHP has been on the machine for ages, (probably came with the installation), and MySQL has also been on there forever. The only new thing I've done is to install php-mysql, and it installed without any problem at all. Also, from the command line (see an earlier post) php -i does actually find MySQL, and says that it's all okey-dokey. ("MySQL Support => enabled").

Maybe it would be easier to uninstall PHP and then re-install it with MySQL support in the first instance .... or would that be a pain?
 
Old 11-27-2012, 11:51 AM   #18
deswarf
LQ Newbie
 
Registered: Jan 2012
Posts: 26

Rep: Reputation: Disabled
Quote:
Maybe it would be easier to uninstall PHP and then re-install it with MySQL support in the first instance .... or would that be a pain?
Or maybe install -f can find some needed packages that is not installed now...
But could be you right... Maybe then there is a reason to --purge them and then install
libapr1 libaprutil1 libdbd-mysql-perl libdbi-perl libnet-daemon-perl libplrpc-perl libpq5 php5-common php5-mysql
libapache2-mod-php5 (just named all the stuff I remembered that could be useful) if some of them is not installed.
 
Old 11-27-2012, 12:30 PM   #19
cheddarcheese
Member
 
Registered: Aug 2011
Location: Massachusetts, USA
Distribution: Fedora; Centos; Puppy
Posts: 82

Original Poster
Rep: Reputation: 5
Well, I just tried a yum update on PHP, but there was nothing to do.

Maybe I should rephrase the question another way:

If "php -i" from the command line shows that PHP recognizes MySQL as being available - i.e. ("MySQL Support => enabled") - then what would prevent PHP from recognizing MySQL when it's run under Apache?

Thanks!
 
Old 11-27-2012, 12:42 PM   #20
deswarf
LQ Newbie
 
Registered: Jan 2012
Posts: 26

Rep: Reputation: Disabled
Maybe then rather not php but apache itself does not recognize mysql?
BTW here is an extract from man:
Quote:
Fatal error: Call to unsupported or undefined function mysql_connect() in ...: This means that your PHP version isn't compiled with MySQL support. You can either compile a dynamic MySQL module and load it into PHP or recompile PHP with built-in MySQL support. This process is described in detail in the PHP manual.
Try
Quote:
--with-mysql[=DIR]
key.
http://php.net/manual/en/mysql.installation.php

Last edited by deswarf; 11-27-2012 at 12:46 PM.
 
Old 11-27-2012, 12:54 PM   #21
cheddarcheese
Member
 
Registered: Aug 2011
Location: Massachusetts, USA
Distribution: Fedora; Centos; Puppy
Posts: 82

Original Poster
Rep: Reputation: 5
Well, I know Apache/Perl works okay with MySQL, so I'm mystified why PHP doesn't, given I've already installed php-mysql, but I guess I'll take a look at recompiling PHP with MySQL support if I can't figure out anything else.

Thanks for the info!
 
Old 11-27-2012, 01:40 PM   #22
deswarf
LQ Newbie
 
Registered: Jan 2012
Posts: 26

Rep: Reputation: Disabled
Quote:
Originally Posted by cheddarcheese View Post
Well, I know Apache/Perl works okay with MySQL, so I'm mystified why PHP doesn't, given I've already installed php-mysql
You wrote that php had been there for a long time, but it could have not been installed as apache module, as far as I understood...
You're welcome.
 
  


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
apache, php, mysql on linux MrSako Linux - Newbie 62 08-02-2006 02:46 AM
Linux + Apache + PHP + ??MySQL/PostgreSQL?? Thakowbbery Linux - Enterprise 4 10-28-2005 03:18 PM
Linux, Apache, PHP, MySQL akilles Linux - Newbie 4 03-02-2005 02:43 AM
Apache Mysql Php: mysql with php doesn't work breakerfall Linux - Networking 6 12-27-2003 08:59 PM
VMWare, RH Linux 7.3, Apache, MySQL and PHP xibernex Linux - Software 2 06-17-2002 09:57 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:00 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration