[PHP-CVS] cvs: php-src(PHP_5_3) /main main.c

2009-07-08 Thread Stanislav Malyshev
stasThu Jul  9 00:21:18 2009 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/main   main.c 
  Log:
  fix mail.log openbasedir interaction with .htaccess
  
  
http://cvs.php.net/viewvc.cgi/php-src/main/main.c?r1=1.640.2.23.2.57.2.56r2=1.640.2.23.2.57.2.57diff_format=u
Index: php-src/main/main.c
diff -u php-src/main/main.c:1.640.2.23.2.57.2.56 
php-src/main/main.c:1.640.2.23.2.57.2.57
--- php-src/main/main.c:1.640.2.23.2.57.2.56Tue Jul  7 16:42:11 2009
+++ php-src/main/main.c Thu Jul  9 00:21:17 2009
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: main.c,v 1.640.2.23.2.57.2.56 2009/07/07 16:42:11 jani Exp $ */
+/* $Id: main.c,v 1.640.2.23.2.57.2.57 2009/07/09 00:21:17 stas Exp $ */
 
 /* {{{ includes
  */
@@ -367,6 +367,26 @@
 
 /* {{{ PHP_INI_MH
  */
+static PHP_INI_MH(OnUpdateMailLog)
+{
+   /* Only do the safemode/open_basedir check at runtime */
+   if (stage == PHP_INI_STAGE_RUNTIME || stage == PHP_INI_STAGE_HTACCESS) {
+   if (PG(safe_mode)  (!php_checkuid(new_value, NULL, 
CHECKUID_CHECK_FILE_AND_DIR))) {
+   return FAILURE;
+   }
+
+   if (PG(open_basedir)  php_check_open_basedir(new_value 
TSRMLS_CC)) {
+   return FAILURE;
+   }
+
+   }
+   OnUpdateString(entry, new_value, new_value_length, mh_arg1, mh_arg2, 
mh_arg3, stage TSRMLS_CC);
+   return SUCCESS;
+}
+/* }}} */
+
+/* {{{ PHP_INI_MH
+ */
 static PHP_INI_MH(OnChangeMailForceExtra)
 {
/* Don't allow changing it in htaccess */
@@ -487,7 +507,7 @@
PHP_INI_ENTRY(SMTP,   
localhost,PHP_INI_ALL,NULL)
PHP_INI_ENTRY(smtp_port,  25,   
PHP_INI_ALL,NULL)
STD_PHP_INI_BOOLEAN(mail.add_x_header,0,
PHP_INI_SYSTEM|PHP_INI_PERDIR,  OnUpdateBool,   
mail_x_header,  php_core_globals,   core_globals)
-   STD_PHP_INI_ENTRY(mail.log,   NULL,   
PHP_INI_SYSTEM|PHP_INI_PERDIR,  OnUpdateString, 
mail_log,   php_core_globals,   core_globals)
+   STD_PHP_INI_ENTRY(mail.log,   NULL,   
PHP_INI_SYSTEM|PHP_INI_PERDIR,  OnUpdateMailLog,
mail_log,   php_core_globals,   core_globals)
PHP_INI_ENTRY(browscap,   NULL,   
PHP_INI_SYSTEM, NULL)
PHP_INI_ENTRY(memory_limit,   128M, 
PHP_INI_ALL,OnChangeMemoryLimit)
PHP_INI_ENTRY(precision,  14,   
PHP_INI_ALL,OnSetPrecision)



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



[PHP-CVS] cvs: php-src(PHP_5_3) /main main.c

2009-06-04 Thread Pierre-Alain Joye
pajoye  Thu Jun  4 06:59:46 2009 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/main   main.c 
  Log:
  - [DOC] add PHP_WINDOWS_NT_* and PHP_WINDOWS_VERSION_* constants (usefull for 
testing and features detections)
 see http://msdn.microsoft.com/en-us/library/ms724451(VS.85).aspx for the 
explanation
  
http://cvs.php.net/viewvc.cgi/php-src/main/main.c?r1=1.640.2.23.2.57.2.53r2=1.640.2.23.2.57.2.54diff_format=u
Index: php-src/main/main.c
diff -u php-src/main/main.c:1.640.2.23.2.57.2.53 
php-src/main/main.c:1.640.2.23.2.57.2.54
--- php-src/main/main.c:1.640.2.23.2.57.2.53Sat May 30 09:48:16 2009
+++ php-src/main/main.c Thu Jun  4 06:59:46 2009
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: main.c,v 1.640.2.23.2.57.2.53 2009/05/30 09:48:16 scottmac Exp $ */
+/* $Id: main.c,v 1.640.2.23.2.57.2.54 2009/06/04 06:59:46 pajoye Exp $ */
 
 /* {{{ includes
  */
@@ -1888,6 +1888,20 @@
REGISTER_MAIN_LONG_CONSTANT(PHP_INT_MAX, LONG_MAX, CONST_PERSISTENT | 
CONST_CS);
REGISTER_MAIN_LONG_CONSTANT(PHP_INT_SIZE, sizeof(long), 
CONST_PERSISTENT | CONST_CS);
 
+#ifdef PHP_WIN32
+   REGISTER_MAIN_LONG_CONSTANT(PHP_WINDOWS_VERSION_MAJOR,  
EG(windows_version_info).dwMajorVersion, CONST_PERSISTENT | CONST_CS);
+   REGISTER_MAIN_LONG_CONSTANT(PHP_WINDOWS_VERSION_MINOR,  
EG(windows_version_info).dwMinorVersion, CONST_PERSISTENT | CONST_CS);
+   REGISTER_MAIN_LONG_CONSTANT(PHP_WINDOWS_VERSION_BUILD,  
EG(windows_version_info).dwBuildNumber, CONST_PERSISTENT | CONST_CS);
+   REGISTER_MAIN_LONG_CONSTANT(PHP_WINDOWS_VERSION_PLATFORM,   
EG(windows_version_info).dwPlatformId, CONST_PERSISTENT | CONST_CS);
+   REGISTER_MAIN_LONG_CONSTANT(PHP_WINDOWS_VERSION_SP_MAJOR,   
EG(windows_version_info).wServicePackMajor, CONST_PERSISTENT | CONST_CS);
+   REGISTER_MAIN_LONG_CONSTANT(PHP_WINDOWS_VERSION_SP_MINOR,   
EG(windows_version_info).wServicePackMinor, CONST_PERSISTENT | CONST_CS);
+   REGISTER_MAIN_LONG_CONSTANT(PHP_WINDOWS_VERSION_SUITEMASK,  
EG(windows_version_info).wSuiteMask, CONST_PERSISTENT | CONST_CS);
+   REGISTER_MAIN_LONG_CONSTANT(PHP_WINDOWS_VERSION_PRODUCTYPE, 
EG(windows_version_info).wProductType, CONST_PERSISTENT | CONST_CS);
+   REGISTER_MAIN_LONG_CONSTANT(PHP_WINDOWS_NT_DOMAIN_CONTROLLER, 
VER_NT_DOMAIN_CONTROLLER, CONST_PERSISTENT | CONST_CS);
+   REGISTER_MAIN_LONG_CONSTANT(PHP_WINDOWS_NT_SERVER, VER_NT_SERVER, 
CONST_PERSISTENT | CONST_CS);
+   REGISTER_MAIN_LONG_CONSTANT(PHP_WINDOWS_NT_WORKSTATION, 
VER_NT_WORKSTATION, CONST_PERSISTENT | CONST_CS);
+#endif
+
php_output_register_constants(TSRMLS_C);
php_rfc1867_register_constants(TSRMLS_C);
 



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



[PHP-CVS] cvs: php-src(PHP_5_3) /main main.c

2009-06-04 Thread Pierre-Alain Joye
pajoye  Thu Jun  4 07:41:02 2009 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/main   main.c 
  Log:
  - typo
  
http://cvs.php.net/viewvc.cgi/php-src/main/main.c?r1=1.640.2.23.2.57.2.54r2=1.640.2.23.2.57.2.55diff_format=u
Index: php-src/main/main.c
diff -u php-src/main/main.c:1.640.2.23.2.57.2.54 
php-src/main/main.c:1.640.2.23.2.57.2.55
--- php-src/main/main.c:1.640.2.23.2.57.2.54Thu Jun  4 06:59:46 2009
+++ php-src/main/main.c Thu Jun  4 07:41:01 2009
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: main.c,v 1.640.2.23.2.57.2.54 2009/06/04 06:59:46 pajoye Exp $ */
+/* $Id: main.c,v 1.640.2.23.2.57.2.55 2009/06/04 07:41:01 pajoye Exp $ */
 
 /* {{{ includes
  */
@@ -1896,7 +1896,7 @@
REGISTER_MAIN_LONG_CONSTANT(PHP_WINDOWS_VERSION_SP_MAJOR,   
EG(windows_version_info).wServicePackMajor, CONST_PERSISTENT | CONST_CS);
REGISTER_MAIN_LONG_CONSTANT(PHP_WINDOWS_VERSION_SP_MINOR,   
EG(windows_version_info).wServicePackMinor, CONST_PERSISTENT | CONST_CS);
REGISTER_MAIN_LONG_CONSTANT(PHP_WINDOWS_VERSION_SUITEMASK,  
EG(windows_version_info).wSuiteMask, CONST_PERSISTENT | CONST_CS);
-   REGISTER_MAIN_LONG_CONSTANT(PHP_WINDOWS_VERSION_PRODUCTYPE, 
EG(windows_version_info).wProductType, CONST_PERSISTENT | CONST_CS);
+   REGISTER_MAIN_LONG_CONSTANT(PHP_WINDOWS_VERSION_PRODUCTTYPE, 
EG(windows_version_info).wProductType, CONST_PERSISTENT | CONST_CS);
REGISTER_MAIN_LONG_CONSTANT(PHP_WINDOWS_NT_DOMAIN_CONTROLLER, 
VER_NT_DOMAIN_CONTROLLER, CONST_PERSISTENT | CONST_CS);
REGISTER_MAIN_LONG_CONSTANT(PHP_WINDOWS_NT_SERVER, VER_NT_SERVER, 
CONST_PERSISTENT | CONST_CS);
REGISTER_MAIN_LONG_CONSTANT(PHP_WINDOWS_NT_WORKSTATION, 
VER_NT_WORKSTATION, CONST_PERSISTENT | CONST_CS);



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



[PHP-CVS] cvs: php-src(PHP_5_3) /main main.c

2009-05-30 Thread Scott MacVicar
scottmacSat May 30 09:48:18 2009 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/main   main.c 
  Log:
  MFH: Make sure the timeout is checked in the shutdown function, patch from 
Etienne
  
  
http://cvs.php.net/viewvc.cgi/php-src/main/main.c?r1=1.640.2.23.2.57.2.52r2=1.640.2.23.2.57.2.53diff_format=u
Index: php-src/main/main.c
diff -u php-src/main/main.c:1.640.2.23.2.57.2.52 
php-src/main/main.c:1.640.2.23.2.57.2.53
--- php-src/main/main.c:1.640.2.23.2.57.2.52Mon May  4 21:18:21 2009
+++ php-src/main/main.c Sat May 30 09:48:16 2009
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: main.c,v 1.640.2.23.2.57.2.52 2009/05/04 21:18:21 kalle Exp $ */
+/* $Id: main.c,v 1.640.2.23.2.57.2.53 2009/05/30 09:48:16 scottmac Exp $ */
 
 /* {{{ includes
  */
@@ -1276,7 +1276,7 @@
 void php_on_timeout(int seconds TSRMLS_DC)
 {
PG(connection_status) |= PHP_CONNECTION_TIMEOUT;
-   zend_set_timeout(EG(timeout_seconds), 0);
+   zend_set_timeout(EG(timeout_seconds), 1);
if(PG(exit_on_timeout)) sapi_terminate_process(TSRMLS_C);
 }
 



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



[PHP-CVS] cvs: php-src(PHP_5_3) /main main.c

2009-05-04 Thread Derick Rethans
derick  Mon May  4 19:55:47 2009 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/main   main.c 
  Log:
  - MFH: Fixed warnings
  
http://cvs.php.net/viewvc.cgi/php-src/main/main.c?r1=1.640.2.23.2.57.2.50r2=1.640.2.23.2.57.2.51diff_format=u
Index: php-src/main/main.c
diff -u php-src/main/main.c:1.640.2.23.2.57.2.50 
php-src/main/main.c:1.640.2.23.2.57.2.51
--- php-src/main/main.c:1.640.2.23.2.57.2.50Sun May  3 19:08:49 2009
+++ php-src/main/main.c Mon May  4 19:55:47 2009
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: main.c,v 1.640.2.23.2.57.2.50 2009/05/03 19:08:49 derick Exp $ */
+/* $Id: main.c,v 1.640.2.23.2.57.2.51 2009/05/04 19:55:47 derick Exp $ */
 
 /* {{{ includes
  */
@@ -59,6 +59,7 @@
 #include fopen_wrappers.h
 #include ext/standard/php_standard.h
 #include ext/standard/php_string.h
+#include ext/date/php_date.h
 #include php_variables.h
 #include ext/standard/credits.h
 #ifdef PHP_WIN32
@@ -520,7 +521,6 @@
 PHPAPI void php_log_err(char *log_message TSRMLS_DC)
 {
int fd = -1;
-   struct tm tmbuf;
time_t error_time;
 
/* Try to use the specified logging location. */



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



[PHP-CVS] cvs: php-src(PHP_5_3) /main main.c

2009-05-03 Thread Derick Rethans
derick  Sun May  3 19:08:49 2009 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/main   main.c 
  Log:
  - MFH: Fixed bug #45191 (error_log ignores date.timezone php.ini val when
setting logging timestamps).
  
  
http://cvs.php.net/viewvc.cgi/php-src/main/main.c?r1=1.640.2.23.2.57.2.49r2=1.640.2.23.2.57.2.50diff_format=u
Index: php-src/main/main.c
diff -u php-src/main/main.c:1.640.2.23.2.57.2.49 
php-src/main/main.c:1.640.2.23.2.57.2.50
--- php-src/main/main.c:1.640.2.23.2.57.2.49Thu Apr 30 09:11:00 2009
+++ php-src/main/main.c Sun May  3 19:08:49 2009
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: main.c,v 1.640.2.23.2.57.2.49 2009/04/30 09:11:00 pajoye Exp $ */
+/* $Id: main.c,v 1.640.2.23.2.57.2.50 2009/05/03 19:08:49 derick Exp $ */
 
 /* {{{ includes
  */
@@ -520,7 +520,6 @@
 PHPAPI void php_log_err(char *log_message TSRMLS_DC)
 {
int fd = -1;
-   char error_time_str[128];
struct tm tmbuf;
time_t error_time;
 
@@ -536,14 +535,17 @@
if (fd != -1) {
char *tmp;
int len;
+   char *error_time_str;
+
time(error_time);
-   strftime(error_time_str, sizeof(error_time_str), 
%d-%b-%Y %H:%M:%S, php_localtime_r(error_time, tmbuf));
+   error_time_str = php_format_date(d-M-Y H:i:s, 11, 
error_time, 1 TSRMLS_CC);
len = spprintf(tmp, 0, [%s] %s%s, error_time_str, 
log_message, PHP_EOL);
 #ifdef PHP_WIN32
php_flock(fd, 2);
 #endif
write(fd, tmp, len);
efree(tmp);
+   efree(error_time_str);
close(fd);
return;
}



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



[PHP-CVS] cvs: php-src(PHP_5_3) /main main.c

2009-04-30 Thread Pierre-Alain Joye
pajoye  Thu Apr 30 09:11:01 2009 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/main   main.c 
  Log:
  - fix build (Marcus, fix re2c please)
  
http://cvs.php.net/viewvc.cgi/php-src/main/main.c?r1=1.640.2.23.2.57.2.48r2=1.640.2.23.2.57.2.49diff_format=u
Index: php-src/main/main.c
diff -u php-src/main/main.c:1.640.2.23.2.57.2.48 
php-src/main/main.c:1.640.2.23.2.57.2.49
--- php-src/main/main.c:1.640.2.23.2.57.2.48Tue Apr 28 07:13:30 2009
+++ php-src/main/main.c Thu Apr 30 09:11:00 2009
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: main.c,v 1.640.2.23.2.57.2.48 2009/04/28 07:13:30 dmitry Exp $ */
+/* $Id: main.c,v 1.640.2.23.2.57.2.49 2009/04/30 09:11:00 pajoye Exp $ */
 
 /* {{{ includes
  */
@@ -96,6 +96,9 @@
 #  define PAGE_SIZE 4096
 # endif
 #endif
+#ifdef PHP_WIN32
+# define PAGE_SIZE 4096
+#endif
 /* }}} */
 
 PHPAPI int (*php_register_internal_extensions_func)(TSRMLS_D) = 
php_register_internal_extensions;



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



[PHP-CVS] cvs: php-src(PHP_5_3) /main main.c

2009-03-26 Thread Arnaud Le Blanc
lbarnaudFri Mar 27 02:34:06 2009 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/main   main.c 
  Log:
  MFH: Fixed initialization of tick functions list in ZTS
  
  
http://cvs.php.net/viewvc.cgi/php-src/main/main.c?r1=1.640.2.23.2.57.2.46r2=1.640.2.23.2.57.2.47diff_format=u
Index: php-src/main/main.c
diff -u php-src/main/main.c:1.640.2.23.2.57.2.46 
php-src/main/main.c:1.640.2.23.2.57.2.47
--- php-src/main/main.c:1.640.2.23.2.57.2.46Mon Feb  9 09:20:34 2009
+++ php-src/main/main.c Fri Mar 27 02:34:06 2009
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: main.c,v 1.640.2.23.2.57.2.46 2009/02/09 09:20:34 dmitry Exp $ */
+/* $Id: main.c,v 1.640.2.23.2.57.2.47 2009/03/27 02:34:06 lbarnaud Exp $ */
 
 /* {{{ includes
  */
@@ -1623,6 +1623,8 @@
 static void core_globals_ctor(php_core_globals *core_globals TSRMLS_DC)
 {
memset(core_globals, 0, sizeof(*core_globals));
+
+   php_startup_ticks(TSRMLS_C);
 }
 /* }}} */
 #endif
@@ -1643,6 +1645,8 @@
if (core_globals-disable_classes) {
free(core_globals-disable_classes);
}
+
+   php_shutdown_ticks(TSRMLS_C);
 }
 /* }}} */
 
@@ -1783,6 +1787,8 @@
 #ifdef PHP_WIN32
ts_allocate_id(php_win32_core_globals_id, 
sizeof(php_win32_core_globals), (ts_allocate_ctor) php_win32_core_globals_ctor, 
(ts_allocate_dtor) php_win32_core_globals_dtor);
 #endif
+#else
+   php_startup_ticks(TSRMLS_C);
 #endif
gc_globals_ctor(TSRMLS_C);
 
@@ -1927,11 +1933,6 @@
zend_set_utility_values(zuv);
php_startup_sapi_content_types(TSRMLS_C);
 
-   if (php_startup_ticks(TSRMLS_C) == FAILURE) {
-   php_printf(Unable to start PHP ticks\n);
-   return FAILURE;
-   }
-
/* startup extensions staticly compiled in */
if (php_register_internal_extensions_func(TSRMLS_C) == FAILURE) {
php_printf(Unable to start builtin modules\n);
@@ -2032,7 +2033,6 @@
WSACleanup();
 #endif
 
-   php_shutdown_ticks(TSRMLS_C);
sapi_flush(TSRMLS_C);
 
zend_shutdown(TSRMLS_C);



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



[PHP-CVS] cvs: php-src(PHP_5_3) /main main.c

2009-01-16 Thread Pierre-Alain Joye
pajoye  Fri Jan 16 10:26:32 2009 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/main   main.c 
  Log:
  - MFH:
   - return SUCCESS on success
   - check return value
  
http://cvs.php.net/viewvc.cgi/php-src/main/main.c?r1=1.640.2.23.2.57.2.43r2=1.640.2.23.2.57.2.44diff_format=u
Index: php-src/main/main.c
diff -u php-src/main/main.c:1.640.2.23.2.57.2.43 
php-src/main/main.c:1.640.2.23.2.57.2.44
--- php-src/main/main.c:1.640.2.23.2.57.2.43Fri Jan 16 00:57:05 2009
+++ php-src/main/main.c Fri Jan 16 10:26:32 2009
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: main.c,v 1.640.2.23.2.57.2.43 2009/01/16 00:57:05 pajoye Exp $ */
+/* $Id: main.c,v 1.640.2.23.2.57.2.44 2009/01/16 10:26:32 pajoye Exp $ */
 
 /* {{{ includes
  */
@@ -123,6 +123,7 @@
}
}
}
+   return SUCCESS;
 }
 #endif
 
