[PHP-CVS] cvs: php-src /ext/standard info.c

2009-01-04 Thread Antony Dovgal
tony2001Sun Jan  4 15:19:49 2009 UTC

  Modified files:  
/php-src/ext/standard   info.c 
  Log:
  capitalize
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/info.c?r1=1.301r2=1.302diff_format=u
Index: php-src/ext/standard/info.c
diff -u php-src/ext/standard/info.c:1.301 php-src/ext/standard/info.c:1.302
--- php-src/ext/standard/info.c:1.301   Wed Dec 31 13:48:59 2008
+++ php-src/ext/standard/info.c Sun Jan  4 15:19:49 2009
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: info.c,v 1.301 2008/12/31 13:48:59 helly Exp $ */
+/* $Id: info.c,v 1.302 2009/01/04 15:19:49 tony2001 Exp $ */
 
 #include php.h
 #include php_ini.h
@@ -771,7 +771,7 @@
php_info_print_table_row(2, Configuration File (php.ini) 
Path, PHP_CONFIG_FILE_PATH);
php_info_print_table_row(2, Loaded Configuration File, 
php_ini_opened_path ? php_ini_opened_path : (none));
php_info_print_table_row(2, Scan this dir for additional .ini 
files, php_ini_scanned_path ? php_ini_scanned_path : (none));
-   php_info_print_table_row(2, additional .ini files parsed, 
php_ini_scanned_files ? php_ini_scanned_files : (none));
+   php_info_print_table_row(2, Additional .ini files parsed, 
php_ini_scanned_files ? php_ini_scanned_files : (none));
 
snprintf(temp_api, sizeof(temp_api), %d, PHP_API_VERSION);
php_info_print_table_row(2, PHP API, temp_api);



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



[PHP-CVS] cvs: php-src /ext/standard info.c

2008-12-31 Thread Marcus Boerger
helly   Wed Dec 31 12:52:28 2008 UTC

  Modified files:  
/php-src/ext/standard   info.c 
  Log:
  - Do not show core ini entries twice
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/info.c?r1=1.299r2=1.300diff_format=u
Index: php-src/ext/standard/info.c
diff -u php-src/ext/standard/info.c:1.299 php-src/ext/standard/info.c:1.300
--- php-src/ext/standard/info.c:1.299   Wed Dec 31 11:12:36 2008
+++ php-src/ext/standard/info.c Wed Dec 31 12:52:28 2008
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: info.c,v 1.299 2008/12/31 11:12:36 sebastian Exp $ */
+/* $Id: info.c,v 1.300 2008/12/31 12:52:28 helly Exp $ */
 
 #include php.h
 #include php_ini.h
@@ -849,8 +849,10 @@
} else {
SECTION(Configuration);
}   
-   SECTION(PHP Core);
-   display_ini_entries(NULL);
+   if (!(flag  PHP_INFO_MODULES)) {
+   SECTION(PHP Core);
+   display_ini_entries(NULL);
+   }
}
 
