View Single Post
  #7  
Old 17th September 2010, 22:33
Xenocide Xenocide is offline
Member
 
Join Date: Sep 2010
Posts: 50
Thanks: 12
Thanked 6 Times in 5 Posts
Default

Quote:
Originally Posted by Sam9999 View Post
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?
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.
Reply With Quote