php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #64566 Not include file specified in 'auto_prepend_file' in router
Submitted: 2013-04-02 14:31 UTC Modified: 2021-07-30 10:27 UTC
Votes:9
Avg. Score:4.0 ± 0.9
Reproduced:4 of 6 (66.7%)
Same Version:0 (0.0%)
Same OS:3 (75.0%)
From: wcode404 at gmail dot com Assigned:
Status: Open Package: Built-in web server
PHP Version: 5.4.13 OS: *
Private report: No CVE-ID: None
 [2013-04-02 14:31 UTC] wcode404 at gmail dot com
Description:
------------
Not include file specified in 'auto_prepend_file' in router.

Test script:
---------------
# p.php
<?php
function p() {
  // do something
}

# php.ini
...
auto_prepend_file = /path/to/p.php

# router.php
<?php
var_dump(function_exists('p'));

call in cmd
# php -S localhost:8000 router.php

Expected result:
----------------
bool(true)

Actual result:
--------------
bool(false)

Patches

Pull Requests

Pull requests:

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-04-02 14:33 UTC] wcode404 at gmail dot com
add summary
 [2013-04-02 14:33 UTC] wcode404 at gmail dot com
-Summary: * +Summary: Not include file specified in 'auto_prepend_file' in router
 [2013-04-03 01:47 UTC] laruence@php.net
assign to myself
 [2013-04-03 01:47 UTC] laruence@php.net
-Assigned To: +Assigned To: laruence
 [2015-04-10 05:37 UTC] nicolas dot grekas+php at gmail dot com
The same is true for auto_append_file
 [2015-04-29 13:45 UTC] jpauli@php.net
Hello.

You may try this fix (against 5.5) https://github.com/jpauli/php-src/tree/fix-64566
 [2020-07-10 15:15 UTC] bdsdatlanhviet at gmail dot com
The following pull request has been associated:

Patch Name: Remove no_separation flag w/ PHP 8
On GitHub:  https://github.com/php/pecl-database-mysql/pull/3
Patch:      https://github.com/php/pecl-database-mysql/pull/3.patch
 [2021-07-30 10:27 UTC] cmb@php.net
-Status: Assigned +Status: Open -Type: Bug +Type: Documentation Problem -Assigned To: laruence +Assigned To:
 [2021-07-30 10:27 UTC] cmb@php.net
I wouldn't call that a bug; since there is only ever a single
router file involved, auto_append|prepend isn't really important
(contrary to classic "page controllers").  Furthermore, fixing
this bug at this time would likely cause more harm than good.
Changing to doc problem.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 14:01:29 2024 UTC