[PHP-CVS-DAILY] cvs: php4 / ChangeLog
changelog Fri Feb 21 20:31:44 2003 EDT Modified files: /php4 ChangeLog Log: ChangeLog update Index: php4/ChangeLog diff -u php4/ChangeLog:1.1273 php4/ChangeLog:1.1274 --- php4/ChangeLog:1.1273 Thu Feb 20 20:32:11 2003 +++ php4/ChangeLog Fri Feb 21 20:31:43 2003 -1,3 +1,52 +2003-02-21 Wez Furlong [EMAIL PROTECTED] + +* main/network.c + win32/php4dllts.dsp: + Add comment about thread-safety of gethostbyname on win32. + Set the correct path to the win32 config.h file in the .dsp file. + +2003-02-21 Jani Taskinen [EMAIL PROTECTED] + +* (PHP_4_3) + ext/snmp/php_snmp.h + ext/snmp/snmp.c: + fixed headers and cleaned up a bit + +* ext/standard/basic_functions.c + ext/standard/dns.c + ext/standard/dns.h: + - Fixed bug: #22339 + +* ext/informix/ifx.ec + ext/informix/php_informix_includes.h + ext/snmp/php_snmp.h: + MFB + +* (PHP_4_3) + ext/informix/ifx.ec: + ZTS build fixes, style and ws fixes + +* ext/ingres_ii/ii.c + ext/ingres_ii/ii.h: + ZTS fixes + +* (PHP_4_3) + ext/informix/ifx.ec: + Fix ZTS build + +2003-02-21 David Viner [EMAIL PROTECTED] + +* sapi/apache/php4apache.dsp: + this tiny change adds the location of apache includes and libraries that + are installed when you use the Apache Windows Installer + (C:\Program Files\Apache Group\Apache\*). With this patch, + a windows developer who has used the Apache Windows Installer should be + able to compile the Apache sapi module without any modifications to + his/her + installed tree. It should have no effect whatsoever on anyone else. + + --dviner + 2003-02-20 Rasmus Lerdorf [EMAIL PROTECTED] * README.input_filter -363,7 +412,7 main/streams/plain_wrapper.c main/streams/streams.c main/streams/userspace.c: - ws fixes + missing $Id: ChangeLog,v 1.1273 2003/02/21 01:32:11 changelog Exp $ tags, headers added + ws fixes + missing $Id: ChangeLog,v 1.1274 2003/02/22 01:31:43 changelog Exp $ tags, headers added 2003-02-19 Corne' Cornelius [EMAIL PROTECTED] -1281,7 +1330,7 * (PHP_4_3) sapi/cgi/cgi_main.c: - Added missing $Id: ChangeLog,v 1.1273 2003/02/21 01:32:11 changelog Exp $ tag + Added missing $Id: ChangeLog,v 1.1274 2003/02/22 01:31:43 changelog Exp $ tag 2003-02-14 Thies C. Arntzen [EMAIL PROTECTED]
[PHP-CVS] cvs: php4 /ext/standard basic_functions.c dns.c dns.h
sniper Fri Feb 21 03:45:58 2003 EDT Modified files: /php4/ext/standard basic_functions.c dns.c dns.h Log: - Fixed bug: #22339 # No NEWS, this was bug introduced by Marcus a while ago.. # Not present in php4.3.x branch Index: php4/ext/standard/basic_functions.c diff -u php4/ext/standard/basic_functions.c:1.583 php4/ext/standard/basic_functions.c:1.584 --- php4/ext/standard/basic_functions.c:1.583 Tue Feb 18 04:37:52 2003 +++ php4/ext/standard/basic_functions.c Fri Feb 21 03:45:57 2003 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: basic_functions.c,v 1.583 2003/02/18 09:37:52 wez Exp $ */ +/* $Id: basic_functions.c,v 1.584 2003/02/21 08:45:57 sniper Exp $ */ #include php.h #include php_streams.h @@ -598,10 +598,10 @@ #if HAVE_RES_SEARCH !(defined(__BEOS__) || defined(PHP_WIN32) || defined(NETWARE)) PHP_FE(dns_check_record, NULL) PHP_FALIAS(checkdnsrr, dns_check_record, NULL) + PHP_FE(dns_get_mx, +second_and_third_args_force_ref) + PHP_FALIAS(getmxrr, dns_get_mx, +second_and_third_args_force_ref) # if HAVE_DNS_FUNCS PHP_FE(dns_get_record, third_and_rest_force_ref) - PHP_FE(dns_get_mx, second_and_third_args_force_ref) - PHP_FALIAS(getmxrr, dns_get_mx, NULL) # endif #endif Index: php4/ext/standard/dns.c diff -u php4/ext/standard/dns.c:1.55 php4/ext/standard/dns.c:1.56 --- php4/ext/standard/dns.c:1.55Thu Feb 20 00:34:58 2003 +++ php4/ext/standard/dns.c Fri Feb 21 03:45:58 2003 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: dns.c,v 1.55 2003/02/20 05:34:58 sniper Exp $ */ +/* $Id: dns.c,v 1.56 2003/02/21 08:45:58 sniper Exp $ */ /* {{{ includes */ #include php.h @@ -630,6 +630,7 @@ } } /* }}} */ +#endif /* HAVE_DNS_FUNCS */ /* {{{ proto bool dns_get_mx(string hostname, array mxhosts [, array weight]) Get MX records corresponding to a given Internet host name */ @@ -712,7 +713,6 @@ } /* }}} */ -#endif /* HAVE_DNS_FUNCS */ #endif /* HAVE_RES_SEARCH !(defined(__BEOS__)||defined(PHP_WIN32) || defined(NETWARE)) */ /* Index: php4/ext/standard/dns.h diff -u php4/ext/standard/dns.h:1.13 php4/ext/standard/dns.h:1.14 --- php4/ext/standard/dns.h:1.13Tue Dec 31 11:07:37 2002 +++ php4/ext/standard/dns.h Fri Feb 21 03:45:58 2003 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: dns.h,v 1.13 2002/12/31 16:07:37 sebastian Exp $ */ +/* $Id: dns.h,v 1.14 2003/02/21 08:45:58 sniper Exp $ */ #ifndef DNS_H #define DNS_H @@ -34,11 +34,11 @@ #if HAVE_RES_SEARCH !(defined(__BEOS__)||defined(PHP_WIN32)) PHP_FUNCTION(dns_check_record); +PHP_FUNCTION(dns_get_mx); # if HAVE_DNS_FUNCS PHP_FUNCTION(dns_get_record); -PHP_FUNCTION(dns_get_mx); PHP_MINIT_FUNCTION(dns); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4_3) /ext/snmp php_snmp.h snmp.c
sniper Fri Feb 21 05:42:02 2003 EDT Modified files: (Branch: PHP_4_3) /php4/ext/snmp php_snmp.h snmp.c Log: fixed headers and cleaned up a bit Index: php4/ext/snmp/php_snmp.h diff -u php4/ext/snmp/php_snmp.h:1.14.2.2 php4/ext/snmp/php_snmp.h:1.14.2.3 --- php4/ext/snmp/php_snmp.h:1.14.2.2 Tue Dec 31 11:35:21 2002 +++ php4/ext/snmp/php_snmp.hFri Feb 21 05:42:01 2003 @@ -1,29 +1,31 @@ /* -+--+ -| PHP Version 4| -+--+ -| Copyright (c) 1997-2003 The PHP Group| -+--+ -| This source file is subject to version 2.02 of the PHP license, | -| 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. | -| 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 | -| [EMAIL PROTECTED] so we can mail you a copy immediately. | -+--+ -| Authors: Rasmus Lerdorf [EMAIL PROTECTED] | -| Mike Jackson [EMAIL PROTECTED]| -| Steven Lawrance [EMAIL PROTECTED]| -| Harrie Hazewinkel [EMAIL PROTECTED] | -+--+ + +--+ + | PHP Version 4| + +--+ + | Copyright (c) 1997-2003 The PHP Group| + +--+ + | This source file is subject to version 2.02 of the PHP license, | + | 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. | + | 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 | + | [EMAIL PROTECTED] so we can mail you a copy immediately. | + +--+ + | Authors: Rasmus Lerdorf [EMAIL PROTECTED] | + | Mike Jackson [EMAIL PROTECTED]| + | Steven Lawrance [EMAIL PROTECTED]| + | Harrie Hazewinkel [EMAIL PROTECTED] | + +--+ */ -/* $Id: php_snmp.h,v 1.14.2.2 2002/12/31 16:35:21 sebastian Exp $ */ +/* $Id: php_snmp.h,v 1.14.2.3 2003/02/21 10:42:01 sniper Exp $ */ + #ifndef PHP_SNMP_H #define PHP_SNMP_H #if HAVE_SNMP + #ifndef DLEXPORT #define DLEXPORT #endif @@ -32,6 +34,8 @@ #define snmp_module_ptr snmp_module_entry PHP_MINIT_FUNCTION(snmp); +PHP_MINFO_FUNCTION(snmp); + PHP_FUNCTION(snmpget); PHP_FUNCTION(snmpwalk); PHP_FUNCTION(snmprealwalk); @@ -45,8 +49,7 @@ PHP_FUNCTION(snmp3_walk); PHP_FUNCTION(snmp3_real_walk); PHP_FUNCTION(snmp3_set); -//PHP_FUNCTION(snmp3_getbulk); -PHP_MINFO_FUNCTION(snmp); + #else #define snmp_module_ptr NULL Index: php4/ext/snmp/snmp.c diff -u php4/ext/snmp/snmp.c:1.70.2.4 php4/ext/snmp/snmp.c:1.70.2.5 --- php4/ext/snmp/snmp.c:1.70.2.4 Fri Jan 24 04:53:16 2003 +++ php4/ext/snmp/snmp.cFri Feb 21 05:42:01 2003 @@ -1,24 +1,25 @@ /* -+--+ -| PHP Version 4| -+--+ -| Copyright (c) 1997-2003 The PHP Group| -+--+ -| This source file is subject to version 2.02 of the PHP license, | -| 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. | -| 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 | -| [EMAIL PROTECTED] so we can mail you a copy immediately. | -+--+ -| Authors: Rasmus Lerdorf [EMAIL
[PHP-CVS] cvs: php4 /ext/snmp php_snmp.h
sniper Fri Feb 21 05:43:32 2003 EDT Modified files: /php4/ext/snmp php_snmp.h Log: MFB Index: php4/ext/snmp/php_snmp.h diff -u php4/ext/snmp/php_snmp.h:1.16 php4/ext/snmp/php_snmp.h:1.17 --- php4/ext/snmp/php_snmp.h:1.16 Tue Dec 31 11:07:27 2002 +++ php4/ext/snmp/php_snmp.hFri Feb 21 05:43:32 2003 @@ -1,29 +1,31 @@ /* -+--+ -| PHP Version 4| -+--+ -| Copyright (c) 1997-2003 The PHP Group| -+--+ -| This source file is subject to version 2.02 of the PHP license, | -| 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. | -| 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 | -| [EMAIL PROTECTED] so we can mail you a copy immediately. | -+--+ -| Authors: Rasmus Lerdorf [EMAIL PROTECTED] | -| Mike Jackson [EMAIL PROTECTED]| -| Steven Lawrance [EMAIL PROTECTED]| -| Harrie Hazewinkel [EMAIL PROTECTED] | -+--+ + +--+ + | PHP Version 4| + +--+ + | Copyright (c) 1997-2003 The PHP Group| + +--+ + | This source file is subject to version 2.02 of the PHP license, | + | 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. | + | 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 | + | [EMAIL PROTECTED] so we can mail you a copy immediately. | + +--+ + | Authors: Rasmus Lerdorf [EMAIL PROTECTED] | + | Mike Jackson [EMAIL PROTECTED]| + | Steven Lawrance [EMAIL PROTECTED]| + | Harrie Hazewinkel [EMAIL PROTECTED] | + +--+ */ -/* $Id: php_snmp.h,v 1.16 2002/12/31 16:07:27 sebastian Exp $ */ +/* $Id: php_snmp.h,v 1.17 2003/02/21 10:43:32 sniper Exp $ */ + #ifndef PHP_SNMP_H #define PHP_SNMP_H #if HAVE_SNMP + #ifndef DLEXPORT #define DLEXPORT #endif @@ -32,6 +34,8 @@ #define snmp_module_ptr snmp_module_entry PHP_MINIT_FUNCTION(snmp); +PHP_MINFO_FUNCTION(snmp); + PHP_FUNCTION(snmpget); PHP_FUNCTION(snmpwalk); PHP_FUNCTION(snmprealwalk); @@ -45,8 +49,7 @@ PHP_FUNCTION(snmp3_walk); PHP_FUNCTION(snmp3_real_walk); PHP_FUNCTION(snmp3_set); -//PHP_FUNCTION(snmp3_getbulk); -PHP_MINFO_FUNCTION(snmp); + #else #define snmp_module_ptr NULL -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /main network.c /win32 php4dllts.dsp
wez Fri Feb 21 09:06:56 2003 EDT Modified files: /php4/main network.c /php4/win32 php4dllts.dsp Log: Add comment about thread-safety of gethostbyname on win32. Set the correct path to the win32 config.h file in the .dsp file. Index: php4/main/network.c diff -u php4/main/network.c:1.89 php4/main/network.c:1.90 --- php4/main/network.c:1.89Wed Feb 19 03:40:18 2003 +++ php4/main/network.c Fri Feb 21 09:06:55 2003 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: network.c,v 1.89 2003/02/19 08:40:18 sniper Exp $ */ +/* $Id: network.c,v 1.90 2003/02/21 14:06:55 wez Exp $ */ /*#define DEBUG_MAIN_NETWORK 1*/ @@ -223,7 +223,9 @@ struct in_addr in; if (!inet_aton(host, in)) { - /* XXX NOT THREAD SAFE */ + /* XXX NOT THREAD SAFE +* (but it *is* thread safe under win32) +*/ host_info = gethostbyname(host); if (host_info == NULL) { php_error_docref(NULL TSRMLS_CC, E_WARNING, php_network_getaddresses: gethostbyname failed); Index: php4/win32/php4dllts.dsp diff -u php4/win32/php4dllts.dsp:1.105 php4/win32/php4dllts.dsp:1.106 --- php4/win32/php4dllts.dsp:1.105 Mon Feb 17 01:28:07 2003 +++ php4/win32/php4dllts.dspFri Feb 21 09:06:55 2003 @@ -270,7 +270,7 @@ # End Source File # Begin Source File -SOURCE=..\ext\standard\config.w32.h +SOURCE=..\main\config.w32.h # End Source File # Begin Source File @@ -1876,6 +1876,10 @@ # End Source File # Begin Source File +SOURCE=..\ext\standard\php_sunfuncs.h +# End Source File +# Begin Source File + SOURCE=..\ext\standard\php_syslog.h # End Source File # Begin Source File @@ -1897,10 +1901,6 @@ # Begin Source File SOURCE=..\ext\standard\sha1.h -# End Source File -# Begin Source File - -SOURCE=..\ext\standard\php_sunfuncs.h # End Source File # Begin Source File -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4_3) /ext/standard file.c /ext/standard/tests/file bug21131.phpt bug22362.phpt /main php_streams.h streams.c
wez Fri Feb 21 21:43:59 2003 EDT Added files: (Branch: PHP_4_3) /php4/ext/standard/tests/file bug22362.phpt Modified files: /php4/ext/standard file.c /php4/ext/standard/tests/file bug21131.phpt /php4/main php_streams.h streams.c Log: Miscellaneous streams fixes, including probable fixes for: Bug #21131 (fopen with 'a+' and rewind() doesn't work) Bug #21713 (include remote files leaks temporary files + descriptors on Solaris) Bug #21185 (move_uploaded_file() does not ignore open_basedir as it should) Bug #22362 (combinations of fwrite(), fread() and fseek() produce unexpected results) Index: php4/ext/standard/file.c diff -u php4/ext/standard/file.c:1.279.2.9 php4/ext/standard/file.c:1.279.2.10 --- php4/ext/standard/file.c:1.279.2.9 Tue Feb 18 10:22:46 2003 +++ php4/ext/standard/file.cFri Feb 21 21:43:58 2003 -21,7 +21,7 +--+ */ -/* $Id: file.c,v 1.279.2.9 2003/02/18 15:22:46 moriyoshi Exp $ */ +/* $Id: file.c,v 1.279.2.10 2003/02/22 02:43:58 wez Exp $ */ /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */ -2038,7 +2038,7 int ret = FAILURE; srcstream = php_stream_open_wrapper(src, rb, - ENFORCE_SAFE_MODE | REPORT_ERRORS, + STREAM_DISABLE_OPEN_BASEDIR | REPORT_ERRORS, NULL); if (!srcstream) Index: php4/ext/standard/tests/file/bug21131.phpt diff -u php4/ext/standard/tests/file/bug21131.phpt:1.1.2.1 php4/ext/standard/tests/file/bug21131.phpt:1.1.2.2 --- php4/ext/standard/tests/file/bug21131.phpt:1.1.2.1 Sun Dec 22 13:21:54 2002 +++ php4/ext/standard/tests/file/bug21131.phpt Fri Feb 21 21:43:58 2003 -9,15 +9,10 fclose($fp); $fp = fopen($filename, a+); -var_dump(ftell($fp)); rewind($fp); -var_dump(ftell($fp)); fpassthru($fp); fclose($fp); unlink($filename); ? --EXPECT-- -int(6) -int(0) foobar - Index: php4/main/php_streams.h diff -u php4/main/php_streams.h:1.61.2.6 php4/main/php_streams.h:1.61.2.7 --- php4/main/php_streams.h:1.61.2.6Thu Jan 2 08:31:30 2003 +++ php4/main/php_streams.h Fri Feb 21 21:43:58 2003 -16,7 +16,7 +--+ */ -/* $Id: php_streams.h,v 1.61.2.6 2003/01/02 13:31:30 derick Exp $ */ +/* $Id: php_streams.h,v 1.61.2.7 2003/02/22 02:43:58 wez Exp $ */ #ifndef PHP_STREAMS_H #define PHP_STREAMS_H -501,6 +501,11 /* this flag is only used by include/require functions */ #define STREAM_OPEN_FOR_INCLUDE128 + +/* 512 skipped for PHP 5 compat */ + +/* if set, skip open_basedir checks */ +#define STREAM_DISABLE_OPEN_BASEDIR1024 /* Antique - no longer has meaning */ #define IGNORE_URL_WIN 0 Index: php4/main/streams.c diff -u php4/main/streams.c:1.125.2.32 php4/main/streams.c:1.125.2.33 --- php4/main/streams.c:1.125.2.32 Wed Feb 19 03:12:25 2003 +++ php4/main/streams.c Fri Feb 21 21:43:58 2003 -20,7 +20,7 +--+ */ -/* $Id: streams.c,v 1.125.2.32 2003/02/19 08:12:25 moriyoshi Exp $ */ +/* $Id: streams.c,v 1.125.2.33 2003/02/22 02:43:58 wez Exp $ */ #define _GNU_SOURCE #include php.h -852,6 +852,15 if (buf == NULL || count == 0 || stream-ops-write == NULL) return 0; + /* if we have a seekable stream we need to ensure that data is written at the +* current stream-position. This means invalidating the read buffer and then +* performing a low-level seek */ + if (stream-ops-seek (stream-flags PHP_STREAM_FLAG_NO_SEEK) == 0) { + stream-readpos = stream-writepos = 0; + + stream-ops-seek(stream, stream-position, SEEK_SET, stream-position TSRMLS_CC); + } + while (count 0) { towrite = count; if (towrite stream-chunk_size) -871,8 +880,6 * buffered from fifos and sockets */ if (stream-ops-seek (stream-flags PHP_STREAM_FLAG_NO_SEEK) == 0) { stream-position += justwrote; - stream-writepos = 0; - stream-readpos = 0; } } else { break; -907,10 +914,6 PHPAPI int _php_stream_seek(php_stream *stream, off_t offset, int whence TSRMLS_DC) { - /* not moving anywhere */ - if ((offset == 0 whence == SEEK_CUR) || (offset == stream-position whence == SEEK_SET)) - return 0; - /* handle the case where we are in the buffer */ if ((stream-flags PHP_STREAM_FLAG_NO_BUFFER) == 0) { switch(whence) { -933,9 +936,6 break; } } - - /*
[PHP-CVS] cvs: php4 /sapi/apache2handler sapi_apache2.c
jerenkrantz Fri Feb 21 23:42:34 2003 EDT Modified files: /php4/sapi/apache2handler sapi_apache2.c Log: Add xbithack support to apache2handler SAPI. (configuration doesn't work, but that's not something new apparently.) Index: php4/sapi/apache2handler/sapi_apache2.c diff -u php4/sapi/apache2handler/sapi_apache2.c:1.2 php4/sapi/apache2handler/sapi_apache2.c:1.3 --- php4/sapi/apache2handler/sapi_apache2.c:1.2 Thu Feb 20 13:20:03 2003 +++ php4/sapi/apache2handler/sapi_apache2.c Fri Feb 21 23:42:34 2003 -18,7 +18,7 +--+ */ -/* $Id: sapi_apache2.c,v 1.2 2003/02/20 18:20:03 jerenkrantz Exp $ */ +/* $Id: sapi_apache2.c,v 1.3 2003/02/22 04:42:34 jerenkrantz Exp $ */ #include fcntl.h -481,13 +481,24 request_rec *parent_req = NULL; TSRMLS_FETCH(); + conf = ap_get_module_config(r-per_dir_config, php4_module); + apply_config(conf); + if (strcmp(r-handler, PHP_MAGIC_TYPE) strcmp(r-handler, PHP_SOURCE_MAGIC_TYPE) strcmp(r-handler, PHP_SCRIPT)) { - return DECLINED; + char *xbithack; + /* Check for xbithack in this case. */ + if (strcmp(r-handler, text/html)) { + return DECLINED; + } + xbithack = get_php_config(conf, xbithack, sizeof(xbithack)); + if (*xbithack == '\0' || *xbithack == '0' + || !(r-finfo.protection APR_UEXECUTE)) { + return DECLINED; + } } - conf = ap_get_module_config(r-per_dir_config, php4_module); enabled = get_php_config(conf, engine, sizeof(engine)); /* handle situations where user turns the engine off */ -515,7 +526,6 ctx-brigade = brigade; php_apache_request_ctor(r, ctx TSRMLS_CC); - apply_config(conf); } else { parent_req = ctx-r; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/mysqli mysqli.c mysqli_api.c php_mysqli.h
georg Sat Feb 22 02:31:02 2003 EDT Modified files: /php4/ext/mysqliphp_mysqli.h mysqli.c mysqli_api.c Log: Fixed bug with stmt_close (libmysql bk version 1.1477 required) Fixed bug with mysql_execute and float values Index: php4/ext/mysqli/php_mysqli.h diff -u php4/ext/mysqli/php_mysqli.h:1.9 php4/ext/mysqli/php_mysqli.h:1.10 --- php4/ext/mysqli/php_mysqli.h:1.9Tue Feb 18 03:49:00 2003 +++ php4/ext/mysqli/php_mysqli.hSat Feb 22 02:31:01 2003 -1,8 +1,8 /* +--+ - | PHP Version 4| + | PHP Version 5| +--+ - | Copyright (c) 1997-2002 The PHP Group| + | Copyright (c) 1997-2003 The PHP Group| +--+ | This source file is subject to version 2.02 of the PHP license, | | that is bundled with this package in the file LICENSE, and is| -15,7 +15,7 | Author: Georg Richter [EMAIL PROTECTED]| +--+ - $Id: php_mysqli.h,v 1.9 2003/02/18 08:49:00 georg Exp $ + $Id: php_mysqli.h,v 1.10 2003/02/22 07:31:01 georg Exp $ */ /* A little hack to prevent build break, when mysql is used together with -113,7 +113,13 php_error(E_WARNING, Couldn't fetch %s, intern-zo.ce-name);\ RETURN_NULL();\ }\ -} + if (!strcmp((char *)__name, mysqli_stmt)) {\ + if (!((STMT *)__ptr)-stmt-mysql) {\ + php_error(E_WARNING, Statement isn't valid anymore);\ + RETURN_NULL();\ + }\ + }\ +} #define MYSQLI_CLEAR_RESOURCE(__id) \ { \ Index: php4/ext/mysqli/mysqli.c diff -u php4/ext/mysqli/mysqli.c:1.6 php4/ext/mysqli/mysqli.c:1.7 --- php4/ext/mysqli/mysqli.c:1.6Mon Feb 17 19:32:47 2003 +++ php4/ext/mysqli/mysqli.cSat Feb 22 02:31:01 2003 -1,8 +1,8 /* +--+ - | PHP Version 4| + | PHP Version 5| +--+ - | Copyright (c) 1997-2002 The PHP Group| + | Copyright (c) 1997-2003 The PHP Group| +--+ | This source file is subject to version 2.02 of the PHP license, | | that is bundled with this package in the file LICENSE, and is| -15,7 +15,7 | Author: Georg Richter [EMAIL PROTECTED]| +--+ - $Id: mysqli.c,v 1.6 2003/02/18 00:32:47 georg Exp $ + $Id: mysqli.c,v 1.7 2003/02/22 07:31:01 georg Exp $ */ #ifdef HAVE_CONFIG_H -43,11 +43,9 { unsigned int i; - /* -* we don't need to call mysql_stmt_close here. -* in case mysqli_stmt_close wasn't called, all -* statements will be freed via mysql_close -*/ + if (stmt-stmt) { + mysql_stmt_close(stmt-stmt); + } if (stmt-var_cnt) { for (i = 0; i stmt-var_cnt; i++) { -361,10 +359,11 MYSQLI_FETCH_RESOURCE(result, MYSQL_RES *, mysql_result, mysqli_result); - array_init(return_value); - fields = mysql_fetch_fields(result); - row = mysql_fetch_row(result); + if (!(row = mysql_fetch_row(result))) { + RETURN_FALSE; + } + array_init(return_value); field_len = mysql_fetch_lengths(result); for (i = 0; i mysql_num_fields(result); i++) { Index: php4/ext/mysqli/mysqli_api.c diff -u php4/ext/mysqli/mysqli_api.c:1.15 php4/ext/mysqli/mysqli_api.c:1.16 --- php4/ext/mysqli/mysqli_api.c:1.15 Tue Feb 18 03:49:00 2003 +++ php4/ext/mysqli/mysqli_api.cSat Feb 22 02:31:01 2003 -1,8 +1,8 /* +--+ - | PHP Version 4| + | PHP Version 5| +--+ - | Copyright (c) 1997-2002 The PHP Group| + | Copyright (c) 1997-2003 The PHP Group| +--+ | This source file is subject to version 2.02 of the PHP license, | | that is bundled with this
[PHP-CVS] cvs: php4 /ext/mysqli mysqli_api.c
georg Sat Feb 22 02:47:47 2003 EDT Modified files: /php4/ext/mysqlimysqli_api.c Log: removed some comments Index: php4/ext/mysqli/mysqli_api.c diff -u php4/ext/mysqli/mysqli_api.c:1.16 php4/ext/mysqli/mysqli_api.c:1.17 --- php4/ext/mysqli/mysqli_api.c:1.16 Sat Feb 22 02:31:01 2003 +++ php4/ext/mysqli/mysqli_api.cSat Feb 22 02:47:46 2003 -15,7 +15,7 | Author: Georg Richter [EMAIL PROTECTED]| +--+ - $Id: mysqli_api.c,v 1.16 2003/02/22 07:31:01 georg Exp $ + $Id: mysqli_api.c,v 1.17 2003/02/22 07:47:46 georg Exp $ */ #ifdef HAVE_CONFIG_H -148,8 +148,8 case MYSQLI_BIND_STRING: bind[ofs].buffer_type = MYSQL_TYPE_VAR_STRING; - bind[ofs].buffer = NULL; // Z_STRVAL_PP(args[i]); - bind[ofs].buffer_length = 0; // strlen(Z_STRVAL_PP(args[i])); + bind[ofs].buffer = NULL; + bind[ofs].buffer_length = 0; bind[ofs].is_null = stmt-is_null[ofs]; break; -283,8 +283,6 case MYSQL_TYPE_LONGLONG: stmt-bind[ofs].type = IS_STRING; - - /* TODO: change and check buflen when bug #74 is fixed */ stmt-bind[ofs].buflen = sizeof(my_ulonglong); stmt-bind[ofs].buffer = (char *)emalloc(stmt-bind[ofs].buflen); bind[ofs].buffer_type = MYSQL_TYPE_LONGLONG; -659,9 +657,6 efree(stmt-vars[i]-value.str.val); } ZVAL_STRING(stmt-vars[i], stmt-bind[i].buffer, 1); - /* - stmt-vars[i]-value.str.len = strlen(stmt-bind[i].buffer); - stmt-vars[i]-value.str.val = stmt-bind[i].buffer; */ } break; default: -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php