skip to Main Content

I’ve just upgraded to PHP 7 and finding it nice and quick, but I’ve been getting intermittent Internal Server Error (500)’s since I upgraded (with completely unchanged code). I’m logging errors and nothing comes up in the normal log, but in event viewer, I’ve got thousands of these:

The description for Event ID 487 from source Zend OPcache cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.

If the event originated on another computer, the display information had to be saved with the event.

The following information was included with the event: 

Base address marks unusable memory region. Please setup opcache.file_cache and opcache.file_cache_callback directives for more convenient Opcache usage
Attempt to access invalid address.

I’m assuming either I’ve misconfigured something, or something has gone with the update. Any help would be absolutely fantastic and greatly appreciated.

3

Answers


  1. Chosen as BEST ANSWER

    I needed to add / change my php.ini to include the following. I found it on a website about "Moodle"... whatever that is.

    I hope it's useful to some people out there!

    opcache.enable=1
    zend_extension="C:Program Files (x86)ParallelsPleskAdditionalPleskPHP70extphp_opcache.dll"
    
    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
    opcache.revalidate_path = 1 ; May fix problems with include paths
    opcache.mmap_base = 0x20000000 ; (Windows only) fix OPcache crashes with event id 487
    

  2. There is also https://bugs.php.net/bug.php?id=72645

    Which can be workaround by disabling opcache for other version of PHP(5.4, 5.5, 5.6) or switching dedicated pools for each IIS site.

    Login or Signup to reply.
  3. opcache.file_cache="C:Windowstempphp_opcache"
    opcache.file_cache_fallback=1
    

    Use for reference and setup opcache :https://www.php.net/manual/en/opcache.installation.php

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search