jide / clamp

Command Line Apache MySQL PHP
http://jide.github.io/clamp
GNU General Public License v2.0
79 stars 9 forks source link

clamp.defaults.15.json loads php5 #27

Closed FalkNisius closed 6 years ago

FalkNisius commented 7 years ago

I have installed php72 with brew. php --version gives: PHP 7.2.0beta3 (cli) (built: Sep 5 2017 17:32:46) ( ZTS ) Copyright (c) 1997-2017 The PHP Group Zend Engine v3.2.0-dev, Copyright (c) 1998-2017 Zend Technologies

The ConfigOptionsParser.php detect the php version with substr(php_uname('r'), 0, 2) what gives a 15 on the command line. (php -r "echo substr(php_uname('r'), 0, 2);")

The basic configuration file 'clamp.defaults.15.json' contains the line "php5_module": "/usr/libexec/apache2/libphp5.so" and loads the default php5 module for the apache in front of the module "php7_module": "/usr/local/opt/php72/libexec/apache2/libphp7.so" adressed in my local clamp config, what prevents executing php7.

Suggestions:

(Clamp 1.4.1 is used)

rqelibari commented 6 years ago

Hello @FalkNisius,

Thank you for reporting this issue!

php_uname returns information about the operating system and not the php version. To use the PHP7 module, just change the configuration file inside your PROJECT folder. Replace the load modules line "php5_module": "/usr/libexec/apache2/libphp5.so" line with the one for PHP7.

That should fix your problem.