[PHP-CVS] cvs: php-src /ext/soap readme.html soap.c /ext/soap/tests server015.phpt

2004-02-09 Thread Dmitry Stogov
dmitry  Mon Feb  9 02:51:08 2004 EDT

  Added files: 
/php-src/ext/soap/tests server015.phpt 

  Modified files:  
/php-src/ext/soap   readme.html soap.c 
  Log:
  Allowing to pass request to SoapServer::handle direct (not through 
$HTTP_RAW_POST_DATA).
  
  http://cvs.php.net/diff.php/php-src/ext/soap/readme.html?r1=1.2r2=1.3ty=u
Index: php-src/ext/soap/readme.html
diff -u php-src/ext/soap/readme.html:1.2 php-src/ext/soap/readme.html:1.3
--- php-src/ext/soap/readme.html:1.2Fri Feb  6 03:01:35 2004
+++ php-src/ext/soap/readme.htmlMon Feb  9 02:51:07 2004
@@ -169,7 +169,7 @@
 --
 h4Table of Contents/h4
 table border=0
-trtda href=#ref.soap.is_soap_faultis_sopa_fault/a -- checks if SOAP call 
was failed/td/tr
+trtda href=#ref.soap.is_soap_faultis_soap_fault/a -- checks if SOAP call 
was failed/td/tr
 trtda href=#ref.soap.soapclient.soapclientSoapClient::SoapClient/a -- 
SoapClient constructor/td/tr
 trtda href=#ref.soap.soapclient.__callSoapClient::__call/a -- calls a SOAP 
function/td/tr
 trtda 
href=#ref.soap.soapclient.__getlastrequestSoapClient::__getLastRequest/a -- 
returns last SOAP request/td/tr
@@ -189,7 +189,7 @@
 /table
 
 a name=ref.soap.is_soap_fault/a
-h2is_sopa_fault/h2
+h2is_soap_fault/h2
 p(PHP 5)/p
 pchecks if SOAP call was failed/p
 h3Description/h3
@@ -266,7 +266,10 @@
 you can simple call SOAP functions as SoapClient methods. It is useful for
 nonWSDL mode when 'soapaction' is unknown, 'uri' is differ form default or
 when ypu like to send and/or receive SOAP Headers. To check if function call
-is failed check the result with is_soap_fault() function.
+is failed check the result with is_soap_fault() function.br
+SOAP function may return one or several values. In the first case __call will
+return just the value of output parameter, in the second it will return
+array with named output parameters.
 /p
 h4Examples/h4
 TABLE BORDER=0 BGCOLOR=#E0E0E0TRTDPRE CLASS=php
@@ -388,12 +391,22 @@
 Exports one or more functions for remote clients. To export one function pass
 function name into bfunctions/b parameter as string. To export several
 functions pass an array of function names and to export all functions pass
-a special constant bSOAP_FUNCTIONS_ALL/b.
+a special constant bSOAP_FUNCTIONS_ALL/b.br
+Functions must receive all input arguments in the same order as defined
+in WSDL file (They should not receive any output parameters as arguments) and
+return one or more values. To return several values they must return array with
+named output parameters.
 h4Examples/h4
 TABLE BORDER=0 BGCOLOR=#E0E0E0TRTDPRE CLASS=php
-$server-addFunction(func);
+function func($inputString) {
+return $inputString;
+}
+$server-addFunction(echoString);
 
-$server-addFunction(array(func1,func2));
+function echoTwoStrings($inputString1, $inputString2) {
+return array(outputString1=$inputString1,outputString2=$inputString2);
+}
+$server-addFunction(array(echoString,echoTwoStrings));
 
 $server-addFunction(SOAP_FUNCTIONS_ALL);
 /PRE/TD/TR/TABLE
@@ -443,9 +456,10 @@
 p(PHP 5)/p
 phandles a SOAP request/p
 h3Description/h3
-pvoid bhandle/b()/p
+pvoid bhandle/b([string soap_envelope])/p
 It processes a SOAP request, call necessary functions, and send response back.
-It assumes request in global b$HTTP_RAW_POST_DATA/b PHP variable.
+It assumes request in input parameter or in global b$HTTP_RAW_POST_DATA/b PHP 
variable
+if the argument is omitted.
 h4Example/h4
 TABLE BORDER=0 BGCOLOR=#E0E0E0TRTDPRE CLASS=php
 lt;?php
http://cvs.php.net/diff.php/php-src/ext/soap/soap.c?r1=1.74r2=1.75ty=u
Index: php-src/ext/soap/soap.c
diff -u php-src/ext/soap/soap.c:1.74 php-src/ext/soap/soap.c:1.75
--- php-src/ext/soap/soap.c:1.74Fri Feb  6 11:52:14 2004
+++ php-src/ext/soap/soap.c Mon Feb  9 02:51:07 2004
@@ -17,7 +17,7 @@
   |  Dmitry Stogov [EMAIL PROTECTED] |
   +--+
 */
