LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 05-24-2005, 09:11 AM   #1
60s TV Batman
Member
 
Registered: Oct 2004
Location: London (UK)
Distribution: Ubuntu 12.04
Posts: 60

Rep: Reputation: 17
Php isn't working in HTML


I have Fedora 3 with Apache 2.0 installed and working on my Linux box. This box displays a test HTML page that includes php tags with a simple print statement inside them.

The HTML page displays just fine, both locally and externally over the Internet. It's clear that Apache is working.

The php tags and print command are downloaded (i.e. they're viewable in the source code in a browser), instead of being interpreted.

Running "rpm --query php" as root confirms that php-4.3.9-3 is installed. I don't know how to find out whether or not it's actually running, or how to get it working.

Does anyone know how to get php working correctly?

NOTE: phpinfo() displays nothing either.

Last edited by 60s TV Batman; 05-24-2005 at 09:13 AM.
 
Old 05-24-2005, 09:16 AM   #2
akilles
Member
 
Registered: Sep 2004
Location: Vestfold, Norway
Distribution: Slackware
Posts: 139

Rep: Reputation: 15
well, first of all do a google search for:
Linux Apache 2.0 PHP HOWTO

This will most likely tell you everything you need to know.
(A quick search gave this link):
http://www.google.com/url?sa=U&start...p.html&e=10313

-Geir
 
Old 05-24-2005, 09:35 AM   #3
60s TV Batman
Member
 
Registered: Oct 2004
Location: London (UK)
Distribution: Ubuntu 12.04
Posts: 60

Original Poster
Rep: Reputation: 17
Quote:
Originally posted by akilles
well, first of all do a google search for:
Linux Apache 2.0 PHP HOWTO

This will most likely tell you everything you need to know.
(A quick search gave this link):
http://www.google.com/url?sa=U&start...p.html&e=10313

-Geir
Thanks for your reply. I've read the page, made a few changes to httpd.conf, and it's now working.

However, I suspect the actual problem was much simpler (and a silly user error). I realized, while reading through the page you referred me to, that the file was still called index.html. Of course, HTML files with php in them need a .php extension rather than .html.

Sure enough, it started working as soon as I renamed the file.

This is more than a little embarrassing, as I now have 11 months of php programming behind me!

Last edited by 60s TV Batman; 05-24-2005 at 09:38 AM.
 
  


Reply


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
html into php charnel Programming 7 08-30-2005 11:47 AM
php in html code blizunt7 Programming 5 06-15-2005 02:08 PM
html to php? help me please!!!!! trscookie Programming 4 01-24-2005 07:36 AM
HTML Tidy and PHP 4 atom Programming 0 10-01-2004 11:06 AM
Simple php script with html form not working. sinsoush Programming 4 04-01-2004 09:02 PM

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

All times are GMT -5. The time now is 06:50 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration