Page 1 of 2 12 LastLast
Results 1 to 25 of 30
  1. #1
    Join Date
    Nov 2006
    Location
    Chicago, IL
    Posts
    71

    Post **Updated** Install Guide for Installing VHCS on Ubuntu Server

    I tried installing vhcs on a few versions of Ubuntu and have successfully done it with these instructions. This is basically a how-to for installing vhcs on most of Ubuntu server versions. I have pieced together instructions from the net and tested a lot to make sure this works right. I had submitted a how-to tutorial for Ubuntu Edgy and with there being a few errors even after the install said it was successful I was still having a few problems. I did a lot of searching for this tutorial and can’t really remember all of the places I went to so please use this on a test server, use in a live server at your own risk.

    I am not going to go through a how-to of how to install Ubuntu server versions, if you are not sure on how to do that please learn that before doing this tutorial.

    After I installed Ubuntu Server 6.06 LTS I had to install openssh. If you are new and do not know how to do this please do this command after logging in:

    Code:
    sudo apt-get install openssh-server
    First: Depending on if you’re paranoid or not we need to set a root password. If your too paranoid to do so then simply either type sudo -s to get to root in the console or add sudo in front of all the commands. To set root password simply:


    Code:
    sudo passwd root
    
    It will then ask for your password and the new password, after that type:


    Code:
    su (Then enter the password u just created)



    Next we want to change the default Shell:


    Code:
    rm -f /bin/sh
    ln -s /bin/bash /bin/sh



    Then edit /etc/hosts by running this command:

    Code:
    nano /etc/hosts
     
    Make it look like this:
     
    127.0.0.1       localhost.localdomain localhost
    192.168.0.100   server1.example.com     server1
     
    # The following lines are desirable for IPv6 capable hosts
    ::1     ip6-localhost ip6-loopback
    fe00::0 ip6-localnet
    ff00::0 ip6-mcastprefix
    ff02::1 ip6-allnodes
    ff02::2 ip6-allrouters
    ff02::3 ip6-allhosts
    
    Now run this:

    Code:
    hostname
    hostname –f
    
    They should show your hostname and full hostname (i.e. hostname and hostname.example.com)

    Comment out the CD and enable some of the other repositories. It should look close to this:

    Code:
    nano /etc/apt/sources.list
     
    Example Code:
    # deb cdrom:[Ubuntu-Server 6.06.1 _Dapper Drake_ - Release i386 (20060807.1)]/ dapper main restricted
     
    deb http://de.archive.ubuntu.com/ubuntu/ dapper universe
    deb-src http://de.archive.ubuntu.com/ubuntu/ dapper universe
     
    # deb http://de.archive.ubuntu.com/ubuntu/ dapper-backports main restricted universe multiverse
    # deb-src http://de.archive.ubuntu.com/ubuntu/ dapper-backports main restricted universe multiverse
     
    deb http://security.ubuntu.com/ubuntu dapper-security main restricted
    deb-src http://security.ubuntu.com/ubuntu dapper-security main restricted
    deb http://security.ubuntu.com/ubuntu dapper-security universe
    deb-src http://security.ubuntu.com/ubuntu dapper-security universe
    

    Now run this:

    Code:
    apt-get update
    apt-get upgrade
    
    Next we are going to install some more packages, you might not need all of these but I found the server ran better for me with the following installed:

    apt-get install binutils cpp cpp-4.0 fetchmail flex gcc gcc-4.0 libarchive-zip-perl libc6-dev libcompress-zlib-perl libdb4.3-dev libpcre3 libpopt-dev libnet-dns-perl libdb-file-lock-perl libhtml-parser-perl linux-kernel-headers lynx m4 make ncftp nmap openssl perl perl-modules unzip zip zlib1g-dev automake1.9 libtool bison g++ wget bzip2 libgd1 gawk libterm-readpassword-Perl patch libmcrypt4 iptables gzip diff bind9 libtimedate-Perl libterm-readkey-Perl libsnmp-session-Perl libperl5.8 libnet-smtp-server-Perl libnet-Perl libnet-netmask-Perl libmime-Perl libmd5-Perl libmailtools-Perl libmail-sendmail-Perl libio-stringy-perl libdbi-Perl libdbd-mysql-Perl libdate-manip-Perl libdate-calc-Perl libcrypt-passwdmd5-Perl libcrypt-cbc-Perl libcrypt-blowfish-Perl libberkeleydb-perl courier-maildrop proftpd-mysql
    Answer the following questions in this order:

    1. No
    2. Internet Site
    3. example.yoursite.com
    4. standalone

    Now we need to install quota, run the following:

    Code:
    apt-get install quota
    Edit /etc/fstab to look like this (I added ,usrquota,grpquota to partition /dev/sda1 (mount point /; your device name might be /dev/hda1or similar):

    Code:
    nano /etc/fstab
     
    Example Layout:
     
    # /etc/fstab: static file system information.
    #
    # <file system> <mount point>   <type>  <options>       <dump>  <pass>
    proc              /proc                     proc                defaults                                                          0       0
    /dev/sda1      /                            ext3             defaults,errors=remount-ro,usrquota,grpquota     0       1
    /dev/sda5      none                      swap              sw                                                                   0       0
    /dev/hdc        /media/cdrom0     udf,iso9660    user,noauto                                                        0       0
    /dev/fd0         /media/floppy0    auto                rw,user,noauto                                                  0      0
    To enable quota, run these commands:

    Code:
    touch /quota.user /quota.group
    chmod 600 /quota.*
    mount -o remount /
    quotacheck -avugm
    quotaon -avug
    
    Now we need to configure bind, run the following:

    Code:
    /etc/init.d/bind9 stop
    
    Edit the file /etc/default/bind9so that the daemon will run as the unprivileged user bind, chrooted to /var/lib/named. Modify the line: OPTIONS=" -u bind" so that it reads OPTIONS="-u bind -t /var/lib/named":

    Code:
    nano /etc/default/bind9
     
    Make it look like this:
     
    OPTIONS="-u bind -t /var/lib/named"
    # Set RESOLVCONF=no to not run resolvconf
    RESOLVCONF=yes
    
    To get bind to run properly, run the below necessary commands:

    Code:
    mkdir -p /var/lib/named/etc
    mkdir /var/lib/named/dev
    mkdir -p /var/lib/named/var/cache/bind
    mkdir -p /var/lib/named/var/run/bind/run
     
    mv /etc/bind /var/lib/named/etc
     
    ln -s /var/lib/named/etc/bind /etc/bind
     
    mknod /var/lib/named/dev/null c 1 3
    mknod /var/lib/named/dev/random c 1 8
    chmod 666 /var/lib/named/dev/null /var/lib/named/dev/random
    chown -R bind:bind /var/lib/named/var/*
    chown -R bind:bind /var/lib/named/etc/bind
    
    We need to modify the startup script /etc/init.d/sysklogdof sysklogdso that we can still get important messages logged to the system logs. Modify the line: SYSLOGD="-u syslog" so that it reads: SYSLOGD="-u syslog -a /var/lib/named/dev/log":

    Code:
    nano /etc/init.d/sysklogd
     
    Make it look like this:
     
    SYSLOGD="-u syslog -a /var/lib/named/dev/log"
    
    Now we need to restart both of the following services:

    Code:
    /etc/init.d/sysklogd restart
     
    /etc/init.d/bind9 start
    
    Now we need to install mysql, run the following:

    Code:
    apt-get install mysql-server mysql-client libmysqlclient15-dev
    After installing mysql we need to set a password for mysql root, run the following command:

    Code:
    mysqladmin -u root password YOURROOTSQLPASSWORD
    
    Next run the following:

    Code:
    mysql -u root -p
    create database vhcs2;
    use vhcs2;
    quit
    Now we need to install Postfix with SMTP-AUTH, run the following:

    Code:
    apt-get install postfix libsasl2 sasl2-bin libsasl2-modules libdb3-util procmail
    
    Next run this command:

    Code:
    dpkg-reconfigure postfix
    These should be the default answer, change if you feel it is needed:

    1. Internet Site
    2. None
    3. example.yourdomain.com
    4. example.yourdomain.com, localhost.yourdomain.com, localhost
    5. No
    6. 127.0.0.0/8
    7. Yes
    8. 0
    9. +
    10. all

    Code:
    postconf -e 'smtpd_sasl_local_domain ='
    postconf -e 'smtpd_sasl_auth_enable = yes'
    postconf -e 'smtpd_sasl_security_options = noanonymous'
    postconf -e 'broken_sasl_auth_clients = yes'
    postconf -e 'smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination'
    postconf -e 'inet_interfaces = all'
    echo 'pwcheck_method: saslauthd' >> /etc/postfix/sasl/smtpd.conf
    echo 'mech_list: plain login' >> /etc/postfix/sasl/smtpd.conf
    Now we are going to create the certificates for TLS:

    Code:
    mkdir /etc/postfix/ssl
    cd /etc/postfix/ssl/
    openssl genrsa -des3 -rand /etc/hosts -out smtpd.key 1024
    chmod 600 smtpd.key
    openssl req -new -key smtpd.key -out smtpd.csr
    openssl x509 -req -days 3650 -in smtpd.csr -signkey smtpd.key -out smtpd.crt
    openssl rsa -in smtpd.key -out smtpd.key.unencrypted
    mv -f smtpd.key.unencrypted smtpd.key
    openssl req -new -x509 -extensions v3_ca -keyout cakey.pem -out cacert.pem -days 3650
    
    Now we are going to configure Postfix for TLS:

    Code:
    postconf -e 'smtpd_tls_auth_only = no'
    postconf -e 'smtp_use_tls = yes'
    postconf -e 'smtpd_use_tls = yes'
    postconf -e 'smtp_tls_note_starttls_offer = yes'
    postconf -e 'smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key'
    postconf -e 'smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt'
    postconf -e 'smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem'
    postconf -e 'smtpd_tls_loglevel = 1'
    postconf -e 'smtpd_tls_received_header = yes'
    postconf -e 'smtpd_tls_session_cache_timeout = 3600s'
    postconf -e 'tls_random_source = dev:/dev/urandom'
    postconf -e 'myhostname = example.yourdomain.com'
    
    Now restart Postfix:

    Code:
    /etc/init.d/postfix restart
    Finally run the following commands for saslauthd:

    Code:
    mkdir -p /var/spool/postfix/var/run/saslauthd
    
    Now edit /etc/default/saslauthd by running the following command:

    Code:
    nano /etc/default/saslauthd
     
    Should look like the following:
     
    # This needs to be uncommented before saslauthd will be run automatically
    START=yes
     
    PARAMS="-m /var/spool/postfix/var/run/saslauthd -r"
     
    # You must specify the authentication mechanisms you wish to use.
    # This defaults to "pam" for PAM support, but may also include
    # "shadow" or "sasldb", like this:
    # MECHANISMS="pam shadow"
    MECHANISMS="pam"
    We must also edit /etc/init.d/saslauthd and change the location of saslauthd's PID file. Change the value of PIDFILE to /var/spool/postfix/var/run/${NAME}/saslauthd.pid:

    Code:
    nano /etc/init.d/saslauthd
     
    Should look like the following:
     
    PIDFILE="/var/spool/postfix/var/run/${NAME}/saslauthd.pid"
    
    Now start saslauthd by running the following command:

    Code:
    /etc/init.d/saslauthd start
    To see if SMTP-AUTH and TLS work properly now run the following commands:

    Code:
    telnet localhost 25
     
    ehlo localhost
     
    quit
    
    Now we are going to installCourier-IMAP/Courier-IMAP-SSL (for IMAPs on port 993) and Courier-POP3/Courier-POP3-SSL (for POP3s on port 995):
    apt-get install courier-authdaemon courier-base courier-imap courier-imap-ssl courier-pop courier-pop-ssl courier-ssl gamin libgamin0 libglib2.0-0
    You will be one question, all you should have to do is just hit enter.

    Code:
    postconf -e 'home_mailbox = Maildir/'
    postconf -e 'mailbox_command ='
    /etc/init.d/postfix restart
    
    Next we are going to install Apache and PHP5, run the following commands:

    First we will install Apche:

    apt-get install apache2 apache2-common apache2-doc apache2-mpm-prefork apache2-utils libapr0 libexpat1 ssl-cert
    Next we are going to install PHP5:

    apt-get install autoconf automake1.4 autotools-dev libapache2-mod-php5 php5 php5-common php5-curl php5-dev php5-gd php-pear php5-ldap php5-mhash php5-mysql php5-mysqli php5-snmp php5-sqlite php5-xmlrpc php5-xsl php5-imap php5-mcrypt php5-pspell
    During the PHP install you will be asked a question, please answer yes to this question.

    Next run the following command:

    Code:
    nano /etc/apache2/apache2.conf
    Look for “DirectoryIndex” and make it look like the following:

    DirectoryIndex index.html index.htm index.shtml index.cgi index.php index.php3 index.pl index.xhtml


    Next run the following command and add Listen 443 to the config:

    Code:
    nano /etc/apache2/ports.conf
     
    Make it look like this:
     
    Listen 80
    Listen 443
    This is optional to you if you would like to enable these Apache Modules (SSL, rewrite, suexec, and include). To enable these modules, run the following:

    Code:
    a2enmod ssl
    a2enmod rewrite
    a2enmod suexec
    a2enmod include
    
    Next reload Apache by running the following command:

    Code:
    /etc/init.d/apache2 force-reload
    Next we are going to install webalizer by running the following command:

    Code:
    apt-get install webalizer
    
    It is a good idea to synchronize the system clock with an NTP (network time protocol) server over the internet. Run the following command to complete this:
    Code:
    apt-get install ntp ntpdate
    Next we are going to install VHCS. We are going to start by downloading and unpacking vhcs.

    First change to your root directory:
    Code:
    cd /root
    Next download VHCS:


    Next unpack vhcs:

    Code:
    tar -xjvf vhcs2-2.4.7.1.tar.bz2
    
    Next change your vhcs directory:
    Code:
    cd vhcs2-2.4.7.1
    Next run the following command:
    Code:
    make install


    Next run the following command:
    Code:
    cp -R /tmp/vhcs-2.4.7.1/* /
    Now we need to edit vhcs2_common_code.pl file before installing, this will fix an error when installing vhcs. Run the following command:
    Code:
    nano /var/www/vhcs2/engine/vhcs2_common_code.pl


    Find the following (this entry will be in the file twice, find both and edit both the same way):

    Code:
    my to $cipher = Crypt::CBC -> new(
    {
    `key'                           => $main::db_pass_key,
    `to cipher'                    => `Blowfish' ,
    `IV'                             => $main::db_pass_iv,
    `regenerate_key'          => 0,
    `padding'                      => 'space',
    `prepend_iv'                 => 0
    }
    );
     
    And to replace it with (both entries will be edited the same):
     
    my to $cipher = Crypt::CBC -> new(
    {
    `keysize'                   => 32,
    `key'                         => $main::db_pass_key,
    `to cipher'                 => `Blowfish' ,
    `IV'                          => $main::db_pass_iv ,
    `regenerat e_key'      => 0,
    `padding'                   =>' space',
    `prepend_i v'              => 0
    }
    );
    Next we will run the setup for vhcs, if all went all you will get asked the following questions after running the following command:
    Code:
    /var/www/vhcs2/engine/setup/vhcs2-setup
    
    Questions:
    Answer all the question or installation will fail
    here are some example answers

    Please to enter system hostname (for Enter defaults) [debian]: hostname
    Please to enter system network address (for Enter defaults) [10.0.0.69 ]: 192.168.0. 100 (use whatever your servers ip is)
    Please to enter SQL server host (for Enter defaults) [localhost]:just press enter key
    Please to enter system SQL database (for Enter defaults) [vhcs2]: vhcs2
    Please to enter system SQL to user (for Enter defaults) [root]: vhcs2
    Please to enter system SQL password (for Enter defaults) [none]: Password you entered earlier
    Please repeat system SQL password: root password u entered earlier
    Please to enter VHCS FTP SQL to user (for Enter defaults) [vftp]: vftp
    Please to enter VHCS FTP SQL to user password (for Enter defaults) [none]: PASSWORD for virtual users
    Please repeat VHCS FTP SQL to user password: PASSWORD for virtual users
    Please to enter administrator login name (for Enter defaults) [admin]:
    Please to enter administrator password: Administrator PASSWORD
    Administrator Please repeat password: Administrator PASSWORD
    Please to enter administrator email address: Email of root
    You should see the permissions being set automatically, but if you do not see this during the install than run the following commands:

    Code:
    /var/www/vhcs2/engine/setup/set-engine-permissions.sh
    /var/www/vhcs2/engine/setup/set-gui-permissions.sh
    To fix a problem in the webmail edit the following file:
    Code:
    nano /var/www/vhcs2/gui/tools/webmail/inc/inc.php
     
    locate the lines
     
    Header (” You expire: Wed, 11 Nov 1998 11:11: 11 GMT \ r \ n”.
    “Break-Control: \ n not-breaks \ r”.
    “Break-Control: must-revalidate”); 
     
    Replace them with
     
    Header (”You expire: Wed, 11 Nov 1998 11:11: 11 GMT”);
    Header (”Break-Control: not-break”);
    Header (”Break-Control: must-revalidate”);
    After doing this install on Ubuntu Server 6.06 LTS, all of the features on VHCS worked without any errors. Server ran more stable.

    This is still just a rough copy of the tutroial for the install of vhcs on Uuntu Server. I am going to be adding more how-to's for this and fine tuning this tutorial, there will be a couple of changes but not much to what you see here. If you have any questions or problems please ask. I will post a word doc of this tutorial in a couple of days.

    arche
    Last edited by arche; 06-20-2007 at 11:39 AM.

  2. #2
    Join Date
    Nov 2006
    Location
    Chicago, IL
    Posts
    71
    This is an error with the file manager, I forgot to post the fix for this.

    The error:
    Error: Warning: ftp_rawlist() [function.ftp-rawlist]: open_basedir restriction in effect. File(/tmp) is not within the allowed path(s): (/srv/www/vhcs2/gui/tools/filemanager/:/tmp/:/usr/share/php/) in /srv/www/vhcs2/gui/tools/filemanager/ftp.php on line 108

    Code:
    nano /etc/apache2/sites-available/vhcs2.conf


    Delete the slash at the end :/tmp Also do the same for below, if you already created sites then delete the slash after the :/tmp on all of the entries.

    Code:
    nano /etc/vhcs2/apache/parts/vhcs2_base.tpl


    After this you need to restart vhcs, I just reboot the machine. Admins choice..

    arche

  3. #3
    Very nice, good job. I like how descriptive you were, this should help out alot of people. Thank you for taking the time to post it.

  4. #4
    Good job, very helpful!

  5. #5
    Thank you, its a good job. I have a problem when i try to enter to my webmail because i modified de lines 153 and 154 in the inc.php but i have the same error:

    Parse error: syntax error, unexpected T_STRING in /var/www/vhcs2/gui/tools/webmail/inc/inc.php on line 153

    Can i help me?

    THNX

  6. #6
    Join Date
    Nov 2006
    Location
    Chicago, IL
    Posts
    71
    Quote Originally Posted by iagsistemas View Post
    Thank you, its a good job. I have a problem when i try to enter to my webmail because i modified de lines 153 and 154 in the inc.php but i have the same error:

    Parse error: syntax error, unexpected T_STRING in /var/www/vhcs2/gui/tools/webmail/inc/inc.php on line 153

    Can i help me?

    THNX
    unexpected T_STRING usually means a missing semicolon. Make sure you have the semicolon at the end of each line (i.e. ";")

  7. #7
    The same thing happens to me with the server FTP who gives me that is DOWN when i login as admin.Thank you.

  8. #8
    Join Date
    Nov 2006
    Location
    Chicago, IL
    Posts
    71
    Quote Originally Posted by iagsistemas View Post
    The same thing happens to me with the server FTP who gives me that is DOWN when i login as admin.Thank you.
    First fix the webmail then worry about the ftp. Did you look to make sure that you have included the semicolon? If you can't find any error post you php.inc here please.

  9. #9
    Arche thanks for your reply. This is the file and i not view an error:

    /*
    Don't remove the fallowing lines, or you will be problems with browser's cache
    */
    Header (" You expire: Wed, 11 Nov 1998 11:11: 11 GMT".
    "Break-Control: not-break".
    "Break-Control: must-revalidate");
    $nocache = "
    <META HTTP-EQUIV=\"Cache-Control\" CONTENT=\"no-cache\">
    <META HTTP-EQUIV=\"Expires\" CONTENT=\"-1\">";

    I copy and paste from this manual.Thank you

  10. #10
    Join Date
    Nov 2006
    Location
    Chicago, IL
    Posts
    71
    Quote Originally Posted by iagsistemas View Post
    Arche thanks for your reply. This is the file and i not view an error:

    /*
    Don't remove the fallowing lines, or you will be problems with browser's cache
    */
    Header (" You expire: Wed, 11 Nov 1998 11:11: 11 GMT".
    "Break-Control: not-break".
    "Break-Control: must-revalidate");
    $nocache = "
    <META HTTP-EQUIV=\"Cache-Control\" CONTENT=\"no-cache\">
    <META HTTP-EQUIV=\"Expires\" CONTENT=\"-1\">";

    I copy and paste from this manual.Thank you
    You going to have to look at my instructions look at the end of my first post, you must change this to what I posted..

    locate the lines

    This is the old config

    Header (” You expire: Wed, 11 Nov 1998 11:11: 11 GMT \ r \ n”.
    “Break-Control: \ n not-breaks \ r”.
    “Break-Control: must-revalidate”);

    Replace them with

    This is the new config

    Header (”You expire: Wed, 11 Nov 1998 11:11: 11 GMT”);
    Header (”Break-Control: not-break”);
    Header (”Break-Control: must-revalidate”);

  11. #11
    where are the file php.inc? sorry i newbie and my english y very poor. THNX

  12. #12
    I replaced them and not work. It appears the same error.

    /*
    Don't remove the fallowing lines, or you will be problems with browser's cache
    */
    Header (
    "You expire: Wed, 11 Nov 1998 11:11: 11 GMT");
    Header ("Break-Control: not-break");
    Header ("Break-Control: must-revalidate");
    $nocache = "
    <META HTTP-EQUIV=\"Cache-Control\" CONTENT=\"no-cache\">
    <META HTTP-EQUIV=\"Expires\" CONTENT=\"-1\">";

  13. #13
    Join Date
    Nov 2006
    Location
    Chicago, IL
    Posts
    71
    Quote Originally Posted by iagsistemas View Post
    where are the file php.inc? sorry i newbie and my english y very poor. THNX
    If you are looking on your server it should be somewhere around here:

    /var/www/vhcs2/gui/tools/webmail/inc/

    If you are looking at the unzipped folder it would be:

    /vhcs2-2.4.7.1/vhcs2-2.4.7.1/gui/tools/webmail/inc/

    You should find it in there.

  14. #14
    i dont have any php.inc at this locations???

  15. #15
    Join Date
    Nov 2006
    Location
    Chicago, IL
    Posts
    71
    Quote Originally Posted by iagsistemas View Post
    i dont have any php.inc at this locations???
    not php.inc it is inc.php

  16. #16
    i post it sorry:

    <?
    /************************************************************************
    UebiMiau is a GPL'ed software developed by
    - Aldoir Ventura - aldoir@users.sourceforge.net
    - http://uebimiau.sourceforge.net
    Fell free to contact, send donations or anything to me :-)
    São Paulo - Brasil
    *************************************************************************/
    @set_time_limit(0);
    session_start();
    session_name('sid');
    $sid = session_id();
    require("./inc/config.php");
    require("./inc/class.uebimiau.php");
    require("./inc/lib.php");
    $temporary_directory = realpath($temporary_directory).'/';
    define("SMARTY_DIR","./smarty/");
    require_once(SMARTY_DIR."Smarty.class.php");
    $smarty = new Smarty;
    $smarty->compile_dir = $temporary_directory;
    $smarty->security=true;
    //$smarty->secure_dir=array("./");

    $smarty->assign("umMenuTemplate",dirname($PATH_TRANSLATED).$menu_template);
    //$smarty->debugging = false;
    $smarty->assign("umLanguageFile",$selected_language.".txt");
    $SS = New Session();
    $SS->temp_folder = $temporary_directory;
    $SS->sid = $sid;
    $SS->timeout = $idle_timeout;
    $sess = $SS->Load();

    if(!array_key_exists("start", $sess )) $sess["start"] = time();
    $start = $sess["start"];
    $UM = new UebiMiau();
    if(isset($f_pass) && strlen($f_pass) > 0) {
    switch(strtoupper($mail_server_type)) {
    case "DETECT":
    $f_server = strtolower(getenv("HTTP_HOST"));
    $f_server = str_replace($mail_detect_remove,"",$f_server);
    $f_server = $mail_detect_prefix.$f_server;
    if(ereg("(.*)@(.*)",$f_email,$regs)) {
    $f_user = $regs[1] & "@" & str_replace("webmail.","",strtolower($_SERVER['HTTP_HOST']));
    $domain = $regs[2];
    if($mail_detect_login_type != "") $f_user = eregi_replace("%user%",$f_user,eregi_replace("%domain%",$domain,$mail_detect_login_type));
    }
    $f_protocol = $mail_detect_protocol;
    $f_port = $mail_detect_port;
    $f_prefix = $mail_detect_folder_prefix;
    break;
    case "ONE-FOR-EACH":
    $domainname = str_replace("webmail.","",strtolower($_SERVER['HTTP_HOST']));
    // $domain = $mail_servers[$six]["domain"];
    $domain = $domainname;
    // $f_email = $f_user."@".$domain;
    $f_email = $f_user."@".$domainname;
    // $f_server = $mail_servers[$six]["server"];
    $f_server = "mail.".$domainname;
    $login_type = $mail_servers[$six]["login_type"];
    $f_protocol = $mail_servers[$six]["protocol"];
    $f_port = $mail_servers[$six]["port"];
    $f_prefix = $mail_servers[$six]["folder_prefix"];
    if($login_type != "") $f_user = eregi_replace("%user%",$f_user,eregi_replace("%domain%",$domain,$login_type));
    break;
    case "ONE-FOR-ALL":
    if(ereg("(.*)@(.*)",$f_email,$regs)) {
    $f_user = $regs[1];
    $domain = $regs[2];
    // $domain = str_replace("webmail.","",strtolower($_SERVER['HTTP_HOST']));
    if($one_for_all_login_type != "") $f_user = eregi_replace("%user%",$f_user,eregi_replace("%domain%",$domain,$one_for_all_login_type));
    }
    $f_server = $default_mail_server;
    $f_protocol = $default_protocol;
    if($f_protocol == "imap")
    $f_port = "143";
    if($f_protocol == "pop3")
    $f_port = "110";
    $f_prefix = $default_folder_prefix;
    break;
    }
    $UM->mail_email = $sess["email"] = stripslashes($f_email);
    $UM->mail_user = $sess["user"] = stripslashes($f_user);
    $UM->mail_pass = $sess["pass"] = stripslashes($f_pass);
    $UM->mail_server = $sess["server"] = stripslashes($f_server);
    $UM->mail_port = $sess["port"] = intval($f_port);
    $UM->mail_protocol = $sess["protocol"] = strtolower($f_protocol);
    $UM->mail_prefix = $sess["folder_prefix"] = $f_prefix;
    $refr = 1;
    } elseif (
    ($sess["auth"] && intval((time()-$start)/60) < $idle_timeout)) {
    $UM->mail_user = $f_user = $sess["user"];
    $UM->mail_pass = $f_pass = $sess["pass"];
    $UM->mail_server = $f_server = $sess["server"];
    $UM->mail_email = $f_email = $sess["email"];
    $UM->mail_port = $f_port = $sess["port"];
    $UM->mail_protocol = $f_protocol = $sess["protocol"];
    $UM->mail_prefix = $f_prefix = $sess["folder_prefix"];
    } else {
    redirect("./index.php?tid=$tid&lid=$lid");
    exit;
    }
    $sess["start"] = time();
    $SS->Save($sess);
    $userfolder = $temporary_directory.ereg_replace("[^a-z0-9\._-]","_",strtolower($f_user))."_".strtolower($f_server)."/";
    $UM->debug = $enable_debug;
    $UM->use_html = $allow_html;
    $UM->user_folder = $userfolder;
    $UM->temp_folder = $temporary_directory;
    $UM->timeout = $idle_timeout;

    $prefs = load_prefs();
    $UM->timezone = $prefs["timezone"];
    $UM->charset = $default_char_set;

    /*
    Don't remove the fallowing lines, or you will be problems with browser's cache
    */
    Header ("You expire: Wed, 11 Nov 1998 11:11: 11 GMT");
    Header ("Break-Control: not-break");
    Header ("Break-Control: must-revalidate");
    $nocache = "
    <META HTTP-EQUIV=\"Cache-Control\" CONTENT=\"no-cache\">
    <META HTTP-EQUIV=\"Expires\" CONTENT=\"-1\">";
    // Sort rules
    if(!isset($sortby) || !ereg("(subject|fromname|date|size)",$sortby)) {
    if(array_key_exists("sort-by",$prefs) && ereg("(subject|fromname|date|size)",$prefs["sort-by"]))
    $sortby = $prefs["sort-by"];
    else
    $sortby = $default_sortby;
    } else {
    $need_save = true;
    $prefs["sort-by"] = $sortby;
    }
    if(!isset($sortorder) || !ereg("ASC|DESC",$sortorder)) {
    if(array_key_exists("sort-order",$prefs) && ereg("ASC|DESC",$prefs["sort-order"]))
    $sortorder = $prefs["sort-order"];
    else
    $sortorder = $default_sortorder;
    } else {
    $need_save = true;
    $prefs["sort-order"] = $sortorder;
    }
    if(isset($need_save)) save_prefs($prefs);
    if(is_array($sess["sysmap"]))
    while(list($key, $value) = each($sess["sysmap"]))
    if(strtolower($folder) == $key)
    $folder = $value;
    if(!isset($folder) || $folder == "" || strpos($folder,"..") !== false ) {
    $folder = $sess["sysmap"]["inbox"];
    } elseif (!file_exists($userfolder.$folder)) {
    redirect("./logout.php?sid=$sid&tid=$tid&lid=$lid");
    exit;
    }
    ?>

  17. #17
    Join Date
    Nov 2006
    Location
    Chicago, IL
    Posts
    71
    according to your file you posted I am not sure how you are still getting this error.

    Is this server public, if it is could you send me the ip through a pm or the url of this server.

  18. #18
    You can do something in remotely or need some thing? THNX

  19. #19
    Join Date
    Nov 2006
    Location
    Chicago, IL
    Posts
    71
    sent you a pm

  20. #20
    what port open in order that you could enter for ssh?

  21. #21
    Join Date
    Nov 2006
    Location
    Chicago, IL
    Posts
    71
    ssh is port 22 but maybe we should do this through pm so no more personal info gets out there. Did you check the last pm I sent you?

  22. #22
    arche if i deleted this lines:
    Header ("You expire: Wed, 11 Nov 1998 11:11: 11 GMT");
    Header ("Break-Control: not-break");
    Header ("Break-Control: must-revalidate");

    The application seems that it works, at least it does not give this error. In order that they use these lines?

  23. #23
    Having a problem with the filemanager in debian etch. I saw the edits you suggested to fix them yet the issues persist.



    Warning: ftp_rawlist() [function.ftp-rawlist]: open_basedir restriction in effect. File(/tmp) is not within the allowed path(s): (/var/www/vhcs2/gui/tools/filemanager/:/tmp/:/usr/share/php/) in /var/www/vhcs2/gui/tools/filemanager/ftp.php on line 108

    Warning: ftp_rawlist() [function.ftp-rawlist]: Unable to create temporary file. Check permissions in temporary files directory. in /var/www/vhcs2/gui/tools/filemanager/ftp.php on line 108

    Thanks in advance. Let me know what information could help you.

  24. #24
    Replace in the file /etc/vhcs2/apache/parts/vhcs2_base.tpl this :
    php_admin_value open_basedir "/var/www/vhcs2/gui/tools/filemanager/:/tmp/:/usr/share/php/"

    by

    php_admin_value open_basedir "/var/www/vhcs2/gui/tools/filemanager/:/tmp:/usr/share/php/"

    Then update vhcs2 configuration files :
    rm /etc/vhcs2/apache/working/vhcs2.conf
    /etc/init.d/vhcs2_daemon stop
    mysql -u root -pYOUR_PASSWORD
    USE vhcs2;
    UPDATE domain SET domain_status='change';
    UPDATE subdomain SET subdomain_status='change';
    UPDATE domain_aliasses SET alias_status='change';
    quit;
    /var/www/vhcs2/engine/vhcs2-rqst-mngr
    /etc/init.d/vhcs2_daemon start
    /etc/init.d/apache2 reload
    /etc/init.d/bind9 reload

    Check the modification in the file /etc/apache2/site-available/vhcs2.conf

    Quote Originally Posted by rhaynesak View Post
    Having a problem with the filemanager in debian etch. I saw the edits you suggested to fix them yet the issues persist.



    Warning: ftp_rawlist() [function.ftp-rawlist]: open_basedir restriction in effect. File(/tmp) is not within the allowed path(s): (/var/www/vhcs2/gui/tools/filemanager/:/tmp/:/usr/share/php/) in /var/www/vhcs2/gui/tools/filemanager/ftp.php on line 108

    Warning: ftp_rawlist() [function.ftp-rawlist]: Unable to create temporary file. Check permissions in temporary files directory. in /var/www/vhcs2/gui/tools/filemanager/ftp.php on line 108

    Thanks in advance. Let me know what information could help you.

  25. #25
    Join Date
    Dec 2007
    Location
    Jakarta
    Posts
    115
    Great tuttorial, but i have this problem.

    root@vps102:~/vhcs2-2.4.7.1# /var/www/vhcs2/engine/setup/vhcs2-setup

    CRITICAL ERROR: Module [MIME::Entity] WAS NOT FOUND !

    CRITICAL ERROR: Module [MIME:arser] WAS NOT FOUND !

    CRITICAL ERROR: Module [Crypt::CBC] WAS NOT FOUND !

    CRITICAL ERROR: Module [Crypt:asswdMD5] WAS NOT FOUND !

    CRITICAL ERROR: Module [Term::ReadPassword] WAS NOT FOUND !

    Modules [MIME::Entity, MIME:arser, Crypt::CBC, Crypt:asswdMD5, Term::ReadPassword] WAS NOT FOUND in your system...
    How to fix that "WAS NOT FOUND !"...

    Thank You

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •