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

  • Read the Linux Manual Pages on Mac and BSD, Directly From the Terminal
  • Ne vous lamentez pas, organisez-vous !
  • FrankenPHP: The Modern Php App Server, written in Go
  • API Platform 3 Is Released!
  • Mercure 0.14: Major Performance Improvement and New Features

Top Posts & Pages

  • Securely Access Private Git Repositories and Composer Packages in Docker Builds
  • JSON Columns and Doctrine DBAL 3 Upgrade
  • Preventing CORS Preflight Requests Using Content Negotiation
  • Symfony's New Native Docker Support (Symfony World)
  • FrankenPHP: The Modern Php App Server, written in Go
  • Goroutines, threads, and thread IDs
  • Generate a Symfony password hash from the command line
  • API Platform 3 Is Released!
  • Connection to a MS SQL Server from Symfony / Doctrine on Mac or Linux
  • Vulcain: HTTP/2 Server Push
 and the rise of client-driven REST APIs

Persistence in PHP with the Doctrine ORM

Persistence in PHP with the Doctrine ORM

Tags

Apache API API Platform Buzz Caddy Docker Doctrine Go Google GraphQL HTTP/2 Hydra hypermedia Hébergement Javascript JSON-LD Kubernetes La Coopérative des Tilleuls Les-Tilleuls.coop Lille Linux Mac Mercure Mercure.rocks Messagerie Instantanée MySQL 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 (25)
  • Mercure (4)
  • Opinions (91)
  • Programming (185)
    • Android (5)
    • Go (13)
    • JavaScript (43)
    • PHP (143)
      • API Platform (65)
      • Symfony (89)
    • Python (14)
      • Django (5)
  • Security (15)
  • SEO (24)
  • Talks (39)
  • Ubuntu (68)
  • Wordpress (6)

Social

  • Mastodon
  • Twitter
  • LinkedIn
  • YouTube
  • GitHub

Links

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