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

2005-12-13 Thread Ilia Alshanetsky
iliaa   Wed Dec 14 03:36:44 2005 EDT

  Modified files:  (Branch: PHP_5_1)
/php-src/sapi/apache2handlersapi_apache2.c 
/php-srcNEWS 
  Log:
  Fixed bug #35571 (Fixed crash in Apache 2 SAPI when more then one php 
  script is loaded via SSI include).
  
  
http://cvs.php.net/viewcvs.cgi/php-src/sapi/apache2handler/sapi_apache2.c?r1=1.57.2.7r2=1.57.2.8diff_format=u
Index: php-src/sapi/apache2handler/sapi_apache2.c
diff -u php-src/sapi/apache2handler/sapi_apache2.c:1.57.2.7 
php-src/sapi/apache2handler/sapi_apache2.c:1.57.2.8
--- php-src/sapi/apache2handler/sapi_apache2.c:1.57.2.7 Fri Nov 18 18:59:49 2005
+++ php-src/sapi/apache2handler/sapi_apache2.c  Wed Dec 14 03:36:43 2005
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: sapi_apache2.c,v 1.57.2.7 2005/11/18 18:59:49 iliaa Exp $ */
+/* $Id: sapi_apache2.c,v 1.57.2.8 2005/12/14 03:36:43 iliaa Exp $ */
 
 #define ZEND_INCLUDE_FULL_WINDOWS_HEADERS
 
@@ -471,7 +471,7 @@
 
