{"id":7,"date":"2016-11-10T10:33:13","date_gmt":"2016-11-10T10:33:13","guid":{"rendered":"http:\/\/blog.bastosvictor.fr\/?p=7"},"modified":"2016-11-15T12:54:59","modified_gmt":"2016-11-15T12:54:59","slug":"serveur-web-avec-plusieurs-versions-de-php","status":"publish","type":"post","link":"http:\/\/blog.bastosvictor.fr\/index.php\/2016\/11\/10\/serveur-web-avec-plusieurs-versions-de-php\/","title":{"rendered":"Serveur Web avec plusieurs versions de php"},"content":{"rendered":"<p>sources phpfarm:http:\/\/museum.php.net\/php5\/<\/p>\n<pre>apt-get install apache2 php5 build-essential mysql-client libmysql++-dev libxml2-dev libcurl4-openssl-dev libpng-dev libicu-dev libmcrypt-dev libxslt-dev libssl-dev<\/pre>\n<pre>.\/configure -prefix=\/usr\/local\/php56 -with-config-file-path=\/usr\/local\/php56\/etc\/php\/ -disable-ipv6 -with-curl -enable-ftp -with-gd -enable-intl -enable-mbstring -with-mcrypt -with-pdo-mysql=mysqlnd -enable-soap -with-xsl -with-zlib -with-openssl -with-pear=\/usr\/local\/php56\/share\/php -with-mysql\r\n<\/pre>\n<p>Configuration:<\/p>\n<p>Lancez la compilation de la version de php souhait\u00e9e:<br \/>\n\/opt\/phpfarm\/src# .\/compile.sh 7.0.0<\/p>\n<p>nano \/etc\/apache2\/sites-available\/default<\/p>\n<pre>        ServerAdmin webmaster@localhost\r\n\r\n        DocumentRoot \/var\/www\r\n\r\n        \r\n                Options FollowSymLinks\r\n                AllowOverride None\r\n        \r\n        \r\n                Options Indexes FollowSymLinks MultiViews\r\n                AllowOverride None\r\n                Order allow,deny\r\n                allow from all\r\n\r\n        \r\n# Pour les sites en 5.3.2\r\n        \r\n                Options Indexes FollowSymLinks MultiViews\r\n                AllowOverride None\r\n                Order allow,deny\r\n                allow from all\r\n        AddHandler php-cgi .php\r\n        Action php-cgi \/cgi-bin-php\/php-cgi-5.3.2\r\n\r\n    &lt;FilesMatch \"\\.php$\"&gt;\r\n      SetHandler php-cgi\r\n    \r\n        \r\n# Pour les sites en 5.4.0\r\n        \r\n                Options Indexes FollowSymLinks MultiViews\r\n                AllowOverride None\r\n                Order allow,deny\r\n                allow from all\r\n        AddHandler php-cgi .php\r\n        Action php-cgi \/cgi-bin-php\/php-cgi-5.4.0\r\n\r\n    &lt;FilesMatch \"\\.php$\"&gt;\r\n      SetHandler php-cgi\r\n    \r\n        \r\n# Pour les sites en 5.6.9\r\n        \r\n                Options Indexes FollowSymLinks MultiViews\r\n                AllowOverride None\r\n                Order allow,deny\r\n                allow from all\r\n        AddHandler php-cgi .php\r\n        Action php-cgi \/cgi-bin-php\/php-cgi-5.6.9\r\n\r\n    &lt;FilesMatch \"\\.php$\"&gt;\r\n      SetHandler php-cgi\r\n    \r\n        \r\n\r\n        ScriptAlias \/cgi-bin\/ \/usr\/lib\/cgi-bin\/\r\n        &lt;Directory \"\/usr\/lib\/cgi-bin\"&gt;\r\n                AllowOverride None\r\n                Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch\r\n                Order allow,deny\r\n                Allow from all\r\n        \r\n\r\n        ErrorLog ${APACHE_LOG_DIR}\/error.log\r\n\r\n        # Possible values include: debug, info, notice, warn, error, crit,\r\n        # alert, emerg.\r\n        LogLevel warn\r\n\r\n        CustomLog ${APACHE_LOG_DIR}\/access.log combined\r\n<\/pre>\n<p>mkdir \/var\/www\/cgi-bin<\/p>\n<p>nano \/var\/www\/cgi-bin\/php-cgi-7.0.0<\/p>\n<pre>#!\/bin\/sh\r\nPHPRC=\"\/opt\/phpfarm\/inst\/php-7.0.0\/bin\/\"\r\nexport PHPRC\r\n\r\nPHP_FCGI_CHILDREN=3\r\nexport PHP_FCGI_CHILDREN\r\n\r\nPHP_FCGI_MAX_REQUESTS=5000\r\nexport PHP_FCGI_MAX_REQUESTS\r\n\r\nexec \/opt\/phpfarm\/inst\/bin\/php-cgi-7.0.0\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>sources phpfarm:http:\/\/museum.php.net\/php5\/ apt-get install apache2 php5 build-essential mysql-client libmysql++-dev libxml2-dev libcurl4-openssl-dev libpng-dev libicu-dev libmcrypt-dev libxslt-dev libssl-dev .\/configure -prefix=\/usr\/local\/php56 -with-config-file-path=\/usr\/local\/php56\/etc\/php\/ -disable-ipv6 -with-curl -enable-ftp -with-gd -enable-intl -enable-mbstring -with-mcrypt -with-pdo-mysql=mysqlnd -enable-soap -with-xsl -with-zlib -with-openssl -with-pear=\/usr\/local\/php56\/share\/php -with-mysql Configuration: Lancez la compilation de la version &hellip; <a href=\"http:\/\/blog.bastosvictor.fr\/index.php\/2016\/11\/10\/serveur-web-avec-plusieurs-versions-de-php\/\">Continuer la lecture <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[4,2,3],"tags":[6,8,7,9,5],"_links":{"self":[{"href":"http:\/\/blog.bastosvictor.fr\/index.php\/wp-json\/wp\/v2\/posts\/7"}],"collection":[{"href":"http:\/\/blog.bastosvictor.fr\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/blog.bastosvictor.fr\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/blog.bastosvictor.fr\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/blog.bastosvictor.fr\/index.php\/wp-json\/wp\/v2\/comments?post=7"}],"version-history":[{"count":7,"href":"http:\/\/blog.bastosvictor.fr\/index.php\/wp-json\/wp\/v2\/posts\/7\/revisions"}],"predecessor-version":[{"id":17,"href":"http:\/\/blog.bastosvictor.fr\/index.php\/wp-json\/wp\/v2\/posts\/7\/revisions\/17"}],"wp:attachment":[{"href":"http:\/\/blog.bastosvictor.fr\/index.php\/wp-json\/wp\/v2\/media?parent=7"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/blog.bastosvictor.fr\/index.php\/wp-json\/wp\/v2\/categories?post=7"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/blog.bastosvictor.fr\/index.php\/wp-json\/wp\/v2\/tags?post=7"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}