LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-08-2002, 10:15 PM   #1
rosko
Member
 
Registered: Sep 2002
Distribution: RH8
Posts: 93

Rep: Reputation: 15
Cannot get PHP working on RH8


I installed RH8 and like another post I saw, by default the PHP install does NOT include MySQL support. I try to use phpmyadmin and it tells me I don't have the mysql extensions installed. As this is the most rediculous thing I have seen yet on dealing with linux, I cannot get it to work on reinstall.

Steps I have taken:

Uninstalled the default PHP rpm from RH

downloaded the tar file from php.net

Followed the instructions on php.net of how to install, using --mysql support.

10. ./configure --with-mysql
11. make
12. make install

If you decide to change your configure options after installation
you only need to repeat the last three steps. You only need to
restart apache for the new module to take effect. A recompile of
Apache is not needed.

13. cp php.ini-dist /usr/local/lib/php.ini

You can edit your .ini file to set PHP options. If
you prefer this file in another location, use
--with-config-file-path=/path in step 10.

14. Edit your httpd.conf or srm.conf file and check that these lines are
present and not commented out:

AddType application/x-httpd-php .php

LoadModule php4_module libexec/libphp4.so


After I get done, I add the lines to the httpd file that the PHP install instructions tell you to add....but I don't have the file they say I should have (libphp4.so). I have no idea what to do and frankly I'm getting sick of it. I have searched the system drive for that file and it doesn't even find it. I know it's my "inexperience" but this shouldn't be so f@#$ing hard to install. Sorry for the frustration, but shit like this should be a breeze to install and work with. I thought it had been around long enough so I wouldn't have to jump through hoops....I guess not.

Please help if you have time.
 
Old 12-08-2002, 11:30 PM   #2
rosko
Member
 
Registered: Sep 2002
Distribution: RH8
Posts: 93

Original Poster
Rep: Reputation: 15
I got it working finally. I found a src rpm on my redhat CD's and used that, it finally works. Why in the world would Redhat not use Mysql by default in the php install????


Just curious.
 
Old 12-09-2002, 08:39 PM   #3
huxtablejones
LQ Newbie
 
Registered: Dec 2002
Posts: 12

Rep: Reputation: 0
good question...I suppose for the same reasons they don't allow cgi files in the default cgi-bin directory to be executed without a recompile of suexec and apache.

*is beginning to think a BSD OS wouldn't be so bad, after all*

 
Old 12-26-2002, 09:11 AM   #4
frummel
LQ Newbie
 
Registered: Dec 2002
Posts: 1

Rep: Reputation: 0
I have the same problem here

I have the same problem on my server.
I cannot get PHP to work with MySQL. I know I have to recompile, but does that mean I have to reinstall PHP??

I only want to set --with-mysql to the right path.

How can I do this without reinstalling PHP?
 
Old 12-26-2002, 10:10 AM   #5
rosko
Member
 
Registered: Sep 2002
Distribution: RH8
Posts: 93

Original Poster
Rep: Reputation: 15
Actually, just go to CD3 on your Redhat CD's and install the rpm called php-mysql. After you install that you are good to go.

Have fun .
 
Old 12-26-2002, 07:21 PM   #6
wdingus
Member
 
Registered: Aug 2001
Location: Kingsport, TN
Distribution: RHEL & FC
Posts: 267

Rep: Reputation: 30
Here are the packages installed on RH 8.0 with an *everything* install:

[root]# rpm -qa | grep -i http
httpd-manual-2.0.40-11
redhat-config-httpd-1.0.1-13
httpd-2.0.40-11
httpd-devel-2.0.40-11
libghttp-devel-1.0.9-5
libghttp-1.0.9-5

[root]# rpm -qa | grep -i php
php-dbg-client-2.10-6
php-pgsql-4.2.2-8.0.5
php-4.2.2-8.0.5
asp2php-0.76.2-3
php-dbg-server-2.10pl3-6
php-manual-4.2.2-8.0.5
php-snmp-4.2.2-8.0.5
php-imap-4.2.2-8.0.5
asp2php-gtk-0.76.2-3
php-dbg-base-2.10-4
php-mysql-4.2.2-8.0.5
php-ldap-4.2.2-8.0.5
php-odbc-4.2.2-8.0.5
php-devel-4.2.2-8.0.5

If that helps anybody...
 
Old 12-26-2002, 09:32 PM   #7
Null
Member
 
Registered: Dec 2002
Distribution: Debian Woody SID
Posts: 52

Rep: Reputation: 15
Personally I'd recommend not using the rpms and building php / mysql / apache from source. But that's just how I do it, everyone has their own preferences.
 
Old 12-26-2002, 09:59 PM   #8
netkepala
Member
 
Registered: Sep 2002
Distribution: Red Hat
Posts: 68

Rep: Reputation: 15
Thumbs up This shld work

Yes I think it's silly that Linux require us to do SO MUCH work before it will work !

Afterall, the PHP and MySQL combination is very common. Imagine
MS asking to recomplie ASP b4 it will work with MS SQL !!

Anyway the easiest way to do it is install the RPM files.

Ensure the following RPM files are installed :-

apache
apache-devel
php-mysql
mysql (duh!)
mysql-devel
mysql-server
 
Old 12-27-2002, 12:06 PM   #9
Null
Member
 
Registered: Dec 2002
Distribution: Debian Woody SID
Posts: 52

Rep: Reputation: 15
Even easier:

Apache:
./configure --enable-module=so --prefix=/where/I/want/it
make
make install

PHP:
./configure --with-mysql --with-apxs=/where/apache/is/bin/apxs
make
make install

Now you have php built using the dynamic module with apache, all that's left is to configure httpd.conf and install mysql if it isn't installed.
 
Old 01-06-2003, 11:47 AM   #10
bawen
LQ Newbie
 
Registered: Dec 2002
Location: Sweden
Distribution: RedHat
Posts: 2

Rep: Reputation: 0
Question Same problem for me as newbie

I have this ... RH8 problem and I have tried to solve but still without any luck. Apache, PHP and MYSQL works fine generally.

I did not have the php-mysql installed so I installed that, still not working. What is this small (38kb) php-mysql package?

Do I have to rebuild as someone suggested?

I do not have

apache-devel
mysql-devel

do I really need them? Why?

I would like it simple with just RPM's if possible.
 
Old 01-06-2003, 12:52 PM   #11
bawen
LQ Newbie
 
Registered: Dec 2002
Location: Sweden
Distribution: RedHat
Posts: 2

Rep: Reputation: 0
I added to my standard RH8

httpd-devel
mysql-devel
php-mysql

and edited PHP.INI to load mysql.so

and now it works, thanks all!
 
  


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
Wrong date shown using RH8.0 with php edhan Linux - General 0 10-23-2003 10:45 PM
whats the problem with rh8 and apache2/php? bigswifty75 Linux - Newbie 8 07-03-2003 03:47 AM
Crypt in PHP and RH8 not working correctly. sschueller Linux - Software 0 03-06-2003 05:10 PM
apache, mysql php Rh8.0 wldkos Linux - Software 11 03-02-2003 03:19 AM
RH8/Apache - PHP installed but not enabled(?) bkeating Linux - Software 3 12-05-2002 12:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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