[PHP-CVS] cvs: php4 /ext/session/tests 021.phpt

2002-10-07 Thread Sascha Schumann

sas Mon Oct  7 06:07:27 2002 EDT

  Modified files:  
/php4/ext/session/tests 021.phpt 
  Log:
  Call ob_flush to force the buffer contents to go through the rewriter.
  
  
Index: php4/ext/session/tests/021.phpt
diff -u php4/ext/session/tests/021.phpt:1.1 php4/ext/session/tests/021.phpt:1.2
--- php4/ext/session/tests/021.phpt:1.1 Thu Oct  3 19:12:16 2002
+++ php4/ext/session/tests/021.phpt Mon Oct  7 06:07:27 2002
 -18,6 +18,8 
 fieldset
 ?php
 
+ob_flush();
+
 ini_set(url_rewriter.tags, a=href,area=href,frame=src,input=src,form=);
 
 ?
 -25,6 +27,8 
 fieldset
 ?php
 
+ob_flush();
+
 ini_set(url_rewriter.tags, a=href,area=href,frame=src,input=src,form=fakeentry);
 
 ?
 -32,12 +36,15 
 fieldset
 ?php
 
+ob_flush();
+
 ini_set(url_rewriter.tags, a=href,fieldset=,area=href,frame=src,input=src);
 
 ?
 form
 fieldset
 ?php
+
 session_destroy();
 ?
 --EXPECT--



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4 /main rfc1867.c

2002-10-07 Thread Stefan Esser

sesser  Mon Oct  7 07:23:25 2002 EDT

  Modified files:  
/php4/main  rfc1867.c 
  Log:
  Closing protected variables hole
  
  
  
Index: php4/main/rfc1867.c
diff -u php4/main/rfc1867.c:1.116 php4/main/rfc1867.c:1.117
--- php4/main/rfc1867.c:1.116   Sat Aug 17 07:48:21 2002
+++ php4/main/rfc1867.c Mon Oct  7 07:23:24 2002
@@ -16,7 +16,7 @@
|  Jani Taskinen [EMAIL PROTECTED]  |
+--+
  */
-/* $Id: rfc1867.c,v 1.116 2002/08/17 11:48:21 sesser Exp $ */
+/* $Id: rfc1867.c,v 1.117 2002/10/07 11:23:24 sesser Exp $ */
 
 /*
  *  This product includes software developed by the Apache Group
@@ -70,16 +70,68 @@
REGISTER_MAIN_LONG_CONSTANT(UPLOAD_ERR_NO_FILE,UPLOAD_ERROR_D,  CONST_CS 
| CONST_PERSISTENT);
 }
 
+static void normalize_protected_variable(char *varname TSRMLS_DC)
+{
+   char *s=varname, *index=NULL, *indexend=NULL;
+   
+   /* overjump leading space */
+   while (*s == ' ') {
+   s++;
+   }
+   
+   /* and remove it */
+   if (s != varname) {
+   memcpy(varname, s, strlen(s)+1);
+   }
+
+   /* find index */
+   index = strchr(varname, '[');
+   if (index) {
+   index++;
+   s=index;
+   } else {
+   return;
+   }
+
+   /* done? */
+   while (index) {
+   
+   while (*index == ' ' || *index == '\r' || *index == '\n' || 
+*index=='\t') {
+   index++;
+   }
+   indexend = strchr(index, ']');
+   indexend = indexend ? indexend + 1 : index + strlen(index);
+   
+   if (s != index) {
+   memcpy(s, index, strlen(s)+1);
+   s += indexend-index;
+   } else {
+   s = indexend;
+   }
+
+   if (*s == '[') {
+   s++;
+   index = s;
+   } else {
+   index = NULL;
+   }   
+   }
+   *s++='\0';
+}
+
+
 static void add_protected_variable(char *varname TSRMLS_DC)
 {
int dummy=1;
 
+   normalize_protected_variable(varname TSRMLS_CC);
zend_hash_add(PG(rfc1867_protected_variables), varname, strlen(varname)+1, 
dummy, sizeof(int), NULL);
 }
 
 
 static zend_bool is_protected_variable(char *varname TSRMLS_DC)
 {
+   normalize_protected_variable(varname TSRMLS_CC);
return zend_hash_exists(PG(rfc1867_protected_variables), varname, 
strlen(varname)+1);
 }
 



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-CVS] cvs: php4 /main output.c

2002-10-07 Thread Derick Rethans

On Fri, 4 Oct 2002, Marcus Börger wrote:

 This affects some of the newly introduced tests and the ob discussion...
 
 Derick could you verify that your test uses the correct ini file when running:
 
 sapi/cli/php -c php.ini-dist run-tests.php tests/strings/004.phpt
 
 Remember the handling and test for ini detection is currently NOT correct.
 As far as i can see it seems like you used an old version from the ini since
 the test you wrote expects some #BB coulor but in the current ini
 
 highlight.string  = #CC
 highlight.comment = #FF9900
 highlight.keyword = #006600
 highlight.bg  = #FF
 highlight.default = #CC
 highlight.html= #00
 
 i can find no #BB

Now you see how even sinple fixes to the colors can affect things :) I 
fixed this test.

Derick

--

---
 Derick Rethans   http://derickrethans.nl/ 
 JDI Media Solutions
--[ if you hold a unix shell to your ear, do you hear the c? ]-


-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4 /ext/mbstring mbfilter.c

2002-10-07 Thread Stefan Esser

sesser  Mon Oct  7 12:11:31 2002 EDT

  Modified files:  
/php4/ext/mbstring  mbfilter.c 
  Log:
  never smash the stack...
  
  
  
Index: php4/ext/mbstring/mbfilter.c
diff -u php4/ext/mbstring/mbfilter.c:1.44 php4/ext/mbstring/mbfilter.c:1.45
--- php4/ext/mbstring/mbfilter.c:1.44   Mon Oct  7 12:05:28 2002
+++ php4/ext/mbstring/mbfilter.cMon Oct  7 12:11:30 2002
 -79,7 +79,7 
  *
  */
 
-/* $Id: mbfilter.c,v 1.44 2002/10/07 16:05:28 sesser Exp $ */
+/* $Id: mbfilter.c,v 1.45 2002/10/07 16:11:30 sesser Exp $ */
 
 
 #ifdef HAVE_CONFIG_H
 -3535,6 +3535,7 
 {
int tmp[10];
int i = 0, p = 0, e;
+   unsigned int uc;
 
if (c256  mblen_table_html[c]==1) {
CK((*filter-output_function)(c, filter-data TSRMLS_CC));
 -3554,15 +3555,17 
}
i++;
}
+   i=0;
if (!p) {
CK((*filter-output_function)('#', filter-data TSRMLS_CC));
+   uc = (unsigned int)c;
do {
-   tmp[i++] = '0'+c%10;
-   c /= 10;
-   } while (c);
+   tmp[i++] = '0'+uc%10;
+   uc /= 10;
+   } while (uc);
do {
CK((*filter-output_function)(tmp[--i], filter-data 
TSRMLS_CC));
-   } while(i);
+   } while (i);
}
CK((*filter-output_function)(';', filter-data TSRMLS_CC));
}



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4(PHP_4_3) /ext/mbstring php_mbregex.c

2002-10-07 Thread Moriyoshi Koizumi

moriyoshi   Mon Oct  7 12:17:22 2002 EDT

  Modified files:  (Branch: PHP_4_3)
/php4/ext/mbstring  php_mbregex.c 
  Log:
  MFH
  
  
  
Index: php4/ext/mbstring/php_mbregex.c
diff -u php4/ext/mbstring/php_mbregex.c:1.5.2.2 php4/ext/mbstring/php_mbregex.c:1.5.2.3
--- php4/ext/mbstring/php_mbregex.c:1.5.2.2 Sun Oct  6 12:48:51 2002
+++ php4/ext/mbstring/php_mbregex.c Mon Oct  7 12:17:22 2002
 -16,7 +16,7 
+--+
  */
 
-/* $Id: php_mbregex.c,v 1.5.2.2 2002/10/06 16:48:51 moriyoshi Exp $ */
+/* $Id: php_mbregex.c,v 1.5.2.3 2002/10/07 16:17:22 moriyoshi Exp $ */
 
 
 #ifdef HAVE_CONFIG_H
 -430,15 +430,15 
pos = 0;
while (err = 0) {
err = mbre_search(re, string, string_len, pos, string_len - pos, 
regs);
-   if ( regs.beg[0] == regs.end[0] ) {
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, Empty regular 
expression);
-   break;
-   }
if (err = -2) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, mbregex search 
failure in php_mbereg_replace_exec());
break;
}
if (err = 0) {
+   if ( regs.beg[0] == regs.end[0] ) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, Empty 
+regular expression);
+   break;
+   }
/* copy the part of the string before the match */
php_mbregex_strbuf_ncat(outdev, string[pos], regs.beg[0] - 
pos);
/* copy replacement and backrefs */



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4 /ext/standard dir.c

2002-10-07 Thread Rasmus Lerdorf

rasmus  Mon Oct  7 12:46:38 2002 EDT

  Modified files:  
/php4/ext/standard  dir.c 
  Log:
  readdir() was returning NULL instead of FALSE when used on an invalid
  directory handle.  If someone forgot to check (as someone here did) that
  the opendir() succeeded, and then followed the documented usage by checking
  readdir()!==FALSE things would go awry.  The ZEND_FETCH_RESOURCE macro
  explicitly does a RETURN_NULL on failure which is not what we want in this 
  case, so work around it.  No need to change it for the OO case since the
  object is not created if the opendir fails.
  
  
Index: php4/ext/standard/dir.c
diff -u php4/ext/standard/dir.c:1.107 php4/ext/standard/dir.c:1.108
--- php4/ext/standard/dir.c:1.107   Fri Oct  4 14:03:29 2002
+++ php4/ext/standard/dir.c Mon Oct  7 12:46:38 2002
 -16,7 +16,7 
+--+
  */
 
-/* $Id: dir.c,v 1.107 2002/10/04 18:03:29 rasmus Exp $ */
+/* $Id: dir.c,v 1.108 2002/10/07 16:46:38 rasmus Exp $ */
 
 /* {{{ includes/startup/misc */
 
 -85,7 +85,9 
} else if ((ZEND_NUM_ARGS() != 1) || zend_get_parameters_ex(1, id) == 
FAILURE) { \
WRONG_PARAM_COUNT; \
} else { \
-   ZEND_FETCH_RESOURCE(dirp, php_stream *, id,-1, Directory, 
php_file_le_stream()); \
+   dirp = (php_stream *) zend_fetch_resource(id TSRMLS_CC, -1, 
+Directory, NULL, 1, php_file_le_stream()); \
+   if(!dirp) \
+   RETURN_FALSE; \
} 
 
 static zend_function_entry php_dir_class_functions[] = {



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4(PHP_4_3) /ext/mbstring php_mbregex.c

2002-10-07 Thread Moriyoshi Koizumi

moriyoshi   Mon Oct  7 12:48:16 2002 EDT

  Modified files:  (Branch: PHP_4_3)
/php4/ext/mbstring  php_mbregex.c 
  Log:
  fixed mb_split()
  
  
  
Index: php4/ext/mbstring/php_mbregex.c
diff -u php4/ext/mbstring/php_mbregex.c:1.5.2.3 php4/ext/mbstring/php_mbregex.c:1.5.2.4
--- php4/ext/mbstring/php_mbregex.c:1.5.2.3 Mon Oct  7 12:17:22 2002
+++ php4/ext/mbstring/php_mbregex.c Mon Oct  7 12:48:15 2002
 -16,7 +16,7 
+--+
  */
 
-/* $Id: php_mbregex.c,v 1.5.2.3 2002/10/07 16:17:22 moriyoshi Exp $ */
+/* $Id: php_mbregex.c,v 1.5.2.4 2002/10/07 16:48:15 moriyoshi Exp $ */
 
 
 #ifdef HAVE_CONFIG_H
 -552,6 +552,8 
break;
}
 
+   if (count == 0) count = 1; 
+
if (array_init(return_value) == FAILURE) {
RETURN_FALSE;
}
 -574,7 +576,7 
