Welcome to WebmasterWorld Guest from

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

PHP Problem.not really sure



10:12 pm on Sep 16, 2006 (gmt 0)

10+ Year Member

I have dedicated servers and I just rebuilt my entire network, all Microsoft Windows 2003 servers w/ IIS. I have noticed problems with some pre-written scripts that I use.

The problem is when I try to install PHP scripts I get multiple errors. It seems the downloaded PHP files are coming over corrupted, but I am not really sure. One of the scripts I downloaded had given me errors and I resolved it by opening the corrupted file and replacing <? with <?php (this being the very first line). Now my other scripts aren't as simple as changing one file because all files start the same with <? and NOT <?php

Being that I am not a web programmer, my question is, does PHP files have to start with <?php or can they simply just start with <? and work properly under a Windows platform?

Before reinstalling my entire network I didn't have any problems as this and did not take notice to how exactly each file started. If anyone has ran into a similar issue in the past and have resolved the issue, please let me know...it doesn't seem to be a popular issue but I'm not sure. I thought it was the .zip program or the Windows .msi, but I used different .zip programs and different download managers, but the problem persist. I still get errors when trying to install the PHP scripts. The errors varies and not the same, they are actually not errors, they show the script text, which is why I think it relates to the download corrupting the files. I thought it could be the version of PHP I am using, but I installed the previous release and still have problems. From what I know, I have the php.ini file is configured properly. The files show without <?php on all the W2K3 machines, so something is wrong, if it is suppose to start with <?php...this is crazy. I am not sure what's going on. Any help would be great. Thanks.


10:15 pm on Sep 16, 2006 (gmt 0)

WebmasterWorld Senior Member eelixduppy is a WebmasterWorld Top Contributor of All Time 10+ Year Member

You have to set short_open_tag [php.net] to 1 in your php.ini file in order to start your PHP files with <?

>>they show the script text, which is why I think it relates to the download corrupting the files

It's because the PHP isn't being interpreted without the correct open tag.

good luck!


12:11 am on Sep 21, 2006 (gmt 0)

10+ Year Member

Hey eelixduppy,

Thanks. That helped alot. I switched the short_open_tags to on and now the scripts work perfectly. Thanks that saved me alot.


Featured Threads

Hot Threads This Week

Hot Threads This Month