Forum

Thread tagged as: Discussion

Zend OPcache API is restricted

Hi,

I'm using define('PERCH_PRODUCTION_MODE', PERCH_DEVELOPMENT); on my staging site, I've noticed this error in page debug.

Array
(
    [type] => 2
    [message] => Zend OPcache API is restricted by "restrict_api" configuration directive
    [file] => /srv/users/serverpilot/apps/my-site/public/perch/core/lib/PerchUtil.class.php
    [line] => 1425
)

Is this something I can change in Perch, or is it something I need to contact my hosting provider about?

Perch information

Perch Runway: 3.0.14
Production mode: Development (10)
Installed apps: content (3.0.14), assets (3.0.14), categories (3.0.14), perch_forms (1.10)
DB driver: PDO
DB tables: perch2_backup_plans (1), perch2_backup_resources (1), perch2_backup_runs (5656), perch2_blog_authors (2), perch2_blog_comments (0), perch2_blog_index (69), perch2_blog_posts (3), perch2_blog_posts_to_tags (0), perch2_blog_sections (1), perch2_blog_tags (0), perch2_blog_webmention_queue (0), perch2_blogs (2), perch2_categories (9), perch2_category_counts (0), perch2_category_sets (5), perch2_collection_index (205383), perch2_collection_items (1192), perch2_collection_revisions (186), perch2_collections (6), perch2_content_index (1803), perch2_content_items (166), perch2_content_locks (0), perch2_content_regions (23), perch2_forms (8), perch2_forms_responses (1431), perch2_jw_activity_log_actions (1266), perch2_menu_items (18), perch2_navigation (2), perch2_navigation_pages (4), perch2_page_routes (29), perch2_page_templates (27), perch2_pages (29), perch2_resource_log (18335), perch2_resource_tags (5), perch2_resources (3043), perch2_resources_to_tags (5), perch2_scheduled_tasks (26), perch2_settings (38), perch2_user_passwords (0), perch2_user_privileges (44), perch2_user_role_buckets (0), perch2_user_role_privileges (27), perch2_user_roles (2), perch2_users (8)
Users: 8
App runtimes:
<?php
    $apps_list = array(
        'perch_forms',

    );
Scheduled tasks for Backup: plan_2 (10 mins)
Editor plug-ins:
H1: 02ea4497bb07f8212ff4d5238364de5a
L1: 3fabca5af968c99f35bc9d5a1464a963
F1: 3b606135b33e6a102526838f4152a807
headerColour: #000000
content_singlePageEdit: 1
helpURL:
siteURL: /
hideBranding: 1
content_collapseList: 1
lang: en-gb
update_2.8.13: done
update_runway_2.8.15: done
headerScheme: dark
update_runway_2.8.13: done
latest_version:
on_sale_version:
dashboard: 0
hide_pwd_reset: 1
content_hideNonEditableRegions: 0
content_frontend_edit: 1
logoPath: /perch/resources/logo.png
perch_blog_update: 5.6
perch_blog_post_url: /blog/post.php?s={postSlug}
update_runway_2.8.16: done
update_runway_2.8.17: done
update_runway_2.8.18: done
update_runway_2.8.24: done
update_runway_2.8.25: done
update_runway_2.8.26: done
update_runway_2.8.27: done
perch_blog_site_name:
perch_blog_slug_format: %Y-%m-%d-{postTitle}
perch_blog_akismet_key:
perch_blog_max_spam_days: 0
perch_blog_comment_notify: 0
update_runway_2.8.30: done
jw_activity_log_prune_time: 30
update_runway_2.8.31: done
update_runway_2.8.32: done
update_runway_3.0.8: done
update_runway_3.0.14: done
PERCH_DEVELOPMENT: 10
PERCH_STAGING: 50
PERCH_PRODUCTION: 100
PERCH_SITEPATH: /apps/my-site/public
PERCH_DB_USERNAME: XXXXXXXXX
PERCH_DB_SERVER: localhost
PERCH_DB_DATABASE: XXXXXXXXX
PERCH_DB_PREFIX: perch2_
PERCH_EMAIL_FROM: s.meehan@d3creative.uk
PERCH_EMAIL_FROM_NAME: XXXXXXXXX
PERCH_LOGINPATH: /perch
PERCH_PATH: /srv/users/serverpilot/apps/my-site/public/perch
PERCH_CORE: /srv/users/serverpilot/apps/my-site/public/perch/core
PERCH_RESFILEPATH: /srv/users/serverpilot/apps/my-site/public/perch/resources
PERCH_RESPATH: /perch/resources
PERCH_HTML5: 1
PERCH_TZ: Europe/London
PERCH_RWD: 1
PERCH_SCHEDULE_SECRET: XXXXXXXXX
PERCH_CLEAN_RESOURCES:
PERCH_EMAIL_METHOD: smtp
PERCH_EMAIL_HOST: smtp.mailtrap.io
PERCH_EMAIL_SECURE: tls
PERCH_EMAIL_AUTH: 1
PERCH_EMAIL_PORT: 2525
PERCH_EMAIL_USERNAME: XXXXXXXXX
PERCH_GMAPS_API_KEY: XXXXXXXXX
PERCH_PRODUCTION_MODE: 10
PERCH_DEBUG: 1
PERCH_RUNWAY: 1
PERCH_ERROR_MODE: DIE
PERCH_DATE_LONG: %d %B %Y
PERCH_DATE_SHORT: %d %b %Y
PERCH_TIME_SHORT: %H:%M
PERCH_TIME_LONG: %H:%M:%S
PERCH_RUNWAY_ROUTED:
PERCH_STRONG_PASSWORDS:
PERCH_ASSET_VERSION: f704e7442d11292c99b5
PERCH_PREVIEW_ARG: preview
PERCH_TEMPLATE_PATH: /srv/users/serverpilot/apps/my-site/public/perch/templates
PERCH_TEMPLATE_FILTERS:
PERCH_DEFAULT_DOC: index.php
PERCH_DEFAULT_EXT: .php
PERCH_XHTML_MARKUP:
PERCH_HTML_ENTITIES:
PERCH_SSL:
PERCH_STRIPSLASHES:
PERCH_PROGRESSIVE_FLUSH: 1
PERCH_PARANOID:
PERCH_FORCE_SECURE_COOKIES:
PERCH_DEFAULT_BUCKET: default
PERCH_TRANSLATION_ASSIST:
PERCH_PASSWORD_MIN_LENGTH: 6
PERCH_MAX_FAILED_LOGINS: 10
PERCH_AUTH_LOCKOUT_DURATION: 1 HOUR
PERCH_VERIFY_UPLOADS:
PERCH_PRIV_ASSIST:
PERCH_CUSTOM_EDITOR_CONFIGS:
PERCH_ENABLE_EXIF: 1
PERCH_AUTH_PLUGIN:
PERCH_DB_CHARSET: utf8
PERCH_DB_PORT:
PERCH_DB_SOCKET:
PERCH_APPS_EDITOR_PLUGIN: markitup
PERCH_APPS_EDITOR_MARKUP_LANGUAGE: markdown

