cannot find file: /usr/local/bin/php

Status
Not open for further replies.

stepan007

Verified User
Joined
Aug 8, 2009
Messages
14
In the DA panel - "cannot find file: /usr/local/bin/php".

I'm search the forum and do as adviced:
1) ./build update, ./build clean, ./build zlib, ./build libxml2, ./build apache, ./build php and ./build all I also did as advised on some topics on this forum.
2) ln -s /usr/lib64/libexpat.so /usr/lib/libexpat.so/
3) I'm install Data::Dumper using cpan/
4) I'm use the --with-libdir=lib64, eg in the configure/ap2/configure.php5: --with-iconv \ --with-iconv-dir=/usr/local/lib \ --with-libdir=lib64 and take out the line: --with-iconv=/usr/local \/
5) in /etc/ld.so.conf I add /usr/local/lib and run ldconfig.

PHP compiles fine, no errors. But in the control panel - cannot find file: /usr/local/bin/php.


CentOS 5.0 64-bit, DirectAdmin 1.36.2.

[root@server /]# uname -a
Linux hostname 2.6.18-194.17.4.el5 #1 SMP Mon Oct 25 15:50:53 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux

Please help, thanks.
 
Code:
whereis php

What does the above command put out?

[root@server /]# whereis php
php: /bin/php /usr/bin/php /sbin/php /usr/sbin/php /usr/local/bin/php /usr/local/lib/php.ini /usr/local/lib/php

I'm ln -s to other directories, but no effect. Standart output of this command - /usr/local/bin/php /usr/local/lib/php.ini /usr/local/lib/php withous ln-s commands.
 
This error shows in directadmin. On all levels.

Skin enhanced.
On the admin level left column:
Complete Usage Statistics
Custom HTTPD Configurations
PHP SafeMode Configuration
cannot find file: /usr/local/bin/php

On the admin level right column:
Administrator Settings
Licensing / Updates
Plugin Manager
cannot find file: /usr/local/bin/php

On the reseller level left column:
System Information
Nameservers
cannot find file: /usr/local/bin/php

On the reseller level right column:
Message All Users
Contact Administrator
cannot find file: /usr/local/bin/php

All websites are working fine, no php error on the sites. No errors in the errol_logs. Problem only with directadmin - marina skin not working at all - it is only shows this errors.

Code:
yum list installed zlib-devel
zlib-devel.i386 1.2.3-3 installed
zlib-devel.x86_64 1.2.3-3 installed
Code:
yum list installed zlib
zlib.i386 1.2.3-3 installed
zlib.x86_64 1.2.3-3 installed
Code:
/usr/local/bin/php -v
PHP 5.2.14 (cli) (built: Nov 2 2010 05:34:22)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2010 Zend Technologies
with XCache v1.3.0, Copyright (c) 2005-2009, by mOo
with Zend Extension Manager v1.2.2, Copyright (c) 2003-2007, by Zend Technologies
with Zend Optimizer v3.3.3, Copyright (c) 1998-2007, by Zend Technologies

Code:
./build zlib, libxml2, apache, php, all d
All compiles OK, no errors.
 
For some reason your system doesn't may not have PHP where it's expected.

What do you get from:
Code:
ls -al /usr/local/bin/php

Jeff
 
For some reason your system doesn't may not have PHP where it's expected.

What do you get from:
Code:
ls -al /usr/local/bin/php

Jeff

[root@server /]# ls -al /usr/local/bin/php
-rwxr-xr-x 1 root root 26130338 Nov 3 23:47 /usr/local/bin/php
 
The next step would be to see the output of:
Code:
# ls -ald /usr/local/bin
# ls -ald /usr/local
# ls -ald /usr
Jeff
 
Expected output of Jeff's command would be:

Code:
[root@nl02 ~]#ls -ald /usr/local/bin
drwxr-xr-x 2 root root 4096 Jul 19 08:02 /usr/local/bin

Code:
[root@nl02 ~]#ls -ald /usr/local
drwxr-xr-x 15 root root 4096 Jul 19 07:51 /usr/local

Code:
[root@nl02 ~]#ls -ald /usr
drwxr-xr-x 14 root root 4096 Jul 18 22:07 /usr
 
[root@server /]# ls -ald /usr/local/bin
drw-r--r-- 2 root root 4096 Nov 4 17:04 /usr/local/bin
[root@server /]# ls -ald /usr/local
drwxr-xr-x 23 root root 4096 Nov 3 23:47 /usr/local
[root@server /]# ls -ald /usr
drwxr-xr-x 15 root root 4096 Oct 18 14:33 /usr

As I understood from the data written tomtom901, the problem is in the wrong permissions of the directory /usr/local/bin. Change permissions to 755 and the error in the directadmin disappeared.

Thank you very much jlasman and tomtom901. Topic can be closed.
 
Status
Not open for further replies.
Back
Top