I want to test PHP 7.4 FFI functionality. I have PHP 7.4beta4 installed on Ubuntu 16/Apache 2.4
FFI is enabled in my php.ini with:
ffi.enable = true
Here is my php file:
<?php
error_reporting(E_ALL);
ini_set('display_errors', '1');
$ffi = \FFI::cdef(
"int printf(const char *format, ...);", // this is a regular C declaration
"libc.so.6");
// call C's printf()
$ffi->printf("Hello %s!\n", "world");
But I get this error anyway:
Fatal error: Uncaught FFI\Exception: FFI API is restricted by "ffi.enable" configuration directive in /var/www/html/plain.local/index.php:8 Stack trace: #0 /var/www/html/plain.local/index.php(8): FFI::cdef() #1 {main} thrown in /var/www/html/plain.local/index.php on line 8
What did I forget?