Jump to content

Recommended Posts

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?

Link to comment
https://forums.phpfreaks.com/topic/82181-php-include-problem/
Share on other sites

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.

Link to comment
https://forums.phpfreaks.com/topic/82181-php-include-problem/#findComment-417574
Share on other sites

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.

Link to comment
https://forums.phpfreaks.com/topic/82181-php-include-problem/#findComment-417623
Share on other sites

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! :)

Link to comment
https://forums.phpfreaks.com/topic/82181-php-include-problem/#findComment-417641
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.