LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 06-05-2009, 12:54 PM   #1
jtworley82
LQ Newbie
 
Registered: May 2009
Posts: 17

Rep: Reputation: 0
php and mysql


I installed Redhat Enterprise Linux 5.3 64 bit, using the install DVD, and selected the PHP and mysql options. Php works, but I am getting a message that PHP is not configured for mysql. I have located instructions to use the configure command --with-mysql = /usr/local/mysql \
Only 2 problems, I can't locate my php directory, from which to run configure, and /usr/local/mysql is not correct either. How can I locate where PHP and Mysql are installed (it's the default location, shouldn't be as difficult as this)
 
Old 06-05-2009, 12:57 PM   #2
jamescondron
Member
 
Registered: Jul 2007
Location: Scunthorpe, UK
Distribution: Ubuntu 8.10; Gentoo; Debian Lenny
Posts: 961

Rep: Reputation: 70
You almost got it there, try the locate command
 
Old 06-05-2009, 01:31 PM   #3
custangro
Senior Member
 
Registered: Nov 2006
Location: California
Distribution: Fedora , CentOS , RHEL
Posts: 1,979
Blog Entries: 1

Rep: Reputation: 209Reputation: 209Reputation: 209
Quote:
Originally Posted by jtworley82 View Post
I installed Redhat Enterprise Linux 5.3 64 bit, using the install DVD, and selected the PHP and mysql options. Php works, but I am getting a message that PHP is not configured for mysql. I have located instructions to use the configure command --with-mysql = /usr/local/mysql \
Only 2 problems, I can't locate my php directory, from which to run configure, and /usr/local/mysql is not correct either. How can I locate where PHP and Mysql are installed (it's the default location, shouldn't be as difficult as this)
Also if you installed php with yum you can install mysql support with...

Code:
yum -y install php-mysql
-C
 
Old 06-08-2009, 11:08 AM   #4
jtworley82
LQ Newbie
 
Registered: May 2009
Posts: 17

Original Poster
Rep: Reputation: 0
half way there

I found Mysql with the locate command, but I can't seem to find PHP. I think I am looking for a directory called php-5.1.6 or something similar, but I don't see anything like that. I have a working info.php config file that shows a lot of info about my install, but I don't see any mention of a php-5.1.6 directory or any place to run a configure command.
 
Old 06-08-2009, 01:32 PM   #5
custangro
Senior Member
 
Registered: Nov 2006
Location: California
Distribution: Fedora , CentOS , RHEL
Posts: 1,979
Blog Entries: 1

Rep: Reputation: 209Reputation: 209Reputation: 209
Quote:
Originally Posted by jtworley82 View Post
I found Mysql with the locate command, but I can't seem to find PHP. I think I am looking for a directory called php-5.1.6 or something similar, but I don't see anything like that. I have a working info.php config file that shows a lot of info about my install, but I don't see any mention of a php-5.1.6 directory or any place to run a configure command.
Have you tried the aforementioned

Code:
yum -y install php-mysql
Command?
 
Old 06-09-2009, 11:51 AM   #6
jtworley82
LQ Newbie
 
Registered: May 2009
Posts: 17

Original Poster
Rep: Reputation: 0
I tried yum

yum doesn't work because I didn't install php with yum, I installed it with the redhat install cd. I am finding it hard to believe that I have installed a pretty popular OS, and a pretty standard piece of software (PHP), in the default location, and there is no way for me to find out where it is installed, or configure it. I just can't believe I have wasted 3 days on something that should be so incredibly simple.
 
Old 06-09-2009, 01:13 PM   #7
custangro
Senior Member
 
Registered: Nov 2006
Location: California
Distribution: Fedora , CentOS , RHEL
Posts: 1,979
Blog Entries: 1

Rep: Reputation: 209Reputation: 209Reputation: 209
Quote:
Originally Posted by jtworley82 View Post
yum doesn't work because I didn't install php with yum, I installed it with the redhat install cd. I am finding it hard to believe that I have installed a pretty popular OS, and a pretty standard piece of software (PHP), in the default location, and there is no way for me to find out where it is installed, or configure it. I just can't believe I have wasted 3 days on something that should be so incredibly simple.
yum is just a frontend for the rpm command; that resolves dependencies for you. The fact that you installed it from the cd dosen't mean anything.

How was php installed? From source? RPM? Have you tried yum? What errors are you getting? Do you have Red Hat support? Maybe you should place a service call...

Also, what are the output of the following?


rpm -qa | grep -i php
rpm -qa | grep -i mysql
updatedb ; locate php
find / -name 'php*' -print
yum -y list |grep -i php


-C
 
Old 06-09-2009, 03:46 PM   #8
jtworley82
LQ Newbie
 
Registered: May 2009
Posts: 17

Original Poster
Rep: Reputation: 0
php is installed

these commands show me that php is indeed installed, which I already know because php works, but once again do not give me any clue as to where it is installed. My original goal was to run ./configure to configure mysql support for php, but i supposedly need to run it from the php-5.1.6 directory that doesn't seem to exist on my machine. All I need to do is to tell php to support mysql, if there is another way to do that, I don't really care where php-5.1.6 is located.
 
