LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 09-02-2010, 07:19 AM   #1
thegerm
LQ Newbie
 
Registered: May 2007
Location: Melbourne, Australia
Posts: 12

Rep: Reputation: 0
Apache not parsing PHP on Ubuntu 8.04


Hi,
I have a new setup of 8.04 with Apache2, MSQL5 and PHP5.
However, I can't get the PHP to run. It is NOT the common problem of the browser offering to download the files. In my case I have some PHP in an HTML file, but the PHP is just ignored.

I have played around with my httpd.conf and also php5.conf files, but I couldn't make any difference.

My httpd.conf sets the document root to /var/www and if I put a php file in here with command phpinfo(), then it seems to dispay correctly. My HTML files are /var/www/app/index.html

Anybody have any ideas where I can look, to see what's going on?

Thanks for any help

The Germ
 
Old 09-02-2010, 07:44 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Hi,

If you want to parse php code from a html page, then you have to add the .html extension in the AddType directive for php, so it looks like this:
Code:
AddType application/x-httpd-php .php .html
 
Old 09-03-2010, 04:25 AM   #3
thegerm
LQ Newbie
 
Registered: May 2007
Location: Melbourne, Australia
Posts: 12

Original Poster
Rep: Reputation: 0
Thank you so much Bathory. I was it was something like that but just couldn't get it.

Of course that chnage got me as far as discovering that my php mysql user was not defined in my data base, but that's another story. Everything is working well now.

Thanks again,

..The Germ
 
  


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 not parsing php pages! bagfull Fedora 2 02-19-2010 06:05 AM
apache and php problem in ubuntu 9.04 manugupt1 Linux - Newbie 1 08-02-2009 02:19 PM
Apache parsing css files for php scripting. dickohead Programming 1 09-14-2006 04:40 AM
Parsing PHP Scripts using Apache in SuSe 9.3 (without a dedicated server) elliotfuller SUSE / openSUSE 7 07-27-2005 11:40 AM
Apache-ssl not correctly parsing php files jme Linux - Software 2 05-03-2005 12:04 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

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