The Apache Haus Forum

Forum Topics => Other Software => Topic started by: chromerep on August 31, 2014, 02:58:21 AM

Title: how to enable php_opcache under php_fcgid?
Post by: chromerep on August 31, 2014, 02:58:21 AM
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?
Title: Re: how to enable php_opcache under php_fcgid?
Post by: mario on September 01, 2014, 10:29:50 AM
just add the following at the end of the extension list.

zend_extension=php_opcache.dll
Title: Re: how to enable php_opcache under php_fcgid?
Post by: chromerep on September 02, 2014, 02:06:04 PM
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
Title: Re: how to enable php_opcache under php_fcgid?
Post by: mario on September 02, 2014, 02:42:29 PM
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.
Title: Re: how to enable php_opcache under php_fcgid?
Post by: chromerep on September 03, 2014, 12:08:15 AM
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)?
Title: Re: how to enable php_opcache under php_fcgid?
Post by: mario on September 04, 2014, 02:02:58 PM
it does make scense, cause fcgid does not let the cgi process die. So the cache increases the performance.