Skip to content

Commit 58f4deb

Browse files
author
Till Brehm
committed
Fixed #4249 System php.ini is not included in custom php.ini
1 parent 8c8e9be commit 58f4deb

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

server/plugins-available/apache2_plugin.inc.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ private function get_master_php_ini_content($web_data) {
121121
}
122122
unset($tmp);
123123
}
124-
124+
125125
if(!$master_php_ini_path) {
126126
if($web_data['php'] == 'fast-cgi' && file_exists($fastcgi_config["fastcgi_phpini_path"])) {
127127
$master_php_ini_path = $fastcgi_config["fastcgi_phpini_path"];
@@ -132,6 +132,13 @@ private function get_master_php_ini_content($web_data) {
132132
}
133133
}
134134
}
135+
136+
// Resolve inconsistant path settings
137+
if($master_php_ini_path != '' && is_dir($master_php_ini_path) && is_file($master_php_ini_path.'/php.ini')) {
138+
$master_php_ini_path .= '/php.ini';
139+
}
140+
141+
// Load the custom php.ini content
135142
if($master_php_ini_path != '' && substr($master_php_ini_path, -7) == 'php.ini' && is_file($master_php_ini_path)) {
136143
$php_ini_content .= $app->system->file_get_contents($master_php_ini_path)."\n";
137144
}

0 commit comments

Comments
 (0)