Page 1 of 1

Problem in php settings - <? does not execute

Posted: Tue Nov 11, 2008 3:35 am
by Sindarin
There is a problem with a client's hosting provider which I am on. They have setup a server, installed php but some settings they have used stop my scripts from executing.

When I do

<? echo("test"); ?> does not work, it prints the source code in html

but

<?php echo("test"); ?> works.

Does anyone know what setting they need to change in their php.ini?
They are using PHP Version 5.2.6 and Windows.

I also noticed expose_php in the ini is On.

Re: Problem in php settings - <? does not execute

Posted: Tue Nov 11, 2008 3:47 am
by Ziq
You should change short_open_tag to On

Code: Select all

 
short_open_tag = On
 

Re: Problem in php settings - <? does not execute

Posted: Tue Nov 11, 2008 5:29 am
by Sindarin
Thanks it works now.

The most awesome thing is that I was bashed by their provider that I should know this. :|

Re: Problem in php settings - <? does not execute

Posted: Tue Nov 11, 2008 10:02 am
by Syntac
You should not use the <? tag. Ever.

Re: Problem in php settings - <? does not execute

Posted: Tue Nov 11, 2008 10:06 am
by mmj
Syntac wrote:You should not use the <? tag. Ever.
:yar:
Agreed.

Agreed.

Did I already say that I agree?

Agreed.

Re: Problem in php settings - <? does not execute

Posted: Wed Nov 12, 2008 3:16 am
by Sindarin
I don't that much, but there are times that a <? or two slip right off the eye.