Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Software
User Name
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.


  Search this Thread
Old 04-30-2003, 04:45 PM   #1
LQ Newbie
Registered: Sep 2002
Distribution: Redhat 7.2
Posts: 23

Rep: Reputation: 15
php or apache config problem

I'm using RH 7.3 and just installed PHP 4.1.2 via the rpms on the 7.3 distro cds. I've had apche (1.3.23) installed, also from the distro cds, and that has worked as a test bed server. Now, even with php installed, the two simple php files I've tried have displayed the source files.

It didn't work from the get-go so I started hacking at the httpd.conf. Essentially all I did was remove the ifdefined directives around the php lines. Here is what is in my httpd.conf file now:

#<IfDefine HAVE_PHP4>
LoadModule php4_module modules/

#<IfDefine HAVE_PHP4>
AddModule mod_php4.c

# These types cause httpd to let the PHP interpreter handle files with
<IfModule mod_php4.c>
AddType application/x-httpd-php .php .php4 .php3 .phtml
AddType application/x-httpd-php-source .phps

I've checked that exists though I do not know if it is getting loaded when apache restarts. Anyone have any ideas?

In the PHP manual it also has references for loading perl modules in the httpd snipets. I'm not sure if missing perl pieces could be causing the problems. Also in the PHP manual, it only covers building apache and php from scratch. I could do that, but I've found that rpms from the distro are usually a little more straight forward to get working. Do I need to compile both packages to get them to work?

Oh the test php page was just:

<?php phpinfo(); ?>

Thanks - oh I have seen some other questions touching on this, but the popular solutions seems to be reinstalling the o/s. That is not really an option for me.
Old 04-30-2003, 05:36 PM   #2
Registered: Feb 2003
Location: The City by the Bay
Posts: 116

Rep: Reputation: 15
This is why I roll my own - VERY hard to troubleshoot how the RPM-GOD decided to build things out.

You are positive that was built and exists? Are you pointed to the correct location of the php.ini file?

Redhat makes some interesting decisions about which compiler to ship and the like. Caused a bunch of headaches with MySQL.

I would personally recommend either using pre-built binaries or rolling your own - axps is your friend Personal preference.
Old 04-30-2003, 06:25 PM   #3
Senior Member
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
I have to agree...rpms are ok to a point, but I find with apache/php and the like, that it is very wise to build from source if you want any sort of customization and configurability. Ive also found that Redhat in particular makes the installation of apache/php from rpms needlessly complex, as far as the .conf files are concerned.

There are a thousand good guides and tutorials for building these from source out there.

PS: anyone who tells you to reinstall Linux because of some apache troubles should be ignored forevermore...that's a windows solution.

Last edited by bulliver; 04-30-2003 at 06:29 PM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
apache config files and php waynejkruse10 Linux - Software 8 12-05-2006 09:40 PM
Apache config for PHP (not working) Thanotos Slackware 2 11-30-2005 12:52 AM
help with apache php mysql config slinky2004 Linux - General 3 03-22-2005 07:36 PM
PHP and Apache -- Config question j0217995 Slackware 4 11-05-2004 10:09 AM
Apache / PHP / Mysql config problem - debian bandit Linux - Software 14 09-03-2003 09:04 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:27 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration