LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   php and mysql (https://www.linuxquestions.org/questions/linux-newbie-8/php-and-mysql-730963/)

jtworley82 06-05-2009 12:54 PM

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)

jamescondron 06-05-2009 12:57 PM

You almost got it there, try the locate command

custangro 06-05-2009 01:31 PM

Quote:

Originally Posted by jtworley82 (Post 3564422)
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

jtworley82 06-08-2009 11:08 AM

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.

custangro 06-08-2009 01:32 PM

Quote:

Originally Posted by jtworley82 (Post 3566974)
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?

jtworley82 06-09-2009 11:51 AM

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.

custangro 06-09-2009 01:13 PM

Quote:

Originally Posted by jtworley82 (Post 3568149)
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

jtworley82 06-09-2009 03:46 PM

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.

TB0ne 06-09-2009 03:56 PM

Quote:

Originally Posted by jtworley82 (Post 3568382)
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.

jtworley82 06-09-2009 04:36 PM

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.

custangro 06-09-2009 04:58 PM

Quote:

Originally Posted by jtworley82 (Post 3568382)
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

chrism01 06-09-2009 05:54 PM

... 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.

TB0ne 06-09-2009 09:18 PM

Quote:

Originally Posted by jtworley82 (Post 3568445)
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????

jtworley82 06-10-2009 09:17 AM

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.

custangro 06-10-2009 09:49 AM

Quote:

Originally Posted by jtworley82 (Post 3569209)
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


All times are GMT -5. The time now is 03:25 PM.