Apache not interpretting php code

From thelinuxwiki
Revision as of 16:52, 12 April 2013 by Nighthawk (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Problem description

php code is being displayed by web browsers because apache is not parsing / interpretting php code.


Solution:

For the latest case, this was solved by:

 1)  add -D PHP5 to the APACHE2_OPTS line in /etc/conf.d/apache2
 Example:
 APACHE2_OPTS="-D DEFAULT_VHOST -D INFO -D SSL -D SSL_DEFAULT_VHOST -D LANGUAGE -D PHP5"
 2)  restart apache