LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (http://www.linuxquestions.org/questions/linux-server-73/)
-   -   Why apache save php files to local computer when script run if php5 module disabled ? (http://www.linuxquestions.org/questions/linux-server-73/why-apache-save-php-files-to-local-computer-when-script-run-if-php5-module-disabled-918351/)

mesuutt 12-12-2011 11:48 AM

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 ?

j-ray 12-13-2011 03:20 AM

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.

mesuutt 12-13-2011 03:31 AM

Okay, how can I change that apache2 handled as text ? This is possible?

j-ray 12-13-2011 03:36 AM

enable mod_php5

mesuutt 12-13-2011 05:59 AM

ok :)

lithos 12-13-2011 06:20 AM

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


mesuutt 12-13-2011 08:55 AM

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

lithos 12-13-2011 09:22 AM

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


All times are GMT -5. The time now is 05:46 AM.