0

I've installed magento2 without issues and at installation it detected my php version correctly (7.0.0, using mamp). Now at upgrade it detects the system one (5.5.31) and some packages missing, like mcrypt.

using phpinfo() on my webserver gives version 7.0.0 and mcrypt enabled.

Why is that and how can it be fixed?

asked Apr 2, 2016 at 0:11
2
  • Execute php -v in you terminal and see what its return. Might be your PHP CLI version is different. Commented Apr 2, 2016 at 4:35
  • @JayeshPatel no, my cli version is the same. Commented Apr 2, 2016 at 11:19

1 Answer 1

1

It turns out that magento is using the cron information to check for your php info. In my crontab I had (sudo crontab -u user -e):

*/1 * * * * /usr/bin/php -c /Library/Application\ Support/appsolute/MAMP\ PRO/conf/php.ini /User/magento-2/bin/magento cron:run >> /User/magento-2/var/log/setup.cron.log&
*/1 * * * * /usr/bin/php -c /Library/Application\ Support/appsolute/MAMP\ PRO/conf/php.ini /User/magento-2/update/cron.php >> /User/magento-2/var/log/setup.cron.log&
*/1 * * * * /usr/bin/php -c /Library/Application\ Support/appsolute/MAMP\ PRO/conf/php.ini /User/magento-2/bin/magento setup:cron:run >> /User/magento-2/var/log/setup.cron.log&

So it was using the binary /usr/bin/php. Instead it should have been using my environment php, which was from mamp:

*/1 * * * * /Applications/MAMP/bin/php/php7.0.0/bin/php -c /Library/Application\ Support/appsolute/MAMP\ PRO/conf/php.ini /User/magento-2/bin/magento cron:run >> /User/magento-2/var/log/setup.cron.log&
*/1 * * * * /Applications/MAMP/bin/php/php7.0.0/bin/php -c /Library/Application\ Support/appsolute/MAMP\ PRO/conf/php.ini /User/magento-2/update/cron.php >> /User/magento-2/var/log/setup.cron.log&
*/1 * * * * /Applications/MAMP/bin/php/php7.0.0/bin/php -c /Library/Application\ Support/appsolute/MAMP\ PRO/conf/php.ini /User/magento-2/bin/magento setup:cron:run >> /User/magento-2/var/log/setup.cron.log&

Now the check is detecting php7.

answered Apr 2, 2016 at 13:01

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.