Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Thom
ISPConfig Autoinstaller
Commits
8ef2d234
Commit
8ef2d234
authored
Oct 15, 2020
by
Marius Burkard
Browse files
- only reconfigure php fpm and php cgi on web enabled, fixes #20
parent
5910df2c
Changes
4
Hide whitespace changes
Inline
Side-by-side
lib/os/class.ISPConfigDebian10OS.inc.php
View file @
8ef2d234
...
@@ -50,11 +50,19 @@ class ISPConfigDebian10OS extends ISPConfigDebianOS {
...
@@ -50,11 +50,19 @@ class ISPConfigDebian10OS extends ISPConfigDebianOS {
protected
function
setDefaultPHP
()
{
protected
function
setDefaultPHP
()
{
ISPConfigLog
::
info
(
'Settings default system php version.'
,
true
);
ISPConfigLog
::
info
(
'Settings default system php version.'
,
true
);
$cmd
=
'update-alternatives --set php /usr/bin/php7.3
; update-alternatives --set php-cgi /usr/bin/php-cgi7.3 ; update-alternatives --set php-fpm.sock /run/php/php7.3-fpm.sock
'
;
$cmd
=
'update-alternatives --set php /usr/bin/php7.3'
;
$result
=
$this
->
exec
(
$cmd
);
$result
=
$this
->
exec
(
$cmd
);
if
(
$result
===
false
)
{
if
(
$result
===
false
)
{
throw
new
ISPConfigOSException
(
'Command '
.
$cmd
.
' failed.'
);
throw
new
ISPConfigOSException
(
'Command '
.
$cmd
.
' failed.'
);
}
}
if
(
ISPConfig
::
shallInstall
(
'web'
))
{
$cmd
=
'update-alternatives --set php-cgi /usr/bin/php-cgi7.3 ; update-alternatives --set php-fpm.sock /run/php/php7.3-fpm.sock'
;
$result
=
$this
->
exec
(
$cmd
);
if
(
$result
===
false
)
{
throw
new
ISPConfigOSException
(
'Command '
.
$cmd
.
' failed.'
);
}
}
}
}
protected
function
getFail2BanJail
()
{
protected
function
getFail2BanJail
()
{
...
...
lib/os/class.ISPConfigDebianOS.inc.php
View file @
8ef2d234
...
@@ -161,11 +161,19 @@ class ISPConfigDebianOS extends ISPConfigBaseOS {
...
@@ -161,11 +161,19 @@ class ISPConfigDebianOS extends ISPConfigBaseOS {
protected
function
setDefaultPHP
()
{
protected
function
setDefaultPHP
()
{
ISPConfigLog
::
info
(
'Settings default system php version.'
,
true
);
ISPConfigLog
::
info
(
'Settings default system php version.'
,
true
);
$cmd
=
'update-alternatives --set php /usr/bin/php7.0
; update-alternatives --set php-cgi /usr/bin/php-cgi7.0 ; update-alternatives --set php-fpm.sock /run/php/php7.0-fpm.sock
'
;
$cmd
=
'update-alternatives --set php /usr/bin/php7.0'
;
$result
=
$this
->
exec
(
$cmd
);
$result
=
$this
->
exec
(
$cmd
);
if
(
$result
===
false
)
{
if
(
$result
===
false
)
{
throw
new
ISPConfigOSException
(
'Command '
.
$cmd
.
' failed.'
);
throw
new
ISPConfigOSException
(
'Command '
.
$cmd
.
' failed.'
);
}
}
if
(
ISPConfig
::
shallInstall
(
'web'
))
{
$cmd
=
'update-alternatives --set php-cgi /usr/bin/php-cgi7.0 ; update-alternatives --set php-fpm.sock /run/php/php7.0-fpm.sock'
;
$result
=
$this
->
exec
(
$cmd
);
if
(
$result
===
false
)
{
throw
new
ISPConfigOSException
(
'Command '
.
$cmd
.
' failed.'
);
}
}
}
}
protected
function
installPHPMyAdmin
(
$mysql_root_pw
)
{
protected
function
installPHPMyAdmin
(
$mysql_root_pw
)
{
...
...
lib/os/class.ISPConfigUbuntu2004OS.inc.php
View file @
8ef2d234
...
@@ -100,11 +100,19 @@ maxretry = 3';
...
@@ -100,11 +100,19 @@ maxretry = 3';
protected
function
setDefaultPHP
()
{
protected
function
setDefaultPHP
()
{
ISPConfigLog
::
info
(
'Settings default system php version.'
,
true
);
ISPConfigLog
::
info
(
'Settings default system php version.'
,
true
);
$cmd
=
'update-alternatives --set php /usr/bin/php7.4
; update-alternatives --set php-cgi /usr/bin/php-cgi7.4 ; update-alternatives --set php-fpm.sock /run/php/php7.4-fpm.sock
'
;
$cmd
=
'update-alternatives --set php /usr/bin/php7.4'
;
$result
=
$this
->
exec
(
$cmd
);
$result
=
$this
->
exec
(
$cmd
);
if
(
$result
===
false
)
{
if
(
$result
===
false
)
{
throw
new
ISPConfigOSException
(
'Command '
.
$cmd
.
' failed.'
);
throw
new
ISPConfigOSException
(
'Command '
.
$cmd
.
' failed.'
);
}
}
if
(
ISPConfig
::
shallInstall
(
'web'
))
{
$cmd
=
'update-alternatives --set php-cgi /usr/bin/php-cgi7.4 ; update-alternatives --set php-fpm.sock /run/php/php7.4-fpm.sock'
;
$result
=
$this
->
exec
(
$cmd
);
if
(
$result
===
false
)
{
throw
new
ISPConfigOSException
(
'Command '
.
$cmd
.
' failed.'
);
}
}
}
}
protected
function
getSystemPHPVersion
()
{
protected
function
getSystemPHPVersion
()
{
...
...
lib/os/class.ISPConfigUbuntuOS.inc.php
View file @
8ef2d234
...
@@ -83,11 +83,19 @@ maxretry = 3';
...
@@ -83,11 +83,19 @@ maxretry = 3';
protected
function
setDefaultPHP
()
{
protected
function
setDefaultPHP
()
{
ISPConfigLog
::
info
(
'Settings default system php version.'
,
true
);
ISPConfigLog
::
info
(
'Settings default system php version.'
,
true
);
$cmd
=
'update-alternatives --set php /usr/bin/php7.2
; update-alternatives --set php-cgi /usr/bin/php-cgi7.2 ; update-alternatives --set php-fpm.sock /run/php/php7.2-fpm.sock
'
;
$cmd
=
'update-alternatives --set php /usr/bin/php7.2'
;
$result
=
$this
->
exec
(
$cmd
);
$result
=
$this
->
exec
(
$cmd
);
if
(
$result
===
false
)
{
if
(
$result
===
false
)
{
throw
new
ISPConfigOSException
(
'Command '
.
$cmd
.
' failed.'
);
throw
new
ISPConfigOSException
(
'Command '
.
$cmd
.
' failed.'
);
}
}
if
(
ISPConfig
::
shallInstall
(
'web'
))
{
$cmd
=
'update-alternatives --set php-cgi /usr/bin/php-cgi7.2 ; update-alternatives --set php-fpm.sock /run/php/php7.2-fpm.sock'
;
$result
=
$this
->
exec
(
$cmd
);
if
(
$result
===
false
)
{
throw
new
ISPConfigOSException
(
'Command '
.
$cmd
.
' failed.'
);
}
}
}
}
protected
function
getSystemPHPVersion
()
{
protected
function
getSystemPHPVersion
()
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment