Problems with includes after upgrade to PHP5

Started by Davy-D, November 06, 2008, 05:25:21 AM

Previous topic - Next topic

Davy-D

Hi,

recently I upgraded from PHP 4.4.9 to 5.2.6. SMF 1.1.6 works fine, but now I get lots of error messages like this:

--- begin sample error 1---
2: include() [<a href='function.include'>function.include</a>]: URL file-access is disabled in the server configuration
File: /<...path-to-my-smf-board...>/Themes/default/Admin.template.php (main_above sub template - eval?)
Line: 540
--- end sample error 1 ---

--- begin sample error 2 ---
2: include(some-file) [<a href='function.include'>function.include</a>]: failed to open stream: no suitable wrapper could be found
File: /<...path-to-my-smf-board...>/Themes/dksv1.1/Login.template.php (main_above sub template - eval?)
Line: 540
--- end sample error 2 ---

The thing is, that I explicitely enabled allow_url_include and also allow_url_fopen in php.ini, and also the rest of my php scripts (outside of SMF work just fine).

Is there anything I need to mod inside the SMF code? I know that the include usage was changed in PHP5 and that includes now should actually no longer contain virtual links. Can this be the problem after all?

Thanks
Davy

N3RVE

Within the configuration file php.ini, you will find a line like this, change the option of allow_url_include Off to On.
; Whether to allow include / require to open URLs (like http:// or ftp://) as files.
  allow_url_include = On


Did you restart the Apache server after the change? A restart is required for the code change to take effect.


-[n3rve]
Ralph "[n3rve]" Otowo
Former Marketing Co-ordinator, Simple Machines.
ralph [at] simplemachines [dot] org                       
Quote"Somewhere, something incredible is waiting to be known." - Carl Sagan

Davy-D

Hi,

as I wrote in my post, it is already enabled. When calling phpinfo() it also shows that it IS enabled already, both for local settings and also globally.

Any other idea?

Thx
Davy


N3RVE

phpinfo() will read the information from the php.ini file.
Has the Apache Server been restarted?

-[n3rve]
Ralph "[n3rve]" Otowo
Former Marketing Co-ordinator, Simple Machines.
ralph [at] simplemachines [dot] org                       
Quote"Somewhere, something incredible is waiting to be known." - Carl Sagan

Davy-D

Hi,

I will need to ask my provider to do that if it's a shared host, no?

Thx
D.

Davy-D

#5
OK I have narrowed down the problem to one specific include located in the currently used theme's index.template.php.

The error log is polluted because this specific include is called on every reload of the board (because it's in the index template).

The include relates to a modification I did quite some time ago, so thanks for all assistance provided; never change a running SMF  ;)

EDIT: find the solution to this specific FlashChat problem here:
http://www.simplemachines.org/community/index.php?topic=269255.msg1785539#msg1785539

Advertisement: