Changeset 1257
- Timestamp:
- 07/02/08 01:35:12
(2 months ago)
- Author:
- rats
- Message:
* Dropped PHP4 Support
* Fixed #1374: apache2-suexec new in Lenny
* Fixed #1363: Domain Aliase at Root - Wrong in apache2 - ispcp.conf
* Fixed #1179: Changing domain_default_page and errordocs templates
* Fixed #1368: SQL syntax in reseller_user_statistics.php
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r1256 |
r1257 |
|
| 3 | 3 | |
|---|
| 4 | 4 | 2008-07-02 Benedikt Heintel |
|---|
| | 5 | - CONFIG: |
|---|
| | 6 | * Dropped PHP4 Support |
|---|
| | 7 | - DOCS: |
|---|
| | 8 | * Fixed #1374: apache2-suexec new in Lenny |
|---|
| | 9 | - ENGINE: |
|---|
| | 10 | * Fixed #1363: Domain Aliase at Root - Wrong in apache2 - ispcp.conf |
|---|
| | 11 | - GUI: |
|---|
| | 12 | * Fixed #1179: Changing domain_default_page and errordocs templates |
|---|
| | 13 | * Fixed #1368: SQL syntax in reseller_user_statistics.php |
|---|
| 5 | 14 | - TOOLS: |
|---|
| 6 | 15 | * Updated HTMLpurifier to version 3.1.1 |
|---|
| r1106 |
r1257 |
|
| 58 | 58 | perl-base |
|---|
| 59 | 59 | perl-modules |
|---|
| 60 | | php4 |
|---|
| 61 | | php4-cgi |
|---|
| 62 | | php4-gd |
|---|
| 63 | | php4-mcrypt |
|---|
| 64 | | php4-mysql |
|---|
| 65 | | php4-pear |
|---|
| 66 | 60 | php5-cgi |
|---|
| 67 | 61 | php5-gd |
|---|
| r1176 |
r1257 |
|
| 2 | 2 | apache2 |
|---|
| 3 | 3 | apache2.2-common |
|---|
| | 4 | apache2-suexec |
|---|
| | 5 | apache2-suexec-custom |
|---|
| 4 | 6 | apache2-utils |
|---|
| 5 | 7 | awstats |
|---|
| r1106 |
r1257 |
|
| 54 | 54 | perl-base |
|---|
| 55 | 55 | perl-modules |
|---|
| 56 | | php4 |
|---|
| 57 | | php4-cgi |
|---|
| 58 | | php4-gd |
|---|
| 59 | | php4-mcrypt |
|---|
| 60 | | php4-mysql |
|---|
| 61 | | php4-pear |
|---|
| 62 | 56 | php5-cgi |
|---|
| 63 | 57 | php5-gd |
|---|
| r1026 |
r1257 |
|
| 52 | 52 | pcre |
|---|
| 53 | 53 | pdflib |
|---|
| 54 | | php4-bz2 |
|---|
| 55 | | php4-core |
|---|
| 56 | | php4-curl |
|---|
| 57 | | php4-dbx |
|---|
| 58 | | php4-domxml |
|---|
| 59 | | php4-extensions |
|---|
| 60 | | php4-filepro |
|---|
| 61 | | php4-gd-4.4.1p5-no_x11 |
|---|
| 62 | | php4-gmp |
|---|
| 63 | | php4-imap |
|---|
| 64 | | php4-mcrypt |
|---|
| 65 | | php4-mhash |
|---|
| 66 | | php4-mysql |
|---|
| 67 | | php4-pdf |
|---|
| 68 | | php4-pear |
|---|
| 69 | | php4-shmop |
|---|
| 70 | | php4-xmlrpc |
|---|
| 71 | | php4-xslt |
|---|
| | 54 | php5-bz2 |
|---|
| | 55 | php5-core |
|---|
| | 56 | php5-curl |
|---|
| | 57 | php5-dbx |
|---|
| | 58 | php5-domxml |
|---|
| | 59 | php5-extensions |
|---|
| | 60 | php5-filepro |
|---|
| | 61 | php5-gd-4.4.1p5-no_x11 |
|---|
| | 62 | php5-gmp |
|---|
| | 63 | php5-imap |
|---|
| | 64 | php5-mcrypt |
|---|
| | 65 | php5-mhash |
|---|
| | 66 | php5-mysql |
|---|
| | 67 | php5-pdf |
|---|
| | 68 | php5-pear |
|---|
| | 69 | php5-shmop |
|---|
| | 70 | php5-xmlrpc |
|---|
| | 71 | php5-xslt |
|---|
| 72 | 72 | png |
|---|
| 73 | 73 | postfix-2.3.7-sasl2 |
|---|
| r973 |
r1257 |
|
| 2 | 2 | apache2-mod_auth_mysql |
|---|
| 3 | 3 | apache2-mod_perl |
|---|
| 4 | | apache2-mod_php4 |
|---|
| | 4 | apache2-mod_php5 |
|---|
| 5 | 5 | apache2-prefork |
|---|
| 6 | 6 | libapr0 |
|---|
| 7 | | php4 |
|---|
| 8 | | php4-bcmath |
|---|
| 9 | | php4-bz2 |
|---|
| 10 | | php4-calendar |
|---|
| 11 | | php4-ctype |
|---|
| 12 | | php4-curl |
|---|
| 13 | | php4-dbase |
|---|
| 14 | | php4-dbx |
|---|
| 15 | | php4-domxml |
|---|
| 16 | | php4-exif |
|---|
| 17 | | php4-filepro |
|---|
| 18 | | php4-ftp |
|---|
| 19 | | php4-gd |
|---|
| 20 | | php4-gettext |
|---|
| 21 | | php4-gmp |
|---|
| 22 | | php4-iconv |
|---|
| 23 | | php4-imap |
|---|
| 24 | | php4-ldap |
|---|
| 25 | | php4-mbstring |
|---|
| 26 | | php4-mcal |
|---|
| 27 | | php4-mcrypt |
|---|
| 28 | | php4-mhash |
|---|
| 29 | | php4-mime_magic |
|---|
| 30 | | php4-mysql |
|---|
| 31 | | php4-pear |
|---|
| 32 | | php4-pear-log |
|---|
| 33 | | php4-pgsql |
|---|
| 34 | | php4-qtdom |
|---|
| 35 | | php4-session |
|---|
| 36 | | php4-shmop |
|---|
| 37 | | php4-snmp |
|---|
| 38 | | php4-sockets |
|---|
| 39 | | php4-sysvsem |
|---|
| 40 | | php4-sysvshm |
|---|
| 41 | | php4-unixODBC |
|---|
| 42 | | php4-wddx |
|---|
| 43 | | php4-xslt |
|---|
| 44 | | php4-yp |
|---|
| 45 | | php4-zlib |
|---|
| | 7 | php5 |
|---|
| | 8 | php5-bcmath |
|---|
| | 9 | php5-bz2 |
|---|
| | 10 | php5-calendar |
|---|
| | 11 | php5-ctype |
|---|
| | 12 | php5-curl |
|---|
| | 13 | php5-dbase |
|---|
| | 14 | php5-dbx |
|---|
| | 15 | php5-domxml |
|---|
| | 16 | php5-exif |
|---|
| | 17 | php5-filepro |
|---|
| | 18 | php5-ftp |
|---|
| | 19 | php5-gd |
|---|
| | 20 | php5-gettext |
|---|
| | 21 | php5-gmp |
|---|
| | 22 | php5-iconv |
|---|
| | 23 | php5-imap |
|---|
| | 24 | php5-ldap |
|---|
| | 25 | php5-mbstring |
|---|
| | 26 | php5-mcal |
|---|
| | 27 | php5-mcrypt |
|---|
| | 28 | php5-mhash |
|---|
| | 29 | php5-mime_magic |
|---|
| | 30 | php5-mysql |
|---|
| | 31 | php5-pear |
|---|
| | 32 | php5-pear-log |
|---|
| | 33 | php5-pgsql |
|---|
| | 34 | php5-qtdom |
|---|
| | 35 | php5-session |
|---|
| | 36 | php5-shmop |
|---|
| | 37 | php5-snmp |
|---|
| | 38 | php5-sockets |
|---|
| | 39 | php5-sysvsem |
|---|
| | 40 | php5-sysvshm |
|---|
| | 41 | php5-unixODBC |
|---|
| | 42 | php5-wddx |
|---|
| | 43 | php5-xslt |
|---|
| | 44 | php5-yp |
|---|
| | 45 | php5-zlib |
|---|
| 46 | 46 | postfix |
|---|
| 47 | 47 | amavisd-new |
|---|
| r1106 |
r1257 |
|
| 53 | 53 | perl-base |
|---|
| 54 | 54 | perl-modules |
|---|
| 55 | | php4 |
|---|
| 56 | | php4-cgi |
|---|
| 57 | | php4-gd |
|---|
| 58 | | php4-mcrypt |
|---|
| 59 | | php4-mysql |
|---|
| 60 | | php4-pear |
|---|
| 61 | | php4-idn |
|---|
| 62 | 55 | php5-cgi |
|---|
| 63 | 56 | php5-gd |
|---|
| r1195 |
r1257 |
|
| 724 | 724 | push_el(\@main::el, 'als_entry:', "$als_e"); |
|---|
| 725 | 725 | |
|---|
| | 726 | if ($mount_point == "/") { |
|---|
| | 727 | $mount_point = ""; |
|---|
| | 728 | } |
|---|
| | 729 | |
|---|
| 726 | 730 | my ($suexec_uid, $suexec_gid) = get_dmn_suexec_user($dmn_id); |
|---|
| 727 | 731 | my $suexec_user_pref = $main::cfg{'APACHE_SUEXEC_USER_PREF'}; |
|---|
| r1201 |
r1257 |
|
| 1377 | 1377 | # PHP4 and PHP5 Directory for usual user |
|---|
| 1378 | 1378 | # |
|---|
| 1379 | | if (! -d "$starter_dir/$dmn_name/php4") { |
|---|
| 1380 | | $rs = make_dir( |
|---|
| 1381 | | "$starter_dir/$dmn_name/php4", |
|---|
| 1382 | | $sys_user, |
|---|
| 1383 | | $sys_group, |
|---|
| 1384 | | 0750 |
|---|
| 1385 | | ); |
|---|
| 1386 | | return $rs if ($rs != 0); |
|---|
| 1387 | | } |
|---|
| | 1379 | #if (! -d "$starter_dir/$dmn_name/php4") { |
|---|
| | 1380 | # $rs = make_dir( |
|---|
| | 1381 | # "$starter_dir/$dmn_name/php4", |
|---|
| | 1382 | # $sys_user, |
|---|
| | 1383 | # $sys_group, |
|---|
| | 1384 | # 0750 |
|---|
| | 1385 | # ); |
|---|
| | 1386 | # return $rs if ($rs != 0); |
|---|
| | 1387 | #} |
|---|
| 1388 | 1388 | if (! -d "$starter_dir/$dmn_name/php5") { |
|---|
| 1389 | 1389 | $rs = make_dir( |
|---|
| … | … | |
| 1570 | 1570 | return $rs if ($rs != 0); |
|---|
| 1571 | 1571 | |
|---|
| 1572 | | $rs = sys_command("$main::cfg{'CMD_CP'} -rp $root_dir/gui/domain_default_page/images $www_dir/$dmn_name/htdocs/"); |
|---|
| 1573 | | return $rs if ($rs != 0); |
|---|
| 1574 | | |
|---|
| 1575 | | $rs = setfmode("$www_dir/$dmn_name/htdocs/images/", $sys_user, $sys_group, 0755); |
|---|
| 1576 | | return $rs if ($rs != 0); |
|---|
| 1577 | | |
|---|
| 1578 | | $rs = setfmode("$www_dir/$dmn_name/htdocs/images/top_left_bg.jpg", $sys_user, $sys_group, 0644); |
|---|
| 1579 | | return $rs if ($rs != 0); |
|---|
| 1580 | | |
|---|
| 1581 | | $rs = setfmode("$www_dir/$dmn_name/htdocs/images/top_left.jpg", $sys_user, $sys_group, 0644); |
|---|
| 1582 | | return $rs if ($rs != 0); |
|---|
| 1583 | | |
|---|
| 1584 | | $rs = setfmode("$www_dir/$dmn_name/htdocs/images/top_right.jpg", $sys_user, $sys_group, 0644); |
|---|
| 1585 | | return $rs if ($rs != 0); |
|---|
| 1586 | | |
|---|
| 1587 | | $rs = setfmode("$www_dir/$dmn_name/htdocs/images/top_bg.jpg", $sys_user, $sys_group, 0644); |
|---|
| 1588 | | return $rs if ($rs != 0); |
|---|
| 1589 | | |
|---|
| 1590 | | $rs = setfmode("$www_dir/$dmn_name/htdocs/images/valid_css.jpg", $sys_user, $sys_group, 0644); |
|---|
| 1591 | | return $rs if ($rs != 0); |
|---|
| 1592 | | |
|---|
| 1593 | | $rs = setfmode("$www_dir/$dmn_name/htdocs/images/valid_xhtml.jpg", $sys_user, $sys_group, 0644); |
|---|
| | 1572 | $rs = sys_command("$main::cfg{'CMD_CP'} -Rp $root_dir/gui/domain_default_page/images $www_dir/$dmn_name/htdocs/"); |
|---|
| | 1573 | return $rs if ($rs != 0); |
|---|
| | 1574 | |
|---|
| | 1575 | $rs = setfmode("$www_dir/$dmn_name/htdocs/images/*", $sys_user, $sys_group, 0755); |
|---|
| 1594 | 1576 | return $rs if ($rs != 0); |
|---|
| 1595 | 1577 | } |
|---|
| … | … | |
| 1598 | 1580 | # php.ini for the new domain |
|---|
| 1599 | 1581 | # |
|---|
| 1600 | | if (!(-e "$starter_dir/$dmn_name/php4/php.ini")) { |
|---|
| 1601 | | my $ini_tpl = undef; |
|---|
| 1602 | | my $ini_cfg_dir = "$main::cfg{'CONF_DIR'}/fcgi/parts/php4"; |
|---|
| 1603 | | ($rs, $ini_tpl) = get_tpl($ini_cfg_dir, 'php.ini'); |
|---|
| 1604 | | return $rs if ($rs != 0); |
|---|
| 1605 | | |
|---|
| 1606 | | my %tag_hash = ( |
|---|
| 1607 | | '{PEAR_DIR}' => $pear_dir, |
|---|
| 1608 | | '{WWW_DIR}' => $www_dir, |
|---|
| 1609 | | '{DMN_NAME}' => $dmn_name |
|---|
| 1610 | | ); |
|---|
| 1611 | | ($rs, $cfg) = prep_tpl(\%tag_hash, $ini_tpl); |
|---|
| 1612 | | |
|---|
| 1613 | | push_el(\@main::el, 'DEBUG', $cfg); |
|---|
| 1614 | | return $rs if ($rs != 0); |
|---|
| 1615 | | |
|---|
| 1616 | | ($rs, $rdata) = store_file( |
|---|
| 1617 | | "$starter_dir/$dmn_name/php4/php.ini", |
|---|
| 1618 | | $cfg, |
|---|
| 1619 | | $sys_user, |
|---|
| 1620 | | $sys_group, |
|---|
| 1621 | | 0640 |
|---|
| 1622 | | ); |
|---|
| 1623 | | return $rs if ($rs != 0); |
|---|
| 1624 | | } |
|---|
| | 1582 | #if (!(-e "$starter_dir/$dmn_name/php4/php.ini")) { |
|---|
| | 1583 | # my $ini_tpl = undef; |
|---|
| | 1584 | # my $ini_cfg_dir = "$main::cfg{'CONF_DIR'}/fcgi/parts/php4"; |
|---|
| | 1585 | # ($rs, $ini_tpl) = get_tpl($ini_cfg_dir, 'php.ini'); |
|---|
| | 1586 | # return $rs if ($rs != 0); |
|---|
| | 1587 | # |
|---|
| | 1588 | # my %tag_hash = ( |
|---|
| | 1589 | # '{PEAR_DIR}' => $pear_dir, |
|---|
| | 1590 | # '{WWW_DIR}' => $www_dir, |
|---|
| | 1591 | # '{DMN_NAME}' => $dmn_name |
|---|
| | 1592 | # ); |
|---|
| | 1593 | # ($rs, $cfg) = prep_tpl(\%tag_hash, $ini_tpl); |
|---|
| | 1594 | # |
|---|
| | 1595 | # push_el(\@main::el, 'DEBUG', $cfg); |
|---|
| | 1596 | # return $rs if ($rs != 0); |
|---|
| | 1597 | # |
|---|
| | 1598 | # ($rs, $rdata) = store_file( |
|---|
| | 1599 | # "$starter_dir/$dmn_name/php4/php.ini", |
|---|
| | 1600 | # $cfg, |
|---|
| | 1601 | # $sys_user, |
|---|
| | 1602 | # $sys_group, |
|---|
| | 1603 | # 0640 |
|---|
| | 1604 | # ); |
|---|
| | 1605 | # return $rs if ($rs != 0); |
|---|
| | 1606 | #} |
|---|
| 1625 | 1607 | if (!(-e "$starter_dir/$dmn_name/php5/php.ini")) { |
|---|
| 1626 | 1608 | my $ini_tpl = undef; |
|---|
| … | … | |
| 1674 | 1656 | return $rs if ($rs != 0); |
|---|
| 1675 | 1657 | } |
|---|
| 1676 | | if (!(-e "$starter_dir/$dmn_name/php4-fcgi-starter")) { |
|---|
| 1677 | | my $starter_tpl = undef; |
|---|
| 1678 | | my $cfg_dir = "$main::cfg{'CONF_DIR'}/fcgi/parts"; |
|---|
| 1679 | | |
|---|
| 1680 | | ($rs, $starter_tpl) = get_tpl($cfg_dir, 'php4-fcgi-starter.tpl'); |
|---|
| 1681 | | return $rs if ($rs != 0); |
|---|
| 1682 | | |
|---|
| 1683 | | my %tag_hash = ( |
|---|
| 1684 | | '{PHP_STARTER_DIR}' => $starter_dir, |
|---|
| 1685 | | '{PHP4_FASTCGI_BIN}' => $main::cfg{'PHP4_FASTCGI_BIN'}, |
|---|
| 1686 | | '{DMN_NAME}' => $dmn_name |
|---|
| 1687 | | ); |
|---|
| 1688 | | ($rs, $cfg) = prep_tpl(\%tag_hash, $starter_tpl); |
|---|
| 1689 | | return $rs if ($rs != 0); |
|---|
| 1690 | | |
|---|
| 1691 | | ($rs, $rdata) = store_file( |
|---|
| 1692 | | "$starter_dir/$dmn_name/php4-fcgi-starter", |
|---|
| 1693 | | $cfg, |
|---|
| 1694 | | $sys_user, |
|---|
| 1695 | | $sys_group, |
|---|
| 1696 | | 0750 |
|---|
| 1697 | | ); |
|---|
| 1698 | | return $rs if ($rs != 0); |
|---|
| 1699 | | } |
|---|
| | 1658 | #if (!(-e "$starter_dir/$dmn_name/php4-fcgi-starter")) { |
|---|
| | 1659 | # my $starter_tpl = undef; |
|---|
| | 1660 | # my $cfg_dir = "$main::cfg{'CONF_DIR'}/fcgi/parts"; |
|---|
| | 1661 | # |
|---|
| | 1662 | # ($rs, $starter_tpl) = get_tpl($cfg_dir, 'php4-fcgi-starter.tpl'); |
|---|
| | 1663 | # return $rs if ($rs != 0); |
|---|
| | 1664 | # |
|---|
| | 1665 | # my %tag_hash = ( |
|---|
| | 1666 | # '{PHP_STARTER_DIR}' => $starter_dir, |
|---|
| | 1667 | # '{PHP4_FASTCGI_BIN}' => $main::cfg{'PHP4_FASTCGI_BIN'}, |
|---|
| | 1668 | # '{DMN_NAME}' => $dmn_name |
|---|
| | 1669 | # ); |
|---|
| | 1670 | # ($rs, $cfg) = prep_tpl(\%tag_hash, $starter_tpl); |
|---|
| | 1671 | # return $rs if ($rs != 0); |
|---|
| | 1672 | # |
|---|
| | 1673 | # ($rs, $rdata) = store_file( |
|---|
| | 1674 | # "$starter_dir/$dmn_name/php4-fcgi-starter", |
|---|
| | 1675 | # $cfg, |
|---|
| | 1676 | # $sys_user, |
|---|
| | 1677 | # $sys_group, |
|---|
| | 1678 | # 0750 |
|---|
| | 1679 | # ); |
|---|
| | 1680 | # return $rs if ($rs != 0); |
|---|
| | 1681 | #} |
|---|
| 1700 | 1682 | |
|---|
| 1701 | 1683 | push_el(\@main::el, 'dmn_add_httpd_file_data()', 'Ending...'); |
|---|
| … | … | |
| 1740 | 1722 | # PHP4 and PHP5 Directory for usual user |
|---|
| 1741 | 1723 | # |
|---|
| 1742 | | if (! -d "$starter_dir/$dmn_name/php4") { |
|---|
| 1743 | | $rs = make_dir("$starter_dir/$dmn_name/php4", $sys_user, $sys_group, 0750); |
|---|
| 1744 | | return $rs if ($rs != 0); |
|---|
| 1745 | | } |
|---|
| | 1724 | #if (! -d "$starter_dir/$dmn_name/php4") { |
|---|
| | 1725 | # $rs = make_dir("$starter_dir/$dmn_name/php4", $sys_user, $sys_group, 0750); |
|---|
| | 1726 | # return $rs if ($rs != 0); |
|---|
| | 1727 | #} |
|---|
| 1746 | 1728 | if (! -d "$starter_dir/$dmn_name/php5") { |
|---|
| 1747 | 1729 | $rs = make_dir("$starter_dir/$dmn_name/php5", $sys_user, $sys_group, 0750); |
|---|
| … | … | |
| 1826 | 1808 | # php.ini for the domain |
|---|
| 1827 | 1809 | # |
|---|
| 1828 | | if (! (-e "$starter_dir/$dmn_name/php4/php.ini")) { |
|---|
| | 1810 | #if (! (-e "$starter_dir/$dmn_name/php4/php.ini")) { |
|---|
| | 1811 | # my $ini_tpl = undef; |
|---|
| | 1812 | # my $ini_cfg_dir = "$main::cfg{'CONF_DIR'}/fcgi/parts/php4"; |
|---|
| | 1813 | # ($rs, $ini_tpl) = get_tpl($ini_cfg_dir, 'php.ini'); |
|---|
| | 1814 | # return $rs if ($rs != 0); |
|---|
| | 1815 | # |
|---|
| | 1816 | # my %tag_hash = ( |
|---|
| | 1817 | # '{PEAR_DIR}' => $pear_dir, |
|---|
| | 1818 | # '{WWW_DIR}' => $www_dir, |
|---|
| | 1819 | # '{DMN_NAME}' => $dmn_name |
|---|
| | 1820 | # ); |
|---|
| | 1821 | # ($rs, $cfg) = prep_tpl(\%tag_hash, $ini_tpl); |
|---|
| | 1822 | # return $rs if ($rs != 0); |
|---|
| | 1823 | # |
|---|
| | 1824 | # ($rs, $rdata) = store_file("$starter_dir/$dmn_name/php4/php.ini", $cfg, $sys_user, $sys_group, 0640); |
|---|
| | 1825 | # return $rs if ($rs != 0); |
|---|
| | 1826 | #} |
|---|
| | 1827 | if (! (-e "$starter_dir/$dmn_name/php5/php.ini")) { |
|---|
| 1829 | 1828 | my $ini_tpl = undef; |
|---|
| 1830 | | my $ini_cfg_dir = "$main::cfg{'CONF_DIR'}/fcgi/parts/php4"; |
|---|
| | 1829 | my $ini_cfg_dir = "$main::cfg{'CONF_DIR'}/fcgi/parts/php5"; |
|---|
| | 1830 | |
|---|
| 1831 | 1831 | ($rs, $ini_tpl) = get_tpl($ini_cfg_dir, 'php.ini'); |
|---|
| 1832 | 1832 | return $rs if ($rs != 0); |
|---|
| … | … | |
| 1840 | 1840 | return $rs if ($rs != 0); |
|---|
| 1841 | 1841 | |
|---|
| 1842 | | ($rs, $rdata) = store_file("$starter_dir/$dmn_name/php4/php.ini", $cfg, $sys_user, $sys_group, 0640); |
|---|
| 1843 | | return $rs if ($rs != 0); |
|---|
| 1844 | | } |
|---|
| 1845 | | if (! (-e "$starter_dir/$dmn_name/php5/php.ini")) { |
|---|
| 1846 | | my $ini_tpl = undef; |
|---|
| 1847 | | my $ini_cfg_dir = "$main::cfg{'CONF_DIR'}/fcgi/parts/php5"; |
|---|
| 1848 | | |
|---|
| 1849 | | ($rs, $ini_tpl) = get_tpl($ini_cfg_dir, 'php.ini'); |
|---|
| 1850 | | return $rs if ($rs != 0); |
|---|
| 1851 | | |
|---|
| 1852 | | my %tag_hash = ( |
|---|
| 1853 | | '{PEAR_DIR}' => $pear_dir, |
|---|
| 1854 | | '{WWW_DIR}' => $www_dir, |
|---|
| 1855 | | '{DMN_NAME}' => $dmn_name |
|---|
| 1856 | | ); |
|---|
| 1857 | | ($rs, $cfg) = prep_tpl(\%tag_hash, $ini_tpl); |
|---|
| 1858 | | return $rs if ($rs != 0); |
|---|
| 1859 | | |
|---|
| 1860 | 1842 | ($rs, $rdata) = store_file("$starter_dir/$dmn_name/php5/php.ini", $cfg, $sys_user, $sys_group, 0640); |
|---|
| 1861 | 1843 | return $rs if ($rs != 0); |
|---|
| … | … | |
| 1882 | 1864 | return $rs if ($rs != 0); |
|---|
| 1883 | 1865 | } |
|---|
| 1884 | | if (!(-e "$starter_dir/$dmn_name/php4-fcgi-starter")) { |
|---|
| 1885 | | my $starter_tpl = undef; |
|---|
| 1886 | | my $cfg_dir = "$main::cfg{'CONF_DIR'}/fcgi/parts"; |
|---|
| 1887 | | |
|---|
| 1888 | | ($rs, $starter_tpl) = get_tpl($cfg_dir, 'php4-fcgi-starter.tpl'); |
|---|
| 1889 | | return $rs if ($rs != 0); |
|---|
| 1890 | | |
|---|
| 1891 | | my %tag_hash = ( |
|---|
| 1892 | | '{PHP_STARTER_DIR}' => $starter_dir, |
|---|
| 1893 | | '{PHP4_FASTCGI_BIN}' => $main::cfg{'PHP4_FASTCGI_BIN'}, |
|---|
| 1894 | | '{DMN_NAME}' => $dmn_name |
|---|
| 1895 | | ); |
|---|
| 1896 | | ($rs, $cfg) = prep_tpl(\%tag_hash, $starter_tpl); |
|---|
| 1897 | | return $rs if ($rs != 0); |
|---|
| 1898 | | |
|---|
| 1899 | | ($rs, $rdata) = store_file("$starter_dir/$dmn_name/php4-fcgi-starter", $cfg, $sys_user, $sys_group, 0750); |
|---|
| 1900 | | return $rs if ($rs != 0); |
|---|
| 1901 | | } |
|---|
| | 1866 | #if (!(-e "$starter_dir/$dmn_name/php4-fcgi-starter")) { |
|---|
| | 1867 | # my $starter_tpl = undef; |
|---|
| | 1868 | # my $cfg_dir = "$main::cfg{'CONF_DIR'}/fcgi/parts"; |
|---|
| | 1869 | # |
|---|
| | 1870 | # ($rs, $starter_tpl) = get_tpl($cfg_dir, 'php4-fcgi-starter.tpl'); |
|---|
| | 1871 | # return $rs if ($rs != 0); |
|---|
| | 1872 | # |
|---|
| | 1873 | # my %tag_hash = ( |
|---|
| | 1874 | # '{PHP_STARTER_DIR}' => $starter_dir, |
|---|
| | 1875 | # '{PHP4_FASTCGI_BIN}' => $main::cfg{'PHP4_FASTCGI_BIN'}, |
|---|
| | 1876 | # '{DMN_NAME}' => $dmn_name |
|---|
| | 1877 | # ); |
|---|
| | 1878 | # ($rs, $cfg) = prep_tpl(\%tag_hash, $starter_tpl); |
|---|
| | 1879 | # return $rs if ($rs != 0); |
|---|
| | 1880 | # |
|---|
| | 1881 | # ($rs, $rdata) = store_file("$starter_dir/$dmn_name/php4-fcgi-starter", $cfg, $sys_user, $sys_group, 0750); |
|---|
| | 1882 | # return $rs if ($rs != 0); |
|---|
| | 1883 | #} |
|---|
| 1902 | 1884 | |
|---|
| 1903 | 1885 | push_el(\@main::el, 'dmn_change_httpd_file_data()', 'Ending...'); |
|---|
| r1201 |
r1257 |
|
| 199 | 199 | |
|---|
| 200 | 200 | do { |
|---|
| 201 | | $rs = ask_php_version(); |
|---|
| 202 | | } while ($rs == 1); |
|---|
| 203 | | |
|---|
| 204 | | do { |
|---|
| 205 | 201 | $rs = ask_second_dns(); |
|---|
| 206 | 202 | } while ($rs == 1); |
|---|
| r1201 |
r1257 |
|
| 397 | 397 | |
|---|
| 398 | 398 | sub ask_second_dns { |
|---|
| 399 | | push_el(\@main::el, 'ask_php_version()', 'Starting...'); |
|---|
| | 399 | push_el(\@main::el, 'ask_second_dns()', 'Starting...'); |
|---|
| 400 | 400 | |
|---|
| 401 | 401 | my $rdata = undef; |
|---|
| … | … | |
| 420 | 420 | } |
|---|
| 421 | 421 | |
|---|
| 422 | | push_el(\@main::el, 'ask_php_version()', 'Ending...'); |
|---|
| | 422 | push_el(\@main::el, 'ask_second_dns()', 'Ending...'); |
|---|
| 423 | 423 | return 0; |
|---|
| 424 | 424 | } |
|---|
| 425 | 425 | |
|---|
| 426 | 426 | sub ask_mysql_prefix { |
|---|
| 427 | | push_el(\@main::el, 'ask_php_version()', 'Starting...'); |
|---|
| | 427 | push_el(\@main::el, 'ask_mysql_prefix()', 'Starting...'); |
|---|
| 428 | 428 | |
|---|
| 429 | 429 | my $rdata = undef; |
|---|
| … | … | |
| 454 | 454 | } |
|---|
| 455 | 455 | |
|---|
| 456 | | push_el(\@main::el, 'ask_php_version()', 'Ending...'); |
|---|
| | 456 | push_el(\@main::el, 'ask_mysql_prefix()', 'Ending...'); |
|---|
| 457 | 457 | return 0; |
|---|
| 458 | 458 | } |
|---|
| … | … | |
| 579 | 579 | |
|---|
| 580 | 580 | push_el(\@main::el, 'ask_awstats_dyn()', 'Ending...'); |
|---|
| 581 | | return 0; |
|---|
| 582 | | } |
|---|
| 583 | | |
|---|
| 584 | | # Set up PHP Version |
|---|
| 585 | | sub ask_php_version { |
|---|
| 586 | | |
|---|
| 587 | | my $rdata = undef; |
|---|
| 588 | | |
|---|
| 589 | | push_el(\@main::el, 'ask_php_version()', 'Starting...'); |
|---|
| 590 | | |
|---|
| 591 | | my $qmsg = "\n\tUse which PHP Version? (4 or 5). [5]: "; |
|---|
| 592 | | |
|---|
| 593 | | print STDOUT $qmsg; |
|---|
| 594 | | |
|---|
| 595 | | $rdata = readline(\*STDIN); |
|---|
| 596 | | chop($rdata); |
|---|
| 597 | | |
|---|
| 598 | | if (!defined($rdata) || $rdata eq '') { |
|---|
| 599 | | $main::ua{'php_version'} = '5'; |
|---|
| 600 | | } |
|---|
| 601 | | else { |
|---|
| 602 | | if ($rdata eq 'php4' || $rdata eq '4') { |
|---|
| 603 | | $main::ua{'php_version'} = '4'; |
|---|
| 604 | | } |
|---|
| 605 | | elsif ($rdata eq 'php5' || $rdata eq '5') { |
|---|
| 606 | | $main::ua{'php_version'} = '5'; |
|---|
| 607 | | } |
|---|
| 608 | | else { |
|---|
| 609 | | print STDOUT "\n\tOnly 'php(4)' and 'php(5)' are allowed!"; |
|---|
| 610 | | return 1; |
|---|
| 611 | | } |
|---|
| 612 | | } |
|---|
| 613 | | |
|---|
| 614 | | push_el(\@main::el, 'ask_php_version()', 'Ending...'); |
|---|
| 615 | 581 | return 0; |
|---|
| 616 | 582 | } |
|---|
| … | … | |
| 1068 | 1034 | |
|---|
| 1069 | 1035 | ## PHP4 Starter |
|---|
| 1070 | | ($rs, $cfg_tpl) = get_tpl($tpl_dir, 'php4-fcgi-starter.tpl'); |
|---|
| 1071 | | return $rs if ($rs != 0); |
|---|
| 1072 | | |
|---|
| 1073 | | %tag_hash = ( |
|---|
| 1074 | | '{PHP_STARTER_DIR}' => $main::cfg{'PHP_STARTER_DIR'}, |
|---|
| 1075 | | '{PHP4_FASTCGI_BIN}' => $main::cfg{'PHP4_FASTCGI_BIN'}, |
|---|
| 1076 | | '{DMN_NAME}' => "master" |
|---|
| 1077 | | ); |
|---|
| 1078 | | |
|---|
| 1079 | | ($rs, $cfg) = prep_tpl(\%tag_hash, $cfg_tpl); |
|---|
| 1080 | | return $rs if ($rs != 0); |
|---|
| 1081 | | |
|---|
| 1082 | | $rs = store_file("$bk_dir/php4-fcgi-starter.ispcp", $cfg, "$main::cfg{'APACHE_SUEXEC_USER_PREF'}"."$main::cfg{'APACHE_SUEXEC_MIN_UID'}", "$main::cfg{'APACHE_SUEXEC_USER_PREF'}". "$main::cfg{'APACHE_SUEXEC_MIN_GID'}", 0755); |
|---|
| 1083 | | return $rs if ($rs != 0); |
|---|
| 1084 | | |
|---|
| 1085 | | $cmd = "$main::cfg{'CMD_CP'} -p $bk_dir/php4-fcgi-starter.ispcp $main::cfg{'PHP_STARTER_DIR'}/master/php4-fcgi-starter"; |
|---|
| 1086 | | $rs = sys_command($cmd); |
|---|
| 1087 | | return $rs if ($rs != 0); |
|---|
| | 1036 | #($rs, $cfg_tpl) = get_tpl($tpl_dir, 'php4-fcgi-starter.tpl'); |
|---|
| | 1037 | #return $rs if ($rs != 0); |
|---|
| | 1038 | # |
|---|
| | 1039 | #%tag_hash = ( |
|---|
| | 1040 | # '{PHP_STARTER_DIR}' => $main::cfg{'PHP_STARTER_DIR'}, |
|---|
| | 1041 | # '{PHP4_FASTCGI_BIN}' => $main::cfg{'PHP4_FASTCGI_BIN'}, |
|---|
| | 1042 | # '{DMN_NAME}' => "master" |
|---|
| | 1043 | # ); |
|---|
| | 1044 | # |
|---|
| | 1045 | #($rs, $cfg) = prep_tpl(\%tag_hash, $cfg_tpl); |
|---|
| | 1046 | #return $rs if ($rs != 0); |
|---|
| | 1047 | # |
|---|
| | 1048 | #$rs = store_file("$bk_dir/php4-fcgi-starter.ispcp", $cfg, "$main::cfg{'APACHE_SUEXEC_USER_PREF'}"."$main::cfg{'APACHE_SUEXEC_MIN_UID'}", "$main::cfg{'APACHE_SUEXEC_USER_PREF'}". "$main::cfg{'APACHE_SUEXEC_MIN_GID'}", 0755); |
|---|
| | 1049 | #return $rs if ($rs != 0); |
|---|
| | 1050 | # |
|---|
| | 1051 | #$cmd = "$main::cfg{'CMD_CP'} -p $bk_dir/php4-fcgi-starter.ispcp $main::cfg{'PHP_STARTER_DIR'}/master/php4-fcgi-starter"; |
|---|
| | 1052 | #$rs = sys_command($cmd); |
|---|
| | 1053 | #return $rs if ($rs != 0); |
|---|
| 1088 | 1054 | |
|---|
| 1089 | 1055 | ## PHP5 Starter |
|---|
| … | … | |
| 1108 | 1074 | |
|---|
| 1109 | 1075 | ## php4.ini |
|---|
| 1110 | | ($rs, $cfg_tpl) = get_tpl($tpl_dir, '/php4/php.ini'); |
|---|
| 1111 | | return $rs if ($rs != 0); |
|---|
| 1112 | | |
|---|
| 1113 | | my $other_rk_log = $main::cfg{'OTHER_ROOTKIT_LOG'}; |
|---|
| 1114 | | |
|---|
| 1115 | | if ( $other_rk_log ne '' ) { |
|---|
| 1116 | | $other_rk_log = ':' . $other_rk_log; |
|---|
| 1117 | | } |
|---|
| 1118 | | |
|---|
| 1119 | | %tag_hash = ( |
|---|
| 1120 | | '{WWW_DIR}' => $main::cfg{'ROOT_DIR'}, |
|---|
| 1121 | | '{DMN_NAME}' => "gui", |
|---|
| 1122 | | '{MAIL_DMN}' => $main::cfg{'BASE_SERVER_VHOST'}, |
|---|
| 1123 | | '{CONF_DIR}' => $main::cfg{'CONF_DIR'}, |
|---|
| 1124 | | '{MR_LOCK_FILE}' => $main::cfg{'MR_LOCK_FILE'}, |
|---|
| 1125 | | '{PEAR_DIR}' => $main::cfg{'PEAR_DIR'}, |
|---|
| 1126 | | '{RKHUNTER_LOG}' => $main::cfg{'RKHUNTER_LOG'}, |
|---|
| 1127 | | '{CHKROOTKIT_LOG}' => $main::cfg{'CHKROOTKIT_LOG'}, |
|---|
| 1128 | | '{OTHER_ROOTKIT_LOG}' => $other_rk_log |
|---|
| 1129 | | ); |
|---|
| 1130 | | |
|---|
| 1131 | | ($rs, $cfg) = prep_tpl(\%tag_hash, $cfg_tpl); |
|---|
| 1132 | | return $rs if ($rs != 0); |
|---|
| 1133 | | |
|---|
| 1134 | | $rs = store_file("$main::cfg{'PHP_STARTER_DIR'}/master/php4/php.ini", $cfg, "$main::cfg{'APACHE_SUEXEC_USER_PREF'}"."$main::cfg{'APACHE_SUEXEC_MIN_UID'}", "$main::cfg{'APACHE_SUEXEC_USER_PREF'}"."$main::cfg{'APACHE_SUEXEC_MIN_GID'}", 0644); |
|---|
| 1135 | | |
|---|
| 1136 | | return $rs if ($rs != 0); |
|---|
| | 1076 | #($rs, $cfg_tpl) = get_tpl($tpl_dir, '/php4/php.ini'); |
|---|
| | 1077 | #return $rs if ($rs != 0); |
|---|
| | 1078 | # |
|---|
| | 1079 | #my $other_rk_log = $main::cfg{'OTHER_ROOTKIT_LOG'}; |
|---|
| | 1080 | # |
|---|
| | 1081 | #if ( $other_rk_log ne '' ) { |
|---|
| | 1082 | # $other_rk_log = ':' . $other_rk_log; |
|---|
| | 1083 | #} |
|---|
| | 1084 | # |
|---|
| | 1085 | #%tag_hash = ( |
|---|
| | 1086 | # '{WWW_DIR}' => $main::cfg{'ROOT_DIR'}, |
|---|
| | 1087 | # '{DMN_NAME}' => "gui", |
|---|
| | 1088 | # '{MAIL_DMN}' => $main::cfg{'BASE_SERVER_VHOST'}, |
|---|
| | 1089 | # '{CONF_DIR}' => $main::cfg{'CONF_DIR'}, |
|---|
| | 1090 | # '{MR_LOCK_FILE}' => $main::cfg{'MR_LOCK_FILE'}, |
|---|
| | 1091 | # '{PEAR_DIR}' => $main::cfg{'PEAR_DIR'}, |
|---|
| | 1092 | # '{RKHUNTER_LOG}' => $main::cfg{'RKHUNTER_LOG'}, |
|---|
| | 1093 | # '{CHKROOTKIT_LOG}' => $main::cfg{'CHKROOTKIT_LOG'}, |
|---|
| | 1094 | # '{OTHER_ROOTKIT_LOG}' => $other_rk_log |
|---|
| | 1095 | # ); |
|---|
| | 1096 | # |
|---|
| | 1097 | #($rs, $cfg) = prep_tpl(\%tag_hash, $cfg_tpl); |
|---|
| | 1098 | #return $rs if ($rs != 0); |
|---|
| | 1099 | # |
|---|
| | 1100 | #$rs = store_file("$main::cfg{'PHP_STARTER_DIR'}/master/php4/php.ini", $cfg, "$main::cfg{'APACHE_SUEXEC_USER_PREF'}"."$main::cfg{'APACHE_SUEXEC_MIN_UID'}", "$main::cfg{'APACHE_SUEXEC_USER_PREF'}"."$main::cfg{'APACHE_SUEXEC_MIN_GID'}", 0644); |
|---|
| | 1101 | # |
|---|
| | 1102 | #return $rs if ($rs != 0); |
|---|
| 1137 | 1103 | |
|---|
| 1138 | 1104 | ## php5.ini |
|---|
| r1224 |
r1257 |
|
| 780 | 780 | print STDOUT "\tUpgrading system values ..."; |
|---|
| 781 | 781 | |
|---|
| 782 | | # PHP Version |
|---|
| 783 | | do { |
|---|
| 784 | | $rs = ask_php_version(); |
|---|
| 785 | | } while ($rs == 1); |
|---|
| 786 | | |
|---|
| 787 | 782 | # AWStats questions |
|---|
| 788 | 783 | do { |
|---|
| r1255 |
r1257 |
|
| 92 | 92 | // |
|---|
| 93 | 93 | |
|---|
| | 94 | /** |
|---|
| | 95 | * Generates a random salt for passwords. |
|---|
| | 96 | * |
|---|
| | 97 | * @param int $min minimum ASCII char |
|---|
| | 98 | * @param int $max maximum ASCII char |
|---|
| | 99 | * @return string Salt for password |
|---|
| | 100 | */ |
|---|
| | 101 | function generate_rand_salt($min = 46, $max = 126) { |
|---|
| | 102 | if (CRYPT_BLOWFISH == 1) { |
|---|
| | 103 | $length = 13; |
|---|
| | 104 | $pre = '$2$'; |
|---|
| | 105 | } elseif (CRYPT_MD5 == 1) { |
|---|
| | 106 | $length = 9; |
|---|
| | 107 | $pre = '$1$'; |
|---|
| | 108 | } elseif (CRYPT_EXT_DES == 1) { |
|---|
| | 109 | $length = 9; |
|---|
| | 110 | $pre = ''; |
|---|
| | 111 | } elseif (CRYPT_STD_DES == 1) { |
|---|
| | 112 | $length = 2; |
|---|
| | 113 | $pre = ''; |
|---|
| | 114 | } |
|---|
| | 115 | |
|---|
| | 116 | $salt = $pre; |
|---|
| | 117 | |
|---|
| | 118 | for($i = 0; $i < $length; $i++) { |
|---|
| | 119 | $salt .= chr(mt_rand($min, $max)); |
|---|
| | 120 | } |
|---|
| | 121 | |
|---|
| | 122 | return $salt; |
|---|
| | 123 | } |
|---|
| | 124 | |
|---|
| 94 | 125 | function get_salt_from($data) { |
|---|
| 95 | 126 | $salt = substr($data, 0, 2); |
|---|
| … | … | |
| 102 | 133 | } |
|---|
| 103 | 134 | |
|---|
| | 135 | /** |
|---|
| | 136 | * Encryptes the FTP user password. |
|---|
| | 137 | * |
|---|
| | 138 | * @param string $data the password in clear text |
|---|
| | 139 | * @return string the password encrypted with salt |
|---|
| | 140 | */ |
|---|
| 104 | 141 | function crypt_user_ftp_pass($data) { |
|---|
| 105 | | $res = crypt($data); |
|---|
| | 142 | $res = crypt($data, generate_rand_salt()); |
|---|
| 106 | 143 | return $res; |
|---|
| 107 | 144 | } |
|---|
| r1252 |
r1257 |
|
| 114 | 114 | admin_name ASC |
|---|
| 115 | 115 | LIMIT |
|---|
| 116 | | ?, ? |
|---|
| | 116 | $start_index, $rows_per_page |
|---|
| 117 | 117 | SQL_QUERY; |
|---|
| 118 | 118 | |
|---|
| 119 | | $rs = exec_query($sql, $query, array($reseller_id, $start_index, $rows_per_page)); |
|---|
| | 119 | $rs = exec_query($sql, $query, array($reseller_id)); |
|---|
| 120 | 120 | $tpl->assign( |
|---|
| 121 | 121 | array( |
|---|
|