[PATCH] sybase "appname" contains static version number

From: Date: Fri, 16 Apr 2004 15:33:20 +0000
Subject: [PATCH] sybase "appname" contains static version number
Groups: php.internals 
Request: Send a blank email to internals+get-9260@lists.php.net to get a copy of this message
Appended a patch to the sybase extensions, that set the default value for the sybase appname to ("PHP " PHP_VERSION). I have seen that in PHP 4.3.6 where this variable is statically set to "PHP 4.0" (!!!). In the tree of PHP5 it is a little bit better when this is set to "PHP 5", but the perfect soultion sould be the patch. If somebody wants a fixed sybase "appname", he can configure it in php.ini or give it to the sybase_(p)connect function. ----- Uwe Schindler thetaphi@php.net - http://www.php.net NSAPI SAPI developer Erlangen, Germany

Index: ext/sybase_ct/php_sybase_ct.c =================================================================== RCS file: /repository/php-src/ext/sybase_ct/php_sybase_ct.c,v retrieving revision 1.92 diff -u -r1.92 php_sybase_ct.c --- ext/sybase_ct/php_sybase_ct.c 15 Feb 2004 10:53:45 -0000 1.92 +++ ext/sybase_ct/php_sybase_ct.c 16 Apr 2004 15:27:31 -0000 @@ -427,7 +427,7 @@ { SybCtG(default_link)=-1; SybCtG(num_links) = SybCtG(num_persistent); - SybCtG(appname) = estrndup("PHP 5", 5); + SybCtG(appname) = estrndup("PHP " PHP_VERSION, sizeof("PHP " PHP_VERSION)); SybCtG(server_message) = empty_string; return SUCCESS; } Index: ext/sybase/php_sybase_db.c =================================================================== RCS file: /repository/php-src/ext/sybase/php_sybase_db.c,v retrieving revision 1.60 diff -u -r1.60 php_sybase_db.c --- ext/sybase/php_sybase_db.c 28 Jan 2004 01:43:39 -0000 1.60 +++ ext/sybase/php_sybase_db.c 16 Apr 2004 15:27:49 -0000 @@ -281,7 +281,7 @@ { php_sybase_module.default_link=-1; php_sybase_module.num_links = php_sybase_module.num_persistent; - php_sybase_module.appname = estrndup("PHP 5", 5); + php_sybase_module.appname = estrndup("PHP " PHP_VERSION, sizeof("PHP " PHP_VERSION)); php_sybase_module.server_message = empty_string; php_sybase_module.min_error_severity = php_sybase_module.cfg_min_error_severity; php_sybase_module.min_message_severity = php_sybase_module.cfg_min_message_severity;
« previous php.internals (#9260) next »