richardforth / apache2buddy

apache2buddy
Apache License 2.0
384 stars 72 forks source link

sub detect_php_memory_limit has hardcoded php executable path #409

Open richardforth opened 1 year ago

richardforth commented 1 year ago
our $apache_proc_php = get_php_setting('/usr/bin/php', 'memory_limit');

Probably should be a bit more dynamic

my $php_exe =  `which php`;
our $apache_proc_php = get_php_setting($php_exe, 'memory_limit');

there may be other places in the script where this is so.

in which case it may be better to set a global variable like

our $php_exe =  `which php`;

and substitute any hardcocded paths with the variable

IF YOU ARE SUFFERING FROM THIS ISSUE, FOR THE TIME BEING TRY SYMLINKING /usr/bin/php TO YOUR PHP EXECUTABLE