php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #73621 unpredictable behavior (broken adminer)
Submitted: 2016-11-30 09:00 UTC Modified: 2016-12-11 04:22 UTC
Votes:1
Avg. Score:4.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: sailormax at inbox dot lv Assigned:
Status: No Feedback Package: opcache
PHP Version: 7.1.0RC6 OS: Windows 10 x64
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2016-11-30 09:00 UTC] sailormax at inbox dot lv
Description:
------------
Steps:
1. run PHP 7.1 VC14 x64 Non Thread Safe via WTServer(https://wtserver.wtriple.com/) with mysql server. Work via php-cgi.exe. Opcache has to be enabled.
2. open in browser adminer-4.2.5.php
3. try to connect to mysql server: localhost/root

Exp.: connection to mysql server

Act.: Warning:  mysqli::__construct(): (HY000/2002): The requested address is not valid in its context.
Because php call connect() function, which placed in IF, which did not initialized. It call wrong connect() function.


It doesn't happened in PHP <= 7.0
If turn off Opcache - it doesn't happened too.

Test script:
---------------
https://github.com/vrana/adminer/releases/download/v4.2.5/adminer-4.2.5.php

Expected result:
----------------
possibility to connect to local MySQL server

Actual result:
--------------
Warnings, because PHP calling wrong function.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-12-03 23:06 UTC] ab@php.net
-Status: Open +Status: Feedback
 [2016-12-03 23:06 UTC] ab@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.

Thanks for the report. Could you please extract the relevant reproduce script?

Thanks.
 [2016-12-05 11:38 UTC] sailormax at inbox dot lv
I wrote full report as it possible in this situation from user side. It doesn't require specific database. You can connect to empty local mysql database.

I can't minimize test script, because problem in merged adminer.php
If work with adminer not merget scripts - problem doesn't exist.
I hope you can debug this script and find the reason.
 [2016-12-11 04:22 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-2020 The PHP Group
All rights reserved.
Last updated: Wed Apr 01 03:01:22 2020 UTC