-/* $Id: soap.c,v 1.74 2004/02/06 16:52:14 dmitry Exp $ */
+/* $Id: soap.c,v 1.75 2004/02/09 07:51:07 dmitry Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -1051,12 +1051,17 @@
xmlChar *buf;
HashTable *function_table;
soapHeader *soap_headers;
+   sdlFunctionPtr function;
+   char *arg = NULL;
+   int arg_len;
 
SOAP_SERVER_BEGIN_CODE();
 
FETCH_THIS_SERVICE(service);
SOAP_GLOBAL(soap_version) = service-version;
-   ZERO_PARAM();
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, |s, arg, arg_len) == 
FAILURE) {
+   php_error(E_ERROR, Invalid parameters passed to soapserver:handle);
+   }
INIT_ZVAL(retval);
 
if (zend_hash_find(EG(symbol_table), _SERVER, sizeof(_SERVER), (void 
**)server_vars) == SUCCESS) {
@@ -,235 +1116,230 @@
}
}
 
-/* Turn on output buffering... we don't want people print in their 

[PHP-CVS] cvs: php-src /ext/soap config.w32 readme.html soap.c /ext/soap/tests server016.phpt server017.phpt

2004-02-09 Thread Dmitry Stogov
dmitry  Mon Feb  9 04:31:21 2004 EDT

  Added files: 
/php-src/ext/soap/tests server016.phpt server017.phpt 

  Modified files:  
/php-src/ext/soap   config.w32 readme.html soap.c 
  Log:
  Allowing to report SOAP Fault with return new SoapFault(...)
  
  http://cvs.php.net/diff.php/php-src/ext/soap/config.w32?r1=1.4r2=1.5ty=u
Index: php-src/ext/soap/config.w32
diff -u php-src/ext/soap/config.w32:1.4 php-src/ext/soap/config.w32:1.5
--- php-src/ext/soap/config.w32:1.4 Fri Feb  6 04:18:51 2004
+++ php-src/ext/soap/config.w32 Mon Feb  9 04:31:12 2004
@@ -1,7 +1,7 @@
-// $Id: config.w32,v 1.4 2004/02/06 09:18:51 wez Exp $
+// $Id: config.w32,v 1.5 2004/02/09 09:31:12 dmitry Exp $
 // vim:ft=javascript
 
-ARG_WITH(soap, SOAP support, no);
+ARG_ENABLE(soap, SOAP support, no);
 
 if (PHP_SOAP != no  PHP_LIBXML == yes) {
EXTENSION('soap', 'soap.c php_encoding.c php_http.c php_packet_soap.c 
php_schema.c php_sdl.c php_xml.c');
http://cvs.php.net/diff.php/php-src/ext/soap/readme.html?r1=1.3r2=1.4ty=u
Index: php-src/ext/soap/readme.html
diff -u php-src/ext/soap/readme.html:1.3 php-src/ext/soap/readme.html:1.4
--- php-src/ext/soap/readme.html:1.3Mon Feb  9 02:51:07 2004
+++ php-src/ext/soap/readme.htmlMon Feb  9 04:31:12 2004
@@ -28,7 +28,7 @@
 This extension makes use of the A HREF=http://www.xmlsoft.org; TARGET=_topGNOME 
XML library/A. Download and install this library. You will need at least 
libxml-2.5.4.
 HR
 H2Installation/H2
-This extension is only available if PHP was configured with --with-soap.
+This extension is only available if PHP was configured with --enable-soap.
 HR
 H2Predefined Constants/H2
 The constants below are defined by this extension, and will only be available when 
the extension has either been compiled into PHP or dynamically loaded at runtime.
@@ -107,6 +107,7 @@
 trtda href=#ref.soap.soapparamSoapParam/a/td/tr
 trtda href=#ref.soap.soapvarSoapVar/a/td/tr
 trtda href=#ref.soap.soapheaderSoapHeader/a/td/tr
+trtda href=#ref.soap.soapfaultSoapFault/a/td/tr
 /table
 a name=ref.soap.soapclient
 h4SoapClient class/h4
@@ -163,6 +164,16 @@
 table border=0
 trtda href=#ref.soap.soapheader.soapheaderSoapHeader/a -- SoapHeader 
constructor/td/tr
 /table
+a name=ref.soap.soapfault
+h4SoapFault class/h4
+p
+SoapFault is a special class that can be used for error reporting during
+handling of SOAP request (on server). It has not any special methods except
+constructor.
+/p
+table border=0
+trtda href=#ref.soap.soapfault.soapfaultSoapFault/a -- SoapFault 
constructor/td/tr
+/table
 HR
 !--
 H2Examples/H2
@@ -186,6 +197,7 @@
 trtda href=#ref.soap.soapparam.soapparamSoapParam::SoapParam/a -- SoapParam 
constructor/td/tr
 trtda href=#ref.soap.soapvar.soapvarSoapVar::SoapVar/a -- SoapVar 
constructor/td/tr
 trtda href=#ref.soap.soapheader.soapheaderSoapHeader::SoapHeader/a -- 
SoapHeader constructor/td/tr
+trtda href=#ref.soap.soapfault.soapfaultSoapFault::SoapFault/a -- SoapFault 
constructor/td/tr
 /table
 
 a name=ref.soap.is_soap_fault/a
@@ -216,7 +228,6 @@
 pSoapClient constructor/p
 h3Description/h3
 pbSoapClient/b(mixed wsdl [, array options])/p
-h4Examples/h4
 p
 The constructor allows creating SoapClient objects in WSDL or nonWSDL mode.
 The first case requires URI of WSDL file as first parameter and optional
@@ -230,6 +241,7 @@
 and bpassword/b) and HTTP connection through proxy server (bproxy_host/b,
 bproxy_port/b, bproxy_login/b and bproxy_password/b).
 /p
+h4Examples/h4
 TABLE BORDER=0 BGCOLOR=#E0E0E0TRTDPRE CLASS=php
 $client = new SoapClient(some.wsdl);
 
@@ -494,6 +506,7 @@
 $server-handle();
 ?gt;
 /PRE/TD/TR/TABLE
+pSee also: a href=#ref.soap.soapfault.soapfaultSoapFault::SoapFault/a/p
 
 a name=ref.soap.soapparam.soapparam/a
 h2SoapParam::SoapParam/h2
@@ -580,5 +593,27 @@
'hello world'));
 ?gt;
 /PRE/TD/TR/TABLE
+
+a name=ref.soap.soapfault.soapfault/a
+h2SoapFault::SoapFault/h2
+p(PHP 5)/p
+pSoapFault constructor/p
+h3Description/h3
+pbSoapFault/b(string faultcode, string faultstring [, string faultactor [, 
mixed details]])/p
+This class is useful when you like to send SOAP fault response from PHP handler.
+h4Example/h4
+h4Example/h4
+TABLE BORDER=0 BGCOLOR=#E0E0E0TRTDPRE CLASS=php
+lt;?php
+function test($x) {
+return new SoapFault(Server,Some error message);
+}
+
+$server = new SoapServer(null,array('uri'=http://test-uri/;));
+$server-addFunction(test);
+$server-handle();
+?gt;
+/PRE/TD/TR/TABLE
+pSee also: a href=#ref.soap.soapserver.faultSoapServer::fault/a/p
 /BODY
 /HTML
\ No newline at end of file
http://cvs.php.net/diff.php/php-src/ext/soap/soap.c?r1=1.75r2=1.76ty=u
Index: php-src/ext/soap/soap.c
diff -u php-src/ext/soap/soap.c:1.75 php-src/ext/soap/soap.c:1.76
--- php-src/ext/soap/soap.c:1.75Mon Feb  9 02:51:07 2004
+++ php-src/ext/soap/soap.c Mon Feb  9 04:31:12 2004
@@ -17,7 +17,7 @@
   |  Dmitry Stogov [EMAIL 

Re: [PHP-CVS] cvs: php-src /ext/sybase_ct/tests test.inc

2004-02-09 Thread Marcus Boerger
Hello Timm,

you shouldn't set the error severity at all because the test system should
already take care about it unless you overwrite it because you are checking
some error levels.

best regards
marcus

Monday, February 9, 2004, 1:14:29 AM, you wrote:

 thekidSun Feb  8 19:14:29 2004 EDT

   Modified files:  
 /php-src/ext/sybase_ct/tests  test.inc 
   Log:
   - Changed error_reporting setting to E_ALL so we get the notices
  
 http://cvs.php.net/diff.php/php-src/ext/sybase_ct/tests/test.inc?r1=1.2r2=1.3ty=u
 Index: php-src/ext/sybase_ct/tests/test.inc
 diff -u php-src/ext/sybase_ct/tests/test.inc:1.2
 php-src/ext/sybase_ct/tests/test.inc:1.3
 --- php-src/ext/sybase_ct/tests/test.inc:1.2  Sun Feb  8 18:58:46 2004
 +++ php-src/ext/sybase_ct/tests/test.inc  Sun Feb  8 19:14:24 2004
 @@ -1,9 +1,11 @@
  ?php
  /* This file is part of PHP test framework for ext/sybase_ct
   *
 - * $Id: test.inc,v 1.2 2004/02/08 23:58:46 thekid Exp $ 
 + * $Id: test.inc,v 1.3 2004/02/09 00:14:24 thekid Exp $ 
   */
 
 +  error_reporting(E_ALL);
 +