@@ -1967,7 +1968,10 @@
 
 #ifdef PHP_WIN32
/* Disable incompatible functions for the running platform */
-   php_win32_disable_functions();
+   if (php_win32_disable_functions() == FAILURE) {
+   php_printf(Unable to disable unsupported functions\n);
+   return FAILURE;
+   }
 #endif
 
 #ifdef ZTS



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



[PHP-CVS] cvs: php-src(PHP_5_3) /main main.c

2009-01-16 Thread Stanislav Malyshev
stasSat Jan 17 01:12:36 2009 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/main   main.c 
  Log:
  fix nts build
  
  
http://cvs.php.net/viewvc.cgi/php-src/main/main.c?r1=1.640.2.23.2.57.2.44r2=1.640.2.23.2.57.2.45diff_format=u
Index: php-src/main/main.c
diff -u php-src/main/main.c:1.640.2.23.2.57.2.44 
php-src/main/main.c:1.640.2.23.2.57.2.45
--- php-src/main/main.c:1.640.2.23.2.57.2.44Fri Jan 16 10:26:32 2009
+++ php-src/main/main.c Sat Jan 17 01:12:36 2009
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: main.c,v 1.640.2.23.2.57.2.44 2009/01/16 10:26:32 pajoye Exp $ */
+/* $Id: main.c,v 1.640.2.23.2.57.2.45 2009/01/17 01:12:36 stas Exp $ */
 
 /* {{{ includes
  */
@@ -1705,10 +1705,6 @@
 #ifdef ZTS
zend_executor_globals *executor_globals;
void ***tsrm_ls;
-#ifdef PHP_WIN32
-   DWORD dwVersion = GetVersion();
-#endif
-
php_core_globals *core_globals;
 #endif
 #if defined(PHP_WIN32) || (defined(NETWARE)  defined(USE_WINSOCK))
@@ -1716,12 +1712,13 @@
WSADATA wsaData;
 #endif
 #ifdef PHP_WIN32
-   /* Get build numbers for Windows NT or Win95 */
-   if (dwVersion  0x8000){
-   php_os=WINNT;
-   } else {
-   php_os=WIN32;
-   }
+   DWORD dwVersion = GetVersion();
+   /* Get build numbers for Windows NT or Win95 */
+   if (dwVersion  0x8000){
+   php_os=WINNT;
+   } else {
+   php_os=WIN32;
+   }
 #if defined(_MSC_VER)  (_MSC_VER = 1400)
old_invalid_parameter_handler =
_set_invalid_parameter_handler(dummy_invalid_parameter_handler);



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



[PHP-CVS] cvs: php-src(PHP_5_3) /main main.c win32_internal_function_disabled.h

2009-01-15 Thread Pierre-Alain Joye
pajoye  Fri Jan 16 00:57:05 2009 UTC

  Added files: (Branch: PHP_5_3)
/php-src/main   win32_internal_function_disabled.h 

  Modified files:  
/php-src/main   main.c 
  Log:
  - add EG(windows_version_info), set at init time once per instance
contains a OSVERSIONINFOEX struct. It lets us determine easily on which 
windows version is used (for example)
  - add the ability to disable a function when the windows function does not 
support a feature (for example symlink)
  - symlink, hardlink  co support (1/2)
  
http://cvs.php.net/viewvc.cgi/php-src/main/main.c?r1=1.640.2.23.2.57.2.42r2=1.640.2.23.2.57.2.43diff_format=u
Index: php-src/main/main.c
diff -u php-src/main/main.c:1.640.2.23.2.57.2.42 
php-src/main/main.c:1.640.2.23.2.57.2.43
--- php-src/main/main.c:1.640.2.23.2.57.2.42Fri Jan  9 14:59:30 2009
+++ php-src/main/main.c Fri Jan 16 00:57:05 2009
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: main.c,v 1.640.2.23.2.57.2.42 2009/01/09 14:59:30 iliaa Exp $ */
+/* $Id: main.c,v 1.640.2.23.2.57.2.43 2009/01/16 00:57:05 pajoye Exp $ */
 
 /* {{{ includes
  */
@@ -99,6 +99,33 @@
 PHPAPI int core_globals_id;
 #endif
 
+#ifdef PHP_WIN32
+#include win32_internal_function_disabled.h
+
+static php_win32_disable_functions() {
+   int i;
+   TSRMLS_FETCH();
+
+   if (EG(windows_version_info).dwMajorVersion  5) {
+   for (i = 0; i  function_name_cnt_5; i++) {
+   if (zend_hash_del(CG(function_table), 
function_name_5[i], strlen(function_name_5[i]) + 1)==FAILURE) {
+   php_printf(Unable to disable function '%s'\n, 
function_name_5[i]);
+   return FAILURE;
+   }
+   }
+   }
+
+   if (EG(windows_version_info).dwMajorVersion  6) {
+   for (i = 0; i  function_name_cnt_6; i++) {
+   if (zend_hash_del(CG(function_table), 
function_name_6[i], strlen(function_name_6[i]) + 1)==FAILURE) {
+   php_printf(Unable to disable function '%s'\n, 
function_name_6[i]);
+   return FAILURE;
+   }
+   }
+   }
+}
+#endif
+
 #define SAFE_FILENAME(f) ((f)?(f):-)
 
 /* {{{ PHP_INI_MH
@@ -1677,6 +1704,9 @@
 #ifdef ZTS
zend_executor_globals *executor_globals;
void ***tsrm_ls;
+#ifdef PHP_WIN32
+   DWORD dwVersion = GetVersion();
+#endif
 
php_core_globals *core_globals;
 #endif
@@ -1685,16 +1715,12 @@
WSADATA wsaData;
 #endif
 #ifdef PHP_WIN32
-   {
-   DWORD dwVersion = GetVersion();
-
/* Get build numbers for Windows NT or Win95 */
if (dwVersion  0x8000){
php_os=WINNT;
} else {
php_os=WIN32;
}
-   }
 #if defined(_MSC_VER)  (_MSC_VER = 1400)
old_invalid_parameter_handler =
_set_invalid_parameter_handler(dummy_invalid_parameter_handler);
@@ -1752,6 +1778,18 @@
 #endif
gc_globals_ctor(TSRMLS_C);
 
+#ifdef PHP_WIN32
+   {
+   OSVERSIONINFOEX *osvi = EG(windows_version_info);
+
+   ZeroMemory(osvi, sizeof(OSVERSIONINFOEX));
+   osvi-dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);
+   if( !GetVersionEx((OSVERSIONINFO *) osvi)) {
+   php_printf(\nGetVersionEx unusable. %d\n, 
GetLastError());
+   return FAILURE;
+   }
+   }
+#endif
EG(bailout) = NULL;
EG(error_reporting) = E_ALL  ~E_NOTICE;
 
@@ -1927,6 +1965,11 @@
module-info_func = PHP_MINFO(php_core);
}
 
+#ifdef PHP_WIN32
+   /* Disable incompatible functions for the running platform */
+   php_win32_disable_functions();
+#endif
+
 #ifdef ZTS
zend_post_startup(TSRMLS_C);
 #endif

http://cvs.php.net/viewvc.cgi/php-src/main/win32_internal_function_disabled.h?view=markuprev=1.1
Index: php-src/main/win32_internal_function_disabled.h
+++ php-src/main/win32_internal_function_disabled.h



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



[PHP-CVS] cvs: php-src(PHP_5_3) /main main.c ZendEngine2 zend_builtin_functions.c

2008-12-31 Thread Marcus Boerger
helly   Wed Dec 31 13:25:21 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/ZendEngine2zend_builtin_functions.c 
/php-src/main   main.c 
  Log:
  MFH
  - Register engine classes when and where they should be
  - Show core module version as PHP version
  
  
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_builtin_functions.c?r1=1.277.2.12.2.25.2.42r2=1.277.2.12.2.25.2.43diff_format=u
Index: ZendEngine2/zend_builtin_functions.c
diff -u ZendEngine2/zend_builtin_functions.c:1.277.2.12.2.25.2.42 
ZendEngine2/zend_builtin_functions.c:1.277.2.12.2.25.2.43
--- ZendEngine2/zend_builtin_functions.c:1.277.2.12.2.25.2.42   Wed Dec 31 
12:26:33 2008
+++ ZendEngine2/zend_builtin_functions.cWed Dec 31 13:25:21 2008
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: zend_builtin_functions.c,v 1.277.2.12.2.25.2.42 2008/12/31 12:26:33 
helly Exp $ */
+/* $Id: zend_builtin_functions.c,v 1.277.2.12.2.25.2.43 2008/12/31 13:25:21 
helly Exp $ */
 
 #include zend.h
 #include zend_API.h
@@ -292,6 +292,8 @@
INIT_CLASS_ENTRY(class_entry, stdClass, NULL);
zend_standard_class_def = zend_register_internal_class(class_entry 
TSRMLS_CC);
 
+   zend_register_default_classes(TSRMLS_C);
+
return SUCCESS;
 }
 /* }}} */
http://cvs.php.net/viewvc.cgi/php-src/main/main.c?r1=1.640.2.23.2.57.2.38r2=1.640.2.23.2.57.2.39diff_format=u
Index: php-src/main/main.c
diff -u php-src/main/main.c:1.640.2.23.2.57.2.38 
php-src/main/main.c:1.640.2.23.2.57.2.39
--- php-src/main/main.c:1.640.2.23.2.57.2.38Wed Dec 31 11:15:47 2008
+++ php-src/main/main.c Wed Dec 31 13:25:21 2008
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: main.c,v 1.640.2.23.2.57.2.38 2008/12/31 11:15:47 sebastian Exp $ */
+/* $Id: main.c,v 1.640.2.23.2.57.2.39 2008/12/31 13:25:21 helly Exp $ */
 
 /* {{{ includes
  */
@@ -1606,6 +1606,14 @@
 }
 /* }}} */
 
+PHP_MINFO_FUNCTION(php_core) { /* {{{ */
+   php_info_print_table_start();
+   php_info_print_table_row(2, PHP Version, PHP_VERSION);
+   php_info_print_table_end(); 
+   DISPLAY_INI_ENTRIES();
+}
+/* }}} */
+
 /* {{{ php_register_extensions
  */
 int php_register_extensions(zend_module_entry **ptr, int count TSRMLS_DC)
@@ -1663,6 +1671,7 @@
zend_utility_values zuv;
int module_number=0;/* for REGISTER_INI_ENTRIES() */
char *php_os;
+   zend_module_entry *module;
 #ifdef ZTS
zend_executor_globals *executor_globals;
void ***tsrm_ls;
@@ -1875,9 +1884,6 @@
return FAILURE;
}
 