pos = 0;
err = 0;
/* churn through str, generating array entries as we go */
-   while ((count != 0) 
+   while ((--count != 0) 
   (err = mbre_search(re, string, string_len, pos, string_len - pos, 
regs)) = 0) {
if ( regs.beg[0] == regs.end[0] ) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, Empty regular 
expression);
 -583,7 +585,7 
 
n = regs.beg[0];
/* add it to the array */
-   if (n  string_len  n = pos) {
+   if (n  string_len  n = pos) {
n -= pos;
add_next_index_stringl(return_value, string[pos], n, 1);
} else {
 -597,10 +599,8 
} else {
pos++;
}
-   /* if we're only looking for a certain number of points,
-  stop looking once we hit it */
-   if (count  0) {
-   count--;
+   if (count  0) {
+   count = 0;
}
}
 



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4 /ext/xslt/tests 008.phpt xslt_set_object.xsl

2002-10-07 Thread David Viner

dviner  Mon Oct  7 12:59:07 2002 EDT

  Added files: 
/php4/ext/xslt/tests008.phpt xslt_set_object.xsl 
  Log:
  adding test of xslt_set_object
  --dviner
  
  

Index: php4/ext/xslt/tests/008.phpt
+++ php4/ext/xslt/tests/008.phpt
--TEST--
xslt_set_object function
--SKIPIF--
?php
include(skipif.inc);
if(!function_exists('xslt_set_object')) {
die(skip\n);
}
?
--FILE--
?php
error_reporting(E_ALL);
class XSLTTester
{
var $_success = false;
var $_success2 = false;

function XSLTTester()
{}

// this function will register this object as the
// callback object.
function test1($xmlfile,$xslfile)
{
$xh = xslt_create();
xslt_set_object($xh,$this);
$handlers = array('get_all'= 'handle_getall');
xslt_set_scheme_handlers($xh,$handlers);
$res = xslt_process($xh,$xmlfile,$xslfile);
xslt_free($xh);
return 1;
}

// this function will pass this object as in set_scheme_handler
function test2($xmlfile,$xslfile)
{
$xh = xslt_create();
$handlers = array('get_all'= array($this,'handle_getall2'));
xslt_set_scheme_handlers($xh,$handlers);
$res = xslt_process($xh,$xmlfile,$xslfile);
xslt_free($xh);
return 1;
}
function handle_getall($xh,$scheme,$rest)
{
$this-_success = true;
$rest = substr($rest,2);
return implode('', file('ext/xslt/tests/'.$rest));
}
function handle_getall2($xh,$scheme,$rest)
{
$this-_success2 = true;
$rest = substr($rest,2);
return implode('', file('ext/xslt/tests/'.$rest));
}
function testSucceeded()
{
return $this-_success;
}
function test2Succeeded()
{
return $this-_success2;
}
}

$xmlfile = 'ext/xslt/tests/test.xml';
$xslfile = 'ext/xslt/tests/xslt_set_object.xsl';

$testobj = new XSLTTester();
$testobj-test1($xmlfile,$xslfile);

$testobj-test2($xmlfile,$xslfile);

if ($testobj-testSucceeded())
print OK\n;
else
print FAILED\n;

if ($testobj-test2Succeeded())
print OK\n;
else
print FAILED\n;

?
--EXPECT--
OK
OK

Index: php4/ext/xslt/tests/xslt_set_object.xsl
+++ php4/ext/xslt/tests/xslt_set_object.xsl
xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
xsl:import href=http://param.xsl; /
/xsl:stylesheet



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4 / NEWS

2002-10-07 Thread Derick Rethans

derick  Mon Oct  7 13:14:00 2002 EDT

  Modified files:  
/php4   NEWS 
  Log:
  2. :)
  
  
Index: php4/NEWS
diff -u php4/NEWS:1.1187 php4/NEWS:1.1188
--- php4/NEWS:1.1187Mon Oct  7 13:11:34 2002
+++ php4/NEWS   Mon Oct  7 13:13:59 2002
 -1,10 +1,10 
 PHP 4  NEWS
 |||
 ? ? ??? 2002, Version 4.3.0
-- Make ImageTruecolorToPalette() in bundled GD2 library actually work (Rasmus)
+- Make ImageTruecolorToPalette() in bundled GD2 library actually work. (Rasmus)
 - Fix ImageCopy() in bundled GD2 library to handle copying from truecolor to
   palette-based.  (Wez, Rasmus)
-- Read-only GIF support for bundled GD2 library (Rasmus)
+- Read-only GIF support for bundled GD2 library. (Rasmus)
 - Make the glue argument to implode() optional, if it is not specified
   default to using . (Sterling)
 - Fixed fields argument to contain correct info for xslt_set_error_handler.



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4 / php.ini-dist

2002-10-07 Thread Colin Viebrock

cmv Mon Oct  7 13:58:27 2002 EDT

  Modified files:  
/php4   php.ini-dist 
  Log:
  Document session.save_path option in php.ini
  
  
  
Index: php4/php.ini-dist
diff -u php4/php.ini-dist:1.161 php4/php.ini-dist:1.162
--- php4/php.ini-dist:1.161 Thu Oct  3 02:52:23 2002
+++ php4/php.ini-dist   Mon Oct  7 13:58:27 2002
 -766,6 +766,15 
 ; Argument passed to save_handler.  In the case of files, this is the path
 ; where data files are stored. Note: Windows users have to change this 
 ; variable in order to use PHP's session functions.
+; As of PHP 4.2.3, you can define the path as:
+; session.save_path = N;/path
+; where N is an integer.  Instead of storing all the session files in 
+; /path, what this will do is create subdirectories N-levels deep, and 
+; store the session data in those directories.  This is useful if you 
+; or your OS have problems with lots of files in one directory, and is 
+; a more efficient layout for servers that handle lots of sessions.
+; (Note: see the section on garbage collection below if you choose to
+; use subdirectories for session storage)
 session.save_path = /tmp
 
 ; Whether to use cookies.
 -807,6 +816,14 
 ;  not.  So, see session_set_save_handler() and write your own
 ;  session handler with a different mechanism for cleaning up sessions.
 session.gc_maxlifetime = 1440
+
+; NOTE: If you are using the subdirectory option for storing session files
+;   (see session.save_path above), then garbage collection does *not*
+;   happen automatically.  You will need to do your own garbage 
+;   collection through a shell script, cron entry, or some other method. 
+;   For example, the following script would is the equivalent of
+;   setting session.gc_maxlifetime to 1440 (1440 seconds = 24 minutes):
+;  cd /path/to/sessions; find -cmin +24 | xargs rm
 
 ; PHP 4.2 and less have an undocumented feature/bug that allows you to
 ; to initialize a session variable in the global scope, albeit register_globals



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4 /ext/mbstring mbstring.c mbstring.h php_mbregex.c php_mbregex.h

2002-10-07 Thread Moriyoshi Koizumi

moriyoshi   Mon Oct  7 13:59:49 2002 EDT

  Added files: 
/php4/ext/mbstring  php_mbregex.h 

  Modified files:  
/php4/ext/mbstring  mbstring.c mbstring.h php_mbregex.c 
  Log:
  Lots of clean-up for upcoming mbstring merging event.
  Added mb_regex_set_options().
  The Options parameters of various mbregex functions are now deprecated.
  @- Added mb_regex_set_options(). The Options parameters of 
  @  various mbregex functions are now deprecated. (Moriyoshi).
  
  

Index: php4/ext/mbstring/mbstring.c
diff -u php4/ext/mbstring/mbstring.c:1.99 php4/ext/mbstring/mbstring.c:1.100
--- php4/ext/mbstring/mbstring.c:1.99   Wed Sep 25 20:53:47 2002
+++ php4/ext/mbstring/mbstring.cMon Oct  7 13:59:48 2002
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: mbstring.c,v 1.99 2002/09/26 00:53:47 wez Exp $ */
+/* $Id: mbstring.c,v 1.100 2002/10/07 17:59:48 moriyoshi Exp $ */
 
 /*
  * PHP4 Multibyte String module mbstring (currently only for Japanese)
@@ -219,6 +219,7 @@
PHP_FALIAS(i18n_ja_jp_hantozen, mb_convert_kana,NULL)
 #if HAVE_MBREGEX
PHP_FE(mb_regex_encoding,   NULL)
+   PHP_FE(mb_regex_set_options,NULL)
PHP_FE(mb_ereg, (unsigned char *)third_argument_force_ref)
PHP_FE(mb_eregi,(unsigned char 
*)third_argument_force_ref)
PHP_FE(mb_ereg_replace, NULL)
@@ -807,7 +808,9 @@
p++;
}
}
-
+#if HAVE_MBREGEX
+   MBSTRG(regex_default_options) = 0;
+#endif
return SUCCESS;
 }
 
Index: php4/ext/mbstring/mbstring.h
diff -u php4/ext/mbstring/mbstring.h:1.30 php4/ext/mbstring/mbstring.h:1.31
--- php4/ext/mbstring/mbstring.h:1.30   Wed Sep 25 20:53:47 2002
+++ php4/ext/mbstring/mbstring.hMon Oct  7 13:59:48 2002
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: mbstring.h,v 1.30 2002/09/26 00:53:47 wez Exp $ */
+/* $Id: mbstring.h,v 1.31 2002/10/07 17:59:48 moriyoshi Exp $ */
 
 /*
  * PHP4 Multibyte String module mbstring (currently only for Japanese)
@@ -64,7 +64,7 @@
 PHPAPI int php_mb_check_encoding_list(const char *encoding_list TSRMLS_DC);
 
 #if HAVE_MBREGEX
-#include mbregex.h
+#include php_mbregex.h
 #endif
 
 extern zend_module_entry mbstring_module_entry;
@@ -106,27 +106,6 @@
 PHP_FUNCTION(mb_decode_numericentity);
 PHP_FUNCTION(mb_send_mail);
 PHP_FUNCTION(mb_get_info);
-#if HAVE_MBREGEX
-PHP_FUNCTION(mb_regex_encoding);
-PHP_FUNCTION(mb_ereg);
-PHP_FUNCTION(mb_eregi);
-PHP_FUNCTION(mb_ereg_replace);
-PHP_FUNCTION(mb_eregi_replace);
-PHP_FUNCTION(mb_split);
-PHP_FUNCTION(mb_ereg_match);
-PHP_FUNCTION(mb_ereg_search);
-PHP_FUNCTION(mb_ereg_search_pos);
-PHP_FUNCTION(mb_ereg_search_regs);
-PHP_FUNCTION(mb_ereg_search_init);
-PHP_FUNCTION(mb_ereg_search_getregs);
-PHP_FUNCTION(mb_ereg_search_getpos);
-PHP_FUNCTION(mb_ereg_search_setpos);
-#endif
-
-#if HAVE_MBREGEX
-#define PHP_MBREGEX_MAXCACHE 50
-int php_mbregex_name2mbctype(const char *pname);
-#endif
 
 char *mbstr_strrchr(const char *s, char c TSRMLS_DC);
 int mbstr_is_mb_leadbyte(const char *s TSRMLS_DC);
@@ -161,15 +140,8 @@
long func_overload;
int encoding_translation;
mbfl_buffer_converter *outconv;
-#if HAVE_MBREGEX
-   int default_mbctype;
-   int current_mbctype;
-   HashTable ht_rc;
-   zval **search_str;
-   zval *search_str_val;
-   unsigned int search_pos;
-   mb_regex_t *search_re;
-   struct mbre_registers *search_regs;
+#if HAVE_MBREGEX  defined(PHP_MBREGEX_GLOBALS)
+   PHP_MBREGEX_GLOBALS 
 #endif
 ZEND_END_MODULE_GLOBALS(mbstring)
 
Index: php4/ext/mbstring/php_mbregex.c
diff -u php4/ext/mbstring/php_mbregex.c:1.11 php4/ext/mbstring/php_mbregex.c:1.12
--- php4/ext/mbstring/php_mbregex.c:1.11Mon Oct  7 12:46:42 2002
+++ php4/ext/mbstring/php_mbregex.c Mon Oct  7 13:59:48 2002
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_mbregex.c,v 1.11 2002/10/07 16:46:42 moriyoshi Exp $ */
+/* $Id: php_mbregex.c,v 1.12 2002/10/07 17:59:48 moriyoshi Exp $ */
 
 
 #ifdef HAVE_CONFIG_H
@@ -25,6 +25,7 @@
 
 #include php.h
 #include php_ini.h
+#include php_mbregex.h
 #include mbregex.h
 #include mbstring.h
 
@@ -43,7 +44,7 @@
 };
 
 static void
