Fedora Linux Support Community & Resources Center
Old 11th August 2012, 06:32 PM
mickburkejnr Offline
Registered User
Join Date: Jun 2012
Location: Birmingham, UK
Posts: 4
Angry PHP script won't render in browser - just displays the code

Hi all,

I use Fedora 17 on my laptop, and I am trying to do some web development work on it. I have installed Apache, MySQL and PHP on the laptop (following this guide when it comes to what software to install: http://www.howtoforge.com/perfect-server-fedora-10-p5). I can load web pages, but I am unable to load PHP pages properly. All that happens is that the actual code of the of the script is displayed in browser.

I've checked to see if mod_php is installed, and it is. I thought that maybe PHP was turned off globally, but I don't think it is. I must stress actually, that although the guide that I put the link to on this post does talk about turning PHP globally off, I haven't done this. I have just installed the software. But anyway, I have tried to look for the php.conf files in the httpd/conf.d directory, but nothing is there.

I'm quite confused about why it's not working. I remember having a similar issue before, but that was back in 2009, and I haven't experienced this problem since.

Can anyone help?

Many thanks in advance!

Forgot to mention, I have also created a file with <?php phpinfo(); ?> in it, and the browser just renders the code, and no information. PHP is installed, as trying to do a "yum install php" and related packages just says that it's been installed.

Last edited by mickburkejnr; 11th August 2012 at 06:36 PM.
Reply With Quote
Old 11th August 2012, 07:56 PM
Doug G Offline
Registered User
Join Date: Jul 2005
Posts: 803
Re: PHP script won't render in browser - just displays the code

First, if you're using a fedora 10 tutorial it's quite out of date. ispconfig offers tutorials up to fedora 15. I'd use a relatively current setup. Also, it appears the ispconfig folks gave up on Fedora with F15, probably due to all the systemd and network changes made it too big a project to modify their software. Visit the ispconfig documentation page to get a list of all the tutorials they have.

If you're trying to open the php file directly from your browser you'll get the results you describe. You have to serve php pages through a web server using something like http://localhost/myphppage.php
Doug G
Reply With Quote

browser, code, displays, php, render, script

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] php script paths render when javascript not enabled settingsun Servers & Networking 0 28th November 2011 07:19 PM
just formated to SATA drives with FAT16 FS, fdisk -l displays: [code] bash-3.2$ sud manuleka Hardware & Laptops 4 21st May 2009 09:01 PM
Run script right before X starts and displays login locodude Using Fedora 7 1st April 2009 06:16 PM
Script that runs fdisk -l and also displays labels??? Trapper Using Fedora 22 12th January 2009 05:06 PM
php code displays in browser robert.forster Using Fedora 5 16th December 2008 11:21 PM

Current GMT-time: 12:06 (Wednesday, 23-08-2017)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat