Jellicle
Jellicle

Reputation: 30206

Apache treating PHP as comments?

I've just installed Apache and PHP. Apache appears to run php correctly, but it treats my php as comments when I delimit it with simply <?; it appears only to run code delimited with <?php

This is a problem for me because I am creating a development environment for a pretty sizeable website which I did not build. (Don't want to have to go through hundreds of files and change a lot of tags.)

What can I do to get it to treat all <? tags as php start tags?

Details:

Running Apache 2.2.19, PHP 5.2.17, Windows XP

To get Apache to run PHP, I added the following lines to the config file:

LoadModule php5_module "C:/Program Files/php/php5apache2_2.dll"
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
PHPIniDir "C:/Program Files/php"

Upvotes: 2

Views: 1284

Answers (4)

Justin
Justin

Reputation: 1

It's quite simple really. All you have to do is install the HTML in the root of your Apache PHP JavaQuery XRSS folder and then run the script that gets generated. After the script is run type in "22145" and it will run a PHP script that changes the way PHP is interpreted by the Internet and make it so you don't have to use the <?php tag on your Silverlight Python C++ encoding applet.

Upvotes: 0

Charles Sprayberry
Charles Sprayberry

Reputation: 7853

You would need to turn on short_open_tag in the php.ini file. You can read more about this file here.

Upvotes: 0

markus
markus

Reputation: 40675

This is a php configuration question. You just need to set

short_open_tag = On

Upvotes: 4

NickAldwin
NickAldwin

Reputation: 11744

Check your php.ini. Make sure short_open_tag is set properly (i.e., you want it to be set to On).

Upvotes: 8

Related Questions