Date: 11/29/00
- Next message: Paul DuBois: "Re: [PHP-DB] Re: MySql or postgre?"
- Previous message: Johannes Janson: "Re: [PHP-DB] create database"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi,
My name is Ludwig Gamache. At work, we are presently using php3. But
I am in charge of changing our working version to php4. We are currently
using apache 1.3.9 with unixODBC 1.8.7 and php3 and it is working. Our DB is
on Sybase ASE and we use the unix drivers 11.9.2. But now, I have a weird
problem. I try to install unixODBC (1.8.13, I also tried 1.8.7) with php4
(last source) and Apache 1.3.12 from a Debian package. I have to use the
Debian packages of Apache. Do not ask me to recompile apache (But in case
you ask, we also tried to recompile it but it was crashing at the exact same
place). I also have to use the Apache-Dev package to have apxs. I first
compiled unixODBC with this configuration:
./configure --prefix=/usr/local/unixODBC --disable-gui --disable-drivers
--enable-thread=yes (we also tried to disable threads)
Then I compiled PHP4 with this config:
./configure --prefix=/usr/local/php4test --with-unixODBC=/usr/local/unixODBC
--with-apxs=/usr/sbin/apxs --enable-debug
We first tested the server with the basic httpd.conf, access.conf
and srm.conf. We first got a problem with the permissions on /root. If we do
not give 755 permissions to /root and /root/odbc.ini, apache crashes if we
load a page that need ODBC connects. If we do not use ODBC the server is not
crashing. We think that it is purely an unixODBC problem. It looks for the
user that is running the server (nobody) and try to open in read/write mode
the home of the parent process (that is owned by root). We solved the
problem by looking into gdb and strace. We saw that it was looking for
permissions on lot of files. So we had to set them to 755. We do not like
this kind of permissions but at least it works. Anyone has any idea how to
solve this permission problem by another way?
Then, we used our own apache configuration files. And it crashed
again. As soon as we try to start it, it was crashing. So it was not another
odbc problem. We found that when using ErrorLog in the VirtualHost Config,
it was crashing the system, even if it was working with unixODBC and php3.
If we comment the line, the server runs perfectly. Here is our VirtualHost
config.
<VirtualHost xxx.xxx.xx.xx>
ServerAdmin webmaster <email protected>
DocumentRoot /var/www/www.there.com
DirectoryIndex index.html index.phtml index.php3 index.php index.htm
index.shtml
ServerName www.there.com
#ErrorLog /var/log/apache/error-www.there.com.log
CustomLog /var/log/apache/Ncsa-www.there.com.log combined
ErrorDocument 404 http://www.there.com/
ErrorDocument 403 http://www.there.com/
</VirtualHost>
At the end of the httpd.conf file, we had to place those lines:
SetEnv SYBASE /opt/sybase-11.9.2
SetEnv HOME /var/odbc
Also, Debian is stille using the old way for the config files (3
(httpd, access, srm) files instead of 1 (httpd)). May this cause any
problem?
I did not want to post all our httpd.conf config since it has more
than 300 lines but if you need any part, I will be glad to mail it.
If we do not load the PHP4 module it works, if we load the php3
module it works. We tried to disable a lot of our modules but the problem
was the same.
Any idea? If you have any question about this problem, I will be
glad to answer on what we did.
We do not think that this is a normal situation. Apache should work
since it is a directive. So, we wonder if this is the only thing that will
crash the server. We know that there is 1 problem. But there could be more.
Anyone ever saw that kind of problem? Thanks
Ludwig Gamache
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-db-unsubscribe <email protected> For additional commands, e-mail: php-db-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Paul DuBois: "Re: [PHP-DB] Re: MySql or postgre?"
- Previous message: Johannes Janson: "Re: [PHP-DB] create database"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

