Discussion:
Problems with ZendOPCache Extension
Shane Drower-Copley
2013-11-25 14:41:26 UTC
Permalink
Hi,

I am having problems with my local server whenever I enable the PHP
extension, ZendOPCache. I am able to access my websites without any
problems while OPCache is disabled. I disable it by commenting out the
include in my php.ini files. The include reads
zend_extension="usr/lib/php5/20090626/opcache.so". When this is done
my phpinfo page does not display the extension and my websites work
fine.

When I want my phpinfo to display ZendOPCache and all of it's settings
I uncomment the line. However whenever this line is uncommented and my
phpinfo displays the extension, I cannot open my sites. I can open
certain .php files if they are sitting directly in my /var/www
directory, like info.php or pearcheck.php, but when I try to open a
directory such as localhost/phpmyadmin I get a browser error reading
that "the server sent no data".

My config setting in the php.ini files that my server uses are below.
I am using OPCache as a suggested extension for hosting a Learning
Management System named Moodle and the configuration was the one
suggested in their documentation.




[opcache]
opcache.enable = 1
opcache.memory_consumption = 128
opcache.max_accelerated_files = 4000
opcache.revalidate_freq = 60

; Required for Moodle
opcache.use_cwd = 1
opcache.validate_timestamps = 1
opcache.save_comments = 1
opcache.enable_file_override = 0

; If something does not work in Moodle
opcache.revalidate_path = 1 ; May fix problems with include paths

; Experimental for Moodle 2.6 and later
;opcache.fast_shutdown = 1
;opcache.enable_cli = 1 ; Speeds up CLI cron
;opcache.load_comments = 0 ; May lower memory use, might not be
compatible with add-ons and other apps.



If anyone has any help to offer please don't hesitate.

Regards
Bluekable
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Marco Behnke
2013-11-25 16:10:35 UTC
Permalink
Just a short question: Have you looked apache error.log? Or tried wuth error logging E_ALL and display_errors on?
Post by Shane Drower-Copley
Hi,
I am having problems with my local server whenever I enable the PHP
extension, ZendOPCache. I am able to access my websites without any
problems while OPCache is disabled. I disable it by commenting out the
include in my php.ini files. The include reads
zend_extension="usr/lib/php5/20090626/opcache.so". When this is done
my phpinfo page does not display the extension and my websites work
fine.
When I want my phpinfo to display ZendOPCache and all of it's settings
I uncomment the line. However whenever this line is uncommented and my
phpinfo displays the extension, I cannot open my sites. I can open
certain .php files if they are sitting directly in my /var/www
directory, like info.php or pearcheck.php, but when I try to open a
directory such as localhost/phpmyadmin I get a browser error reading
that "the server sent no data".
My config setting in the php.ini files that my server uses are below.
I am using OPCache as a suggested extension for hosting a Learning
Management System named Moodle and the configuration was the one
suggested in their documentation.
[opcache]
opcache.enable = 1
opcache.memory_consumption = 128
opcache.max_accelerated_files = 4000
opcache.revalidate_freq = 60
; Required for Moodle
opcache.use_cwd = 1
opcache.validate_timestamps = 1
opcache.save_comments = 1
opcache.enable_file_override = 0
; If something does not work in Moodle
opcache.revalidate_path = 1 ; May fix problems with include paths
; Experimental for Moodle 2.6 and later
;opcache.fast_shutdown = 1
;opcache.enable_cli = 1 ; Speeds up CLI cron
;opcache.load_comments = 0 ; May lower memory use, might not be
compatible with add-ons and other apps.
If anyone has any help to offer please don't hesitate.
Regards
Bluekable
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
Marco Behnke
Dipl-Informatiker (FH), SAE Audio Engineer Diploma
Zend Certified Engineer PHP 5.3

e-Mail: ***@behnke.biz
tel: 0174 / 9722336

Softwaretechnik Behnke
Heinrich-Heine-Str. 7D
21218 Seevetal

http://www.behnke.biz
Shane Drower-Copley
2013-11-26 13:43:14 UTC
Permalink
Marco,

I have tried with your suggested configuration. No error's are
displayed. Again I simply get the message in my browser that "the
server sent no data".

If I look at the error Logs I get nothing when trying to open the
site. The one error I get, which comes at startup of the server, is
that the directory /usr/lib/php5/20090626/mysqlnd.so doesn't exist and
so a dynamic library wasn't loaded, but this happens whether OPCache
is on or off so I don't think it's causing my problem.

Jan,

Yes I am running 5.3.10. I read that it was the latest stable at the
time of setting up my server so I chose to use it. Since then I
probably haven't upgraded it. Would you suggest that I do?

Also, yes it was a typo but only in the email, in my php.ini file's it
is correct. Thanks for spotting it though, could've helped.

I'm still stuck.

Regards
Shane
Post by Marco Behnke
Just a short question: Have you looked apache error.log? Or tried wuth error
logging E_ALL and display_errors on?
Post by Shane Drower-Copley
Hi,
I am having problems with my local server whenever I enable the PHP
extension, ZendOPCache. I am able to access my websites without any
problems while OPCache is disabled. I disable it by commenting out the
include in my php.ini files. The include reads
zend_extension="usr/lib/php5/20090626/opcache.so". When this is done
my phpinfo page does not display the extension and my websites work
fine.
When I want my phpinfo to display ZendOPCache and all of it's settings
I uncomment the line. However whenever this line is uncommented and my
phpinfo displays the extension, I cannot open my sites. I can open
certain .php files if they are sitting directly in my /var/www
directory, like info.php or pearcheck.php, but when I try to open a
directory such as localhost/phpmyadmin I get a browser error reading
that "the server sent no data".
My config setting in the php.ini files that my server uses are below.
I am using OPCache as a suggested extension for hosting a Learning
Management System named Moodle and the configuration was the one
suggested in their documentation.
[opcache]
opcache.enable = 1
opcache.memory_consumption = 128
opcache.max_accelerated_files = 4000
opcache.revalidate_freq = 60
; Required for Moodle
opcache.use_cwd = 1
opcache.validate_timestamps = 1
opcache.save_comments = 1
opcache.enable_file_override = 0
; If something does not work in Moodle
opcache.revalidate_path = 1 ; May fix problems with include paths
; Experimental for Moodle 2.6 and later
;opcache.fast_shutdown = 1
;opcache.enable_cli = 1 ; Speeds up CLI cron
;opcache.load_comments = 0 ; May lower memory use, might not be
compatible with add-ons and other apps.
If anyone has any help to offer please don't hesitate.
Regards
Bluekable
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
Marco Behnke
Dipl-Informatiker (FH), SAE Audio Engineer Diploma
Zend Certified Engineer PHP 5.3
tel: 0174 / 9722336
Softwaretechnik Behnke
Heinrich-Heine-Str. 7D
21218 Seevetal
http://www.behnke.biz
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Jan Ehrhardt
2013-11-25 18:04:21 UTC
Permalink
Post by Shane Drower-Copley
The include reads
zend_extension="usr/lib/php5/20090626/opcache.so".
Typo? /usr/lib/php5/20090626/opcache.so
And the 20090626 suggests you are using PHP 5.3. Is that really the
case? OPcache can run quite well with PHP 5.3, but it is no common
combination.

Jan
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Loading...