// Change if needed
define('HOST', '');
define('USER', '');


-- 
Best regards,
 Marcusmailto:[EMAIL PROTECTED]

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



Re: [PHP-CVS] cvs: php-src /ext/sybase_ct/tests test.inc

2004-02-09 Thread Timm Friebe
On Mon, 2004-02-09 at 17:02, Marcus Boerger wrote:
 Hello Timm,
 
 you shouldn't set the error severity at all because the test system should
 already take care about it unless you overwrite it because you are checking
 some error levels.

Can I be sure E_NOTICE is included? The reason I need this is that
several test cases of mine include Notice: ... in their EXPECTF section.
By setting the error reporting to E_ALL forcibly, I wanted to ensure
notices being displayed.

Btw.:
$ find . -name '*.phpt' -exec grep -H 'error_reporting' {}  \;|wc -l
  98

- Timm

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



Re: [PHP-CVS] cvs: php-src(PHP_4_3) /ext/fbsql php_fbsql.c

2004-02-09 Thread Ilia Alshanetsky
I presume this is a 'feature' and not a bug?

Ilia

On February 09, 2004 12:58 pm, Frank M. Kromann wrote:
 fmk   Mon Feb  9 12:58:25 2004 EDT

   Modified files:  (Branch: PHP_4_3)
 /php-src/ext/fbsqlphp_fbsql.c
   Log:
   Delay creation of exec handle til it's needed

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



