Justtechjobs.com Find a programming school near you






Online Campus Both


php4-beta | 200004

Re: [PHP4BETA] .so support for odbc/adabas From: Andreas Karajannis (karajannis <email protected>)
Date: 04/01/00

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

-- 
PHP 4.0 Beta Mailing List <http://www.php.net/version4/>
To unsubscribe, e-mail: php4beta-unsubscribe <email protected>
For additional commands, e-mail: php4beta-help <email protected>
To contact the list administrators, e-mail: php4beta-admin <email protected>