Hosting settings

PHP: 7.2.3
Zend: 3.2.0
OS: Linux
SAPI: fpm-fcgi
Safe mode: not detected
MySQL client: mysqlnd 5.0.12-dev - 20150407 - $Id: 38fea24f2847fa7519001be390c98ae0acafe387 $
MySQL server: 5.7.21-0ubuntu0.16.04.1-log
Free disk space: 13.27 GB
Extensions: Core, date, libxml, openssl, pcre, sqlite3, zlib, calendar, ctype, dom, fileinfo, filter, ftp, hash, iconv, json, SPL, PDO, bz2, posix, readline, Reflection, session, SimpleXML, snmp, soap, sockets, sodium, standard, tokenizer, xml, xmlreader, xmlwriter, zip, mysqlnd, cgi-fcgi, bcmath, Phar, curl, mbstring, gd, gettext, gmp, imap, intl, ldap, exif, mysqli, odbc, pcntl, pdo_dblib, pdo_mysql, PDO_ODBC, pdo_pgsql, pdo_sqlite, pgsql, shmop, tidy, xmlrpc, xsl, Zend OPcache
GD: Yes
ImageMagick: No
PHP max upload size: 512M
PHP max form post size: 1024M
PHP memory limit: 256M
Total max uploadable file size: 256M
Resource folder writeable: Yes
Session timeout: 24 minutes
Native JSON: Yes
Filter functions: Yes
Transliteration functions: Yes
TMP: /srv/users/serverpilot/tmp/my-site
TEMP: /srv/users/serverpilot/tmp/my-site
TMPDIR: /srv/users/serverpilot/tmp/my-site
PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
USER: serverpilot
HOME: /srv/users/serverpilot
SCRIPT_NAME: /perch/core/settings/diagnostics/index.php
REQUEST_URI: /perch/core/settings/diagnostics/?extended
QUERY_STRING: extended
REQUEST_METHOD: GET
SERVER_PROTOCOL: HTTP/1.0
GATEWAY_INTERFACE: CGI/1.1
REMOTE_PORT: 54573
SCRIPT_FILENAME: /srv/users/serverpilot/apps/my-site/public/perch/core/settings/diagnostics/index.php
SERVER_ADMIN: webmaster@
CONTEXT_DOCUMENT_ROOT: /srv/users/serverpilot/apps/my-site/public
REQUEST_SCHEME: http
DOCUMENT_ROOT: /srv/users/serverpilot/apps/my-site/public
REMOTE_ADDR: XXXXXXXX
SERVER_PORT: 80
SERVER_ADDR: 127.0.0.1
SERVER_NAME: XXXXXXXX
SERVER_SOFTWARE: Apache/2.4.28 (Unix) OpenSSL/1.0.2g
LD_LIBRARY_PATH: /opt/sp/apache/lib:/opt/sp/apache/lib
HTTP_COOKIE: cmsa=1; _ga=GA1.2.1594674890.1521130266; _gid=GA1.2.2087702435.1521130266; PHPSESSID=19742f42584c13becc53dc559fc274af
HTTP_ACCEPT_LANGUAGE: en-US,en;q=0.9
HTTP_ACCEPT_ENCODING: gzip, deflate
HTTP_REFERER: https://my-site.cmsdev.link/perch/core/settings/diagnostics/
HTTP_DNT: 1
HTTP_ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
HTTP_USER_AGENT: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.186 Safari/537.36
HTTP_UPGRADE_INSECURE_REQUESTS: 1
HTTP_CONNECTION: close
HTTP_X_FORWARDED_FOR: 86.30.197.156
HTTP_HOST: my-site.cmsdev.link
SCRIPT_URI: https://my-site.cmsdev.link/perch/core/settings/diagnostics/
SCRIPT_URL: /perch/core/settings/diagnostics/
FCGI_ROLE: RESPONDER
PHP_SELF: /perch/core/settings/diagnostics/index.php
REQUEST_TIME_FLOAT: 1521197977.4675
REQUEST_TIME: 1521197977
argc: 1
Stephen Meehan

Stephen Meehan 4 points

  • 3 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

In development mode, we invalidate the opcode cache so that changes to you make to templates and master pages are reflected immediately rather than waiting for the cache to expire.

It sounds like your server is configured to not allow us to do that. Shouldn't be a problem - just be aware that might be why you can change files and see no change to the output for a short while.

Great, thanks for the support.