Skip to content

Kévin Dunglas

Founder of Les-Tilleuls.coop (worker-owned cooperative). Creator of API Platform, Mercure.rocks, Vulcain.rocks and of some Symfony components.

Menu
  • Talks
  • Resume
  • Sponsor me
  • Contact
Menu

Enabling OPcache for PHP 5.6+ installed with Homebrew

Posted on September 26, 2014 by Kévin Dunglas

PHP

Since 5.5, PHP comes with a built-in OPcache system. This PHP accelerator has been open sourced by Zend and is a good replacement for APC.

If you installed PHP 5.6 on your Mac with Homebrew, you maybe noticed that OPcache is not enabled by default. Even if the extension has been compiled, a manual configuration must be done to enable the extension.

  1. Open /usr/local/etc/php/5.6/php.ini
  2. Add zend_extension=/usr/local/lib/php/extensions/no-debug-non-zts-20131226/opcache.so at the end of this file
  3. Restart your PHP FPM or Apache if you are using mod_php

You’re dev environment is now blazing fast!

Related posts:

  1. API Platform 2.0 released: creating powerful web APIs has never been so easy
  2. Be paid to improve API Platform during the Rails Girls Summer of Code
  3. DunglasTodoMVCBundle compatible with Symfony 2.4
  4. API Platform 2.2: GraphQL, JSON API, React admin and PWA, Kubernetes instant deployment and many more new features

5 thoughts on “Enabling OPcache for PHP 5.6+ installed with Homebrew”

  1. Amo__ says:
    January 22, 2015 at 12:19 pm

    Thanks !

    Reply
  2. Amo__ says:
    January 22, 2015 at 12:20 pm

    (Works for php 5.6 btw)

    Reply
  3. baptistemeyer says:
    October 28, 2015 at 8:58 pm

    You need to install the php-opcache package for some time now (since OS X 10.11 El Capitan I think): brew install

    Then you need to enable it in the opcache section of your php.ini: opcache.enable=1

    Finally, restart your PHP-FPM or your Apache.

    Reply
  4. baptistemeyer says:
    October 28, 2015 at 9:01 pm

    Oops, my previous comment has been escaped: brew install php55-opcache or brew install php56-opcache.

    Reply
  5. Dan says:
    February 3, 2017 at 12:59 am

    first install php-opcache,

    Reply

Leave a Reply Cancel reply

Follow me on Twitter

My Tweets

Subscribe to this blog

Recent Posts

  • New in Caddy 2.5: Redact Sensitive Data from Your Logs
  • Building Decentralized Web Apps with Solid and PHP
  • JSON Columns and Doctrine DBAL 3 Upgrade
  • Preventing CORS Preflight Requests Using Content Negotiation
  • Symfony’s New Native Docker Support (Symfony World)

Top Posts & Pages

  • Building Decentralized Web Apps with Solid and PHP
  • JSON Columns and Doctrine DBAL 3 Upgrade
  • Using the "103 Early Hints" Status Code in Go Applications
  • Using Next.js and Material UI Together
  • Deploying Symfony and API Platform apps on Heroku easily
  • Eclipse pour le développement web, PHP et Python sous Dapper
  • PHP 7: Introducing a domain name validator and making the URL validator stricter
  • feedproxy.google.com semble remplacer feeds.feedburner.com
  • Installing a LaTeX environment on a Mac
  • API Platform 2.1 Feature Walkthrough: Create Blazing Fast Hypermedia APIs, Generate JS Apps

Persistence in PHP with the Doctrine ORM

Persistence in PHP with the Doctrine ORM

Tags

Android Apache API API Platform Buzz Caddy Docker Doctrine Go Google HTTP/2 Hydra hypermedia Hébergement Javascript JSON-LD Kubernetes La Coopérative des Tilleuls Les-Tilleuls.coop Lille Linux Mac Mercure Messagerie Instantanée MySQL Open Source PHP Punk Rock Python React REST Rock'n'Roll RSS Schema.org Security SEO SEO Symfony Symfony Live Sécurité Ubuntu Web 2.0 Wordpress XHTML XML

Archives

Categories

  • DevOps (24)
  • Mercure (3)
  • Opinions (91)
  • Programming (178)
    • Android (5)
    • Go (11)
    • JavaScript (43)
    • PHP (136)
      • API Platform (60)
      • Symfony (89)
    • Python (14)
      • Django (5)
  • Security (15)
  • SEO (24)
  • Talks (37)
  • Ubuntu (68)
  • Wordpress (6)

Blogoliste

  • API Platform
  • Les-Tilleuls.coop
  • Mercure.rocks
  • Vulcain.rocks
© 2022 Kévin Dunglas | Powered by Minimalist Blog WordPress Theme