简体   繁体   中英

Running PHP 5.4 and PHP 7 on the same server

The company I work for has a legacy PHP app running on PHP 5.4.16. Today I thought I would try to upgrade it to PHP 7.0.9 for the performance benefits among other things. This is the version I personally use and have no issues with it.

Anyway, before I updated the CentOS 7 server with it, I figured I would try updating it through Plesk 12.5. Didn't work so well, a number of errors came up that I think are related to the libraries the app uses not being compatible with PHP7. Switched is back to PHP 5.4.16 so the app keeps working. (Note they never really setup a test environment and changes were just made to the production files... yep). Due to all this, I am very hesitant to update PHP in CentOS and set the environmental paths to PHP 7.

Well I want to rebuild the web app using Laravel 5.3 and PHP 7, but certainly don't want to disrupt the current system, so I am trying to figure out how I can have a separate install of PHP 7 to use for the Laravel web app.

Where can I specify the php.ini file to use for the Laravel web app such that it uses PHP 7?

Plesk 12.5 provides multiple PHP versions on one server.

  • Let the live version run with php 5.x
  • Create a new subscription with PHP 7 (changeable under PHP-Settings in the client interface)
  • Start developing there with PHP 7

see linked screenshot

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM