LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 04-24-2006, 08:49 AM   #1
stinky_tofu
LQ Newbie
 
Registered: Dec 2005
Posts: 9

Rep: Reputation: 0
PHP5 and Apache2 on RedHat 9 woes!


I am trying to install PHP5 on Apache2. The machine is running RedHat 9 and already has the following software configured and installed:

- Apache 2.0.40
- PHP 4.2.2
- MySQL 5.0.19

After downloading the PHP5 source and extracting it onto the server, I ran ./configure as follows:

./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/var/lib/mysql --with-regex=php --with-pear=/usr/local/php/lib/PEAR --with-iconv-dir=/usr/local/php/lib/iconv --enable-mbstring --enable-gd-native-ttf --with-gd --without-pspell --with-zlib-dir --with-jpeg-dirMust

After running make, make install, PHP5 installed with no problems.

Then I added the following lines into the httpd.conf file:

LoadModule php5_module modules/libphp5.so

AddType application/x-httpd-php .php .phtml
AddType application/x-httpd-php-source .phps

After which, PHP and Apache2 should be configured correctly. However, when I run:

httpd -k start

I receive the following error:
httpd: module "/usr/local/php/sapi/apache2handler/mod_php5.c" is not compatible with this version of Apache.
Please contact the vendor for the correct version.

I've searched high and low on the Internet, but can't seem to find any solutions to this problem.

Anybody have any idea what could be wrong? Could there be a conflict between php4 and php5? I already checked and made sure that there are no references made to php4 in the httpd.conf file. Is there anything else I need to change to make sure php4 is not running and causing a problem with PHP5? At this point, I'm really not sure why PHP5 is not working, conflict with php4 is my best guess at this point.

Please help!

Last edited by stinky_tofu; 04-24-2006 at 08:56 AM.
 
Old 04-24-2006, 09:05 AM   #2
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
http://dan.drydog.com/apache2php.html
http://www.howtoforge.com/taxonomy_menu/1/3

did you remember to disable the old version of apache?
 
Old 04-24-2006, 02:48 PM   #3
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,192
Blog Entries: 4

Rep: Reputation: 475Reputation: 475Reputation: 475Reputation: 475Reputation: 475
Moved: This thread is more suitable in Red Hat and has been moved accordingly to help your thread/question get the exposure it deserves.
 
  


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
Apache2 + php5 won't load mustangfanatic Slackware 9 04-19-2006 12:45 PM
Apache2 and PHP5 SpiderIRE Linux - Software 3 09-30-2005 03:25 PM
Apache2 and PHP5 rul3r Slackware 7 09-11-2005 05:21 PM
Apache2 + PHP5.0.3 24jedi *BSD 1 07-21-2005 03:07 PM
Apache2 with PHP5 on Fedora C2 cdrobsonjr Linux - Software 5 09-13-2004 05:06 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

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