if (flag  PHP_INFO_MODULES) {



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



[PHP-CVS] cvs: php-src /ext/standard info.c

2008-12-31 Thread Marcus Boerger
helly   Wed Dec 31 13:48:59 2008 UTC

  Modified files:  
/php-src/ext/standard   info.c 
  Log:
  - Fix info output
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/info.c?r1=1.300r2=1.301diff_format=u
Index: php-src/ext/standard/info.c
diff -u php-src/ext/standard/info.c:1.300 php-src/ext/standard/info.c:1.301
--- php-src/ext/standard/info.c:1.300   Wed Dec 31 12:52:28 2008
+++ php-src/ext/standard/info.c Wed Dec 31 13:48:59 2008
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: info.c,v 1.300 2008/12/31 12:52:28 helly Exp $ */
+/* $Id: info.c,v 1.301 2008/12/31 13:48:59 helly Exp $ */
 
 #include php.h
 #include php_ini.h
@@ -867,7 +867,7 @@
 
SECTION(Additional Modules);
php_info_print_table_start();
-   php_info_print_table_header(2, Module Name);
+   php_info_print_table_header(1, Module Name);
zend_hash_apply(sorted_registry, (apply_func_t) 
_display_module_info_def TSRMLS_CC);
php_info_print_table_end();
 



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



[PHP-CVS] cvs: php-src /ext/standard info.c

2008-12-30 Thread Felipe Pena
felipe  Tue Dec 30 12:48:00 2008 UTC

  Modified files:  
/php-src/ext/standard   info.c 
  Log:
  - Added missing check for void param. (patch by Kalle)
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/info.c?r1=1.296r2=1.297diff_format=u
Index: php-src/ext/standard/info.c
diff -u php-src/ext/standard/info.c:1.296 php-src/ext/standard/info.c:1.297
--- php-src/ext/standard/info.c:1.296   Fri Dec 12 10:33:05 2008
+++ php-src/ext/standard/info.c Tue Dec 30 12:48:00 2008
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: info.c,v 1.296 2008/12/12 10:33:05 pajoye Exp $ */
+/* $Id: info.c,v 1.297 2008/12/30 12:48:00 felipe Exp $ */
 
 #include php.h
 #include php_ini.h
@@ -1323,6 +1323,10 @@
Return comma-separated string of .ini files parsed from the additional ini 
dir */
 PHP_FUNCTION(php_ini_scanned_files)
 {
+   if (zend_parse_parameters_none() == FAILURE) {
+   return;
+   }
+   
if (strlen(PHP_CONFIG_FILE_SCAN_DIR)  php_ini_scanned_files) {
RETURN_RT_STRING(php_ini_scanned_files, ZSTR_DUPLICATE);
} else {
@@ -1335,6 +1339,10 @@
Return the actual loaded ini filename */
 PHP_FUNCTION(php_ini_loaded_file)
 {
+   if (zend_parse_parameters_none() == FAILURE) {
+   return;
+   }
+   
if (php_ini_opened_path) {
RETURN_STRING(php_ini_opened_path, 1);
} else {



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



[PHP-CVS] cvs: php-src /ext/standard info.c

2008-12-30 Thread Marcus Boerger
helly   Tue Dec 30 19:10:22 2008 UTC

  Modified files:  
/php-src/ext/standard   info.c 
  Log:
  - Show version and ini entries as default module info.
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/info.c?r1=1.297r2=1.298diff_format=u
Index: php-src/ext/standard/info.c
diff -u php-src/ext/standard/info.c:1.297 php-src/ext/standard/info.c:1.298
--- php-src/ext/standard/info.c:1.297   Tue Dec 30 12:48:00 2008
+++ php-src/ext/standard/info.c Tue Dec 30 19:10:22 2008
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: info.c,v 1.297 2008/12/30 12:48:00 felipe Exp $ */
+/* $Id: info.c,v 1.298 2008/12/30 19:10:22 helly Exp $ */
 
 #include php.h
 #include php_ini.h
@@ -194,26 +194,29 @@
 }
 /* }}} */
 
-PHPAPI void php_info_print_module(zend_module_entry *module TSRMLS_DC) /* {{{ 
*/
+PHPAPI void php_info_print_module(zend_module_entry *zend_module TSRMLS_DC) /* 
{{{ */
 {
-   if (module-info_func) {
+   if (zend_module-info_func || zend_module-version) {
if (!sapi_module.phpinfo_as_text) {
-   php_info_printf(h2a 
name=\module_%s\%s/a/h2\n, module-name, module-name);
+   php_info_printf(h2a 
name=\module_%s\%s/a/h2\n, zend_module-name, zend_module-name);
} else {
php_info_print_table_start();
-   php_info_print_table_header(1, module-name);
+   php_info_print_table_header(1, zend_module-name);
php_info_print_table_end();
}
-   module-info_func(module TSRMLS_CC);
+   if (zend_module-info_func) {
+   zend_module-info_func(zend_module TSRMLS_CC);
+   } else {
+   php_info_print_table_start();
+   php_info_print_table_row(2, Version, 
zend_module-version);
+   php_info_print_table_end();
+   DISPLAY_INI_ENTRIES();
+   }
} else {
if (!sapi_module.phpinfo_as_text) {
-   php_info_printf(tr);
-   php_info_printf(td);
-   php_info_printf(%s, module-name);
-   php_info_printf(/td/tr\n);
+   php_info_printf(trtd%s/td/tr\n, 
zend_module-name);
} else {
-   php_info_printf(%s, module-name);
-   php_info_printf(\n);
+   php_info_printf(%s\n, zend_module-name);
}   
}
 }
@@ -221,7 +224,7 @@
 
 static int _display_module_info_func(zend_module_entry *module TSRMLS_DC) /* 
{{{ */
 {
-   if (module-info_func) {
+   if (module-info_func || module-version) {
php_info_print_module(module TSRMLS_CC);
}
return ZEND_HASH_APPLY_KEEP;
@@ -230,7 +233,7 @@
 
 static int _display_module_info_def(zend_module_entry *module TSRMLS_DC) /* 
{{{ */
 {
-   if (!module-info_func) {
+   if (!module-info_func  !module-version) {
php_info_print_module(module TSRMLS_CC);
}
return ZEND_HASH_APPLY_KEEP;
@@ -862,7 +865,7 @@
 
SECTION(Additional Modules);
php_info_print_table_start();
-   php_info_print_table_header(1, Module Name);
+   php_info_print_table_header(2, Module Name);
zend_hash_apply(sorted_registry, (apply_func_t) 
_display_module_info_def TSRMLS_CC);
php_info_print_table_end();
 



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



[PHP-CVS] cvs: php-src /ext/standard info.c winver.h

2008-12-12 Thread Pierre-Alain Joye
pajoye  Fri Dec 12 10:33:05 2008 UTC

  Modified files:  
/php-src/ext/standard   info.c winver.h 
  Log:
  - late MFB (sry): fix VC6 build
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/info.c?r1=1.295r2=1.296diff_format=u
Index: php-src/ext/standard/info.c
diff -u php-src/ext/standard/info.c:1.295 php-src/ext/standard/info.c:1.296
--- php-src/ext/standard/info.c:1.295   Mon Dec  8 07:33:41 2008
+++ php-src/ext/standard/info.c Fri Dec 12 10:33:05 2008
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: info.c,v 1.295 2008/12/08 07:33:41 stas Exp $ */
+/* $Id: info.c,v 1.296 2008/12/12 10:33:05 pajoye Exp $ */
 
 #include php.h
 #include php_ini.h
@@ -38,6 +38,17 @@
 #include sys/utsname.h
 #endif
 
+
+#ifdef PHP_WIN32
+typedef void (WINAPI *PGNSI)(LPSYSTEM_INFO);
+typedef BOOL (WINAPI *PGPI)(DWORD, DWORD, DWORD, DWORD, PDWORD);
+# include winver.h
+
+# if _MSC_VER  1300
+#  define OSVERSIONINFOEX php_win_OSVERSIONINFOEX
+# endif
+#endif
+
 #if HAVE_MBSTRING
 #include ext/mbstring/mbstring.h
 ZEND_EXTERN_MODULE_GLOBALS(mbstring)
@@ -341,14 +352,6 @@
 
 #ifdef PHP_WIN32
 /* {{{  */
-typedef void (WINAPI *PGNSI)(LPSYSTEM_INFO);
-typedef BOOL (WINAPI *PGPI)(DWORD, DWORD, DWORD, DWORD, PDWORD);
-
-#include winver.h
-
-#if _MSC_VER  1300
-#define OSVERSIONINFOEX php_win_OSVERSIONINFOEX
-#endif
 
 char* php_get_windows_name()
 {
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/winver.h?r1=1.2r2=1.3diff_format=u
Index: php-src/ext/standard/winver.h
diff -u php-src/ext/standard/winver.h:1.2 php-src/ext/standard/winver.h:1.3
--- php-src/ext/standard/winver.h:1.2   Mon Dec  8 07:33:41 2008
+++ php-src/ext/standard/winver.h   Fri Dec 12 10:33:05 2008
@@ -57,8 +57,14 @@
 #define VER_SUITE_BLADE 0x0400
 #define VER_SUITE_EMBEDDED_RESTRICTED   0x0800
 #define VER_SUITE_SECURITY_APPLIANCE0x1000
-#define VER_SUITE_STORAGE_SERVER0x2000
-#define VER_SUITE_COMPUTE_SERVER0x4000
+#endif
+
+#ifndef VER_SUITE_STORAGE_SERVER
+# define VER_SUITE_STORAGE_SERVER0x2000
+#endif
+
+#ifndef VER_SUITE_COMPUTE_SERVER
+# define VER_SUITE_COMPUTE_SERVER0x4000
 #endif
 
 #ifndef PROCESSOR_ARCHITECTURE_AMD64



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



[PHP-CVS] cvs: php-src /ext/standard info.c winver.h

2008-12-07 Thread Stanislav Malyshev
stasMon Dec  8 07:33:41 2008 UTC

  Modified files:  
/php-src/ext/standard   winver.h info.c 
  Log:
  improve windows version detection
  
  http://cvs.php.net/viewvc.cgi/php-src/ext/standard/winver.h?r1=1.1r2=1.2diff_format=u
Index: php-src/ext/standard/winver.h
diff -u /dev/null php-src/ext/standard/winver.h:1.2
--- /dev/null   Mon Dec  8 07:33:41 2008
+++ php-src/ext/standard/winver.h   Mon Dec  8 07:33:41 2008
@@ -0,0 +1,82 @@
+#ifndef _PHP_WINVER_H
+#define _PHP_WINVER_H
+
+#ifndef SM_SERVERR2
+#define SM_SERVERR2 89
+#endif
+#ifndef VER_SUITE_WH_SERVER
+#define VER_SUITE_WH_SERVER 0x8000
+#endif
+
+#ifndef PRODUCT_ULTIMATE
+#define PRODUCT_UNDEFINED   0x
+#define PRODUCT_ULTIMATE0x0001
+#define PRODUCT_HOME_BASIC  0x0002
+#define PRODUCT_HOME_PREMIUM0x0003
+#define PRODUCT_ENTERPRISE  0x0004
+#define PRODUCT_HOME_BASIC_N0x0005
+#define PRODUCT_BUSINESS0x0006
+#define PRODUCT_STANDARD_SERVER 0x0007
+#define PRODUCT_DATACENTER_SERVER   0x0008
+#define PRODUCT_SMALLBUSINESS_SERVER0x0009
+#define PRODUCT_ENTERPRISE_SERVER   0x000A
+#define PRODUCT_STARTER 0x000B
+#define PRODUCT_DATACENTER_SERVER_CORE  0x000C
+#define PRODUCT_STANDARD_SERVER_CORE0x000D
+#define PRODUCT_ENTERPRISE_SERVER_CORE  0x000E
+#define PRODUCT_ENTERPRISE_SERVER_IA64  0x000F
+#define PRODUCT_BUSINESS_N  0x0010
+#define PRODUCT_WEB_SERVER  0x0011
+#define PRODUCT_CLUSTER_SERVER  0x0012
+#define PRODUCT_HOME_SERVER 0x0013
+#define PRODUCT_STORAGE_EXPRESS_SERVER  0x0014
+#define PRODUCT_STORAGE_STANDARD_SERVER 0x0015
+#define PRODUCT_STORAGE_WORKGROUP_SERVER0x0016
+#define PRODUCT_STORAGE_ENTERPRISE_SERVER   0x0017
+#define PRODUCT_SERVER_FOR_SMALLBUSINESS0x0018
+#define PRODUCT_SMALLBUSINESS_SERVER_PREMIUM0x0019
+#endif
+
+#ifndef VER_NT_WORKSTATION
+#define VER_NT_WORKSTATION  0x001
+#define VER_NT_DOMAIN_CONTROLLER0x002
+#define VER_NT_SERVER   0x003
+#endif
+
+#ifndef VER_SUITE_SMALLBUSINESS
+#define VER_SUITE_SMALLBUSINESS 0x0001
+#define VER_SUITE_ENTERPRISE0x0002
+#define VER_SUITE_BACKOFFICE0x0004
+#define VER_SUITE_COMMUNICATIONS0x0008
+#define VER_SUITE_TERMINAL  0x0010
+#define VER_SUITE_SMALLBUSINESS_RESTRICTED  0x0020
+#define VER_SUITE_EMBEDDEDNT0x0040
+#define VER_SUITE_DATACENTER0x0080
+#define VER_SUITE_SINGLEUSERTS  0x0100
+#define VER_SUITE_PERSONAL  0x0200
+#define VER_SUITE_BLADE 0x0400
+#define VER_SUITE_EMBEDDED_RESTRICTED   0x0800
+#define VER_SUITE_SECURITY_APPLIANCE0x1000
+#define VER_SUITE_STORAGE_SERVER0x2000
+#define VER_SUITE_COMPUTE_SERVER0x4000
+#endif
+
+#ifndef PROCESSOR_ARCHITECTURE_AMD64
+#define PROCESSOR_ARCHITECTURE_AMD649
+#endif
+
+typedef struct _php_win_OSVERSIONINFOEXA {
+DWORD dwOSVersionInfoSize;
+DWORD dwMajorVersion;
+DWORD dwMinorVersion;
+DWORD dwBuildNumber;
+DWORD dwPlatformId;
+CHAR  szCSDVersion[128]; 
+WORD  wServicePackMajor;
+WORD  wServicePackMinor;
+WORD  wSuiteMask;
+BYTE  wProductType;
+BYTE  wReserved;
+} php_win_OSVERSIONINFOEX;
+
+#endif
\ No newline at end of file
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/info.c?r1=1.294r2=1.295diff_format=u
Index: php-src/ext/standard/info.c
diff -u php-src/ext/standard/info.c:1.294 php-src/ext/standard/info.c:1.295
--- php-src/ext/standard/info.c:1.294   Tue Oct 21 22:06:48 2008
+++ php-src/ext/standard/info.c Mon Dec  8 07:33:41 2008
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: info.c,v 1.294 2008/10/21 22:06:48 lbarnaud Exp $ */
+/* $Id: info.c,v 1.295 2008/12/08 07:33:41 stas Exp $ */
 
 #include php.h
 #include php_ini.h
@@ -339,6 +339,220 @@
 }
 /* }}} */
 
+#ifdef PHP_WIN32
+/* {{{  */
+typedef void (WINAPI *PGNSI)(LPSYSTEM_INFO);
+typedef BOOL (WINAPI *PGPI)(DWORD, DWORD, DWORD, DWORD, PDWORD);
+
+#include winver.h
+
+#if _MSC_VER  1300
+#define OSVERSIONINFOEX php_win_OSVERSIONINFOEX
+#endif
+
+char* php_get_windows_name()
+{
+   OSVERSIONINFOEX osvi;
+   SYSTEM_INFO si;
+   PGNSI pGNSI;
+   PGPI pGPI;
+   BOOL bOsVersionInfoEx;
+   DWORD dwType;
+   char *major = NULL, *sub = NULL, *retval;
+
+   ZeroMemory(si, sizeof(SYSTEM_INFO));
+   ZeroMemory(osvi, 

[PHP-CVS] cvs: php-src /ext/standard info.c streamsfuncs.c

2008-10-02 Thread Antony Dovgal
tony2001Thu Oct  2 08:46:04 2008 UTC

  Modified files:  
/php-src/ext/standard   info.c streamsfuncs.c 
  Log:
  use HashPosition to prevent race condition in multithreaded env
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/info.c?r1=1.292r2=1.293diff_format=u
Index: php-src/ext/standard/info.c
diff -u php-src/ext/standard/info.c:1.292 php-src/ext/standard/info.c:1.293
--- php-src/ext/standard/info.c:1.292   Wed Aug 13 00:49:59 2008
+++ php-src/ext/standard/info.c Thu Oct  2 08:46:04 2008
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: info.c,v 1.292 2008/08/13 00:49:59 jani Exp $ */
+/* $Id: info.c,v 1.293 2008/10/02 08:46:04 tony2001 Exp $ */
 
 #include php.h
 #include php_ini.h
@@ -139,14 +139,16 @@

if (ht) {
if (zend_hash_num_elements(ht)) {
+   HashPosition pos;
+
if (!sapi_module.phpinfo_as_text) {
php_info_printf(tr class=\v\tdRegistered 
%s/tdtd, name);
} else {
php_info_printf(\nRegistered %s = , name);
}

-   zend_hash_internal_pointer_reset(ht);
-   type = zend_hash_get_current_key_ex(ht, key, len, 
NULL, 0, NULL);
+   zend_hash_internal_pointer_reset_ex(ht, pos);
+   type = zend_hash_get_current_key_ex(ht, key, len, 
NULL, 0, pos);
do {
switch (type) {
case IS_STRING:
@@ -157,8 +159,8 @@
break;
}

-   zend_hash_move_forward(ht);
-   type = zend_hash_get_current_key_ex(ht, key, 
len, NULL, 0, NULL);
+   zend_hash_move_forward_ex(ht, pos);
+   type = zend_hash_get_current_key_ex(ht, key, 
len, NULL, 0, pos);

if (type == IS_STRING || type == IS_UNICODE) {
php_info_print(, );
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/streamsfuncs.c?r1=1.122r2=1.123diff_format=u
Index: php-src/ext/standard/streamsfuncs.c
diff -u php-src/ext/standard/streamsfuncs.c:1.122 
php-src/ext/standard/streamsfuncs.c:1.123
--- php-src/ext/standard/streamsfuncs.c:1.122   Mon Sep  8 01:30:55 2008
+++ php-src/ext/standard/streamsfuncs.c Thu Oct  2 08:46:04 2008
@@ -17,7 +17,7 @@
   +--+
 */
 
-/* $Id: streamsfuncs.c,v 1.122 2008/09/08 01:30:55 felipe Exp $ */
+/* $Id: streamsfuncs.c,v 1.123 2008/10/02 08:46:04 tony2001 Exp $ */
 
 #include php.h
 #include php_globals.h
@@ -573,13 +573,14 @@
}
 
if ((stream_xport_hash = php_stream_xport_get_hash())) {
+   HashPosition pos;
array_init(return_value);
-   zend_hash_internal_pointer_reset(stream_xport_hash);
+   zend_hash_internal_pointer_reset_ex(stream_xport_hash, pos);
while (zend_hash_get_current_key_ex(stream_xport_hash,
stream_xport, stream_xport_len,
-   num_key, 0, NULL) == 
HASH_KEY_IS_STRING) {
+   num_key, 0, pos) == 
HASH_KEY_IS_STRING) {
add_next_index_rt_stringl(return_value, stream_xport.s, 
stream_xport_len - 1, ZSTR_DUPLICATE);
-   zend_hash_move_forward(stream_xport_hash);
+   zend_hash_move_forward_ex(stream_xport_hash, pos);
}
} else {
RETURN_FALSE;
@@ -601,10 +602,11 @@
}
 
if ((url_stream_wrappers_hash = 
php_stream_get_url_stream_wrappers_hash())) {
+   HashPosition pos;
array_init(return_value);
-   for(zend_hash_internal_pointer_reset(url_stream_wrappers_hash);
-   (key_flags = 
zend_hash_get_current_key_ex(url_stream_wrappers_hash, stream_protocol, 
stream_protocol_len, num_key, 0, NULL)) != HASH_KEY_NON_EXISTANT;
-   zend_hash_move_forward(url_stream_wrappers_hash)) {
+   
for(zend_hash_internal_pointer_reset_ex(url_stream_wrappers_hash, pos);
+   (key_flags = 
zend_hash_get_current_key_ex(url_stream_wrappers_hash, stream_protocol, 
stream_protocol_len, num_key, 0, pos)) != HASH_KEY_NON_EXISTANT;
+   zend_hash_move_forward_ex(url_stream_wrappers_hash, 
pos)) {
if (key_flags == HASH_KEY_IS_STRING) {
add_next_index_rt_stringl(return_value, 
stream_protocol.s, 

[PHP-CVS] cvs: php-src /ext/standard info.c

2008-07-22 Thread Pierre-Alain Joye
pajoye  Tue Jul 22 10:04:53 2008 UTC

  Modified files:  
/php-src/ext/standard   info.c 
  Log:
  - fix build
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/info.c?r1=1.290r2=1.291diff_format=u
Index: php-src/ext/standard/info.c
diff -u php-src/ext/standard/info.c:1.290 php-src/ext/standard/info.c:1.291
--- php-src/ext/standard/info.c:1.290   Mon Jul 21 09:58:28 2008
+++ php-src/ext/standard/info.c Tue Jul 22 10:04:53 2008
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: info.c,v 1.290 2008/07/21 09:58:28 sfox Exp $ */
+/* $Id: info.c,v 1.291 2008/07/22 10:04:53 pajoye Exp $ */
 
 #include php.h
 #include php_ini.h
@@ -555,10 +555,6 @@
php_info_print_table_row(2, Configure Command, 
CONFIGURE_COMMAND );
 #endif
 
-#ifdef PHP_WIN32
-   php_info_print_table_row(2, Windows Compiler and Version, 
PHP_WINAPI_COMPILER );
-#endif
-
if (sapi_module.pretty_name) {
php_info_print_table_row(2, Server API, 
sapi_module.pretty_name );
}



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



[PHP-CVS] cvs: php-src /ext/standard info.c

2008-07-21 Thread Steph Fox
sfoxMon Jul 21 09:58:28 2008 UTC

  Modified files:  
/php-src/ext/standard   info.c 
  Log:
  MFB Make compiler/architecture info potentially cross-platform
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/info.c?r1=1.289r2=1.290diff_format=u
Index: php-src/ext/standard/info.c
diff -u php-src/ext/standard/info.c:1.289 php-src/ext/standard/info.c:1.290
--- php-src/ext/standard/info.c:1.289   Tue May 27 18:27:23 2008
+++ php-src/ext/standard/info.c Mon Jul 21 09:58:28 2008
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: info.c,v 1.289 2008/05/27 18:27:23 pajoye Exp $ */
+/* $Id: info.c,v 1.290 2008/07/21 09:58:28 sfox Exp $ */
 
 #include php.h
 #include php_ini.h
@@ -50,19 +50,6 @@
 
 #include unicode/uversion.h
 
-
-#if _MSC_VER = 1500
-#  define PHP_WINAPI_COMPILER MSVC9 (2008)
-#elif _MSC_VER = 1400
-#  define PHP_WINAPI_COMPILER MSVC8 (2005)
-#elif _MSC_VER = 1310
-#  define PHP_WINAPI_COMPILER MSVC7.1 (.NET 2003)
-#elif _MSC_VER = 1300
-#  define PHP_WINAPI_COMPILER MSVC7 (.NET 2002)
-#elif _MSC_VER  1300
-#  define PHP_WINAPI_COMPILER MSVC6 
-#endif
-
 #define SECTION(name)  if (!sapi_module.phpinfo_as_text) { \
php_info_print(h2 
name /h2\n); \
} else { \
@@ -558,6 +545,12 @@
php_info_print_table_start();
php_info_print_table_row(2, System, php_uname );
php_info_print_table_row(2, Build Date, __DATE__   __TIME__ 
);
+#ifdef COMPILER
+   php_info_print_table_row(2, Compiler, COMPILER);
+#endif
+#ifdef ARCHITECTURE
+   php_info_print_table_row(2, Architecture, ARCHITECTURE);
+#endif
 #ifdef CONFIGURE_COMMAND
php_info_print_table_row(2, Configure Command, 
CONFIGURE_COMMAND );
 #endif



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



[PHP-CVS] cvs: php-src /ext/standard info.c

2008-03-05 Thread Pierre-Alain Joye
pajoye  Wed Mar  5 21:18:26 2008 UTC

  Modified files:  
/php-src/ext/standard   info.c 
  Log:
  - MFB: #40013, php_uname() does not return nodename on Netware 
(Guenter Knauf)
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/info.c?r1=1.286r2=1.287diff_format=u
Index: php-src/ext/standard/info.c
diff -u php-src/ext/standard/info.c:1.286 php-src/ext/standard/info.c:1.287
--- php-src/ext/standard/info.c:1.286   Sun Mar  2 15:36:24 2008
+++ php-src/ext/standard/info.c Wed Mar  5 21:18:26 2008
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: info.c,v 1.286 2008/03/02 15:36:24 iliaa Exp $ */
+/* $Id: info.c,v 1.287 2008/03/05 21:18:26 pajoye Exp $ */
 
 #include php.h
 #include php_ini.h
@@ -425,6 +425,30 @@
if (uname((struct utsname *)buf) == -1) {
php_uname = PHP_UNAME;
} else {
+#ifdef NETWARE
+   if (mode == 's') {
+   php_uname = buf.sysname;
+   } else if (mode == 'r') {
+   snprintf(tmp_uname, sizeof(tmp_uname), %d.%d.%d, 
+buf.netware_major, buf.netware_minor, 
buf.netware_revision);
+   php_uname = tmp_uname;
+   } else if (mode == 'n') {
+   php_uname = buf.servername;
+   } else if (mode == 'v') {
+   snprintf(tmp_uname, sizeof(tmp_uname), libc-%d.%d.%d 
#%d,
+buf.libmajor, buf.libminor, 
buf.librevision, buf.libthreshold);
+   php_uname = tmp_uname;
+   } else if (mode == 'm') {
+   php_uname = buf.machine;
+   } else { /* assume mode == 'a' */
+   snprintf(tmp_uname, sizeof(tmp_uname), %s %s %d.%d.%d 
libc-%d.%d.%d #%d %s,
+buf.sysname, buf.servername,
+buf.netware_major, buf.netware_minor, 
buf.netware_revision,
+buf.libmajor, buf.libminor, 
buf.librevision, buf.libthreshold,
+buf.machine);
+   php_uname = tmp_uname;
+   }
+#else
if (mode == 's') {
php_uname = buf.sysname;
} else if (mode == 'r') {
@@ -441,6 +465,7 @@
 buf.machine);
php_uname = tmp_uname;
}
+#endif /* NETWARE */
}
 #else
php_uname = PHP_UNAME;



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



[PHP-CVS] cvs: php-src /ext/standard info.c

2008-03-02 Thread Ilia Alshanetsky
iliaa   Sun Mar  2 15:36:24 2008 UTC

  Modified files:  
/php-src/ext/standard   info.c 
  Log:
  
  MFB: Fixed bug #44306 (Better detection of MIPS processors on Windows)
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/info.c?r1=1.285r2=1.286diff_format=u
Index: php-src/ext/standard/info.c
diff -u php-src/ext/standard/info.c:1.285 php-src/ext/standard/info.c:1.286
--- php-src/ext/standard/info.c:1.285   Thu Feb 28 14:16:14 2008
+++ php-src/ext/standard/info.c Sun Mar  2 15:36:24 2008
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: info.c,v 1.285 2008/02/28 14:16:14 felipe Exp $ */
+/* $Id: info.c,v 1.286 2008/03/02 15:36:24 iliaa Exp $ */
 
 #include php.h
 #include php_ini.h
@@ -376,7 +376,7 @@
php_uname = tmp_uname;
break;
case PROCESSOR_ARCHITECTURE_MIPS :
-   php_uname = MIPS R4000;
+   snprintf(tmp_uname, sizeof(tmp_uname), MIPS 
R%d000, SysInfo.wProcessorLevel);
php_uname = tmp_uname;
break;
case PROCESSOR_ARCHITECTURE_ALPHA :

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



[PHP-CVS] cvs: php-src /ext/standard info.c

2007-04-02 Thread Jani Taskinen
sniper  Mon Apr  2 12:42:19 2007 UTC

  Modified files:  
/php-src/ext/standard   info.c 
  Log:
  MFB52:- Changed phpinfo() to make difference between set php.ini path and 
what was actually loaded.
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/info.c?r1=1.277r2=1.278diff_format=u
Index: php-src/ext/standard/info.c
diff -u php-src/ext/standard/info.c:1.277 php-src/ext/standard/info.c:1.278
--- php-src/ext/standard/info.c:1.277   Mon Feb 19 16:20:43 2007
+++ php-src/ext/standard/info.c Mon Apr  2 12:42:18 2007
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: info.c,v 1.277 2007/02/19 16:20:43 helly Exp $ */
+/* $Id: info.c,v 1.278 2007/04/02 12:42:18 sniper Exp $ */
 
 #include php.h
 #include php_ini.h
@@ -530,7 +530,8 @@
php_info_print_table_row(2, Virtual Directory Support, 
disabled );
 #endif
 
-   php_info_print_table_row(2, Configuration File (php.ini) 
Path, php_ini_opened_path?php_ini_opened_path:PHP_CONFIG_FILE_PATH);
+   php_info_print_table_row(2, Configuration File (php.ini) 
Path, PHP_CONFIG_FILE_PATH);
+   php_info_print_table_row(2, Loaded Configuration File, 
php_ini_opened_path ? php_ini_opened_path : (none));
 
if (strlen(PHP_CONFIG_FILE_SCAN_DIR)) {
php_info_print_table_row(2, Scan this dir for 
additional .ini files, PHP_CONFIG_FILE_SCAN_DIR);

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



[PHP-CVS] cvs: php-src /ext/standard info.c

2007-02-19 Thread Marcus Boerger
helly   Mon Feb 19 16:20:43 2007 UTC

  Modified files:  
/php-src/ext/standard   info.c 
  Log:
  - WS/CS
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/info.c?r1=1.276r2=1.277diff_format=u
Index: php-src/ext/standard/info.c
diff -u php-src/ext/standard/info.c:1.276 php-src/ext/standard/info.c:1.277
--- php-src/ext/standard/info.c:1.276   Tue Jan 23 19:58:45 2007
+++ php-src/ext/standard/info.c Mon Feb 19 16:20:43 2007
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: info.c,v 1.276 2007/01/23 19:58:45 helly Exp $ */
+/* $Id: info.c,v 1.277 2007/02/19 16:20:43 helly Exp $ */
 
 #include php.h
 #include php_ini.h
@@ -173,7 +173,7 @@
php_info_print_table_row(2, name, disabled);
}
 }
- 
+
 PHPAPI void php_info_print_module(zend_module_entry *module TSRMLS_DC) /* {{{ 
*/
 {
if (module-info_func) {
@@ -197,7 +197,7 @@
}   
}
 }
-/* }}}*/
+/* }}} */
 
 static int _display_module_info_func(zend_module_entry *module TSRMLS_DC) /* 
{{{ */
 {

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



[PHP-CVS] cvs: php-src /ext/standard info.c

2007-01-23 Thread Johannes Schl
johannesTue Jan 23 15:47:28 2007 UTC

  Modified files:  
/php-src/ext/standard   info.c 
  Log:
  - Use utf-8 instead of utf8 as encoding to fix phpinfo()
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/info.c?r1=1.274r2=1.275diff_format=u
Index: php-src/ext/standard/info.c
diff -u php-src/ext/standard/info.c:1.274 php-src/ext/standard/info.c:1.275
--- php-src/ext/standard/info.c:1.274   Mon Jan  1 09:29:32 2007
+++ php-src/ext/standard/info.c Tue Jan 23 15:47:28 2007
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: info.c,v 1.274 2007/01/01 09:29:32 sebastian Exp $ */
+/* $Id: info.c,v 1.275 2007/01/23 15:47:28 johannes Exp $ */
 
 #include php.h
 #include php_ini.h
@@ -67,7 +67,7 @@
char *new_str;
TSRMLS_FETCH();

-   new_str = php_escape_html_entities((char *) str, len, new_len, 0, 
ENT_QUOTES, utf8 TSRMLS_CC);
+   new_str = php_escape_html_entities((char *) str, len, new_len, 0, 
ENT_QUOTES, utf-8 TSRMLS_CC);
written = php_output_write_utf8(new_str, new_len TSRMLS_CC);
efree(new_str);
return written;

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



[PHP-CVS] cvs: php-src /ext/standard info.c info.h

2007-01-23 Thread Marcus Boerger
helly   Tue Jan 23 19:58:46 2007 UTC

  Modified files:  
/php-src/ext/standard   info.c info.h 
  Log:
  - Simplify
  - Add PHPAPI php_info_print_module()
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/info.c?r1=1.275r2=1.276diff_format=u
Index: php-src/ext/standard/info.c
diff -u php-src/ext/standard/info.c:1.275 php-src/ext/standard/info.c:1.276
--- php-src/ext/standard/info.c:1.275   Tue Jan 23 15:47:28 2007
+++ php-src/ext/standard/info.c Tue Jan 23 19:58:45 2007
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: info.c,v 1.275 2007/01/23 15:47:28 johannes Exp $ */
+/* $Id: info.c,v 1.276 2007/01/23 19:58:45 helly Exp $ */
 
 #include php.h
 #include php_ini.h
@@ -174,13 +174,9 @@
}
 }
  
-/* {{{ _display_module_info
-*/
-static int _display_module_info(zend_module_entry *module, void *arg TSRMLS_DC)
+PHPAPI void php_info_print_module(zend_module_entry *module TSRMLS_DC) /* {{{ 
*/
 {
-   int show_info_func = *((int *) arg);
-
-   if (show_info_func  module-info_func) {
+   if (module-info_func) {
if (!sapi_module.phpinfo_as_text) {
php_info_printf(h2a 
name=\module_%s\%s/a/h2\n, module-name, module-name);
} else {
@@ -189,7 +185,7 @@
php_info_print_table_end();
}
module-info_func(module TSRMLS_CC);
-   } else if (!show_info_func  !module-info_func) {
+   } else {
if (!sapi_module.phpinfo_as_text) {
php_info_printf(tr);
php_info_printf(td);
@@ -200,7 +196,24 @@
php_info_printf(\n);
}   
}
-   return 0;
+}
+/* }}}*/
+
+static int _display_module_info_func(zend_module_entry *module TSRMLS_DC) /* 
{{{ */
+{
+   if (module-info_func) {
+   php_info_print_module(module TSRMLS_CC);
+   }
+   return ZEND_HASH_APPLY_KEEP;
+}
+/* }}} */
+
+static int _display_module_info_def(zend_module_entry *module TSRMLS_DC) /* 
{{{ */
+{
+   if (!module-info_func) {
+   php_info_print_module(module TSRMLS_CC);
+   }
+   return ZEND_HASH_APPLY_KEEP;
 }
 /* }}} */
 
@@ -607,22 +620,19 @@
}
 
if (flag  PHP_INFO_MODULES) {
-   int show_info_func;
HashTable sorted_registry;
zend_module_entry tmp;
 
-   zend_hash_init(sorted_registry, 50, NULL, NULL, 1);
+   zend_hash_init(sorted_registry, 
zend_hash_num_elements(module_registry), NULL, NULL, 1);
zend_hash_copy(sorted_registry, module_registry, NULL, tmp, 
sizeof(zend_module_entry));
zend_hash_sort(sorted_registry, zend_qsort, module_name_cmp, 0 
TSRMLS_CC);
 
-   show_info_func = 1;
-   zend_hash_apply_with_argument(sorted_registry, 
(apply_func_arg_t) _display_module_info, show_info_func TSRMLS_CC);
+   zend_hash_apply(sorted_registry, (apply_func_t) 
_display_module_info_func TSRMLS_CC);
 
SECTION(Additional Modules);
php_info_print_table_start();
php_info_print_table_header(1, Module Name);
-   show_info_func = 0;
-   zend_hash_apply_with_argument(sorted_registry, 
(apply_func_arg_t) _display_module_info, show_info_func TSRMLS_CC);
+   zend_hash_apply(sorted_registry, (apply_func_t) 
_display_module_info_def TSRMLS_CC);
php_info_print_table_end();
 
zend_hash_destroy(sorted_registry);
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/info.h?r1=1.42r2=1.43diff_format=u
Index: php-src/ext/standard/info.h
diff -u php-src/ext/standard/info.h:1.42 php-src/ext/standard/info.h:1.43
--- php-src/ext/standard/info.h:1.42Mon Jan  1 09:29:32 2007
+++ php-src/ext/standard/info.h Tue Jan 23 19:58:45 2007
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: info.h,v 1.42 2007/01/01 09:29:32 sebastian Exp $ */
+/* $Id: info.h,v 1.43 2007/01/23 19:58:45 helly Exp $ */
 
 #ifndef INFO_H
 #define INFO_H
@@ -81,6 +81,7 @@
 PHPAPI void php_info_print_box_start(int bg);
 PHPAPI void php_info_print_box_end(void);
 PHPAPI void php_info_print_hr(void);
+PHPAPI void php_info_print_module(zend_module_entry *module TSRMLS_DC);
 PHPAPI char *php_logo_guid(void);
 PHPAPI char *php_get_uname(char mode);
 

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



[PHP-CVS] cvs: php-src /ext/standard info.c

2006-11-26 Thread Ilia Alshanetsky
iliaa   Sun Nov 26 16:26:32 2006 UTC

  Modified files:  
/php-src/ext/standard   info.c 
  Log:
  MFB: Added a meta tag to phpinfo() output to prevent search engines from 
  indexing the page.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/info.c?r1=1.270r2=1.271diff_format=u
Index: php-src/ext/standard/info.c
diff -u php-src/ext/standard/info.c:1.270 php-src/ext/standard/info.c:1.271
--- php-src/ext/standard/info.c:1.270   Thu Oct 19 20:55:08 2006
+++ php-src/ext/standard/info.c Sun Nov 26 16:26:32 2006
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: info.c,v 1.270 2006/10/19 20:55:08 andrei Exp $ */
+/* $Id: info.c,v 1.271 2006/11/26 16:26:32 iliaa Exp $ */
 
 #include php.h
 #include php_ini.h
@@ -378,6 +378,7 @@
PUTS(head\n);
php_info_print_style(TSRMLS_C);
PUTS(titlephpinfo()/title);
+   PUTS(meta name=\ROBOTS\ content=\NOINDEX,NOFOLLOW,NOARCHIVE\ /);
 /*
php_printf(meta http-equiv=\Content-Type\ content=\text/html; 
charset=%s\ /\n, charset);
 */

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



[PHP-CVS] cvs: php-src /ext/standard info.c

2006-09-14 Thread Dmitry Stogov
dmitry  Thu Sep 14 08:56:11 2006 UTC

  Modified files:  
/php-src/ext/standard   info.c 
  Log:
  Write valid run-time value for Zend Memory Manager
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/info.c?r1=1.267r2=1.268diff_format=u
Index: php-src/ext/standard/info.c
diff -u php-src/ext/standard/info.c:1.267 php-src/ext/standard/info.c:1.268
--- php-src/ext/standard/info.c:1.267   Sun Jun 11 20:47:55 2006
+++ php-src/ext/standard/info.c Thu Sep 14 08:56:11 2006
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: info.c,v 1.267 2006/06/11 20:47:55 iliaa Exp $ */
+/* $Id: info.c,v 1.268 2006/09/14 08:56:11 dmitry Exp $ */
 
 #include php.h
 #include php_ini.h
@@ -488,11 +488,7 @@
php_info_print_table_row(2, Thread Safety, disabled );
 #endif
 
-#if USE_ZEND_ALLOC
-   php_info_print_table_row(2, Zend Memory Manager, enabled );
-#else
-   php_info_print_table_row(2, Zend Memory Manager, disabled );
-#endif
+   php_info_print_table_row(2, Zend Memory Manager, 
is_zend_mm(TSRMLS_C) ? enabled : disabled );
 
{
char buf[1024];

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



[PHP-CVS] cvs: php-src /ext/standard info.c

2006-06-11 Thread Ilia Alshanetsky
iliaa   Sun Jun 11 16:27:41 2006 UTC

  Modified files:  
/php-src/ext/standard   info.c 
  Log:
  MFB: Fully print array() in phpinfo().
  
  
http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/info.c?r1=1.265r2=1.266diff_format=u
Index: php-src/ext/standard/info.c
diff -u php-src/ext/standard/info.c:1.265 php-src/ext/standard/info.c:1.266
--- php-src/ext/standard/info.c:1.265   Sat Jun  3 11:19:43 2006
+++ php-src/ext/standard/info.c Sun Jun 11 16:27:41 2006
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: info.c,v 1.265 2006/06/03 11:19:43 mike Exp $ */
+/* $Id: info.c,v 1.266 2006/06/11 16:27:41 iliaa Exp $ */
 
 #include php.h
 #include php_ini.h
@@ -156,7 +156,7 @@
if (Z_TYPE_PP(tmp) == IS_ARRAY) {
if (!sapi_module.phpinfo_as_text) {
PUTS(pre);
-   zend_print_zval_ex((zend_write_func_t) 
php_info_write_wrapper, *tmp, 0);
+   
zend_print_zval_r_ex((zend_write_func_t) php_info_write_wrapper, *tmp, 0);
PUTS(/pre);
} else {
zend_print_zval_r(*tmp, 0 TSRMLS_CC);

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



[PHP-CVS] cvs: php-src /ext/standard info.c

2005-11-22 Thread Ilia Alshanetsky
iliaa   Tue Nov 22 19:15:27 2005 EDT

  Modified files:  
/php-src/ext/standard   info.c 
  Log:
  MFB51: Fixed bug #35046 (phpinfo() uses improper css enclosure).
  
  
http://cvs.php.net/diff.php/php-src/ext/standard/info.c?r1=1.255r2=1.256ty=u
Index: php-src/ext/standard/info.c
diff -u php-src/ext/standard/info.c:1.255 php-src/ext/standard/info.c:1.256
--- php-src/ext/standard/info.c:1.255   Sat Aug 27 21:02:54 2005
+++ php-src/ext/standard/info.c Tue Nov 22 19:15:26 2005
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: info.c,v 1.255 2005/08/28 01:02:54 sniper Exp $ */
+/* $Id: info.c,v 1.256 2005/11/23 00:15:26 iliaa Exp $ */
 
 #include php.h
 #include php_ini.h
@@ -205,9 +205,9 @@
  */
 void php_info_print_style(TSRMLS_D)
 {
-   php_printf(style type=\text/css\!--\n);
+   php_printf(style type=\text/css\\n);
php_info_print_css(TSRMLS_C);
-   php_printf(//--/style\n);
+   php_printf(/style\n);
 }
 /* }}} */
 

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



[PHP-CVS] cvs: php-src /ext/standard info.c

2005-08-27 Thread Jani Taskinen
sniper  Sat Aug 27 21:03:00 2005 EDT

  Modified files:  
/php-src/ext/standard   info.c 
  Log:
  - Fixed bug #34284 (CLI phpinfo showing html on _SERVER[argv])
  
http://cvs.php.net/diff.php/php-src/ext/standard/info.c?r1=1.254r2=1.255ty=u
Index: php-src/ext/standard/info.c
diff -u php-src/ext/standard/info.c:1.254 php-src/ext/standard/info.c:1.255
--- php-src/ext/standard/info.c:1.254   Tue Aug 23 08:53:24 2005
+++ php-src/ext/standard/info.c Sat Aug 27 21:02:54 2005
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: info.c,v 1.254 2005/08/23 12:53:24 dmitry Exp $ */
+/* $Id: info.c,v 1.255 2005/08/28 01:02:54 sniper Exp $ */
 
 #include php.h
 #include php_ini.h
@@ -151,14 +151,16 @@
php_ob_get_buffer(tmp3 TSRMLS_CC);
php_end_ob_buffer(0, 0 TSRMLS_CC);

-   elem_esc = php_info_html_esc(Z_STRVAL_P(tmp3) 
TSRMLS_CC);
-   PUTS(elem_esc);
-   efree(elem_esc);
-   zval_ptr_dtor(tmp3);
-
if (!sapi_module.phpinfo_as_text) {
+   elem_esc = 
php_info_html_esc(Z_STRVAL_P(tmp3) TSRMLS_CC);
+   PUTS(elem_esc);
+   efree(elem_esc);
PUTS(/pre);
+   } else {
+   PUTS(Z_STRVAL_P(tmp3));
}
+   zval_ptr_dtor(tmp3);
+
} else if (Z_TYPE_PP(tmp) != IS_STRING) {
tmp2 = **tmp;
zval_copy_ctor(tmp2);

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



[PHP-CVS] cvs: php-src /ext/standard info.c

2005-08-15 Thread Ilia Alshanetsky
iliaa   Mon Aug 15 12:01:44 2005 EDT

  Modified files:  
/php-src/ext/standard   info.c 
  Log:
  input validation.
  
  
http://cvs.php.net/diff.php/php-src/ext/standard/info.c?r1=1.250r2=1.251ty=u
Index: php-src/ext/standard/info.c
diff -u php-src/ext/standard/info.c:1.250 php-src/ext/standard/info.c:1.251
--- php-src/ext/standard/info.c:1.250   Thu Aug 11 19:35:58 2005
+++ php-src/ext/standard/info.c Mon Aug 15 12:01:43 2005
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: info.c,v 1.250 2005/08/11 23:35:58 andrei Exp $ */
+/* $Id: info.c,v 1.251 2005/08/15 16:01:43 iliaa Exp $ */
 
 #include php.h
 #include php_ini.h
@@ -137,10 +137,25 @@
PUTS( = );
}
if (Z_TYPE_PP(tmp) == IS_ARRAY) {
+   zval *tmp3;
+
+   MAKE_STD_ZVAL(tmp3);
+
if (!sapi_module.phpinfo_as_text) {
PUTS(pre);
}
+   php_start_ob_buffer(NULL, 0, 1 TSRMLS_CC);
+   
zend_print_zval_r(*tmp, 0 TSRMLS_CC);
+   
+   php_ob_get_buffer(tmp3 TSRMLS_CC);
+   php_end_ob_buffer(0, 0 TSRMLS_CC);
+   
+   elem_esc = php_info_html_esc(Z_STRVAL_P(tmp3) 
TSRMLS_CC);
+   PUTS(elem_esc);
+   efree(elem_esc);
+   zval_ptr_dtor(tmp3);
+
if (!sapi_module.phpinfo_as_text) {
PUTS(/pre);
}

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



[PHP-CVS] cvs: php-src /ext/standard info.c

2005-08-15 Thread Ilia Alshanetsky
iliaa   Mon Aug 15 19:24:47 2005 EDT

  Modified files:  
/php-src/ext/standard   info.c 
  Log:
  MFH: Chunk the output
  
  
http://cvs.php.net/diff.php/php-src/ext/standard/info.c?r1=1.251r2=1.252ty=u
Index: php-src/ext/standard/info.c
diff -u php-src/ext/standard/info.c:1.251 php-src/ext/standard/info.c:1.252
--- php-src/ext/standard/info.c:1.251   Mon Aug 15 12:01:43 2005
+++ php-src/ext/standard/info.c Mon Aug 15 19:24:47 2005
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: info.c,v 1.251 2005/08/15 16:01:43 iliaa Exp $ */
+/* $Id: info.c,v 1.252 2005/08/15 23:24:47 iliaa Exp $ */
 
 #include php.h
 #include php_ini.h
@@ -144,7 +144,7 @@
if (!sapi_module.phpinfo_as_text) {
PUTS(pre);
}
-   php_start_ob_buffer(NULL, 0, 1 TSRMLS_CC);
+   php_start_ob_buffer(NULL, 4096, 1 TSRMLS_CC);

zend_print_zval_r(*tmp, 0 TSRMLS_CC);


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



[PHP-CVS] cvs: php-src /ext/standard info.c

2005-08-15 Thread Ilia Alshanetsky
iliaa   Mon Aug 15 20:25:25 2005 EDT

  Modified files:  
/php-src/ext/standard   info.c 
  Log:
  Input validation part 2.
  
  
http://cvs.php.net/diff.php/php-src/ext/standard/info.c?r1=1.252r2=1.253ty=u
Index: php-src/ext/standard/info.c
diff -u php-src/ext/standard/info.c:1.252 php-src/ext/standard/info.c:1.253
--- php-src/ext/standard/info.c:1.252   Mon Aug 15 19:24:47 2005
+++ php-src/ext/standard/info.c Mon Aug 15 20:25:21 2005
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: info.c,v 1.252 2005/08/15 23:24:47 iliaa Exp $ */
+/* $Id: info.c,v 1.253 2005/08/16 00:25:21 iliaa Exp $ */
 
 #include php.h
 #include php_ini.h
@@ -215,7 +215,7 @@
 PHPAPI char *php_info_html_esc(char *string TSRMLS_DC)
 {
int new_len;
-   return php_escape_html_entities(string, strlen(string), new_len, 0, 
ENT_NOQUOTES, NULL TSRMLS_CC);
+   return php_escape_html_entities(string, strlen(string), new_len, 0, 
ENT_QUOTES, NULL TSRMLS_CC);
 }
 /* }}} */
 

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



[PHP-CVS] cvs: php-src /ext/standard info.c

2005-05-08 Thread Rasmus Lerdorf
rasmus  Sun May  8 13:24:39 2005 EDT

  Modified files:  
/php-src/ext/standard   info.c 
  Log:
  Fix request_uri XSS on phpinfo() page
  
  
http://cvs.php.net/diff.php/php-src/ext/standard/info.c?r1=1.246r2=1.247ty=u
Index: php-src/ext/standard/info.c
diff -u php-src/ext/standard/info.c:1.246 php-src/ext/standard/info.c:1.247
--- php-src/ext/standard/info.c:1.246   Sun Feb 27 03:12:12 2005
+++ php-src/ext/standard/info.c Sun May  8 13:24:38 2005
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: info.c,v 1.246 2005/02/27 08:12:12 pollita Exp $ */
+/* $Id: info.c,v 1.247 2005/05/08 17:24:38 rasmus Exp $ */
 
 #include php.h
 #include php_ini.h
@@ -406,7 +406,9 @@
if (expose_php  !sapi_module.phpinfo_as_text) {
PUTS(a href=\http://www.php.net/\;img border=\0\ 
src=\);
if (SG(request_info).request_uri) {
-   PUTS(SG(request_info).request_uri);
+   char *elem_esc = 
php_info_html_esc(SG(request_info).request_uri TSRMLS_CC);
+   PUTS(elem_esc);
+   efree(elem_esc);
}
PUTS(?=);
logo_guid = php_logo_guid();
@@ -592,7 +594,9 @@
if (expose_php  !sapi_module.phpinfo_as_text) {
PUTS(a href=\http://www.zend.com/\;img 
border=\0\ src=\);
if (SG(request_info).request_uri) {
-   PUTS(SG(request_info).request_uri);
+   char *elem_esc = 
php_info_html_esc(SG(request_info).request_uri TSRMLS_CC);
+   PUTS(elem_esc);
+   efree(elem_esc);
}
PUTS(?=ZEND_LOGO_GUID\ alt=\Zend logo\ //a\n);
}
@@ -611,7 +615,9 @@
php_info_print_hr();
PUTS(h1a href=\);
if (SG(request_info).request_uri) {
-   PUTS(SG(request_info).request_uri);
+   char *elem_esc = 
php_info_html_esc(SG(request_info).request_uri TSRMLS_CC);
+   PUTS(elem_esc);
+   efree(elem_esc);
}
PUTS(?=PHPB8B5F2A0-3C92-11d3-A3A9-4C7B08C1\);
PUTS(PHP Credits);

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



[PHP-CVS] cvs: php-src /ext/standard info.c

2005-02-27 Thread Sara Golemon
pollita Sun Feb 27 03:12:13 2005 EDT

  Modified files:  
/php-src/ext/standard   info.c 
  Log:
  Enum filters in phpinfo()
  
http://cvs.php.net/diff.php/php-src/ext/standard/info.c?r1=1.245r2=1.246ty=u
Index: php-src/ext/standard/info.c
diff -u php-src/ext/standard/info.c:1.245 php-src/ext/standard/info.c:1.246
--- php-src/ext/standard/info.c:1.245   Sun May  2 09:23:30 2004
+++ php-src/ext/standard/info.c Sun Feb 27 03:12:12 2005
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: info.c,v 1.245 2004/05/02 13:23:30 helly Exp $ */
+/* $Id: info.c,v 1.246 2005/02/27 08:12:12 pollita Exp $ */
 
 #include php.h
 #include php_ini.h
@@ -543,6 +543,47 @@
php_info_print_table_row(2, Stream Socket 
Transports, disabled); /* ?? */
}
}
+
+   {
+   HashTable *stream_filter_hash;
+   char *filter_name, *filter_buf = NULL;
+   int filter_name_len, filter_buf_len = 0, 
filter_buf_size = 0;
+   ulong num_key;
+
+   if ((stream_filter_hash = 
php_get_stream_filters_hash())) {
+   
for(zend_hash_internal_pointer_reset(stream_filter_hash);
+   
zend_hash_get_current_key_ex(stream_filter_hash, filter_name, 
filter_name_len, num_key, 0, NULL) == HASH_KEY_IS_STRING;
+   
zend_hash_move_forward(stream_filter_hash)) {
+   if (filter_buf_len + filter_name_len + 
3  filter_buf_size) {
+   while (filter_buf_len + 
filter_name_len + 3  filter_buf_size) {
+   filter_buf_size += 256;
+   }
+   if (filter_buf) {
+   filter_buf = 
erealloc(filter_buf, filter_buf_size);
+   } else {
+   filter_buf = 
emalloc(filter_buf_size);
+   }
+   }
+   if (filter_buf_len  0) {
+   filter_buf[filter_buf_len++] = 
',';
+   filter_buf[filter_buf_len++] = 
' ';
+   }
+   memcpy(filter_buf + filter_buf_len, 
filter_name, filter_name_len);
+   filter_buf_len += filter_name_len;
+   filter_buf[filter_buf_len] = '\0';
+   }
+   if (filter_buf) {
+   php_info_print_table_row(2, Registered 
Stream Filters, filter_buf);
+   efree(filter_buf);
+   } else {
+   /* Any chances we will ever hit this? */
+   php_info_print_table_row(2, Registered 
Stream Filters, no filters registered);
+   }
+   } else {
+   /* Any chances we will ever hit this? */
+   php_info_print_table_row(2, Stream Filters, 
disabled); /* ?? */
+   }
+   }

php_info_print_table_end();
 

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



[PHP-CVS] cvs: php-src /ext/standard info.c

2004-05-02 Thread Marcus Boerger
helly   Sun May  2 09:23:30 2004 EDT

  Modified files:  
/php-src/ext/standard   info.c 
  Log:
  Use caseinsensitive sort
  
http://cvs.php.net/diff.php/php-src/ext/standard/info.c?r1=1.244r2=1.245ty=u
Index: php-src/ext/standard/info.c
diff -u php-src/ext/standard/info.c:1.244 php-src/ext/standard/info.c:1.245
--- php-src/ext/standard/info.c:1.244   Fri Apr 23 09:28:25 2004
+++ php-src/ext/standard/info.c Sun May  2 09:23:30 2004
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: info.c,v 1.244 2004/04/23 13:28:25 derick Exp $ */
+/* $Id: info.c,v 1.245 2004/05/02 13:23:30 helly Exp $ */
 
 #include php.h
 #include php_ini.h
@@ -373,7 +373,7 @@
Bucket *f = *((Bucket **) a);
Bucket *s = *((Bucket **) b);
 
-   return strcmp(((zend_module_entry *)f-pData)-name,
+   return strcasecmp(((zend_module_entry *)f-pData)-name,
  ((zend_module_entry *)s-pData)-name);
 }
 /* }}} */

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



[PHP-CVS] cvs: php-src /ext/standard info.c

2004-04-23 Thread Derick Rethans
derick  Fri Apr 23 09:28:25 2004 EDT

  Modified files:  
/php-src/ext/standard   info.c 
  Log:
  - Fixed buffer overflow in phpinfo() for Zend Extension Api NO.
  
  
http://cvs.php.net/diff.php/php-src/ext/standard/info.c?r1=1.243r2=1.244ty=u
Index: php-src/ext/standard/info.c
diff -u php-src/ext/standard/info.c:1.243 php-src/ext/standard/info.c:1.244
--- php-src/ext/standard/info.c:1.243   Mon Mar 15 02:45:25 2004
+++ php-src/ext/standard/info.c Fri Apr 23 09:28:25 2004
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: info.c,v 1.243 2004/03/15 07:45:25 jon Exp $ */
+/* $Id: info.c,v 1.244 2004/04/23 13:28:25 derick Exp $ */
 
 #include php.h
 #include php_ini.h
@@ -394,7 +394,7 @@
 
if (flag  PHP_INFO_GENERAL) {
char *zend_version = get_zend_version();
-   char temp_api[9];
+   char temp_api[10];
char *logo_guid;
 
php_uname = php_get_uname('a');

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



[PHP-CVS] cvs: php-src /ext/standard info.c

2004-02-17 Thread Sara Golemon
pollita Wed Feb 18 00:07:15 2004 EDT

  Modified files:  
/php-src/ext/standard   info.c 
  Log:
  Show registered transports in phpinfo()
  
http://cvs.php.net/diff.php/php-src/ext/standard/info.c?r1=1.241r2=1.242ty=u
Index: php-src/ext/standard/info.c
diff -u php-src/ext/standard/info.c:1.241 php-src/ext/standard/info.c:1.242
--- php-src/ext/standard/info.c:1.241   Thu Jan  8 03:17:32 2004
+++ php-src/ext/standard/info.c Wed Feb 18 00:07:13 2004
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: info.c,v 1.241 2004/01/08 08:17:32 andi Exp $ */
+/* $Id: info.c,v 1.242 2004/02/18 05:07:13 pollita Exp $ */
 
 #include php.h
 #include php_ini.h
@@ -502,6 +502,47 @@
php_info_print_table_row(2, PHP Streams, 
disabled); /* ?? */
}
}
+
+   {
+   HashTable *stream_xport_hash;
+   char *xport_name, *xport_buf = NULL;
+   int xport_name_len, xport_buf_len = 0, xport_buf_size = 0;
+   ulong num_key;
+
+   if ((stream_xport_hash = php_stream_xport_get_hash())) {
+   
for(zend_hash_internal_pointer_reset(stream_xport_hash);
+   
zend_hash_get_current_key_ex(stream_xport_hash, xport_name, xport_name_len, 
num_key, 0, NULL) == HASH_KEY_IS_STRING;
+   zend_hash_move_forward(stream_xport_hash)) {
+   if (xport_buf_len + xport_name_len + 3  
xport_buf_size) {
+   while (xport_buf_len + xport_name_len 
+ 3  xport_buf_size) {
+   xport_buf_size += 256;
+   }
+   if (xport_buf) {
+   xport_buf = 
erealloc(xport_buf, xport_buf_size);
+   } else {
+   xport_buf = 
emalloc(xport_buf_size);
+   }
+   }
+   if (xport_buf_len  0) {
+   xport_buf[xport_buf_len++] = ',';
+   xport_buf[xport_buf_len++] = ' ';
+   }
+   memcpy(xport_buf + xport_buf_len, xport_name, 
xport_name_len);
+   xport_buf_len += xport_name_len;
+   xport_buf[xport_buf_len] = '\0';
+   }
+   if (xport_buf) {
+   php_info_print_table_row(2, Registered Stream 
Socket Transports, xport_buf);
+   efree(xport_buf);
+   } else {
+   /* Any chances we will ever hit this? */
+   php_info_print_table_row(2, Registered Stream 
Socket Transports, no transports registered);
+   }
+   } else {
+   /* Any chances we will ever hit this? */
+   php_info_print_table_row(2, Stream Socket 
Transports, disabled); /* ?? */
+   }
+   }

php_info_print_table_end();
 

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



[PHP-CVS] cvs: php-src /ext/standard info.c

2003-09-21 Thread Ilia Alshanetsky
iliaa   Mon Sep 22 00:18:24 2003 EDT

  Modified files:  
/php-src/ext/standard   info.c 
  Log:
  String formatting stuff.
  
  
Index: php-src/ext/standard/info.c
diff -u php-src/ext/standard/info.c:1.238 php-src/ext/standard/info.c:1.239
--- php-src/ext/standard/info.c:1.238   Thu Jun 19 12:10:54 2003
+++ php-src/ext/standard/info.c Mon Sep 22 00:18:24 2003
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: info.c,v 1.238 2003/06/19 16:10:54 iliaa Exp $ */
+/* $Id: info.c,v 1.239 2003/09/22 04:18:24 iliaa Exp $ */
 
 #include php.h
 #include php_ini.h
@@ -81,7 +81,7 @@
php_printf(%s, module-name);
php_printf(/td/tr\n);
} else {
-   php_printf(module-name);
+   php_printf(%s, module-name);
php_printf(\n);
}   
}

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