storj-thirdparty / uplink-php

Uplink library bindings for PHP
MIT License
33 stars 6 forks source link

Improve error when dlopen() fails #21

Closed Erikvv closed 2 years ago

Erikvv commented 2 years ago

For various platform compatibility issues there is the error for the user:

Failed loading '/srv/apps/storj/vendor/storj/uplink/build/libuplink.so'

dlerror() usually contains more information about why it failed and can help the user fix the problem. I should add that to the error. Possibly improve PHP core.

Erikvv commented 2 years ago

Possible it can be called like so:

$ffi = FFI::cdef("char *dlerror(void);")
$ffi->dlerror();