[PHP-CVS] cvs: php-src /ext/spl config.m4

2004-02-09 Thread Jani Taskinen
sniper  Mon Feb  9 13:18:01 2004 EDT

  Modified files:  
/php-src/ext/splconfig.m4 
  Log:
  ws
  
http://cvs.php.net/diff.php/php-src/ext/spl/config.m4?r1=1.9r2=1.10ty=u
Index: php-src/ext/spl/config.m4
diff -u php-src/ext/spl/config.m4:1.9 php-src/ext/spl/config.m4:1.10
--- php-src/ext/spl/config.m4:1.9   Mon Jan 19 06:07:19 2004
+++ php-src/ext/spl/config.m4   Mon Feb  9 13:18:00 2004
@@ -1,13 +1,13 @@
-dnl $Id: config.m4,v 1.9 2004/01/19 11:07:19 chregu Exp $
+dnl $Id: config.m4,v 1.10 2004/02/09 18:18:00 sniper Exp $
 dnl config.m4 for extension SPL
 
 PHP_ARG_ENABLE(spl, enable SPL suppport,
 [  --disable-spl   Disable Standard PHP Library], yes)
 
 if test $PHP_SPL != no; then
-   if test $ext_shared = yes; then
-   AC_MSG_ERROR(Cannot build SPL as a shared module)
-   fi
-AC_DEFINE(HAVE_SPL, 1, [Whether you want SPL (Standard PHP Library) support]) 
-PHP_NEW_EXTENSION(spl, php_spl.c spl_functions.c spl_engine.c spl_iterators.c 
spl_array.c spl_directory.c spl_sxe.c, $ext_shared)
+  if test $ext_shared = yes; then
+AC_MSG_ERROR(Cannot build SPL as a shared module)
+  fi
+  AC_DEFINE(HAVE_SPL, 1, [Whether you want SPL (Standard PHP Library) support]) 
+  PHP_NEW_EXTENSION(spl, php_spl.c spl_functions.c spl_engine.c spl_iterators.c 
spl_array.c spl_directory.c spl_sxe.c, $ext_shared)
 fi

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



[PHP-CVS] cvs: php-src /sapi/apache2filter sapi_apache2.c /sapi/apache2handler sapi_apache2.c

2004-02-09 Thread Ilia Alshanetsky
iliaa   Mon Feb  9 18:27:44 2004 EDT

  Modified files:  
/php-src/sapi/apache2handlersapi_apache2.c 
/php-src/sapi/apache2filter sapi_apache2.c 
  Log:
  Fixed bug #27196 (Missing content_length initialization in apache 2 sapis).
  
  
http://cvs.php.net/diff.php/php-src/sapi/apache2handler/sapi_apache2.c?r1=1.34r2=1.35ty=u
Index: php-src/sapi/apache2handler/sapi_apache2.c
diff -u php-src/sapi/apache2handler/sapi_apache2.c:1.34 
php-src/sapi/apache2handler/sapi_apache2.c:1.35
--- php-src/sapi/apache2handler/sapi_apache2.c:1.34 Thu Jan 29 10:18:26 2004
+++ php-src/sapi/apache2handler/sapi_apache2.c  Mon Feb  9 18:27:42 2004
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: sapi_apache2.c,v 1.34 2004/01/29 15:18:26 iliaa Exp $ */
+/* $Id: sapi_apache2.c,v 1.35 2004/02/09 23:27:42 iliaa Exp $ */
 
 #define ZEND_INCLUDE_FULL_WINDOWS_HEADERS
 
