Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 02-12-2006, 03:30 AM   #1
Registered: Apr 2005
Distribution: Red Hat / Fedora / CentOS
Posts: 508

Rep: Reputation: 30
php code exposed on browser

hi guys,

recentlyi have a web server that went down. so after restoring the OS etc... I uploaded back the scripts.

To my horror I realise scripts running off it.. the php codes are exposed. meaning to say, instead of the web page, or just static html, it is show the php code on viewing.

What am I missing,done wrong, screwed up here?
Old 02-12-2006, 03:41 AM   #2
LQ Guru
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
Do you have the following lines in various sections of your httpd.conf?
LoadModule php5_module modules/ (If you use php4 its

AddType application/x-httpd-php .php

DirectoryIndex index.html index.php
Old 02-12-2006, 07:01 AM   #3
Registered: Sep 2003
Location: Bulgaria
Distribution: Ubuntu 9.10, FreeBSD 7.2
Posts: 459

Rep: Reputation: 31
Do the scripts are executable?
chmod +x script.php


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
merge ASP code with PHP code.. possible ?? ALInux Programming 7 12-30-2005 08:40 AM
browser displaying localhost pages in code howarddevore Ubuntu 4 07-31-2005 08:14 AM
local user name and password exposed hagen00 Linux - Security 3 05-17-2005 10:57 AM
Linux exposed... haha audibel General 7 03-07-2005 02:43 PM
error exposed for a sec after I run startx dufferin Slackware 2 02-29-2004 09:49 PM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 08:26 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration