php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #60893 Change path causes bug on include or require.
Submitted: 2012-01-26 16:30 UTC Modified: 2017-01-10 07:58 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: hugo dot bulthe at free dot fr Assigned:
Status: Suspended Package: bcompiler (PECL)
PHP Version: Irrelevant OS: ALL
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: hugo dot bulthe at free dot fr
New email:
PHP Version: OS:

 

 [2012-01-26 16:30 UTC] hugo dot bulthe at free dot fr
Description:
------------
If you compile a "file1.php" which requires a file "file2.php" whith a relative 
path, a bug appears if you change path of script.

Test script:
---------------
In "/www/file1.php" :

<?php
include('file2.php');   //relative path
?>

After compiling :

- if you execute "php -q /www/file1.php" >> no error

- if you move "www" to "wwwtest" and execute "php -q /wwwtest/file1.php" >> error :

"PHP Fatal error:  require_once(): Failed .........in /www/file1.php".

Paths are wrote on hard in the compiled file... 


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-06-28 10:43 UTC] icukeng at gmail dot com
While path are wrote on hard the compiled file isn't movable.
try to use bcompiler_write_included_filename for adding empty or relative paths.
this function is documented at source code's bcompiler.xml (maybe only trunk)
 [2017-01-10 07:58 UTC] kalle@php.net
-Status: Open +Status: Suspended
 [2017-01-10 07:58 UTC] kalle@php.net
Suspending this report as the extension have not had a release for almost 6 years.  Please revive this if the extension once again shows life
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Jan 15 10:01:29 2025 UTC