/* apply_config() needs r in some cases, so allocate server_context 
early */
ctx = SG(server_context);
-   if (ctx == NULL) {
+   if (ctx == NULL || (ctx  ctx-request_processed  
!strcmp(r-protocol, INCLUDED))) {
 normal:
ctx = SG(server_context) = apr_pcalloc(r-pool, sizeof(*ctx));
/* register a cleanup so we clear out the SG(server_context)
http://cvs.php.net/viewcvs.cgi/php-src/NEWS?r1=1.2027.2.291r2=1.2027.2.292diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.291 php-src/NEWS:1.2027.2.292
--- php-src/NEWS:1.2027.2.291   Tue Dec 13 20:55:42 2005
+++ php-src/NEWSWed Dec 14 03:36:44 2005
@@ -34,6 +34,8 @@
 - Fixed bug #35612 (iis6 Access Violation crash). (Dmitry, alacn.uhahaa)
 - Fixed bug #35594 (Multiple calls to getopt() may result in a crash).
   (rabbitt at gmail dot com, Ilia)
+- Fixed bug #35571 (Fixed crash in Apache 2 SAPI when more then one php 
+  script is loaded via SSI include). (Ilia)
 - Fixed bug #35570 (segfault when re-using soap client object). (Dmitry)
 - Fixed bug #35558 (mktime() interpreting 3 digit years incorrectly). (Ilia)
 - Fixed bug #35543 (php crash when calling non existing method of a class

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



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

2005-11-18 Thread Ilia Alshanetsky
iliaa   Fri Nov 18 13:59:51 2005 EDT

  Modified files:  (Branch: PHP_5_1)
/php-srcNEWS 
/php-src/sapi/apache2handlersapi_apache2.c 
  Log:
  Fixed bug #35278 (Multiple virtual() calls crash Apache 2 php module).
  
  
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.2027.2.202r2=1.2027.2.203ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.202 php-src/NEWS:1.2027.2.203
--- php-src/NEWS:1.2027.2.202   Fri Nov 18 06:00:14 2005
+++ php-src/NEWSFri Nov 18 13:59:46 2005
@@ -1,6 +1,7 @@
 PHPNEWS
 |||
 ?? Nov 2005, PHP 5.1
+- Fixed bug #35278 (Multiple virtual() calls crash Apache 2 php module). (Ilia)
 - Fixed bug #35273 (Error in mapping soap - java types). (Dmitry)
 
 17 Nov 2005, PHP 5.1 Release Candidate 6
http://cvs.php.net/diff.php/php-src/sapi/apache2handler/sapi_apache2.c?r1=1.57.2.6r2=1.57.2.7ty=u
Index: php-src/sapi/apache2handler/sapi_apache2.c
diff -u php-src/sapi/apache2handler/sapi_apache2.c:1.57.2.6 
php-src/sapi/apache2handler/sapi_apache2.c:1.57.2.7
--- php-src/sapi/apache2handler/sapi_apache2.c:1.57.2.6 Thu Nov 17 16:00:28 2005
+++ php-src/sapi/apache2handler/sapi_apache2.c  Fri Nov 18 13:59:49 2005
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: sapi_apache2.c,v 1.57.2.6 2005/11/17 21:00:28 iliaa Exp $ */
+/* $Id: sapi_apache2.c,v 1.57.2.7 2005/11/18 18:59:49 iliaa Exp $ */
 
 #define ZEND_INCLUDE_FULL_WINDOWS_HEADERS
 
@@ -443,6 +443,18 @@
php_request_shutdown(NULL);
 }
 
+static void php_apache_ini_dtor(request_rec *r, request_rec *p TSRMLS_DC)
+{
+   if (strcmp(r-protocol, INCLUDED)) {
+   zend_try { zend_ini_deactivate(TSRMLS_C); } zend_end_try();
+   }
+   if (p) {
+   ((php_struct *)SG(server_context))-r = p;
+   } else {
+   apr_pool_cleanup_run(r-pool, (void *)SG(server_context), 
php_server_context_cleanup);
+   }
+}
+
 static int php_handler(request_rec *r)
 {
php_struct *ctx;
@@ -453,11 +465,7 @@
request_rec *parent_req = NULL;
TSRMLS_FETCH();
 
-#define PHPAP_INI_OFF \
-   if (strcmp(r-protocol, INCLUDED)) { \
-   zend_try { zend_ini_deactivate(TSRMLS_C); } zend_end_try(); \
-   } \
-   apr_pool_cleanup_run(r-pool, (void *)SG(server_context), 
php_server_context_cleanup); \
+#define PHPAP_INI_OFF php_apache_ini_dtor(r, parent_req TSRMLS_CC);
 
conf = ap_get_module_config(r-per_dir_config, php5_module);
 

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



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

2005-11-17 Thread Ilia Alshanetsky
iliaa   Thu Nov 17 16:00:29 2005 EDT

  Modified files:  (Branch: PHP_5_1)
/php-src/sapi/apache2handlersapi_apache2.c 
/php-srcNEWS 
  Log:
  MFH: Resolve Apache 2 regression with sub-request handling on non-linux 
  systems.
  
  
http://cvs.php.net/diff.php/php-src/sapi/apache2handler/sapi_apache2.c?r1=1.57.2.5r2=1.57.2.6ty=u
Index: php-src/sapi/apache2handler/sapi_apache2.c
diff -u php-src/sapi/apache2handler/sapi_apache2.c:1.57.2.5 
php-src/sapi/apache2handler/sapi_apache2.c:1.57.2.6
--- php-src/sapi/apache2handler/sapi_apache2.c:1.57.2.5 Wed Oct 26 11:08:23 2005
+++ php-src/sapi/apache2handler/sapi_apache2.c  Thu Nov 17 16:00:28 2005
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: sapi_apache2.c,v 1.57.2.5 2005/10/26 15:08:23 iliaa Exp $ */
+/* $Id: sapi_apache2.c,v 1.57.2.6 2005/11/17 21:00:28 iliaa Exp $ */
 
 #define ZEND_INCLUDE_FULL_WINDOWS_HEADERS
 
@@ -457,6 +457,7 @@
if (strcmp(r-protocol, INCLUDED)) { \
zend_try { zend_ini_deactivate(TSRMLS_C); } zend_end_try(); \
} \
+   apr_pool_cleanup_run(r-pool, (void *)SG(server_context), 
php_server_context_cleanup); \
 
conf = ap_get_module_config(r-per_dir_config, php5_module);
 
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.2027.2.198r2=1.2027.2.199ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.198 php-src/NEWS:1.2027.2.199
--- php-src/NEWS:1.2027.2.198   Thu Nov 17 09:38:35 2005
+++ php-src/NEWSThu Nov 17 16:00:28 2005
@@ -1,6 +1,8 @@
 PHPNEWS
 |||
 17 Nov 2005, PHP 5.1 Release Candidate 6
+- Resolve Apache 2 regression with sub-request handling on non-linux systems.
+  (Ilia, Tony)
 - Make zend_parse_params handle integers in a non-strict fashion, but emit an 
   E_NOTICE on non well formed interger values. (Ilia)
 - Fixed bug #35249 (compile failure when ext/readline is compiled as shared).

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



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

2005-10-04 Thread Ilia Alshanetsky
iliaa   Tue Oct  4 20:43:39 2005 EDT

  Modified files:  (Branch: PHP_5_1)
/php-src/sapi/apache2handlersapi_apache2.c 
/php-srcNEWS 
  Log:
  MFH: Fixed possible INI setting leak via virtual() in Apache 2 sapi.
  
  
http://cvs.php.net/diff.php/php-src/sapi/apache2handler/sapi_apache2.c?r1=1.57.2.2r2=1.57.2.3ty=u
Index: php-src/sapi/apache2handler/sapi_apache2.c
diff -u php-src/sapi/apache2handler/sapi_apache2.c:1.57.2.2 
php-src/sapi/apache2handler/sapi_apache2.c:1.57.2.3
--- php-src/sapi/apache2handler/sapi_apache2.c:1.57.2.2 Fri Sep  2 09:51:47 2005
+++ php-src/sapi/apache2handler/sapi_apache2.c  Tue Oct  4 20:43:38 2005
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: sapi_apache2.c,v 1.57.2.2 2005/09/02 13:51:47 sniper Exp $ */
+/* $Id: sapi_apache2.c,v 1.57.2.3 2005/10/05 00:43:38 iliaa Exp $ */
 
 #define ZEND_INCLUDE_FULL_WINDOWS_HEADERS
 
@@ -453,6 +453,11 @@
request_rec *parent_req = NULL;
TSRMLS_FETCH();
 
+#define PHPAP_INI_OFF \
+   if (strcmp(r-protocol, INCLUDED)) { \
+   zend_try { zend_ini_deactivate(TSRMLS_C); } zend_end_try(); \
+   } \
+
conf = ap_get_module_config(r-per_dir_config, php5_module);
 
/* apply_config() needs r in some cases, so allocate server_context 
early */
@@ -475,9 +480,7 @@
if (strcmp(r-handler, PHP_MAGIC_TYPE)  strcmp(r-handler, 
PHP_SOURCE_MAGIC_TYPE)  strcmp(r-handler, PHP_SCRIPT)) {
/* Check for xbithack in this case. */
if (!AP2(xbithack) || strcmp(r-handler, text/html) || 
!(r-finfo.protection  APR_UEXECUTE)) {
-   zend_try {
-   zend_ini_deactivate(TSRMLS_C);
-   } zend_end_try();
+   PHPAP_INI_OFF;
return DECLINED;
}
}
@@ -486,32 +489,24 @@
 * the configuration; default behaviour is to accept. */ 
if (r-used_path_info == AP_REQ_REJECT_PATH_INFO
 r-path_info  r-path_info[0]) {
-   zend_try {
-   zend_ini_deactivate(TSRMLS_C);
-   } zend_end_try();
+   PHPAP_INI_OFF;
return HTTP_NOT_FOUND;
}
 
/* handle situations where user turns the engine off */
if (!AP2(engine)) {
-   zend_try {
-   zend_ini_deactivate(TSRMLS_C);
-   } zend_end_try();
+   PHPAP_INI_OFF;
return DECLINED;
}
 
if (r-finfo.filetype == 0) {
php_apache_sapi_log_message_ex(script '%s' not found or unable 
to stat, r);
-   zend_try {
-   zend_ini_deactivate(TSRMLS_C);
-   } zend_end_try();
+   PHPAP_INI_OFF;
return HTTP_NOT_FOUND;
}
if (r-finfo.filetype == APR_DIR) {
php_apache_sapi_log_message_ex(attempt to invoke directory 
'%s' as script, r);
-   zend_try {
-   zend_ini_deactivate(TSRMLS_C);
-   } zend_end_try();
+   PHPAP_INI_OFF;
return HTTP_FORBIDDEN;
}
 
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.2027.2.92r2=1.2027.2.93ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.92 php-src/NEWS:1.2027.2.93
--- php-src/NEWS:1.2027.2.92Tue Oct  4 16:48:17 2005
+++ php-src/NEWSTue Oct  4 20:43:38 2005
@@ -30,6 +30,7 @@
   . ext/oracle (Jani, Derick)
   . ext/ovrimos (Jani, Derick, Pierre)
   . ext/pfpro (Jani, Derick, Pierre)
+- Fixed possible INI setting leak via virtual() in Apache 2 sapi. (Ilia)
 - Fixed potential GLOBALS overwrite via import_request_variables() and
   possible crash and/or memory corruption. (Ilia)
 - Fixed possible GLOBALS variable override when register_globals are ON.

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



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

2005-08-17 Thread Ilia Alshanetsky
iliaa   Wed Aug 17 21:14:46 2005 EDT

  Modified files:  (Branch: PHP_5_1)
/php-src/sapi/apache2handlersapi_apache2.c 
/php-srcNEWS 
  Log:
  MFH: Fixed bug #33987 (php script as ErrorDocument causes crash in Apache 2).
  
  
http://cvs.php.net/diff.php/php-src/sapi/apache2handler/sapi_apache2.c?r1=1.57r2=1.57.2.1ty=u
Index: php-src/sapi/apache2handler/sapi_apache2.c
diff -u php-src/sapi/apache2handler/sapi_apache2.c:1.57 
php-src/sapi/apache2handler/sapi_apache2.c:1.57.2.1
--- php-src/sapi/apache2handler/sapi_apache2.c:1.57 Wed Aug  3 10:08:48 2005
+++ php-src/sapi/apache2handler/sapi_apache2.c  Wed Aug 17 21:14:41 2005
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: sapi_apache2.c,v 1.57 2005/08/03 14:08:48 sniper Exp $ */
+/* $Id: sapi_apache2.c,v 1.57.2.1 2005/08/18 01:14:41 iliaa Exp $ */
 
 #define ZEND_INCLUDE_FULL_WINDOWS_HEADERS
 
@@ -458,6 +458,7 @@
/* apply_config() needs r in some cases, so allocate server_context 
early */
ctx = SG(server_context);
if (ctx == NULL) {
+normal:
ctx = SG(server_context) = apr_pcalloc(r-pool, sizeof(*ctx));
/* register a cleanup so we clear out the SG(server_context)
 * after each request. Note: We pass in the pointer to the
@@ -536,6 +537,11 @@
}
} else {
parent_req = ctx-r;
+   /* check if comming due to ErrorDocument */
+   if (parent_req != HTTP_OK) {
+   parent_req = NULL;
+   goto normal;
+   }
ctx-r = r;
brigade = ctx-brigade;
}
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.2027.2.19r2=1.2027.2.20ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.19 php-src/NEWS:1.2027.2.20
--- php-src/NEWS:1.2027.2.19Wed Aug 17 12:56:20 2005
+++ php-src/NEWSWed Aug 17 21:14:42 2005
@@ -27,6 +27,8 @@
 - Fixed bug #33996 (No information given for fatal error on passing invalid
   value to typed argument). (Dmitry)
 - Fixed bug #33989 (extract($GLOBALS,EXTR_REFS) crashes PHP). (Dmitry)
+- Fixed bug #33987 (php script as ErrorDocument causes crash in Apache 2).
+  (Ilia)
 - Fixed bug #33967 (misuse of Exception constructor doesn't display errorfile).
   (Jani)
 - Fixed bug #33958 (duplicate cookies and magic_quotes=off may cause a crash).

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