mirror of
https://github.com/php/php-src.git
synced 2025-08-20 09:24:05 +02:00
@- 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)
This commit is contained in:
parent
f0888ccaef
commit
e538fcbf10
5 changed files with 22 additions and 3 deletions
|
@ -465,7 +465,7 @@ void ODBC_SQL_ERROR(HENV henv, HDBC conn, HSTMT stmt, char *func)
|
||||||
ODBCLS_FETCH();
|
ODBCLS_FETCH();
|
||||||
|
|
||||||
do {
|
do {
|
||||||
SQLError(henv, conn, stmt, state,
|
ret = SQLError(henv, conn, stmt, state,
|
||||||
&error, errormsg, sizeof(errormsg)-1, &errormsgsize);
|
&error, errormsg, sizeof(errormsg)-1, &errormsgsize);
|
||||||
if (func) {
|
if (func) {
|
||||||
php_error(E_WARNING, "SQL error: %s, SQL state %s in %s",
|
php_error(E_WARNING, "SQL error: %s, SQL state %s in %s",
|
||||||
|
|
|
@ -113,6 +113,8 @@ function_entry basic_functions[] = {
|
||||||
PHP_FE(phpinfo, NULL)
|
PHP_FE(phpinfo, NULL)
|
||||||
PHP_FE(phpversion, NULL)
|
PHP_FE(phpversion, NULL)
|
||||||
PHP_FE(phpcredits, NULL)
|
PHP_FE(phpcredits, NULL)
|
||||||
|
PHP_FE(php_logo_guid, NULL)
|
||||||
|
PHP_FE(zend_logo_guid, NULL)
|
||||||
|
|
||||||
PHP_FE(strspn, NULL)
|
PHP_FE(strspn, NULL)
|
||||||
PHP_FE(strcspn, NULL)
|
PHP_FE(strcspn, NULL)
|
||||||
|
|
|
@ -510,6 +510,18 @@ PHP_FUNCTION(phpcredits)
|
||||||
|
|
||||||
/* }}} */
|
/* }}} */
|
||||||
|
|
||||||
|
|
||||||
|
PHP_FUNCTION(php_logo_guid)
|
||||||
|
{
|
||||||
|
RETURN_STRINGL(PHP_LOGO_GUID, sizeof(PHP_LOGO_GUID)-1, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
PHP_FUNCTION(zend_logo_guid)
|
||||||
|
{
|
||||||
|
RETURN_STRINGL(ZEND_LOGO_GUID, sizeof(ZEND_LOGO_GUID)-1, 1);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Local variables:
|
* Local variables:
|
||||||
* tab-width: 4
|
* tab-width: 4
|
||||||
|
|
|
@ -52,9 +52,14 @@
|
||||||
#define PHP_CREDITS_FULLPAGE (1<<3)
|
#define PHP_CREDITS_FULLPAGE (1<<3)
|
||||||
#define PHP_CREDITS_ALL 0xFFFFFFFF
|
#define PHP_CREDITS_ALL 0xFFFFFFFF
|
||||||
|
|
||||||
|
#define PHP_LOGO_GUID "PHPE9568F34-D428-11d2-A769-00AA001ACF42"
|
||||||
|
#define ZEND_LOGO_GUID "PHPE9568F35-D428-11d2-A769-00AA001ACF42"
|
||||||
|
|
||||||
PHP_FUNCTION(phpversion);
|
PHP_FUNCTION(phpversion);
|
||||||
PHP_FUNCTION(phpinfo);
|
PHP_FUNCTION(phpinfo);
|
||||||
PHP_FUNCTION(phpcredits);
|
PHP_FUNCTION(phpcredits);
|
||||||
|
PHP_FUNCTION(php_logo_guid);
|
||||||
|
PHP_FUNCTION(zend_logo_guid);
|
||||||
PHPAPI void php_print_info(int flag);
|
PHPAPI void php_print_info(int flag);
|
||||||
PHPAPI void php_print_credits(int flag);
|
PHPAPI void php_print_credits(int flag);
|
||||||
|
|
||||||
|
|
|
@ -1224,13 +1224,13 @@ PHPAPI void php_execute_script(zend_file_handle *primary_file CLS_DC ELS_DC PLS_
|
||||||
|
|
||||||
if (SG(request_info).query_string && SG(request_info).query_string[0]=='='
|
if (SG(request_info).query_string && SG(request_info).query_string[0]=='='
|
||||||
&& PG(expose_php)) {
|
&& PG(expose_php)) {
|
||||||
if (!strcmp(SG(request_info).query_string+1, "PHPE9568F34-D428-11d2-A769-00AA001ACF42")) {
|
if (!strcmp(SG(request_info).query_string+1, PHP_LOGO_GUID)) {
|
||||||
char *header_line = estrndup(CONTEXT_TYPE_IMAGE_GIF, sizeof(CONTEXT_TYPE_IMAGE_GIF));
|
char *header_line = estrndup(CONTEXT_TYPE_IMAGE_GIF, sizeof(CONTEXT_TYPE_IMAGE_GIF));
|
||||||
|
|
||||||
php4i_add_header_information(header_line, sizeof(CONTEXT_TYPE_IMAGE_GIF)-1);
|
php4i_add_header_information(header_line, sizeof(CONTEXT_TYPE_IMAGE_GIF)-1);
|
||||||
PHPWRITE(php4_logo, sizeof(php4_logo));
|
PHPWRITE(php4_logo, sizeof(php4_logo));
|
||||||
return;
|
return;
|
||||||
} else if (!strcmp(SG(request_info).query_string+1, "PHPE9568F35-D428-11d2-A769-00AA001ACF42")) {
|
} else if (!strcmp(SG(request_info).query_string+1, ZEND_LOGO_GUID)) {
|
||||||
char *header_line = estrndup(CONTEXT_TYPE_IMAGE_GIF, sizeof(CONTEXT_TYPE_IMAGE_GIF));
|
char *header_line = estrndup(CONTEXT_TYPE_IMAGE_GIF, sizeof(CONTEXT_TYPE_IMAGE_GIF));
|
||||||
|
|
||||||
php4i_add_header_information(header_line, sizeof(CONTEXT_TYPE_IMAGE_GIF)-1);
|
php4i_add_header_information(header_line, sizeof(CONTEXT_TYPE_IMAGE_GIF)-1);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue