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

chow

Verified User
Joined
Aug 27, 2003
Messages
123
Location
The Netherlands
Hi, getting in DA everywhere cannot find file: /usr/local/bin/php. Installed DA on FreeBSD 5.2.1. Any clue what's wrong??
 
Do you have any plugins installed?
/usr/local/bin/php is the default path for php. Where was it installed, if at all?
 
jmstacey said:
Do you have any plugins installed?
/usr/local/bin/php is the default path for php. Where was it installed, if at all?

Just did a default clean install of FreeBSD. Afterwards a DA installation. Nothing special.
 
I noticed both httpd and mysqld are stopped. Not possible to start them. Recompiling php gives
configure: error: mysql configure failed. Please check config.log for more information.
 
toml said:
And your config.log said......

Unable to find the config.log on the system. I'm a newbie on FreeBSD. More used to Fedora :(
I think Openssl is not installed. Probably the reason for the errors. Tried the pkg_add command in /usr/ports/security but getting error that files don't seem to be tar. Struggling for hours now but no success till now.
 
the config.log file should be located in /usr/local/directadmin/customapache/php-4.4.2/config.log assuming that you are trying to compile 4.4.2 version of php.
 
toml said:
the config.log file should be located in /usr/local/directadmin/customapache/php-4.4.2/config.log assuming that you are trying to compile 4.4.2 version of php.

Pfff, doesn't make sense to me

configure:2026: checking whether the C compiler (gcc ) is a cross-compiler
configure:2031: checking whether we are using GNU C
configure:2040: gcc -E conftest.c
configure:2059: checking whether gcc accepts -g
configure:2092: checking whether gcc and cc understand -c and -o together
configure:2107: gcc -c conftest.c -o conftest.o 1>&5
configure:2108: gcc -c conftest.c -o conftest.o 1>&5
configure:2113: cc -c conftest.c 1>&5
configure:2115: cc -c conftest.c -o conftest.o 1>&5
configure:2116: cc -c conftest.c -o conftest.o 1>&5
configure:2143: checking how to run the C preprocessor
configure:2164: gcc -E conftest.c >/dev/null 2>conftest.out
configure:2224: checking for AIX
configure:2251: checking if compiler supports -R
configure:2266: gcc -o conftest -g -O2 conftest.c -R /usr/lib 1>&5
configure:2325: checking for re2c
configure:2354: checking whether ln -s works
configure:2379: checking for gawk
configure:2379: checking for mawk
configure:2379: checking for nawk
configure:2413: checking for bison
configure:2447: checking bison version
configure:2457: checking for flex
configure:2491: checking for yywrap in -lfl
configure:2510: gcc -o conftest -g -O2 conftest.c -lfl 1>&5
configure:2534: checking lex output file root
configure:2555: checking whether yytext is a pointer
configure:2574: gcc -o conftest -g -O2 conftest.c -lfl 1>&5
configure:2598: checking for working const
configure:2652: gcc -c -g -O2 conftest.c 1>&5
configure:2677: checking flex version
configure:2693: checking whether byte ordering is bigendian
configure:2719: gcc -o conftest -g -O2 conftest.c 1>&5
configure: failed program was:
#line 2703 "configure"
#include "confdefs.h"

int main(void)
{
short one = 1;
char *cp = (char *)&one;

if (*cp == 0) {
return(0);
} else {
return(1);
}
}

