By QuietSpecialist on
Hi,
I've downloaded the beta of D9 using Composer on my local machine (OSX Mojave) but when I try and install I get the "Your PHP installation is too old." message.
A phpinfo lookup says the PHP version is 7.1.23, but a terminal php -v lookup days the PHP version is 7.3.8.
I have a local D8 site using 7.3.8 and the php.ini file used is /usr/local/php5/lib/php.ini; however, the php.ini used by the D9 install script is /etc/php.ini.
How do I correct this please? Ideally, I'd like all Drupal sites installed in my local Sites directory to use 7.3.8 and the same php.ini.
Comments
Webserver and terminal might
Webserver and terminal might not be running the same versions of PHP.
To fix, edit your httpd.conf to reference the version of PHP you would like to use (line starts LoadModule php7_module). I switched to /usr/local/php/libphp7.so
https://digitaldots.co.uk – Front-end development, User Experience (UX), Design and Drupal specialists based in Leeds, United Kingdom
Indeed, webserver and os are different context
and can use different resources.
As you mentioned composer, suggest to use `composer diagnose|grep php` because that may give a different result for php. So, php may report a different version than composer, despite running from the same cmdline context.