summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'syscp/patches/suphp-patch/syscp-1.2.13-suphp-support.patch')
-rw-r--r--syscp/patches/suphp-patch/syscp-1.2.13-suphp-support.patch370
1 files changed, 0 insertions, 370 deletions
diff --git a/syscp/patches/suphp-patch/syscp-1.2.13-suphp-support.patch b/syscp/patches/suphp-patch/syscp-1.2.13-suphp-support.patch
deleted file mode 100644
index b2f7b06..0000000
--- a/syscp/patches/suphp-patch/syscp-1.2.13-suphp-support.patch
+++ /dev/null
@@ -1,370 +0,0 @@
-diff -Nru syscp-suexec/customer_extras.php syscp-suphp/customer_extras.php
---- syscp-suexec/customer_extras.php 2006-03-26 04:08:39.000000000 +0200
-+++ syscp-suphp/customer_extras.php 2006-03-26 04:11:22.000000000 +0200
-@@ -178,6 +178,8 @@
- $row['options_indexes'] = str_replace('0', $lng['panel']['no'], $row['options_indexes']);
- $row['options_execcgi'] = str_replace('1', $lng['panel']['yes'], $row['options_execcgi']);
- $row['options_execcgi'] = str_replace('0', $lng['panel']['no'], $row['options_execcgi']);
-+ $row['options_phpversionselect'] = str_replace('4', $lng['extras']['php4'], $row['options_phpversionselect']);
-+ $row['options_phpversionselect'] = str_replace('5', $lng['extras']['php5'], $row['options_phpversionselect']);
- eval("\$htaccess.=\"".getTemplate("extras/htaccess_htaccess")."\";");
- }
- eval("echo \"".getTemplate("extras/htaccess")."\";");
-@@ -273,6 +275,7 @@
- ' `path`, ' .
- ' `options_indexes`, ' .
- ' `options_execcgi`, ' .
-+ ' `options_phpversionselect`, ' .
- ' `error404path`, ' .
- ' `error403path`, ' .
- // ' `error401path`, ' .
-@@ -282,6 +285,7 @@
- ' "'.$path.'", ' .
- ' "'.$_POST['options_indexes'].'", ' .
- ' "'.$_POST['options_execcgi'].'", ' .
-+ ' "'.$_POST['options_phpversionselect'].'", ' .
- ' "'.$error404path.'", ' .
- ' "'.$error403path.'", ' .
- // ' "'.$error401path.'", ' .
-@@ -298,6 +302,7 @@
- $userinfo['guid'], $settings['panel']['pathedit'] );
- $options_indexes = makeyesno('options_indexes','1','0','1');
- $options_execcgi = makeyesno('options_execcgi','1','0','0');
-+ $options_phpversionselect = "<b>".$lng['extras']['php4']."</b><input type=\"radio\" name=\"options_phpversionselect\" value=\"4\" checked=\"checked\" />&nbsp;\n<b>".$lng['extras']['php5']."</b><input type=\"radio\" name=\"options_phpversionselect\" value=\"5\" />";
- eval("echo \"".getTemplate("extras/htaccess_add")."\";");
- }
- }
-@@ -327,6 +332,11 @@
- {
- $option_execcgi = '0';
- }
-+ $option_phpversionselect = intval($_POST['options_phpversionselect']);
-+ if ($option_phpversionselect != '5')
-+ {
-+ $option_phpversionselect = '4';
-+ }
- if ( ($_POST['error404path'] == '')
- || (preg_match('/^https?\:\/\//', $_POST['error404path']) )
- )
-@@ -370,6 +380,7 @@
-
- if ( ($option_indexes != $result['options_indexes'])
- || ($option_execcgi != $result['options_execcgi'])
-+ || ($option_phpversionselect != $result['options_phpversionselect'])
- || ($error404path != $result['error404path'])
- || ($error403path != $result['error403path'])
- // || ($error401path != $result['error401path'])
-@@ -381,6 +392,7 @@
- 'UPDATE `'.TABLE_PANEL_HTACCESS.'` ' .
- 'SET `options_indexes` = "'.$option_indexes.'",' .
- ' `options_execcgi` = "'.$option_execcgi.'",' .
-+ ' `options_phpversionselect` = "'.$option_phpversionselect.'",' .
- ' `error404path` = "'.$error404path.'", ' .
- ' `error403path` = "'.$error403path.'", ' .
- // ' `error401path` = "'.$error401path.'", ' .
-@@ -400,6 +412,14 @@
- $result['error500path'] = $result['error500path'];
- $options_indexes = makeyesno('options_indexes', '1', '0', $result['options_indexes']);
- $options_execcgi = makeyesno('options_execcgi', '1', '0', $result['options_execcgi']);
-+ if($result['options_phpversionselect'] == '5')
-+ {
-+ $options_phpversionselect = "<b>".$lng['extras']['php4']."</b><input type=\"radio\" name=\"options_phpversionselect\" value=\"4\" />&nbsp;\n<b>".$lng['extras']['php5']."</b><input type=\"radio\" name=\"options_phpversionselect\" value=\"5\" checked=\"checked\" />";
-+ }
-+ else
-+ {
-+ $options_phpversionselect = "<b>".$lng['extras']['php4']."</b><input type=\"radio\" name=\"options_phpversionselect\" value=\"4\" checked=\"checked\" />&nbsp;\n<b>".$lng['extras']['php5']."</b><input type=\"radio\" name=\"options_phpversionselect\" value=\"5\" />";
-+ }
- eval("echo \"".getTemplate("extras/htaccess_edit")."\";");
- }
- }
-diff -Nru syscp-suexec/lng/english.lng.php syscp-suphp/lng/english.lng.php
---- syscp-suexec/lng/english.lng.php 2006-03-26 04:08:39.000000000 +0200
-+++ syscp-suphp/lng/english.lng.php 2006-03-26 04:11:22.000000000 +0200
-@@ -423,4 +423,16 @@
- */
- $lng['extras']['view_execcgi'] = 'permit CGI execution';
- $lng['extras']['directory_execcgi'] = 'execute CGI scripts';
-+
-+/**
-+ * CHANGED FOR SUPHP PATCH
-+ */
-+
-+/**
-+ * ADDED FOR SUPHP PATCH
-+ */
-+$lng['extras']['php4'] = 'PHP4';
-+$lng['extras']['php5'] = 'PHP5';
-+$lng['extras']['view_phpversionselect'] = 'PHP version';
-+$lng['extras']['directory_phpversionselect'] = 'enabled PHP version';
- ?>
-\ No newline at end of file
-diff -Nru syscp-suexec/scripts/create_suphp_inis.php syscp-suphp/scripts/create_suphp_inis.php
---- syscp-suexec/scripts/create_suphp_inis.php 1970-01-01 01:00:00.000000000 +0100
-+++ syscp-suphp/scripts/create_suphp_inis.php 2006-03-26 04:11:22.000000000 +0200
-@@ -0,0 +1,129 @@
-+<?php
-+/*
-+ * This script creates the php.ini's used by mod_suPHP+php-cgi
-+ */
-+ if(@php_sapi_name() != 'cli' && @php_sapi_name() != 'cgi' && @php_sapi_name() != 'cgi-fcgi')
-+ {
-+ die('This script only works in the shell.');
-+ }
-+
-+ $baseconfigdir = '/var/www/syscp-suphp/config';
-+ $basetmpdir = '/var/www/syscp-suphp/tmp';
-+ $peardir = '/usr/share/php/:/usr/share/php4/:/usr/share/php5/';
-+
-+ $configdir = $baseconfigdir.'/'.$domain['loginname'].'/'.$domain['domain'].'/';
-+ $tmpdir = $basetmpdir.'/'.$domain['loginname'].'/';
-+
-+ if($domain['openbasedir'] == '1')
-+ {
-+ $openbasedircomm = '';
-+ $openbasedir = $domain['documentroot'].':'.$tmpdir.':'.$peardir;
-+ }
-+ if($domain['openbasedir'] == '0')
-+ {
-+ $openbasedircomm = ';';
-+ $openbasedir = '';
-+ }
-+
-+ if($domain['safemode'] == '1')
-+ {
-+ $safemode = 'On';
-+ }
-+ if($domain['safemode'] == '0')
-+ {
-+ $safemode = 'Off';
-+ }
-+
-+ if($domain['php_errordisplay'] == '1')
-+ {
-+ $phperrordisplay = 'On';
-+ }
-+ if($domain['php_errordisplay'] == '0')
-+ {
-+ $phperrordisplay = 'Off';
-+ }
-+
-+ // create config dir if necessary
-+ if(!is_dir($configdir))
-+ {
-+ safe_exec('mkdir -p "'.$configdir.'"');
-+ }
-+
-+ // create tmp dir if necessary
-+ if(!is_dir($tmpdir))
-+ {
-+ safe_exec('mkdir -p "'.$tmpdir.'"');
-+ safe_exec('chown -R '.$domain['guid'].':'.$domain['guid'].' "'.$tmpdir.'"');
-+ safe_exec('chmod 0750 "'.$tmpdir.'"');
-+ }
-+
-+// define the php.ini
-+$config_file_php_ini = 'short_open_tag = On
-+asp_tags = Off
-+precision = 14
-+output_buffering = 4096
-+allow_call_time_pass_reference = Off
-+safe_mode = '.$safemode.'
-+safe_mode_gid = Off
-+safe_mode_include_dir = "'.$peardir.'"
-+safe_mode_allowed_env_vars = PHP_
-+safe_mode_protected_env_vars = LD_LIBRARY_PATH
-+'.$openbasedircomm.'open_basedir = "'.$openbasedir.'"
-+disable_functions = exec,passthru,shell_exec,system,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate
-+disable_classes =
-+expose_php = Off
-+max_execution_time = 30
-+max_input_time = 60
-+memory_limit = 8M
-+post_max_size = 8M
-+error_reporting = E_ALL
-+display_errors = '.$phperrordisplay.'
-+display_startup_errors = Off
-+log_errors = On
-+log_errors_max_len = 1024
-+ignore_repeated_errors = Off
-+ignore_repeated_source = Off
-+report_memleaks = On
-+track_errors = Off
-+html_errors = Off
-+variables_order = "GPCS"
-+register_globals = Off
-+register_argc_argv = Off
-+gpc_order = "GPC"
-+magic_quotes_gpc = Off
-+magic_quotes_runtime = Off
-+magic_quotes_sybase = Off
-+include_path = ".:'.$peardir.'"
-+enable_dl = Off
-+file_uploads = On
-+upload_tmp_dir = "'.$tmpdir.'"
-+upload_max_filesize = 32M
-+allow_url_fopen = Off
-+sendmail_path = "/usr/sbin/sendmail -t -f '.$domain['email'].'"
-+session.save_handler = files
-+session.save_path = "'.$tmpdir.'"
-+session.use_cookies = 1
-+session.name = PHPSESSID
-+session.auto_start = 0
-+session.cookie_lifetime = 0
-+session.cookie_path = /
-+session.cookie_domain =
-+session.serialize_handler = php
-+session.gc_probability = 1
-+session.gc_divisor = 1000
-+session.gc_maxlifetime = 1440
-+session.bug_compat_42 = 0
-+session.bug_compat_warn = 1
-+session.referer_check =
-+session.entropy_length = 16
-+session.entropy_file = /dev/urandom
-+session.cache_limiter = nocache
-+session.cache_expire = 180
-+session.use_trans_sid = 0';
-+
-+$config_file_handler = fopen($configdir.'php.ini', 'w');
-+fwrite($config_file_handler, $config_file_php_ini);
-+fclose($config_file_handler);
-+safe_exec('chown root:0 "'.$configdir.'php.ini"');
-+safe_exec('chmod 0644 "'.$configdir.'php.ini"');
-+?>
-\ No newline at end of file
-diff -Nru syscp-suexec/scripts/cron_tasks.php syscp-suphp/scripts/cron_tasks.php
---- syscp-suexec/scripts/cron_tasks.php 2006-03-26 04:09:01.000000000 +0200
-+++ syscp-suphp/scripts/cron_tasks.php 2006-03-26 04:11:22.000000000 +0200
-@@ -119,31 +119,14 @@
- }
- if($domain['php_engine'] == '1')
- {
-- $vhosts_file.=' php_admin_flag engine On'."\n";
-- if($domain['openbasedir'] == '1')
-- {
-- $vhosts_file.=' php_admin_value open_basedir "'.$domain['documentroot']."\"\n";
-- }
-- if($domain['safemode'] == '1')
-- {
-- $vhosts_file.=' php_admin_flag safe_mode On '."\n";
-- }
-- if($domain['safemode'] == '0')
-- {
-- $vhosts_file.=' php_admin_flag safe_mode Off '."\n";
-- }
-- if($domain['php_errordisplay'] == '1')
-- {
-- $vhosts_file.=' php_admin_flag display_errors On '."\n";
-- }
-- if($domain['php_errordisplay'] == '0')
-- {
-- $vhosts_file.=' php_admin_flag display_errors Off '."\n";
-- }
-+ $vhosts_file.=' suPHP_Engine On'."\n";
-+ $vhosts_file.=' suPHP_UserGroup '.$domain['loginname'].' '.$domain['loginname']."\n";
-+ include 'create_suphp_inis.php';
-+ $vhosts_file.=' suPHP_ConfigPath "'.$configdir."\"\n";
- }
- if($domain['php_engine'] == '0')
- {
-- $vhosts_file.=' php_admin_flag engine Off'."\n";
-+ $vhosts_file.=' suPHP_Engine Off'."\n";
- }
-
- if(!is_dir($domain['documentroot']))
-@@ -198,6 +181,8 @@
- safe_exec('chown -R '.$row['data']['uid'].':'.$row['data']['gid'].' "'.$settings['system']['documentroot_prefix'].$row['data']['loginname'].'"');
- safe_exec('chown -R '.$settings['system']['vmail_uid'].':'.$settings['system']['vmail_gid'].' "'.$settings['system']['vmail_homedir'].$row['data']['loginname'].'"');
- safe_exec('chmod 0750 "'.$settings['system']['vmail_homedir'].$row['data']['loginname'].'"');
-+ safe_exec('chown '.$row['data']['uid'].':apache "'.$settings['system']['documentroot_prefix'].$row['data']['loginname'].'"');
-+ safe_exec('chmod 0750 "'.$settings['system']['documentroot_prefix'].$row['data']['loginname'].'"');
- }
- }
-
-@@ -273,6 +258,20 @@
- $diroptions_file .= ' Options -ExecCGI'."\n";
- fwrite( $debugHandler, ' cron_tasks: Task3 - Setting Options -ExecCGI');
- }
-+ if ( isset ( $row_diroptions['options_phpversionselect'] ) && $row_diroptions['options_phpversionselect'] == '5' )
-+ {
-+ $diroptions_file .= ' AddType application/x-httpd-php5 .php .php5 .php4 .php3 .phtml'."\n";
-+ $diroptions_file .= ' AddHandler x-httpd-php5 .php .php5 .php4 .php3 .phtml'."\n";
-+ $diroptions_file .= ' suPHP_AddHandler x-httpd-php5'."\n";
-+ fwrite( $debugHandler, ' cron_tasks: Task3 - Setting PHP version to 5');
-+ }
-+ if ( isset ( $row_diroptions['options_phpversionselect'] ) && $row_diroptions['options_phpversionselect'] == '4' )
-+ {
-+ $diroptions_file .= ' AddType application/x-httpd-php4 .php .php5 .php4 .php3 .phtml'."\n";
-+ $diroptions_file .= ' AddHandler x-httpd-php4 .php .php5 .php4 .php3 .phtml'."\n";
-+ $diroptions_file .= ' suPHP_AddHandler x-httpd-php4'."\n";
-+ fwrite( $debugHandler, ' cron_tasks: Task3 - Setting PHP version to 4');
-+ }
- if ( isset ( $row_diroptions['error404path'] ) && $row_diroptions['error404path'] != '')
- {
- $diroptions_file .= ' ErrorDocument 404 "'.$row_diroptions['error404path']."\"\n";
-diff -Nru syscp-suexec/templates/customer/extras/htaccess_add.tpl syscp-suphp/templates/customer/extras/htaccess_add.tpl
---- syscp-suexec/templates/customer/extras/htaccess_add.tpl 2006-03-26 04:08:39.000000000 +0200
-+++ syscp-suphp/templates/customer/extras/htaccess_add.tpl 2006-03-26 04:11:22.000000000 +0200
-@@ -20,6 +20,10 @@
- <td class="install_campodisplay" nowrap="nowrap">$options_execcgi</td>
- </tr>
- <tr>
-+ <td class="install_nomecampo"><b>{$lng['extras']['directory_phpversionselect']}:</b></td>
-+ <td class="install_campodisplay" nowrap="nowrap">$options_phpversionselect</td>
-+ </tr>
-+ <tr>
- <td class="install_nomecampo"><b>{$lng['extras']['errordocument404path']}:</b><br />{$lng['panel']['emptyfordefault']}</td>
- <td class="install_campodisplay" nowrap="nowrap"><input type="text" name="error404path" value="" maxlength="50" /></td>
- </tr>
-diff -Nru syscp-suexec/templates/customer/extras/htaccess_edit.tpl syscp-suphp/templates/customer/extras/htaccess_edit.tpl
---- syscp-suexec/templates/customer/extras/htaccess_edit.tpl 2006-03-26 04:08:39.000000000 +0200
-+++ syscp-suphp/templates/customer/extras/htaccess_edit.tpl 2006-03-26 04:11:22.000000000 +0200
-@@ -21,6 +21,10 @@
- <td class="install_campodisplay" nowrap="nowrap">$options_execcgi</td>
- </tr>
- <tr>
-+ <td class="install_nomecampo"><b>{$lng['extras']['directory_phpversionselect']}:</b></td>
-+ <td class="install_campodisplay" nowrap="nowrap">$options_phpversionselect</td>
-+ </tr>
-+ <tr>
- <td class="install_nomecampo"><b>{$lng['extras']['errordocument404path']}:</b><br />{$lng['panel']['emptyfordefault']}</td>
- <td class="install_campodisplay" nowrap="nowrap"><input type="text" name="error404path" value="{$result['error404path']}" maxlength="50" /></td>
- </tr>
-diff -Nru syscp-suexec/templates/customer/extras/htaccess_htaccess.tpl syscp-suphp/templates/customer/extras/htaccess_htaccess.tpl
---- syscp-suexec/templates/customer/extras/htaccess_htaccess.tpl 2006-03-26 04:08:39.000000000 +0200
-+++ syscp-suphp/templates/customer/extras/htaccess_htaccess.tpl 2006-03-26 04:11:22.000000000 +0200
-@@ -2,6 +2,7 @@
- <td class="nomecampo_bordosx">{$row['path']}</td>
- <td class="nomecampo">{$row['options_indexes']}</td>
- <td class="nomecampo">{$row['options_execcgi']}</td>
-+ <td class="nomecampo">{$row['options_phpversionselect']}</td>
- <td class="nomecampo">{$row['error404path']}</td>
- <td class="nomecampo">{$row['error403path']}</td>
- <td class="nomecampo">{$row['error500path']}</td>
-diff -Nru syscp-suexec/templates/customer/extras/htaccess.tpl syscp-suphp/templates/customer/extras/htaccess.tpl
---- syscp-suexec/templates/customer/extras/htaccess.tpl 2006-03-26 04:08:39.000000000 +0200
-+++ syscp-suphp/templates/customer/extras/htaccess.tpl 2006-03-26 04:11:22.000000000 +0200
-@@ -1,12 +1,13 @@
- $header
- <table cellpadding="5" cellspacing="0" border="0" align="center" class="install_tabella">
- <tr>
-- <td class="install_titolo" colspan="8"><b><img src="../images/titolo.gif" alt="" />&nbsp;{$lng['menue']['extras']['pathoptions']}</b></td>
-+ <td class="install_titolo" colspan="9"><b><img src="../images/titolo.gif" alt="" />&nbsp;{$lng['menue']['extras']['pathoptions']}</b></td>
- </tr>
- <tr>
- <td class="campodisplay_bordosx">{$lng['panel']['path']}</td>
- <td class="campodisplay">{$lng['extras']['view_directory']}</td>
- <td class="campodisplay">{$lng['extras']['view_execcgi']}</td>
-+ <td class="campodisplay">{$lng['extras']['view_phpversionselect']}</td>
- <td class="campodisplay">{$lng['extras']['error404path']}</td>
- <td class="campodisplay">{$lng['extras']['error403path']}</td>
- <td class="campodisplay">{$lng['extras']['error500path']}</td>
-@@ -14,7 +15,7 @@
- </tr>
- $htaccess
- <tr>
-- <td class="campodisplay_bordosx" colspan="8"><a href="$filename?page=htaccess&amp;action=add&amp;s=$s">{$lng['extras']['pathoptions_add']}</a></td>
-+ <td class="campodisplay_bordosx" colspan="9"><a href="$filename?page=htaccess&amp;action=add&amp;s=$s">{$lng['extras']['pathoptions_add']}</a></td>
- </tr>
- </table>
- <br />