LinuxQuestions.org
Review your favorite Linux distribution.
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 06-17-2005, 01:09 PM   #1
Mogatu
LQ Newbie
 
Registered: Jun 2005
Posts: 2

Rep: Reputation: 0
Apache and PHP5


Here's the skinny:

I have just upgraded my Fedora Core3 box to Fedora Core 4 (I wanted php5, and being a kinda newbie and after having a lot of problems trying to install it, I just decided to upgrade fedora since it had the new version pre-installed). The upgrade went smoothly, but php5 does not seem to be working. I know that Apache is up and running AND that it says the php5 module is loaded. I found this out by trying to add the line

LoadModule php5_module /usr/lib/httpd/modules/libphp5.so

to the httpd.conf and upon doing so, got a warning saying the php5 module was already loaded. Yet, when I load a page with php content (LogIn.php for example), it dumps the code to the browser instead of executing it.

I can run php from the command line and get correct ouput, for example ?>php ./LogIn.php

What am I doing wrong, I am guessing it is a problem with my apache configuration

Info:
Server version: Apache/2.0.54

PHP 5.0.4 (cli) (built: May 9 2005 11:21:11)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v2.0.4-dev, Copyright (c) 1998-2004 Zend Technologies
 
Old 06-17-2005, 02:09 PM   #2
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
Check that the Directory Index section in your httpd.conf has index.php as one of the listed indexes. If not add it to the list.
 
Old 06-17-2005, 03:20 PM   #3
Mogatu
LQ Newbie
 
Registered: Jun 2005
Posts: 2

Original Poster
Rep: Reputation: 0
I actually just found the source of the problem. When I upgraded to Core 4, it generated a new configuration file for apache (httpd.conf.rpm...something). I am not sure if it was Fedora or if it was Apache that generated this file, but It was this new config file that apache needed to work correctly. I guess it doesn't replace httpd.conf so as not to hose your old config settings. Anywho, I renamed httpd.conf.rpm... to httpd.conf and things started working again.

Thanks for your input, checking the webroot was a good idea that hadn't thought of ^_^
 
Old 06-17-2005, 03:43 PM   #4
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
Thats the way rpm is deigned, it does not overwrite most config files by default. I should have thought of that since you said you did an upgrade.
 
  


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
Apache and PHP5 Problem (FC4) jjwl89 Linux - Software 5 06-07-2007 08:59 PM
PHP5 & HTTPD (apache) on Fedora Core 4 fatum112 Linux - Software 4 12-02-2005 05:44 PM
help installing PHP5 for Apache blizunt7 Fedora 6 11-03-2005 10:59 AM
Problems configuring apache for php5 Besnell Mandriva 3 12-28-2004 09:01 AM
installing PHP4 and PHP5 on apache jerry_redhat Linux - Software 2 07-08-2003 10:27 PM

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

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