php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #6814 Error from require_once when path contains a php variable like $DOCUMENT_ROOT
Submitted: 2000-09-20 09:37 UTC Modified: 2000-09-20 18:12 UTC
From: tep at sportbug dot net Assigned:
Status: Closed Package: Filesystem function related
PHP Version: 4.0.2 OS: Linux RH 6.2
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: tep at sportbug dot net
New email:
PHP Version: OS:

 

 [2000-09-20 09:37 UTC] tep at sportbug dot net
The following code :

<?php
$test = "";
require_once($test."test.inc");
?>

where test.inc is just:

<?php
echo "HERE";
?>

produces this error when run:
  Parse error: parse error, expecting `T_CONSTANT_ENCAPSED_STRING'
.....    on line 3

If you removing the $test varible or change the function require_once() to require(), include(), or include_once(), the error goes away.

Not sure if this is the intended.  


Using PHP 4.0.2 (not the latest snap shot) on Red Hat 6.2 with Apache.


Tim Pfafman

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-09-20 18:12 UTC] stas@php.net
Fixed in CVS.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 14:01:32 2024 UTC