-   /* Register internal Zend classes */
-   zend_register_default_classes(TSRMLS_C);
-
/* startup extensions staticly compiled in */
if (php_register_internal_extensions_func(TSRMLS_C) == FAILURE) {
php_printf(Unable to start builtin modules\n);
@@ -1904,6 +1910,12 @@
/* start Zend extensions */
zend_startup_extensions();
 
+   /* make core report what it should */
+   if (zend_hash_find(module_registry, core, sizeof(core), 
(void**)module)==SUCCESS) {
+   module-version = PHP_VERSION;
+   module-info_func = PHP_MINFO(php_core);
+   }
+
 #ifdef ZTS
zend_post_startup(TSRMLS_C);
 #endif



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



[PHP-CVS] cvs: php-src(PHP_5_3) /main main.c ZendEngine2 zend.c zend.h

2008-12-31 Thread Marcus Boerger
helly   Wed Dec 31 14:05:22 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/ZendEngine2zend.c zend.h 
/php-src/main   main.c 
  Log:
  - Sync with HEAD, no ability to not start builtin functions
  
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend.c?r1=1.308.2.12.2.35.2.26r2=1.308.2.12.2.35.2.27diff_format=u
Index: ZendEngine2/zend.c
diff -u ZendEngine2/zend.c:1.308.2.12.2.35.2.26 
ZendEngine2/zend.c:1.308.2.12.2.35.2.27
--- ZendEngine2/zend.c:1.308.2.12.2.35.2.26 Wed Dec 31 12:26:33 2008
+++ ZendEngine2/zend.c  Wed Dec 31 14:05:22 2008
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: zend.c,v 1.308.2.12.2.35.2.26 2008/12/31 12:26:33 helly Exp $ */
+/* $Id: zend.c,v 1.308.2.12.2.35.2.27 2008/12/31 14:05:22 helly Exp $ */
 
 #include zend.h
 #include zend_extensions.h
@@ -588,7 +588,7 @@
 
 void zend_init_opcodes_handlers(void);
 
-int zend_startup(zend_utility_functions *utility_functions, char **extensions, 
int start_builtin_functions TSRMLS_DC) /* {{{ */
+int zend_startup(zend_utility_functions *utility_functions, char **extensions 
TSRMLS_DC) /* {{{ */
 {
 #ifdef ZTS
zend_compiler_globals *compiler_globals;
@@ -685,10 +685,8 @@
EG(user_error_handler) = NULL;
EG(user_exception_handler) = NULL;
 #endif
-   if (start_builtin_functions) {
-   zend_startup_builtin_functions(TSRMLS_C);
-   }
 
+   zend_startup_builtin_functions(TSRMLS_C);
zend_register_standard_constants(TSRMLS_C);
zend_register_auto_global(GLOBALS, sizeof(GLOBALS) - 1, NULL 
TSRMLS_CC);
 
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend.h?r1=1.293.2.11.2.9.2.30r2=1.293.2.11.2.9.2.31diff_format=u
Index: ZendEngine2/zend.h
diff -u ZendEngine2/zend.h:1.293.2.11.2.9.2.30 
ZendEngine2/zend.h:1.293.2.11.2.9.2.31
--- ZendEngine2/zend.h:1.293.2.11.2.9.2.30  Wed Dec 31 11:15:31 2008
+++ ZendEngine2/zend.h  Wed Dec 31 14:05:22 2008
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: zend.h,v 1.293.2.11.2.9.2.30 2008/12/31 11:15:31 sebastian Exp $ */
+/* $Id: zend.h,v 1.293.2.11.2.9.2.31 2008/12/31 14:05:22 helly Exp $ */
 
 #ifndef ZEND_H
 #define ZEND_H
@@ -526,7 +526,7 @@
 #define OE_IS_OBJECT   (11)
 #define OE_IS_METHOD   (12)
 
-int zend_startup(zend_utility_functions *utility_functions, char **extensions, 
int start_builtin_functions TSRMLS_DC);
+int zend_startup(zend_utility_functions *utility_functions, char **extensions 
TSRMLS_DC);
 void zend_shutdown(TSRMLS_D);
 void zend_register_standard_ini_entries(TSRMLS_D);
 void zend_post_startup(TSRMLS_D);
http://cvs.php.net/viewvc.cgi/php-src/main/main.c?r1=1.640.2.23.2.57.2.39r2=1.640.2.23.2.57.2.40diff_format=u
Index: php-src/main/main.c
diff -u php-src/main/main.c:1.640.2.23.2.57.2.39 
php-src/main/main.c:1.640.2.23.2.57.2.40
--- php-src/main/main.c:1.640.2.23.2.57.2.39Wed Dec 31 13:25:21 2008
+++ php-src/main/main.c Wed Dec 31 14:05:22 2008
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: main.c,v 1.640.2.23.2.57.2.39 2008/12/31 13:25:21 helly Exp $ */
+/* $Id: main.c,v 1.640.2.23.2.57.2.40 2008/12/31 14:05:22 helly Exp $ */
 
 /* {{{ includes
  */
@@ -1738,7 +1738,7 @@
zuf.vspprintf_function = vspprintf;
zuf.getenv_function = sapi_getenv;
zuf.resolve_path_function = php_resolve_path_for_zend;
-   zend_startup(zuf, NULL, 1 TSRMLS_CC);
+   zend_startup(zuf, NULL TSRMLS_CC);
 
 #ifdef ZTS
executor_globals = ts_resource(executor_globals_id);



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



[PHP-CVS] cvs: php-src(PHP_5_3) /main main.c

2008-12-09 Thread Hannes Magnusson
bjori   Tue Dec  9 10:23:44 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/main   main.c 
  Log:
  Whoops. Missing bit from the open_basedir tightening MFH
  
  
http://cvs.php.net/viewvc.cgi/php-src/main/main.c?r1=1.640.2.23.2.57.2.36r2=1.640.2.23.2.57.2.37diff_format=u
Index: php-src/main/main.c
diff -u php-src/main/main.c:1.640.2.23.2.57.2.36 
php-src/main/main.c:1.640.2.23.2.57.2.37
--- php-src/main/main.c:1.640.2.23.2.57.2.36Wed Nov 12 16:40:40 2008
+++ php-src/main/main.c Tue Dec  9 10:23:44 2008
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: main.c,v 1.640.2.23.2.57.2.36 2008/11/12 16:40:40 felipe Exp $ */
+/* $Id: main.c,v 1.640.2.23.2.57.2.37 2008/12/09 10:23:44 bjori Exp $ */
 
 /* {{{ includes
  */
@@ -429,7 +429,7 @@
STD_PHP_INI_ENTRY(extension_dir,  
PHP_EXTENSION_DIR,  PHP_INI_SYSTEM, OnUpdateStringUnempty,  
extension_dir,  php_core_globals,   core_globals)
STD_PHP_INI_ENTRY(include_path,   
PHP_INCLUDE_PATH,   PHP_INI_ALL,OnUpdateStringUnempty,  
include_path,   php_core_globals,   core_globals)
PHP_INI_ENTRY(max_execution_time, 30,   
PHP_INI_ALL,OnUpdateTimeout)
-   STD_PHP_INI_ENTRY(open_basedir,   NULL,   
PHP_INI_SYSTEM, OnUpdateString, open_basedir,   
php_core_globals,   core_globals)
+   STD_PHP_INI_ENTRY(open_basedir,   NULL,   
PHP_INI_ALL,OnUpdateBaseDir,open_basedir,   
php_core_globals,   core_globals)
STD_PHP_INI_ENTRY(safe_mode_exec_dir, PHP_SAFE_MODE_EXEC_DIR, 
PHP_INI_SYSTEM, OnUpdateString, safe_mode_exec_dir, 
php_core_globals,   core_globals)
 
STD_PHP_INI_BOOLEAN(file_uploads, 1,
PHP_INI_SYSTEM, OnUpdateBool,   file_uploads,   
php_core_globals,   core_globals)



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



[PHP-CVS] cvs: php-src(PHP_5_3) /main main.c

2008-11-12 Thread Felipe Pena
felipe  Wed Nov 12 16:40:40 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/main   main.c 
  Log:
  - Silent valgrind
  
http://cvs.php.net/viewvc.cgi/php-src/main/main.c?r1=1.640.2.23.2.57.2.35r2=1.640.2.23.2.57.2.36diff_format=u
Index: php-src/main/main.c
diff -u php-src/main/main.c:1.640.2.23.2.57.2.35 
php-src/main/main.c:1.640.2.23.2.57.2.36
--- php-src/main/main.c:1.640.2.23.2.57.2.35Fri Nov  7 09:12:39 2008
+++ php-src/main/main.c Wed Nov 12 16:40:40 2008
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: main.c,v 1.640.2.23.2.57.2.35 2008/11/07 09:12:39 indeyets Exp $ */
+/* $Id: main.c,v 1.640.2.23.2.57.2.36 2008/11/12 16:40:40 felipe Exp $ */
 
 /* {{{ includes
  */
@@ -1480,7 +1480,7 @@
zend_try {
zend_bool send_buffer = SG(request_info).headers_only ? 0 : 1;
if (CG(unclean_shutdown)  PG(last_error_type) == E_ERROR 
-   !OG(active_ob_buffer).chunk_size  
PG(memory_limit)  zend_memory_usage(1 TSRMLS_CC)) {
+   OG(ob_nesting_level)  
!OG(active_ob_buffer).chunk_size  PG(memory_limit)  zend_memory_usage(1 
TSRMLS_CC)) {
send_buffer = 0;
}
php_end_ob_buffers(send_buffer TSRMLS_CC);



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



[PHP-CVS] cvs: php-src(PHP_5_3) /main main.c

2008-11-07 Thread Alexey Zakhlestin
indeyetsFri Nov  7 09:12:39 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/main   main.c 
  Log:
  added const, as required by struct-definition
  
  
http://cvs.php.net/viewvc.cgi/php-src/main/main.c?r1=1.640.2.23.2.57.2.34r2=1.640.2.23.2.57.2.35diff_format=u
Index: php-src/main/main.c
diff -u php-src/main/main.c:1.640.2.23.2.57.2.34 
php-src/main/main.c:1.640.2.23.2.57.2.35
--- php-src/main/main.c:1.640.2.23.2.57.2.34Wed Sep 17 00:20:29 2008
+++ php-src/main/main.c Fri Nov  7 09:12:39 2008
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: main.c,v 1.640.2.23.2.57.2.34 2008/09/17 00:20:29 iliaa Exp $ */
+/* $Id: main.c,v 1.640.2.23.2.57.2.35 2008/11/07 09:12:39 indeyets Exp $ */
 
 /* {{{ includes
  */
@@ -1122,7 +1122,7 @@
 
 /* {{{ php_get_configuration_directive_for_zend
  */
-static int php_get_configuration_directive_for_zend(char *name, uint 
name_length, zval *contents)
+static int php_get_configuration_directive_for_zend(const char *name, uint 
name_length, zval *contents)
 {
zval *retval = cfg_get_entry(name, name_length);
 



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



[PHP-CVS] cvs: php-src(PHP_5_3) /main main.c /tests/lang bug43958.phpt

2008-09-02 Thread Dmitry Stogov
dmitry  Tue Sep  2 09:45:49 2008 UTC

  Added files: (Branch: PHP_5_3)
/php-src/tests/lang bug43958.phpt 

  Modified files:  
/php-src/main   main.c 
  Log:
  Fixed Bug #43958 (class name added into the error message)
  
  
http://cvs.php.net/viewvc.cgi/php-src/main/main.c?r1=1.640.2.23.2.57.2.32r2=1.640.2.23.2.57.2.33diff_format=u
Index: php-src/main/main.c
diff -u php-src/main/main.c:1.640.2.23.2.57.2.32 
php-src/main/main.c:1.640.2.23.2.57.2.33
--- php-src/main/main.c:1.640.2.23.2.57.2.32Tue Aug 26 23:26:07 2008
+++ php-src/main/main.c Tue Sep  2 09:45:49 2008
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: main.c,v 1.640.2.23.2.57.2.32 2008/08/26 23:26:07 jani Exp $ */
+/* $Id: main.c,v 1.640.2.23.2.57.2.33 2008/09/02 09:45:49 dmitry Exp $ */
 
 /* {{{ includes
  */
@@ -575,8 +575,8 @@
char *docref_target = , *docref_root = ;
char *p;
int buffer_len = 0;
-   char *space;
-   char *class_name = get_active_class_name(space TSRMLS_CC);
+   char *space = ;
+   char *class_name = ;
char *function;
int origin_len;
char *origin;
@@ -632,6 +632,7 @@
function = Unknown;
} else {
is_function = 1;
+   class_name = get_active_class_name(space TSRMLS_CC);
}
}
 

http://cvs.php.net/viewvc.cgi/php-src/tests/lang/bug43958.phpt?view=markuprev=1.1
Index: php-src/tests/lang/bug43958.phpt
+++ php-src/tests/lang/bug43958.phpt



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



[PHP-CVS] cvs: php-src(PHP_5_3) /main main.c

2008-08-26 Thread Jani Taskinen
janiTue Aug 26 23:26:07 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/main   main.c 
  Log:
  MFH
  
http://cvs.php.net/viewvc.cgi/php-src/main/main.c?r1=1.640.2.23.2.57.2.31r2=1.640.2.23.2.57.2.32diff_format=u
Index: php-src/main/main.c
diff -u php-src/main/main.c:1.640.2.23.2.57.2.31 
php-src/main/main.c:1.640.2.23.2.57.2.32
--- php-src/main/main.c:1.640.2.23.2.57.2.31Sat Aug 23 17:55:50 2008
+++ php-src/main/main.c Tue Aug 26 23:26:07 2008
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: main.c,v 1.640.2.23.2.57.2.31 2008/08/23 17:55:50 pajoye Exp $ */
+/* $Id: main.c,v 1.640.2.23.2.57.2.32 2008/08/26 23:26:07 jani Exp $ */
 
 /* {{{ includes
  */
@@ -354,13 +354,15 @@
 #  define PHP_SAFE_MODE_EXEC_DIR 
 #endif
 
-#if defined(PHP_PROG_SENDMAIL)  !defined(NETWARE)
-#  define DEFAULT_SENDMAIL_PATH PHP_PROG_SENDMAIL  -t -i 
-#elif defined(PHP_WIN32)
-#  define DEFAULT_SENDMAIL_PATH NULL
+ /* Windows and Netware use the internal mail */
+#if defined(PHP_WIN32) || defined(NETWARE)
+# define DEFAULT_SENDMAIL_PATH NULL
+#elif defined(PHP_PROG_SENDMAIL)
+# define DEFAULT_SENDMAIL_PATH PHP_PROG_SENDMAIL  -t -i 
 #else
-#  define DEFAULT_SENDMAIL_PATH /usr/sbin/sendmail -t -i 
+# define DEFAULT_SENDMAIL_PATH /usr/sbin/sendmail -t -i
 #endif
+
 /* {{{ PHP_INI
  */
 PHP_INI_BEGIN()



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



[PHP-CVS] cvs: php-src(PHP_5_3) /main main.c ZendEngine2 zend.c zend.h zend_alloc.c zend_alloc.h zend_execute.c zend_gc.c zend_gc.h zend_language_scanner.c zend_language_scanner.l zend_operators.c ze

2008-08-15 Thread Felipe Pena
felipe  Fri Aug 15 19:47:44 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/ZendEngine2zend.c zend.h zend_alloc.c zend_alloc.h zend_execute.c 
zend_gc.c zend_gc.h zend_language_scanner.c 
zend_language_scanner.l zend_operators.c zend_stream.c 
zend_vm_def.h zend_vm_execute.h 
/php-src/main   main.c 
  Log:
  - MFH: Removed some TSRMLS_FETCH()s
  
  http://cvs.php.net/viewvc.cgi/ZendEngine2/zend.c?r1=1.308.2.12.2.35.2.22r2=1.308.2.12.2.35.2.23diff_format=u
Index: ZendEngine2/zend.c
diff -u ZendEngine2/zend.c:1.308.2.12.2.35.2.22 
ZendEngine2/zend.c:1.308.2.12.2.35.2.23
--- ZendEngine2/zend.c:1.308.2.12.2.35.2.22 Thu Aug 14 10:24:51 2008
+++ ZendEngine2/zend.c  Fri Aug 15 19:47:23 2008
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: zend.c,v 1.308.2.12.2.35.2.22 2008/08/14 10:24:51 helly Exp $ */
+/* $Id: zend.c,v 1.308.2.12.2.35.2.23 2008/08/15 19:47:23 felipe Exp $ */
 
 #include zend.h
 #include zend_extensions.h
@@ -50,7 +50,7 @@
 ZEND_API zend_class_entry *zend_standard_class_def = NULL;
 ZEND_API int (*zend_printf)(const char *format, ...);
 ZEND_API zend_write_func_t zend_write;
-ZEND_API FILE *(*zend_fopen)(const char *filename, char **opened_path);
+ZEND_API FILE *(*zend_fopen)(const char *filename, char **opened_path 
TSRMLS_DC);
 ZEND_API int (*zend_stream_open_function)(const char *filename, 
zend_file_handle *handle TSRMLS_DC);
 ZEND_API void (*zend_block_interruptions)(void);
 ZEND_API void (*zend_unblock_interruptions)(void);
@@ -62,7 +62,7 @@
 
 void (*zend_on_timeout)(int seconds TSRMLS_DC);
 
-static void (*zend_message_dispatcher_p)(long message, void *data);
+static void (*zend_message_dispatcher_p)(long message, void *data TSRMLS_DC);
 static int (*zend_get_configuration_directive_p)(const char *name, uint 
name_length, zval *contents);
 
 static ZEND_INI_MH(OnUpdateErrorReporting) /* {{{ */
@@ -423,7 +423,7 @@
 }
 /* }}} */
 
-static FILE *zend_fopen_wrapper(const char *filename, char **opened_path) /* 
{{{ */
+static FILE *zend_fopen_wrapper(const char *filename, char **opened_path 
TSRMLS_DC) /* {{{ */
 {
if (opened_path) {
*opened_path = estrdup(filename);
@@ -601,7 +601,7 @@
 
 void zend_init_opcodes_handlers(void);
 
-int zend_startup(zend_utility_functions *utility_functions, char **extensions, 
int start_builtin_functions) /* {{{ */
+int zend_startup(zend_utility_functions *utility_functions, char **extensions, 
int start_builtin_functions TSRMLS_DC) /* {{{ */
 {
 #ifdef ZTS
zend_compiler_globals *compiler_globals;
@@ -612,7 +612,6 @@
extern zend_ini_scanner_globals ini_scanner_globals;
extern zend_php_scanner_globals language_scanner_globals;
 #endif
-   TSRMLS_FETCH();
 
start_memory_manager(TSRMLS_C);
 
@@ -680,7 +679,6 @@
ts_allocate_id(ini_scanner_globals_id, 
sizeof(zend_ini_scanner_globals), (ts_allocate_ctor) ini_scanner_globals_ctor, 
NULL);
compiler_globals = ts_resource(compiler_globals_id);
executor_globals = ts_resource(executor_globals_id);
-   tsrm_ls = ts_resource_ex(0, NULL);
 
compiler_globals_dtor(compiler_globals TSRMLS_CC);
compiler_globals-in_compilation = 0;
@@ -949,10 +947,10 @@
 /* }}} */
 
 BEGIN_EXTERN_C()
-ZEND_API void zend_message_dispatcher(long message, void *data) /* {{{ */
+ZEND_API void zend_message_dispatcher(long message, void *data TSRMLS_DC) /* 
{{{ */
 {
if (zend_message_dispatcher_p) {
-   zend_message_dispatcher_p(message, data);
+   zend_message_dispatcher_p(message, data TSRMLS_CC);
}
 }
 /* }}} */
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend.h?r1=1.293.2.11.2.9.2.27r2=1.293.2.11.2.9.2.28diff_format=u
Index: ZendEngine2/zend.h
diff -u ZendEngine2/zend.h:1.293.2.11.2.9.2.27 
ZendEngine2/zend.h:1.293.2.11.2.9.2.28
--- ZendEngine2/zend.h:1.293.2.11.2.9.2.27  Tue Aug 12 17:20:23 2008
+++ ZendEngine2/zend.h  Fri Aug 15 19:47:23 2008
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: zend.h,v 1.293.2.11.2.9.2.27 2008/08/12 17:20:23 felipe Exp $ */
+/* $Id: zend.h,v 1.293.2.11.2.9.2.28 2008/08/15 19:47:23 felipe Exp $ */
 
 #ifndef ZEND_H
 #define ZEND_H
@@ -469,8 +469,8 @@
void (*error_function)(int type, const char *error_filename, const uint 
error_lineno, const char *format, va_list args) 
ZEND_ATTRIBUTE_PTR_FORMAT(printf, 4, 0);
int (*printf_function)(const char *format, ...) 
ZEND_ATTRIBUTE_PTR_FORMAT(printf, 1, 2);
int (*write_function)(const char *str, uint str_length);
-   FILE *(*fopen_function)(const char *filename, char **opened_path);
-   void (*message_handler)(long message, void *data);
+   FILE *(*fopen_function)(const char *filename, char **opened_path 
TSRMLS_DC);
+   void (*message_handler)(long message, 

Re: [PHP-CVS] cvs: php-src(PHP_5_3) /main main.c ZendEngine2 zend.c zend.h zend_alloc.c zend_alloc.h zend_execute.c zend_gc.c zend_gc.h zend_language_scanner.c zend_language_scanner.l zend_operators.c

2008-08-15 Thread Pierre Joye
hi Felipe!

2008/8/15 Felipe Pena [EMAIL PROTECTED]:
 felipe  Fri Aug 15 19:47:44 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/ZendEngine2zend.c zend.h zend_alloc.c zend_alloc.h zend_execute.c
zend_gc.c zend_gc.h zend_language_scanner.c
zend_language_scanner.l zend_operators.c zend_stream.c
zend_vm_def.h zend_vm_execute.h
/php-src/main   main.c
  Log:
  - MFH: Removed some TSRMLS_FETCH()s

The following error:

ext\xmlrpc\xmlrpc-epi-php.c(284) : error C2065: 'tsrm_ls' : undeclared
identifier

may be related to this change: FREE_ZVAL macro.

Can you check it please?

Cheers,
-- 
Pierre

http://blog.thepimp.net | http://www.libgd.org

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



Re: [PHP-CVS] cvs: php-src(PHP_5_3) /main main.c ZendEngine2 zend.c zend.h zend_alloc.c zend_alloc.h zend_execute.c zend_gc.c zend_gc.h zend_language_scanner.c zend_language_scanner.l zend_operators.c

2008-08-15 Thread Felipe Pena
Hi Pierre!

Em Sex, 2008-08-15 às 22:48 +0200, Pierre Joye escreveu:
 2008/8/15 Felipe Pena [EMAIL PROTECTED]:
  felipe  Fri Aug 15 19:47:44 2008 UTC
 
   Modified files:  (Branch: PHP_5_3)
 /ZendEngine2zend.c zend.h zend_alloc.c zend_alloc.h 
  zend_execute.c
 zend_gc.c zend_gc.h zend_language_scanner.c
 zend_language_scanner.l zend_operators.c 
  zend_stream.c
 zend_vm_def.h zend_vm_execute.h
 /php-src/main   main.c
   Log:
   - MFH: Removed some TSRMLS_FETCH()s
 
 The following error:
 
 ext\xmlrpc\xmlrpc-epi-php.c(284) : error C2065: 'tsrm_ls' : undeclared
 identifier
 
 may be related to this change: FREE_ZVAL macro.
 
 Can you check it please?

Fixed, thanks. :)

-- 
Regards,
Felipe Pena.


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



[PHP-CVS] cvs: php-src(PHP_5_3) /main main.c

2008-07-25 Thread Felipe Pena
felipe  Fri Jul 25 13:46:56 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/main   main.c 
  Log:
  - MFB: Fixed the parameter type expected. set_time_limit() should accept only 
integer.
  
  
http://cvs.php.net/viewvc.cgi/php-src/main/main.c?r1=1.640.2.23.2.57.2.26r2=1.640.2.23.2.57.2.27diff_format=u
Index: php-src/main/main.c
diff -u php-src/main/main.c:1.640.2.23.2.57.2.26 
php-src/main/main.c:1.640.2.23.2.57.2.27
--- php-src/main/main.c:1.640.2.23.2.57.2.26Mon Jul 21 09:40:59 2008
+++ php-src/main/main.c Fri Jul 25 13:46:56 2008
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: main.c,v 1.640.2.23.2.57.2.26 2008/07/21 09:40:59 bjori Exp $ */
+/* $Id: main.c,v 1.640.2.23.2.57.2.27 2008/07/25 13:46:56 felipe Exp $ */
 
 /* {{{ includes
  */
@@ -1028,23 +1028,27 @@
Sets the maximum time a script can run */
 PHP_FUNCTION(set_time_limit)
 {
-   zval **new_timeout;
+   long new_timeout;
+   char *new_timeout_str;
+   int new_timeout_strlen;
 
if (PG(safe_mode)) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, Cannot set time 
limit in safe mode);
RETURN_FALSE;
}
 
-   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, Z, new_timeout) 
== FAILURE) {
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, l, new_timeout) 
== FAILURE) {
return;
}
+   
+   new_timeout_strlen = zend_spprintf(new_timeout_str, 0, %ld, 
new_timeout);
 
