how to enable php_opcache under php_fcgid?

Started by chromerep, August 31, 2014, 02:58:21 AM

Previous topic - Next topic

chromerep

I install php 5.6 and run php via php_fcgid.

Is there any good way(directives) to run php_opcache extension?And,will it get good performance to enable php_opcache?

mario

just add the following at the end of the extension list.

zend_extension=php_opcache.dll

chromerep

Does it need to add these directives below?

opcache.enable = 1
opcache.enable_cli = 1
opcache.memory_consumption = 256
opcache.interned_strings_buffer = 8
opcache.max_accelerated_files = 4096
opcache.max_wasted_percentage = 5
opcache.validate_timestamps = 1
opcache.revalidate_freq = 60
opcache.fast_shutdown = 1
opcache.optimization_level = 0xffffffff

mario

At the end of your php.ini should be a section with

[opcache]

if not, you can simply add it. In the example config php.ini-development there is that section at the very end.

chromerep

And another...

Sometimes,I doubt that the php-opcache can increase the performance under fcgid app...
Does it make sense to enable php-opcache if it use fcgid to run php scrips(at php5.6 version)?

mario

it does make scense, cause fcgid does not let the cgi process die. So the cache increases the performance.