Friday, March 04, 2022

Re: pledge and unveil PHP wrappers don't work on current

Mar 4, 2022, 07:23 by clemens@goessnitzer.info:

> March 4, 2022 4:44 AM, iio7@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!
>
Hi Clemens,

Thank you very much.

I looked in /usr/local/share/doc/pkg-readmes/pecl81-pledge because I suspected any related information would be there. Perhaps a minor mention that it has to be enabled as an extension, plus the name of the extension itself will be helpful?

Kindest regards!

No comments:

Post a Comment