HHVM 3.1.0 and PGSQL

I'm having trouble getting the PGSQL extension running on HHVM 3.1.0 on Ubuntu Trusty 14.04 (LTS) with NGINX.

#hhvm --version
HipHop VM 3.1.0 (rel)
Compiler: tags/HHVM-3.1.0-0-g71ecbd8fb5e94b2a008387a2b5e9a8df5c6f5c7b
Repo schema: 88ae0db264d72ec2e2eb22ab25d717214aee568b

Following the instructions here, https://github.com/PocketRent/hhvm-pgsql I modify my /etc/hhvm/php.ini file, and add the following lines:

DynamicExtensionPath = /data/config/etc/hhvm/extensions/
DynamicExtensions {
    * = pgsql.so
}

but I get an error when starting HHVM:

 # service hhvm restart
 * Restarting HHVM FastCGI Daemon hhvm
 syntax error, unexpected JUNK, expecting $end or TC_SECTION or TC_LABEL or END_OF_LINE in /etc/hhvm/php.ini on line 13\n
 syntax error, unexpected JUNK, expecting $end or TC_SECTION or TC_LABEL or END_OF_LINE in /etc/hhvm/php.ini on line 13\n

My php.ini looks like this

; php options

; hhvm specific
hhvm.log.level = Warning
hhvm.log.always_log_unhandled_exceptions = true
hhvm.log.runtime_error_reporting_level = 8191
hhvm.mysql.typed_results = false


; hhvm.dynamicextensions.pgsql = /data/config/etc/hhvm/extensions/pgsql.so

DynamicExtensionPath = /data/config/etc/hhvm/extensions/
DynamicExtensions {
    * = pgsql.so
}

You can see that I also tried the following based on the information I saw about switching from hdf to ini file:

hhvm.dynamic_extensions.pgsql = /data/config/etc/hhvm/extensions/pgsql.so

which does not cause errors at startup, but does not return true when running PHP code

if (extension_loaded('pgsql')) {

pgsql.so comes from the binary here https://github.com/PocketRent/hhvm-pgsql/tree/releases/3.1.0/ubuntu/trusty to make sure it matches the version of Ubunntu / HHVM I am using,

- , ?

!

+4
2

HHVM, INI (hhvm.dynamic_extensions.pgsql extension). Hdf.

, , CLI, /etc/hhvm/config.hdf :

DynamicExtensionPath = /data/config/etc/hhvm/extensions
DynamicExtensions {
    * = pgsql.so
}

/etc/default/hhvm ADDITIONAL_ARGS ADDITIONAL_ARGS="-c /etc/hhvm/config.hdf". HHVM, .

CLI , ( -c, config.hdf)

+6

(https://github.com/PocketRent/hhvm-pgsql), hhvm PHP.INI hhvm.

hhvm.dynamic_extension_path = /path/to/hhvm/extensions
hhvm.dynamic_extensions[pgsql] = pgsql.so 
+2

Source: https://habr.com/ru/post/1547517/


All Articles