Bug #76648 [Nab->Fbk]: I don't see warnings for execute SQL on PostgreSQL, when script run on PHP 64bit

From: Date: Sun, 22 Jul 2018 09:51:04 +0000
Subject: Bug #76648 [Nab->Fbk]: I don't see warnings for execute SQL on PostgreSQL, when script run on PHP 64bit
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-216389@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=76648&edit=1 ID: 76648 Updated by: cmb@php.net Reported by: slawek_x at o2 dot pl Summary: I don't see warnings for execute SQL on PostgreSQL, when script run on PHP 64bit -Status: Not a bug +Status: Feedback Type: Bug Package: PostgreSQL related Operating System: MS Windows 7/10 64bit PHP Version: 7.2.8 Assigned To: cmb Block user comment: N Private report: N New Comment: Why do you think that either of the DLLs is a 32bit DLL? Previous Comments: ------------------------------------------------------------------------ [2018-07-22 01:06:27] a at b dot c dot de I haven't been as thorough as slawek_x, but VC15 x64 TS builds of 7.2.7 and 7.2.8 downloaded from php.net work fine for me. Product version/file version numbers of php_pgsql are 7.2.8 / 7.2.8.0 Product version/file version numbers of libpq.dll are 9.6.9 / 9.6.9.18127 They're both 64-bit DLLs. ------------------------------------------------------------------------ [2018-07-22 00:26:17] slawek_x at o2 dot pl I use default library - ./ext/php_pgsql.dll and ./libpq.dll. The files are included in binaries Releases PHP for Windows - VC15 x64 Thread Safe. I tried to change version libpq.dll, but new library didn't visible. The command "phpinfo()" constantly shows for PostrgeSQL: " PostgreSQL Support enabled PostgreSQL(libpq) Version 9.6.9 PostgreSQL(libpq) PostgreSQL 9.6.9 (win32) Multibyte character support enabled SSL support enabled Active Persistent Links 0 Active Links 1 " Probably library php_pgsql.dll compiled using version 32bit libpq.dll. ------------------------------------------------------------------------ [2018-07-21 13:41:15] cmb@php.net > Additional I think the problem may arise from the use of the > 32bit libpq.dll version for the 64 bit extension in PHP. You simply can't load a 32bit DLL into a 64bit process. Why don't you use a 64bit libpq.dll? ------------------------------------------------------------------------ [2018-07-19 21:17:42] slawek_x at o2 dot pl Correct title ------------------------------------------------------------------------ [2018-07-19 21:06:51] slawek_x at o2 dot pl Description: ------------ I use Apache 2.4.33 version 64bit for Windows with language PHP 7.2.7 (64bit). I connected to database PostgreSQL 10.4 (64bit) for Windows from PHP - module PostgreSQL (ext\php_pgsql.dll). When I execute PHP wrong the code SQL then extension PostgreSQL for PHP don't show warnings. This page with wrong code execute/load long time and finally the page is empty. No further PHP code of webpage is executed. I noticed so that problems don't have with wrong SQL, when I run webpage in environment 32bit - Apache and PHP are 32bit version. Extension Postgresql show warnings when I probably run wrong code SQL. I tested different PHP 64bit: 7.2.4, 7.2.5, 7.2.6, 7.2.7 and 7.2.8 (download from https://windows.php.net/download/ (version VC15 x64 Thread Safe). All versions 64bit don't show error when PostgreSQL returns messages as warnings. While 32bit versions execute the code SQL for PostgreSQL as correctly, The error is message about warnings. Additional I think the problem may arise from the use of the 32bit libpq.dll version for the 64 bit extension in PHP. In php.ini always I use this the same settings in 32bit and 64bit PHP. The files php.ini are identical in both versions. Test script: --------------- pg_query('SELECT 1 FROM parent'); /* 1) version 32bit PHP: Warning: pg_query(): Query failed: ERROR: relation "parent" does not exist LINE 1: SELECT 1 FROM parent ^ in (...) The code of PHP is executed to the end of webpage. 2) version 64bit PHP: No warning. The webpage is blank, long time browser is waiting on load webpage. The code of PHP isn't executed to the end of webpage. */ ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=76648&edit=1

« previous php.bugs (#216389) next »