cancel
Showing results for 
Search instead for 
Did you mean: 

PHP Version 5.5 on Centos server, but hosting multiple PHP versions for Plesk.

PHP Version 5.5 on Centos server, but hosting multiple PHP versions for Plesk.

Driving me crazy, I need to do some things via SSH, but can't use bin/magento executable because CentOS 7 ships with PHP5.4.16, so I get error:

 


[root@localhost httpdocs]# bin/magento indexer:reindex
Magento supports PHP 5.6, 7.0.2, and 7.0.6 or later. Please read http://devdocs.magento.com/guides/v1.0/install-gde/system-requirements.html[root@localhost httpdocs]

 

I have it running on a Plesk 12.5 sever, MariaDB 10, PHP 7 as a Plesk option in hosting, works EXCELLENT (after all the install issues and heartaches).  But for those instances I need to do things in SSH, I can't.  And I'm guessing chron jobs will fail too.

 

I do NOT want to try to upgrade PHP server-wide, for fear of destroying Plesk or other things. 

 

Any advice?

 

Thanks in advance!

2 REPLIES

Re: PHP Version 5.5 on Centos server, but hosting multiple PHP versions for Plesk.

You should be able to setup a separate PHP handler with a different PHP version and if you are using Apache or similar web server (including LiteSpeed), you can add the handler to your .htaccess file and anything within the directory will use the different PHP version. 

James Lee | Moderator • Magento Master
See My Recommended Magento Hosting & Security Tips

Re: PHP Version 5.5 on Centos server, but hosting multiple PHP versions for Plesk.

Thanks, I call myself an expert, but that thought never occurred to me.  I'll give that a try.