homepage Welcome to WebmasterWorld Guest from 54.167.138.53
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
PHP Problem.not really sure
antonaf




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

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.

 

eelixduppy




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

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!

antonaf




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

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.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved