Back to index

php5  5.3.10
Defines | Functions
info.h File Reference

Go to the source code of this file.

Defines

#define PHP_ENTRY_NAME_COLOR   "#ccccff"
#define PHP_CONTENTS_COLOR   "#cccccc"
#define PHP_HEADER_COLOR   "#9999cc"
#define PHP_INFO_GENERAL   (1<<0)
#define PHP_INFO_CREDITS   (1<<1)
#define PHP_INFO_CONFIGURATION   (1<<2)
#define PHP_INFO_MODULES   (1<<3)
#define PHP_INFO_ENVIRONMENT   (1<<4)
#define PHP_INFO_VARIABLES   (1<<5)
#define PHP_INFO_LICENSE   (1<<6)
#define PHP_INFO_ALL   0xFFFFFFFF
#define HAVE_CREDITS_DEFS
#define PHP_CREDITS_GROUP   (1<<0)
#define PHP_CREDITS_GENERAL   (1<<1)
#define PHP_CREDITS_SAPI   (1<<2)
#define PHP_CREDITS_MODULES   (1<<3)
#define PHP_CREDITS_DOCS   (1<<4)
#define PHP_CREDITS_FULLPAGE   (1<<5)
#define PHP_CREDITS_QA   (1<<6)
#define PHP_CREDITS_WEB   (1<<7)
#define PHP_CREDITS_ALL   0xFFFFFFFF
#define PHP_LOGO_GUID   "PHPE9568F34-D428-11d2-A769-00AA001ACF42"
#define PHP_EGG_LOGO_GUID   "PHPE9568F36-D428-11d2-A769-00AA001ACF42"
#define ZEND_LOGO_GUID   "PHPE9568F35-D428-11d2-A769-00AA001ACF42"
#define PHP_CREDITS_GUID   "PHPB8B5F2A0-3C92-11d3-A3A9-4C7B08C10000"

Functions

 PHP_FUNCTION (phpversion)
 PHP_FUNCTION (phpinfo)
 PHP_FUNCTION (phpcredits)
 PHP_FUNCTION (php_logo_guid)
 PHP_FUNCTION (php_real_logo_guid)
 PHP_FUNCTION (zend_logo_guid)
 PHP_FUNCTION (php_egg_logo_guid)
 PHP_FUNCTION (php_sapi_name)
 PHP_FUNCTION (php_uname)
 PHP_FUNCTION (php_ini_scanned_files)
 PHP_FUNCTION (php_ini_loaded_file)
PHPAPI char * php_info_html_esc (char *string TSRMLS_DC)
PHPAPI void php_info_html_esc_write (char *string, int str_len TSRMLS_DC)
PHPAPI void php_print_info_htmlhead (TSRMLS_D)
PHPAPI void php_print_info (int flag TSRMLS_DC)
PHPAPI void php_print_style (void)
PHPAPI void php_info_print_style (TSRMLS_D)
PHPAPI void php_info_print_table_colspan_header (int num_cols, char *header)
PHPAPI void php_info_print_table_header (int num_cols,...)
PHPAPI void php_info_print_table_row (int num_cols,...)
PHPAPI void php_info_print_table_row_ex (int num_cols, const char *,...)
PHPAPI void php_info_print_table_start (void)
PHPAPI void php_info_print_table_end (void)
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)
void register_phpinfo_constants (INIT_FUNC_ARGS)

Define Documentation

Definition at line 39 of file info.h.

#define PHP_CONTENTS_COLOR   "#cccccc"

Definition at line 26 of file info.h.

#define PHP_CREDITS_ALL   0xFFFFFFFF

Definition at line 49 of file info.h.

#define PHP_CREDITS_DOCS   (1<<4)

Definition at line 45 of file info.h.

#define PHP_CREDITS_FULLPAGE   (1<<5)

Definition at line 46 of file info.h.

#define PHP_CREDITS_GENERAL   (1<<1)

Definition at line 42 of file info.h.

#define PHP_CREDITS_GROUP   (1<<0)

Definition at line 41 of file info.h.

