php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #79232 FFI+Preloading example does not work
Submitted: 2020-02-05 22:30 UTC Modified: -
From: ojrask at gmail dot com Assigned:
Status: Open Package: Documentation problem
PHP Version: 7.4.2 OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: ojrask at gmail dot com
New email:
PHP Version: OS:

 

 [2020-02-05 22:30 UTC] 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? 


Patches

Add a Patch

Pull Requests

Add a Pull Request

 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Tue Oct 20 15:01:25 2020 UTC