LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 02-12-2006, 03:30 AM   #1
Swakoo
Member
 
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
reddazz
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?
Code:
LoadModule php5_module modules/libphp5.so (If you use php4 its libphp4.so)

AddType application/x-httpd-php .php

DirectoryIndex index.html index.php
 
Old 02-12-2006, 07:01 AM   #3
ivanatora
Member
 
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
 
  


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 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

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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