| | |
| | | $app->uses("getconf");
|
| | | $web_config = $app->getconf->get_server_config($app->functions->intval($websrv["server_id"]),'web');
|
| | |
|
| | | //* Set mysql mode to php-fcgi and enable suexec in website on apache servers
|
| | | //* Set PHP mode to php-fcgi and enable suexec in website on apache servers / set PHP mode to PHP-FPM on nginx servers
|
| | | if($web_config['server_type'] == 'apache') {
|
| | | if($websrv['php'] != 'fast-cgi' || $websrv['suexec'] != 'y') {
|
| | | if(($websrv['php'] != 'fast-cgi' || $websrv['suexec'] != 'y') && $websrv['php'] != 'php-fpm') {
|
| | | $app->db->datalogUpdate('web_domain', "php = 'fast-cgi', suexec = 'y'", 'domain_id', $websrv['domain_id']);
|
| | | }
|
| | | } else {
|
| | | // nginx
|
| | | if($websrv['php'] != 'php-fpm' && $websrv['php'] != 'fast-cgi') {
|
| | | $app->db->datalogUpdate('web_domain', "php = 'php-fpm'", 'domain_id', $websrv['domain_id']);
|
| | | }
|
| | | }
|
| | | |
| | |
|
| | | //* Create the MySQL database for the application
|
| | | $pkg = $app->db->queryOneRecord('SELECT * FROM aps_packages WHERE id = '.$app->db->quote($packageid).';');
|
| | |
| | | $app->db->datalogSave('aps', 'DELETE', 'id', $instanceid, array(), $datalog);
|
| | | */
|
| | |
|
| | | $sql = "SELECT web_database.database_id as database_id, web_database.database_user_id as `database_user_id` FROM aps_instances_settings, web_database WHERE aps_instances_settings.value = web_database.database_name AND aps_instances_settings.value = aps_instances_settings.name = 'main_database_name' AND aps_instances_settings.instance_id = ".$instanceid." LIMIT 0,1";
|
| | | $sql = "SELECT web_database.database_id as database_id, web_database.database_user_id as `database_user_id` FROM aps_instances_settings, web_database WHERE aps_instances_settings.value = web_database.database_name AND aps_instances_settings.name = 'main_database_name' AND aps_instances_settings.instance_id = ".$instanceid." LIMIT 0,1";
|
| | | $tmp = $app->db->queryOneRecord($sql);
|
| | | if($tmp['database_id'] > 0) $app->db->datalogDelete('web_database', 'database_id', $tmp['database_id']);
|
| | |
|
| | |
| | | // Using parse_url() to filter malformed URLs
|
| | | $path = dirname(parse_url($_SERVER['PHP_SELF'], PHP_URL_PATH)).'/'.
|
| | | basename($this->interface_pkg_dir).'/'.$pkg['path'].'/'.basename((string)$icon);
|
| | | // nginx: if $_SERVER['PHP_SELF'] is doubled, remove /sites/aps_packagedetails_show.php from beginning of path
|
| | | $path = preg_replace('@^/sites/aps_packagedetails_show.php(.*)@', '$1', $path);
|
| | | $pkg['Icon'] = $path;
|
| | | }
|
| | | else $pkg['Icon'] = '';
|
| | |
| | | // Using parse_url() to filter malformed URLs
|
| | | $path = dirname(parse_url($_SERVER['PHP_SELF'], PHP_URL_PATH)).'/'.
|
| | | basename($this->interface_pkg_dir).'/'.$pkg['path'].'/'.basename((string)$screen['path']);
|
| | | // nginx: if $_SERVER['PHP_SELF'] is doubled, remove /sites/aps_packagedetails_show.php from beginning of path |
| | | $path = preg_replace('@^/sites/aps_packagedetails_show.php(.*)@', '$1', $path);
|
| | |
|
| | | $pkg['Screenshots'][] = array('ScreenPath' => $path,
|
| | | 'ScreenDescription' => htmlspecialchars(trim((string)$screen->description)));
|