php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #61180 $mysqli object created in auto_prepend_file closes before auto_append_file
Submitted: 2012-02-25 00:38 UTC Modified: 2014-12-30 10:41 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: khaos337 at gmail dot com Assigned:
Status: No Feedback Package: *General Issues
PHP Version: 5.3.10 OS: Free BSD
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: khaos337 at gmail dot com
New email:
PHP Version: OS:

 

 [2012-02-25 00:38 UTC] khaos337 at gmail dot com
Description:
------------
If you initialize a $mysqli object in an auto_prepend_file it is unavailable in 
and auto_append_file, even though auto_prepend_file and auto_append_file

Test script:
---------------
.htaccess:
php_value  auto_prepend_file /path/to/file/prepend.php
php_value  auto_append_file /path/to/file/append.php

prepend.php:
$mysqli = new mysqli('localhost', 'user', 'pass', 'DBASE');

append.php:
$mysqli->close(); (or any mysqli method)

Expected result:
----------------
No Errors

Actual result:
--------------
Warning: mysqli::close() [mysqli.close]: Couldn't fetch mysqli in 
/path/to/file/append.php

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-12-06 08:14 UTC] mike@php.net
-Status: Open +Status: Feedback
 [2013-12-06 08:14 UTC] mike@php.net
Please try using this snapshot:

  http://snaps.php.net/php-trunk-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/

Cannot reproduce.
 [2014-12-30 10:41 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 10:01:31 2024 UTC