I can't finish install due a problem

Discussion in 'Installation/Configuration' started by Sam9999, Dec 17, 2009.

  1. Sam9999

    Sam9999 New Member

    I do the command:

    [root@localhost install]# php -q install.php

    then I begin have errors :

    sh: /which: No such file or directory
    sh: /which: No such file or directory
    sh: /which: No such file or directory
    sh: /which: No such file or directory
    sh: /which: No such file or directory
    sh: /which: No such file or directory
    sh: /which: No such file or directory
    sh: /which: No such file or directory
    sh: /which: No such file or directory
    sh: /which: No such file or directory
    sh: /which: No such file or directory
    sh: /which: No such file or directory
    sh: /which: No such file or directory
    sh: /which: No such file or directory
    sh: /which: No such file or directory
    sh: /which: No such file or directory


    And at the end another error and the program go out:

    MySQL database to create [dbispconfig]:

    MySQL charset [utf8]:

    sh: /mysql: No such file or directory
    sh: /echo: No such file or directory
    ERROR: Unable to load SQL-Dump into database table.
    [root@localhost install]#

    Then I have reinstalled mysql but the problem will stay even I have erase the db and redo the installazion of isp config.

    I the past I have do 2 soccessfully installation on a Centos Virtual machine, no is the some centos 5.4 on a old PC.

    I'll like to resolve. can you help me?
     
  2. falko

    falko Super Moderator Howtoforge Staff

    What's the output of
    Code:
    df -h
    ? Did you see any errors during the OS installation?
     
  3. Sam9999

    Sam9999 New Member

    I have had a error only during the installation of mysql.
    Because I have do the command without change "yourmpassword" with mi password here:
    mysqladmin -u root password yourrootsqlpassword
    mysqladmin -h server1.example.com -u root password yourrootsqlpassword

    But I have try to set mysql password successfully and erased (youm erase myslq-server) and reinstalled (youm install mysql-server)

    I have hte error again, I hope do not have to reinstall everything again.

    [root@localhost ~]# df -h
    Filesystem Dimens. Usati Disp. Uso% Montato su
    /dev/mapper/VolGroup00-LogVol00
    71G 6,0G 62G 9% /
    /dev/hda1 99M 29M 65M 31% /boot
    tmpfs 662M 0 662M 0% /dev/shm
    none 662M 104K 662M 1% /var/lib/xenstored
    [root@localhost ~]#
     
  4. falko

    falko Super Moderator Howtoforge Staff

    Strange. What's the output of
    Code:
    getenforce
    ?
     
  5. Sam9999

    Sam9999 New Member

    Here is disabled

    [root@localhost ~]# getenforce
    Disabled
    [root@localhost ~]# getenforce
    Disabled
    [root@localhost ~]#
     
  6. falko

    falko Super Moderator Howtoforge Staff

    That's ok. Did you see any errors during the operating system installation?
     
  7. Sam9999

    Sam9999 New Member

    Ok!

    I'm reinstalling.
    I'll give more attentions abount some SO errors!

    Regards.
     
  8. Xenocide

    Xenocide Member

    I've been having some troubles installing ISPConfig3 on *one* of my rhel5 boxes. The others were fine!

    When running install.php I get:

    Code:
    Operating System: Redhat or compatible, unknown version.
    
        Following will be a few questions for primary configuration so be careful.
        Default values are in [brackets] and can be accepted with <ENTER>.
        Tap in "quit" (without the quotes) to stop the installer.
    
    
    sh: /which: No such file or directory
    sh: /which: No such file or directory
    sh: /which: No such file or directory
    sh: /which: No such file or directory
    sh: /which: No such file or directory
    sh: /which: No such file or directory
    sh: /which: No such file or directory
    sh: /which: No such file or directory
    sh: /which: No such file or directory
    sh: /which: No such file or directory
    sh: /which: No such file or directory
    sh: /which: No such file or directory
    sh: /which: No such file or directory
    sh: /which: No such file or directory
    sh: /which: No such file or directory
    sh: /which: No such file or directory
    sh: /which: No such file or directory
    sh: /which: No such file or directory
    sh: /which: No such file or directory
    sh: /which: No such file or directory
    sh: /which: No such file or directory
    sh: /which: No such file or directory
    
    Which was a bit odd. I hacked index.php to this:

    Code:
    //** Detect the installed applications
    $inst->find_installed_apps();
    die(print_r($dist, true));
    
    and it displays:

    Code:
    sh: /which: No such file or directory
    sh: /which: No such file or directory
    sh: /which: No such file or directory
    sh: /which: No such file or directory
    sh: /which: No such file or directory
    sh: /which: No such file or directory
    sh: /which: No such file or directory
    sh: /which: No such file or directory
    sh: /which: No such file or directory
    sh: /which: No such file or directory
    sh: /which: No such file or directory
    sh: /which: No such file or directory
    sh: /which: No such file or directory
    sh: /which: No such file or directory
    sh: /which: No such file or directory
    sh: /which: No such file or directory
    sh: /which: No such file or directory
    sh: /which: No such file or directory
    sh: /which: No such file or directory
    sh: /which: No such file or directory
    sh: /which: No such file or directory
    sh: /which: No such file or directory
    Array
    (
        [name] => Redhat
        [version] => Unknown
        [id] => fedora9
        [baseid] => fedora
    )
    
    So it things it fedora9 - should it not be centos5?

    Anyway, when I look in ./dist/lib/fedora.php you can see a few instances of the command "which" being ran (all in configure_firewall())- none of them with / at the start..

    But, if you rename that function and make another one:

    Code:
    public function configure_firewall() { return true; }
    public function fef()
    It still occurs.

    So I dug a bit more and found this function in ./lib/install.lib.php

    Code:
    function is_installed($appname) {
            exec('which '.escapeshellcmd($appname).' 2> /dev/null',$out);
            if(isset($out[0]) && stristr($out[0],$appname)) {
                    return true;
            } else {
                    return false;
            }
    }
    
    So I modified it to output to the screen what it's about to run and got:

    Code:
    RUNNING: which mysql 2> /dev/null
    sh: /which: No such file or directory
    RUNNING: which mysqld 2> /dev/null
    sh: /which: No such file or directory
    RUNNING: which postfix 2> /dev/null
    sh: /which: No such file or directory
    RUNNING: which apache 2> /dev/null
    sh: /which: No such file or directory
    RUNNING: which apache2 2> /dev/null
    sh: /which: No such file or directory
    RUNNING: which httpd 2> /dev/null
    sh: /which: No such file or directory
    RUNNING: which getmail 2> /dev/null
    sh: /which: No such file or directory
    RUNNING: which couriertcpd 2> /dev/null
    sh: /which: No such file or directory
    RUNNING: which dovecot 2> /dev/null
    sh: /which: No such file or directory
    RUNNING: which saslsauthd 2> /dev/null
    sh: /which: No such file or directory
    RUNNING: which amavisd-new 2> /dev/null
    sh: /which: No such file or directory
    RUNNING: which clamdscan 2> /dev/null
    sh: /which: No such file or directory
    RUNNING: which pure-ftpd 2> /dev/null
    sh: /which: No such file or directory
    RUNNING: which pure-ftpd-wrapper 2> /dev/null
    sh: /which: No such file or directory
    RUNNING: which mydns 2> /dev/null
    sh: /which: No such file or directory
    RUNNING: which mydns-ng 2> /dev/null
    sh: /which: No such file or directory
    RUNNING: which jk_chrootsh 2> /dev/null
    sh: /which: No such file or directory
    RUNNING: which pdns_server 2> /dev/null
    sh: /which: No such file or directory
    RUNNING: which pdns_control 2> /dev/null
    sh: /which: No such file or directory
    RUNNING: which named 2> /dev/null
    sh: /which: No such file or directory
    RUNNING: which bind 2> /dev/null
    sh: /which: No such file or directory
    RUNNING: which bind9 2> /dev/null
    sh: /which: No such file or directory
    
    Which seems fine.

    So I used shell_exec instead and found I got a message which said (i'm adlibbing now) that I can't execute with backslashes when it's in safemode.

    Ofcourse! I changed php's safemode to on when I was editing php.ini earlier.

    Turn that off and it's right as rain!

    So I suggest adding

    Code:
    ini_get("safe_mode")
    to the install script somewhere to check if safemode is on before running the script.

    Hope that helps someone :).

    Probably not the right place for it but it's the only place i've found someone talking about that error in relation to ispconfig so hopefully it'll help someone in the future.
     

Share This Page