-php_mbregex_strbuf_init(struct strbuf *pd)
+_php_mb_regex_strbuf_init(struct strbuf *pd)
 {
if (pd) {
pd-buffer = (char*)0;
@@ -54,7 +55,7 @@
 }
 
 static int
-php_mbregex_strbuf_ncat(struct strbuf *pd, const unsigned char *psrc, int len)
+_php_mb_regex_strbuf_ncat(struct strbuf *pd, const unsigned char *psrc, int len)
 {
if (pd == NULL || psrc == NULL) {
return -1;
@@ -83,8 +84,7 @@
 /*
  * encoding name resolver
  */
-int
-php_mbregex_name2mbctype(const char 

[PHP-CVS] cvs: php4 /ext/mbstring/tests 021.inc 021.phpt 022.inc 022.phpt 023.inc 023.phpt 024.inc 024.phpt

2002-10-07 Thread Moriyoshi Koizumi

moriyoshi   Mon Oct  7 14:02:05 2002 EDT

  Added files: 
/php4/ext/mbstring/tests021.inc 021.phpt 022.inc 022.phpt 023.inc 
023.phpt 024.inc 024.phpt 
  Log:
  Added test cases for mbregex
  
  

Index: php4/ext/mbstring/tests/021.inc
+++ php4/ext/mbstring/tests/021.inc
?php
print mb_ereg_replace( ' ', '-', 'a b c d e' ).\n;
print mb_ereg_replace( '([a-z]+)','[\\1]', 'abc def ghi' );
?

Index: php4/ext/mbstring/tests/021.phpt
+++ php4/ext/mbstring/tests/021.phpt
--TEST--
mb_ereg_replace()
--SKIPIF--
?php include('skipif.inc'); ?
function_exists('mb_ereg_replace') or die(SKIP);
--POST--
--GET--
--FILE--
?php include('021.inc'); ?
--EXPECT--
a-b-c-d-e
[abc] [def] [ghi]


Index: php4/ext/mbstring/tests/022.inc
+++ php4/ext/mbstring/tests/022.inc
?php
mb_regex_encoding( 'EUC-JP' );

function verify_split( $spliton, $str, $count = 0 )
{
$result1 = mb_split( $spliton, $str, $count );
$result2 = split( $spliton, $str, $count );
if ( $result1 == $result2 ) {
print ok\n;
} else {
print count($result1).'-'.count($result2).\n;
}   
}

var_dump( mb_split(  , a b c d e f g )
  == mb_split( [[:space:]], a\nb\tc\nd e f g ) );

for ( $i = 0; $i  5; ++$i ) {
verify_split(  , a\tb\tc\td   e\tf g, $i );
}

for ( $i = 1; $i  5; ++$i ) {
verify_split( \xa1\xa1+, 
\xa1\xa1\xa1\xa2\xa2\xa1\xa1\xa1\xa1\xa1\xa1\xa2\xa2\xa1\xa1\xa1, $i );
}
?

Index: php4/ext/mbstring/tests/022.phpt
+++ php4/ext/mbstring/tests/022.phpt
--TEST--
mb_split()
--SKIPIF--
?php include('skipif.inc'); ?
function_exists('mb_split') or die(SKIP);
--POST--
--GET--
--FILE--
?php include('022.inc'); ?
--EXPECT--
bool(true)
ok
ok
ok
ok
ok
ok
2-2
3-3
4-4

Index: php4/ext/mbstring/tests/023.inc
+++ php4/ext/mbstring/tests/023.inc
?php
$encs = array( 'EUC-JP', 'Shift_JIS', 'SJIS', 'UTF-8' );

function test_ereg( $test_enc, $pat, $str, $in_enc = 'EUC-JP' ) {
mb_regex_encoding( $test_enc );
$pat = mb_convert_encoding( $pat, $test_enc, $in_enc );
$str = mb_convert_encoding( $str, $test_enc, $in_enc );

printf( (%d)%s\n, mb_ereg( $pat, $str, $reg ), ( is_array( $reg )? 
mb_convert_encoding( implode( ' ', $reg ), $in_enc, $test_enc ) : '' ) );
} 
function do_tests( $enc ) {
test_ereg( $enc, 'abc ([a-z]+) ([a-z]+) ([a-z]+)$', abc def ghi jkl 
);
$pat = '([£á-£ú]+) ([ ¤¢-¤«]+)([¤«-¤Ê]+) ([¤ï-¤ó]+)$'; 
test_ereg( $enc, $pat, '£á£â£ã ¤¢¤ª¤¤ ¤«¤³¤Ê ¤ï¤ñ¤ó' );
test_ereg( $enc, $pat, '£í£ú£ø£æ£ð ¤¦¤ª¤« ¤­¤« ¤ò¤ð' );
}

foreach( $encs as $enc ) {
do_tests( $enc );
}
?

Index: php4/ext/mbstring/tests/023.phpt
+++ php4/ext/mbstring/tests/023.phpt
--TEST--
mb_ereg()
--SKIPIF--
?php include('skipif.inc'); ?
function_exists('mb_ereg') or die(SKIP);
--POST--
--GET--
--FILE--
?php include('023.inc'); ?
--EXPECT--
(15)abc def ghi jkl def ghi jkl
(27)£á£â£ã ¤¢¤ª¤¤ ¤«¤³¤Ê ¤ï¤ñ¤ó £á£â£ã ¤¢¤ª¤¤ ¤« ¤³¤Ê ¤ï¤ñ¤ó
(27)£í£ú£ø£æ£ð ¤¦¤ª¤« ¤­¤« ¤ò¤ð £í£ú£ø£æ£ð ¤¦¤ª¤«  ¤­¤« ¤ò¤ð
(15)abc def ghi jkl def ghi jkl
(27)£á£â£ã ¤¢¤ª¤¤ ¤«¤³¤Ê ¤ï¤ñ¤ó £á£â£ã ¤¢¤ª¤¤ ¤« ¤³¤Ê ¤ï¤ñ¤ó
(27)£í£ú£ø£æ£ð ¤¦¤ª¤« ¤­¤« ¤ò¤ð £í£ú£ø£æ£ð ¤¦¤ª¤«  ¤­¤« ¤ò¤ð
(15)abc def ghi jkl def ghi jkl
(27)£á£â£ã ¤¢¤ª¤¤ ¤«¤³¤Ê ¤ï¤ñ¤ó £á£â£ã ¤¢¤ª¤¤ ¤« ¤³¤Ê ¤ï¤ñ¤ó
(27)£í£ú£ø£æ£ð ¤¦¤ª¤« ¤­¤« ¤ò¤ð £í£ú£ø£æ£ð ¤¦¤ª¤«  ¤­¤« ¤ò¤ð
(15)abc def ghi jkl def ghi jkl
(39)£á£â£ã ¤¢¤ª¤¤ ¤«¤³¤Ê ¤ï¤ñ¤ó £á£â£ã ¤¢¤ª¤¤ ¤« ¤³¤Ê ¤ï¤ñ¤ó
(39)£í£ú£ø£æ£ð ¤¦¤ª¤« ¤­¤« ¤ò¤ð £í£ú£ø£æ£ð ¤¦¤ª¤«  ¤­¤« ¤ò¤ð

Index: php4/ext/mbstring/tests/024.inc
+++ php4/ext/mbstring/tests/024.inc
?php
$encs = array( 'EUC-JP', 'Shift_JIS', 'SJIS', 'UTF-8' );

function test_search( $test_enc, $str, $look_for, $opt, $in_enc = 'EUC-JP' ) {
mb_regex_encoding( $test_enc );
$str = mb_convert_encoding( $str, $test_enc, $in_enc );
$look_for = mb_convert_encoding( $look_for, $test_enc, $in_enc );
mb_ereg_search_init( $str, $look_for, $opt );
while ( mb_ereg_search_pos() ) {
$regs = mb_ereg_search_getregs();
array_shift( $regs );
printf( (%s) (%d) %s\n, $test_enc, mb_ereg_search_getpos(), 
mb_convert_encoding( ( is_array( $regs ) ? implode( '-', $regs ): '' ), $in_enc, 
$test_enc ) );
}
}   
function do_tests( $enc, $opt ) {
test_search( $enc, ¢Ï¡¦ ¡¦¢Ï\n, ' (¡¦?¢Ï¡¦?)[[:space:]]', $opt );
test_search( $enc, 'abcde abdeabcf anvfabc odu abcd ', '(ab[a-z]+)', 
$opt );
}

foreach( $encs as $enc ) {
do_tests( 

Re: [PHP-CVS] cvs: php4 /ext/mbstring mbstring.c mbstring.h php_mbregex.c php_mbregex.h

2002-10-07 Thread Moriyoshi Koizumi

Perhaps this appears to be breaking the build, because I've made
a slight change to the dependency between mbstring.c and php_mbregex.c.
In such case, please do make clean before complaining to me :)

Moriyoshi Koizumi [EMAIL PROTECTED] wrote:

 moriyoshi Mon Oct  7 13:59:49 2002 EDT
 
   Added files: 
 /php4/ext/mbstringphp_mbregex.h 
 
   Modified files:  
 /php4/ext/mbstringmbstring.c mbstring.h php_mbregex.c 
   Log:
   Lots of clean-up for upcoming mbstring merging event.
   Added mb_regex_set_options().
   The Options parameters of various mbregex functions are now deprecated.
   @- Added mb_regex_set_options(). The Options parameters of 
   @  various mbregex functions are now deprecated. (Moriyoshi).
   
   


-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-CVS] cvs: php4 /ext/mbstring mbstring.c mbstring.hphp_mbregex.c php_mbregex.h

2002-10-07 Thread Moriyoshi Koizumi

 Please don't merge until after we branched the real PHP_4_3 branch...
 Also, please do not add new features until then.

The first milestone of php-i18n.sourceforge.jp project is merging the new 
code base into PHP_4_3 release... I suppose it would be a little late, so 
I won't try to do it desperately, but I'm willing to prepare for it with 
permissible modification.
And there are no plans to add more features for now, otherwise I'll commit 
them to php-i18n.sf.jp cvs.

--
Moriyoshi Koizumi



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4 /ext/fribidi/tests 001.phpt

2002-10-07 Thread Tal Peer

tal Mon Oct  7 15:35:29 2002 EDT

  Added files: 
/php4/ext/fribidi/tests 001.phpt 
  Log:
  
  Initial commit of fribidi_log2vis test
  
  

Index: php4/ext/fribidi/tests/001.phpt
+++ php4/ext/fribidi/tests/001.phpt
--TEST--
fribidi_log2vis
--SKIPIF--
?php if (!extension_loaded(fribidi)) print skip; ?
--POST--
--GET--
--FILE--
?php
error_reporting (E_ALL ^ E_NOTICE);
echo fribidi_log2vis(THE dog 123 IS THE biggest, FRIBIDI_AUTO, 
FRIBIDI_CHARSET_CAP_RTL);?
--EXPECT--
biggest EHT SI dog 123 EHT



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4 /ext/mbstring php_mbregex.c

2002-10-07 Thread Moriyoshi Koizumi

moriyoshi   Mon Oct  7 16:12:48 2002 EDT

  Modified files:  
/php4/ext/mbstring  php_mbregex.c 
  Log:
  Fixed typo.
  
  
  
Index: php4/ext/mbstring/php_mbregex.c
diff -u php4/ext/mbstring/php_mbregex.c:1.12 php4/ext/mbstring/php_mbregex.c:1.13
--- php4/ext/mbstring/php_mbregex.c:1.12Mon Oct  7 13:59:48 2002
+++ php4/ext/mbstring/php_mbregex.c Mon Oct  7 16:12:48 2002
 -16,7 +16,7 
+--+
  */
 
-/* $Id: php_mbregex.c,v 1.12 2002/10/07 17:59:48 moriyoshi Exp $ */
+/* $Id: php_mbregex.c,v 1.13 2002/10/07 20:12:48 moriyoshi Exp $ */
 
 
 #ifdef HAVE_CONFIG_H
 -974,7 +974,7 
 }
 /* }}} */
 
-/* {{{ proto bool mb_regex_set_options([string encoding])
+/* {{{ proto bool mb_regex_set_options([string options])
Set the default options for mbregex functions */
 PHP_FUNCTION(mb_regex_set_options)
 {



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4 /ext/zlib config0.m4

2002-10-07 Thread Rasmus Lerdorf

rasmus  Mon Oct  7 16:55:43 2002 EDT

  Modified files:  
/php4/ext/zlib  config0.m4 
  Log:
  This restriction is no longer true after the streams changes.
  
  
Index: php4/ext/zlib/config0.m4
diff -u php4/ext/zlib/config0.m4:1.8 php4/ext/zlib/config0.m4:1.9
--- php4/ext/zlib/config0.m4:1.8Wed Sep  4 14:47:25 2002
+++ php4/ext/zlib/config0.m4Mon Oct  7 16:55:41 2002
 -1,9 +1,9 
 dnl
-dnl $Id: config0.m4,v 1.8 2002/09/04 18:47:25 sniper Exp $
+dnl $Id: config0.m4,v 1.9 2002/10/07 20:55:41 rasmus Exp $
 dnl
 
 PHP_ARG_WITH(zlib,for ZLIB support,
-[  --with-zlib[=DIR]   Include ZLIB support (requires zlib = 1.0.9).])
+[  --with-zlib[=DIR]   Include ZLIB support.])
 
 PHP_ARG_WITH(zlib-dir,if the location of ZLIB install directory is defined,
 [  --with-zlib-dir=DIR   Define the location of zlib install directory], no, no)
 -37,12 +37,6 
   fi
 
   PHP_ADD_LIBPATH($ZLIB_DIR/lib, ZLIB_SHARED_LIBADD)
-
-  AC_CHECK_LIB(z, gzgets, [
-AC_DEFINE(HAVE_ZLIB,1,[ ]) 
-  ],[
-AC_MSG_ERROR(ZLIB extension requires zlib = 1.0.9)
-  ])
 
   PHP_ZLIB_DIR=$ZLIB_DIR
   PHP_ADD_LIBRARY(z,, ZLIB_SHARED_LIBADD)



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4 /ext/zlib config0.m4

2002-10-07 Thread Rasmus Lerdorf

rasmus  Mon Oct  7 16:59:59 2002 EDT

  Modified files:  
/php4/ext/zlib  config0.m4 
  Log:
  Oops, should still define that.  Didn't think I needed it as nothing in
  ext/zlib checks it, but it is checked elsewhere.
  
  
Index: php4/ext/zlib/config0.m4
diff -u php4/ext/zlib/config0.m4:1.9 php4/ext/zlib/config0.m4:1.10
--- php4/ext/zlib/config0.m4:1.9Mon Oct  7 16:55:41 2002
+++ php4/ext/zlib/config0.m4Mon Oct  7 16:59:59 2002
 -1,5 +1,5 
 dnl
-dnl $Id: config0.m4,v 1.9 2002/10/07 20:55:41 rasmus Exp $
+dnl $Id: config0.m4,v 1.10 2002/10/07 20:59:59 rasmus Exp $
 dnl
 
 PHP_ARG_WITH(zlib,for ZLIB support,
 -35,6 +35,8 
   if test -z $ZLIB_DIR; then
 AC_MSG_ERROR(Cannot find libz)
   fi
+
+  AC_DEFINE(HAVE_ZLIB,1,[ ])
 
   PHP_ADD_LIBPATH($ZLIB_DIR/lib, ZLIB_SHARED_LIBADD)
 



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4 /ext/standard/tests/strings strpos.phpt strstr.phpt substr_count.phpt

2002-10-07 Thread Ilia Alshanetsky

iliaa   Mon Oct  7 17:07:42 2002 EDT

  Added files: 
/php4/ext/standard/tests/stringsstrstr.phpt strpos.phpt 
substr_count.phpt 
  Log:
  Added tests for strstr(), strpos() and substr_count() functions.
  
  

Index: php4/ext/standard/tests/strings/strstr.phpt
+++ php4/ext/standard/tests/strings/strstr.phpt
--TEST--
strstr() function
--POST--
--GET--
--FILE--
?php
var_dump(strstr(test string, test));
var_dump(strstr(test string, string));
var_dump(strstr(test string, strin));
var_dump(strstr(test string, t s));
var_dump(strstr(test string, g));
var_dump(md5(strstr(te.chr(0).st, chr(0;
var_dump(strstr(tEst, test));
var_dump(strstr(teSt, test));
var_dump(strstr(, ));
var_dump(strstr(a, ));
var_dump(strstr(, a));
var_dump(md5(strstr(a\\, \\a)));
?
--EXPECT--
string(11) test string
string(6) string
string(6) string
string(8) t string
string(1) g
string(32) 7272696018bdeb2c9a3f8d01fc2a9273
bool(false)
bool(false)
bool(false)
bool(false)
bool(false)
string(32) 6ec19f52f0766c463f3bb240f4396913

Index: php4/ext/standard/tests/strings/strpos.phpt
+++ php4/ext/standard/tests/strings/strpos.phpt
--TEST--
strpos() function
--POST--
--GET--
--FILE--
?php
var_dump(strpos(test string, test));
var_dump(strpos(test string, string));
var_dump(strpos(test string, strin));
var_dump(strpos(test string, t s));
var_dump(strpos(test string, g));
var_dump(strpos(te.chr(0).st, chr(0)));
var_dump(strpos(tEst, test));
var_dump(strpos(teSt, test));
var_dump(strpos(, ));
var_dump(strpos(a, ));
var_dump(strpos(, a));
var_dump(strpos(a, \\a));
?
--EXPECT--
int(0)
int(5)
int(5)
int(3)
int(10)
int(2)
bool(false)
bool(false)
bool(false)
bool(false)
bool(false)
int(1)

Index: php4/ext/standard/tests/strings/substr_count.phpt
+++ php4/ext/standard/tests/strings/substr_count.phpt
--TEST--
substr_count() function
--POST--
--GET--
--FILE--
?php
var_dump(substr_count(, ));
var_dump(substr_count(a, ));
var_dump(substr_count(, a));
var_dump(substr_count(, a));
var_dump(substr_count(, chr(0)));

$a = str_repeat(abcacba, 100);
var_dump(substr_count($a, bca));

$a = str_repeat(abcacbabca, 100);
var_dump(substr_count($a, bca));
?
--EXPECT--
bool(false)
bool(false)
int(0)
int(0)
int(0)
int(100)
int(200)



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4 / NEWS

2002-10-07 Thread Melvyn Sopacua

msopacuaMon Oct  7 17:48:25 2002 EDT

  Modified files:  
/php4   NEWS 
  Log:
  Add xslt milestones
  
  
Index: php4/NEWS
diff -u php4/NEWS:1.1189 php4/NEWS:1.1190
--- php4/NEWS:1.1189Mon Oct  7 15:51:32 2002
+++ php4/NEWS   Mon Oct  7 17:48:25 2002
 -6,6 +6,11 
 - Fix ImageCopy() in bundled GD2 library to handle copying from truecolor to
   palette-based.  (Wez, Rasmus)
 - Read-only GIF support for bundled GD2 library. (Rasmus)
+- Made several adjustments to xslt extension (David Viner, Lehnar, Melvyn)
+  . Added xslt_set_object and xslt_setopt function
+  . Changed backend interaction with Sablotron library
+  . Fixed leak with error_print
+  . Make xslt_make_array always set NULL on last index to signal array end.
 - Make the glue argument to implode() optional, if it is not specified
   default to using . (Sterling)
 - Fixed fields argument to contain correct info for xslt_set_error_handler.



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4 /sapi/apache php_apache_http.h

2002-10-07 Thread Rasmus Lerdorf

rasmus  Mon Oct  7 20:14:02 2002 EDT

  Modified files:  
/php4/sapi/apache   php_apache_http.h 
  Log:
  zlib.h being included before ssl.h needs to be handled here too
  
  
Index: php4/sapi/apache/php_apache_http.h
diff -u php4/sapi/apache/php_apache_http.h:1.3 php4/sapi/apache/php_apache_http.h:1.4
--- php4/sapi/apache/php_apache_http.h:1.3  Fri May 31 00:47:19 2002
+++ php4/sapi/apache/php_apache_http.h  Mon Oct  7 20:13:56 2002
 -11,6 +11,13 
 
 #include zend.h
 #include php_regex.h
+#include php_compat.h
+
+#if HAVE_OPENSSL_EXT
+/* zlib typedefs free_func which causes problems if the SSL includes happen
+ * after zlib.h is included */
+# include openssl/ssl.h
+#endif
 
 #include httpd.h
 #include http_config.h



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4 /ext/ming config.m4

2002-10-07 Thread Rasmus Lerdorf

rasmus  Mon Oct  7 20:15:11 2002 EDT

  Modified files:  
/php4/ext/ming  config.m4 
  Log:
  FreeBSD ming port sticks ming.h in /usr/local/include/ming/ming.h and
  we weren't finding it there.
  
  
Index: php4/ext/ming/config.m4
diff -u php4/ext/ming/config.m4:1.16 php4/ext/ming/config.m4:1.17
--- php4/ext/ming/config.m4:1.16Mon Apr 29 14:08:15 2002
+++ php4/ext/ming/config.m4 Mon Oct  7 20:15:09 2002
 -1,5 +1,5 
 dnl
-dnl $Id: config.m4,v 1.16 2002/04/29 18:08:15 sniper Exp $
+dnl $Id: config.m4,v 1.17 2002/10/08 00:15:09 rasmus Exp $
 dnl
 
 PHP_ARG_WITH(ming, for MING support,
 -18,6 +18,22 
 AC_MSG_ERROR(Please reinstall ming distribution. libming.(a|so) not found.)
   fi
 
+  for i in /usr/local /usr; do
+if test -f $i/lib/libming.$SHLIB_SUFFIX_NAME -o -f $i/lib/libming.a; then
+  MING_DIR=$i
+fi
+  done
+
+  for i in $MING_DIR/include $MING_DIR/include/ming $MING_DIR/ming/include; do
+if test -f $i/ming.h; then
+  MING_INC_DIR=$i
+fi
+  done
+
+  if test -z $MING_INC_DIR; then
+AC_MSG_ERROR(Please reinstall ming distribution. ming.h not found.)
+  fi
+
   PHP_CHECK_LIBRARY(ming, Ming_useSWFVersion, [
 AC_DEFINE(HAVE_MING,1,[ ])
   ],[
 -26,7 +42,7 
 -L$MING_DIR/lib
   ])
 
-  PHP_ADD_INCLUDE($MING_DIR/include)
+  PHP_ADD_INCLUDE($MING_INC_DIR)
   PHP_ADD_LIBRARY_WITH_PATH(ming, $MING_DIR/lib, MING_SHARED_LIBADD)
 
   PHP_NEW_EXTENSION(ming, ming.c, $ext_shared)



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4 /ext/ming config.m4

2002-10-07 Thread Rasmus Lerdorf

rasmus  Mon Oct  7 20:16:53 2002 EDT

  Modified files:  
/php4/ext/ming  config.m4 
  Log:
  Get rid of redundant loop
  
  
Index: php4/ext/ming/config.m4
diff -u php4/ext/ming/config.m4:1.17 php4/ext/ming/config.m4:1.18
--- php4/ext/ming/config.m4:1.17Mon Oct  7 20:15:09 2002
+++ php4/ext/ming/config.m4 Mon Oct  7 20:16:52 2002
 -1,5 +1,5 
 dnl
-dnl $Id: config.m4,v 1.17 2002/10/08 00:15:09 rasmus Exp $
+dnl $Id: config.m4,v 1.18 2002/10/08 00:16:52 rasmus Exp $
 dnl
 
 PHP_ARG_WITH(ming, for MING support,
 -17,12 +17,6 
   if test -z $MING_DIR; then
 AC_MSG_ERROR(Please reinstall ming distribution. libming.(a|so) not found.)
   fi
-
-  for i in /usr/local /usr; do
-if test -f $i/lib/libming.$SHLIB_SUFFIX_NAME -o -f $i/lib/libming.a; then
-  MING_DIR=$i
-fi
-  done
 
   for i in $MING_DIR/include $MING_DIR/include/ming $MING_DIR/ming/include; do
 if test -f $i/ming.h; then



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4 /main config.w32.h.in

2002-10-07 Thread Stig Bakken

ssb Mon Oct  7 21:04:52 2002 EDT

  Modified files:  
/php4/main  config.w32.h.in 
  Log:
  * make these variables configurable from environment on Windows:
PEAR_INSTALLDIR   PHP_BINDIR  PHP_CONFIG_FILE_PATH
PHP_CONFIG_FILE_SCAN_DIR  PHP_DATADIR PHP_EXTENSION_DIR
PHP_INCLUDE_PATH  PHP_LIBDIR  PHP_LOCALSTATEDIR
PHP_PREFIXPHP_SYSCONFDIR
  
  
Index: php4/main/config.w32.h.in
diff -u php4/main/config.w32.h.in:1.13 php4/main/config.w32.h.in:1.14
--- php4/main/config.w32.h.in:1.13  Fri Oct  4 01:22:13 2002
+++ php4/main/config.w32.h.in   Mon Oct  7 21:04:52 2002
 -2,22 +2,24 
Build Configuration for Win32.
This has only been tested with MS VisualC++ 6 (and later).
 
-   $Id: config.w32.h.in,v 1.13 2002/10/04 05:22:13 sebastian Exp $
+   $Id: config.w32.h.in,v 1.14 2002/10/08 01:04:52 ssb Exp $
 */
 
 /* Default PHP / PEAR directories */
+#define CONDENV(ev,def) (getenv(ev)!=NULL?getenv(ev):def)
+
 #define CONFIGURATION_FILE_PATH php.ini
-#define PEAR_INSTALLDIR c:\\php4\\pear
-#define PHP_BINDIR c:\\php4
-#define PHP_CONFIG_FILE_PATH (getenv(SystemRoot))?getenv(SystemRoot):
-#define PHP_CONFIG_FILE_SCAN_DIR 
-#define PHP_DATADIR c:\\php4
-#define PHP_EXTENSION_DIR c:\\php4
-#define PHP_INCLUDE_PATH   .;c:\\php4\\pear
-#define PHP_LIBDIR c:\\php4
-#define PHP_LOCALSTATEDIR c:\\php4
-#define PHP_PREFIX c:\\php4
-#define PHP_SYSCONFDIR c:\\php4
+#define PEAR_INSTALLDIR  CONDENV(PEAR_INSTALLDIR, c:\\php4\\pear)
+#define PHP_BINDIR   CONDENV(PHP_BINDIR, c:\\php4)
+#define PHP_CONFIG_FILE_PATH CONDENV(SystemRoot, )
+#define PHP_CONFIG_FILE_SCAN_DIR CONDENV(PHP_CONFIG_FILE_SCAN_DIR, )
+#define PHP_DATADIR  CONDENV(PHP_DATADIR, c:\\php4)
+#define PHP_EXTENSION_DIRCONDENV(PHP_EXTENSION_DIR, c:\\php4)
+#define PHP_INCLUDE_PATH CONDENV(PHP_INCLUDE_PATH, .;c:\\php4\\pear)
+#define PHP_LIBDIR   CONDENV(PHP_LIBDIR, c:\\php4)
+#define PHP_LOCALSTATEDIRCONDENV(PHP_LOCALSTATEDIR, c:\\php4)
+#define PHP_PREFIX   CONDENV(PHP_PREFIX, c:\\php4)
+#define PHP_SYSCONFDIR   CONDENV(PHP_SYSCONFDIR, c:\\php4)
 
 /* Enable / Disable BCMATH extension (default: enabled) */
 #define WITH_BCMATH 1



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4 / NEWS

2002-10-07 Thread Jani Taskinen

sniper  Mon Oct  7 21:34:41 2002 EDT

  Modified files:  
/php4   NEWS 
  Log:
  style polizei
  
  
Index: php4/NEWS
diff -u php4/NEWS:1.1191 php4/NEWS:1.1192
--- php4/NEWS:1.1191Mon Oct  7 20:36:09 2002
+++ php4/NEWS   Mon Oct  7 21:34:41 2002
 -1,25 +1,25 
 PHP 4  NEWS
 |||
 ? ? ??? 2002, Version 4.3.0
-- Added mb_regex_set_options(). The Options parameters of
-  various mbregex functions are now deprecated. (Moriyoshi).
+- ATTENTION! make install will *by default* install the CLI SAPI binary in 
+  {PREFIX}/bin/php. If you don't disable the CGI binary, it will be
+  installed as {PREFIX}/bin/php-cgi.
+- Added mb_regex_set_options(). The Options parameters of various mbregex
+  functions are now deprecated. (Moriyoshi)
 - Fixed bug #19482 (Segfault with PCRE and locale). (Andrei)
-- Make ImageTruecolorToPalette() in bundled GD2 library actually work. (Rasmus)
-- Fix ImageCopy() in bundled GD2 library to handle copying from truecolor to
-  palette-based.  (Wez, Rasmus)
-- Read-only GIF support for bundled GD2 library. (Rasmus)
+- Made ImageTruecolorToPalette() in bundled GD2 library actually work. (Rasmus)
+- Fixed ImageCopy() in bundled GD2 library to handle copying from truecolor to
+  palette-based. (Wez, Rasmus)
+- Added read-only GIF support for bundled GD2 library. (Rasmus)
 - Made several adjustments to xslt extension (David Viner, Lehnar, Melvyn)
   . Added xslt_set_object and xslt_setopt function
   . Changed backend interaction with Sablotron library
   . Fixed leak with error_print
-  . Make xslt_make_array always set NULL on last index to signal array end.
-- Make the glue argument to implode() optional, if it is not specified
-  default to using . (Sterling)
-- Fixed fields argument to contain correct info for xslt_set_error_handler.
+  . Made xslt_make_array() always set NULL on last index to signal array end.
+- Changed the glue argument in implode() to be optional. If not specified,
+  defaults to . (Sterling)
+- Fixed fields argument to contain correct info for xslt_set_error_handler().
   (Patch by Lenar Lohmus)
-- ATTENTION! make install will *by default* install the CLI SAPI binary in 
-  {PREFIX}/bin/php. If you don't disable the CGI binary, it will be
-  installed as {PREFIX}/bin/php-cgi.
 - Added --with-config-file-scan-dir compile-time switch which specifies a
   directory which will be scanned for *.ini files. (Rasmus)
 - Added ob_flush_all(), ob_get_clean() and ob_get_flush(). (Yasuo)



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4(apache_hooks) /main SAPI.c main.c php_main.h

2002-10-07 Thread George Schlossnagle

gschlossnagle   Mon Oct  7 22:16:26 2002 EDT

  Modified files:  (Branch: apache_hooks)
/php4/main  main.c SAPI.c php_main.h 
  Log:
  sync with head
  
  

Index: php4/main/main.c
diff -u php4/main/main.c:1.407.2.4 php4/main/main.c:1.407.2.5
--- php4/main/main.c:1.407.2.4  Wed Aug 28 14:56:50 2002
+++ php4/main/main.cMon Oct  7 22:16:25 2002
 -18,7 +18,7 
+--+
 */
 
-/* $Id: main.c,v 1.407.2.4 2002/08/28 18:56:50 gschlossnagle Exp $ */
+/* $Id: main.c,v 1.407.2.5 2002/10/08 02:16:25 gschlossnagle Exp $ */
 
 /* {{{ includes
  */
 -28,6 +28,18 
 #include win32/time.h
 #include win32/signal.h
 #include process.h
+#elif defined(NETWARE)
+#ifdef NEW_LIBC
+#include sys/timeval.h
+#else
+#include netware/time_nw.h
+#endif
+/*#include netware/signal_nw.h*/
+/*#include netware/env.h*//* Temporary */
+/*#include process.h*/
+#ifdef USE_WINSOCK
+#include novsock2.h
+#endif
 #else
 #include build-defs.h
 #endif
 -197,23 +209,6 
 }
 /* }}} */
 
-/* {{{ OnUpdateOutputBuffering
- */
-static PHP_INI_MH(OnUpdateOutputBuffering)
-{
-   if(!strncasecmp(new_value, off, sizeof(off))) {
-   new_value = 0;
-   new_value_length = sizeof(0);
-   } else if(!strncasecmp(new_value, on, sizeof(on))) {
-   new_value = 1;
-   new_value_length = sizeof(1);
-   }
-   OnUpdateInt(entry, new_value, new_value_length, mh_arg1, mh_arg2, mh_arg3, 
stage TSRMLS_CC);
-   
-   return SUCCESS;
-}
-/* }}} */
-
 
 /* Need to convert to strings and make use of:
  * PHP_SAFE_MODE
 -264,11 +259,10 
STD_PHP_INI_BOOLEAN(ignore_repeated_errors,   0,PHP_INI_ALL,   
 OnUpdateBool,   ignore_repeated_errors, php_core_globals,   
core_globals)
STD_PHP_INI_BOOLEAN(ignore_repeated_source,   0,PHP_INI_ALL,   
 OnUpdateBool,   ignore_repeated_source, php_core_globals,   
core_globals)
STD_PHP_INI_BOOLEAN(report_memleaks,  1,
PHP_INI_SYSTEM, OnUpdateBool,   report_memleaks,   
 php_core_globals,   core_globals)
-   STD_PHP_INI_BOOLEAN(magic_quotes_gpc, 1,PHP_INI_ALL,   
 OnUpdateBool,   magic_quotes_gpc,   
php_core_globals,   core_globals)
+STD_PHP_INI_BOOLEAN(magic_quotes_gpc, 1,
+PHP_INI_PERDIR|PHP_INI_SYSTEM,OnUpdateBool, magic_quotes_gpc,   
+php_core_globals,   core_globals)
STD_PHP_INI_BOOLEAN(magic_quotes_runtime, 0,PHP_INI_ALL,   
 OnUpdateBool,   magic_quotes_runtime,   php_core_globals, 
  core_globals)
STD_PHP_INI_BOOLEAN(magic_quotes_sybase,  0,PHP_INI_ALL,   
 OnUpdateBool,   magic_quotes_sybase,php_core_globals, 
  core_globals)
-   STD_PHP_INI_ENTRY(output_buffering,   0,
PHP_INI_PERDIR|PHP_INI_SYSTEM,OnUpdateOutputBuffering,  output_buffering,  
 php_core_globals,   core_globals)
-   STD_PHP_INI_ENTRY(double_buffering,   0,
PHP_INI_PERDIR|PHP_INI_SYSTEM,OnUpdateOutputBuffering,  double_buffering,  
 php_core_globals,   core_globals)
+STD_PHP_INI_ENTRY(output_buffering,   0,
+PHP_INI_PERDIR|PHP_INI_SYSTEM,OnUpdateInt,  output_buffering,   php_core_globals, 
+  core_globals)
STD_PHP_INI_ENTRY(output_handler, NULL,   
PHP_INI_PERDIR|PHP_INI_SYSTEM,OnUpdateString,   output_handler, 
php_core_globals,   core_globals)
STD_PHP_INI_BOOLEAN(register_argc_argv,   1,
PHP_INI_PERDIR|PHP_INI_SYSTEM,OnUpdateBool, register_argc_argv, 
php_core_globals,   core_globals)
STD_PHP_INI_BOOLEAN(register_globals, 0,
PHP_INI_PERDIR|PHP_INI_SYSTEM,OnUpdateBool, register_globals,   
php_core_globals,   core_globals)
 -282,8 +276,7 
STD_PHP_INI_BOOLEAN(short_open_tag,DEFAULT_SHORT_OPEN_TAG,
PHP_INI_SYSTEM|PHP_INI_PERDIR,  OnUpdateBool,   short_tags,
 zend_compiler_globals,  compiler_globals)
STD_PHP_INI_BOOLEAN(sql.safe_mode,0,
PHP_INI_SYSTEM, OnUpdateBool,   sql_safe_mode, 
 php_core_globals,   core_globals)
STD_PHP_INI_BOOLEAN(track_errors, 0,
PHP_INI_ALL,OnUpdateBool,   track_errors,  
 php_core_globals,   core_globals)
-   STD_PHP_INI_BOOLEAN(y2k_compliance,   0,PHP_INI_ALL,   
 OnUpdateBool,   y2k_compliance, 
php_core_globals,   core_globals)
-
+STD_PHP_INI_BOOLEAN(y2k_compliance,   1,PHP_INI_ALL,   

[PHP-CVS] cvs: php4(apache_hooks) /sapi/apache mod_php4.c php_apache.c

2002-10-07 Thread George Schlossnagle

gschlossnagle   Mon Oct  7 22:17:02 2002 EDT

  Modified files:  (Branch: apache_hooks)
/php4/sapi/apache   mod_php4.c php_apache.c 
  Log:
  sync with head.  add optional content type param to send_http_header
  
  
Index: php4/sapi/apache/mod_php4.c
diff -u php4/sapi/apache/mod_php4.c:1.120.2.9 php4/sapi/apache/mod_php4.c:1.120.2.10
--- php4/sapi/apache/mod_php4.c:1.120.2.9   Fri Aug 30 15:12:28 2002
+++ php4/sapi/apache/mod_php4.c Mon Oct  7 22:17:02 2002
@@ -17,7 +17,7 @@
| PHP 4.0 patches by Zeev Suraski [EMAIL PROTECTED]  |
+--+
  */
-/* $Id: mod_php4.c,v 1.120.2.9 2002/08/30 19:12:28 gschlossnagle Exp $ */
+/* $Id: mod_php4.c,v 1.120.2.10 2002/10/08 02:17:02 gschlossnagle Exp $ */
 
 #include php_apache_http.h
 
@@ -410,8 +410,7 @@
  */
 static int php_apache_startup(sapi_module_struct *sapi_module)
 {
-   if (php_module_startup(sapi_module) == FAILURE
-   || zend_startup_module(apache_module_entry) == FAILURE) {
+   if (php_module_startup(sapi_module, apache_module_entry, 1) == FAILURE) {
return FAILURE;
} else {
return SUCCESS;
Index: php4/sapi/apache/php_apache.c
diff -u php4/sapi/apache/php_apache.c:1.45.4.6 php4/sapi/apache/php_apache.c:1.45.4.7
--- php4/sapi/apache/php_apache.c:1.45.4.6  Wed Aug 28 17:23:12 2002
+++ php4/sapi/apache/php_apache.c   Mon Oct  7 22:17:02 2002
@@ -17,7 +17,7 @@
|  David Sklar [EMAIL PROTECTED] |
+--+
  */
-/* $Id: php_apache.c,v 1.45.4.6 2002/08/28 21:23:12 gschlossnagle Exp $ */
+/* $Id: php_apache.c,v 1.45.4.7 2002/10/08 02:17:02 gschlossnagle Exp $ */
 
 #include php_apache_http.h
 
@@ -958,8 +958,15 @@
 {
 zval *id;
 request_rec *r;
+char *type = NULL;
+int typelen;
 
+if (zend_parse_parameters(ZEND_NUM_ARGS()  TSRMLS_CC, |s, type, typelen) == 
+FAILURE) 
+return;
 APREQ_GET_REQUEST(id, r);
+if(type) {
+r-content_type = pstrdup(r-pool, type);
+}
 ap_send_http_header(r);
 AP(headers_sent) = 1;
 RETURN_TRUE;
@@ -1324,6 +1331,7 @@
 #undef some_auth_required
 #undef update_mtime
 #undef send_http_header
+#undef send_header_field
 #undef basic_http_header
 #undef send_http_trace
 #undef send_http_options



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] Re: cvs: php4 /ext/mbstring mbfilter.c

2002-10-07 Thread Yasuo Ohgaki

Stefan Esser wrote:
 Hi,
 
 Sorry, half of the patch was bogus... For some reason I thought
 -1 / 10 stays -1. Obviously that is wrong.

No problem.

BTW, I remember you mentioned 2 problems related to mbstring.
One is converting/decoding user input twice. It was unrelated
to mbstring and I think someone else is fixed in somewhere in
SAPI.

Another one is mad string ... something like that Do you
still remember what it is? I don't see applicable place.

--
Yasuo Ohgaki


-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4 / configure.in

2002-10-07 Thread Sascha Schumann

sas Mon Oct  7 22:27:53 2002 EDT

  Modified files:  
/php4   configure.in 
  Log:
  add support for adding /usr/lib to the linkline by default
  
  
Index: php4/configure.in
diff -u php4/configure.in:1.379 php4/configure.in:1.380
--- php4/configure.in:1.379 Sat Oct  5 16:37:11 2002
+++ php4/configure.in   Mon Oct  7 22:27:53 2002
 -1,4 +1,4 
-dnl ## $Id: configure.in,v 1.379 2002/10/05 20:37:11 andrei Exp $ -*- sh -*-
+dnl ## $Id: configure.in,v 1.380 2002/10/08 02:27:53 sas Exp $ -*- sh -*-
 dnl ## Process this file with autoconf to produce a configure script.
 
 divert(1)
 -914,10 +914,16 
 AC_SUBST(EXPANDED_PHP_CONFIG_FILE_PATH)
 AC_SUBST(EXPANDED_PHP_CONFIG_FILE_SCAN_DIR)
 
+if test -n $php_ldflags_add_usr_lib; then
+  PHP_RPATHS=$PHP_RPATHS /usr/lib
+fi
+
 PHP_UTILIZE_RPATHS
 
-PHP_REMOVE_USR_LIB(PHP_LDFLAGS)
-PHP_REMOVE_USR_LIB(LDFLAGS)
+if test -z $php_ldflags_add_usr_lib; then
+  PHP_REMOVE_USR_LIB(PHP_LDFLAGS)
+  PHP_REMOVE_USR_LIB(LDFLAGS)
+fi
 
 EXTRA_LDFLAGS=$EXTRA_LDFLAGS $PHP_LDFLAGS
 



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4 /ext/mbstring php_mbregex.c php_mbregex.h

2002-10-07 Thread Sebastian Bergmann

sebastian   Tue Oct  8 01:08:39 2002 EDT

  Modified files:  
/php4/ext/mbstring  php_mbregex.c php_mbregex.h 
  Log:
  Fix ZTS build.
  
  
Index: php4/ext/mbstring/php_mbregex.c
diff -u php4/ext/mbstring/php_mbregex.c:1.13 php4/ext/mbstring/php_mbregex.c:1.14
--- php4/ext/mbstring/php_mbregex.c:1.13Mon Oct  7 16:12:48 2002
+++ php4/ext/mbstring/php_mbregex.c Tue Oct  8 01:08:39 2002
 -16,7 +16,7 
+--+
  */
 
-/* $Id: php_mbregex.c,v 1.13 2002/10/07 20:12:48 moriyoshi Exp $ */
+/* $Id: php_mbregex.c,v 1.14 2002/10/08 05:08:39 sebastian Exp $ */
 
 
 #ifdef HAVE_CONFIG_H
 -529,7 +529,7 
 
count = -1;
 
-   if (zend_parse_parameters(ZEND_NUM_ARGS(), zs|l, arg_pat,
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, zs|l, arg_pat,
string, string_len, count) == FAILURE) {
RETURN_FALSE;
} 
 -957,7 +957,7 
 /* }}} */
 
 /* {{{ php_mb_regex_set_options */
-PHPAPI int php_mb_regex_set_options( int options ) 
+PHPAPI int php_mb_regex_set_options( int options TSRMLS_DC) 
 {
int prev_opt = MBSTRG(regex_default_options);
MBSTRG(regex_default_options) = options;
 -966,11 +966,11 
 /* }}} */
 
 /* {{{ php_mb_regex_set_options_by_string */
-PHPAPI int php_mb_regex_set_options_by_string( const char *opt_str, int len )
+PHPAPI int php_mb_regex_set_options_by_string( const char *opt_str, int len TSRMLS_DC)
 {
int new_opt;
_php_mb_regex_init_options( opt_str, len, new_opt, NULL);
-   return php_mb_regex_set_options( new_opt );
+   return php_mb_regex_set_options( new_opt TSRMLS_CC);
 }
 /* }}} */
 
 -984,7 +984,7 
string, string_len ) == FAILURE ) {
RETURN_FALSE;
}
-   php_mb_regex_set_options_by_string( (const char*)string, string_len );
+   php_mb_regex_set_options_by_string( (const char*)string, string_len TSRMLS_CC);
RETURN_TRUE;
 }
 /* }}} */
Index: php4/ext/mbstring/php_mbregex.h
diff -u php4/ext/mbstring/php_mbregex.h:1.1 php4/ext/mbstring/php_mbregex.h:1.2
--- php4/ext/mbstring/php_mbregex.h:1.1 Mon Oct  7 13:59:49 2002
+++ php4/ext/mbstring/php_mbregex.h Tue Oct  8 01:08:39 2002
 -16,7 +16,7 
+--+
  */
 
-/* $Id: php_mbregex.h,v 1.1 2002/10/07 17:59:49 moriyoshi Exp $ */
+/* $Id: php_mbregex.h,v 1.2 2002/10/08 05:08:39 sebastian Exp $ */
  
 #ifndef _PHP_MBREGEX_H
 #define _PHP_MBREGEX_H
 -43,8 +43,8 
 #define PHP_MBREGEX_MAXCACHE 50
 
 PHPAPI int php_mb_regex_name2mbctype(const char *pname);
-PHPAPI int php_mb_regex_set_options(int options);
-PHPAPI int php_mb_regex_set_options_by_string(const char *optstr, int len);
+PHPAPI int php_mb_regex_set_options(int options TSRMLS_DC);
+PHPAPI int php_mb_regex_set_options_by_string(const char *optstr, int len TSRMLS_DC);
 
 PHP_FUNCTION(mb_regex_encoding);
 PHP_FUNCTION(mb_ereg);



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4(apache_hooks) /sapi/apache php_apache.c

2002-10-07 Thread George Schlossnagle

gschlossnagle   Tue Oct  8 02:25:03 2002 EDT

  Modified files:  (Branch: apache_hooks)
/php4/sapi/apache   php_apache.c 
  Log:
  header code cleanup
  
  
Index: php4/sapi/apache/php_apache.c
diff -u php4/sapi/apache/php_apache.c:1.45.4.7 php4/sapi/apache/php_apache.c:1.45.4.8
--- php4/sapi/apache/php_apache.c:1.45.4.7  Mon Oct  7 22:17:02 2002
+++ php4/sapi/apache/php_apache.c   Tue Oct  8 02:25:02 2002
@@ -17,7 +17,7 @@
|  David Sklar [EMAIL PROTECTED] |
+--+
  */
-/* $Id: php_apache.c,v 1.45.4.7 2002/10/08 02:17:02 gschlossnagle Exp $ */
+/* $Id: php_apache.c,v 1.45.4.8 2002/10/08 06:25:02 gschlossnagle Exp $ */
 
 #include php_apache_http.h
 
@@ -968,6 +968,7 @@
 r-content_type = pstrdup(r-pool, type);
 }
 ap_send_http_header(r);
+SG(headers_sent) = 1;
 AP(headers_sent) = 1;
 RETURN_TRUE;
 }
@@ -980,6 +981,7 @@
 APREQ_GET_REQUEST(id, r);
 
 ap_basic_http_header((request_rec *)SG(server_context));
+SG(headers_sent) = 1;
 AP(headers_sent) = 1;
 RETURN_TRUE;
 }
@@ -992,6 +994,7 @@
 APREQ_GET_REQUEST(id, r);
 
 ap_send_http_trace((request_rec *)SG(server_context));
+SG(headers_sent) = 1;
 AP(headers_sent) = 1;
 RETURN_TRUE;
 }
@@ -1004,6 +1007,7 @@
 APREQ_GET_REQUEST(id, r);
 
 ap_send_http_options((request_rec *)SG(server_context));
+SG(headers_sent) = 1;
 AP(headers_sent) = 1;
 RETURN_TRUE;
 }
@@ -1270,6 +1274,7 @@
 APREQ_GET_REQUEST(id, r);
 
 ap_send_header_field(r, Z_STRVAL_PP(fieldname), Z_STRVAL_PP(fieldval));
+SG(headers_sent) = 1;
 AP(headers_sent) = 1;
 }
 



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php