Installation fails to run: cannot find /usr/local/bin/php

nobaloney

NoBaloney Internet Svcs - In Memoriam †
Joined
Jun 16, 2003
Messages
24,989
Location
California
Note that this is NOT the same error as others have under similar Post titles.

setup.sh fails to run at all... it looks for/usr/local/bin/php after it checks which version of custombuild I want to run. It doesn't find it (of course) because it's not installed yet, and it comes up with this error:
Code:
Cannot find /usr/local/bin/php
Please recompile php with custombuild, eg:
cd /usr/local/directadmin/custombuild
./build all d
Of course it can't; /usr/local/directadmin/custombuild doesn't exist yet.

Beginning on line 1259, setup.sh checks for php:
Code:
if [ ! -e /usr/local/bin/php ]; then
        echo "*******************************************";
        echo "*******************************************";
        echo "";
        echo "Cannot find /usr/local/bin/php";
        echo "Please recompile php with custombuild, eg:";
        echo "cd /usr/local/directadmin/custombuild";
        echo "./build all d";
        echo "";
Checking and comparing .setup.sh between this machine, today, with the problem, and a machine from months ago I noticed that lines in the setup.sh file which existed beginning with line 1248 didn't exist on the old server. I removed them and then the setup appeared to run properly.

Has anyone else had this problem?

Jeff
 
I had the same problem.

Also deleting the line fixed this.

One weird thing happend...

I have 3 servers, all new, clean install of CentOS 5.5, it only happends on 1 server, and the other one's had no problems at all.

All 3 servers have CentOS 5.5 64-Bit.

It is weird...true.

The last edit to the setup.sh is reported on 4 june 2010 19:45 (GMT +2)
 
Hello,

Check higher up in your output.

The check for php is done after everything.. but likely there is another abort that's happening first, which is what needs to be addressed.

Try manually running:
Code:
cd /usr/local/directadmin/scripts
./doChecks.sh
to see if it's stopping at that point.

You can also restart the install without having to re-enter your info:
Code:
cd /usr/local/directadmin/scripts
./install.sh
to see what's really going on.

The php check at the end seems to confuse people that it's the problem, when the issue is often something before that. The correct method would actually be to add the php check into the install.sh, and not the setup.sh.... so that when the install.sh quits for some reason, the php check isn't done.

John
 
The correct method would actually be to add the php check into the install.sh, and not the setup.sh.... so that when the install.sh quits for some reason, the php check isn't done.
Which still makes me wonder why it happens only one some systems, and why on the others, the check isn't even in the file.

Can you switch to adding the php check into install.sh? Or is there some other issue?

Thanks.

Jeff
 
I'll add it to the install.sh. This will simply remove the confusion, but won't explain why the compile failed in the first place. It will be less output so you'll be more likely to see the correct error rather than the extra missing php one. (The true cause of the abort will be higher up in the output)

John
 
Back
Top