0

Trying to enable PHP in 10.6.6 server and it keeps loading the php text (I can see the php code on my .php file).

I've enabled the php5 module in server admin (and verified that it's in the httpd.conf).. anything else I can try?

alt text

I also blew away the current httpd.conf and started again, no luck....

christo16
  • 133
  • 7

3 Answers3

2

You also need to make sure that the config for executing php code is in place

AddHandler php5-script .php
AddType text/html .php
lynxman
  • 9,397
  • 3
  • 25
  • 28
1

Turns out I was using php short tags and didn't have it turned on in the php.ini:

; This directive determines whether or not PHP will recognize code between
; <? and ?> tags as PHP source which should be processed as such. It's been
; recommended for several years that you not use the short tag "short cut" and
; instead to use the full <?php and ?> tag combination. With the wide spread use
; of XML and use of these tags by other languages, the server can become easily
; confused and end up parsing the wrong code in the wrong context. But because
; this short cut has been a feature for such a long time, it's currently still
; supported for backwards compatibility, but we recommend you don't use them.
; Default Value: On
; Development Value: Off
; Production Value: Off
; http://php.net/short-open-tag
short_open_tag = On
christo16
  • 133
  • 7
0

Don't forget to clean your browser cache or try with another browser.

profy
  • 1,146
  • 9
  • 20