flOid Posted December 18, 2007 Share Posted December 18, 2007 PHP noob here... I recently upgraded my server to PHP5 and since then the PHP forum software (IPB 1.3.1., sec patched) I'm using isn't working any longer proberly. Using a modification for the software I was directly including PHP files from the board template. The files are still getting included, but now it isn't reading the IPB internal variables any longer. I was for example using the $ibforums->member[''] array (class?) before. Now it's just parsing the file as if I'm calling it directly in the browser. How can I fix this? Are there any setting in php.ini I can change to get this working? Quote Link to comment Share on other sites More sharing options...
rajivgonsalves Posted December 18, 2007 Share Posted December 18, 2007 is it showing the source code in the browser ? Quote Link to comment Share on other sites More sharing options...
flOid Posted December 18, 2007 Author Share Posted December 18, 2007 is it showing the source code in the browser ? Yes, parts of it. But as I said, it's the same output as if I call the script that need to be included directly in the browser. Specifically source output is beginning with "member['var'];" which is part of the IPB internal class I mentioned before. It seems to be completely ignoring it now, before it was considered. Quote Link to comment Share on other sites More sharing options...
PFMaBiSmAd Posted December 18, 2007 Share Posted December 18, 2007 Sounds like a short open php tag problem - <? You need to change all <? to <?php and all <?= to <? echo The php.net recommendation for writing portable code - ; 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. Unfortunately, the short open tag allowed lazy programming and results in code that is not portable between servers with different settings. Quote Link to comment Share on other sites More sharing options...
flOid Posted December 18, 2007 Author Share Posted December 18, 2007 Sounds like a short open php tag problem - <? You need to change all <? to <?php and all <?= to <? echo The php.net recommendation for writing portable code - ; 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. Unfortunately, the short open tag allowed lazy programming and results in code that is not portable between servers with different settings. Yes, that was the problem, thanx a lot! Quote Link to comment Share on other sites More sharing options...
PFMaBiSmAd Posted December 18, 2007 Share Posted December 18, 2007 Oops. I see some of what I posted above was incorrect. <?= should be changed to <?php echo Quote Link to comment Share on other sites More sharing options...
Lamez Posted December 18, 2007 Share Posted December 18, 2007 I thought this: <? instead of this <?php was shorthand Quote Link to comment Share on other sites More sharing options...
revraz Posted December 18, 2007 Share Posted December 18, 2007 It is, but by default short tags are off, and I believe in PHP 6 they are no longer supported. XML uses <? as well, so it's best to use <?php I thought this: <? instead of this <?php was shorthand Quote Link to comment 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.