summaryrefslogtreecommitdiff
path: root/main/SAPI.c
diff options
context:
space:
mode:
authorfoobar <sniper@php.net>2002-07-13 00:15:22 +0000
committerfoobar <sniper@php.net>2002-07-13 00:15:22 +0000
commitc7a68b78a7a65835e9c110a5cc9148ea726611ba (patch)
tree56012646407037e4cb6087ef61f1784b8078556e /main/SAPI.c
parent5d001a9ab62f733ca6006fce01242f55a256e833 (diff)
downloadphp-git-c7a68b78a7a65835e9c110a5cc9148ea726611ba.tar.gz
- Fixed bug: #18268. If pcre is build as shared extension, we can't use
php_pcre_replace() here. - Cleaned up a bit.
Diffstat (limited to 'main/SAPI.c')
-rw-r--r--main/SAPI.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/main/SAPI.c b/main/SAPI.c
index 3ac2f34af5..1aa931db60 100644
--- a/main/SAPI.c
+++ b/main/SAPI.c
@@ -27,7 +27,7 @@
#include "SAPI.h"
#include "ext/standard/php_string.h"
#include "ext/standard/pageinfo.h"
-#if HAVE_PCRE || HAVE_BUNDLED_PCRE
+#if (HAVE_PCRE || HAVE_BUNDLED_PCRE) && !defined(COMPILE_DL_PCRE)
#include "ext/pcre/php_pcre.h"
#endif
#ifdef ZTS
@@ -512,15 +512,16 @@ SAPI_API int sapi_header_op(sapi_header_op_enum op, void *arg TSRMLS_DC)
} else if (!STRCASECMP(header_line, "WWW-Authenticate")) { /* HTTP Authentication */
int newlen;
char *result, *newheader;
-#if HAVE_PCRE || HAVE_BUNDLED_PCRE
- zval *repl_temp;
- char *ptr = colon_offset+1;
- int ptr_len=0, result_len = 0;
-#endif
sapi_update_response_code(401 TSRMLS_CC); /* authentication-required */
-#if HAVE_PCRE || HAVE_BUNDLED_PCRE
- if(PG(safe_mode)) {
+
+ if(PG(safe_mode))
+#if (HAVE_PCRE || HAVE_BUNDLED_PCRE) && !defined(COMPILE_DL_PCRE)
+ {
+ zval *repl_temp;
+ char *ptr = colon_offset+1;
+ int ptr_len=0, result_len = 0;
+
myuid = php_getuid();
ptr_len = strlen(ptr);
@@ -571,7 +572,7 @@ SAPI_API int sapi_header_op(sapi_header_op_enum op, void *arg TSRMLS_DC)
efree(repl_temp);
}
#else
- if(PG(safe_mode)) {
+ {
myuid = php_getuid();
result = emalloc(32);
newlen = sprintf(result, "WWW-Authenticate: %ld", myuid);