cvs: php4 /main SAPI.c
| From: | Jani Taskinen | Date: | Sat, 13 Jul 2002 00:15:22 +0000 |
| Subject: | cvs: php4 /main SAPI.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-12805@lists.php.net to get a copy of this message | ||
sniper Fri Jul 12 20:15:22 2002 EDT
Modified files:
/php4/main SAPI.c
Log:
- Fixed bug: #18268. If pcre is build as shared extension, we can't use
php_pcre_replace() here.
- Cleaned up a bit.
Index: php4/main/SAPI.c
diff -u php4/main/SAPI.c:1.135 php4/main/SAPI.c:1.136
--- php4/main/SAPI.c:1.135 Wed Jul 3 06:47:16 2002
+++ php4/main/SAPI.c Fri Jul 12 20:15:22 2002
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: SAPI.c,v 1.135 2002/07/03 10:47:16 sas Exp $ */
+/* $Id: SAPI.c,v 1.136 2002/07/13 00:15:22 sniper Exp $ */
#include <ctype.h>
#include <sys/stat.h>
@@ -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 @@
} 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 @@
efree(repl_temp);
}
#else
- if(PG(safe_mode)) {
+ {
myuid = php_getuid();
result = emalloc(32);
newlen = sprintf(result, "WWW-Authenticate: %ld", myuid);