@@ -409,6 +409,7 @@
 static void php_apache_request_ctor(request_rec *r, php_struct *ctx TSRMLS_DC)
 {
char *content_type;
+   char *content_length;
const char *auth;
 
SG(sapi_headers).http_response_code = !r-status ? HTTP_OK : r-status;
@@ -423,6 +424,9 @@
ap_set_content_type(r, apr_pstrdup(r-pool, content_type));
efree(content_type);
 
+   content_length = (char *) apr_table_get(f-r-headers_in, Content-Length);
+   SG(request_info).content_length = (content_length ? atoi(content_length) : 0);
+
apr_table_unset(r-headers_out, Content-Length);
apr_table_unset(r-headers_out, Last-Modified);
apr_table_unset(r-headers_out, Expires);
http://cvs.php.net/diff.php/php-src/sapi/apache2filter/sapi_apache2.c?r1=1.122r2=1.123ty=u
Index: php-src/sapi/apache2filter/sapi_apache2.c
diff -u php-src/sapi/apache2filter/sapi_apache2.c:1.122 
php-src/sapi/apache2filter/sapi_apache2.c:1.123
--- php-src/sapi/apache2filter/sapi_apache2.c:1.122 Thu Jan 29 10:18:25 2004
+++ php-src/sapi/apache2filter/sapi_apache2.c   Mon Feb  9 18:27:43 2004
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: sapi_apache2.c,v 1.122 2004/01/29 15:18:25 iliaa Exp $ */
+/* $Id: sapi_apache2.c,v 1.123 2004/02/09 23:27:43 iliaa Exp $ */
 
 #include fcntl.h
 
@@ -376,6 +376,7 @@
 static void php_apache_request_ctor(ap_filter_t *f, php_struct *ctx TSRMLS_DC)
 {
char *content_type;
+   char *content_length;
const char *auth;
 
PG(during_request_startup) = 0;
@@ -394,6 +395,10 @@
SG(request_info).post_data_length = ctx-post_len;
 
efree(content_type);
+
+   content_length = (char *) apr_table_get(f-r-headers_in, Content-Length);
+   SG(request_info).content_length = (content_length ? atoi(content_length) : 0);
+   
apr_table_unset(f-r-headers_out, Content-Length);
apr_table_unset(f-r-headers_out, Last-Modified);
apr_table_unset(f-r-headers_out, Expires);

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



[PHP-CVS] cvs: php-src(PHP_4_3) / NEWS /sapi/apache2filter sapi_apache2.c /sapi/apache2handler sapi_apache2.c

2004-02-09 Thread Ilia Alshanetsky
iliaa   Mon Feb  9 18:28:49 2004 EDT

  Modified files:  (Branch: PHP_4_3)
/php-srcNEWS 
/php-src/sapi/apache2handlersapi_apache2.c 
/php-src/sapi/apache2filter sapi_apache2.c 
  Log:
  MFH: Fixed bug #27196 (Missing content_length initialization in apache 2 
  sapis).
  
  
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1247.2.554r2=1.1247.2.555ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.1247.2.554 php-src/NEWS:1.1247.2.555
--- php-src/NEWS:1.1247.2.554   Sun Feb  8 23:28:06 2004
+++ php-src/NEWSMon Feb  9 18:28:46 2004
@@ -1,6 +1,8 @@
 PHP 4  NEWS
 |||
 ?? Feb 2004, Version 4.3.5
+- Fixed bug #27196 (Missing content_length initialization in apache 2 sapis).
+  (Ilia, pdoru at kappa dot ro)
 - Fixed bug #27175 (tzset() is not being called by PHP on startup).
   (Ilia, sagawa at sohgoh dot net)
 - Fixed bug #27172 (Possible floating point exception in gmp_powm()). (Ilia)
http://cvs.php.net/diff.php/php-src/sapi/apache2handler/sapi_apache2.c?r1=1.1.2.26r2=1.1.2.27ty=u
Index: php-src/sapi/apache2handler/sapi_apache2.c
diff -u php-src/sapi/apache2handler/sapi_apache2.c:1.1.2.26 
php-src/sapi/apache2handler/sapi_apache2.c:1.1.2.27
--- php-src/sapi/apache2handler/sapi_apache2.c:1.1.2.26 Thu Jan 29 10:18:37 2004
+++ php-src/sapi/apache2handler/sapi_apache2.c  Mon Feb  9 18:28:47 2004
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: sapi_apache2.c,v 1.1.2.26 2004/01/29 15:18:37 iliaa Exp $ */
+/* $Id: sapi_apache2.c,v 1.1.2.27 2004/02/09 23:28:47 iliaa Exp $ */
 
 #include fcntl.h
 
@@ -414,6 +414,7 @@
 static void php_apache_request_ctor(request_rec *r, php_struct *ctx TSRMLS_DC)
 {
char *content_type;
+   char *content_length;
const char *auth;
 
SG(sapi_headers).http_response_code = !r-status ? HTTP_OK : r-status;
@@ -428,6 +429,9 @@
ap_set_content_type(r, apr_pstrdup(r-pool, content_type));
efree(content_type);
 
+   content_length = (char *) apr_table_get(f-r-headers_in, Content-Length);
+   SG(request_info).content_length = (content_length ? atoi(content_length) : 0);
+
apr_table_unset(r-headers_out, Content-Length);
apr_table_unset(r-headers_out, Last-Modified);
apr_table_unset(r-headers_out, Expires);
http://cvs.php.net/diff.php/php-src/sapi/apache2filter/sapi_apache2.c?r1=1.91.2.22r2=1.91.2.23ty=u
Index: php-src/sapi/apache2filter/sapi_apache2.c
diff -u php-src/sapi/apache2filter/sapi_apache2.c:1.91.2.22 
php-src/sapi/apache2filter/sapi_apache2.c:1.91.2.23
--- php-src/sapi/apache2filter/sapi_apache2.c:1.91.2.22 Thu Jan 29 10:18:36 2004
+++ php-src/sapi/apache2filter/sapi_apache2.c   Mon Feb  9 18:28:48 2004
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: sapi_apache2.c,v 1.91.2.22 2004/01/29 15:18:36 iliaa Exp $ */
+/* $Id: sapi_apache2.c,v 1.91.2.23 2004/02/09 23:28:48 iliaa Exp $ */
 
 #include fcntl.h
 
@@ -376,6 +376,7 @@
 static void php_apache_request_ctor(ap_filter_t *f, php_struct *ctx TSRMLS_DC)
 {
char *content_type;
+   char *content_length;
const char *auth;

PG(during_request_startup) = 0;
@@ -393,6 +394,10 @@
SG(request_info).post_data = ctx-post_data;
SG(request_info).post_data_length = ctx-post_len;
efree(content_type);
+
+   content_length = (char *) apr_table_get(f-r-headers_in, Content-Length);
+   SG(request_info).content_length = (content_length ? atoi(content_length) : 0);
+   
apr_table_unset(f-r-headers_out, Content-Length);
apr_table_unset(f-r-headers_out, Last-Modified);
apr_table_unset(f-r-headers_out, Expires);

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



[PHP-CVS] cvs: php-src / php.ini-dist php.ini-recommended /sapi/cgi cgi_main.c

2004-02-09 Thread Ilia Alshanetsky
iliaa   Mon Feb  9 19:02:39 2004 EDT

  Modified files:  
/php-srcphp.ini-dist php.ini-recommended 
/php-src/sapi/cgi   cgi_main.c 
  Log:
  Fixed bug #27026 (Added cgi.nph that allows forcing of the Status: 200 
  header that is not normally needed).
  
  
http://cvs.php.net/diff.php/php-src/php.ini-dist?r1=1.205r2=1.206ty=u
Index: php-src/php.ini-dist
diff -u php-src/php.ini-dist:1.205 php-src/php.ini-dist:1.206
--- php-src/php.ini-dist:1.205  Sun Jan 25 23:15:04 2004
+++ php-src/php.ini-distMon Feb  9 19:02:37 2004
@@ -445,6 +445,10 @@
 ; **You CAN safely turn this off for IIS, in fact, you MUST.**
 ; cgi.force_redirect = 1
 
+; if cgi.nph is enabled it will force cgi to always sent Status: 200 with
+; every request.
+; cgi.nph = 1
+
 ; if cgi.force_redirect is turned on, and you are not running under Apache or 
Netscape 
 ; (iPlanet) web servers, you MAY need to set an environment variable name that PHP
 ; will look for to know it is OK to continue execution.  Setting this variable MAY
http://cvs.php.net/diff.php/php-src/php.ini-recommended?r1=1.150r2=1.151ty=u
Index: php-src/php.ini-recommended
diff -u php-src/php.ini-recommended:1.150 php-src/php.ini-recommended:1.151
--- php-src/php.ini-recommended:1.150   Sun Jan 25 23:15:04 2004
+++ php-src/php.ini-recommended Mon Feb  9 19:02:38 2004
@@ -464,6 +464,10 @@
 ; **You CAN safely turn this off for IIS, in fact, you MUST.**
 ; cgi.force_redirect = 1
 
+; if cgi.nph is enabled it will force cgi to always sent Status: 200 with
+; every request.
+; cgi.nph = 1
+
 ; if cgi.force_redirect is turned on, and you are not running under Apache or 
Netscape 
 ; (iPlanet) web servers, you MAY need to set an environment variable name that PHP
 ; will look for to know it is OK to continue execution.  Setting this variable MAY
http://cvs.php.net/diff.php/php-src/sapi/cgi/cgi_main.c?r1=1.244r2=1.245ty=u
Index: php-src/sapi/cgi/cgi_main.c
diff -u php-src/sapi/cgi/cgi_main.c:1.244 php-src/sapi/cgi/cgi_main.c:1.245
--- php-src/sapi/cgi/cgi_main.c:1.244   Thu Jan  8 03:18:08 2004
+++ php-src/sapi/cgi/cgi_main.c Mon Feb  9 19:02:38 2004
@@ -20,7 +20,7 @@
+--+
 */
 
-/* $Id: cgi_main.c,v 1.244 2004/01/08 08:18:08 andi Exp $ */
+/* $Id: cgi_main.c,v 1.245 2004/02/10 00:02:38 iliaa Exp $ */
 
 #include php.h
 #include php_globals.h
@@ -289,7 +289,7 @@
char buf[SAPI_CGI_MAX_HEADER_LENGTH];
sapi_header_struct *h;
zend_llist_position pos;
-   long rfc2616_headers = 0;
+   long rfc2616_headers = 0, nph = 0;
 
if(SG(request_info).no_headers == 1) {
return  SAPI_HEADER_SENT_SUCCESSFULLY;
@@ -303,7 +303,11 @@
rfc2616_headers = 0;
}
 
-   if (SG(sapi_headers).http_response_code != 200) {
+   if (cfg_get_long(cgi.nph, nph) == FAILURE) {
+   nph = 0;
+   }
+
+   if (nph || SG(sapi_headers).http_response_code != 200) {
int len;
 
if (rfc2616_headers  SG(sapi_headers).http_status_line) {

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



[PHP-CVS] cvs: php-src(PHP_4_3) / NEWS php.ini-dist php.ini-recommended /sapi/cgi cgi_main.c

2004-02-09 Thread Ilia Alshanetsky
iliaa   Mon Feb  9 19:03:45 2004 EDT

  Modified files:  (Branch: PHP_4_3)
/php-srcNEWS php.ini-dist php.ini-recommended 
/php-src/sapi/cgi   cgi_main.c 
  Log:
  MFH: Fixed bug #27026 (Added cgi.nph that allows forcing of the Status: 200 
  header that is not normally needed).
  
  
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1247.2.555r2=1.1247.2.556ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.1247.2.555 php-src/NEWS:1.1247.2.556
--- php-src/NEWS:1.1247.2.555   Mon Feb  9 18:28:46 2004
+++ php-src/NEWSMon Feb  9 19:03:43 2004
@@ -9,6 +9,8 @@
 - Fixed bug #27171 (crash inside gmp_hamdist()). (Jani)
 - Fixed bug #27149 (broken CLOB support in oci8 extension). (Antony)
 - Fixed bug #27135 (Possible crash inside mb_strlen()). (Moriyoshi)
+- Fixed bug #27026 (Added cgi.nph that allows forcing of the Status: 200
+  header that is not normally needed). (Ilia)
 - Fixed bug #24773 (unseting of strings as arrays causes a crash). (Sara)
 
 03 Feb 2004, Version 4.3.5RC2
http://cvs.php.net/diff.php/php-src/php.ini-dist?r1=1.171.2.18r2=1.171.2.19ty=u
Index: php-src/php.ini-dist
diff -u php-src/php.ini-dist:1.171.2.18 php-src/php.ini-dist:1.171.2.19
--- php-src/php.ini-dist:1.171.2.18 Mon Sep  1 12:25:23 2003
+++ php-src/php.ini-distMon Feb  9 19:03:43 2004
@@ -438,6 +438,10 @@
 ; **You CAN safely turn this off for IIS, in fact, you MUST.**
 ; cgi.force_redirect = 1
 
+; if cgi.nph is enabled it will force cgi to always sent Status: 200 with
+; every request.
+; cgi.nph = 1
+
 ; if cgi.force_redirect is turned on, and you are not running under Apache or 
Netscape 
 ; (iPlanet) web servers, you MAY need to set an environment variable name that PHP
 ; will look for to know it is OK to continue execution.  Setting this variable MAY
http://cvs.php.net/diff.php/php-src/php.ini-recommended?r1=1.119.2.16r2=1.119.2.17ty=u
Index: php-src/php.ini-recommended
diff -u php-src/php.ini-recommended:1.119.2.16 php-src/php.ini-recommended:1.119.2.17
--- php-src/php.ini-recommended:1.119.2.16  Mon Sep  1 12:25:23 2003
+++ php-src/php.ini-recommended Mon Feb  9 19:03:43 2004
@@ -453,6 +453,10 @@
 ; **You CAN safely turn this off for IIS, in fact, you MUST.**
 ; cgi.force_redirect = 1
 
+; if cgi.nph is enabled it will force cgi to always sent Status: 200 with
+; every request.
+; cgi.nph = 1
+
 ; if cgi.force_redirect is turned on, and you are not running under Apache or 
Netscape 
 ; (iPlanet) web servers, you MAY need to set an environment variable name that PHP
 ; will look for to know it is OK to continue execution.  Setting this variable MAY
http://cvs.php.net/diff.php/php-src/sapi/cgi/cgi_main.c?r1=1.190.2.53r2=1.190.2.54ty=u
Index: php-src/sapi/cgi/cgi_main.c
diff -u php-src/sapi/cgi/cgi_main.c:1.190.2.53 php-src/sapi/cgi/cgi_main.c:1.190.2.54
--- php-src/sapi/cgi/cgi_main.c:1.190.2.53  Mon Jan 19 14:57:17 2004
+++ php-src/sapi/cgi/cgi_main.c Mon Feb  9 19:03:44 2004
@@ -20,7 +20,7 @@
+--+
 */
 
-/* $Id: cgi_main.c,v 1.190.2.53 2004/01/19 19:57:17 helly Exp $ */
+/* $Id: cgi_main.c,v 1.190.2.54 2004/02/10 00:03:44 iliaa Exp $ */
 
 #include php.h
 #include php_globals.h
@@ -293,7 +293,7 @@
char buf[SAPI_CGI_MAX_HEADER_LENGTH];
sapi_header_struct *h;
zend_llist_position pos;
-   long rfc2616_headers = 0;
+   long rfc2616_headers = 0, nph = 0;
 
if(SG(request_info).no_headers == 1) {
return  SAPI_HEADER_SENT_SUCCESSFULLY;
@@ -307,7 +307,11 @@
rfc2616_headers = 0;
}
 
-   if (SG(sapi_headers).http_response_code != 200) {
+   if (cfg_get_long(cgi.nph, nph) == FAILURE) {
+   nph = 0;
+   }
+
+   if (nph || SG(sapi_headers).http_response_code != 200) {
int len;

if (rfc2616_headers  SG(sapi_headers).http_status_line) {

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



[PHP-CVS] cvs: php-src /sapi/cgi cgi_main.c

2004-02-09 Thread Ilia Alshanetsky
iliaa   Mon Feb  9 19:29:47 2004 EDT

  Modified files:  
/php-src/sapi/cgi   cgi_main.c 
  Log:
  Fixed bug #26758 (FastCGI exits immediately with status 255).
  
  
http://cvs.php.net/diff.php/php-src/sapi/cgi/cgi_main.c?r1=1.245r2=1.246ty=u
Index: php-src/sapi/cgi/cgi_main.c
diff -u php-src/sapi/cgi/cgi_main.c:1.245 php-src/sapi/cgi/cgi_main.c:1.246
--- php-src/sapi/cgi/cgi_main.c:1.245   Mon Feb  9 19:02:38 2004
+++ php-src/sapi/cgi/cgi_main.c Mon Feb  9 19:29:46 2004
@@ -20,7 +20,7 @@
+--+
 */
 
-/* $Id: cgi_main.c,v 1.245 2004/02/10 00:02:38 iliaa Exp $ */
+/* $Id: cgi_main.c,v 1.246 2004/02/10 00:29:46 iliaa Exp $ */
 
 #include php.h
 #include php_globals.h
@@ -271,7 +271,7 @@
 #if PHP_FASTCGI
if (!FCGX_IsCGI()) {
FCGX_Request *request = (FCGX_Request *)server_context;
-   if(!request || FCGX_FFlush( request-out ) == -1 ) {
+   if (!parent  (!request || FCGX_FFlush(request-out) == -1)) {
php_handle_aborted_connection();
}
return;

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



[PHP-CVS] cvs: php-src(PHP_4_3) / NEWS /sapi/cgi cgi_main.c

2004-02-09 Thread Ilia Alshanetsky
iliaa   Mon Feb  9 19:30:04 2004 EDT

  Modified files:  (Branch: PHP_4_3)
/php-srcNEWS 
/php-src/sapi/cgi   cgi_main.c 
  Log:
  MFH: Fixed bug #26758 (FastCGI exits immediately with status 255).
  
  
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1247.2.556r2=1.1247.2.557ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.1247.2.556 php-src/NEWS:1.1247.2.557
--- php-src/NEWS:1.1247.2.556   Mon Feb  9 19:03:43 2004
+++ php-src/NEWSMon Feb  9 19:30:01 2004
@@ -11,6 +11,8 @@
 - Fixed bug #27135 (Possible crash inside mb_strlen()). (Moriyoshi)
 - Fixed bug #27026 (Added cgi.nph that allows forcing of the Status: 200
   header that is not normally needed). (Ilia)
+- Fixed bug #26758 (FastCGI exits immediately with status 255). (Ilia, 
+  tcarter at noggin dot com dot au)
 - Fixed bug #24773 (unseting of strings as arrays causes a crash). (Sara)
 
 03 Feb 2004, Version 4.3.5RC2
http://cvs.php.net/diff.php/php-src/sapi/cgi/cgi_main.c?r1=1.190.2.54r2=1.190.2.55ty=u
Index: php-src/sapi/cgi/cgi_main.c
diff -u php-src/sapi/cgi/cgi_main.c:1.190.2.54 php-src/sapi/cgi/cgi_main.c:1.190.2.55
--- php-src/sapi/cgi/cgi_main.c:1.190.2.54  Mon Feb  9 19:03:44 2004
+++ php-src/sapi/cgi/cgi_main.c Mon Feb  9 19:30:03 2004
@@ -20,7 +20,7 @@
+--+
 */
 
-/* $Id: cgi_main.c,v 1.190.2.54 2004/02/10 00:03:44 iliaa Exp $ */
+/* $Id: cgi_main.c,v 1.190.2.55 2004/02/10 00:30:03 iliaa Exp $ */
 
 #include php.h
 #include php_globals.h
@@ -275,7 +275,7 @@
 #if PHP_FASTCGI
if (!FCGX_IsCGI()) {
FCGX_Request *request = (FCGX_Request *)server_context;
-   if(!request || FCGX_FFlush( request-out ) == -1 ) {
+   if (!parent  (!request || FCGX_FFlush(request-out) == -1)) {
php_handle_aborted_connection();
}
return;

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



[PHP-CVS] cvs: php-src(PHP_4_3) / NEWS

2004-02-09 Thread Jani Taskinen
sniper  Mon Feb  9 21:00:04 2004 EDT

  Modified files:  (Branch: PHP_4_3)
/php-srcNEWS 
  Log:
  typos
  
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1247.2.557r2=1.1247.2.558ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.1247.2.557 php-src/NEWS:1.1247.2.558
--- php-src/NEWS:1.1247.2.557   Mon Feb  9 19:30:01 2004
+++ php-src/NEWSMon Feb  9 21:00:02 2004
@@ -9,11 +9,11 @@
 - Fixed bug #27171 (crash inside gmp_hamdist()). (Jani)
 - Fixed bug #27149 (broken CLOB support in oci8 extension). (Antony)
 - Fixed bug #27135 (Possible crash inside mb_strlen()). (Moriyoshi)
-- Fixed bug #27026 (Added cgi.nph that allows forcing of the Status: 200
-  header that is not normally needed). (Ilia)
+- Fixed bug #27026 (Added cgi.nph php.ini option to allow forcing of
+  the 'Status: 200' header that is not normally needed). (Ilia)
 - Fixed bug #26758 (FastCGI exits immediately with status 255). (Ilia, 
   tcarter at noggin dot com dot au)
-- Fixed bug #24773 (unseting of strings as arrays causes a crash). (Sara)
+- Fixed bug #24773 (unsetting string as array causes a crash). (Sara)
 
 03 Feb 2004, Version 4.3.5RC2
 - Changed allow_url_fopen php.ini option to be PHP_INI_SYSTEM. (Sara)

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