LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
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 12-12-2011, 11:48 AM   #1
mesuutt
Member
 
Registered: Jan 2011
Location: İstanbul
Distribution: Slackware,Debian
Posts: 62

Rep: Reputation: 1
Question Why apache save php files to local computer when script run if php5 module disabled ?


Hi
I know little english. I hope you understand me

I have no problem with apache but I have been thinking that writes in the subject

How can I disable this future?

Php5 module disable when what happen ?

My server do not hack as long as how much percent probability of php5 module disable ?
 
Old 12-13-2011, 03:20 AM   #2
j-ray
Senior Member
 
Registered: Jan 2002
Location: germany
Distribution: ubuntu
Posts: 1,455

Rep: Reputation: 104Reputation: 104
If you have the mod_php disabled there is no handler to parse the php script, so it is handled as text and given to the browser as such. To change this behaviour you have to turn on mod_php5 and let php scripts be parsed.
 
Old 12-13-2011, 03:31 AM   #3
mesuutt
Member
 
Registered: Jan 2011
Location: İstanbul
Distribution: Slackware,Debian
Posts: 62

Original Poster
Rep: Reputation: 1
Okay, how can I change that apache2 handled as text ? This is possible?
 
Old 12-13-2011, 03:36 AM   #4
j-ray
Senior Member
 
Registered: Jan 2002
Location: germany
Distribution: ubuntu
Posts: 1,455

Rep: Reputation: 104Reputation: 104
enable mod_php5
 
Old 12-13-2011, 05:59 AM   #5
mesuutt
Member
 
Registered: Jan 2011
Location: İstanbul
Distribution: Slackware,Debian
Posts: 62

Original Poster
Rep: Reputation: 1
ok
 
Old 12-13-2011, 06:20 AM   #6
lithos
Senior Member
 
Registered: Jan 2010
Location: SI : 45.9531, 15.4894
Distribution: CentOS, OpenNA/Trustix, testing desktop openSuse 12.1 /Cinnamon/KDE4.8
Posts: 1,144

Rep: Reputation: 217Reputation: 217Reputation: 217
Hi,

take a look here
under
"11. Add these directives are in /usr/local/apache/conf/httpd.conf (if already there, verify they are correct): "

Code:
/etc/httpd/conf/httpd.conf   <-- the file in RHEL/Fedora/CentOS distributions

# Use for PHP 5.x:
LoadModule php5_module	modules/libphp5.so
AddHandler php5-script	.php 

# Add index.php to your DirectoryIndex line:
DirectoryIndex index.html index.php

AddType text/html	.php

# PHP Syntax Coloring
# (optional but useful for reading PHP source for debugging):
AddType application/x-httpd-php-source phps
 
Old 12-13-2011, 08:55 AM   #7
mesuutt
Member
 
Registered: Jan 2011
Location: İstanbul
Distribution: Slackware,Debian
Posts: 62

Original Poster
Rep: Reputation: 1
Thumbs up

Thanks lithos. I was exactly look for that.
Code:
 AddType text/html	.php
No longer php files does not save to local
Thanks for helping
+1 rep
 
Old 12-13-2011, 09:22 AM   #8
lithos
Senior Member
 
Registered: Jan 2010
Location: SI : 45.9531, 15.4894
Distribution: CentOS, OpenNA/Trustix, testing desktop openSuse 12.1 /Cinnamon/KDE4.8
Posts: 1,144

Rep: Reputation: 217Reputation: 217Reputation: 217
Nice to see that works,
so can you please mark the thread as solved if you feel that your wish become true
(you can read my signature to find how)


Regards
 
  


Reply

Tags
apache2, php5


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
Where to save the php and html files on apache Zepyr Linux - Newbie 5 07-01-2009 04:16 AM
PHP5 on apache prompts download php files macklein Linux - Server 6 06-08-2009 09:38 AM
PHP5 on Apache saving .php files Skip-DMP Linux - Enterprise 2 08-03-2006 09:25 AM
Apache 2, PHP 5, SuSE 9.2 - cannot run php files dickohead Linux - Networking 6 06-28-2006 11:25 AM
to run a html or php script with php5 command vincent_fr_60 Linux - Software 1 01-20-2006 07:41 AM


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