opcache

Error Failed loading opcache.so: opcache.so: undefined symbol: compiler_globals - Apache 2.4 / PHP 5.5 / Ubuntu 12.10 VPS

喜你入骨 提交于 2019-12-13 02:27:16
问题 I am a bit unfamiliar with doing this, but my goal was to get Apache 2.4 and PHP 5.5 up and running on a unmanaged VPS running Ubuntu 12.10. I was successful in getting them both to operate and serve html and PHP content, but I am having issues in a few areas with my setup. First with opcache.so which is a main reason I wanted to use PHP 5.5. I have the module opcache.so in the conf files, but I receive this error from Apache: Apache Error Log: Tue Mar 04 15:19:00.624085 2014] [mpm_event

Site not working after installing opcache

╄→гoц情女王★ 提交于 2019-12-11 13:31:58
问题 I just installed opcache to my server running Apache 2.2 and php 5.3 on Ubuntu. However, my site running WordPress stopped working. Phpinfo does run however and it shows that opcache is already enabled. I checked the Apache error log file and it doesn't seem to be providing any helpful insight about what's causing the problem. Is there's another method or log file i can check to debug the problem? 来源: https://stackoverflow.com/questions/36841527/site-not-working-after-installing-opcache

Do static arrays get stored in opcache?

假如想象 提交于 2019-12-11 04:12:03
问题 Say I have a rather large associative array of 100k elements like so: $resources = array( 'stone'=>'current_stone.gif', 'stick'=>'uglystick.jpg', ... ); Stored in a file called resources.php and it will never change at runtime . I would like to have this data in Zend opcache so as to share it across all processes (saving memory) and possibly speed up the lookup speed. My current assumption is that, in this form, this array will not get stored in opcache as it's not defined as a static

OpCache not caching

☆樱花仙子☆ 提交于 2019-12-10 22:03:27
问题 ive recently activated opcache but it doesn't appear to be working. It's confirmed activated via phpinfo() As you can see 0 hits 1 miss 1 cached script (opcached gui) What am I missing? Server is a Linux server centos 6.5 vps PHP 5.5 A bit more info about opcache configuration opcache_enabled true cache_full false restart_pending false restart_in_progress false used_memory 8.54 MB free_memory 503.46 MB wasted_memory 0 bytes current_wasted_percentage 0.00% buffer_size 4194304 used_memory 446

Should I enable OpCache in production? Any benchmark for php 7.0?

心不动则不痛 提交于 2019-12-08 12:55:27
问题 Should I enable OpCache in production? Any benchmark for php 7.0? Is there any benchmark that tells how much a Laravel application on a PHP 7.0 server can benefit from enabling and tuning opcache? It would also be nice to share your experience. 回答1: I have opcache enabled in production and have had no problems. There is undoubtedly a performance improvement so I would recommend enabling it. I'm not a Laravel developer, however there's a bunch of performance comparisons out there. For example,

PHP userland cache with OpCache (not working as expected)

北城以北 提交于 2019-12-08 09:38:57
问题 i want use PHP OpCache as userland cache (like APCu, Redis, Memcache) as fallback where better caching solution aren't avaible. The idea is store the data to cache into php files created at runtime and read the data with include . In this way, OpCache should be cache in memory the compiled file and the result is a memory cache. <?php /** * Simple php cache using php generated files and opcache */ class DiskCache { const DEFAULT_TTL = 3600; /** * @var callable */ private static

php not showing changes to files consistently

你离开我真会死。 提交于 2019-12-08 07:37:32
问题 I am making changes to php files and they are not showing -- sometimes. Sometimes they will show immediately. Sometimes I have to wait a few minutes. I've gone through and turned off all the cache that I could think to turn off. The problem is inconsistent and tough to duplicate consistently. 回答1: Answering my own question... I spent quite awhile doing trials to consistently reproduce the behavior. I had to let the server sit without refresh any page for a few minutes. Then if I change the

Enabling PHP7 Opcache

我的梦境 提交于 2019-12-06 05:35:35
问题 I recently upgraded to PHP 7. I placed this in /etc/php.d/opcache.ini opcache.file_cache = /var/www/html/.opcache opcache.file_cache_only = 1 and created the directory (as root) When I visit the site there is nothing created in the .opcache folder a phpinfo(); reflects the changes I made in opcache.ini How can I get PHP 7 Opcache working at optimal performance with WordPress? update The problem was witch folder permissions. 'Ale sure the Apache can write to it. What are the optimal settings

Enabling PHP7 Opcache

安稳与你 提交于 2019-12-04 14:32:11
I recently upgraded to PHP 7. I placed this in /etc/php.d/opcache.ini opcache.file_cache = /var/www/html/.opcache opcache.file_cache_only = 1 and created the directory (as root) When I visit the site there is nothing created in the .opcache folder a phpinfo(); reflects the changes I made in opcache.ini How can I get PHP 7 Opcache working at optimal performance with WordPress? update The problem was witch folder permissions. 'Ale sure the Apache can write to it. What are the optimal settings for it? Security and speed wise? I fixed this by making sure apache get write to the folders I created.

PHP opcache reset + symlink-style deployment

懵懂的女人 提交于 2019-12-03 05:49:24
问题 I am trying to reset PHP opcache after a symlink-style deployment. There is the opcache_reset.php file in my project which is executing by wget after the document root's symlink replacement: <?php clearstatcache(true); opcache_reset(); In spite of that, the old files are still used. According to opcache_get_status() output, the number of manual_restarts increases, last_restart_time keeps up-to-date, but the file paths remains outdated. I need to call opcache_reset.php manually after a minute