This code was working eralier - Check Ini

How many times have we heard that before ! Not only does it make you look like a fool , it also happens so precisely at the time of a Demo.

Yes ! Crap happens !

I was running Drupal the other day and suddenly the code stopped working . I had switched to Wampserver! A quick look at the PHP.INI told me that

short_open_tag = Off

was the problem

the ini files describes it thus

" NOTE: Using short tags should be avoided when developing applications or
; libraries that are meant for redistribution, or deployment on PHP
; servers which are not under your control, because short tags may not
; be supported on the target server. For portable, redistributable code,
; be sure not to use short tags.

that is the code in does not work any more if its short_open_tag is off

So what do we do ?

short_open_tag = On

and save the ini file

now restart the server


use instead as a coding standard . It could save you a lot of trouble.

P. S : this is on PHP 4.x


Post a Comment