#define PHP_CREDITS_GUID   "PHPB8B5F2A0-3C92-11d3-A3A9-4C7B08C10000"

Definition at line 56 of file info.h.

#define PHP_CREDITS_MODULES   (1<<3)

Definition at line 44 of file info.h.

#define PHP_CREDITS_QA   (1<<6)

Definition at line 47 of file info.h.

#define PHP_CREDITS_SAPI   (1<<2)

Definition at line 43 of file info.h.

#define PHP_CREDITS_WEB   (1<<7)

Definition at line 48 of file info.h.

#define PHP_EGG_LOGO_GUID   "PHPE9568F36-D428-11d2-A769-00AA001ACF42"

Definition at line 54 of file info.h.

#define PHP_ENTRY_NAME_COLOR   "#ccccff"

Definition at line 25 of file info.h.

#define PHP_HEADER_COLOR   "#9999cc"

Definition at line 27 of file info.h.

#define PHP_INFO_ALL   0xFFFFFFFF

Definition at line 36 of file info.h.

#define PHP_INFO_CONFIGURATION   (1<<2)

Definition at line 31 of file info.h.

#define PHP_INFO_CREDITS   (1<<1)

Definition at line 30 of file info.h.

#define PHP_INFO_ENVIRONMENT   (1<<4)

Definition at line 33 of file info.h.

#define PHP_INFO_GENERAL   (1<<0)

Definition at line 29 of file info.h.

#define PHP_INFO_LICENSE   (1<<6)

Definition at line 35 of file info.h.

#define PHP_INFO_MODULES   (1<<3)

Definition at line 32 of file info.h.

#define PHP_INFO_VARIABLES   (1<<5)

Definition at line 34 of file info.h.

#define PHP_LOGO_GUID   "PHPE9568F34-D428-11d2-A769-00AA001ACF42"

Definition at line 53 of file info.h.

#define ZEND_LOGO_GUID   "PHPE9568F35-D428-11d2-A769-00AA001ACF42"

Definition at line 55 of file info.h.


Function Documentation

PHP_FUNCTION ( phpversion  )

Definition at line 1263 of file info.c.

{
       zval **arg;
       const char *version;
       int argc = ZEND_NUM_ARGS();

       if (argc == 0) {
              RETURN_STRING(PHP_VERSION, 1);
       } else {
              if (zend_parse_parameters(argc TSRMLS_CC, "Z", &arg) == FAILURE) {
                     return;
              }
                     
              convert_to_string_ex(arg);
              version = zend_get_module_version(Z_STRVAL_PP(arg));
              
              if (version == NULL) {
                     RETURN_FALSE;
              }
              RETURN_STRING(version, 1);
       }
}

Here is the call graph for this function:

PHP_FUNCTION ( phpinfo  )

Definition at line 1243 of file info.c.

{
       long flag = PHP_INFO_ALL;

       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|l", &flag) == FAILURE) {
              return;
       }

       /* Andale!  Andale!  Yee-Hah! */
       php_start_ob_buffer(NULL, 4096, 0 TSRMLS_CC);
       php_print_info(flag TSRMLS_CC);
       php_end_ob_buffer(1, 0 TSRMLS_CC);

       RETURN_TRUE;
}

Here is the call graph for this function:

PHP_FUNCTION ( phpcredits  )

Definition at line 1289 of file info.c.

{
       long flag = PHP_CREDITS_ALL;

       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|l", &flag) == FAILURE) {
              return;
       }

       php_print_credits(flag TSRMLS_CC);
       RETURN_TRUE;
}

Here is the call graph for this function:

Definition at line 1328 of file info.c.

Here is the call graph for this function:

PHP_FUNCTION ( php_real_logo_guid  )

Definition at line 1341 of file info.c.

PHP_FUNCTION ( zend_logo_guid  )

Definition at line 1366 of file info.c.

PHP_FUNCTION ( php_egg_logo_guid  )

Definition at line 1354 of file info.c.

PHP_FUNCTION ( php_sapi_name  )

Definition at line 1378 of file info.c.

