Bug #73621 [Com]: unpredictable behavior (broken adminer)

From: Date: Mon, 05 Dec 2016 11:38:29 +0000
Subject: Bug #73621 [Com]: unpredictable behavior (broken adminer)
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-205774@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=73621&edit=1 ID: 73621 Comment by: sailormax at inbox dot lv Reported by: sailormax at inbox dot lv Summary: unpredictable behavior (broken adminer) Status: Feedback Type: Bug Package: opcache Operating System: Windows 10 x64 PHP Version: 7.1.0RC6 Block user comment: N Private report: N New Comment: 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. Previous Comments: ------------------------------------------------------------------------ [2016-12-03 23:06:31] 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-11-30 09:00:33] 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. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=73621&edit=1

« previous php.bugs (#205774) next »