-   convert_to_string_ex(new_timeout);
-   if (zend_alter_ini_entry_ex(max_execution_time, 
sizeof(max_execution_time), Z_STRVAL_PP(new_timeout), 
Z_STRLEN_PP(new_timeout), PHP_INI_USER, PHP_INI_STAGE_RUNTIME, 0 TSRMLS_CC) == 
SUCCESS) {
-   RETURN_TRUE;
+   if (zend_alter_ini_entry_ex(max_execution_time, 
sizeof(max_execution_time), new_timeout_str, new_timeout_strlen, 
PHP_INI_USER, PHP_INI_STAGE_RUNTIME, 0 TSRMLS_CC) == SUCCESS) {
+   RETVAL_TRUE;
} else {
-   RETURN_FALSE;
+   RETVAL_FALSE;
}
+   efree(new_timeout_str);
 }
 /* }}} */
 



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



[PHP-CVS] cvs: php-src(PHP_5_3) /main main.c php_ticks.c php_ticks.h

2008-06-25 Thread Dmitry Stogov
dmitry  Wed Jun 25 12:18:36 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/main   main.c php_ticks.c php_ticks.h 
  Log:
  Fixed bug #45352 (Segmentation fault because of tick function on second 
request)
  
  
http://cvs.php.net/viewvc.cgi/php-src/main/main.c?r1=1.640.2.23.2.57.2.23r2=1.640.2.23.2.57.2.24diff_format=u
Index: php-src/main/main.c
diff -u php-src/main/main.c:1.640.2.23.2.57.2.23 
php-src/main/main.c:1.640.2.23.2.57.2.24
--- php-src/main/main.c:1.640.2.23.2.57.2.23Sat Jun 21 02:41:27 2008
+++ php-src/main/main.c Wed Jun 25 12:18:36 2008
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: main.c,v 1.640.2.23.2.57.2.23 2008/06/21 02:41:27 felipe Exp $ */
+/* $Id: main.c,v 1.640.2.23.2.57.2.24 2008/06/25 12:18:36 dmitry Exp $ */
 
 /* {{{ includes
  */