Old 06-09-2009, 03:56 PM   #9
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by jtworley82 View Post
these commands show me that php is indeed installed, which I already know because php works, but once again do not give me any clue as to where it is installed. My original goal was to run ./configure to configure mysql support for php, but i supposedly need to run it from the php-5.1.6 directory that doesn't seem to exist on my machine. All I need to do is to tell php to support mysql, if there is another way to do that, I don't really care where php-5.1.6 is located.
It isn't hard, and Google pulls up several thousand documents showing how it's done, including lots from the RedHat knowledgebase (which you have access to, since you paid for an RHEL support contract with your purchase). RHEL phone support can help you too.

You're probably missing the php-mysql module. Try "yum install php-mysql", as has been suggested to you, or download it manually and install it with the rpm command. And if you're concerned with the manually-compiled PHP, why don't you remove it, and install it via yum?

If you do it through the repositories, it'll probably take you about 15 minutes.
 
Old 06-09-2009, 04:36 PM   #10
jtworley82
LQ Newbie
 
Registered: May 2009
Posts: 17

Original Poster
Rep: Reputation: 0
php-mysql

I tried installing php-mysql and it tells me I am missing several dependant packages, including php-common-5.1.6-23.2.el5_3.x86_64.rpm and the only php-common redhat offers on rhn is php-common-5.1.6-23.el5.x86_64.rpm, which I already have installed.
 
Old 06-09-2009, 04:58 PM   #11
custangro
Senior Member
 
Registered: Nov 2006
Location: California
Distribution: Fedora , CentOS , RHEL
Posts: 1,979
Blog Entries: 1

Rep: Reputation: 209Reputation: 209Reputation: 209
Quote:
Originally Posted by jtworley82 View Post
these commands show me that php is indeed installed, which I already know because php works, but once again do not give me any clue as to where it is installed. My original goal was to run ./configure to configure mysql support for php, but i supposedly need to run it from the php-5.1.6 directory that doesn't seem to exist on my machine. All I need to do is to tell php to support mysql, if there is another way to do that, I don't really care where php-5.1.6 is located.
Ok...we can't help if you don't help us...what was the output of the commands? What errors did you get? What do the logs say? What did Red Hat support tell you?

Don't say "I tried that and it didn't work" and not post any of the output; and then expect us to help...because we can't help unless we get some (good) feedback.

also FYI... you don't/can't run the ./configure command if you installed the rpm and judging from what you said so far...you didn't compile php...you installed it from the RPM...in which case yum -y install php-mysql should work unless you have yum problems...in which case the output would be helpful

-C

Last edited by custangro; 06-09-2009 at 05:01 PM.
 
Old 06-09-2009, 05:54 PM   #12
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
... and as pointed out, if you'd used the RH tools, specifically yum, to install it, it would have handled the dependencies for you, that's what its there for.
 
Old 06-09-2009, 09:18 PM   #13
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by jtworley82 View Post
I tried installing php-mysql and it tells me I am missing several dependant packages, including php-common-5.1.6-23.2.el5_3.x86_64.rpm and the only php-common redhat offers on rhn is php-common-5.1.6-23.el5.x86_64.rpm, which I already have installed.
Well, either you install the dependencies, or it won't work. Nothing else to really say about that. If you don't want to install the dependencies, call RedHat for support, or run the commands that others have suggested, what else can we possibly do to help you????
 
Old 06-10-2009, 09:17 AM   #14
jtworley82
LQ Newbie
 
Registered: May 2009
Posts: 17

Original Poster
Rep: Reputation: 0
update

my original post stated that I installed redhat from the cd and I was trying to do a configure command to install mysql support. Now I understand that I need to use the yum command, and ./configure is for advanced users that compile their own packages. I wasted a lot of time going down that road. (although I did learn something) I also figured out that yum wasn't working because I changed my hostname and rhn wasn't recognizing my computer. As soon as I fixed that, yum worked fine. Thank you for your help.
 
Old 06-10-2009, 09:49 AM   #15
custangro
Senior Member
 
Registered: Nov 2006
Location: California
Distribution: Fedora , CentOS , RHEL
Posts: 1,979
Blog Entries: 1

Rep: Reputation: 209Reputation: 209Reputation: 209
Quote:
Originally Posted by jtworley82 View Post
I wasted a lot of time going down that road. (although I did learn something)
If you learned something...then you didn't waste your time

-C
 
  


Reply



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
php/shell script to install mysql,apache and php automatically stranger_6_7 Linux - General 2 08-11-2009 02:07 AM
yum install php-mysql fails with mysql 5.1 - "Error: mysql conflicts with MySQL" rebelde Linux - Software 2 03-13-2009 10:32 AM
Problem getting PHP to recognize MySQL, Using PHP 4.0 and MySQL 4.0.20 d2army Programming 4 06-27-2004 08:54 PM
php4 mysql, installation, php-pages with mysql info stay empty dnla Linux - Software 2 03-14-2004 02:54 PM
Apache Mysql Php: mysql with php doesn't work breakerfall Linux - Networking 6 12-27-2003 08:59 PM

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

All times are GMT -5. The time now is 09:02 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