LinuxQuestions.org
Review your favorite Linux distribution.
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 11-24-2008, 03:15 PM   #1
wassimdarwich
LQ Newbie
 
Registered: Nov 2008
Posts: 5

Rep: Reputation: 0
Apache and php issue


Hi:
Iam using fedora 5 as a hosted server with apache 2 and php 5, and when iam opening the webpage and point the browser to a php file it doesnt read php and this error displayed:
<?php
include ("../lib/defines.php");
include ("../lib/smarty.php");

$smarty->assign("error", $_GET["error"]);

$smarty->display('index.tpl');

?>
can any one help me with this.

Last edited by wassimdarwich; 11-25-2008 at 02:14 AM.
 
Old 11-25-2008, 08:56 PM   #2
salter
Member
 
Registered: Oct 2008
Posts: 100

Rep: Reputation: 15
The displayed content is not an error, but the exact script as requested in the URL. The problem is that the script should have been executed, and not displayed as a text file.

Either PHP is not installed for Apache (not very likely, though) or Apache needs to be restarted for some reason by running as root:
# /etc/init.d httpd restart

Can also be a configuration problem in httpd.conf by not having the .php extension associated with php.

A strange situation actually, because Apache and PHP usually run out of the box on Fedora.

Linux Archive

Last edited by salter; 12-20-2008 at 12:05 PM.
 
  


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
issue with starting Apache after php recompile lightpace Fedora 2 10-12-2007 04:26 PM
Ldap php Apache on Windows Issue rajnair0278 Linux - Networking 0 11-03-2006 01:13 AM
Very confused over Apache / PHP issue stokes Slackware 6 02-05-2006 09:32 AM
PHP & Apache Issue? Plz help! wh33t Programming 1 10-01-2005 05:17 AM
pear issue with Apache 2 and PHP Jediman Mandriva 0 04-19-2005 12:31 PM

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

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