php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #21853 includes stopped working
Submitted: 2003-01-23 19:53 UTC Modified: 2003-01-28 23:09 UTC
From: gol1689 at hotmail dot com Assigned:
Status: Not a bug Package: *Directory/Filesystem functions
PHP Version: 4.3.0 OS: Windows XP
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: gol1689 at hotmail dot com
New email:
PHP Version: OS:

 

 [2003-01-23 19:53 UTC] gol1689 at hotmail dot com
Since I upgraded to PHP 4.3, all of the includes on my Web sites quite working (hundereds of them).

I've tried poking around in the php/ini file; modifying include_path and what not and finally had to give up and go back to last 4.2 version.

Here is an example of what does not work (I get a warning saying that it cannot find the file).
<?php include('/includes/login_code.php'); ?>

If I modify this so that the link to relative to the current document it works fine.
<?php include('includes/login_code.php'); ?>

What gives?

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-01-24 07:51 UTC] magnus@php.net
When you use include("/some/path"); you are using
the absolute path in the file system, not the relative
path to your webroot.

With your example the file have to be located in
X:\includes\login_code.php where X is the drive where
your webroot is located.
 [2003-01-24 11:38 UTC] sniper@php.net
Not a bug, expected behaviour.

 [2003-01-28 20:47 UTC] gol1689 at hotmail dot com
Please explain why this worked just fine under version 4.2?
 [2003-01-28 23:09 UTC] sniper@php.net
Because the behaviour before 4.3 was wrong and was fixed.

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Oct 14 12:01:27 2024 UTC