php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #6035 apache segfaults when using PHP DSO/unixODBC/Sybase
Submitted: 2000-08-09 00:34 UTC Modified: 2000-08-29 17:57 UTC
From: lbouchard at gameloft dot com Assigned:
Status: Closed Package: ODBC related
PHP Version: 4.0.1pl2 OS: debian linux
Private report: No CVE-ID: None
 [2000-08-09 00:34 UTC] lbouchard at gameloft dot com
Hello, 

If apache has been started by root, when connecting to a DSN using the sybase odbc driver we bought from Sybase, the php page fails and I get the following message in apache's error log: 

[Wed Aug  9 03:24:04 2000] [notice] child pid 20133 exit signal Segmentation fault (11)

If apache is started with a normal users, no problem. 

In both cases the user and group set in httpd.conf are different from root. It's the user who starts the daemon that causes the problem. 


Here are my configures lines: 
apache-1.3.12
./configure --prefix=/usr/local/apache-1.3.12 --enable-module=so

unixODBDC-1.8.10
./configure --prefix=/usr/local/unixODBC-1.8.10 --disable-gui --disable-drivers 

php4.1pl2
./configure --prefix=/usr/local/php-4.0.1pl2 --with-unixODBC=/usr/local/unixODBC-
1.8.10 --with-apxs=/usr/local/apache-1.3.12/bin/apxs --disable-short-tags --enab
le-ftp --enable-wddx

And we're using a sybase odbc driver we bought from them. 
I can sent it to you if required. 

Thanks for your help. 

Luc. 



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-08-23 08:09 UTC] sniper@php.net
Please attach a backtrace. And try using recent CVS or
snapshot from http://snaps.php.net

http://bugs.php.net/bugs-generating-backtrace.php

--Jani
 [2000-08-29 17:57 UTC] sniper@php.net
User feedback:
-------------
We finally discovered the problem: 
The sybase odbc driver tries to open the ~/.odbc.ini file. Since the server
is started as root, the ~/.odbc.ini file is in /root. Once apache has forked
and runs under wwwdata, the wwwdata user doesn't have access to the
/root/.odbc.ini file. 

It's weird the the sybase odbc driver tries to open the /root/.odbc.ini
file. I thought it was unixODBC's job to do that. 

I'll ask sybase about that. 
-------------

Closed bug report as this wasn't bug in php4 .

--Jani
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 24 15:01:30 2024 UTC