marijun Posted May 18, 2009 Share Posted May 18, 2009 Hi! I'm having a rather strange problem, and I'm not very familiar with IIS7 so I'm not sure how to fix it. I've installed PHP as a FastCGI module on IIS 7, and everything seems to be fine except for the fact that it refuses to parse included files. For example, this bit of code: <?php require_once('config.php'); phpinfo(); ?> prints config.php as text and does not parse it, however, the phpinfo() function does what it is supposed to and no errors are generated. My include_path is set correctly, as it does indeed find the config.php file - it just won't parse it. I've been wracking my brain on this all weekend, any insight would be greatly appreciated! Quote Link to comment https://forums.phpfreaks.com/topic/158591-php5-iis7-not-parsing-includes/ Share on other sites More sharing options...
PFMaBiSmAd Posted May 18, 2009 Share Posted May 18, 2009 Show us the opening php tags that are being used in config.php Quote Link to comment https://forums.phpfreaks.com/topic/158591-php5-iis7-not-parsing-includes/#findComment-836426 Share on other sites More sharing options...
marijun Posted May 18, 2009 Author Share Posted May 18, 2009 Boy is my face red...I was using '<?' and not '<?php'. (well it worked on the dev server ) Guess I skipped over that setting in the production server installation. Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/158591-php5-iis7-not-parsing-includes/#findComment-836455 Share on other sites More sharing options...
PFMaBiSmAd Posted May 18, 2009 Share Posted May 18, 2009 Don't use <? (ever). You got caught by the lazy-way short open tag. You won't always be on a server where you can change the setting that allows <? to work and from php.net - ; NOTE: Using short tags should be avoided when developing applications or ; libraries that are meant for redistribution, or deployment on PHP ; servers which are not under your control, because short tags may not ; be supported on the target server. For portable, redistributable code, ; be sure not to use short tags. The short open tags were originally added as a way to save a little typing time, but as you just discovered they have wasted several orders of magnitude more time then they ever saved in typing time. Quote Link to comment https://forums.phpfreaks.com/topic/158591-php5-iis7-not-parsing-includes/#findComment-836456 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.