March 4, 2022 4:44 AM, i...@tutanota.com wrote:

> I am running an OpenBSD current box with PHP 8.1 and wanted to try out the 
> pledge and unveil
> wrappers.
> 
> I have installed the pecl81-pledge-2.0.2p3 package and have restarted 
> php81_fpm and httpd.
> 
> When I use pledge or unveil I get:
> 
> Error: Call to undefined function unveil() in ...
> 
> From the documentation there isn't anything that should be setup, i.e. no 
> loading of this package
> as an extension.
> 
> Kind regards
> 
> -- 
> Sent with Tutanota, the secure & ad-free mailbox.


You have to load the extension as described in the php pkg-readme:

Extension modules
=================
Many language features in php are provided by extensions, which come
in several classes.

See /usr/local/share/doc/pkg-readme/php-*

Additionally, you can check if the module was loaded by the phpinfo() function, 
which should give you an output of all the loaded modules.


Hope that helps!

Reply via email to