@@ -1472,6 +1472,8 @@
EG(opline_ptr) = NULL;
EG(active_op_array) = NULL;
 
+   php_deactivate_ticks(TSRMLS_C);
+
/* 1. Call all possible shutdown functions registered with 
register_shutdown_function() */
if (PG(modules_activated)) zend_try {
php_call_shutdown_functions(TSRMLS_C);
http://cvs.php.net/viewvc.cgi/php-src/main/php_ticks.c?r1=1.20.2.1.2.1.2.1r2=1.20.2.1.2.1.2.2diff_format=u
Index: php-src/main/php_ticks.c
diff -u php-src/main/php_ticks.c:1.20.2.1.2.1.2.1 
php-src/main/php_ticks.c:1.20.2.1.2.1.2.2
--- php-src/main/php_ticks.c:1.20.2.1.2.1.2.1   Mon Dec 31 07:17:17 2007
+++ php-src/main/php_ticks.cWed Jun 25 12:18:36 2008
@@ -16,7 +16,7 @@
+--+
 */
 
-/* $Id: php_ticks.c,v 1.20.2.1.2.1.2.1 2007/12/31 07:17:17 sebastian Exp $ */
+/* $Id: php_ticks.c,v 1.20.2.1.2.1.2.2 2008/06/25 12:18:36 dmitry Exp $ */
 
 #include php.h
 #include php_ticks.h
@@ -27,6 +27,11 @@
return SUCCESS;
 }
 
+void php_deactivate_ticks(TSRMLS_D)
+{
+   zend_llist_clean(PG(tick_functions));
+}
+
 void php_shutdown_ticks(TSRMLS_D)
 {
zend_llist_destroy(PG(tick_functions));
http://cvs.php.net/viewvc.cgi/php-src/main/php_ticks.h?r1=1.14.2.1.2.1.2.1r2=1.14.2.1.2.1.2.2diff_format=u
Index: php-src/main/php_ticks.h
diff -u php-src/main/php_ticks.h:1.14.2.1.2.1.2.1 
php-src/main/php_ticks.h:1.14.2.1.2.1.2.2
--- php-src/main/php_ticks.h:1.14.2.1.2.1.2.1   Mon Dec 31 07:17:17 2007
+++ php-src/main/php_ticks.hWed Jun 25 12:18:36 2008
@@ -16,12 +16,13 @@
+--+
 */
 
-/* $Id: php_ticks.h,v 1.14.2.1.2.1.2.1 2007/12/31 07:17:17 sebastian Exp $ */
+/* $Id: php_ticks.h,v 1.14.2.1.2.1.2.2 2008/06/25 12:18:36 dmitry Exp $ */
 
 #ifndef PHP_TICKS_H
 #define PHP_TICKS_H
 
 int php_startup_ticks(TSRMLS_D);
+void php_deactivate_ticks(TSRMLS_D);
 void php_shutdown_ticks(TSRMLS_D);
 void php_run_ticks(int count);
 



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



[PHP-CVS] cvs: php-src(PHP_5_3) /main main.c

2008-05-21 Thread Pierre-Alain Joye
pajoye  Wed May 21 15:55:31 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/main   main.c 
  Log:
  - actually disable the ASSERT error dialog box (affects debug mode only), 
helps to run the tests and coverage analyze
  
http://cvs.php.net/viewvc.cgi/php-src/main/main.c?r1=1.640.2.23.2.57.2.21r2=1.640.2.23.2.57.2.22diff_format=u
Index: php-src/main/main.c
diff -u php-src/main/main.c:1.640.2.23.2.57.2.21 
php-src/main/main.c:1.640.2.23.2.57.2.22
--- php-src/main/main.c:1.640.2.23.2.57.2.21Sat Mar 22 12:56:16 2008
+++ php-src/main/main.c Wed May 21 15:55:31 2008
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: main.c,v 1.640.2.23.2.57.2.21 2008/03/22 12:56:16 tony2001 Exp $ */
+/* $Id: main.c,v 1.640.2.23.2.57.2.22 2008/05/21 15:55:31 pajoye Exp $ */
 
 /* {{{ includes
  */
@@ -1691,6 +1691,9 @@
if (old_invalid_parameter_handler != NULL) {
_set_invalid_parameter_handler(old_invalid_parameter_handler);
}
+
+   /* Disable the message box for assertions.*/
+   _CrtSetReportMode(_CRT_ASSERT, 0);
 #endif
 #else
php_os=PHP_OS;



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



[PHP-CVS] cvs: php-src(PHP_5_3) /main main.c

2008-03-22 Thread Antony Dovgal
tony2001Sat Mar 22 12:56:16 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/main   main.c 
  Log:
  use correct flags
  
  
http://cvs.php.net/viewvc.cgi/php-src/main/main.c?r1=1.640.2.23.2.57.2.20r2=1.640.2.23.2.57.2.21diff_format=u
Index: php-src/main/main.c
diff -u php-src/main/main.c:1.640.2.23.2.57.2.20 
php-src/main/main.c:1.640.2.23.2.57.2.21
--- php-src/main/main.c:1.640.2.23.2.57.2.20Fri Mar 21 16:39:11 2008
+++ php-src/main/main.c Sat Mar 22 12:56:16 2008
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: main.c,v 1.640.2.23.2.57.2.20 2008/03/21 16:39:11 tony2001 Exp $ */
+/* $Id: main.c,v 1.640.2.23.2.57.2.21 2008/03/22 12:56:16 tony2001 Exp $ */
 
 /* {{{ includes
  */
@@ -406,7 +406,7 @@
 #endif
STD_PHP_INI_ENTRY(safe_mode_include_dir,  NULL,   
PHP_INI_SYSTEM, OnUpdateString, safe_mode_include_dir,  
php_core_globals,   core_globals)
STD_PHP_INI_BOOLEAN(safe_mode_gid,0,
PHP_INI_SYSTEM, OnUpdateBool,   safe_mode_gid,  
php_core_globals,   core_globals)
-   STD_PHP_INI_BOOLEAN(short_open_tag,   DEFAULT_SHORT_OPEN_TAG, 
PHP_INI_ALL|PHP_INI_PERDIR, OnUpdateBool,   
short_tags, zend_compiler_globals,  
compiler_globals)
+   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,   1,
PHP_INI_ALL,OnUpdateBool,   y2k_compliance, 
php_core_globals,   core_globals)



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



