Bug #14964 Updated: safe mode & basic authentication
| From: | gabriel at modwest dot com | Date: | Thu, 17 Jan 2002 18:59:14 +0000 |
| Subject: | Bug #14964 Updated: safe mode & basic authentication | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-77360@lists.php.net to get a copy of this message | ||
ID: 14964
Comment by: gabriel@modwest.com
Old Reported By: ceco@noxis.net
Reported By: gabriel@modwest.com
Status: Open
Bug Type: Unknown/Other Function
Operating System: linux
PHP Version: 4.1.1
New Comment:
We're having exactly the same problem. PHP 4.1.1, apache 1.3.22 on
Linux (kernel 2.4.14)
I don't want to revert to 4.0.6, so I put a big #if 0 around the code
in sapi_add_header_ex() in SAPI.c, in the "WWW-Authenticate" case,
where it does special stuff if safe mode is on. It's a band-aid, but
it works (for now)
Previous Comments:
------------------------------------------------------------------------
[2002-01-10 12:54:14] benter@yippi-yeah.com
Same error:
* SuSE 7.3, Apache/1.3.20 (Linux/SuSE), SuSE kernel 2.4.10-4GB
* installed php4.1.1
./configure --with-apxs=/usr/sbin/apxs \
--with-gd \
--with-freetype-dir=/usr/include/freetype2 \
--with-zlib \
--disable-debug \
--enable-safe-mode \
--with-exec-dir \
--enable-calendar \
--enable-magic-quotes \
--with-mysql=/usr \
--enable-ftp \
--enable-memory-limit \
--enable-track-vars \
--with-pdflib \
--with-jpeg-dir=/usr/lib \
--with-config-file-path=/usr/local/lib \
--with-png-dir=/usr/lib
* copied php.ini-recommended to /usr/local/lib/php.ini
* activated safe_mode in php.ini
* when using header("WWW-Authenticate: ... process dies
* error_log: [notice] child pid 14153 exit signal Segmentation fault
(11)
* with "safe_mode = off" getting user/pass dialog
* will post more info when needed
------------------------------------------------------------------------
[2002-01-10 08:24:12] ceco@noxis.net
the following problem, a script works flawlessly without safe mode, but
when safe mode enabled, the row
header("WWW-Authenticate: Basic realm=\"anything\"");
causes very strange error: apache doesn't return anything (no headers,
no content) - size 0 (i checked it even through telnet).
when i comment this line, just the HTML message for the incorrect user
or password is displayed (which should be displayed when cancel is hit
by the user)
the code below is
header("HTTP/1.0 401 Unauthorized");
echo 'incorrect user or password';
die();
I'm not 100% percent sure, but I think it is not error of configuring
php
------------------------------------------------------------------------
Edit this bug report at http://bugs.php.net/?id=14964&edit=1