bluekable Posted November 25, 2013 Share Posted November 25, 2013 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 Quote Link to comment https://forums.phpfreaks.com/topic/284256-opcache-causing-problems-for-locahost-server/ Share on other sites More sharing options...
dalecosp Posted November 25, 2013 Share Posted November 25, 2013 (edited) You need to read the server and system logs at this point. Also, what version of PHP, and what date? There some fairly recent bug fixes for OPcache... Edited November 25, 2013 by dalecosp Quote Link to comment https://forums.phpfreaks.com/topic/284256-opcache-causing-problems-for-locahost-server/#findComment-1460041 Share on other sites More sharing options...
bluekable Posted November 26, 2013 Author Share Posted November 26, 2013 Thanks man, I have read the apache error log and nothing come's up in there when trying to open the website. I'm running PHP 5.3.10. Would you be able to help me with regards to installing/applying the bug fixes? I'm quite new to PHP. Regards Shane Quote Link to comment https://forums.phpfreaks.com/topic/284256-opcache-causing-problems-for-locahost-server/#findComment-1460169 Share on other sites More sharing options...
dalecosp Posted November 26, 2013 Share Posted November 26, 2013 Try the system error logs as well. Not sure if anything would be there, but we're talking about a serious error (as far as the system is concerned).As for installing bug fixes for PHP, the usual answer is to simply (heh, "simply?") upgrade to the newer/newest version of PHP. You mention /var/www and /usr/lib ... I'm guessing some Linux? Quote Link to comment https://forums.phpfreaks.com/topic/284256-opcache-causing-problems-for-locahost-server/#findComment-1460181 Share on other sites More sharing options...
bluekable Posted November 28, 2013 Author Share Posted November 28, 2013 Ubuntu, yes. (ver 12.04) I will have to give that a go. Somebody else with the same problem has suggested I continue without OPCache until I do the upgrade to 5.5. Thanks for the help Shane Quote Link to comment https://forums.phpfreaks.com/topic/284256-opcache-causing-problems-for-locahost-server/#findComment-1460514 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.