bref-bootstrap-benchmarks icon indicating copy to clipboard operation
bref-bootstrap-benchmarks copied to clipboard

Opcache not enabled

Open barryvdh opened this issue 6 years ago • 6 comments

When I'm calling opcache_get_status() I get: Call to undefined function opcache_get_status(). When checking phpinfo() it shows that opcache is enabled in the compilation, but did you also include the opcache.so extension? And it should be enabled + enabled for cli + validate timestamps should be disabled.

barryvdh avatar Dec 05 '18 09:12 barryvdh

Ohh that's very interesting… I have just uploaded the build script so that it can be reviewed and tested: https://github.com/mnapoli/bref/pull/106

As you can see in the php.ini I enable opcache, but maybe something wrong is happening 🤔

mnapoli avatar Dec 05 '18 09:12 mnapoli

I might need to explicitly set the php.ini file. Is it loaded in your other benchmarks? What is the php.ini location?

screen shot 2018-12-05 at 10 56 03

barryvdh avatar Dec 05 '18 09:12 barryvdh

It is set here:

https://github.com/mnapoli/bref-bootstrap-benchmarks/blob/e923651e74f77afbfb3a917c25c83fa3f4c27489/a/php/bootstrap#L1

But it is set correctly in your benchmark too:

https://github.com/mnapoli/bref-bootstrap-benchmarks/blob/e923651e74f77afbfb3a917c25c83fa3f4c27489/f/symfony/bootstrap#L1

So I don't understand. Maybe this flag doesn't work?

mnapoli avatar Dec 05 '18 10:12 mnapoli

Yeah that works for the current request indeed. Need to pass it to the server like this: $server = new Process("php -S localhost:8000 -c /opt/php.ini -d extension_dir=/opt/php/extensions {$handler} ");

Will create a PR

barryvdh avatar Dec 05 '18 10:12 barryvdh

Right that makes sense! Thanks!

mnapoli avatar Dec 05 '18 10:12 mnapoli

Let's keep that open, I think C needs to be updated too (and for some reason it stopped working while I was working on it, seemed to be stuck in an infinite wait or loop).

mnapoli avatar Dec 05 '18 10:12 mnapoli