{
       if (zend_parse_parameters_none() == FAILURE) {
              return;
       }

       if (sapi_module.name) {
              RETURN_STRING(sapi_module.name, 1);
       } else {
              RETURN_FALSE;
       }
}
PHP_FUNCTION ( php_uname  )

Definition at line 1395 of file info.c.

{
       char *mode = "a";
       int modelen = sizeof("a")-1;
       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|s", &mode, &modelen) == FAILURE) {
              return;
       }
       RETURN_STRING(php_get_uname(*mode), 0);
}

Here is the call graph for this function:

Definition at line 1409 of file info.c.

{
       if (zend_parse_parameters_none() == FAILURE) {
              return;
       }
       
       if (strlen(PHP_CONFIG_FILE_SCAN_DIR) && php_ini_scanned_files) {
              RETURN_STRING(php_ini_scanned_files, 1);
       } else {
              RETURN_FALSE;
       }
}
PHP_FUNCTION ( php_ini_loaded_file  )

Definition at line 1425 of file info.c.

PHPAPI char* php_get_uname ( char  mode)

Definition at line 474 of file info.c.

{
       char *php_uname;
       char tmp_uname[256];
#ifdef PHP_WIN32
       DWORD dwBuild=0;
       DWORD dwVersion = GetVersion();
       DWORD dwWindowsMajorVersion =  (DWORD)(LOBYTE(LOWORD(dwVersion)));
       DWORD dwWindowsMinorVersion =  (DWORD)(HIBYTE(LOWORD(dwVersion)));
       DWORD dwSize = MAX_COMPUTERNAME_LENGTH + 1;
       char ComputerName[MAX_COMPUTERNAME_LENGTH + 1];
       
       GetComputerName(ComputerName, &dwSize);

       if (mode == 's') {
              if (dwVersion < 0x80000000) {
                     php_uname = "Windows NT";
              } else {
                     php_uname = "Windows 9x";
              }
       } else if (mode == 'r') {
              snprintf(tmp_uname, sizeof(tmp_uname), "%d.%d", dwWindowsMajorVersion, dwWindowsMinorVersion);
              php_uname = tmp_uname;
       } else if (mode == 'n') {
              php_uname = ComputerName;
       } else if (mode == 'v') {
              char *winver = php_get_windows_name();
              dwBuild = (DWORD)(HIWORD(dwVersion));
              if(winver == NULL) {
                     snprintf(tmp_uname, sizeof(tmp_uname), "build %d", dwBuild);
              } else {
                     snprintf(tmp_uname, sizeof(tmp_uname), "build %d (%s)", dwBuild, winver);
              }
              php_uname = tmp_uname;
              if(winver) {
                     efree(winver);
              }
       } else if (mode == 'm') {
              php_get_windows_cpu(tmp_uname, sizeof(tmp_uname));
              php_uname = tmp_uname;
       } else { /* assume mode == 'a' */
              /* Get build numbers for Windows NT or Win95 */
              if (dwVersion < 0x80000000){
                     char *winver = php_get_windows_name();
                     char wincpu[20];

                     php_get_windows_cpu(wincpu, sizeof(wincpu));
                     dwBuild = (DWORD)(HIWORD(dwVersion));
                     snprintf(tmp_uname, sizeof(tmp_uname), "%s %s %d.%d build %d (%s) %s",
                                    "Windows NT", ComputerName,
                                    dwWindowsMajorVersion, dwWindowsMinorVersion, dwBuild, winver?winver:"unknown", wincpu);
                     if(winver) {
                            efree(winver);
                     }
              } else {
                     snprintf(tmp_uname, sizeof(tmp_uname), "%s %s %d.%d",
                                    "Windows 9x", ComputerName,
                                    dwWindowsMajorVersion, dwWindowsMinorVersion);
              }
              php_uname = tmp_uname;
       }
#else
#ifdef HAVE_SYS_UTSNAME_H
       struct utsname buf;
       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') {
                     php_uname = buf.release;
              } else if (mode == 'n') {
                     php_uname = buf.nodename;
              } else if (mode == 'v') {
                     php_uname = buf.version;
              } else if (mode == 'm') {
                     php_uname = buf.machine;
              } else { /* assume mode == 'a' */
                     snprintf(tmp_uname, sizeof(tmp_uname), "%s %s %s %s %s",
                                    buf.sysname, buf.nodename, buf.release, buf.version,
                                    buf.machine);
                     php_uname = tmp_uname;
              }
