php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #29765 Include config.php failure
Submitted: 2004-08-19 21:46 UTC Modified: 2004-08-19 22:14 UTC
From: z dot jiang1 at csuohio dot edu Assigned:
Status: Not a bug Package: *Compile Issues
PHP Version: 5.0.1 OS: Windows XP -Home Edition
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: z dot jiang1 at csuohio dot edu
New email:
PHP Version: OS:

 

 [2004-08-19 21:46 UTC] z dot jiang1 at csuohio dot edu
Description:
------------
well, I am trying to define constants in a file called config.php then I wanna use it in a file called "debug.php". 
I defined a variable like 
$test="test". 
then call this variable by 
echo $test; 
in "debug.php".
it never works..
but if I rename the config.php to other names like"config1.php", it works. 

I dont know why that happens? it's reserved file name or something?

Thanks.

Reproduce code:
---------------
file: debug.php
<?php
include "config.php";
echo $test;


?>

file: config.php

$test="test";


?>


Expected result:
----------------
i am expecting to see 

test

Actual result:
--------------
I see nothing.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-08-19 22:14 UTC] pollita@php.net
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. 

Thank you for your interest in PHP.

If doing nothing more than changing the file name fixes the issue, then I'd wager you've got another config.php file elsewhere in your include_path (with a higher precedence) and THAT file is being included instead.

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 17:01:31 2024 UTC