ID: 33870 Updated by: [EMAIL PROTECTED] Reported By: jtaal at eljakm dot nl -Status: Open +Status: Bogus Bug Type: Unknown/Other Function Operating System: linux PHP Version: 4.3.11 New Comment:
Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Due to the volume of reports we can not explain in detail here why your report is not a bug. The support channels will be able to provide an explanation for you. Thank you for your interest in PHP. Previous Comments: ------------------------------------------------------------------------ [2005-07-26 17:39:28] jtaal at eljakm dot nl Description: ------------ On my development server I have a directory: /var/www/app containing the file: menu.inc dbsettings.inc and the symbolic links db_mysql.inc -> /var/export/db_mysql.inc subdir -> /var/export/subdir In the directory /var/export: db_mysql.inc In the directory /var/export/subdir: include.inc The file db_mysql.inc has the following line: require_once("dbsettings.inc"); The file include.inc has the following line: require_once("../menu.inc"); What happens is that the include_path is ".", so the file ../menu.inc cannot be found by include.inc I tried to set the include_path to /var/www/app. This worked for the file db_mysql.inc, but it didn't work for menu.inc. I tried to set the include path to ".:/var/www/app", but then the file dbsettings.inc couldn't be found. I also tried "/var/www/app:/var/www/app/subdir" and lots of other combinations. On a release server the two directories are merged so there will be no symlinks. (The problem I have does not occur on this server) I googled lots of hours, but didn't find any thing useful. I expected PHP to open the symlinked files as if they were actually there. Can I configure PHP to do so? Reproduce code: --------------- /var/export/db_mysql.inc: require_once('dbsettings.inc'); /var/export/subdir/include.inc: require_once('../menu.inc'); /var/www/app/menu.inc: $menu = array( ... ); /var/www/app/dbsettings.inc: $host = 'localhost'; $user = '...'; ... symlinks: /var/www/app/db_mysql.inc -> /var/export/db_mysql.inc /var/www/app/subdir -> /var/export/subdir Expected result: ---------------- I expected PHP to open the symlinked files as if they were actually there. Actual result: -------------- Warning: main(../menu.inc): failed to open stream: No such file or directory in /var/export/subdir/include.inc on line 4 Fatal error: main(): Failed opening required '../menu.inc' (include_path='/var/www/app') in /var/export/subdir/include.inc on line 4 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=33870&edit=1