[PHP-CVS] cvs: php-src(PHP_5_3) /main main.c

2008-03-21 Thread Antony Dovgal
tony2001Fri Mar 21 16:39:11 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/main   main.c 
  Log:
  MFH: revert
  
  
http://cvs.php.net/viewvc.cgi/php-src/main/main.c?r1=1.640.2.23.2.57.2.19r2=1.640.2.23.2.57.2.20diff_format=u
Index: php-src/main/main.c
diff -u php-src/main/main.c:1.640.2.23.2.57.2.19 
php-src/main/main.c:1.640.2.23.2.57.2.20
--- php-src/main/main.c:1.640.2.23.2.57.2.19Thu Mar 20 17:30:14 2008
+++ php-src/main/main.c Fri Mar 21 16:39:11 2008
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: main.c,v 1.640.2.23.2.57.2.19 2008/03/20 17:30:14 stas Exp $ */
+/* $Id: main.c,v 1.640.2.23.2.57.2.20 2008/03/21 16:39:11 tony2001 Exp $ */
 
 /* {{{ includes
  */
@@ -406,7 +406,7 @@
 #endif
STD_PHP_INI_ENTRY(safe_mode_include_dir,  NULL,   
PHP_INI_SYSTEM, OnUpdateString, safe_mode_include_dir,  
php_core_globals,   core_globals)
STD_PHP_INI_BOOLEAN(safe_mode_gid,0,
PHP_INI_SYSTEM, OnUpdateBool,   safe_mode_gid,  
php_core_globals,   core_globals)
-   STD_PHP_INI_BOOLEAN(short_open_tag,   DEFAULT_SHORT_OPEN_TAG, 
PHP_INI_ALL,OnUpdateBool,   short_tags, 
zend_compiler_globals,  compiler_globals)
+   STD_PHP_INI_BOOLEAN(short_open_tag,   DEFAULT_SHORT_OPEN_TAG, 
PHP_INI_ALL|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,   1,
PHP_INI_ALL,OnUpdateBool,   y2k_compliance, 
php_core_globals,   core_globals)



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



[PHP-CVS] cvs: php-src(PHP_5_3) /main main.c

2008-03-20 Thread Stanislav Malyshev
stasThu Mar 20 17:30:14 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/main   main.c 
  Log:
  [DOC] make short_open_tag user-accessible
  
  
http://cvs.php.net/viewvc.cgi/php-src/main/main.c?r1=1.640.2.23.2.57.2.18r2=1.640.2.23.2.57.2.19diff_format=u
Index: php-src/main/main.c
diff -u php-src/main/main.c:1.640.2.23.2.57.2.18 
php-src/main/main.c:1.640.2.23.2.57.2.19
--- php-src/main/main.c:1.640.2.23.2.57.2.18Wed Mar 19 12:42:16 2008
+++ php-src/main/main.c Thu Mar 20 17:30:14 2008
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: main.c,v 1.640.2.23.2.57.2.18 2008/03/19 12:42:16 tony2001 Exp $ */
+/* $Id: main.c,v 1.640.2.23.2.57.2.19 2008/03/20 17:30:14 stas Exp $ */
 
 /* {{{ includes
  */
@@ -406,7 +406,7 @@
 #endif
STD_PHP_INI_ENTRY(safe_mode_include_dir,  NULL,   
PHP_INI_SYSTEM, OnUpdateString, safe_mode_include_dir,  
php_core_globals,   core_globals)
STD_PHP_INI_BOOLEAN(safe_mode_gid,0,
PHP_INI_SYSTEM, OnUpdateBool,   safe_mode_gid,  
php_core_globals,   core_globals)
-   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(short_open_tag,   DEFAULT_SHORT_OPEN_TAG, 
PHP_INI_ALL,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,   1,
PHP_INI_ALL,OnUpdateBool,   y2k_compliance, 
php_core_globals,   core_globals)



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



[PHP-CVS] cvs: php-src(PHP_5_3) /main main.c

2008-02-04 Thread Jani Taskinen
janiMon Feb  4 20:39:21 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/main   main.c 
  Log:
  MFH: allow using these constants in php.ini (f.e. PHP_SAPI..)
  
http://cvs.php.net/viewvc.cgi/php-src/main/main.c?r1=1.640.2.23.2.57.2.7r2=1.640.2.23.2.57.2.8diff_format=u
Index: php-src/main/main.c
diff -u php-src/main/main.c:1.640.2.23.2.57.2.7 
php-src/main/main.c:1.640.2.23.2.57.2.8
--- php-src/main/main.c:1.640.2.23.2.57.2.7 Tue Jan 22 09:27:48 2008
+++ php-src/main/main.c Mon Feb  4 20:39:21 2008
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: main.c,v 1.640.2.23.2.57.2.7 2008/01/22 09:27:48 dmitry Exp $ */
+/* $Id: main.c,v 1.640.2.23.2.57.2.8 2008/02/04 20:39:21 jani Exp $ */
 
 /* {{{ includes
  */
@@ -1741,6 +1741,30 @@
 
le_index_ptr = zend_register_list_destructors_ex(NULL, NULL, index 
pointer, 0);
 
+   /* Register constants */
+   REGISTER_MAIN_STRINGL_CONSTANT(PHP_VERSION, PHP_VERSION, 
sizeof(PHP_VERSION)-1, CONST_PERSISTENT | CONST_CS);
+   REGISTER_MAIN_STRINGL_CONSTANT(PHP_OS, php_os, strlen(php_os), 
CONST_PERSISTENT | CONST_CS);
+   REGISTER_MAIN_STRINGL_CONSTANT(PHP_SAPI, sapi_module.name, 
strlen(sapi_module.name), CONST_PERSISTENT | CONST_CS);
+   REGISTER_MAIN_STRINGL_CONSTANT(DEFAULT_INCLUDE_PATH, 
PHP_INCLUDE_PATH, sizeof(PHP_INCLUDE_PATH)-1, CONST_PERSISTENT | CONST_CS);
+   REGISTER_MAIN_STRINGL_CONSTANT(PEAR_INSTALL_DIR, PEAR_INSTALLDIR, 
sizeof(PEAR_INSTALLDIR)-1, CONST_PERSISTENT | CONST_CS);
+   REGISTER_MAIN_STRINGL_CONSTANT(PEAR_EXTENSION_DIR, PHP_EXTENSION_DIR, 
sizeof(PHP_EXTENSION_DIR)-1, CONST_PERSISTENT | CONST_CS);
+   REGISTER_MAIN_STRINGL_CONSTANT(PHP_EXTENSION_DIR, PHP_EXTENSION_DIR, 
sizeof(PHP_EXTENSION_DIR)-1, CONST_PERSISTENT | CONST_CS);
+   REGISTER_MAIN_STRINGL_CONSTANT(PHP_PREFIX, PHP_PREFIX, 
sizeof(PHP_PREFIX)-1, CONST_PERSISTENT | CONST_CS);
+   REGISTER_MAIN_STRINGL_CONSTANT(PHP_BINDIR, PHP_BINDIR, 
sizeof(PHP_BINDIR)-1, CONST_PERSISTENT | CONST_CS);
+   REGISTER_MAIN_STRINGL_CONSTANT(PHP_LIBDIR, PHP_LIBDIR, 
sizeof(PHP_LIBDIR)-1, CONST_PERSISTENT | CONST_CS);
+   REGISTER_MAIN_STRINGL_CONSTANT(PHP_DATADIR, PHP_DATADIR, 
sizeof(PHP_DATADIR)-1, CONST_PERSISTENT | CONST_CS);
+   REGISTER_MAIN_STRINGL_CONSTANT(PHP_SYSCONFDIR, PHP_SYSCONFDIR, 
sizeof(PHP_SYSCONFDIR)-1, CONST_PERSISTENT | CONST_CS);
+   REGISTER_MAIN_STRINGL_CONSTANT(PHP_LOCALSTATEDIR, PHP_LOCALSTATEDIR, 
sizeof(PHP_LOCALSTATEDIR)-1, CONST_PERSISTENT | CONST_CS);
+   REGISTER_MAIN_STRINGL_CONSTANT(PHP_CONFIG_FILE_PATH, 
PHP_CONFIG_FILE_PATH, strlen(PHP_CONFIG_FILE_PATH), CONST_PERSISTENT | 
CONST_CS);
+   REGISTER_MAIN_STRINGL_CONSTANT(PHP_CONFIG_FILE_SCAN_DIR, 
PHP_CONFIG_FILE_SCAN_DIR, sizeof(PHP_CONFIG_FILE_SCAN_DIR)-1, CONST_PERSISTENT 
| CONST_CS);
+   REGISTER_MAIN_STRINGL_CONSTANT(PHP_SHLIB_SUFFIX, PHP_SHLIB_SUFFIX, 
sizeof(PHP_SHLIB_SUFFIX)-1, CONST_PERSISTENT | CONST_CS);
+   REGISTER_MAIN_STRINGL_CONSTANT(PHP_EOL, PHP_EOL, sizeof(PHP_EOL)-1, 
CONST_PERSISTENT | CONST_CS);
+   REGISTER_MAIN_LONG_CONSTANT(PHP_INT_MAX, LONG_MAX, CONST_PERSISTENT | 
CONST_CS);
+   REGISTER_MAIN_LONG_CONSTANT(PHP_INT_SIZE, sizeof(long), 
CONST_PERSISTENT | CONST_CS);
+
+   php_output_register_constants(TSRMLS_C);
+   php_rfc1867_register_constants(TSRMLS_C);
+
/* this will read in php.ini, set up the configuration parameters,
   load zend extensions and register php function extensions
   to be loaded later */
