Re: Bug #781: Segfaults when both Sybase & MySQL compiled in & running NIS
| From: | Jouni Ahto | Date: | Thu, 24 Sep 1998 20:26:12 +0000 |
| Subject: | Re: Bug #781: Segfaults when both Sybase & MySQL compiled in & running NIS | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-1474@lists.php.net to get a copy of this message | ||
On Thu, 24 Sep 1998, Rasmus Lerdorf wrote:
> > getservbyname() ends up calling those functions starting with _nss_ (hooks
> > to get information from NIS), which in turn call dopen(), but that
> > dbopen() seems to be from sybase libs: they do contain a function named
> > db__init_charset(). There's probably not much to do about it.
>
> That would seem to be a basic Sybase-Linux compatibility problem. A
> workaround would be to not do that getservbyname lookup when Sybase is
> enabled. Does it work if you comment out that call?
php3/functions/mysql.c:259: if ((serv_ptr = getservbyname("mysql",
"tcp"))) {
It's the only place in PHP3 where getservbyname is called. Not compiling
MySQL in cures the problem. Haven't yet tested if I just comment a few
lines out, but I'm quite sure it would fix the problem. I'll test it first
thing in the morning (have to ge some sleep finally).
Oh, by the way: I did another test just a minute ago. Changing a few lines
in /etc/nsswitch.conf also cures the problem...
old:
protocols: db files
services: db files
new:
protocols: files
services: files
and dbopen() wasn't called...
Jouni
--
PHP Development Mailing List http://www.php.net/
To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net
For help: php-dev-help@lists.php.net