Page 1 of 1

problem with the php shorthand of <?

PostPosted: 07. January 2013 12:22
by Usagi
my website uses <? instead of <?php to start php code blocks. It appears that this is not working with xampp. I defined my sites in hosts and xampp's apache virtual hosts to be mywebsite-dev.com. When I call that up in the browser I get a blank page. Reveal source shows the php code.

I am using Dreamweaver to create and edit code. I set up a testing server and I see a similar problem. If I insert <?php where I had <? the particular block of code after that executes.

I have seven different sites. The phpBB2 one looks weird when shown on the testing server and when displayed in the browser. One uses Gallery and that won't go to the testing server at all. When I put it's url as defined in the hosts file it goes to the remote web address. My Wordpress site works perfectly.

I am unsure of where this is coming from. On my website I have php version 5.2.9. The xampp version is 5.3.1. Is this being caused by the newer php version in xampp?

My server is Linux Fedora 9.

Any ideas on how to fix this, other than rewriting about 500 megs of code?

Thanks

Re: problem with the php shorthand of <?

PostPosted: 07. January 2013 12:34
by JJ_Tagy
The default is full tag. Either change the setting in php.ini or do a find/replace on all the existing code.

Re: problem with the php shorthand of <?

PostPosted: 08. January 2013 01:48
by Usagi
Thanks. I did as you suggested and used a global search and replace to change to the now preferred
tag. Maybe phpBB had some <? tags that caused problems. I did the global replace on all my sites.
phpBB now displays correctly too.