Re: [PHP4BETA] .so support for odbc/adabas
| From: | Andreas Karajannis | Date: | Sat, 01 Apr 2000 12:45:42 +0000 |
| Subject: | Re: [PHP4BETA] .so support for odbc/adabas | ||
| References: | 1 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-12980@lists.php.net to get a copy of this message | ||
Eike Stepper wrote:
>
> <snip-snap>
> Syntax error on line 213 of /www/conf/httpd.conf:
> Cannot load /www/libexec/libphp4.so into server: /www/libexec/libphp4.so:
> undefined symbol: _xstat
> ../bin/apachectl start: httpd could not be started
> </snip-snap>
>
> an idea?
>
The adabas libraries libsqlptc and libsqlrte are using private symbols
from libc. This worked up to glibc 2.0, as of 2.1 the functions are no
longer exported by glibc. The solution is to either get newer libraries,
probably from Suse or to write wrapper functions that map these
functions to their "official" equivalents:
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
/*
* wrapper for glibc 2.1 private functions, allows linking
* of object files compiled for older libc versions
*
* int stat(const char *file_name, struct stat *buf);
* int mknod(const char *pathname, mode_t mode, dev_t dev);
*/
int _xstat(int dummy, const char *file_name, struct stat *buf)
{
return stat(file_name, buf);
}
int _xmknod(int dummy, const char *pathname, mode_t mode, dev_t dev)
{
return mknod(pathname, mode, dev);
}
-Andreas