1
- /*
1
+ /*
2
2
+----------------------------------------------------------------------+
3
3
| PHP Version 5 |
4
4
+----------------------------------------------------------------------+
14
14
+----------------------------------------------------------------------+
15
15
| Authors: Rasmus Lerdorf <[email protected] > |
16
16
| Zeev Suraski <[email protected] > |
17
- | Colin Viebrock <colin@easydns.com > |
17
+ | Colin Viebrock <colin@viebrock.ca > |
18
18
+----------------------------------------------------------------------+
19
19
*/
20
20
@@ -67,7 +67,7 @@ static int php_info_print_html_esc(const char *str, int len) /* {{{ */
67
67
int written ;
68
68
char * new_str ;
69
69
TSRMLS_FETCH ();
70
-
70
+
71
71
new_str = php_escape_html_entities ((unsigned char * ) str , len , & new_len , 0 , ENT_QUOTES , "utf-8" TSRMLS_CC );
72
72
written = php_output_write (new_str , new_len TSRMLS_CC );
73
73
efree (new_str );
@@ -81,11 +81,11 @@ static int php_info_printf(const char *fmt, ...) /* {{{ */
81
81
int len , written ;
82
82
va_list argv ;
83
83
TSRMLS_FETCH ();
84
-
84
+
85
85
va_start (argv , fmt );
86
86
len = vspprintf (& buf , 0 , fmt , argv );
87
87
va_end (argv );
88
-
88
+
89
89
written = php_output_write (buf , len TSRMLS_CC );
90
90
efree (buf );
91
91
return written ;
@@ -103,7 +103,7 @@ static void php_info_print_stream_hash(const char *name, HashTable *ht TSRMLS_DC
103
103
{
104
104
char * key ;
105
105
uint len ;
106
-
106
+
107
107
if (ht ) {
108
108
if (zend_hash_num_elements (ht )) {
109
109
HashPosition pos ;
@@ -113,7 +113,7 @@ static void php_info_print_stream_hash(const char *name, HashTable *ht TSRMLS_DC
113
113
} else {
114
114
php_info_printf ("\nRegistered %s => " , name );
115
115
}
116
-
116
+
117
117
zend_hash_internal_pointer_reset_ex (ht , & pos );
118
118
while (zend_hash_get_current_key_ex (ht , & key , & len , NULL , 0 , & pos ) == HASH_KEY_IS_STRING )
119
119
{
@@ -125,7 +125,7 @@ static void php_info_print_stream_hash(const char *name, HashTable *ht TSRMLS_DC
125
125
break ;
126
126
}
127
127
}
128
-
128
+
129
129
if (!sapi_module .phpinfo_as_text ) {
130
130
php_info_print ("</td></tr>\n" );
131
131
}
@@ -160,10 +160,10 @@ PHPAPI void php_info_print_module(zend_module_entry *zend_module TSRMLS_DC) /* {
160
160
}
161
161
} else {
162
162
if (!sapi_module .phpinfo_as_text ) {
163
- php_info_printf ("<tr><td>%s</td></tr>\n" , zend_module -> name );
163
+ php_info_printf ("<tr><td class=\"v\" >%s</td></tr>\n" , zend_module -> name );
164
164
} else {
165
165
php_info_printf ("%s\n" , zend_module -> name );
166
- }
166
+ }
167
167
}
168
168
}
169
169
/* }}} */
@@ -208,7 +208,7 @@ static void php_print_gpcse_array(char *name, uint name_length TSRMLS_DC)
208
208
209
209
php_info_print (name );
210
210
php_info_print ("[\"" );
211
-
211
+
212
212
switch (zend_hash_get_current_key_ex (Z_ARRVAL_PP (data ), & string_key , & string_len , & num_key , 0 , NULL )) {
213
213
case HASH_KEY_IS_STRING :
214
214
if (!sapi_module .phpinfo_as_text ) {
@@ -432,7 +432,7 @@ char* php_get_windows_name()
432
432
sub = "Web Edition" ;
433
433
else sub = "Standard Edition" ;
434
434
}
435
- }
435
+ }
436
436
}
437
437
438
438
if ( osvi .dwMajorVersion == 5 && osvi .dwMinorVersion == 1 ) {
@@ -525,7 +525,7 @@ PHPAPI char *php_get_uname(char mode)
525
525
DWORD dwWindowsMinorVersion = (DWORD )(HIBYTE (LOWORD (dwVersion )));
526
526
DWORD dwSize = MAX_COMPUTERNAME_LENGTH + 1 ;
527
527
char ComputerName [MAX_COMPUTERNAME_LENGTH + 1 ];
528
-
528
+
529
529
GetComputerName (ComputerName , & dwSize );
530
530
531
531
if (mode == 's' ) {
@@ -574,7 +574,7 @@ PHPAPI char *php_get_uname(char mode)
574
574
if (mode == 's' ) {
575
575
php_uname = buf .sysname ;
576
576
} else if (mode == 'r' ) {
577
- snprintf (tmp_uname , sizeof (tmp_uname ), "%d.%d.%d" ,
577
+ snprintf (tmp_uname , sizeof (tmp_uname ), "%d.%d.%d" ,
578
578
buf .netware_major , buf .netware_minor , buf .netware_revision );
579
579
php_uname = tmp_uname ;
580
580
} else if (mode == 'n' ) {
@@ -664,7 +664,7 @@ PHPAPI void php_print_info(int flag TSRMLS_DC)
664
664
char temp_api [10 ];
665
665
666
666
php_uname = php_get_uname ('a' );
667
-
667
+
668
668
if (!sapi_module .phpinfo_as_text ) {
669
669
php_info_print_box_start (1 );
670
670
}
@@ -688,7 +688,7 @@ PHPAPI void php_print_info(int flag TSRMLS_DC)
688
688
php_info_printf ("<h1 class=\"p\">PHP Version %s</h1>\n" , PHP_VERSION );
689
689
} else {
690
690
php_info_print_table_row (2 , "PHP Version" , PHP_VERSION );
691
- }
691
+ }
692
692
php_info_print_box_end ();
693
693
php_info_print_table_start ();
694
694
php_info_print_table_row (2 , "System" , php_uname );
@@ -773,7 +773,7 @@ PHPAPI void php_print_info(int flag TSRMLS_DC)
773
773
#else
774
774
php_info_print_table_row (2 , "DTrace Support" , "disabled" );
775
775
#endif
776
-
776
+
777
777
php_info_print_stream_hash ("PHP Streams" , php_stream_get_url_stream_wrappers_hash () TSRMLS_CC );
778
778
php_info_print_stream_hash ("Stream Socket Transports" , php_stream_xport_get_hash () TSRMLS_CC );
779
779
php_info_print_stream_hash ("Stream Filters" , php_get_stream_filters_hash () TSRMLS_CC );
@@ -805,7 +805,7 @@ PHPAPI void php_print_info(int flag TSRMLS_DC)
805
805
php_info_print ("<h1>Configuration</h1>\n" );
806
806
} else {
807
807
SECTION ("Configuration" );
808
- }
808
+ }
809
809
if (!(flag & PHP_INFO_MODULES )) {
810
810
SECTION ("PHP Core" );
811
811
display_ini_entries (NULL );
@@ -879,7 +879,7 @@ PHPAPI void php_print_info(int flag TSRMLS_DC)
879
879
}
880
880
881
881
882
- if ((flag & PHP_INFO_CREDITS ) && !sapi_module .phpinfo_as_text ) {
882
+ if ((flag & PHP_INFO_CREDITS ) && !sapi_module .phpinfo_as_text ) {
883
883
php_info_print_hr ();
884
884
php_print_credits (PHP_CREDITS_ALL & ~PHP_CREDITS_FULLPAGE TSRMLS_CC );
885
885
}
@@ -920,17 +920,17 @@ PHPAPI void php_print_info(int flag TSRMLS_DC)
920
920
921
921
if (!sapi_module .phpinfo_as_text ) {
922
922
php_info_print ("</div></body></html>" );
923
- }
923
+ }
924
924
}
925
925
/* }}} */
926
926
927
927
PHPAPI void php_info_print_table_start (void ) /* {{{ */
928
928
{
929
929
if (!sapi_module .phpinfo_as_text ) {
930
- php_info_print ("<table border=\"0\" cellpadding=\"3\" width=\"600\" >\n" );
930
+ php_info_print ("<table>\n" );
931
931
} else {
932
932
php_info_print ("\n" );
933
- }
933
+ }
934
934
}
935
935
/* }}} */
936
936
@@ -955,7 +955,7 @@ PHPAPI void php_info_print_box_start(int flag) /* {{{ */
955
955
php_info_print ("<tr class=\"v\"><td>\n" );
956
956
} else {
957
957
php_info_print ("\n" );
958
- }
958
+ }
959
959
}
960
960
}
961
961
/* }}} */
@@ -988,7 +988,7 @@ PHPAPI void php_info_print_table_colspan_header(int num_cols, char *header) /* {
988
988
} else {
989
989
spaces = (74 - strlen (header ));
990
990
php_info_printf ("%*s%s%*s\n" , (int )(spaces /2 ), " " , header , (int )(spaces /2 ), " " );
991
- }
991
+ }
992
992
}
993
993
/* }}} */
994
994
@@ -1003,7 +1003,7 @@ PHPAPI void php_info_print_table_header(int num_cols, ...)
1003
1003
va_start (row_elements , num_cols );
1004
1004
if (!sapi_module .phpinfo_as_text ) {
1005
1005
php_info_print ("<tr class=\"h\">" );
1006
- }
1006
+ }
1007
1007
for (i = 0 ; i < num_cols ; i ++ ) {
1008
1008
row_element = va_arg (row_elements , char * );
1009
1009
if (!row_element || !* row_element ) {
@@ -1032,21 +1032,21 @@ PHPAPI void php_info_print_table_header(int num_cols, ...)
1032
1032
1033
1033
/* {{{ php_info_print_table_row_internal
1034
1034
*/
1035
- static void php_info_print_table_row_internal (int num_cols ,
1035
+ static void php_info_print_table_row_internal (int num_cols ,
1036
1036
const char * value_class , va_list row_elements )
1037
1037
{
1038
1038
int i ;
1039
1039
char * row_element ;
1040
1040
1041
1041
if (!sapi_module .phpinfo_as_text ) {
1042
1042
php_info_print ("<tr>" );
1043
- }
1043
+ }
1044
1044
for (i = 0 ; i < num_cols ; i ++ ) {
1045
1045
if (!sapi_module .phpinfo_as_text ) {
1046
1046
php_info_printf ("<td class=\"%s\">" ,
1047
1047
(i == 0 ? "e" : value_class )
1048
1048
);
1049
- }
1049
+ }
1050
1050
row_element = va_arg (row_elements , char * );
1051
1051
if (!row_element || !* row_element ) {
1052
1052
if (!sapi_module .phpinfo_as_text ) {
@@ -1061,7 +1061,7 @@ static void php_info_print_table_row_internal(int num_cols,
1061
1061
php_info_print (row_element );
1062
1062
if (i < num_cols - 1 ) {
1063
1063
php_info_print (" => " );
1064
- }
1064
+ }
1065
1065
}
1066
1066
}
1067
1067
if (!sapi_module .phpinfo_as_text ) {
@@ -1081,7 +1081,7 @@ static void php_info_print_table_row_internal(int num_cols,
1081
1081
PHPAPI void php_info_print_table_row (int num_cols , ...)
1082
1082
{
1083
1083
va_list row_elements ;
1084
-
1084
+
1085
1085
va_start (row_elements , num_cols );
1086
1086
php_info_print_table_row_internal (num_cols , "v" , row_elements );
1087
1087
va_end (row_elements );
@@ -1090,11 +1090,11 @@ PHPAPI void php_info_print_table_row(int num_cols, ...)
1090
1090
1091
1091
/* {{{ php_info_print_table_row_ex
1092
1092
*/
1093
- PHPAPI void php_info_print_table_row_ex (int num_cols , const char * value_class ,
1093
+ PHPAPI void php_info_print_table_row_ex (int num_cols , const char * value_class ,
1094
1094
...)
1095
1095
{
1096
1096
va_list row_elements ;
1097
-
1097
+
1098
1098
va_start (row_elements , value_class );
1099
1099
php_info_print_table_row_internal (num_cols , value_class , row_elements );
1100
1100
va_end (row_elements );
@@ -1222,7 +1222,7 @@ PHP_FUNCTION(php_ini_scanned_files)
1222
1222
if (zend_parse_parameters_none () == FAILURE ) {
1223
1223
return ;
1224
1224
}
1225
-
1225
+
1226
1226
if (strlen (PHP_CONFIG_FILE_SCAN_DIR ) && php_ini_scanned_files ) {
1227
1227
RETURN_STRING (php_ini_scanned_files , 1 );
1228
1228
} else {
@@ -1238,7 +1238,7 @@ PHP_FUNCTION(php_ini_loaded_file)
1238
1238
if (zend_parse_parameters_none () == FAILURE ) {
1239
1239
return ;
1240
1240
}
1241
-
1241
+
1242
1242
if (php_ini_opened_path ) {
1243
1243
RETURN_STRING (php_ini_opened_path , 1 );
1244
1244
} else {
0 commit comments