configure:2931: checking whether to force non-PIC code in shared modules
configure:3055: gcc -o conftest -g -O2 conftest.c 1>&5
/var/tmp//cc7tZ8UC.o: In function `main':
/usr/local/directadmin/customapache/php-4.4.2/configure:3051: undefined referenc
e to `pthread_create'
configure: failed program was:
#line 3037 "configure"
#include "confdefs.h"

#include <pthread.h>
#include <stddef.h>

void *thread_routine(void *data) {
return data;
}

int main() {
pthread_t thd;
pthread_mutexattr_t mattr;
int data = 1;
pthread_mutexattr_init(&mattr);
return pthread_create(&thd, NULL, thread_routine, &data);
}
configure:3075: checking for pthreads_cflags
configure:3115: gcc -o conftest -g -O2 -kthread conftest.c 1>&5
gcc: unrecognized option `-kthread'
/var/tmp//ccDRIoZx.o: In function `main':
/usr/local/directadmin/customapache/php-4.4.2/configure:3111: undefined referenc
e to `pthread_create'
configure: failed program was:
#line 3097 "configure"
#include "confdefs.h"

#include <pthread.h>
#include <stddef.h>

void *thread_routine(void *data) {
return data;
}

int main() {
pthread_t thd;
pthread_mutexattr_t mattr;
int data = 1;
pthread_mutexattr_init(&mattr);
return pthread_create(&thd, NULL, thread_routine, &data);
}
configure:3115: gcc -o conftest -g -O2 -pthread conftest.c 1>&5
configure:3145: checking for pthreads_lib
configure:3283: checking for AOLserver support
configure:3524: checking for Apache 1.x module support via DSO through APXS
configure:4662: checking for mod_charset compatibility option
configure:4729: checking for member fd in BUFF *
configure:4748: gcc -c -g -O2 -I/usr/include/apache conftest.c 1>&5
configure:4799: checking for Apache 2.0 filter-module support via DSO through AP
XS
configure:5621: checking for Apache 2.0 handler-module support via DSO through A
PXS
configure:6444: checking for Caudium support
configure:6774: checking for CLI build
configure:6837: checking for embedded SAPI library support
configure:7040: checking for Zeus ISAPI support
configure:7270: checking for NSAPI support
configure:7611: checking for PHTTPD support
configure:7840: checking for Pi3Web support
configure:8169: checking for Roxen/Pike support
configure:8438: checking for Servlet support
configure:8956: checking for thttpd
configure:9182: checking for TUX
configure:9416: checking for webjames
configure:9837: checking for chosen SAPI module
configure:10742: checking for missing declarations of reentrant functions
configure:10751: gcc -c -g -O2 conftest.c 1>&5
configure:10776: gcc -c -g -O2 conftest.c 1>&5
configure:10801: gcc -c -g -O2 conftest.c 1>&5
configure:10826: gcc -c -g -O2 conftest.c 1>&5
configure:10851: gcc -c -g -O2 conftest.c 1>&5
configure:10875: checking for sendmail
configure:10916: checking whether system uses EBCDIC
configure:10935: gcc -o conftest -g -O2 conftest.c 1>&5
configure: failed program was:
#line 10927 "configure"
#include "confdefs.h"

int main(void) {
return (unsigned char)'A' != (unsigned char)0xC1;
}

configure:11008: checking for socket
configure:11036: gcc -o conftest -g -O2 conftest.c 1>&5
configure:11265: checking for htonl
configure:11293: gcc -o conftest -g -O2 conftest.c 1>&5
configure:11522: checking for gethostname
configure:11550: gcc -o conftest -g -O2 conftest.c 1>&5
configure:11779: checking for gethostbyaddr
configure:11807: gcc -o conftest -g -O2 conftest.c 1>&5
configure:12036: checking for yp_get_default_domain
configure:12064: gcc -o conftest -g -O2 conftest.c 1>&5
configure:12294: checking for dlopen
configure:12322: gcc -o conftest -g -O2 conftest.c 1>&5
configure:12552: checking for sin in -lm
configure:12571: gcc -o conftest -g -O2 conftest.c -lm 1>&5
configure:12564: warning: conflicting types for built-in function `sin'
configure:12605: checking for res_search
configure:12633: gcc -o conftest -g -O2 conftest.c -lm 1>&5
configure:13141: checking for inet_aton
configure:13169: gcc -o conftest -g -O2 conftest.c -lm 1>&5
configure:13537: checking for dn_skipname
configure:13565: gcc -o conftest -g -O2 conftest.c -lm 1>&5
/var/tmp//ccneInCX.o: In function `main':
/usr/local/directadmin/customapache/php-4.4.2/configure:13559: undefined referen
ce to `dn_skipname'
configure: failed program was:
#line 13542 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char dn_skipname(); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char dn_skipname();

int main() {

/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
/var/tmp//ccyXI5tx.o: In function `main':
/usr/local/directadmin/customapache/php-4.4.2/configure:14309: undefined referen
ce to `fopencookie'
configure: failed program was:
#line 14292 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char fopencookie(); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char fopencookie();

int main() {

/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_fopencookie) || defined (__stub___fopencookie)
choke me
#else
fopencookie();
#include <unix.h>
configure:14248: checking for utime.h
configure:14258: gcc -E conftest.c >/dev/null 2>conftest.out
configure:14248: checking for sys/utsname.h
configure:14258: gcc -E conftest.c >/dev/null 2>conftest.out
configure:14248: checking for sys/ipc.h
configure:14258: gcc -E conftest.c >/dev/null 2>conftest.out
configure:14248: checking for dlfcn.h
configure:14258: gcc -E conftest.c >/dev/null 2>conftest.out
configure:14287: checking for fopencookie
configure:14315: gcc -o conftest -g -O2 conftest.c -lm 1>&5
/var/tmp//ccyXI5tx.o: In function `main':
/usr/local/directadmin/customapache/php-4.4.2/configure:14309: undefined reference to `fopencookie'
configure: failed program was:
#line 14292 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char fopencookie(); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char fopencookie();

int main() {

/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_fopencookie) || defined (__stub___fopencookie)
choke me
#else
fopencookie();
#endif

; return 0; }
configure:14459: checking for broken getcwd
configure:14474: checking for broken libc stdio
configure:14535: gcc -o conftest -g -O2 conftest.c -lm 1>&5
configure:14563: checking whether struct tm is in sys/time.h or time.h
configure:14576: gcc -c -g -O2 conftest.c 1>&5
configure:14597: checking for tm_zone in struct tm
configure:14610: gcc -c -g -O2 conftest.c 1>&5
 
Hello,

I think fopencooie is a builtin php function.. I have a hunch that maybe your php-4.4.2.tar.gz file isn't all there.

Try:
Code:
cd /usr/local/directadmin/customapache
rm -f *.tar.gz
./build update
./build php n
John
 
DirectAdmin Support said:
Hello,

I think fopencooie is a builtin php function.. I have a hunch that maybe your php-4.4.2.tar.gz file isn't all there.

Try:
Code:
cd /usr/local/directadmin/customapache
rm -f *.tar.gz
./build update
./build php n
John

Now I get

configure: error: mysql configure failed. Please check config.log for more information.

*** There was an error while trying to configure php. Check the configure.php file
 
Hello,

Whats the actual error message? (it should be 1/2 to a full page obove the end of the output)

Check your configure.php file. If mysql is installed correctly, this should be in it:

--with-mysql=/usr/local/mysql \

If you just have "--with-mysql \", then change it to match the above bit and try again.

Also check thta /usr/local/mysql/* exists.

John
 
I see the output from your config.log.. but it doesn't seem very mysql related. Can you paste the tail end of it? eg:

tail -n 30 config.log

John
 
DirectAdmin Support said:
I see the output from your config.log.. but it doesn't seem very mysql related. Can you paste the tail end of it? eg:

tail -n 30 config.log

John

configure:62625: checking for mysql_close in -lmysqlclient
configure:62644: gcc -o conftest -g -O2 -R/usr/local/mysql/lib -L/usr/local/mysql/lib -R/usr/local/lib -L/usr/local/lib con
ftest.c -lmysqlclient -lmhash -lmcrypt -lintl -lpng -lz -ljpeg -lcurl -lz -lssl -lcrypto -lm -lgssapi -lkrb5 -lasn1 -lcrypt
o -lroken -lcrypt -lcom_err -lcurl -lssl -lcrypto -lz 1>&5
/usr/local/mysql/lib/libmysqlclient.a(my_gethostbyname.o): In function `my_gethostbyname_r':
my_gethostbyname.o(.text+0x12): undefined reference to `__h_error'
configure: failed program was:
#line 62633 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char mysql_close();

int main() {
mysql_close()
; return 0; }
configure:62849: checking for mysql_error in -lmysqlclient
configure:62868: gcc -o conftest -g -O2 -R/usr/local/mysql/lib -L/usr/local/mysql/lib -R/usr/local/lib -L/usr/local/lib -R/
usr -L/usr conftest.c -lmysqlclient -lz -lmhash -lmcrypt -lintl -lpng -lz -ljpeg -lcurl -lz -lssl -lcrypto -lm -lgssapi -lk
rb5 -lasn1 -lcrypto -lroken -lcrypt -lcom_err -lcurl -lssl -lcrypto -lz 1>&5
/usr/local/mysql/lib/libmysqlclient.a(my_gethostbyname.o): In function `my_gethostbyname_r':
my_gethostbyname.o(.text+0x12): undefined reference to `__h_error'
configure: failed program was:
#line 62857 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char mysql_error();

int main() {
mysql_error()
; return 0; }
 
Hello,

I'm really not sure. The key error is
Code:
my_gethostbyname.o(.text+0x12): undefined reference to `__h_error'
I didn't find anything definitive with google. Recompiling mysql from scratch might be one option... or downloading another binary package for dev.mysql.com.. if you were to compile mysql yourself, get the source from dev.mysql.com, and use these configure options:
Code:
     CFLAGS=-DHAVE_BROKEN_REALPATH ./configure \
     --prefix=/usr/local/mysql --with-extra-charsets=complex \
     --enable-thread-safe-client --enable-local-infile \
     --enable-assembler --with-named-z-libs=not-used --disable-shared \
     --enable-static
or even try an older binary package from our files server:
http://files.directadmin.com/services/freebsd5.1/

Extract to /usr/local and link the /usr/local/mysql to the new directory. cd to /usr/local/mysql, delete "data", and link data to /home/mysql.

John
 
I did a search on __h_error and a few people were having that problem, but noone had a solution. I don't have a FreeBSD system, so I can't be of much help.

You could write a small script to do an nm on all your shared libraries (/lib, /usr/lib, /usr/local/lib) and find the shared library that defines __h_error and make sure to add that to your LDFLAGS.
 
Back
Top