-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Installation fails due to specifying an absolute path: '/usr/bin/php' #714
Comments
Hi @bit32, you are describing very specific configuration for OS X, looks like you have 2 versions on php installed. You may remove your /usr/bin/php and make symlink to MAMP php in /usr/bin/. Or install the same extensions for your default installation of php. If you will use macports, there is php_select port, which do the same - replacing /usr/bin/php with your preferred. |
Sure, thanks. I just mentioned it as MAMP is fairly popular and that error hasn't been mentioned before. Totally understand that you are focused on getting other things working first tho. |
It is quite common to have PHP installed in a location different from /usr/bin/php. |
We actually don't hard-code path to PHP, so it's not always |
Hello, You can set to variable environment const with name PHP_PATH and value "path to you php execution file" or you can remove your local php from MAC OS and set your php from MAMP like default php version. P.S. how to set environment const http://stackoverflow.com/questions/146354/setting-php-variables-in-httpd-conf Thanks |
I symlinked MAMPs version of PHP to /usr/bin/php to get it installed at the time. @dropsql's comment wasn't added for another 2 weeks. Since you asked tho I have downloaded the latest version of Magento2 and have run through two fresh installations of Magento 2 with the symlink removed (entering The first I did by manually setting a environment variable of PHP_PATH to the MAMP path as described by @dropsql. The installation process went ahead without error. I then unset the environment variable with: |
This issue was present when we used exec. Now we don't use exec, so this shouldn't be a problem. |
Current Behaviour
MCrypt Extension is loaded as part of MAMP's PHP (phpinfo.php confirms this).
MAMP's version of PHP is specified in my $path
Running 'which php -v' returns MAMP's version of PHP.
However as Magento's installer calls /usr/bin/php it forces the use of OS X's built-in version of PHP which does not have the extension loaded.
/usr/bin/php -f '/Users/me/Documents/DATA/WWW/magento2/dev/shell/maintenance.php' -- --set='1' 2>&1
This results in the error:
[ERROR] exception 'Exception' with message 'exception 'Exception' with message 'Module 'Magento_Core' depends on 'mcrypt' PHP extension that is not loaded.' in /Users/[name]/Documents/WWW/magento2/lib/internal/Magento/Framework/Module/DependencyManager.php:56
Suggested Behaviour
Install script should possibly use the the system's preferred version of PHP rather than specifying an absolute path.
The text was updated successfully, but these errors were encountered: