php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #22845 including file using relative path failed in PHP 4.3.1
Submitted: 2003-03-24 05:19 UTC Modified: 2003-03-24 05:21 UTC
From: horris_tse at aieseccuhk dot net Assigned:
Status: Closed Package: *General Issues
PHP Version: 4.3.1 OS: Solaris 8
Private report: No CVE-ID: None
 [2003-03-24 05:19 UTC] horris_tse at aieseccuhk dot net
(tried listed bug reports but still can't solve this)

Configuration: PHP 4.3.1 with mbstring enabled, mysql, apache dynamic module

Abstract of the script:
<?php
/* $Id: index.php,v 1.36 2003/01/08 13:50:27 nijel Exp $ */
// vim: expandtab sw=4 ts=4 sts=4:


/**
 * Gets core libraries and defines some variables
 */
require('./libraries/grab_globals.lib.php');
require('./libraries/common.lib.php');


------------------

Some weeks ago I have install phpmyadmin and run it smoothly on my machine with Apache 1.3.9 and PHP4.0.6.

However, some days ago after upgrading to PHP4.3.1, I have problem in including files using relative path. An example is listed here using phpmyadmin on version 2003/02/09. I haven't changed any configuration of phpmyadmin or apache. The following error suddenly appears after my upgrade:

--------------
Warning: main(./libraries/grab_globals.lib.php) [function.main]: failed to create stream: ?L???ɮשΥؿ? in /export/home/grace/public_html/nonpublic/index.php on line 9

Fatal error: main() [function.main]: Failed opening required './libraries/grab_globals.lib.php' (include_path='.:/usr/local/lib/php') in /export/home/grace/public_html/nonpublic/index.php on line 9
---------------

I find it strange because I have compared the include_path variable with that in my old php configuration file nad found no difference. I have tried even commented it out or leave the variable blank, but this makes thing worse that  the scripts even failed to include files in the same directory, like include("file_in_same_dir.php") and results the same error as above.

I have even tried turning on and off safe mode and disabling the safe mode include path or commenting it out. However, none of these methods worked.

I have searched for the bug report and found that this seemed to happen in very old versions of PHP. However, what I was using was already version >4.0 and the version I just installed is the lastest! Should anyone be able to help me solve this strange problem, it would be very much appreciated. Billions of thanks in advance.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-03-24 05:21 UTC] sniper@php.net
This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 20:01:45 2024 UTC