#endif /* NETWARE */
       }
#else
       php_uname = PHP_UNAME;
#endif
#endif
       return estrdup(php_uname);
}

Here is the caller graph for this function:

PHPAPI char* php_info_html_esc ( char *string  TSRMLS_DC)

Definition at line 248 of file info.c.

{
       int new_len;
       return php_escape_html_entities((unsigned char *)string, strlen(string), &new_len, 0, ENT_QUOTES, NULL TSRMLS_CC);
}

Here is the call graph for this function:

Here is the caller graph for this function:

PHPAPI void php_info_html_esc_write ( char *  string,
int str_len  TSRMLS_DC 
)

Definition at line 236 of file info.c.

{
       int new_len;
       char *ret = php_escape_html_entities((unsigned char *)string, str_len, &new_len, 0, ENT_QUOTES, NULL TSRMLS_CC);

       PHPWRITE(ret, new_len);
       efree(ret);
}

Here is the call graph for this function:

Here is the caller graph for this function:

PHPAPI void php_info_print_box_end ( void  )

Definition at line 1070 of file info.c.

{
       if (!sapi_module.phpinfo_as_text) {
              php_printf("</td></tr>\n");
       }
       php_info_print_table_end();
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1054 of file info.c.

{
       php_info_print_table_start();
       if (flag) {
              if (!sapi_module.phpinfo_as_text) {
                     php_printf("<tr class=\"h\"><td>\n");
              }
       } else {
              if (!sapi_module.phpinfo_as_text) {
                     php_printf("<tr class=\"v\"><td>\n");
              } else {
                     php_printf("\n");
              }      
       }
}

Here is the call graph for this function:

Here is the caller graph for this function:

PHPAPI void php_info_print_hr ( void  )

Definition at line 1078 of file info.c.

{
       if (!sapi_module.phpinfo_as_text) {
              php_printf("<hr />\n");
       } else {
              php_printf("\n\n _______________________________________________________________________\n\n");
       }
}

Here is the call graph for this function:

Here is the caller graph for this function:

PHPAPI void php_info_print_module ( zend_module_entry *module  TSRMLS_DC)

Definition at line 226 of file info.c.

{
       php_printf("<style type=\"text/css\">\n");
       php_info_print_css(TSRMLS_C);
       php_printf("</style>\n");
}

Here is the call graph for this function:

Here is the caller graph for this function:

PHPAPI void php_info_print_table_colspan_header ( int  num_cols,
char *  header 
)

Definition at line 1087 of file info.c.

{
       int spaces;

       if (!sapi_module.phpinfo_as_text) {
              php_printf("<tr class=\"h\"><th colspan=\"%d\">%s</th></tr>\n", num_cols, header );
       } else {
              spaces = (74 - strlen(header));
              php_printf("%*s%s%*s\n", (int)(spaces/2), " ", header, (int)(spaces/2), " ");
       }      
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1046 of file info.c.

{
       if (!sapi_module.phpinfo_as_text) {
              php_printf("</table><br />\n");
       }

}

Here is the call graph for this function:

Here is the caller graph for this function:

PHPAPI void php_info_print_table_header ( int  num_cols,
  ... 
)

Definition at line 1101 of file info.c.

{
       int i;
       va_list row_elements;
       char *row_element;

       TSRMLS_FETCH();

       va_start(row_elements, num_cols);
       if (!sapi_module.phpinfo_as_text) {
              php_printf("<tr class=\"h\">");
       }      
       for (i=0; i<num_cols; i++) {
              row_element = va_arg(row_elements, char *);
              if (!row_element || !*row_element) {
                     row_element = " ";
              }
              if (!sapi_module.phpinfo_as_text) {
                     PUTS("<th>");
                     PUTS(row_element);
                     PUTS("</th>");
              } else {
                     PUTS(row_element);
                     if (i < num_cols-1) {
                            PUTS(" => ");
                     } else {
                            PUTS("\n");
                     }      
              }      
       }
       if (!sapi_module.phpinfo_as_text) {
              php_printf("</tr>\n");
       }      

       va_end(row_elements);
}

Here is the call graph for this function:

Here is the caller graph for this function:

PHPAPI void php_info_print_table_row ( int  num_cols,
  ... 
)

Definition at line 1195 of file info.c.

{
       va_list row_elements;
       
       va_start(row_elements, num_cols);
       php_info_print_table_row_internal(num_cols, "v", row_elements);
       va_end(row_elements);
}

Here is the call graph for this function:

Here is the caller graph for this function:

PHPAPI void php_info_print_table_row_ex ( int  num_cols,
const char *  ,
  ... 
)

Definition at line 1207 of file info.c.

{
       va_list row_elements;
       
       va_start(row_elements, value_class);
       php_info_print_table_row_internal(num_cols, value_class, row_elements);
       va_end(row_elements);
}

Here is the call graph for this function:

Definition at line 1037 of file info.c.

{
       if (!sapi_module.phpinfo_as_text) {
              php_printf("<table border=\"0\" cellpadding=\"3\" width=\"600\">\n");
       } else {
              php_printf("\n");
       }      
}

Here is the call graph for this function:

Here is the caller graph for this function:

PHPAPI char* php_logo_guid ( void  )

Definition at line 1305 of file info.c.

{
       char *logo_guid;

       time_t the_time;
       struct tm *ta, tmbuf;

       the_time = time(NULL);
       ta = php_localtime_r(&the_time, &tmbuf);

       if (ta && (ta->tm_mon==3) && (ta->tm_mday==1)) {
              logo_guid = PHP_EGG_LOGO_GUID;
       } else {
              logo_guid = PHP_LOGO_GUID;
       }

       return estrdup(logo_guid);

}

Here is the call graph for this function:

Here is the caller graph for this function:

PHPAPI void php_print_info ( int flag  TSRMLS_DC)

Definition at line 655 of file info.c.

{
       char **env, *tmp1, *tmp2;
       char *php_uname;
       int expose_php = INI_INT("expose_php");

       if (!sapi_module.phpinfo_as_text) {
              php_print_info_htmlhead(TSRMLS_C);
       } else {
              PUTS("phpinfo()\n");
       }      

       if (flag & PHP_INFO_GENERAL) {
              char *zend_version = get_zend_version();
              char temp_api[10];
              char *logo_guid;

              php_uname = php_get_uname('a');
              
              if (!sapi_module.phpinfo_as_text) {
                     php_info_print_box_start(1);
              }

              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) {
                            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();
                     PUTS(logo_guid);
                     efree(logo_guid);
                     PUTS("\" alt=\"PHP Logo\" /></a>");
              }

              if (!sapi_module.phpinfo_as_text) {
                     php_printf("<h1 class=\"p\">PHP Version %s</h1>\n", PHP_VERSION);
              } else {
                     php_info_print_table_row(2, "PHP Version", PHP_VERSION);
              }      
              php_info_print_box_end();
              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

              if (sapi_module.pretty_name) {
                     php_info_print_table_row(2, "Server API", sapi_module.pretty_name );
              }

#ifdef VIRTUAL_DIR
              php_info_print_table_row(2, "Virtual Directory Support", "enabled" );
#else
              php_info_print_table_row(2, "Virtual Directory Support", "disabled" );
#endif

              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)");

              snprintf(temp_api, sizeof(temp_api), "%d", PHP_API_VERSION);
              php_info_print_table_row(2, "PHP API", temp_api);

              snprintf(temp_api, sizeof(temp_api), "%d", ZEND_MODULE_API_NO);
              php_info_print_table_row(2, "PHP Extension", temp_api);

              snprintf(temp_api, sizeof(temp_api), "%d", ZEND_EXTENSION_API_NO);
              php_info_print_table_row(2, "Zend Extension", temp_api);

              php_info_print_table_row(2, "Zend Extension Build", ZEND_EXTENSION_BUILD_ID);
              php_info_print_table_row(2, "PHP Extension Build", ZEND_MODULE_BUILD_ID);

#if ZEND_DEBUG
              php_info_print_table_row(2, "Debug Build", "yes" );
#else
              php_info_print_table_row(2, "Debug Build", "no" );
#endif

#ifdef ZTS
              php_info_print_table_row(2, "Thread Safety", "enabled" );
#else
              php_info_print_table_row(2, "Thread Safety", "disabled" );
#endif

              php_info_print_table_row(2, "Zend Memory Manager", is_zend_mm(TSRMLS_C) ? "enabled" : "disabled" );

#ifdef ZEND_MULTIBYTE
              php_info_print_table_row(2, "Zend Multibyte Support", "enabled");
#else
              php_info_print_table_row(2, "Zend Multibyte Support", "disabled");
#endif

#if HAVE_IPV6
              php_info_print_table_row(2, "IPv6 Support", "enabled" );
#else
              php_info_print_table_row(2, "IPv6 Support", "disabled" );
#endif
              {
                     HashTable *url_stream_wrappers_hash;
                     char *stream_protocol, *stream_protocols_buf = NULL;
                     int stream_protocol_len, stream_protocols_buf_len = 0;
                     ulong num_key;

                     if ((url_stream_wrappers_hash = php_stream_get_url_stream_wrappers_hash())) {
                            HashPosition pos;
                            for (zend_hash_internal_pointer_reset_ex(url_stream_wrappers_hash, &pos);
                                          zend_hash_get_current_key_ex(url_stream_wrappers_hash, &stream_protocol, (uint *)&stream_protocol_len, &num_key, 0, &pos) == HASH_KEY_IS_STRING;
                                          zend_hash_move_forward_ex(url_stream_wrappers_hash, &pos)) {
                                   stream_protocols_buf = erealloc(stream_protocols_buf, stream_protocols_buf_len + stream_protocol_len + 2 + 1);
                                   memcpy(stream_protocols_buf + stream_protocols_buf_len, stream_protocol, stream_protocol_len - 1);
                                   stream_protocols_buf[stream_protocols_buf_len + stream_protocol_len - 1] = ',';
                                   stream_protocols_buf[stream_protocols_buf_len + stream_protocol_len] = ' ';
                                   stream_protocols_buf_len += stream_protocol_len + 1;
                            }
                            if (stream_protocols_buf) {
                                   stream_protocols_buf[stream_protocols_buf_len - 2] = ' ';
                                   stream_protocols_buf[stream_protocols_buf_len] = 0;
                                   php_info_print_table_row(2, "Registered PHP Streams", stream_protocols_buf);
                                   efree(stream_protocols_buf);
                            } else {
                                   /* Any chances we will ever hit this? */
                                   php_info_print_table_row(2, "Registered PHP Streams", "no streams registered");
                            }
                     } else {
                            /* Any chances we will ever hit this? */
                            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())) {
                            HashPosition pos;
                            for(zend_hash_internal_pointer_reset_ex(stream_xport_hash, &pos);
                                   zend_hash_get_current_key_ex(stream_xport_hash, &xport_name, (uint *)&xport_name_len, &num_key, 0, &pos) == HASH_KEY_IS_STRING;
                                   zend_hash_move_forward_ex(stream_xport_hash, &pos)) {
                                   if (xport_buf_len + xport_name_len + 2 > xport_buf_size) {
                                          while (xport_buf_len + xport_name_len + 2 > 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 - 1);
                                   xport_buf_len += xport_name_len - 1;
                                   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"); /* ?? */
                     }
              }

              {
                     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())) {
                            HashPosition pos;
                            for(zend_hash_internal_pointer_reset_ex(stream_filter_hash, &pos);
                                   zend_hash_get_current_key_ex(stream_filter_hash, &filter_name, (uint *)&filter_name_len, &num_key, 0, &pos) == HASH_KEY_IS_STRING;
                                   zend_hash_move_forward_ex(stream_filter_hash, &pos)) {
                                   if (filter_buf_len + filter_name_len + 2 > filter_buf_size) {
                                          while (filter_buf_len + filter_name_len + 2 > 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 - 1);
                                   filter_buf_len += filter_name_len - 1;
                                   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();

              /* Zend Engine */
              php_info_print_box_start(0);
              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) {
                            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");
              }
              PUTS("This program makes use of the Zend Scripting Language Engine:");
              PUTS(!sapi_module.phpinfo_as_text?"<br />":"\n");
              if (sapi_module.phpinfo_as_text) {
                     PUTS(zend_version);
              } else {
                     zend_html_puts(zend_version, strlen(zend_version) TSRMLS_CC);
              }
              php_info_print_box_end();
              efree(php_uname);
       }

       if ((flag & PHP_INFO_CREDITS) && expose_php && !sapi_module.phpinfo_as_text) {      
              php_info_print_hr();
              PUTS("<h1><a href=\"");
              if (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-4C7B08C10000\">");
              PUTS("PHP Credits");
              PUTS("</a></h1>\n");
       }

       zend_ini_sort_entries(TSRMLS_C);

       if (flag & PHP_INFO_CONFIGURATION) {
              php_info_print_hr();
              if (!sapi_module.phpinfo_as_text) {
                     PUTS("<h1>Configuration</h1>\n");
              } else {
                     SECTION("Configuration");
              }      
              if (!(flag & PHP_INFO_MODULES)) {
                     SECTION("PHP Core");
                     display_ini_entries(NULL);
              }
       }

       if (flag & PHP_INFO_MODULES) {
              HashTable sorted_registry;
              zend_module_entry tmp;

              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);

              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");
              zend_hash_apply(&sorted_registry, (apply_func_t) _display_module_info_def TSRMLS_CC);
              php_info_print_table_end();

              zend_hash_destroy(&sorted_registry);
       }

       if (flag & PHP_INFO_ENVIRONMENT) {
              SECTION("Environment");
              php_info_print_table_start();
              php_info_print_table_header(2, "Variable", "Value");
              for (env=environ; env!=NULL && *env !=NULL; env++) {
                     tmp1 = estrdup(*env);
                     if (!(tmp2=strchr(tmp1,'='))) { /* malformed entry? */
                            efree(tmp1);
                            continue;
                     }
                     *tmp2 = 0;
                     tmp2++;
                     php_info_print_table_row(2, tmp1, tmp2);
                     efree(tmp1);
              }
              php_info_print_table_end();
       }

       if (flag & PHP_INFO_VARIABLES) {
              zval **data;

              SECTION("PHP Variables");

              php_info_print_table_start();
              php_info_print_table_header(2, "Variable", "Value");
              if (zend_hash_find(&EG(symbol_table), "PHP_SELF", sizeof("PHP_SELF"), (void **) &data) != FAILURE) {
                     php_info_print_table_row(2, "PHP_SELF", Z_STRVAL_PP(data));
              }
              if (zend_hash_find(&EG(symbol_table), "PHP_AUTH_TYPE", sizeof("PHP_AUTH_TYPE"), (void **) &data) != FAILURE) {
                     php_info_print_table_row(2, "PHP_AUTH_TYPE", Z_STRVAL_PP(data));
              }
              if (zend_hash_find(&EG(symbol_table), "PHP_AUTH_USER", sizeof("PHP_AUTH_USER"), (void **) &data) != FAILURE) {
                     php_info_print_table_row(2, "PHP_AUTH_USER", Z_STRVAL_PP(data));
              }
              if (zend_hash_find(&EG(symbol_table), "PHP_AUTH_PW", sizeof("PHP_AUTH_PW"), (void **) &data) != FAILURE) {
                     php_info_print_table_row(2, "PHP_AUTH_PW", Z_STRVAL_PP(data));
              }
              php_print_gpcse_array("_REQUEST", sizeof("_REQUEST")-1 TSRMLS_CC);
              php_print_gpcse_array("_GET", sizeof("_GET")-1 TSRMLS_CC);
              php_print_gpcse_array("_POST", sizeof("_POST")-1 TSRMLS_CC);
              php_print_gpcse_array("_FILES", sizeof("_FILES")-1 TSRMLS_CC);
              php_print_gpcse_array("_COOKIE", sizeof("_COOKIE")-1 TSRMLS_CC);
              php_print_gpcse_array("_SERVER", sizeof("_SERVER")-1 TSRMLS_CC);
              php_print_gpcse_array("_ENV", sizeof("_ENV")-1 TSRMLS_CC);
              php_info_print_table_end();
       }

       if (flag & PHP_INFO_LICENSE) {
              if (!sapi_module.phpinfo_as_text) {
                     SECTION("PHP License");
                     php_info_print_box_start(0);
                     PUTS("<p>\n");
                     PUTS("This program is free software; you can redistribute it and/or modify ");
                     PUTS("it under the terms of the PHP License as published by the PHP Group ");
                     PUTS("and included in the distribution in the file:  LICENSE\n");
                     PUTS("</p>\n");
                     PUTS("<p>");
                     PUTS("This program is distributed in the hope that it will be useful, ");
                     PUTS("but WITHOUT ANY WARRANTY; without even the implied warranty of ");
                     PUTS("MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n");
                     PUTS("</p>\n");
                     PUTS("<p>");
                     PUTS("If you did not receive a copy of the PHP license, or have any questions about ");
                     PUTS("PHP licensing, please contact license@php.net.\n");
                     PUTS("</p>\n");
                     php_info_print_box_end();
              } else {
                     PUTS("\nPHP License\n");
                     PUTS("This program is free software; you can redistribute it and/or modify\n");
                     PUTS("it under the terms of the PHP License as published by the PHP Group\n");
                     PUTS("and included in the distribution in the file:  LICENSE\n");
                     PUTS("\n");
                     PUTS("This program is distributed in the hope that it will be useful,\n");
                     PUTS("but WITHOUT ANY WARRANTY; without even the implied warranty of\n");
                     PUTS("MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n");
                     PUTS("\n");
                     PUTS("If you did not receive a copy of the PHP license, or have any\n");
                     PUTS("questions about PHP licensing, please contact license@php.net.\n");
              }
       }
       if (!sapi_module.phpinfo_as_text) {
              PUTS("</div></body></html>");
       }      
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 594 of file info.c.

{

/*** none of this is needed now ***

       const char *charset = NULL;

       if (SG(default_charset)) {
              charset = SG(default_charset);
       }

#if HAVE_MBSTRING
       if (php_ob_handler_used("mb_output_handler" TSRMLS_CC)) {
              if (MBSTRG(current_http_output_encoding) == mbfl_no_encoding_pass) {
                     charset = "US-ASCII";
              } else {
                     charset = mbfl_no2preferred_mime_name(MBSTRG(current_http_output_encoding));
              }
       }
#endif   

#if HAVE_ICONV
       if (php_ob_handler_used("ob_iconv_handler" TSRMLS_CC)) {
              charset = ICONVG(output_encoding);
       }
#endif

       if (!charset || !charset[0]) {
              charset = "US-ASCII";
       }

*** none of that is needed now ***/


       PUTS("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"DTD/xhtml1-transitional.dtd\">\n");
       PUTS("<html xmlns=\"http://www.w3.org/1999/xhtml\">");
       PUTS("<head>\n");
       php_info_print_style(TSRMLS_C);
       PUTS("<title>phpinfo()</title>");
       PUTS("<meta name=\"ROBOTS\" content=\"NOINDEX,NOFOLLOW,NOARCHIVE\" />");
/*
       php_printf("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=%s\" />\n", charset);
*/
       PUTS("</head>\n");
       PUTS("<body><div class=\"center\">\n");
}

Here is the call graph for this function:

Here is the caller graph for this function:

PHPAPI void php_print_style ( void  )