php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #76648 I don't see warnings for execute SQL on PostgreSQL, when script run on PHP 64bit
Submitted: 2018-07-19 21:06 UTC Modified: 2018-08-26 17:01 UTC
Votes:2
Avg. Score:4.0 ± 0.0
Reproduced:0 of 1 (0.0%)
From: slawek_x at o2 dot pl Assigned: cmb (profile)
Status: No Feedback Package: PostgreSQL related
PHP Version: 7.2.8 OS: MS Windows 7/10 64bit
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: slawek_x at o2 dot pl
New email:
PHP Version: OS:

 

 [2018-07-19 21:06 UTC] 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.

*/


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-07-19 21:17 UTC] slawek_x at o2 dot pl
-Summary: I don't show warning in execute SQL on PostgreSQL, when script run on PHP 64bit +Summary: I don't see warnings for execute SQL on PostgreSQL, when script run on PHP 64bit
 [2018-07-19 21:17 UTC] slawek_x at o2 dot pl
Correct title
 [2018-07-21 13:41 UTC] cmb@php.net
-Status: Open +Status: Not a bug -Assigned To: +Assigned To: cmb
 [2018-07-21 13:41 UTC] 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-22 00:26 UTC] 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-22 01:06 UTC] 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 09:51 UTC] cmb@php.net
-Status: Not a bug +Status: Feedback
 [2018-07-22 09:51 UTC] cmb@php.net
Why do you think that either of the DLLs is a 32bit DLL?
 [2018-08-26 17:01 UTC] cmb@php.net
-Status: Feedback +Status: No Feedback
 [2018-08-26 17:01 UTC] cmb@php.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: Thu Apr 18 04:01:27 2024 UTC