@@ -1781,28 +1805,6 @@
zend_set_utility_values(zuv);
php_startup_sapi_content_types(TSRMLS_C);
 
-   REGISTER_MAIN_STRINGL_CONSTANT(PHP_VERSION, PHP_VERSION, 
sizeof(PHP_VERSION)-1, CONST_PERSISTENT | CONST_CS);
-   REGISTER_MAIN_STRINGL_CONSTANT(PHP_OS, php_os, strlen(php_os), 
CONST_PERSISTENT | CONST_CS);
-   REGISTER_MAIN_STRINGL_CONSTANT(PHP_SAPI, sapi_module.name, 
strlen(sapi_module.name), CONST_PERSISTENT | CONST_CS);
-   REGISTER_MAIN_STRINGL_CONSTANT(DEFAULT_INCLUDE_PATH, 
PHP_INCLUDE_PATH, sizeof(PHP_INCLUDE_PATH)-1, CONST_PERSISTENT | CONST_CS);
-   REGISTER_MAIN_STRINGL_CONSTANT(PEAR_INSTALL_DIR, PEAR_INSTALLDIR, 
sizeof(PEAR_INSTALLDIR)-1, CONST_PERSISTENT | CONST_CS);
-   REGISTER_MAIN_STRINGL_CONSTANT(PEAR_EXTENSION_DIR, PHP_EXTENSION_DIR, 
sizeof(PHP_EXTENSION_DIR)-1, CONST_PERSISTENT | CONST_CS);
-   REGISTER_MAIN_STRINGL_CONSTANT(PHP_EXTENSION_DIR, PHP_EXTENSION_DIR, 
sizeof(PHP_EXTENSION_DIR)-1, CONST_PERSISTENT | CONST_CS);
-   REGISTER_MAIN_STRINGL_CONSTANT(PHP_PREFIX, PHP_PREFIX, 
sizeof(PHP_PREFIX)-1, CONST_PERSISTENT | CONST_CS);
-   REGISTER_MAIN_STRINGL_CONSTANT(PHP_BINDIR, PHP_BINDIR, 
sizeof(PHP_BINDIR)-1, CONST_PERSISTENT | CONST_CS);
-   REGISTER_MAIN_STRINGL_CONSTANT(PHP_LIBDIR, PHP_LIBDIR, 
sizeof(PHP_LIBDIR)-1, CONST_PERSISTENT | CONST_CS);
-   

[PHP-CVS] cvs: php-src(PHP_5_3) /main main.c

2007-12-28 Thread Hannes Magnusson
bjori   Sat Dec 29 02:21:57 2007 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/main   main.c 
  Log:
  MFH: Update the class method documentation links
  
  
http://cvs.php.net/viewvc.cgi/php-src/main/main.c?r1=1.640.2.23.2.57.2.4r2=1.640.2.23.2.57.2.5diff_format=u
Index: php-src/main/main.c
diff -u php-src/main/main.c:1.640.2.23.2.57.2.4 
php-src/main/main.c:1.640.2.23.2.57.2.5
--- php-src/main/main.c:1.640.2.23.2.57.2.4 Thu Nov 22 13:27:13 2007
+++ php-src/main/main.c Sat Dec 29 02:21:57 2007
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: main.c,v 1.640.2.23.2.57.2.4 2007/11/22 13:27:13 dmitry Exp $ */
+/* $Id: main.c,v 1.640.2.23.2.57.2.5 2007/12/29 02:21:57 bjori Exp $ */
 
 /* {{{ includes
  */
@@ -58,6 +58,7 @@
 #include php_main.h
 #include fopen_wrappers.h
 #include ext/standard/php_standard.h
+#include ext/standard/php_string.h
 #include php_variables.h
 #include ext/standard/credits.h
 #ifdef PHP_WIN32
@@ -650,15 +651,16 @@
 
/* no docref given but function is known (the default) */
if (!docref  is_function) {
+   int doclen;
if (space[0] == '\0') {
-   spprintf(docref_buf, 0, function.%s, function);
+   doclen = spprintf(docref_buf, 0, function.%s, 
function);
} else {
-   spprintf(docref_buf, 0, function.%s-%s, class_name, 
function);
+   doclen = spprintf(docref_buf, 0, %s.%s, class_name, 
function);
}
while((p = strchr(docref_buf, '_')) != NULL) {
*p = '-';
}
-   docref = docref_buf;
+   docref = php_strtolower(docref_buf, doclen);
}
 
/* we have a docref for a function AND

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



[PHP-CVS] cvs: php-src(PHP_5_3) /main main.c

2007-10-18 Thread Dmitry Stogov
dmitry  Thu Oct 18 13:11:46 2007 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/main   main.c 
  Log:
  Fixed bug #42722 (display_errors setting ignored for E_PARSE and HTTP 500 
page)
  
  
http://cvs.php.net/viewvc.cgi/php-src/main/main.c?r1=1.640.2.23.2.57.2.2r2=1.640.2.23.2.57.2.3diff_format=u
Index: php-src/main/main.c
diff -u php-src/main/main.c:1.640.2.23.2.57.2.2 
php-src/main/main.c:1.640.2.23.2.57.2.3
--- php-src/main/main.c:1.640.2.23.2.57.2.2 Mon Oct  1 14:51:11 2007
+++ php-src/main/main.c Thu Oct 18 13:11:46 2007
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: main.c,v 1.640.2.23.2.57.2.2 2007/10/01 14:51:11 iliaa Exp $ */
+/* $Id: main.c,v 1.640.2.23.2.57.2.3 2007/10/18 13:11:46 dmitry Exp $ */
 
 /* {{{ includes
  */
@@ -976,7 +976,8 @@
case E_USER_ERROR:
EG(exit_status) = 255;
if (module_initialized) {
-   if (!SG(headers_sent) 
+   if (!PG(display_errors) 
+   !SG(headers_sent) 
SG(sapi_headers).http_response_code == 
200
) {
sapi_header_line ctr = {0};

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



[PHP-CVS] cvs: php-src(PHP_5_3) /main main.c ZendEngine2 zend_ini.c

2007-10-01 Thread Ilia Alshanetsky
iliaa   Mon Oct  1 14:51:11 2007 UTC

  Modified files:  (Branch: PHP_5_3)
/ZendEngine2zend_ini.c 
/php-src/main   main.c 
  Log:
  Refactor code to make fixes for coverity issues #385 and #386 a bit more
  obvious
  
  
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_ini.c?r1=1.39.2.2.2.18.2.9r2=1.39.2.2.2.18.2.10diff_format=u
Index: ZendEngine2/zend_ini.c
diff -u ZendEngine2/zend_ini.c:1.39.2.2.2.18.2.9 
ZendEngine2/zend_ini.c:1.39.2.2.2.18.2.10
--- ZendEngine2/zend_ini.c:1.39.2.2.2.18.2.9Thu Sep 27 18:00:37 2007
+++ ZendEngine2/zend_ini.c  Mon Oct  1 14:51:11 2007
@@ -16,7 +16,7 @@
+--+
 */
 
-/* $Id: zend_ini.c,v 1.39.2.2.2.18.2.9 2007/09/27 18:00:37 dmitry Exp $ */
+/* $Id: zend_ini.c,v 1.39.2.2.2.18.2.10 2007/10/01 14:51:11 iliaa Exp $ */
 
 #include zend.h
 #include zend_qsort.h
@@ -437,14 +437,16 @@
tmp_value_len = 0;
}
 
-   if (tmp_value_len == 4  strcasecmp(tmp_value, true) == 0) {
-   value = 1;
-   } else if (tmp_value_len == 3  strcasecmp(tmp_value, yes) == 0) {
-   value = 1;
-   } else if (tmp_value_len == 2  strcasecmp(tmp_value, on) == 0) {
-   value = 1;
-   } else if (tmp_value) {
-   value = atoi(tmp_value);
+   if (tmp_value) {
+   if (tmp_value_len == 4  strcasecmp(tmp_value, true) == 0) {
+   value = 1;
+   } else if (tmp_value_len == 3  strcasecmp(tmp_value, yes) 
== 0) {
+   value = 1;
+   } else if (tmp_value_len == 2  strcasecmp(tmp_value, on) == 
0) {
+   value = 1;
+   } else (tmp_value) {
+   value = atoi(tmp_value);
+   }
} else {
value = 0;
}
http://cvs.php.net/viewvc.cgi/php-src/main/main.c?r1=1.640.2.23.2.57.2.1r2=1.640.2.23.2.57.2.2diff_format=u
Index: php-src/main/main.c
diff -u php-src/main/main.c:1.640.2.23.2.57.2.1 
php-src/main/main.c:1.640.2.23.2.57.2.2
--- php-src/main/main.c:1.640.2.23.2.57.2.1 Fri Sep 28 02:05:09 2007
+++ php-src/main/main.c Mon Oct  1 14:51:11 2007
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: main.c,v 1.640.2.23.2.57.2.1 2007/09/28 02:05:09 jani Exp $ */
+/* $Id: main.c,v 1.640.2.23.2.57.2.2 2007/10/01 14:51:11 iliaa Exp $ */
 
 /* {{{ includes
  */
@@ -218,7 +218,11 @@
 static int php_get_display_errors_mode(char *value, int value_length)
 {
int mode;
-   
+
+   if (!value) {
+   return PHP_DISPLAY_ERRORS_STDOUT;
+   }
+
if (value_length == 2  !strcasecmp(on, value)) {
mode = PHP_DISPLAY_ERRORS_STDOUT;
} else if (value_length == 3  !strcasecmp(yes, value)) {
@@ -229,14 +233,13 @@
mode = PHP_DISPLAY_ERRORS_STDERR;
} else if (value_length == 6  !strcasecmp(value, stdout)) {
mode = PHP_DISPLAY_ERRORS_STDOUT;
-   } else if (value) {
+   } else {
mode = atoi(value);
if (mode  mode != PHP_DISPLAY_ERRORS_STDOUT  mode != 
PHP_DISPLAY_ERRORS_STDERR) {
mode = PHP_DISPLAY_ERRORS_STDOUT;
}
-   } else {
-   mode = PHP_DISPLAY_ERRORS_STDOUT;
}
+
return mode;
 }
 /* }}} */

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