Current File : /home/inlingua/public_html/decay_sym/root/var/softaculous/apps/php74/3/install.php |
<?php
/*
function __php74_req(){
}
function __php74_preinstall(){
}
function __php74_postinstall(){
}
*/
function __php74_install(){
global $infos, $iapps, $globals;
// Move the CONF Files
copy(__DIR__.'/php_suphp.conf', PHP74_ETC.'suphp.conf');
copy(__DIR__.'/php.ini', PHP74_ETC.'php.ini');
// Make the Extra.ini
copy(PHP74_WAPP.'/extra.ini', PHP74_ETC.'php.d/extra.ini');
}
function __php74_after_save_install(){
global $globals, $infos;
scopy(__DIR__.'/php-fpm', PHP74_BIN.'fpmctl');
chmod(PHP74_BIN.'fpmctl', 0755);
// Add the logrotate
if (file_exists('/etc/logrotate.d/php74')){
unlink('/etc/logrotate.d/php74');
}
copy(PHP74_WAPP.'/php74_logrotate', '/etc/logrotate.d/php74');
// Create php session path
mkdir($globals['data_path'].'/php/sessions/php74', 0755, 1);
chmod($globals['data_path'].'/php/sessions/php74', 01733);
chmod($globals['data_path'].'/php/sessions', 0711);
}
function __php74_configure(){
php74_fpm_rebuild();
php74_restart();
}
function __php74_postinstall(){
global $globals, $softpanel;
if(file_exists($globals['var_conf'].'/php74/extensions.ini')){
vexec('cp -f '.$globals['var_conf'].'/php74/extensions.ini '.PHP74_ETC.'php.d/extensions.ini');
}
// It will create extra.ini at /var/webuzo/conf/php
$softpanel->phpc_rebuild_ext('php74');
}