LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 06-26-2006, 01:00 PM   #1
RestInPieces
Member
 
Registered: Aug 2004
Location: In front of a CRT monitor
Distribution: Slackware-current
Posts: 108

Rep: Reputation: 15
Question Apache2 and php5 not working


Hey everybody,
I've recently bought a 1and1 server and re-imaged it with FC 4 and plesk 8.
I've recently seen that php scripts don't execute.. they just popup to be downloaded (firefox) or show blank page (IE)
I've tried to correct that by adding the correct mime types but with no joy. I just figured out that..if I can't really find the problem I'll just dezinstall all myslq, php and apache files and reinstall from scratch using tarballs.. but here's the problem... 1and1 does not provide the license key for plesk so If I allow for it to be dezinstalled (it requires the php rpm) I won't be able to use it.
What puzzles me is that plesk uses .php3 extensions and still it can operate.. while on my vhost php doesn't work...
Cheers
 
Old 06-27-2006, 06:23 AM   #2
dimsh
Member
 
Registered: Aug 2005
Distribution: Debian, Ubuntu, Fedora
Posts: 74

Rep: Reputation: 15
hi,

for apache to handle php files, 3 lines are required:

This one in the main server configuration block, as the
LoadModule dorective only apply to server config context:
Quote:
LoadModule php5_module /usr/lib/apache2-extramodules/libphp5.so
of cource type the right path to libphp5.so.


and these 2 line could be added to server configuration context or to a virtual host config context:

Quote:
AddHandler php5-script .php
AddType text/html .php



make sure those apache directives applied to your apache configuration, no need for reinstalling I think, also your pleask will become non consistent when you do so.

Last edited by dimsh; 06-27-2006 at 06:25 AM.
 
Old 06-27-2006, 06:27 PM   #3
LLS
Member
 
Registered: Sep 2003
Location: North America
Distribution: FC6 FC7 F8
Posts: 75

Rep: Reputation: 15
Off of another forum may apply to you--
I figured it out. Apparently, the apache conf plesk generates turns php off globally, and then turns on for each virtual host in a "IfModule sapi_apache2.c" block. And sapi_apache2 isn't available in apache 2.2 any more - not in the build I got through yum anyway. So for now, I just commented out the IfModule lines, and php is back on!
 
  


Reply

Tags
apache2, php5



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
php5 not working on apache2 akp913 Debian 1 06-26-2006 03:28 AM
SLES9/apache2 and PHP5 scabrous1 SUSE / openSUSE 1 12-15-2005 05:14 AM
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

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

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

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