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) |
You almost got it there, try the locate command
|
Quote:
Code:
yum -y install php-mysql |
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.
|
Quote:
Code:
yum -y install php-mysql |
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.
|
Quote:
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 |
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.
|
Quote:
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. |
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.
|
Quote:
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 |
... 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.
|
Quote:
|
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.
|
Quote:
-C |
All times are GMT -5. The time now is 03:25 PM. |