php-src/ext/standard/info.c

848 lines
25 KiB
C
Raw Normal View History

/*
+----------------------------------------------------------------------+
2001-12-11 15:32:16 +00:00
| PHP Version 4 |
+----------------------------------------------------------------------+
2001-12-11 15:32:16 +00:00
| Copyright (c) 1997-2002 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 2.02 of the PHP license, |
1999-07-16 13:13:16 +00:00
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.php.net/license/2_02.txt. |
1999-07-16 13:13:16 +00:00
| If you did not receive a copy of the PHP license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
2002-02-28 08:29:35 +00:00
| Authors: Rasmus Lerdorf <rasmus@php.net> |
| Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
/* $Id$ */
1999-04-23 20:06:01 +00:00
#include "php.h"
#include "php_ini.h"
#include "php_globals.h"
#include "ext/standard/head.h"
#include "info.h"
#include "credits.h"
#include "SAPI.h"
#include <time.h>
2002-03-04 20:14:52 +00:00
#include "php_main.h"
2000-02-11 15:59:30 +00:00
#if !defined(PHP_WIN32)
#include "build-defs.h"
#endif
#include "zend_globals.h" /* needs ELS */
#include "zend_extensions.h"
2000-05-19 08:28:53 +00:00
#include "zend_highlight.h"
#ifdef HAVE_SYS_UTSNAME_H
#include <sys/utsname.h>
#endif
#if HAVE_MBSTRING
#include "ext/mbstring/mbstring.h"
ZEND_EXTERN_MODULE_GLOBALS(mbstring)
#endif
#if HAVE_ICONV
#include "ext/iconv/php_iconv.h"
ZEND_EXTERN_MODULE_GLOBALS(iconv)
#endif
#define SECTION(name) if (PG(html_errors)) { \
PUTS("<h2 align=\"center\">" name "</h2>\n"); \
} else { \
php_info_print_table_start(); \
php_info_print_table_header(1, name); \
php_info_print_table_end(); \
} \
PHPAPI extern char *php_ini_opened_path;
/* {{{ _display_module_info
*/
2001-07-31 04:53:54 +00:00
static int _display_module_info(zend_module_entry *module, void *arg TSRMLS_DC)
{
int show_info_func = *((int *) arg);
if (show_info_func && module->info_func) {
if (PG(html_errors)) {
php_printf("<h2 align=\"center\"><a name=\"module_%s\">%s</a></h2>\n", module->name, module->name);
} else {
php_info_print_table_start();
php_info_print_table_header(1, module->name);
php_info_print_table_end();
}
module->info_func(module TSRMLS_CC);
} else if (!show_info_func && !module->info_func) {
if (PG(html_errors)) {
php_printf("<tr valign=\"baseline\" bgcolor=\"" PHP_CONTENTS_COLOR "\">");
php_printf("<td>");
php_printf("%s", module->name);
php_printf("</td></tr>\n");
} else {
php_printf(module->name);
php_printf("\n");
}
}
return 0;
}
/* }}} */
/* {{{ php_print_gpcse_array
*/
static void php_print_gpcse_array(char *name, uint name_length TSRMLS_DC)
2000-02-05 22:58:59 +00:00
{
2001-03-04 15:49:38 +00:00
zval **data, **tmp, tmp2;
char *string_key;
2002-05-12 14:48:22 +00:00
uint string_len;
2000-02-05 22:58:59 +00:00
ulong num_key;
if (zend_hash_find(&EG(symbol_table), name, name_length+1, (void **) &data)!=FAILURE
&& (Z_TYPE_PP(data)==IS_ARRAY)) {
zend_hash_internal_pointer_reset(Z_ARRVAL_PP(data));
while (zend_hash_get_current_data(Z_ARRVAL_PP(data), (void **) &tmp) == SUCCESS) {
if (PG(html_errors)) {
PUTS("<tr valign=\"baseline\" bgcolor=\"" PHP_CONTENTS_COLOR "\">");
PUTS("<td bgcolor=\"" PHP_ENTRY_NAME_COLOR "\"><b>");
}
2000-02-05 22:58:59 +00:00
PUTS(name);
PUTS("[\"");
2002-05-12 14:48:22 +00:00
switch (zend_hash_get_current_key_ex(Z_ARRVAL_PP(data), &string_key, &string_len, &num_key, 0, NULL)) {
2000-02-05 22:58:59 +00:00
case HASH_KEY_IS_STRING:
if (PG(html_errors)) {
zend_html_puts(string_key, string_len-1);
} else {
PUTS(string_key);
}
2000-02-05 22:58:59 +00:00
break;
case HASH_KEY_IS_LONG:
2001-08-11 17:03:37 +00:00
php_printf("%ld", num_key);
2000-02-05 22:58:59 +00:00
break;
}
PUTS("\"]");
if (PG(html_errors)) {
PUTS("</b></td><td>");
} else {
PUTS(" => ");
}
if (Z_TYPE_PP(tmp) == IS_ARRAY) {
if (PG(html_errors)) {
PUTS("<pre>");
}
2000-02-05 22:58:59 +00:00
zend_print_zval_r(*tmp, 0);
if (PG(html_errors)) {
PUTS("</pre>");
}
} else if (Z_TYPE_PP(tmp) != IS_STRING) {
2001-03-04 15:49:38 +00:00
tmp2 = **tmp;
zval_copy_ctor(&tmp2);
convert_to_string(&tmp2);
if (PG(html_errors)) {
zend_html_puts(Z_STRVAL(tmp2), Z_STRLEN(tmp2));
} else {
PUTS(Z_STRVAL(tmp2));
}
2001-03-04 15:49:38 +00:00
zval_dtor(&tmp2);
2000-02-05 22:58:59 +00:00
} else {
if (PG(html_errors)) {
zend_html_puts(Z_STRVAL_PP(tmp), Z_STRLEN_PP(tmp));
} else {
PUTS(Z_STRVAL_PP(tmp));
}
2000-02-05 22:58:59 +00:00
}
if (PG(html_errors)) {
PUTS("&nbsp;</td></tr>\n");
} else {
PUTS("\n");
}
zend_hash_move_forward(Z_ARRVAL_PP(data));
2000-02-05 22:58:59 +00:00
}
}
}
/* }}} */
2000-02-05 22:58:59 +00:00
/* {{{ php_info_print_style
*/
2000-08-21 09:50:53 +00:00
void php_info_print_style(void)
{
php_printf("<style type=\"text/css\"><!--\n");
2001-06-19 15:21:28 +00:00
php_printf("a { text-decoration: none; }\n");
php_printf("a:hover { text-decoration: underline; }\n");
2001-08-11 17:03:37 +00:00
php_printf("h1 { font-family: arial, helvetica, sans-serif; font-size: 18pt; font-weight: bold;}\n");
php_printf("h2 { font-family: arial, helvetica, sans-serif; font-size: 14pt; font-weight: bold;}\n");
php_printf("body, td { font-family: arial, helvetica, sans-serif; font-size: 10pt; }\n");
php_printf("th { font-family: arial, helvetica, sans-serif; font-size: 11pt; font-weight: bold; }\n");
2001-06-19 15:21:28 +00:00
php_printf("//--></style>\n");
}
/* }}} */
/* {{{ php_get_uname
*/
PHPAPI char *php_get_uname(char mode)
{
1999-12-18 04:01:20 +00:00
char *php_uname;
char tmp_uname[256];
2000-02-11 15:59:30 +00:00
#ifdef PHP_WIN32
DWORD dwBuild=0;
DWORD dwVersion = GetVersion();
DWORD dwWindowsMajorVersion = (DWORD)(LOBYTE(LOWORD(dwVersion)));
DWORD dwWindowsMinorVersion = (DWORD)(HIBYTE(LOWORD(dwVersion)));
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') {
2002-07-01 18:52:30 +00:00
/* XXX HOW TO GET THIS ON WINDOWS? */
php_uname = "localhost";
} else if (mode == 'v') {
dwBuild = (DWORD)(HIWORD(dwVersion));
snprintf(tmp_uname, sizeof(tmp_uname), "build %d", dwBuild);
php_uname = tmp_uname;
} else if (mode == 'm') {
2002-07-01 18:52:30 +00:00
/* XXX HOW TO GET THIS ON WINDOWS? */
php_uname = "i386";
2002-07-01 18:52:30 +00:00
} else { /* assume mode == 'a' */
/* Get build numbers for Windows NT or Win95 */
if (dwVersion < 0x80000000){
dwBuild = (DWORD)(HIWORD(dwVersion));
snprintf(tmp_uname, sizeof(tmp_uname), "%s %s %d.%d build %d",
"Windows NT", "localhost",
dwWindowsMajorVersion, dwWindowsMinorVersion, dwBuild);
} else {
snprintf(tmp_uname, sizeof(tmp_uname), "%s %s %d.%d",
"Windows 9x", "localhost",
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 {
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;
2002-07-01 18:52:30 +00:00
} 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;
}
}
#else
php_uname = PHP_UNAME;
#endif
#endif
return estrdup(php_uname);
}
/* }}} */
/* {{{ php_print_info
*/
2001-07-30 09:16:46 +00:00
PHPAPI void php_print_info(int flag TSRMLS_DC)
{
char **env, *tmp1, *tmp2;
const char *charset = NULL;
char *php_uname;
int expose_php = INI_INT("expose_php");
time_t the_time;
struct tm *ta, tmbuf;
the_time = time(NULL);
ta = php_localtime_r(&the_time, &tmbuf);
if (PG(html_errors)) {
PUTS("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n<html>\n");
PUTS("<head>");
php_info_print_style();
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";
}
fix for #18782 (setting background color without making sure the text crtmut in /new/php/php4untouched on hartmut php4untouched > cvs update ext/standard/info. cvs [update aborted]: received interrupt signal hartmut in /new/php/php4untouched on hartmut php4untouched > cvs update ext/standard/info.c RCS file: /repository/php4/ext/standard/info.c,v retrieving revision 1.184 retrieving revision 1.188 Merging differences between 1.184 and 1.188 into info.c rcsmerge: warning: conflicts during merge cvs server: conflicts found in ext/standard/info.c C ext/standard/info.c hartmut in /new/php/php4untouched on hartmut php4untouched > cvs log ext/standard/info.c RCS file: /repository/php4/ext/standard/info.c,v Working file: ext/standard/info.c head: 1.188 branch: locks: strict access list: symbolic names: dev/: 1.188 php_4_2_2: 1.167.2.1 PHP_4_2_2: 1.167.2.1.0.2 php_4_3_0_dev_zend2_alpha2: 1.183 php5_5_0: 1.182 php_4_3_0dev: 1.182 php_4_3_0_dev_zend2_alpha1: 1.181 php_4_2_1: 1.167.2.1 php_4_2_1RC2: 1.167.2.1 php_4_2_1RC1: 1.167.2.1 php_4_2_0: 1.167.2.1 php_4_2_0RC4: 1.167.2.1 php_4_2_0RC3: 1.167.2.1 php_4_2_0RC2: 1.167.2.1 php_4_2_0RC1: 1.167.2.1 PHP_4_2_0: 1.167.0.2 php_4_1_2: 1.153.2.1 php_4_1_1: 1.153.2.1 ChangeLog: 1.161 php_4_1_0: 1.153.2.1 php_4_1_0RC5: 1.153.2.1 php_4_1_0RC4: 1.153.2.1 php_4_1_0RC3: 1.153.2.1 php_4_1_0RC2: 1.153.2.1 php_4_1_0RC1: 1.153.2.1 php_4_0_7RC3: 1.153 php4: 1.157 POST_SUBST_Z_MACROS: 1.157 PRE_SUBST_Z_MACROS: 1.155 php_4_0_7RC2: 1.153 RAND_REDESIGN: 1.154.0.2 php_4_0_7RC1: 1.153 PHP_4_0_7: 1.153.0.2 PRE_TSRM_MERGE_PATCH: 1.142 php_4_0_6: 1.137.2.1 php_4_0_6RC4: 1.137.2.1 php_4_0_6RC3: 1.137.2.1 php_4_0_6RC2: 1.137.2.1 php_4_0_6RC1: 1.137 PHP_4_0_6: 1.137.0.2 php_4_0_5: 1.132 php_4_0_5RC8: 1.132 php_4_0_5RC7: 1.132 php_4_0_5RC6: 1.132 php_4_0_5RC5: 1.132 php_4_0_5RC4: 1.132 php_4_0_5RC3: 1.132 php_4_0_5RC2: 1.132 php_4_0_5RC1: 1.132 PHP_4_0_5: 1.132.0.2 php_4_0_4pl1: 1.124 php_4_0_4pl1RC2: 1.124 php_4_0_4pl1RC1: 1.124 php_4_0_4REL: 1.124 php_4_0_4RC6: 1.124 php_4_0_4RC5: 1.124 php_4_0_4RC4: 1.124 php_4_0_4RC3: 1.124 php_4_0_4: 1.124.0.2 php_4_0_3: 1.116 php_4_0_3RC2: 1.114 php_4_0_3RC1: 1.114 php_4_0_2: 1.113 php_4_0_2RC1: 1.110 PRE_FILE_COMPILE_API_CHANGE: 1.108 php_4_0_1pl1: 1.104 php_4_0_1: 1.104 php_4_0_1RC2: 1.104 php_4_0_1RC: 1.101 php_4_0_0: 1.93 php_4_0RC2: 1.89 php_4_0RC1: 1.70 php_4_0b4pl1: 1.67 php_4_0b4: 1.65 php_4_0b4_rc1: 1.65 BEFORE_SAPI_POST_PATCH_17_FEB_2000: 1.62 BEFORE_SAPIFICATION_FEB_10_2000: 1.60 BEFORE_PRE_SHUTDOWN_REVERSE_PATCH: 1.57 PRE_ISSET_TYPE: 1.55 PRE_LIBZEND_TO_ZEND: 1.51 PRE_USED_RETURN_VALUE_PATCH: 1.39 php_4_0b3: 1.39 php_4_0b3_RC5: 1.39 php_4_0b3_RC4: 1.39 php_4_0b3_RC3: 1.39 php_4_0b3_RC2: 1.39 before-sapi-split: 1.36 php_4_0b2: 1.30 php_4_0b2-2: 1.27 php_4_0b2-1: 1.27 BEFORE_NEW_OPERATOR_FIX: 1.26 newoperator: 1.26.0.2 BEFORE_BIG_SYMBOL_CHANGE: 1.26 php_4_0b1: 1.25 BEFORE_REMOVING_AI_COUNT_FINAL_STEP: 1.14 BEFORE_REMOVING_GC_STEP1: 1.14 BEFORE_PHP4_APACHE_MODULE_CHANGE: 1.14 keyword substitution: kv total revisions: 191; selected revisions: 191 description: ---------------------------- revision 1.188 date: 2002/08/05 19:00:09; author: helly; state: Exp; lines: +16 -2 Correct carset if iconv is active #Same solution would work for mbstring - but that must wait ---------------------------- revision 1.187 date: 2002/08/04 22:49:48; author: helly; state: Exp; lines: +9 -3 -Send charset US-ASCII or ini setting default_charset. #After some discussion with Ilia Alshanetsky #But perhaps we should have a look for a mbstring solution... ---------------------------- revision 1.186 date: 2002/08/04 18:59:16; author: georg; state: Exp; lines: +2 -2 ups.. :) ---------------------------- revision 1.185 date: 2002/08/04 18:57:02; author: georg; state: Exp; lines: +2 -2 added meta tag (w3c compliance) Thx to Ilia Alshanetsky (ilia@prohost.org) ---------------------------- revision 1.184 date: 2002/07/01 18:52:30; author: derick; state: Exp; lines: +8 -8 - No C++ comments ---------------------------- revision 1.183 date: 2002/06/19 13:24:01; author: sander; state: Exp; lines: +7 -12 Made the API versions appear better on phpinfo(); ---------------------------- revision 1.182 date: 2002/06/08 10:25:44; author: mfischer; state: Exp; lines: +32 -2 - Since streams are always enabled, instead of just printing 'enabled' we tell what streams are currently registered. ---------------------------- revision 1.181 date: 2002/05/24 17:25:40; author: sander; state: Exp; lines: +4 -4 Fix <head> and <body> tags in phpinfo() output (#17411) ---------------------------- revision 1.180 date: 2002/05/13 17:43:04; author: zeev; state: Exp; lines: +6 -6 - Fix a buglet in printing of GPCSE arrays - Remove indirect access ---------------------------- revision 1.179 date: 2002/05/13 08:46:21; author: zeev; state: Exp; lines: +4 -1 - Centralize html_puts() again - Revolutionize phpinfo()'s speed ---------------------------- revision 1.178 date: 2002/05/12 14:50:54; author: sas; state: Exp; lines: +2 -2 Use string_len information ---------------------------- revision 1.177 date: 2002/05/12 14:48:22; author: sas; state: Exp; lines: +7 -6 reenable php_html_puts ---------------------------- revision 1.176 date: 2002/05/11 12:41:32; author: zeev; state: Exp; lines: +6 -6 Centralize html_puts() logic - php_html_puts() remains as an API wrapper ---------------------------- revision 1.175 date: 2002/05/09 11:56:52; author: derick; state: Exp; lines: +4 -1 - Add PHP_API_VERSION too ---------------------------- revision 1.174 date: 2002/05/09 11:47:37; author: derick; state: Exp; lines: +7 -4 - Show both API nos ---------------------------- revision 1.173 date: 2002/05/02 17:36:00; author: fmk; state: Exp; lines: +2 -2 Fixing wrong pointer ---------------------------- revision 1.172 date: 2002/05/02 12:33:03; author: derick; state: Exp; lines: +7 -1 - Add Zend API No. to phpinofo() output ---------------------------- revision 1.171 date: 2002/03/29 10:19:23; author: ssb; state: Exp; lines: +71 -17 (PHP php_uname) display runtime uname rather than compile-time uname, added an optional parameter to get single fields (like uname(1)) # Windows version is not tested, and I didn't know how to get # `uname -n` on Windows, so it's hardcoded to "localhost" for now. # Windows gurus feel free to fix. :-) ---------------------------- revision 1.170 date: 2002/03/15 21:03:05; author: wez; state: Exp; lines: +2 -4 New PHP streams... ---------------------------- revision 1.169 date: 2002/03/14 18:39:53; author: zeev; state: Exp; lines: +3 -3 Change case for consistency ---------------------------- revision 1.168 date: 2002/03/14 13:35:19; author: zeev; state: Exp; lines: +3 -3 Make it clearer what this entry means ---------------------------- revision 1.167 date: 2002/03/04 20:14:52; author: sas; state: Exp; lines: +2 -1 branches: 1.167.2; Add apparently missing include ---------------------------- revision 1.166 date: 2002/03/04 18:46:53; author: sas; state: Exp; lines: +7 -6 Supply php_html_puts which escapes a whole string.. now fully works in ZTS mode, too. ---------------------------- revision 1.165 date: 2002/03/04 18:12:55; author: sas; state: Exp; lines: +5 -5 revert last commit, puts does more through putc. ---------------------------- revision 1.164 date: 2002/03/04 17:48:20; author: sas; state: Exp; lines: +6 -6 Use PHPWRITE to output data. Because this just outputs diagnostic information, a few spaces won't hurt (and multiple ones are rendered as one by browsers anyway). Micro-benchmarks which use phpinfo() as a mean to generate output will yield more through-put now (35 req/s vs. 83 req/s in tux). ---------------------------- revision 1.163 date: 2002/02/28 08:26:45; author: sebastian; state: Exp; lines: +2 -2 Maintain headers. ---------------------------- revision 1.162 date: 2001/12/29 14:23:58; author: sebastian; state: Exp; lines: +2 -2 PHP 4.0 -> PHP 4. Patch by Martin Jansen <mail@martin-jansen.de>. ---------------------------- revision 1.161 date: 2001/12/11 15:30:32; author: sebastian; state: Exp; lines: +3 -3 Update headers. ---------------------------- revision 1.160 date: 2001/12/06 13:31:34; author: sterling; state: Exp; lines: +3 -3 use PHP_INFO_ALL and PHP_CREDITS_ALL instead of hardcoding them ---------------------------- revision 1.159 date: 2001/10/11 23:33:49; author: ssb; state: Exp; lines: +17 -6 * zend_module_entry change: apino, debug and zts are moved first, see README.EXTENSIONS file for upgrade help. @Introduced extension version numbers (Stig) ---------------------------- revision 1.158 date: 2001/10/06 20:13:37; author: derick; state: Exp; lines: +3 -3 - <br> -> <br /> ---------------------------- revision 1.157 date: 2001/09/25 22:48:43; author: jeroen; state: Exp; lines: +2 -2 2nd phase in back-substitution those macro's I've got pretty much everything now... ---------------------------- revision 1.156 date: 2001/09/25 21:58:23; author: jeroen; state: Exp; lines: +13 -13 Back-substitute for Z_* macro's. If it breaks some extension (the script isn't optimal, it parses for example var->zval.value incorrect) please let me know. ---------------------------- revision 1.155 date: 2001/09/09 13:29:18; author: derick; state: Exp; lines: +3 -3 - Don't wrap lines... this is annoying while coding. ---------------------------- revision 1.154 date: 2001/08/15 22:37:31; author: sniper; state: Exp; lines: +2 -2 Add the build time too. Bug: #12774 ---------------------------- revision 1.153 date: 2001/08/13 19:31:16; author: zeev; state: Exp; lines: +5 -3 branches: 1.153.2; Fix crashes in parse_parameters calls HEADS UP: Make sure you supply TSRMLS_CC for this function! I'll try to think of a way that'd allow us to find this issue using the compiler. ---------------------------- revision 1.152 date: 2001/08/13 07:55:38; author: rasmus; state: Exp; lines: +19 -13 Track down a few more functions that don't check for 0 args and use faster mechanism ---------------------------- revision 1.151 date: 2001/08/13 07:28:57; author: rasmus; state: Exp; lines: +3 -1 Oops, a little too much simplification there.. ;) ---------------------------- revision 1.150 date: 2001/08/13 06:43:47; author: rasmus; state: Exp; lines: +34 -36 We don't consistently check for args passed to functions that don't take any args. In some cases we probably want to skip the check for performance reasons, but in other cases where performance is unlikely to be a factor, not throwing a warning on the wrong number of args passed to a function is at best inconsistent, and at worst it could hide a bug. So, add a few such checks. There are still lots of cases out there. ---------------------------- revision 1.149 date: 2001/08/11 17:03:37; author: zeev; state: Exp; lines: +11 -11 Whitespace ---------------------------- revision 1.148 date: 2001/08/08 17:16:20; author: zeev; state: Exp; lines: +8 -7 - Implement $_FORM - Update phpinfo() - Update NEWS ---------------------------- revision 1.147 date: 2001/07/31 04:53:50; author: zeev; state: Exp; lines: +4 -5 More TSRMLS_FETCH work ---------------------------- revision 1.146 date: 2001/07/30 09:16:44; author: zeev; state: Exp; lines: +3 -4 More TSRMLS_FETCH work ---------------------------- revision 1.145 date: 2001/07/30 06:18:06; author: zeev; state: Exp; lines: +3 -2 More TSRMLS_FETCH work, and a bit of cleanup ---------------------------- revision 1.144 date: 2001/07/28 11:36:17; author: zeev; state: Exp; lines: +1 -2 Redesigned thread safety mechanism - nua nua ---------------------------- revision 1.143 date: 2001/07/27 10:16:30; author: zeev; state: Exp; lines: +10 -10 - Get rid of ELS_*(), and use TSRMLS_*() instead. - Move to the new ts_allocate_id() API This patch is *bound* to break some files, as I must have had typos somewhere. If you use any uncommon extension, please try to build it... ---------------------------- revision 1.142 date: 2001/06/19 15:21:28; author: sbergmann; state: Exp; lines: +12 -12 Finish phpinfo() HTML 4.01 tweaking. ---------------------------- revision 1.141 date: 2001/06/15 18:34:09; author: sbergmann; state: Exp; lines: +38 -40 Make output of phpinfo() compliant with HTML 4.01. ---------------------------- revision 1.140 date: 2001/06/06 13:05:51; author: rasmus; state: Exp; lines: +27 -13 Fix folding and clean up some extensions ---------------------------- revision 1.139 date: 2001/06/05 13:12:04; author: rasmus; state: Exp; lines: +2 -1 vim-6 does folding - clean up a bunch of missing folding tags plus some misguided RINIT and RSHUTDOWN calls in a few fringe extensions ---------------------------- revision 1.138 date: 2001/05/20 01:31:53; author: sniper; state: Exp; lines: +2 -2 This looks better. ---------------------------- revision 1.137 date: 2001/05/11 13:34:49; author: derick; state: Exp; lines: +2 -2 branches: 1.137.2; Tabs please... ---------------------------- revision 1.136 date: 2001/05/11 13:32:10; author: sbergmann; state: Exp; lines: +3 -1 Fix for bug #10815. ---------------------------- revision 1.135 date: 2001/05/06 15:20:56; author: sniper; state: Exp; lines: +14 -14 Fix bug: #10323. Every value outputted is now escaped. ---------------------------- revision 1.134 date: 2001/04/22 01:09:13; author: ssb; state: Exp; lines: +2 -2 * expanded the following constants and made them available in PHP: DEFAULT_INCLUDE_PATH PEAR_INSTALL_DIR PHP_EXTENSION_DIR PHP_BINDIR PHP_LIBDIR PHP_DATADIR PHP_SYSCONFDIR PHP_LOCALSTATEDIR PHP_CONFIG_FILE_PATH * no longer generating pear/PEAR.php * fixed some tests * some more installer work ---------------------------- revision 1.133 date: 2001/04/17 17:06:06; author: wez; state: Exp; lines: +6 -1 Changes for streams. Added temporary fopenstream function to PHP so that the streams can be tested. ---------------------------- revision 1.132 date: 2001/03/04 22:03:23; author: zeev; state: Exp; lines: +2 -2 I don't know German, but I imagine that was the problem :) ---------------------------- revision 1.131 date: 2001/03/04 15:49:38; author: zeev; state: Exp; lines: +7 -8 Fix phpinfo() bug that crept in ---------------------------- revision 1.130 date: 2001/03/04 02:41:27; author: fmk; state: Exp; lines: +9 -15 Changed code layout to remove PHP warning when running php as a CGI. ---------------------------- revision 1.129 date: 2001/02/26 06:07:17; author: andi; state: Exp; lines: +2 -2 - Fix copyright notices with 2001 ---------------------------- revision 1.128 date: 2001/01/02 22:49:26; author: zeev; state: Exp; lines: +3 -3 Many patches. I hope I remember them all: - Make sapi_module available to external modules (PHPAPI) - Make the php.ini path reported in phpinfo() always point to real full path of the php.ini file - Optimized the ISAPI module not to read unnecessary server variables and read necessary variables at most once. ---------------------------- revision 1.127 date: 2000/12/27 15:43:05; author: zeev; state: Exp; lines: +2 -2 - Make the INI mechanism thread safe (fix necessary API changes from Zend) - Make the Win32 non-TS configuration build again ---------------------------- revision 1.126 date: 2000/12/22 12:57:08; author: zeev; state: Exp; lines: +2 -3 Heads up people! Updated the get_current_key() API - the relevant authors, please take a look at the updated code and make sure it's ok... ---------------------------- revision 1.125 date: 2000/12/19 22:59:14; author: zeev; state: Exp; lines: +2 -1 Add the QA team to the credits ---------------------------- revision 1.124 date: 2000/11/20 10:05:57; author: hholzgra; state: Exp; lines: +1 -146 first step towards auto-generated credits ---------------------------- revision 1.123 date: 2000/11/19 19:18:12; author: hholzgra; state: Exp; lines: +2 -2 typo fix (copy/paste bug?) ---------------------------- revision 1.122 date: 2000/11/11 18:38:26; author: sas; state: Exp; lines: +7 -6 Add Apache 2.0 sapi module and sort alphabetically. ---------------------------- revision 1.121 date: 2000/11/06 22:53:11; author: derick; state: Exp; lines: +2 -2 - Added myself to the credits... ---------------------------- revision 1.120 date: 2000/11/05 23:34:49; author: jdonagher; state: Exp; lines: +25 -5 Bring phpcredits() up to date ---------------------------- revision 1.119 date: 2000/11/02 19:07:15; author: neotron; state: Exp; lines: +2 -2 Added Caudium to credit line. ---------------------------- revision 1.118 date: 2000/10/31 17:21:52; author: hholzgra; state: Exp; lines: +4 -4 generalization of image handling in phpinfo ---------------------------- revision 1.117 date: 2000/10/29 11:38:24; author: zeev; state: Exp; lines: +2 -2 Initial steps to move the INI mechanism to the Zend engine ---------------------------- revision 1.116 date: 2000/10/11 13:51:32; author: hholzgra; state: Exp; lines: +3 -3 proto typo fixes ---------------------------- revision 1.115 date: 2000/10/11 11:40:29; author: hholzgra; state: Exp; lines: +10 -1 added missing protos ---------------------------- revision 1.114 date: 2000/09/30 16:12:54; author: andi; state: Exp; lines: +2 -2 - Cleanup some output functions ---------------------------- revision 1.113 date: 2000/08/27 22:46:40; author: rasmus; state: Exp; lines: +17 -20 Some minor cleanup to make W3C's tidy validator happy ---------------------------- revision 1.112 date: 2000/08/27 19:42:45; author: ssb; state: Exp; lines: +35 -19 @Added php_uname() function (Stig) Added php_uname() function. ---------------------------- revision 1.111 date: 2000/08/26 12:53:13; author: rubys; state: Exp; lines: +2 -1 Add ***EXPERIMENTAL*** Zend OO Extension support for Microsoft.Net ---------------------------- revision 1.110 date: 2000/08/21 09:50:52; author: sas; state: Exp; lines: +2 -2 Cleaning up some mess ---------------------------- revision 1.109 date: 2000/08/20 14:43:56; author: sas; state: Exp; lines: +2 -2 Fix numerus of SAPI Modules title ---------------------------- revision 1.108 date: 2000/07/26 05:41:38; author: sterling; state: Exp; lines: +2 -1 * EXTENSIONS -- update status on CURL & SWF * NEWS -- 1. Change wording for the ibase and sybase DB announcement. 2. Remove second pfpro announcement, if pfpro is being released with 4.0.2 entries about new features before 4.0.2 shouldn't be in there. 3. Joey, that entry just doesn't seem incredibly relevant to the NEWS file, I'll backport it if you want (or add a new entry). * ext/standard/info.c -- Add a CREDIT_LINE() for CURL. ---------------------------- revision 1.107 date: 2000/07/25 10:54:07; author: stas; state: Exp; lines: +3 -3 Report configuration path that is really used, not that is compiled in # it does matter when using -c option ---------------------------- revision 1.106 date: 2000/07/24 01:39:49; author: david; state: Exp; lines: +3 -1 Changed lots of PHP 3 licence headers to PHP 4, mainly in .h files. Added a few RCS $Id$ tags. # Note: I have avoided changing any .h files if the corresponding .c file # had not already been changed as I am not sure if there are any legal # issues here. So some extensions still have PHP 3 headers. ---------------------------- revision 1.105 date: 2000/07/08 19:31:16; author: eschmid; state: Exp; lines: +1 -1 Uncomplete proto. ---------------------------- revision 1.104 date: 2000/06/26 18:05:49; author: andrei; state: Exp; lines: +2 -2 Separate plain name returned by php_sapi_module() and pretty name used for output. ---------------------------- revision 1.103 date: 2000/06/26 14:55:38; author: kk; state: Exp; lines: +3 -2 Corrected a syntax error: Macro requires braces. ---------------------------- revision 1.102 date: 2000/06/26 14:43:37; author: kk; state: Exp; lines: +12 -0 Added function php_sapi_name() as written by Stefan Livieratos. ---------------------------- revision 1.101 date: 2000/06/17 07:08:53; author: hholzgra; state: Exp; lines: +1 -1 changed default cell alignment to "left" (see bug id #5048) ---------------------------- revision 1.100 date: 2000/06/16 18:23:57; author: hholzgra; state: Exp; lines: +2 -2 C++ // comments are evil ... ---------------------------- revision 1.99 date: 2000/06/09 01:50:44; author: zeev; state: Exp; lines: +9 -7 Move back everything to where it belongs... ---------------------------- revision 1.98 date: 2000/06/06 17:26:15; author: hholzgra; state: Exp; lines: +1 -1 added missing '/' to closing <center> tag (BUG ID #4416) ---------------------------- revision 1.97 date: 2000/06/05 19:47:44; author: andi; state: Exp; lines: +2 -2 - ARG_COUNT(ht) -> ZEND_NUM_ARGS() mega patch ---------------------------- revision 1.96 date: 2000/06/03 03:05:29; author: zeev; state: Exp; lines: +1 -0 - Make the INI entries sorted in phpinfo() ---------------------------- revision 1.95 date: 2000/05/27 00:24:03; author: zeev; state: Exp; lines: +1 -1 Add Sam Ruby ---------------------------- revision 1.94 date: 2000/05/25 11:01:31; author: kk; state: Exp; lines: +2 -0 - Added credits. ---------------------------- revision 1.93 date: 2000/05/19 08:28:53; author: zeev; state: Exp; lines: +6 -1 Minor output mods ---------------------------- revision 1.92 date: 2000/05/18 15:34:35; author: zeev; state: Exp; lines: +2 -2 Update the license with the new clause 6 ---------------------------- revision 1.91 date: 2000/05/12 20:49:26; author: sterling; state: Exp; lines: +1 -0 Add Meself for LibSWF. ---------------------------- revision 1.90 date: 2000/05/12 20:11:14; author: jah; state: Exp; lines: +3 -3 # Correct spelling, adding Andrew because half the code in that module is # his, removing myself from Informix because I don't think my influence to # that module was big enough worth mentioning, adding myself to GD because # I think T1lib is worth mentioning. BTW, who wrote the TTF extension? I think # he is missing credits here. ---------------------------- revision 1.89 date: 2000/05/04 10:38:14; author: sas; state: Exp; lines: +1 -1 Change reentrancy API to always use the php prefix. Check for the declaration of reentrant functions, so that we can use them in non-ZTS mode on all platforms. ---------------------------- revision 1.88 date: 2000/04/27 18:37:02; author: zeev; state: Exp; lines: +1 -1 More error handling work (still completely disabled) ---------------------------- revision 1.87 date: 2000/04/21 16:20:11; author: thies; state: Exp; lines: +6 -0 add VDIR info ---------------------------- revision 1.86 date: 2000/04/19 23:46:26; author: zeev; state: Exp; lines: +2 -5 Fix Win32 compilation. Hillarious April 1st joke! ---------------------------- revision 1.85 date: 2000/04/19 23:17:02; author: cmv; state: Exp; lines: +17 -2 A little easter egg for April 1st ... :) ---------------------------- revision 1.84 date: 2000/04/19 12:43:54; author: zeev; state: Exp; lines: +6 -1 phpcredits() update. ---------------------------- revision 1.83 date: 2000/04/17 18:57:40; author: eschmid; state: Exp; lines: +1 -1 Have forgotten myself. ---------------------------- revision 1.82 date: 2000/04/14 21:12:21; author: eschmid; state: Exp; lines: +1 -1 Small corrections. ---------------------------- revision 1.81 date: 2000/04/14 18:22:43; author: zeev; state: Exp; lines: +5 -1 Add the documentation team to the credits page ---------------------------- revision 1.80 date: 2000/04/10 20:21:01; author: zeev; state: Exp; lines: +2 -2 Object overloading API changed slightly (llist is now a pointer) ---------------------------- revision 1.79 date: 2000/04/07 16:41:19; author: cmv; state: Exp; lines: +11 -10 more prettiness ---------------------------- revision 1.78 date: 2000/04/07 15:30:47; author: zeev; state: Exp; lines: +8 -6 Unify ---------------------------- revision 1.77 date: 2000/04/06 22:54:33; author: andi; state: Exp; lines: +1 -1 - ZEND_DEBUG is always defined ---------------------------- revision 1.76 date: 2000/04/05 22:30:19; author: cmv; state: Exp; lines: +1 -1 phpinfo() prettying I will get to the rest of the functions later tonight or tomorrow (i.e. from hyperwave to snmp) ---------------------------- revision 1.75 date: 2000/04/05 21:03:30; author: cmv; state: Exp; lines: +5 -3 finally (thanks Andreas) ---------------------------- revision 1.74 date: 2000/04/05 21:00:35; author: cmv; state: Exp; lines: +3 -3 still cant get this ---------------------------- revision 1.73 date: 2000/04/05 20:48:46; author: cmv; state: Exp; lines: +2 -2 phpinfo() prettying ---------------------------- revision 1.72 date: 2000/04/05 20:29:20; author: cmv; state: Exp; lines: +5 -3 fixed the segfault problem (probably not the prettiest way, but) ---------------------------- revision 1.71 date: 2000/04/05 20:17:02; author: cmv; state: Exp; lines: +132 -62 Prettying up the output of phpinfo(). Someone has to tell me how to get a new .gif logo in there, and why the ZEND_DEBUG output is causing seg faults. I also need to go through all the modules and fix up the output they create. ---------------------------- revision 1.70 date: 2000/03/16 02:18:24; author: thies; state: Exp; lines: +2 -0 *** empty log message *** ---------------------------- revision 1.69 date: 2000/02/26 03:20:54; author: zeev; state: Exp; lines: +1 -1 - Convert 'PHP3' to 'PHP' - Avoid declaring crypt() related salt types twice ---------------------------- revision 1.68 date: 2000/02/24 08:07:29; author: eschmid; state: Exp; lines: +0 -2 More protos. ---------------------------- revision 1.67 date: 2000/02/21 14:50:41; author: chagenbu; state: Exp; lines: +2 -1 being accountable for the imap and mcal work that I've done (and adding an MCAL credits line) ---------------------------- revision 1.66 date: 2000/02/21 14:35:28; author: askalski; state: Exp; lines: +2 -1 added myself to the FTP/IMAP credits ---------------------------- revision 1.65 date: 2000/02/19 23:41:21; author: zeev; state: Exp; lines: +2 -2 the pipe is breaking all the time ---------------------------- revision 1.64 date: 2000/02/19 20:12:26; author: zeev; state: Exp; lines: +1 -0 Worked on beautifying rfc1867.c a bit @- Introduced $HTTP_POST_FILES[], that contains information about files uploaded @ through HTTP upload (Zeev) ---------------------------- revision 1.63 date: 2000/02/18 17:59:44; author: zeev; state: Exp; lines: +35 -9 - Fix some issues with the ISAPI module, made it friendlier to non Win32 platforms - Added .reg file for PWS setup - Reordered some stuff in phpinfo() ---------------------------- revision 1.62 date: 2000/02/11 15:59:29; author: zeev; state: Exp; lines: +3 -3 Fine tune Andi's patch ---------------------------- revision 1.61 date: 2000/02/10 21:53:56; author: andi; state: Exp; lines: +3 -3 - Get rid of some more evil MSVC5's and switch standard/ to use PHP_WIN32 ---------------------------- revision 1.60 date: 2000/02/05 22:58:59; author: zeev; state: Exp; lines: +56 -84 Standardize ---------------------------- revision 1.59 date: 2000/02/05 15:16:11; author: zeev; state: Exp; lines: +0 -2 Cleanup patches ---------------------------- revision 1.58 date: 2000/02/02 14:15:33; author: andrei; state: Exp; lines: +2 -3 Some rearranging. ---------------------------- revision 1.57 date: 2000/01/09 18:32:13; author: zeev; state: Exp; lines: +6 -3 @- Fixed a possible crash in phpinfo() (Zeev) phpinfo() now ensures that HTTP_*_VARS[] are actually arrays before it tries to access them... ---------------------------- revision 1.56 date: 2000/01/01 01:31:52; author: sas; state: Exp; lines: +1 -1 Happy Y2K patch! Happy new year (or the new millennium, depending on whether you start counting at 0 or 1). ---------------------------- revision 1.55 date: 1999/12/21 20:35:43; author: zeev; state: Exp; lines: +12 -0 @- Fixed a bug in ODBC error reporting (Zeev) @- Added PHP_Logo_GUID() and Zend_Logo_GUID() functions, that return the GUIDs @ of the PHP and Zend logos used in phpinfo() (Zeev) ---------------------------- revision 1.54 date: 1999/12/20 23:09:49; author: sas; state: Exp; lines: +2 -1 Use sapi_module_struct to contain SAPI module name ---------------------------- revision 1.53 date: 1999/12/20 15:38:44; author: zeev; state: Exp; lines: +1 -1 Make the Win32 tree compile again ---------------------------- revision 1.52 date: 1999/12/20 07:12:27; author: sas; state: Exp; lines: +2 -0 Add information about chosen SAPI module to phpinfo() ---------------------------- revision 1.51 date: 1999/12/18 22:35:27; author: zeev; state: Exp; lines: +2 -2 - The tree compiles again ---------------------------- revision 1.50 date: 1999/12/18 04:01:14; author: zeev; state: Exp; lines: +7 -7 More php3_ annihilation ---------------------------- revision 1.49 date: 1999/12/14 03:48:46; author: thies; state: Exp; lines: +12 -8 use _ex-API ---------------------------- revision 1.48 date: 1999/12/07 02:49:03; author: evan; state: Exp; lines: +1 -0 Mention CyberCash. ---------------------------- revision 1.47 date: 1999/12/03 20:08:24; author: rubys; state: Exp; lines: +2 -0 windows build errors ---------------------------- revision 1.46 date: 1999/12/03 17:10:18; author: neotron; state: Exp; lines: +1 -0 Added credit notes for Roxen SAPI module ---------------------------- revision 1.45 date: 1999/12/03 13:31:41; author: ssb; state: Exp; lines: +1 -1 Add configure command to phpinfo() output (Stig) ---------------------------- revision 1.44 date: 1999/11/29 15:36:24; author: rubys; state: Exp; lines: +1 -0 Initial alpha-level of sapi/servlet. See README for details. ---------------------------- revision 1.43 date: 1999/11/24 17:56:31; author: sas; state: Exp; lines: +0 -1 Killing some unused variable warnings ---------------------------- revision 1.42 date: 1999/11/22 19:10:14; author: fmk; state: Exp; lines: +1 -0 add MS SQL module to credit info ---------------------------- revision 1.41 date: 1999/11/18 03:03:24; author: rubys; state: Exp; lines: +1 -1 arg! alphabetize correctly! ---------------------------- revision 1.40 date: 1999/11/18 02:40:52; author: rubys; state: Exp; lines: +1 -0 add Java module to credit info ---------------------------- revision 1.39 date: 1999/10/20 16:16:58; author: sas; state: Exp; lines: +1 -1 (_display_module_info): Add anchor for module names ---------------------------- revision 1.38 date: 1999/10/04 15:18:19; author: sas; state: Exp; lines: +1 -1 * archive-based convenience libraries completely replaced with libtool components * SAPI targets can enable thread-safe mode and define shared/static/program build target * all configure scripts use the same config.cache * phplibdir is $(top_builddir)/modules to avoid permission problems * sapi/*/Makefile.inc are gone * runpath handling cleaned up * top-level Makefile.in obsoleted through Makefile.am * --enable-versioning uses libtool's cleaner and more portable -export-symbols feature ---------------------------- revision 1.37 date: 1999/10/01 14:54:55; author: andrei; state: Exp; lines: +4 -4 rename. ---------------------------- revision 1.36 date: 1999/09/25 15:41:51; author: sas; state: Exp; lines: +1 -0 Add entry for AOLserver. ---------------------------- revision 1.35 date: 1999/09/24 18:02:58; author: thies; state: Exp; lines: +1 -1 updated XML (only partly tested) ---------------------------- revision 1.34 date: 1999/09/16 22:15:43; author: zeev; state: Exp; lines: +1 -1 Generalize SAPI a bit ---------------------------- revision 1.33 date: 1999/09/13 01:11:41; author: zeev; state: Exp; lines: +7 -1 Modified phpinfo() to show the contents of arrays in HTTP_*_VARS[] ---------------------------- revision 1.32 date: 1999/09/13 00:35:03; author: zeev; state: Exp; lines: +14 -2 Fix a buglet, and avoid crashing in phpinfo() (fixes an elusive legacy bug too) ---------------------------- revision 1.31 date: 1999/09/11 16:32:08; author: zeev; state: Exp; lines: +4 -4 Rename allow_builtin_links to expose_php ---------------------------- revision 1.30 date: 1999/08/07 18:21:35; author: zeev; state: Exp; lines: +18 -10 Built-in phpinfo() links are now turned off by default. They can be turned on using the allow_builtin_links INI directive ---------------------------- revision 1.29 date: 1999/08/07 17:52:11; author: zeev; state: Exp; lines: +18 -3 - Changed phpinfo() to list modules that have no info function ---------------------------- revision 1.28 date: 1999/08/07 15:50:26; author: sr; state: Exp; lines: +1 -1 Corrected spelling. ---------------------------- revision 1.27 date: 1999/08/02 19:16:50; author: zeev; state: Exp; lines: +38 -38 Removed '3' from key functions in PHP (maintained compatibility through php3_compat.h) ---------------------------- revision 1.26 date: 1999/07/19 20:27:49; author: andrey; state: Exp; lines: +1 -0 Updated status ---------------------------- revision 1.25 date: 1999/07/19 18:37:42; author: zeev; state: Exp; lines: +10 -10 *** empty log message *** ---------------------------- revision 1.24 date: 1999/07/19 14:07:10; author: sas; state: Exp; lines: +1 -0 update ---------------------------- revision 1.23 date: 1999/07/19 13:35:13; author: andrey; state: Exp; lines: +3 -1 More credits. ---------------------------- revision 1.22 date: 1999/07/17 20:38:14; author: andrey; state: Exp; lines: +2 -1 Update credits a bit. "Overall Work" line should probably be extended. ---------------------------- revision 1.21 date: 1999/07/17 19:22:27; author: zeev; state: Exp; lines: +3 -3 *** empty log message *** ---------------------------- revision 1.20 date: 1999/07/17 19:17:42; author: zeev; state: Exp; lines: +115 -60 I was sure I committed these already. Weird ---------------------------- revision 1.19 date: 1999/07/17 17:33:42; author: zeev; state: Exp; lines: +44 -2 *** empty log message *** ---------------------------- revision 1.18 date: 1999/07/16 13:12:56; author: zeev; state: Exp; lines: +9 -20 License update ---------------------------- revision 1.17 date: 1999/07/14 23:34:30; author: zeev; state: Exp; lines: +1 -1 php3.ini -> php.ini ---------------------------- revision 1.16 date: 1999/07/14 23:33:00; author: zeev; state: Exp; lines: +2 -2 * Update logos * Move from PreAlpha 1 to Beta 1. ---------------------------- revision 1.15 date: 1999/07/14 16:02:10; author: andi; state: Exp; lines: +129 -151 - Add a bitwise flag to phpinfo() - Import a draft of the new PHP license ---------------------------- revision 1.14 date: 1999/05/20 12:06:45; author: andi; state: Exp; lines: +6 -0 - Small fixes ---------------------------- revision 1.13 date: 1999/05/16 11:19:26; author: sas; state: Exp; lines: +2 -2 conv_proto *.[ch] ---------------------------- revision 1.12 date: 1999/05/11 00:43:46; author: zeev; state: Exp; lines: +13 -17 beatify Apache's info func ---------------------------- revision 1.11 date: 1999/05/09 08:48:01; author: zeev; state: Exp; lines: +100 -159 * Finalizing the PHP version of SAPI. Support POST and cookies among other things. * Fully implement ISAPI support - POST and cookies among other things. * Almost completely rewrote phpinfo(). Allow modules to easily display their information in phpinfo() without modifying phpinfo() itself (prototype for the module info function was changed, thus the large amount of updated module files). * Initial extended SAPI support for Apache, completely untested. * CGI now uses SAPI fully as well. ---------------------------- revision 1.10 date: 1999/05/06 18:09:50; author: zeev; state: Exp; lines: +3 -0 * Optimize _php3_parse_gpc_data() and clean it up, plus fix a couple of Zend related memory leaks in it ---------------------------- revision 1.9 date: 1999/05/02 19:54:02; author: zeev; state: Exp; lines: +7 -2 Move path_info to the SAPI structure ---------------------------- revision 1.8 date: 1999/04/26 17:26:36; author: zeev; state: Exp; lines: +19 -10 * Get the Apache module to compile again * Get rid of php3_rqst, use SG(server_context) instead (there's still Apache-specific code, but it nuked a global) ---------------------------- revision 1.7 date: 1999/04/26 14:00:49; author: zeev; state: Exp; lines: +1 -3 * Plenty of thread safety and Win32 work. * Changed PHP4 to compile as a DLL, both ISAPI and the the CGI run with the same DLL. * Switched to using the DLL runtime library under Win32. PHP will NOT work if compiled against the static library! * Removed yesterday's php4libts project (with php4dllts, it's obsolete). This *does* affect thread-unsafe Windows as well - the thread unsafe CGI is also dependant on the thread-unsafe DLL. ---------------------------- revision 1.6 date: 1999/04/24 00:11:56; author: zeev; state: Exp; lines: +8 -12 A lot of cleanups... Removed old thread-safe code and other redundant code and files ---------------------------- revision 1.5 date: 1999/04/23 20:05:59; author: zeev; state: Exp; lines: +1 -3 Remove tls.[ch] ---------------------------- revision 1.4 date: 1999/04/22 00:25:57; author: ssb; state: Exp; lines: +1 -1 moved fdf, hyperwave, informix and some smaller files ---------------------------- revision 1.3 date: 1999/04/18 15:58:26; author: zeev; state: Exp; lines: +3 -3 Make Win32 happy with the recent changes. ---------------------------- revision 1.2 date: 1999/04/17 01:52:58; author: ssb; state: Exp; lines: +6 -2 make sure the images on the phpinfo() page point to PHP-enabled pages ---------------------------- revision 1.1 date: 1999/04/17 00:37:06; author: ssb; state: Exp; First commit of re-structuring phase one. We have started using automake in sub-directories and started to move extension code into ext/<name>. For now, I have moved the "standard" extension (which is quite a mix of everything right now) and the GD extension into their own subdirs in ext/. The configure script now also runs configure in the libzend directory automatically and makes sure php4 and libzend use the same config.cache file. To avoid running configure in libzend, use the --no-recursion option. "make" in php4 also builds libzend now. The Apache module doesn't compile right now, but a fix for that is coming up. CVS: ---------------------------------------------------------------------- CVS: Enter Log. Lines beginning with `CVS:' are removed automatically CVS: CVS: Committing in . CVS: CVS: Modified Files: CVS: ext/standard/info.c CVS: ---------------------------------------------------------------------- ~ olor is readable on it) someone should change all this to make use of CSS as we already have a CSS block in there, but i do not know enough about it oh, btw: changed all the ugly uses of \" in tag attriutes to ' as i was already on it ;)
2002-08-08 13:31:49 +00:00
php_printf("<title>phpinfo()</title><meta http-equiv=\"Content-Type\" content=\"text/html; charset=%s\"></head>", charset);
PUTS("<body text=\"#000000\" bgcolor=\"#f0f0ff\" link=\"#0000ff\" vlink=\"#ff00ff\" alink=\"#0000ff\">");
if (flag & PHP_INFO_GENERAL) {
2000-05-19 08:28:53 +00:00
char *zend_version = get_zend_version();
char *api_numbers;
2000-05-19 08:28:53 +00:00
php_uname = php_get_uname('a');
if (PG(html_errors)) {
php_info_print_box_start(1);
}
if (expose_php && PG(html_errors)) {
PUTS("<a href=\"http://www.php.net/\"><img src=\"");
if (SG(request_info).request_uri) {
PUTS(SG(request_info).request_uri);
}
if ((ta->tm_mon==3) && (ta->tm_mday==1)) {
PUTS("?="PHP_EGG_LOGO_GUID"\" border=0 align=\"right\" alt=\"Thies!\"></a>");
} else {
PUTS("?="PHP_LOGO_GUID"\" border=0 align=\"right\" alt=\"PHP Logo\"></a>");
}
}
if (PG(html_errors)) {
php_printf("<h1>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 );
2001-08-15 22:37:31 +00:00
php_info_print_table_row(2, "Build Date", __DATE__ " " __TIME__ );
1999-12-03 20:08:24 +00:00
#ifdef CONFIGURE_COMMAND
php_info_print_table_row(2, "Configure Command", CONFIGURE_COMMAND );
1999-12-03 20:08:24 +00:00
#endif
if (sapi_module.pretty_name) {
php_info_print_table_row(2, "Server API", sapi_module.pretty_name );
2000-04-07 15:30:47 +00:00
}
2000-04-21 16:20:11 +00:00
#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_ini_opened_path?php_ini_opened_path:PHP_CONFIG_FILE_PATH);
api_numbers = emalloc(sizeof("PHP: \nPHP Extension: \nZend Extension: ") + 3*8);
snprintf(api_numbers, sizeof("PHP: \nPHP Extension: \nZend Extension: ") + 3*8, "PHP: %d\nPHP Extension: %d\nZend Extension: %d", PHP_API_VERSION, ZEND_MODULE_API_NO, ZEND_EXTENSION_API_NO);
php_info_print_table_row(2, "API Versions:", api_numbers);
efree(api_numbers);
2000-04-06 22:54:33 +00:00
#if ZEND_DEBUG
2002-03-14 18:39:53 +00:00
php_info_print_table_row(2, "Debug Build", "yes" );
2000-04-05 21:03:30 +00:00
#else
2002-03-14 18:39:53 +00:00
php_info_print_table_row(2, "Debug Build", "no" );
2000-04-05 21:03:30 +00:00
#endif
1999-05-20 12:06:45 +00:00
#ifdef ZTS
2000-04-07 16:41:19 +00:00
php_info_print_table_row(2, "Thread Safety", "enabled" );
1999-05-20 12:06:45 +00:00
#else
2000-04-07 16:41:19 +00:00
php_info_print_table_row(2, "Thread Safety", "disabled" );
1999-05-20 12:06:45 +00:00
#endif
{
HashTable *url_stream_wrappers_hash;
char *stream_protocol, *stream_protocols_buf = NULL;
int stream_protocol_len, stream_protocols_buf_len = 0;
if ((url_stream_wrappers_hash = php_stream_get_url_stream_wrappers_hash())) {
for (zend_hash_internal_pointer_reset(url_stream_wrappers_hash);
zend_hash_get_current_key_ex(url_stream_wrappers_hash, &stream_protocol, &stream_protocol_len, NULL, 0, NULL) == HASH_KEY_IS_STRING;
zend_hash_move_forward(url_stream_wrappers_hash)) {
if (NULL == (stream_protocols_buf = erealloc(stream_protocols_buf,
stream_protocols_buf_len + stream_protocol_len + 1 /* "\n" */ + 1 /* 0 byte at end */))) {
break;
}
memcpy(stream_protocols_buf + stream_protocols_buf_len, stream_protocol, stream_protocol_len);
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] = 0;
php_info_print_table_row(2, "Registered PHP Streams", stream_protocols_buf);
efree(stream_protocols_buf);
} else {
2002-07-01 18:52:30 +00:00
/* Any chances we will ever hit this? */
php_info_print_table_row(2, "Registered PHP Streams", "no streams registered");
}
} else {
2002-07-01 18:52:30 +00:00
/* Any chances we will ever hit this? */
php_info_print_table_row(2, "PHP Streams", "disabled"); /* ?? */
}
}
php_info_print_table_end();
/* Zend Engine */
php_info_print_box_start(0);
if (expose_php && PG(html_errors)) {
PUTS("<a href=\"http://www.zend.com/\"><img src=\"");
if (SG(request_info).request_uri) {
PUTS(SG(request_info).request_uri);
}
PUTS("?="ZEND_LOGO_GUID"\" border=\"0\" align=\"right\" alt=\"Zend logo\"></a>\n");
}
PUTS("This program makes use of the Zend Scripting Language Engine:");
PUTS(PG(html_errors)?"<br />":"\n");
PUTS(zend_version);
php_info_print_box_end();
efree(php_uname);
}
if ((flag & PHP_INFO_CREDITS) && expose_php && PG(html_errors)) {
php_info_print_hr();
PUTS("<h1 align=\"center\"><a href=\"");
if (SG(request_info).request_uri) {
PUTS(SG(request_info).request_uri);
}
PUTS("?=PHPB8B5F2A0-3C92-11d3-A3A9-4C7B08C10000\">");
PUTS("PHP 4 Credits");
PUTS("</a></h1>\n");
}
zend_ini_sort_entries(TSRMLS_C);
if (flag & PHP_INFO_CONFIGURATION) {
php_info_print_hr();
if (PG(html_errors)) {
PUTS("<h1 align=\"center\">Configuration</h1>\n");
} else {
SECTION("Configuration");
}
SECTION("PHP Core\n");
display_ini_entries(NULL);
}
if (flag & PHP_INFO_MODULES) {
int show_info_func;
show_info_func = 1;
2001-07-31 04:53:54 +00:00
zend_hash_apply_with_argument(&module_registry, (apply_func_arg_t) _display_module_info, &show_info_func TSRMLS_CC);
SECTION("Additional Modules");
php_info_print_table_start();
show_info_func = 0;
2001-07-31 04:53:54 +00:00
zend_hash_apply_with_argument(&module_registry, (apply_func_arg_t) _display_module_info, &show_info_func TSRMLS_CC);
php_info_print_table_end();
}
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) {
2000-02-05 22:58:59 +00:00
pval **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_AUblTH_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("_FORM", sizeof("_FORM")-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 (PG(html_errors)) {
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 (PG(html_errors)) {
PUTS("</body></html>");
}
}
/* }}} */
PHPAPI void php_info_print_table_start()
{
if (PG(html_errors)) {
php_printf("<table border=\"0\" cellpadding=\"3\" cellspacing=\"1\" width=\"600\" bgcolor=\"#000000\" align=\"center\">\n");
} else {
php_printf("\n");
}
}
PHPAPI void php_info_print_table_end()
{
if (PG(html_errors)) {
php_printf("</table><br />\n");
}
}
PHPAPI void php_info_print_box_start(int flag)
{
php_info_print_table_start();
if (flag) {
if (PG(html_errors)) {
php_printf("<tr valign=\"middle\" bgcolor=\"" PHP_HEADER_COLOR "\"><td align=\"left\">\n");
}
} else {
if (PG(html_errors)) {
php_printf("<tr valign=\"top\" bgcolor=\"" PHP_CONTENTS_COLOR "\"><td align=\"left\">\n");
} else {
php_printf("\n");
}
}
}
PHPAPI void php_info_print_box_end()
{
if (PG(html_errors)) {
php_printf("</td></tr>\n");
}
php_info_print_table_end();
}
PHPAPI void php_info_print_hr()
{
if (PG(html_errors)) {
php_printf("<hr noshade size=\"1\" width=\"600\">\n");
} else {
php_printf("\n\n _______________________________________________________________________\n\n");
}
}
2000-04-07 16:41:19 +00:00
PHPAPI void php_info_print_table_colspan_header(int num_cols, char *header)
{
int spaces;
if (PG(html_errors)) {
php_printf("<tr bgcolor=\"" PHP_HEADER_COLOR "\"><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), " ");
}
2000-04-07 16:41:19 +00:00
}
/* {{{ php_info_print_table_header
*/
PHPAPI void php_info_print_table_header(int num_cols, ...)
{
int i;
va_list row_elements;
char *row_element;
va_start(row_elements, num_cols);
if (PG(html_errors)) {
php_printf("<tr valign=\"middle\" bgcolor=\"" PHP_HEADER_COLOR "\">");
}
for (i=0; i<num_cols; i++) {
row_element = va_arg(row_elements, char *);
if (!row_element || !*row_element) {
row_element = PG(html_errors)?"&nbsp;":" ";
}
if (PG(html_errors)) {
php_printf("<th>%s</th>", row_element);
} else {
PUTS(row_element);
if (i < num_cols-1) {
PUTS(" => ");
} else {
PUTS("\n");
}
}
}
if (PG(html_errors)) {
php_printf("</tr>\n");
}
va_end(row_elements);
}
/* }}} */
/* {{{ php_info_print_table_row
*/
PHPAPI void php_info_print_table_row(int num_cols, ...)
{
int i;
va_list row_elements;
char *row_element;
TSRMLS_FETCH();
va_start(row_elements, num_cols);
if (PG(html_errors)) {
php_printf("<tr valign=\"baseline\" bgcolor=\"" PHP_CONTENTS_COLOR "\">");
}
for (i=0; i<num_cols; i++) {
if (PG(html_errors)) {
php_printf("<td %s>%s",
(i==0?"bgcolor=\"" PHP_ENTRY_NAME_COLOR "\" ":"align=\"left\""),
(i==0?"<b>":""));
}
row_element = va_arg(row_elements, char *);
if (!row_element || !*row_element) {
PUTS(PG(html_errors)?"&nbsp;":" ");
} else {
if (PG(html_errors)) {
zend_html_puts(row_element, strlen(row_element));
} else {
PUTS(row_element);
if (i < num_cols-1) {
PUTS(" => ");
} else {
PUTS("\n");
}
}
}
if (PG(html_errors)) {
php_printf("%s</td>", (i==0?"</b>":""));
}
}
if (PG(html_errors)) {
php_printf("</tr>\n");
}
va_end(row_elements);
}
/* }}} */
/* {{{ register_phpinfo_constants
*/
void register_phpinfo_constants(INIT_FUNC_ARGS)
{
REGISTER_LONG_CONSTANT("INFO_GENERAL", PHP_INFO_GENERAL, CONST_PERSISTENT|CONST_CS);
REGISTER_LONG_CONSTANT("INFO_CREDITS", PHP_INFO_CREDITS, CONST_PERSISTENT|CONST_CS);
REGISTER_LONG_CONSTANT("INFO_CONFIGURATION", PHP_INFO_CONFIGURATION, CONST_PERSISTENT|CONST_CS);
REGISTER_LONG_CONSTANT("INFO_MODULES", PHP_INFO_MODULES, CONST_PERSISTENT|CONST_CS);
REGISTER_LONG_CONSTANT("INFO_ENVIRONMENT", PHP_INFO_ENVIRONMENT, CONST_PERSISTENT|CONST_CS);
REGISTER_LONG_CONSTANT("INFO_VARIABLES", PHP_INFO_VARIABLES, CONST_PERSISTENT|CONST_CS);
REGISTER_LONG_CONSTANT("INFO_LICENSE", PHP_INFO_LICENSE, CONST_PERSISTENT|CONST_CS);
REGISTER_LONG_CONSTANT("INFO_ALL", PHP_INFO_ALL, CONST_PERSISTENT|CONST_CS);
REGISTER_LONG_CONSTANT("CREDITS_GROUP", PHP_CREDITS_GROUP, CONST_PERSISTENT|CONST_CS);
REGISTER_LONG_CONSTANT("CREDITS_GENERAL", PHP_CREDITS_GENERAL, CONST_PERSISTENT|CONST_CS);
REGISTER_LONG_CONSTANT("CREDITS_SAPI", PHP_CREDITS_SAPI, CONST_PERSISTENT|CONST_CS);
REGISTER_LONG_CONSTANT("CREDITS_MODULES", PHP_CREDITS_MODULES, CONST_PERSISTENT|CONST_CS);
REGISTER_LONG_CONSTANT("CREDITS_DOCS", PHP_CREDITS_DOCS, CONST_PERSISTENT|CONST_CS);
REGISTER_LONG_CONSTANT("CREDITS_FULLPAGE", PHP_CREDITS_FULLPAGE, CONST_PERSISTENT|CONST_CS);
2000-12-19 22:59:14 +00:00
REGISTER_LONG_CONSTANT("CREDITS_QA", PHP_CREDITS_QA, CONST_PERSISTENT|CONST_CS);
REGISTER_LONG_CONSTANT("CREDITS_ALL", PHP_CREDITS_ALL, CONST_PERSISTENT|CONST_CS);
}
/* }}} */
2000-06-16 18:24:02 +00:00
/* {{{ proto void phpinfo([int what])
Output a page of useful information about PHP and the current request */
PHP_FUNCTION(phpinfo)
{
int argc = ZEND_NUM_ARGS();
long flag;
if (zend_parse_parameters(argc TSRMLS_CC, "|l", &flag) == FAILURE) {
return;
}
if(!argc) {
flag = PHP_INFO_ALL;
}
/* 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;
}
1999-12-14 03:48:46 +00:00
/* }}} */
/* {{{ proto string phpversion([string extension])
Return the current PHP version */
PHP_FUNCTION(phpversion)
{
zval **arg;
int argc = ZEND_NUM_ARGS();
if (argc == 0) {
RETURN_STRING(PHP_VERSION, 1);
} else if (argc == 1 && zend_get_parameters_ex(1, &arg) == SUCCESS) {
char *version;
convert_to_string_ex(arg);
version = zend_get_module_version(Z_STRVAL_PP(arg));
if (version == NULL) {
RETURN_FALSE;
}
RETURN_STRING(version, 1);
} else {
WRONG_PARAM_COUNT;
}
}
/* }}} */
2000-07-08 19:31:16 +00:00
/* {{{ proto void phpcredits([int flag])
Prints the list of people who've contributed to the PHP project */
PHP_FUNCTION(phpcredits)
{
int argc = ZEND_NUM_ARGS();
long flag;
if (zend_parse_parameters(argc TSRMLS_CC, "|l", &flag) == FAILURE) {
return;
}
if(!argc) {
flag = PHP_CREDITS_ALL;
}
php_print_credits(flag);
RETURN_TRUE;
}
/* }}} */
2000-10-11 11:40:29 +00:00
/* {{{ proto string php_logo_guid(void)
Return the special ID used to request the PHP logo in phpinfo screens*/
PHP_FUNCTION(php_logo_guid)
{
if (ZEND_NUM_ARGS() != 0) {
WRONG_PARAM_COUNT;
}
RETURN_STRINGL(PHP_LOGO_GUID, sizeof(PHP_LOGO_GUID)-1, 1);
}
2000-10-11 11:40:29 +00:00
/* }}} */
2000-10-11 13:51:32 +00:00
/* {{{ proto string php_egg_logo_guid(void)
2000-10-11 11:40:29 +00:00
Return the special ID used to request the PHP logo in phpinfo screens*/
PHP_FUNCTION(php_egg_logo_guid)
{
if (ZEND_NUM_ARGS() != 0) {
WRONG_PARAM_COUNT;
}
RETURN_STRINGL(PHP_EGG_LOGO_GUID, sizeof(PHP_EGG_LOGO_GUID)-1, 1);
}
2000-10-11 11:40:29 +00:00
/* }}} */
2000-10-11 13:51:32 +00:00
/* {{{ proto string zend_logo_guid(void)
2000-10-11 11:40:29 +00:00
Return the special ID used to request the Zend logo in phpinfo screens*/
PHP_FUNCTION(zend_logo_guid)
{
if (ZEND_NUM_ARGS() != 0) {
WRONG_PARAM_COUNT;
}
RETURN_STRINGL(ZEND_LOGO_GUID, sizeof(ZEND_LOGO_GUID)-1, 1);
}
2000-10-11 11:40:29 +00:00
/* }}} */
/* {{{ proto string php_sapi_name(void)
Return the current SAPI module name */
PHP_FUNCTION(php_sapi_name)
{
if (ZEND_NUM_ARGS() != 0) {
WRONG_PARAM_COUNT;
}
if (sapi_module.name) {
2001-08-11 17:03:37 +00:00
RETURN_STRING(sapi_module.name, 1);
} else {
RETURN_FALSE;
}
}
/* }}} */
/* {{{ proto string php_uname(void)
Return information about the system PHP was built on */
PHP_FUNCTION(php_uname)
{
char *mode = "a";
int modelen;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|s", &mode, &modelen) == FAILURE) {
return;
}
RETURN_STRING(php_get_uname(*mode), 0);
}
/* }}} */
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
* vim600: sw=4 ts=4 fdm=marker
* vim<600: sw=4 ts=4
*/