• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

PHP version installed and set for a domain but not in use.

Status
Not open for further replies.

CoyoteKG

Regular Pleskian
Hello,

I recently installed PHP 5.6 and 7.0, and seted it to a domain, but I can't install Magento.

I tried to folow some instructions for magento dev forum, and did it report that I using 5.4.36 version.

Code:
# composer install
Running composer as root/super user is highly discouraged as packages, plugins and scripts cannot always be trusted
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - magento/framework 100.0.6 requires php ~5.5.0|~5.6.0|~7.0.0 -> your PHP version (5.4.36) does not satisfy that requirement.
    - magento/framework 100.0.6 requires php ~5.5.0|~5.6.0|~7.0.0 -> your PHP version (5.4.36) does not satisfy that requirement.
    - Installation request for magento/framework 100.0.6 -> satisfiable by magento/framework[100.0.6].

what to do?

I'm using dedicated server with Debian
 
Try to add path to needed php version as alias in /root/.bashrc

alias php='/opt/plesk/php/7.0/bin/php'

Then reload .bashrc with

# . ~/.bashrc


Before this action:

# php -v
PHP 5.3.3 (cli) (built: Feb 9 2016 10:21:34)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
with the ionCube PHP Loader (enabled) + Intrusion Protection from ioncube24.com (unconfigured) v5.0.12, Copyright (c) 2002-2015, by ionCube Ltd.

After this action:

# php -v
PHP 7.0.5 (cli) (built: Apr 15 2016 12:50:44) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies

I'm not sure if it help but you can try at least.
 
Unfortunatealy, i answered too fast...

Yes, now when I'm trigger php -v, it shows PHP 7.0.5, but if I want to triger some command I got this message

root@server /var/www/vhosts/px90.info/map.px90.info/bin # ./magento sampledata:remove
Magento supports PHP 5.5.0 or later. Please read http://devdocs.magento.com/guides/v1.0/install-gde/system-requirements.html

root@server /var/www/vhosts/px90.info/map.px90.info/bin # php -v
PHP 7.0.5 (cli) (built: Apr 5 2016 16:24:15) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies
 
Code:
    cd <your Magento install dir>/bin and run them as ./magento <command name>
    php <your Magento install dir>/bin/magento <command name>

two ways to run this command.

Have you tried

php <your Magento install dir>/bin/magento <command name>?
 
Last edited:
Hi CoyoteKG,

please make sure to run PHP - commands with the correct path ( depending to your choosen PHP - version ) over the command line. If you choose one of Plesk PHP packages, pls. be informed, that the paths are:

/opt/plesk/php/5.2/bin/php
/opt/plesk/php/5.3/bin/php
/opt/plesk/php/5.4/bin/php
/opt/plesk/php/5.5/bin/php
/opt/plesk/php/5.6/bin/php
/opt/plesk/php/7.0/bin/php

The commands without the full path will rely on your basic PHP installation(s).

I'm using dedicated server with Debian
I recently installed PHP 5.6 and 7.0

If you installed for example the PHP - packages from Ondřej Surý on your system, the command for the PHP 7 cli - command would be "php7.0". Pls. investigate possible available commands at "/usr/bin", to choose the correct, desired version.

If you followed the Magento guide from http://devdocs.magento.com/guides/v2.0/install-gde/install-quick-ref.html , you will see for example the command:
Code:
php /var/www/html/magento2/bin/magento setup:install --base-url=http://192.0.2.5/magento2/ \
--db-host=localhost --db-name=magento --db-user=magento --db-password=magento \
--admin-firstname=Magento --admin-lastname=User [email protected] \
--admin-user=admin --admin-password=admin123 --language=en_US \
--currency=USD --timezone=America/Chicago --use-rewrites=1
... which you might have to modify, depending to your available commands for your installed PHP - version(s), or choose the FULL path for the Plesk-PHP you choosed on your (sub)domain, as described above.

Investigations are much easier, if you provide more informations ( as for example, HOW you installed "PHP 5.6 and 7.0" )...


... but at the end, the question from @IgorG is still not answered:
Could you please clarify a little bit why you install it from source instead of easy installation from Apps Catalog?
 
Sorry because late respond, I was not online..

This thread can be closed. I moved site on another server, because it needs to be done immediately.
Now I can't test your suggestions.

For question, why I did not install it from Apps Catalog.
Well... I'm new with those Magento and Plesk stuff.
I tried to install it via Apps Catalog, but I received error about PHP or something.
Then I Upgraded Plesk, then PHP, then MySQL to fulfill Magento 2.0 prerequisites.
And after that I was run into problems like I described in another theme... And till now I did not tried to install it via App Catalog.
But next time I will surely.

Thanks to all.
 
Status
Not open for further replies.
Back
Top