Bug 235553 - databases/php72-pgsql not working
Summary: databases/php72-pgsql not working
Status: Closed Unable to Reproduce
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: Torsten Zuehlsdorff
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-02-06 15:28 UTC by stepan
Modified: 2019-03-01 14:04 UTC (History)
1 user (show)

See Also:


Attachments
details (603 bytes, text/plain)
2019-02-06 15:28 UTC, stepan
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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