Bug 235553

Summary: databases/php72-pgsql not working
Product: Ports & Packages Reporter: stepan
Component: Individual Port(s)Assignee: Torsten Zuehlsdorff <tz>
Status: Closed Unable to Reproduce    
Severity: Affects Only Me CC: w.schwarzenfeld
Priority: ---    
Version: Latest   
Hardware: amd64   
OS: Any   
Attachments:
Description Flags
details none

Description stepan 2019-02-06 15:28:32 UTC
Created attachment 201789 [details]
details

php72-pgsql not working working correctly. 

PHP reports that the module is loaded (php -m).

The apache error log is the following:
PHP Fatal error:  Uncaught Error: Call to undefined function pg_connect()
Comment 1 Torsten Zuehlsdorff freebsd_committer 2019-02-12 11:16:48 UTC
Hello,

this is quite odd. I can't reproduce this error.

I did a fresh install of PHP 7.2.15. Module is also loaded for me:

=== Start ===
# php -m
[PHP Modules]
Core
date
libxml
mysqlnd
pcre
pgsql
Reflection
SPL
standard

[Zend Modules]
=== End ===

When checking for this function, its there:

=== Start ===
# php -r "var_dump(get_defined_functions());" | grep pg_connect
    string(10) "pg_connect"
    string(15) "pg_connect_poll"
    string(20) "pg_connection_status"
    string(18) "pg_connection_busy"
    string(19) "pg_connection_reset"
=== End ===

Does your code uses namespaces? This could be an explanation.
Also it seems you are using ZTS. This should not cause this issue, but its the only visible think, which is non-standard.

So, currently i can't reproduce the issue. Can you create a simple guide to reproduce it? 

Greetings,
Torsten
Comment 2 Torsten Zuehlsdorff freebsd_committer 2019-03-01 14:04:06 UTC
I really can't reproduce the issue. If you find a way please reopen the issue!

Greetings,
Torsten