How to use Symfony 2 Framework on PHP7

Follow by Email
Facebook0
Facebook
Google+
https://codingsec.net/2016/12/use-symfony-2-framework-php7/

This script was tested on Debian 8. It compiles PHP7 with all options Debian (and Dotdeb) usually do. You probably don’t use many of these options, but now you can easily strip down your configure string and re-run the shell script. It activates opcache, has the MySQL extensions and compiles PHP CLI and PHP-FPM.

RUN SYMFONY 2 ON PHP 7

 

You can extend the box to Nginx, MySQL, composer and Symfony2. Or you can do it manually and choose your favorite webserver, database server and PHP framework.

INSTALLING NGINX, MYSQL, COMPOSER AND SYMFONY2

Configure your Nginx in a way that it points to the symfony installation by default in /etc/nginx/sites-enabled/default and restart nginx:

I added an event listener on kernel.response to capture the memory usage:

This chart shows the peak memory usage and memory usage in dev and prod environments. It is interesting to see that the peak memory usage is actually higher with PHP 7, but overall the memory usage drops from 4,54 MB to 2,10 MB.

Follow by Email
Facebook0
Facebook
Google+
https://codingsec.net/2016/12/use-symfony-2-framework-php7/

Add a Comment

Your email address will not be published. Required fields are marked *

Like the article? please consider sharing it. Thank you

Advertisment ad adsense adlogger