mnapoli / bref-bootstrap-benchmarks

Benchmark of possible solutions for Bref and the new AWS Lambda runtime API
https://github.com/mnapoli/bref/issues/100
22 stars 3 forks source link

Opcache not enabled #4

Open barryvdh opened 5 years ago

barryvdh commented 5 years ago

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.

mnapoli commented 5 years ago

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 🤔

barryvdh commented 5 years ago

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
mnapoli commented 5 years ago

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?

barryvdh commented 5 years ago

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

mnapoli commented 5 years ago

Right that makes sense! Thanks!

mnapoli commented 5 years ago

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).