Changeset 1257

Show
Ignore:
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
  • trunk/CHANGELOG

    r1256 r1257  
    33 
    442008-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 
    514        - TOOLS: 
    615                * Updated HTMLpurifier to version 3.1.1 
  • trunk/docs/Debian/debian-packages-etch

    r1106 r1257  
    5858perl-base 
    5959perl-modules 
    60 php4 
    61 php4-cgi 
    62 php4-gd 
    63 php4-mcrypt 
    64 php4-mysql 
    65 php4-pear 
    6660php5-cgi 
    6761php5-gd 
  • trunk/docs/Debian/debian-packages-lenny

    r1176 r1257  
    22apache2 
    33apache2.2-common 
     4apache2-suexec 
     5apache2-suexec-custom 
    46apache2-utils 
    57awstats 
  • trunk/docs/Debian/debian-packages-sarge

    r1106 r1257  
    5454perl-base 
    5555perl-modules 
    56 php4 
    57 php4-cgi 
    58 php4-gd 
    59 php4-mcrypt 
    60 php4-mysql 
    61 php4-pear 
    6256php5-cgi 
    6357php5-gd 
  • trunk/docs/OpenBSD/openbsd-packages

    r1026 r1257  
    5252pcre 
    5353pdflib 
    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 
     54php5-bz2 
     55php5-core 
     56php5-curl 
     57php5-dbx 
     58php5-domxml 
     59php5-extensions 
     60php5-filepro 
     61php5-gd-4.4.1p5-no_x11 
     62php5-gmp 
     63php5-imap 
     64php5-mcrypt 
     65php5-mhash 
     66php5-mysql 
     67php5-pdf 
     68php5-pear 
     69php5-shmop 
     70php5-xmlrpc 
     71php5-xslt 
    7272png 
    7373postfix-2.3.7-sasl2 
  • trunk/docs/SuSE/suse-packages

    r973 r1257  
    22apache2-mod_auth_mysql 
    33apache2-mod_perl 
    4 apache2-mod_php4 
     4apache2-mod_php5 
    55apache2-prefork 
    66libapr0 
    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 
     7php5 
     8php5-bcmath 
     9php5-bz2 
     10php5-calendar 
     11php5-ctype 
     12php5-curl 
     13php5-dbase 
     14php5-dbx 
     15php5-domxml 
     16php5-exif 
     17php5-filepro 
     18php5-ftp 
     19php5-gd 
     20php5-gettext 
     21php5-gmp 
     22php5-iconv 
     23php5-imap 
     24php5-ldap 
     25php5-mbstring 
     26php5-mcal 
     27php5-mcrypt 
     28php5-mhash 
     29php5-mime_magic 
     30php5-mysql 
     31php5-pear 
     32php5-pear-log 
     33php5-pgsql 
     34php5-qtdom 
     35php5-session 
     36php5-shmop 
     37php5-snmp 
     38php5-sockets 
     39php5-sysvsem 
     40php5-sysvshm 
     41php5-unixODBC 
     42php5-wddx 
     43php5-xslt 
     44php5-yp 
     45php5-zlib 
    4646postfix 
    4747amavisd-new 
  • trunk/docs/Ubuntu/ubuntu-packages-edgy

    r1106 r1257  
    5353perl-base 
    5454perl-modules 
    55 php4 
    56 php4-cgi 
    57 php4-gd 
    58 php4-mcrypt 
    59 php4-mysql 
    60 php4-pear 
    61 php4-idn 
    6255php5-cgi 
    6356php5-gd 
  • trunk/engine/ispcp-als-mngr

    r1195 r1257  
    724724        push_el(\@main::el, 'als_entry:', "$als_e"); 
    725725 
     726        if ($mount_point == "/") { 
     727                $mount_point = ""; 
     728        } 
     729 
    726730        my ($suexec_uid, $suexec_gid)    = get_dmn_suexec_user($dmn_id); 
    727731        my $suexec_user_pref             = $main::cfg{'APACHE_SUEXEC_USER_PREF'}; 
  • trunk/engine/ispcp-dmn-mngr

    r1201 r1257  
    13771377        # PHP4 and PHP5 Directory for usual user 
    13781378        # 
    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        #
    13881388        if (! -d "$starter_dir/$dmn_name/php5") { 
    13891389                $rs = make_dir( 
     
    15701570                return $rs if ($rs != 0); 
    15711571 
    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); 
    15941576                return $rs if ($rs != 0); 
    15951577        } 
     
    15981580        # php.ini for the new domain 
    15991581        # 
    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        #
    16251607        if (!(-e "$starter_dir/$dmn_name/php5/php.ini")) { 
    16261608                my $ini_tpl     = undef; 
     
    16741656                return $rs if ($rs != 0); 
    16751657        } 
    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        #
    17001682 
    17011683        push_el(\@main::el, 'dmn_add_httpd_file_data()', 'Ending...'); 
     
    17401722        # PHP4 and PHP5 Directory for usual user 
    17411723        # 
    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        #
    17461728        if (! -d "$starter_dir/$dmn_name/php5") { 
    17471729                $rs = make_dir("$starter_dir/$dmn_name/php5", $sys_user, $sys_group, 0750); 
     
    18261808        # php.ini for the domain 
    18271809        # 
    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")) { 
    18291828                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 
    18311831                ($rs, $ini_tpl) = get_tpl($ini_cfg_dir, 'php.ini'); 
    18321832                return $rs if ($rs != 0); 
     
    18401840                return $rs if ($rs != 0); 
    18411841 
    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  
    18601842                ($rs, $rdata) = store_file("$starter_dir/$dmn_name/php5/php.ini", $cfg, $sys_user, $sys_group, 0640); 
    18611843                return $rs if ($rs != 0); 
     
    18821864                return $rs if ($rs != 0); 
    18831865        } 
    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        #
    19021884 
    19031885        push_el(\@main::el, 'dmn_change_httpd_file_data()', 'Ending...'); 
  • trunk/engine/setup/ispcp-setup

    r1201 r1257  
    199199 
    200200        do { 
    201                 $rs = ask_php_version(); 
    202         } while ($rs == 1); 
    203  
    204         do { 
    205201                $rs = ask_second_dns(); 
    206202        } while ($rs == 1); 
  • trunk/engine/setup/ispcp-setup-methods.pl

    r1201 r1257  
    397397 
    398398sub ask_second_dns { 
    399         push_el(\@main::el, 'ask_php_version()', 'Starting...'); 
     399        push_el(\@main::el, 'ask_second_dns()', 'Starting...'); 
    400400 
    401401        my $rdata = undef; 
     
    420420        } 
    421421 
    422         push_el(\@main::el, 'ask_php_version()', 'Ending...'); 
     422        push_el(\@main::el, 'ask_second_dns()', 'Ending...'); 
    423423        return 0; 
    424424} 
    425425 
    426426sub ask_mysql_prefix { 
    427         push_el(\@main::el, 'ask_php_version()', 'Starting...'); 
     427        push_el(\@main::el, 'ask_mysql_prefix()', 'Starting...'); 
    428428 
    429429        my $rdata = undef; 
     
    454454        } 
    455455 
    456         push_el(\@main::el, 'ask_php_version()', 'Ending...'); 
     456        push_el(\@main::el, 'ask_mysql_prefix()', 'Ending...'); 
    457457        return 0; 
    458458} 
     
    579579 
    580580        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...'); 
    615581        return 0; 
    616582} 
     
    10681034 
    10691035        ## 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); 
    10881054 
    10891055        ## PHP5 Starter 
     
    11081074 
    11091075        ## 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); 
    11371103 
    11381104        ## php5.ini 
  • trunk/engine/setup/ispcp-update

    r1224 r1257  
    780780        print STDOUT "\tUpgrading system values ..."; 
    781781 
    782         # PHP Version 
    783         do { 
    784                 $rs = ask_php_version(); 
    785         } while ($rs == 1); 
    786  
    787782        # AWStats questions 
    788783        do { 
  • trunk/gui/include/calc-functions.php

    r1255 r1257  
    9292// 
    9393 
     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 */ 
     101function 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 
    94125function get_salt_from($data) { 
    95126    $salt = substr($data, 0, 2); 
     
    102133} 
    103134 
     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 */ 
    104141function crypt_user_ftp_pass($data) { 
    105     $res = crypt($data); 
     142    $res = crypt($data, generate_rand_salt()); 
    106143    return $res; 
    107144} 
  • trunk/gui/reseller/reseller_user_statistics.php

    r1252 r1257  
    114114            admin_name ASC 
    115115        LIMIT 
    116                         ?, ? 
     116                        $start_index, $rows_per_page 
    117117SQL_QUERY; 
    118118 
    119         $rs = exec_query($sql, $query, array($reseller_id, $start_index, $rows_per_page)); 
     119        $rs = exec_query($sql, $query, array($reseller_id)); 
    120120        $tpl->assign( 
    121121                        array(