Doc #79232 [Com]: FFI+Preloading example does not work

From: Date: Mon, 25 Sep 2023 12:02:26 +0000
Subject: Doc #79232 [Com]: FFI+Preloading example does not work
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-19666@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=79232&edit=1

 ID:                 79232
 Comment by:         mh at hanft dot de
 Reported by:        ojrask at gmail dot com
 Summary:            FFI+Preloading example does not work
 Status:             Open
 Type:               Documentation Problem
 Package:            Documentation problem
 PHP Version:        7.4.2
 Block user comment: N
 Private report:     N

 New Comment:

Still the same with PHP 8.1.


Previous Comments:
------------------------------------------------------------------------
[2020-02-05 22:30:41] ojrask at gmail dot com

Description:
------------
---
From manual page: https://php.net/ffi.examples-complete
---

This example is broken.

1. When followed as is, the developer is greeted by an error that states that
opcache.preload_user has to be set in php.ini, as running preloading as
root is not allowed.

2. When opcache.preload_user is set, the example code fails with the following error:

> NOTICE: PHP message: PHP Fatal error:  Uncaught FFI\Exception: FFI::load() doesn't work in
> conjunction with "opcache.preload_user". Use "ffi.preload" instead. in
> .../preload.php:123

Or have I misunderstood something? 



------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=79232&edit=1


Thread (2 messages)

« previous php.doc.bugs (#19666) next »