Hi All,

I recently upgraded the PHP on our companies intranet server to PHP 5. This caused all of my includes in my PHP scripts to stop working.
Does anybody know how to solve this. I suspect that the problem is down to a setting in my php.ini file however I'm not sure what setting it could be.

I've tried changing the 'include_path' setting in php.ini but it doesn'se seem to have any effect.

Has anybody else had this problem and know how to fix it??

Thanks for your help in advance guys!

    do you have short tags enabled and/or do your include files use short tags if so then you might need to change from <? code... ?> to <?php code... ?>

      Thanks for the reply but i've fixed the problem, the error that was getting reported was:

      open_basedir restriction in effect. File(../connect.php) is not within the allowed path(s): (.;sys:/tmp)

      I found the following entry in my php.ini file:

      open_basedir = ".;sys:/tmp"

      I then commented this line out and now it works. It seems that if the open_basedir is set, this limits file operations to the directories specified in the open_basedir setting. By commenting this line I'm assuming that it allows file operations in any directory rather than just limiting it to the specified directory.

      So now my includes work again 🙂

      Thanks for all your help.

        Write a Reply...