problem with the php shorthand of <?

Problems with the Windows version of XAMPP, questions, comments, and anything related.

problem with the php shorthand of <?

Postby Usagi » 07. January 2013 12:22

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
Usagi
 
Posts: 2
Joined: 07. January 2013 11:54
XAMPP Version: 1.8.3-1
Operating System: Windows 7

Re: problem with the php shorthand of <?

Postby JJ_Tagy » 07. January 2013 12:34

The default is full tag. Either change the setting in php.ini or do a find/replace on all the existing code.
JJ_Tagy
 
Posts: 507
Joined: 30. January 2012 13:44
XAMPP Version: 1.8.3
Operating System: Windows 7 x64

Re: problem with the php shorthand of <?

Postby Usagi » 08. January 2013 01:48

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.
Usagi
 
Posts: 2
Joined: 07. January 2013 11:54
XAMPP Version: 1.8.3-1
Operating System: Windows 7


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 65 guests