[PHP-CVS-DAILY] cvs: ZendEngine2 / ChangeLog
changelog Sun Feb 9 20:32:53 2003 EDT Modified files: /ZendEngine2ChangeLog Log: ChangeLog update Index: ZendEngine2/ChangeLog diff -u ZendEngine2/ChangeLog:1.167 ZendEngine2/ChangeLog:1.168 --- ZendEngine2/ChangeLog:1.167 Sat Feb 8 20:31:33 2003 +++ ZendEngine2/ChangeLog Sun Feb 9 20:32:53 2003 @@ -1,3 +1,8 @@ +2003-02-09 Zeev Suraski [EMAIL PROTECTED] + +* zend_execute.c: + Fix the array() problem (and probably some other problems too) + 2003-02-08 Georg Richter [EMAIL PROTECTED] * zend_API.c @@ -225,7 +230,7 @@ zend_types.h zend_variables.c zend_variables.h: - - Added some missing CVS $Id: ChangeLog,v 1.167 2003/02/09 01:31:33 changelog Exp $ tags, headers and footers. + - Added some missing CVS $Id: ChangeLog,v 1.168 2003/02/10 01:32:53 changelog +Exp $ tags, headers and footers. 2003-01-30 Ilia Alshanetsky [EMAIL PROTECTED]
[PHP-CVS] cvs: php4(PHP_4_3) /ext/mssql php_mssql.c
fmk Sun Feb 9 03:32:54 2003 EDT Modified files: (Branch: PHP_4_3) /php4/ext/mssql php_mssql.c Log: Fixing coredump when no php.ini file is used Index: php4/ext/mssql/php_mssql.c diff -u php4/ext/mssql/php_mssql.c:1.86.2.11 php4/ext/mssql/php_mssql.c:1.86.2.12 --- php4/ext/mssql/php_mssql.c:1.86.2.11Sun Feb 9 02:18:27 2003 +++ php4/ext/mssql/php_mssql.c Sun Feb 9 03:32:54 2003 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_mssql.c,v 1.86.2.11 2003/02/09 07:18:27 fmk Exp $ */ +/* $Id: php_mssql.c,v 1.86.2.12 2003/02/09 08:32:54 fmk Exp $ */ #ifdef COMPILE_DL_MSSQL #define HAVE_MSSQL 1 @@ -275,6 +275,9 @@ } else { mssql_globals-get_column_content = php_mssql_get_column_content_with_type; } + } + else { + mssql_globals-get_column_content = +php_mssql_get_column_content_with_type; } } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/mssql php_mssql.c
fmk Sun Feb 9 03:33:40 2003 EDT Modified files: /php4/ext/mssql php_mssql.c Log: Fixing coredump when no php.ini file is used Index: php4/ext/mssql/php_mssql.c diff -u php4/ext/mssql/php_mssql.c:1.103 php4/ext/mssql/php_mssql.c:1.104 --- php4/ext/mssql/php_mssql.c:1.103Sun Feb 9 02:18:02 2003 +++ php4/ext/mssql/php_mssql.c Sun Feb 9 03:33:40 2003 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_mssql.c,v 1.103 2003/02/09 07:18:02 fmk Exp $ */ +/* $Id: php_mssql.c,v 1.104 2003/02/09 08:33:40 fmk Exp $ */ #ifdef COMPILE_DL_MSSQL #define HAVE_MSSQL 1 @@ -275,6 +275,9 @@ } else { mssql_globals-get_column_content = php_mssql_get_column_content_with_type; } + } + else { + mssql_globals-get_column_content = +php_mssql_get_column_content_with_type; } } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/mssql php_mssql.c
fmk Sun Feb 9 04:39:54 2003 EDT Modified files: /php4/ext/mssql php_mssql.c Log: cleanup variable initializations Index: php4/ext/mssql/php_mssql.c diff -u php4/ext/mssql/php_mssql.c:1.104 php4/ext/mssql/php_mssql.c:1.105 --- php4/ext/mssql/php_mssql.c:1.104Sun Feb 9 03:33:40 2003 +++ php4/ext/mssql/php_mssql.c Sun Feb 9 04:39:53 2003 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_mssql.c,v 1.104 2003/02/09 08:33:40 fmk Exp $ */ +/* $Id: php_mssql.c,v 1.105 2003/02/09 09:39:53 fmk Exp $ */ #ifdef COMPILE_DL_MSSQL #define HAVE_MSSQL 1 @@ -1856,16 +1856,13 @@ Adds a parameter to a stored procedure or a remote stored procedure */ PHP_FUNCTION(mssql_bind) { - int type, is_output, is_null, datalen, maxlen; + int type, is_output, is_null, datalen, maxlen = -1; zval **stmt, **param_name, **var, **yytype; mssql_link *mssql_ptr; mssql_statement *statement; mssql_bind bind,*bindp; - int id, status; - LPBYTE value; - - id=0; - status=0; + int id = 0, status = 0; + LPBYTE value = NULL; /* BEGIN input validation */ switch(ZEND_NUM_ARGS()) { @@ -1877,8 +1874,6 @@ type=Z_LVAL_PP(yytype); is_null=FALSE; is_output=FALSE; - maxlen=-1; - break; case 5: { @@ -1892,7 +1887,6 @@ type=Z_LVAL_PP(yytype); is_null=FALSE; is_output=Z_LVAL_PP(yyis_output); - maxlen=-1; } break; @@ -1908,7 +1902,6 @@ type=Z_LVAL_PP(yytype); is_output=Z_LVAL_PP(yyis_output); is_null=Z_LVAL_PP(yyis_null); - maxlen=-1; } break; -- 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/tests/time 003.phpt
k.schroeder Sun Feb 9 07:05:59 2003 EDT Modified files: (Branch: PHP_4_3) /php4/ext/standard/tests/time 003.phpt Log: Windows doesn't know timezone CET Index: php4/ext/standard/tests/time/003.phpt diff -u php4/ext/standard/tests/time/003.phpt:1.1 php4/ext/standard/tests/time/003.phpt:1.1.4.1 --- php4/ext/standard/tests/time/003.phpt:1.1 Wed Jun 12 11:35:27 2002 +++ php4/ext/standard/tests/time/003.phpt Sun Feb 9 07:05:58 2003 @@ -15,7 +15,7 @@ echo date(Y-m-d, mktime( 12, 0, 0, 2, 29, 2001)) .\n; echo date(Y-m-d, mktime( 12, 0, 0, 0, 0, 2000)) .\n; - putenv(TZ=CET); + putenv(TZ=GST-1GDT); echo date(Y-m-d H:i:s, mktime(12,0,0,3,+90,2000,-1)).\n; echo date(Y-m-d H:i:s, mktime(12,0,0,3,+90,2000,0)).\n; echo date(Y-m-d H:i:s, mktime(12,0,0,3,+90,2000,1)).\n; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4(PHP_4_3) /ext/standard/tests/time 003.phpt
On Sun, 9 Feb 2003, Kai Schröder wrote: k.schroeder Sun Feb 9 07:05:59 2003 EDT Modified files: (Branch: PHP_4_3) /php4/ext/standard/tests/time 003.phpt Log: Windows doesn't know timezone CET And do unices understant this new one? Derick -- - Derick Rethans http://derickrethans.nl/ PHP Magazine - PHP Magazine for Professionals http://php-mag.net/ - -- 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/tests/time 002.phpt
k.schroeder Sun Feb 9 07:07:42 2003 EDT Modified files: (Branch: PHP_4_3) /php4/ext/standard/tests/time 002.phpt Log: skip for Windows (does not support dates prior to midnight, January 1, 1970) Index: php4/ext/standard/tests/time/002.phpt diff -u php4/ext/standard/tests/time/002.phpt:1.4 php4/ext/standard/tests/time/002.phpt:1.4.2.1 --- php4/ext/standard/tests/time/002.phpt:1.4 Tue Oct 29 10:36:47 2002 +++ php4/ext/standard/tests/time/002.phpt Sun Feb 9 07:07:42 2003 @@ -2,6 +2,9 @@ strtotime() function --SKIPIF-- ?php +if (substr(PHP_OS, 0, 3) == 'WIN') { +print 'skip Windows does not support dates prior to midnight (00:00:00), January +1, 1970'; +} if (!@putenv(TZ=Europe/Amsterdam) || getenv(TZ) != 'Europe/Amsterdam') { die(skip unable to change TZ enviroment variable\n); } -- 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/tests/time 002-win32.phpt
k.schroeder Sun Feb 9 07:09:42 2003 EDT Added files: (Branch: PHP_4_3) /php4/ext/standard/tests/time 002-win32.phpt Log: Windows does not support dates prior to midnight, January 1, 1970 Index: php4/ext/standard/tests/time/002-win32.phpt +++ php4/ext/standard/tests/time/002-win32.phpt -- 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/tests/time mktime.phpt
k.schroeder Sun Feb 9 07:11:01 2003 EDT Added files: (Branch: PHP_4_3) /php4/ext/standard/tests/time mktime.phpt Log: test for mktime() Index: php4/ext/standard/tests/time/mktime.phpt +++ php4/ext/standard/tests/time/mktime.phpt -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/mssql php_mssql.c
derick Sun Feb 9 07:15:05 2003 EDT Modified files: /php4/ext/mssql php_mssql.c Log: - Whitespace fixes Index: php4/ext/mssql/php_mssql.c diff -u php4/ext/mssql/php_mssql.c:1.105 php4/ext/mssql/php_mssql.c:1.106 --- php4/ext/mssql/php_mssql.c:1.105Sun Feb 9 04:39:53 2003 +++ php4/ext/mssql/php_mssql.c Sun Feb 9 07:15:05 2003 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_mssql.c,v 1.105 2003/02/09 09:39:53 fmk Exp $ */ +/* $Id: php_mssql.c,v 1.106 2003/02/09 12:15:05 derick Exp $ */ #ifdef COMPILE_DL_MSSQL #define HAVE_MSSQL 1 @@ -275,8 +275,7 @@ } else { mssql_globals-get_column_content = php_mssql_get_column_content_with_type; } - } - else { + } else { mssql_globals-get_column_content = php_mssql_get_column_content_with_type; } } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/standard/tests/time mktime.phpt
k.schroeder Sun Feb 9 07:19:02 2003 EDT Modified files: /php4/ext/standard/tests/time mktime.phpt Log: test for mktime() Index: php4/ext/standard/tests/time/mktime.phpt diff -u /dev/null php4/ext/standard/tests/time/mktime.phpt:1.2 --- /dev/null Sun Feb 9 07:19:02 2003 +++ php4/ext/standard/tests/time/mktime.phptSun Feb 9 07:19:02 2003 @@ -0,0 +1,49 @@ +--TEST-- +mktime() +--FILE-- +?php +$timezones = array( +'GMT', +'GST-1GDT' +); + +foreach($timezones as $timezone) +{ +putenv('TZ='.$timezone); + +/* status of daylight saving time unknown */ +var_dump(mktime(0, 0, 0, 1, 1, 2002)); +/* status of daylight saving time unknown */ +var_dump(mktime(0, 0, 0, 1, 1, 2002, -1)); +/* daylight saving time is not in affect */ +var_dump(mktime(0, 0, 0, 1, 1, 2002, 0)); +/* daylight saving time is in affect */ +var_dump(mktime(0, 0, 0, 1, 1, 2002, 1)); + +/* status of daylight saving time unknown */ +var_dump(mktime(0, 0, 0, 7, 1, 2002)); +/* status of daylight saving time unknown */ +var_dump(mktime(0, 0, 0, 7, 1, 2002, -1)); +/* daylight saving time is not in affect */ +var_dump(mktime(0, 0, 0, 7, 1, 2002, 0)); +/* daylight saving time is in affect */ +var_dump(mktime(0, 0, 0, 7, 1, 2002, 1)); +} +? +--EXPECT-- +int(1009843200) +int(1009843200) +int(1009843200) +int(1009843200) +int(1025481600) +int(1025481600) +int(1025481600) +int(1025481600) +int(1009839600) +int(1009839600) +int(1009839600) +int(1009836000) +int(1025474400) +int(1025474400) +int(1025478000) +int(1025474400) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/standard/tests/time 002.phpt
k.schroeder Sun Feb 9 07:21:47 2003 EDT Modified files: /php4/ext/standard/tests/time 002.phpt Log: skip for Windows (does not support dates prior to midnight, January 1, 1970) Index: php4/ext/standard/tests/time/002.phpt diff -u php4/ext/standard/tests/time/002.phpt:1.4 php4/ext/standard/tests/time/002.phpt:1.5 --- php4/ext/standard/tests/time/002.phpt:1.4 Tue Oct 29 10:36:47 2002 +++ php4/ext/standard/tests/time/002.phpt Sun Feb 9 07:21:47 2003 @@ -2,6 +2,9 @@ strtotime() function --SKIPIF-- ?php +if (substr(PHP_OS, 0, 3) == 'WIN') { +print 'skip Windows does not support dates prior to midnight (00:00:00), January +1, 1970'; +} if (!@putenv(TZ=Europe/Amsterdam) || getenv(TZ) != 'Europe/Amsterdam') { die(skip unable to change TZ enviroment variable\n); } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/standard/tests/time 003.phpt
k.schroeder Sun Feb 9 07:22:18 2003 EDT Modified files: /php4/ext/standard/tests/time 003.phpt Log: Windows doesn't know timezone CET Index: php4/ext/standard/tests/time/003.phpt diff -u php4/ext/standard/tests/time/003.phpt:1.1 php4/ext/standard/tests/time/003.phpt:1.2 --- php4/ext/standard/tests/time/003.phpt:1.1 Wed Jun 12 11:35:27 2002 +++ php4/ext/standard/tests/time/003.phpt Sun Feb 9 07:22:18 2003 @@ -15,7 +15,7 @@ echo date(Y-m-d, mktime( 12, 0, 0, 2, 29, 2001)) .\n; echo date(Y-m-d, mktime( 12, 0, 0, 0, 0, 2000)) .\n; - putenv(TZ=CET); + putenv(TZ=GST-1GDT); echo date(Y-m-d H:i:s, mktime(12,0,0,3,+90,2000,-1)).\n; echo date(Y-m-d H:i:s, mktime(12,0,0,3,+90,2000,0)).\n; echo date(Y-m-d H:i:s, mktime(12,0,0,3,+90,2000,1)).\n; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 /ext/standard/tests/time 002.phpt
On Sun, 9 Feb 2003, Kai Schröder wrote: k.schroeder Sun Feb 9 07:21:47 2003 EDT Modified files: /php4/ext/standard/tests/time 002.phpt Log: skip for Windows (does not support dates prior to midnight, January 1, 1970) Index: php4/ext/standard/tests/time/002.phpt diff -u php4/ext/standard/tests/time/002.phpt:1.4 php4/ext/standard/tests/time/002.phpt:1.5 --- php4/ext/standard/tests/time/002.phpt:1.4 Tue Oct 29 10:36:47 2002 +++ php4/ext/standard/tests/time/002.phpt Sun Feb 9 07:21:47 2003 @@ -2,6 +2,9 @@ strtotime() function --SKIPIF-- ?php +if (substr(PHP_OS, 0, 3) == 'WIN') { +print 'skip Windows does not support dates prior to midnight (00:00:00), January 1, 1970'; +} You need to die() here, otherwise there is the possibility that there will be two messages. Derick -- - Derick Rethans http://derickrethans.nl/ PHP Magazine - PHP Magazine for Professionals http://php-mag.net/ - -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/standard datetime.c
k.schroeder Sun Feb 9 07:28:01 2003 EDT Modified files: /php4/ext/standard datetime.c Log: MSVC's mktime() does not examine the existence of a daylight-saving-time zone Index: php4/ext/standard/datetime.c diff -u php4/ext/standard/datetime.c:1.102 php4/ext/standard/datetime.c:1.103 --- php4/ext/standard/datetime.c:1.102 Mon Feb 3 17:48:26 2003 +++ php4/ext/standard/datetime.cSun Feb 9 07:28:01 2003 @@ -19,7 +19,7 @@ */ -/* $Id: datetime.c,v 1.102 2003/02/03 22:48:26 iliaa Exp $ */ +/* $Id: datetime.c,v 1.103 2003/02/09 12:28:01 k.schroeder Exp $ */ #include php.h @@ -123,7 +123,15 @@ */ switch(arg_count) { case 7: /* daylight saving time flag */ +#ifdef PHP_WIN32 + if (daylight 0) { + ta-tm_isdst = is_dst = Z_LVAL_PP(arguments[6]); + } else { + ta-tm_isdst = is_dst = 0; + } +#else ta-tm_isdst = is_dst = Z_LVAL_PP(arguments[6]); +#endif /* fall-through */ case 6: /* year */ /* special case: -- 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 datetime.c
k.schroeder Sun Feb 9 07:28:31 2003 EDT Modified files: (Branch: PHP_4_3) /php4/ext/standard datetime.c Log: MSVC's mktime() does not examine the existence of a daylight-saving-time zone Index: php4/ext/standard/datetime.c diff -u php4/ext/standard/datetime.c:1.96.2.4 php4/ext/standard/datetime.c:1.96.2.5 --- php4/ext/standard/datetime.c:1.96.2.4 Mon Feb 3 17:48:35 2003 +++ php4/ext/standard/datetime.cSun Feb 9 07:28:31 2003 @@ -19,7 +19,7 @@ */ -/* $Id: datetime.c,v 1.96.2.4 2003/02/03 22:48:35 iliaa Exp $ */ +/* $Id: datetime.c,v 1.96.2.5 2003/02/09 12:28:31 k.schroeder Exp $ */ #include php.h @@ -123,7 +123,15 @@ */ switch(arg_count) { case 7: /* daylight saving time flag */ +#ifdef PHP_WIN32 + if (daylight 0) { + ta-tm_isdst = is_dst = Z_LVAL_PP(arguments[6]); + } else { + ta-tm_isdst = is_dst = 0; + } +#else ta-tm_isdst = is_dst = Z_LVAL_PP(arguments[6]); +#endif /* fall-through */ case 6: /* year */ /* special case: -- 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/tests/time 002.phpt
k.schroeder Sun Feb 9 07:34:07 2003 EDT Modified files: (Branch: PHP_4_3) /php4/ext/standard/tests/time 002.phpt Log: die() to skip second message Index: php4/ext/standard/tests/time/002.phpt diff -u php4/ext/standard/tests/time/002.phpt:1.4.2.1 php4/ext/standard/tests/time/002.phpt:1.4.2.2 --- php4/ext/standard/tests/time/002.phpt:1.4.2.1 Sun Feb 9 07:07:42 2003 +++ php4/ext/standard/tests/time/002.phpt Sun Feb 9 07:34:07 2003 @@ -3,7 +3,7 @@ --SKIPIF-- ?php if (substr(PHP_OS, 0, 3) == 'WIN') { -print 'skip Windows does not support dates prior to midnight (00:00:00), January 1, 1970'; +die('skip Windows does not support dates prior to midnight (00:00:00), January 1, +1970'); } if (!@putenv(TZ=Europe/Amsterdam) || getenv(TZ) != 'Europe/Amsterdam') { die(skip unable to change TZ enviroment variable\n); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4(PHP_4_3) /ext/standard/tests/file 003-win32.phpt003.phpt
On Sun, 9 Feb 2003, Kai Schröder wrote: k.schroeder Sun Feb 9 08:18:14 2003 EDT Added files: (Branch: PHP_4_3) /php4/ext/standard/tests/file 003-win32.phpt Modified files: /php4/ext/standard/tests/file 003.phpt Log: is_executable() does not exist on Windows *sigh* it does, since last night. Derick -- - Derick Rethans http://derickrethans.nl/ PHP Magazine - PHP Magazine for Professionals http://php-mag.net/ - -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/standard/tests/file 003-win32.phpt 003.phpt
k.schroeder Sun Feb 9 08:19:23 2003 EDT Modified files: /php4/ext/standard/tests/file 003-win32.phpt 003.phpt Log: is_executable() does not exist on Windows Index: php4/ext/standard/tests/file/003-win32.phpt diff -u /dev/null php4/ext/standard/tests/file/003-win32.phpt:1.2 --- /dev/null Sun Feb 9 08:19:23 2003 +++ php4/ext/standard/tests/file/003-win32.phpt Sun Feb 9 08:19:23 2003 @@ -0,0 +1,46 @@ +--TEST-- +is_*() and file_exists() return values are boolean. +--SKIPIF-- +?php +if (substr(PHP_OS, 0, 3) != 'WIN') { +die('skip only for Windows'); +} +? +--POST-- +--GET-- +--FILE-- +?php + +$funcs = array( +'is_writable', +'is_readable', +'is_file', +'file_exists', +); + +$filename=; + +foreach ($funcs as $test) { +$bb = $test($filename); +echo gettype($bb).\n; +clearstatcache(); +} + +$filename=run-tests.php; + +foreach ($funcs as $test) { +$bb = $test($filename); +echo gettype($bb).\n; +clearstatcache(); +} + +? +--EXPECT-- +boolean +boolean +boolean +boolean +boolean +boolean +boolean +boolean Index: php4/ext/standard/tests/file/003.phpt diff -u php4/ext/standard/tests/file/003.phpt:1.5 php4/ext/standard/tests/file/003.phpt:1.6 --- php4/ext/standard/tests/file/003.phpt:1.5 Sat Oct 12 12:53:13 2002 +++ php4/ext/standard/tests/file/003.phpt Sun Feb 9 08:19:23 2003 @@ -1,5 +1,11 @@ --TEST-- is_*() and file_exists() return values are boolean. +--SKIPIF-- +?php +if (substr(PHP_OS, 0, 3) == 'WIN') { + die('skip is_executable() does not exist on Windows'); +} +? --POST-- --GET-- --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/tests/file 001-win32.phpt 001.phpt
k.schroeder Sun Feb 9 08:20:34 2003 EDT Added files: (Branch: PHP_4_3) /php4/ext/standard/tests/file 001-win32.phpt Modified files: /php4/ext/standard/tests/file 001.phpt Log: there are no symlinks on Windows Index: php4/ext/standard/tests/file/001.phpt diff -u php4/ext/standard/tests/file/001.phpt:1.7 php4/ext/standard/tests/file/001.phpt:1.7.2.1 --- php4/ext/standard/tests/file/001.phpt:1.7 Sun Oct 20 20:30:05 2002 +++ php4/ext/standard/tests/file/001.phpt Sun Feb 9 08:20:34 2003 @@ -1,5 +1,11 @@ --TEST-- File type functions +--SKIPIF-- +?php +if (substr(PHP_OS, 0, 3) == 'WIN') { +die('skip no symlinks on Windows'); +} +? --POST-- --GET-- --FILE-- Index: php4/ext/standard/tests/file/001-win32.phpt +++ php4/ext/standard/tests/file/001-win32.phpt --TEST-- File type functions --SKIPIF-- ?php if (substr(PHP_OS, 0, 3) != 'WIN') { die('skip only for Windows'); } ? --POST-- --GET-- --FILE-- ?php chdir(dirname(__FILE__)); @unlink('test.file'); @unlink('test.link'); if (file_exists('test.file')) { echo test.file exists\n; } else { echo test.file does not exist\n; } fclose (fopen('test.file', 'w')); chmod ('test.file', 0744); if (file_exists('test.file')) { echo test.file exists\n; } else { echo test.file does not exist\n; } sleep (2); if (file_exists('test.link')) { echo test.link exists\n; } else { echo test.link does not exist\n; } if (is_link('test.file')) { echo test.file is a symlink\n; } else { echo test.file is not a symlink\n; } if (is_link('test.link')) { echo test.link is a symlink\n; } else { echo test.link is not a symlink\n; } if (file_exists('test.file')) { echo test.file exists\n; } else { echo test.file does not exist\n; } $s = stat ('test.file'); $ls = lstat ('test.file'); for ($i = 0; $i = 12; $i++) { if ($ls[$i] != $s[$i]) { echo test.file lstat and stat differ at element $i\n; } } echo test.file is . filetype('test.file') . \n; echo test.link is . filetype('test.link') . \n; printf (test.file permissions are 0%o\n, 0777 fileperms('test.file')); echo test.file size is . filesize('test.file') . \n; if (is_writeable('test.file')) { echo test.file is writeable\n; } else { echo test.file is not writeable\n; } if (is_readable('test.file')) { echo test.file is readable\n; } else { echo test.file is not readable\n; } if (is_file('test.file')) { echo test.file is a regular file\n; } else { echo test.file is not a regular file\n; } if (is_file('test.link')) { echo test.link is a regular file\n; } else { echo test.link is not a regular file\n; } if (is_dir('test.link')) { echo test.link is a directory\n; } else { echo test.link is not a directory\n; } if (is_dir('../file')) { echo ../file is a directory\n; } else { echo ../file is not a directory\n; } if (is_dir('test.file')) { echo test.file is a directory\n; } else { echo test.file is not a directory\n; } unlink('test.file'); if (file_exists('test.file')) { echo test.file exists (cached)\n; } else { echo test.file does not exist\n; } clearstatcache(); if (file_exists('test.file')) { echo test.file exists\n; } else { echo test.file does not exist\n; } ? --EXPECT-- test.file does not exist test.file exists test.link does not exist test.file is not a symlink test.link is not a symlink test.file exists test.file is file test.link is file test.file permissions are 0666 test.file size is 0 test.file is writeable test.file is readable test.file is a regular file test.link is not a regular file test.link is not a directory ./file is a directory test.file is not a directory test.file does not exist test.file does not exist -- 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/tests/general_functions getopt.phpt
k.schroeder Sun Feb 9 08:23:11 2003 EDT Modified files: (Branch: PHP_4_3) /php4/ext/standard/tests/general_functions getopt.phpt Log: getopt() is currently not available on Windows Index: php4/ext/standard/tests/general_functions/getopt.phpt diff -u php4/ext/standard/tests/general_functions/getopt.phpt:1.1.2.1 php4/ext/standard/tests/general_functions/getopt.phpt:1.1.2.2 --- php4/ext/standard/tests/general_functions/getopt.phpt:1.1.2.1 Wed Dec 11 12:39:42 2002 +++ php4/ext/standard/tests/general_functions/getopt.phpt Sun Feb 9 08:23:10 +2003 @@ -4,6 +4,9 @@ -v -h -d test -m 1234 -t -j --SKIPIF-- ?php + if (substr(PHP_OS, 0, 3) == 'WIN') { + die('skip getopt() is currently not available on Windows'); + } if (!ini_get('register_argc_argv')) { die(skip this test needs register_argc_argv to be enabled); } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/standard/tests/general_functions getopt.phpt
k.schroeder Sun Feb 9 08:23:51 2003 EDT Modified files: /php4/ext/standard/tests/general_functions getopt.phpt Log: getopt() is currently not available on Windows Index: php4/ext/standard/tests/general_functions/getopt.phpt diff -u php4/ext/standard/tests/general_functions/getopt.phpt:1.1 php4/ext/standard/tests/general_functions/getopt.phpt:1.2 --- php4/ext/standard/tests/general_functions/getopt.phpt:1.1 Wed Dec 11 12:38:28 2002 +++ php4/ext/standard/tests/general_functions/getopt.phpt Sun Feb 9 08:23:50 +2003 @@ -4,6 +4,9 @@ -v -h -d test -m 1234 -t -j --SKIPIF-- ?php + if (substr(PHP_OS, 0, 3) == 'WIN') { + die('skip getopt() is currently not available on Windows'); + } if (!ini_get('register_argc_argv')) { die(skip this test needs register_argc_argv to be enabled); } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/standard/tests/general_functions 007.phpt
k.schroeder Sun Feb 9 08:25:23 2003 EDT Modified files: /php4/ext/standard/tests/general_functions 007.phpt Log: newlines changed Index: php4/ext/standard/tests/general_functions/007.phpt diff -u php4/ext/standard/tests/general_functions/007.phpt:1.1 php4/ext/standard/tests/general_functions/007.phpt:1.2 --- php4/ext/standard/tests/general_functions/007.phpt:1.1 Tue Aug 20 21:26:21 2002 +++ php4/ext/standard/tests/general_functions/007.phpt Sun Feb 9 08:25:23 2003 @@ -1,26 +1,26 @@ ---TEST-- -MD5 / Base64 ---POST-- ---GET-- ---FILE-- -?php -function test($str) { - $res = md5(base64_decode(base64_encode($str))).\n; - return $res; -} -echo test(); -echo test(a); -echo test(abc); -echo test(message digest); -echo test(abcdefghijklmnopqrstuvwxyz); -echo test(ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789); -echo test(12345678901234567890123456789012345678901234567890123456789012345678901234567890); -? ---EXPECT-- -d41d8cd98f00b204e9800998ecf8427e -0cc175b9c0f1b6a831c399e269772661 -900150983cd24fb0d6963f7d28e17f72 -f96b697d7cb7938d525a2f31aaf161d0 -c3fcd3d76192e4007dfb496cca67e13b -d174ab98d277d9f5a5611c2c9f419d9f -57edf4a22be3c955ac49da2e2107b67a \ No newline at end of file +--TEST-- +MD5 / Base64 +--POST-- +--GET-- +--FILE-- +?php +function test($str) { + $res = md5(base64_decode(base64_encode($str))).\n; + return $res; +} +echo test(); +echo test(a); +echo test(abc); +echo test(message digest); +echo test(abcdefghijklmnopqrstuvwxyz); +echo test(ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789); +echo +test(12345678901234567890123456789012345678901234567890123456789012345678901234567890); +? +--EXPECT-- +d41d8cd98f00b204e9800998ecf8427e +0cc175b9c0f1b6a831c399e269772661 +900150983cd24fb0d6963f7d28e17f72 +f96b697d7cb7938d525a2f31aaf161d0 +c3fcd3d76192e4007dfb496cca67e13b +d174ab98d277d9f5a5611c2c9f419d9f +57edf4a22be3c955ac49da2e2107b67a -- 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/tests/general_functions 007.phpt
k.schroeder Sun Feb 9 08:26:01 2003 EDT Modified files: (Branch: PHP_4_3) /php4/ext/standard/tests/general_functions 007.phpt Log: newlines changed Index: php4/ext/standard/tests/general_functions/007.phpt diff -u php4/ext/standard/tests/general_functions/007.phpt:1.1 php4/ext/standard/tests/general_functions/007.phpt:1.1.4.1 --- php4/ext/standard/tests/general_functions/007.phpt:1.1 Tue Aug 20 21:26:21 2002 +++ php4/ext/standard/tests/general_functions/007.phpt Sun Feb 9 08:26:00 2003 @@ -1,26 +1,26 @@ ---TEST-- -MD5 / Base64 ---POST-- ---GET-- ---FILE-- -?php -function test($str) { - $res = md5(base64_decode(base64_encode($str))).\n; - return $res; -} -echo test(); -echo test(a); -echo test(abc); -echo test(message digest); -echo test(abcdefghijklmnopqrstuvwxyz); -echo test(ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789); -echo test(12345678901234567890123456789012345678901234567890123456789012345678901234567890); -? ---EXPECT-- -d41d8cd98f00b204e9800998ecf8427e -0cc175b9c0f1b6a831c399e269772661 -900150983cd24fb0d6963f7d28e17f72 -f96b697d7cb7938d525a2f31aaf161d0 -c3fcd3d76192e4007dfb496cca67e13b -d174ab98d277d9f5a5611c2c9f419d9f -57edf4a22be3c955ac49da2e2107b67a \ No newline at end of file +--TEST-- +MD5 / Base64 +--POST-- +--GET-- +--FILE-- +?php +function test($str) { + $res = md5(base64_decode(base64_encode($str))).\n; + return $res; +} +echo test(); +echo test(a); +echo test(abc); +echo test(message digest); +echo test(abcdefghijklmnopqrstuvwxyz); +echo test(ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789); +echo +test(12345678901234567890123456789012345678901234567890123456789012345678901234567890); +? +--EXPECT-- +d41d8cd98f00b204e9800998ecf8427e +0cc175b9c0f1b6a831c399e269772661 +900150983cd24fb0d6963f7d28e17f72 +f96b697d7cb7938d525a2f31aaf161d0 +c3fcd3d76192e4007dfb496cca67e13b +d174ab98d277d9f5a5611c2c9f419d9f +57edf4a22be3c955ac49da2e2107b67a -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-CVS] cvs: php4(PHP_4_3) /ext/standard/tests/file 003-win32.phpt 003.phpt
is_executable() does not exist on Windows *sigh* it does, since last night. Only in HEAD, can you revert this change in HEAD please? Regards, Kai -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-CVS] cvs: php4(PHP_4_3) /ext/standard/tests/file 003-win32.phpt003.phpt
On Sun, 9 Feb 2003, Kai Schröder wrote: is_executable() does not exist on Windows *sigh* it does, since last night. Only in HEAD, can you revert this change in HEAD please? Why don't you do that yourself? Derick -- - Derick Rethans http://derickrethans.nl/ PHP Magazine - PHP Magazine for Professionals http://php-mag.net/ - -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/standard/tests/file 003.phpt
k.schroeder Sun Feb 9 08:52:46 2003 EDT Modified files: /php4/ext/standard/tests/file 003.phpt Log: reverting to version 1.5; shane added is_executable() for windows last night Index: php4/ext/standard/tests/file/003.phpt diff -u php4/ext/standard/tests/file/003.phpt:1.6 php4/ext/standard/tests/file/003.phpt:1.7 --- php4/ext/standard/tests/file/003.phpt:1.6 Sun Feb 9 08:19:23 2003 +++ php4/ext/standard/tests/file/003.phpt Sun Feb 9 08:52:46 2003 @@ -1,11 +1,5 @@ --TEST-- is_*() and file_exists() return values are boolean. ---SKIPIF-- -?php -if (substr(PHP_OS, 0, 3) == 'WIN') { - die('skip is_executable() does not exist on Windows'); -} -? --POST-- --GET-- --FILE-- -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/standard/tests/file 003-win32.phpt
k.schroeder Sun Feb 9 08:54:01 2003 EDT Removed files: /php4/ext/standard/tests/file 003-win32.phpt Log: shane added is_executable() for windows last night -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/gd/libgd gd.c
helly Sun Feb 9 09:17:05 2003 EDT Modified files: /php4/ext/gd/libgd gd.c Log: Kill some warnings # the remainig is not easy to solve: float_var = float_cast(extpression) # This cannot be fixed by simply casting again to float because some # compilers may ignore the double casting. Index: php4/ext/gd/libgd/gd.c diff -u php4/ext/gd/libgd/gd.c:1.45 php4/ext/gd/libgd/gd.c:1.46 --- php4/ext/gd/libgd/gd.c:1.45 Sat Feb 8 03:41:42 2003 +++ php4/ext/gd/libgd/gd.c Sun Feb 9 09:17:05 2003 @@ -694,11 +694,11 @@ } m = (*y1 - *y0)/(double)(*x1 - *x0); /* calculate the slope of the line */ /* adjust x0 to be on the left boundary (ie to be zero), and y0 to match */ - *y0 -= m * *x0; + *y0 -= (int)(m * *x0); *x0 = 0; /* now, perhaps, adjust the far end of the line as well */ if (*x1 maxdim) { - *y1 += m * (maxdim - *x1); + *y1 += (int)(m * (maxdim - *x1)); *x1 = maxdim; } return 1; @@ -708,11 +708,11 @@ return 0; } m = (*y1 - *y0)/(double)(*x1 - *x0); /* calculate the slope of the line */ - *y0 += m * (maxdim - *x0); /* adjust so point is on the right boundary */ + *y0 += (int)(m * (maxdim - *x0)); /* adjust so point is on the right +boundary */ *x0 = maxdim; /* now, perhaps, adjust the end of the line */ if (*x1 0) { - *y1 -= m * *x1; + *y1 -= (int)(m * *x1); *x1 = 0; } return 1; @@ -720,13 +720,13 @@ /* the final case - the start of the line is inside the window */ if (*x1 maxdim) { /* other end is outside to the right */ m = (*y1 - *y0)/(double)(*x1 - *x0); /* calculate the slope of the line */ - *y1 += m * (maxdim - *x1); + *y1 += (int)(m * (maxdim - *x1)); *x1 = maxdim; return 1; } if (*x1 0) { /* other end is outside to the left */ m = (*y1 - *y0)/(double)(*x1 - *x0); /* calculate the slope of the line */ - *y1 -= m * *x1; + *y1 -= (int)(m * *x1); *x1 = 0; return 1; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/pcre config.m4
sniper Sun Feb 9 09:59:08 2003 EDT Modified files: /php4/ext/pcre config.m4 Log: Fixed bug #22131, enable use of shared lib with pcre. Index: php4/ext/pcre/config.m4 diff -u php4/ext/pcre/config.m4:1.29 php4/ext/pcre/config.m4:1.30 --- php4/ext/pcre/config.m4:1.29Tue Oct 15 09:59:55 2002 +++ php4/ext/pcre/config.m4 Sun Feb 9 09:59:07 2003 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4,v 1.29 2002/10/15 13:59:55 andrei Exp $ +dnl $Id: config.m4,v 1.30 2003/02/09 14:59:07 sniper Exp $ dnl dnl By default we'll compile and link against the bundled PCRE library @@ -17,12 +17,20 @@ PHP_ADD_BUILD_DIR($ext_builddir/pcrelib) AC_DEFINE(HAVE_BUNDLED_PCRE, 1, [ ]) else -test -f $PHP_PCRE_REGEX/pcre.h PCRE_INCDIR=$PHP_PCRE_REGEX -test -f $PHP_PCRE_REGEX/include/pcre.h PCRE_INCDIR=$PHP_PCRE_REGEX/include -test -f $PHP_PCRE_REGEX/include/pcre/pcre.h PCRE_INCDIR=$PHP_PCRE_REGEX/include/pcre +for i in $PHP_PCRE_REGEX $PHP_PCRE_REGEX/include $PHP_PCRE_REGEX/include/pcre; do + test -f $i/pcre.h PCRE_INCDIR=$i +done if test -z $PCRE_INCDIR; then - AC_MSG_RESULT(Could not find pcre.h in $PHP_PCRE_REGEX) + AC_MSG_ERROR([Could not find pcre.h in $PHP_PCRE_REGEX]) +fi + +for j in $PHP_PCRE_REGEX $PHP_PCRE_REGEX/lib; do + test -f $j/libpcre.a -o -f $j/libpcre.$SHLIB_SUFFIX_NAME PCRE_LIBDIR=$j +done + +if test -z $PCRE_LIBDIR ; then + AC_MSG_ERROR([Could not find libpcre.(a|$SHLIB_SUFFIX_NAME) in $PHP_PCRE_REGEX]) fi changequote({,}) @@ -35,14 +43,7 @@ fi pcre_version=$pcre_major$pcre_minor if test $pcre_version -lt 208; then - AC_MSG_ERROR(The PCRE extension requires PCRE library version = 2.08) -fi - -test -f $PHP_PCRE_REGEX/libpcre.a PCRE_LIBDIR=$PHP_PCRE_REGEX -test -f $PHP_PCRE_REGEX/lib/libpcre.a PCRE_LIBDIR=$PHP_PCRE_REGEX/lib - -if test -z $PCRE_LIBDIR ; then - AC_MSG_ERROR(Could not find libpcre.a in $PHP_PCRE_REGEX) + AC_MSG_ERROR([The PCRE extension requires PCRE library version = 2.08]) fi PHP_ADD_LIBRARY_WITH_PATH(pcre, $PCRE_LIBDIR, PCRE_SHARED_LIBADD) @@ -51,7 +52,5 @@ PHP_ADD_INCLUDE($PCRE_INCDIR) PHP_NEW_EXTENSION(pcre, php_pcre.c, $ext_shared,,-DSUPPORT_UTF8 -DLINK_SIZE=2) fi + PHP_SUBST(PCRE_SHARED_LIBADD) fi -PHP_SUBST(PCRE_SHARED_LIBADD) - -AC_CHECK_FUNC(memmove, [], [AC_DEFINE(USE_BCOPY, 1, [ ])]) -- 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/pcre config.m4
sniper Sun Feb 9 09:59:28 2003 EDT Modified files: (Branch: PHP_4_3) /php4/ext/pcre config.m4 Log: MFH: Fix for bug #22131 Index: php4/ext/pcre/config.m4 diff -u php4/ext/pcre/config.m4:1.29 php4/ext/pcre/config.m4:1.29.2.1 --- php4/ext/pcre/config.m4:1.29Tue Oct 15 09:59:55 2002 +++ php4/ext/pcre/config.m4 Sun Feb 9 09:59:28 2003 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4,v 1.29 2002/10/15 13:59:55 andrei Exp $ +dnl $Id: config.m4,v 1.29.2.1 2003/02/09 14:59:28 sniper Exp $ dnl dnl By default we'll compile and link against the bundled PCRE library @@ -17,12 +17,20 @@ PHP_ADD_BUILD_DIR($ext_builddir/pcrelib) AC_DEFINE(HAVE_BUNDLED_PCRE, 1, [ ]) else -test -f $PHP_PCRE_REGEX/pcre.h PCRE_INCDIR=$PHP_PCRE_REGEX -test -f $PHP_PCRE_REGEX/include/pcre.h PCRE_INCDIR=$PHP_PCRE_REGEX/include -test -f $PHP_PCRE_REGEX/include/pcre/pcre.h PCRE_INCDIR=$PHP_PCRE_REGEX/include/pcre +for i in $PHP_PCRE_REGEX $PHP_PCRE_REGEX/include $PHP_PCRE_REGEX/include/pcre; do + test -f $i/pcre.h PCRE_INCDIR=$i +done if test -z $PCRE_INCDIR; then - AC_MSG_RESULT(Could not find pcre.h in $PHP_PCRE_REGEX) + AC_MSG_ERROR([Could not find pcre.h in $PHP_PCRE_REGEX]) +fi + +for j in $PHP_PCRE_REGEX $PHP_PCRE_REGEX/lib; do + test -f $j/libpcre.a -o -f $j/libpcre.$SHLIB_SUFFIX_NAME PCRE_LIBDIR=$j +done + +if test -z $PCRE_LIBDIR ; then + AC_MSG_ERROR([Could not find libpcre.(a|$SHLIB_SUFFIX_NAME) in $PHP_PCRE_REGEX]) fi changequote({,}) @@ -35,14 +43,7 @@ fi pcre_version=$pcre_major$pcre_minor if test $pcre_version -lt 208; then - AC_MSG_ERROR(The PCRE extension requires PCRE library version = 2.08) -fi - -test -f $PHP_PCRE_REGEX/libpcre.a PCRE_LIBDIR=$PHP_PCRE_REGEX -test -f $PHP_PCRE_REGEX/lib/libpcre.a PCRE_LIBDIR=$PHP_PCRE_REGEX/lib - -if test -z $PCRE_LIBDIR ; then - AC_MSG_ERROR(Could not find libpcre.a in $PHP_PCRE_REGEX) + AC_MSG_ERROR([The PCRE extension requires PCRE library version = 2.08]) fi PHP_ADD_LIBRARY_WITH_PATH(pcre, $PCRE_LIBDIR, PCRE_SHARED_LIBADD) @@ -51,7 +52,5 @@ PHP_ADD_INCLUDE($PCRE_INCDIR) PHP_NEW_EXTENSION(pcre, php_pcre.c, $ext_shared,,-DSUPPORT_UTF8 -DLINK_SIZE=2) fi + PHP_SUBST(PCRE_SHARED_LIBADD) fi -PHP_SUBST(PCRE_SHARED_LIBADD) - -AC_CHECK_FUNC(memmove, [], [AC_DEFINE(USE_BCOPY, 1, [ ])]) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/standard aggregation.c
sniper Sun Feb 9 13:47:21 2003 EDT Modified files: /php4/ext/standard aggregation.c Log: Let this compile even if PCRE is compiled as shared in same build. Index: php4/ext/standard/aggregation.c diff -u php4/ext/standard/aggregation.c:1.16 php4/ext/standard/aggregation.c:1.17 --- php4/ext/standard/aggregation.c:1.16Tue Feb 4 08:12:47 2003 +++ php4/ext/standard/aggregation.c Sun Feb 9 13:47:21 2003 @@ -16,12 +16,12 @@ +--+ */ -/* $Id: aggregation.c,v 1.16 2003/02/04 13:12:47 zeev Exp $ */ +/* $Id: aggregation.c,v 1.17 2003/02/09 18:47:21 sniper Exp $ */ #include php.h #include basic_functions.h #include aggregation.h -#if HAVE_PCRE || HAVE_BUNDLED_PCRE +#if (HAVE_PCRE || HAVE_BUNDLED_PCRE) !defined(COMPILE_DL_PCRE) #include ext/pcre/php_pcre.h #endif @@ -86,7 +86,7 @@ uint func_name_len; ulong num_key; zval *list_hash = NULL; -#if HAVE_PCRE || HAVE_BUNDLED_PCRE +#if (HAVE_PCRE || HAVE_BUNDLED_PCRE) !defined(COMPILE_DL_PCRE) pcre *re = NULL; pcre_extra *re_extra = NULL; int re_options = 0; @@ -98,7 +98,7 @@ if (aggr_type == AGGREGATE_BY_LIST) { list_hash = array_to_hash(aggr_filter); } -#if HAVE_PCRE || HAVE_BUNDLED_PCRE +#if (HAVE_PCRE || HAVE_BUNDLED_PCRE) !defined(COMPILE_DL_PCRE) else if (aggr_type == AGGREGATE_BY_REGEXP) { if ((re = pcre_get_compiled_regex(Z_STRVAL_P(aggr_filter), re_extra, re_options)) == NULL) { return; @@ -128,7 +128,7 @@ func_name[0] == '_' || /* 3. explicitly excluded methods */ (aggr_type == AGGREGATE_BY_LIST zend_hash_exists(Z_ARRVAL_P(list_hash), func_name, func_name_len)) -#if HAVE_PCRE || HAVE_BUNDLED_PCRE +#if (HAVE_PCRE || HAVE_BUNDLED_PCRE) !defined(COMPILE_DL_PCRE) || /* 4. methods matching regexp as modified by the exclusion flag */ (aggr_type == AGGREGATE_BY_REGEXP (pcre_exec(re, re_extra, func_name, func_name_len-1, 0, 0, NULL, 0) 0) ^ exclude) == 1 @@ -187,7 +187,7 @@ uint prop_name_len; ulong num_key; zval *list_hash = NULL; -#if HAVE_PCRE || HAVE_BUNDLED_PCRE +#if (HAVE_PCRE || HAVE_BUNDLED_PCRE) !defined(COMPILE_DL_PCRE) pcre *re = NULL; pcre_extra *re_extra = NULL; int re_options = 0; @@ -204,7 +204,7 @@ if (aggr_type == AGGREGATE_BY_LIST) { list_hash = array_to_hash(aggr_filter); } -#if HAVE_PCRE || HAVE_BUNDLED_PCRE +#if (HAVE_PCRE || HAVE_BUNDLED_PCRE) !defined(COMPILE_DL_PCRE) else if (aggr_type == AGGREGATE_BY_REGEXP) { if ((re = pcre_get_compiled_regex(Z_STRVAL_P(aggr_filter), re_extra, re_options)) == NULL) { return; @@ -232,7 +232,7 @@ if (prop_name[0] == '_' || /* 2. explicitly excluded properties */ (aggr_type == AGGREGATE_BY_LIST zend_hash_exists(Z_ARRVAL_P(list_hash), prop_name, prop_name_len)) -#if HAVE_PCRE || HAVE_BUNDLED_PCRE +#if (HAVE_PCRE || HAVE_BUNDLED_PCRE) !defined(COMPILE_DL_PCRE) || /* 3. properties matching regexp as modified by the exclusion flag */ (aggr_type == AGGREGATE_BY_REGEXP (pcre_exec(re, re_extra, prop_name, prop_name_len-1, 0, 0, NULL, 0) 0) ^ exclude) == 1 -- 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 aggregation.c
sniper Sun Feb 9 13:47:30 2003 EDT Modified files: (Branch: PHP_4_3) /php4/ext/standard aggregation.c Log: MFH Index: php4/ext/standard/aggregation.c diff -u php4/ext/standard/aggregation.c:1.11.4.2 php4/ext/standard/aggregation.c:1.11.4.3 --- php4/ext/standard/aggregation.c:1.11.4.2Tue Dec 31 11:35:23 2002 +++ php4/ext/standard/aggregation.c Sun Feb 9 13:47:30 2003 @@ -16,12 +16,12 @@ +--+ */ -/* $Id: aggregation.c,v 1.11.4.2 2002/12/31 16:35:23 sebastian Exp $ */ +/* $Id: aggregation.c,v 1.11.4.3 2003/02/09 18:47:30 sniper Exp $ */ #include php.h #include basic_functions.h #include aggregation.h -#if HAVE_PCRE || HAVE_BUNDLED_PCRE +#if (HAVE_PCRE || HAVE_BUNDLED_PCRE) !defined(COMPILE_DL_PCRE) #include ext/pcre/php_pcre.h #endif @@ -77,7 +77,7 @@ uint func_name_len; ulong num_key; zval *list_hash = NULL; -#if HAVE_PCRE || HAVE_BUNDLED_PCRE +#if (HAVE_PCRE || HAVE_BUNDLED_PCRE) !defined(COMPILE_DL_PCRE) pcre *re = NULL; pcre_extra *re_extra = NULL; int re_options = 0; @@ -89,7 +89,7 @@ if (aggr_type == AGGREGATE_BY_LIST) { list_hash = array_to_hash(aggr_filter); } -#if HAVE_PCRE || HAVE_BUNDLED_PCRE +#if (HAVE_PCRE || HAVE_BUNDLED_PCRE) !defined(COMPILE_DL_PCRE) else if (aggr_type == AGGREGATE_BY_REGEXP) { if ((re = pcre_get_compiled_regex(Z_STRVAL_P(aggr_filter), re_extra, re_options)) == NULL) { return; @@ -119,7 +119,7 @@ func_name[0] == '_' || /* 3. explicitly excluded methods */ (aggr_type == AGGREGATE_BY_LIST zend_hash_exists(Z_ARRVAL_P(list_hash), func_name, func_name_len)) -#if HAVE_PCRE || HAVE_BUNDLED_PCRE +#if (HAVE_PCRE || HAVE_BUNDLED_PCRE) !defined(COMPILE_DL_PCRE) || /* 4. methods matching regexp as modified by the exclusion flag */ (aggr_type == AGGREGATE_BY_REGEXP (pcre_exec(re, re_extra, func_name, func_name_len-1, 0, 0, NULL, 0) 0) ^ exclude) == 1 @@ -178,7 +178,7 @@ uint prop_name_len; ulong num_key; zval *list_hash = NULL; -#if HAVE_PCRE || HAVE_BUNDLED_PCRE +#if (HAVE_PCRE || HAVE_BUNDLED_PCRE) !defined(COMPILE_DL_PCRE) pcre *re = NULL; pcre_extra *re_extra = NULL; int re_options = 0; @@ -195,7 +195,7 @@ if (aggr_type == AGGREGATE_BY_LIST) { list_hash = array_to_hash(aggr_filter); } -#if HAVE_PCRE || HAVE_BUNDLED_PCRE +#if (HAVE_PCRE || HAVE_BUNDLED_PCRE) !defined(COMPILE_DL_PCRE) else if (aggr_type == AGGREGATE_BY_REGEXP) { if ((re = pcre_get_compiled_regex(Z_STRVAL_P(aggr_filter), re_extra, re_options)) == NULL) { return; @@ -223,7 +223,7 @@ if (prop_name[0] == '_' || /* 2. explicitly excluded properties */ (aggr_type == AGGREGATE_BY_LIST zend_hash_exists(Z_ARRVAL_P(list_hash), prop_name, prop_name_len)) -#if HAVE_PCRE || HAVE_BUNDLED_PCRE +#if (HAVE_PCRE || HAVE_BUNDLED_PCRE) !defined(COMPILE_DL_PCRE) || /* 3. properties matching regexp as modified by the exclusion flag */ (aggr_type == AGGREGATE_BY_REGEXP (pcre_exec(re, re_extra, prop_name, prop_name_len-1, 0, 0, NULL, 0) 0) ^ exclude) == 1 -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/mime_magic mime_magic.c /ext/standard aggregation.c basic_functions.c image.c /main SAPI.c output.c
sniper Sun Feb 9 14:09:52 2003 EDT Modified files: /php4/ext/mime_magicmime_magic.c /php4/ext/standard aggregation.c basic_functions.c image.c /php4/main SAPI.c output.c Log: Fixed compile failures when ZLIB / PCRE are compiled as shared extensions in same build. Index: php4/ext/mime_magic/mime_magic.c diff -u php4/ext/mime_magic/mime_magic.c:1.26 php4/ext/mime_magic/mime_magic.c:1.27 --- php4/ext/mime_magic/mime_magic.c:1.26 Sun Jan 26 04:13:31 2003 +++ php4/ext/mime_magic/mime_magic.cSun Feb 9 14:09:49 2003 @@ -15,7 +15,7 @@ | Author: Hartmut Holzgraefe [EMAIL PROTECTED] | +--+ - $Id: mime_magic.c,v 1.26 2003/01/26 09:13:31 sander Exp $ + $Id: mime_magic.c,v 1.27 2003/02/09 19:09:49 sniper Exp $ This module contains a lot of stuff taken from Apache mod_mime_magic, so the license section is a little bit longer than usual: @@ -192,7 +192,7 @@ static int fsmagic(char *fn TSRMLS_DC); -#if HAVE_ZLIB +#if HAVE_ZLIB !defined(COMPILE_DL_ZLIB) static int zmagic(unsigned char *, int); #endif @@ -1057,7 +1057,7 @@ /* * Try compression stuff */ -#if HAVE_ZLIB +#if HAVE_ZLIB !defined(COMPILE_DL_ZLIB) if (checkzmagic == 1) { if (zmagic(buf, nb) == 1) return; @@ -1606,7 +1606,7 @@ return matched; } -#if HAVE_ZLIB +#if HAVE_ZLIB !defined(COMPILE_DL_ZLIB) /* * compress routines: zmagic() - returns 0 if not recognized, uncompresses * and prints information if recognized uncompress(s, method, old, n, newch) Index: php4/ext/standard/aggregation.c diff -u php4/ext/standard/aggregation.c:1.17 php4/ext/standard/aggregation.c:1.18 --- php4/ext/standard/aggregation.c:1.17Sun Feb 9 13:47:21 2003 +++ php4/ext/standard/aggregation.c Sun Feb 9 14:09:50 2003 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: aggregation.c,v 1.17 2003/02/09 18:47:21 sniper Exp $ */ +/* $Id: aggregation.c,v 1.18 2003/02/09 19:09:50 sniper Exp $ */ #include php.h #include basic_functions.h @@ -524,7 +524,7 @@ } /* }}} */ -#if HAVE_PCRE || HAVE_BUNDLED_PCRE +#if (HAVE_PCRE || HAVE_BUNDLED_PCRE) !defined(COMPILE_DL_PCRE) /* {{{ proto void aggregate_methods_by_regexp(object obj, string class, string regexp [, bool exclude]) */ PHP_FUNCTION(aggregate_methods_by_regexp) Index: php4/ext/standard/basic_functions.c diff -u php4/ext/standard/basic_functions.c:1.574 php4/ext/standard/basic_functions.c:1.575 --- php4/ext/standard/basic_functions.c:1.574 Sat Feb 8 22:49:41 2003 +++ php4/ext/standard/basic_functions.c Sun Feb 9 14:09:50 2003 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: basic_functions.c,v 1.574 2003/02/09 03:49:41 shane Exp $ */ +/* $Id: basic_functions.c,v 1.575 2003/02/09 19:09:50 sniper Exp $ */ #include php.h #include php_streams.h @@ -886,7 +886,7 @@ PHP_FE(aggregate_methods_by_list, first_arg_force_ref) PHP_FE(aggregate_properties,first_arg_force_ref) PHP_FE(aggregate_properties_by_list,first_arg_force_ref) -#if HAVE_PCRE || HAVE_BUNDLED_PCRE +#if (HAVE_PCRE || HAVE_BUNDLED_PCRE) !defined(COMPILE_DL_PCRE) PHP_FE(aggregate_methods_by_regexp, first_arg_force_ref) PHP_FE(aggregate_properties_by_regexp, first_arg_force_ref) #endif Index: php4/ext/standard/image.c diff -u php4/ext/standard/image.c:1.88 php4/ext/standard/image.c:1.89 --- php4/ext/standard/image.c:1.88 Sat Feb 1 18:38:29 2003 +++ php4/ext/standard/image.c Sun Feb 9 14:09:51 2003 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: image.c,v 1.88 2003/02/01 23:38:29 helly Exp $ */ +/* $Id: image.c,v 1.89 2003/02/09 19:09:51 sniper Exp $ */ #include php.h #include stdio.h @@ -34,7 +34,7 @@ #endif #include php_image.h -#if HAVE_ZLIB +#if HAVE_ZLIB !defined(COMPILE_DL_ZLIB) #include zlib.h #endif @@ -83,7 +83,7 @@ REGISTER_LONG_CONSTANT(IMAGETYPE_JP2, IMAGE_FILETYPE_JP2, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT(IMAGETYPE_JPX, IMAGE_FILETYPE_JPX, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT(IMAGETYPE_JB2, IMAGE_FILETYPE_JB2, CONST_CS | CONST_PERSISTENT); -#if HAVE_ZLIB +#if HAVE_ZLIB !defined(COMPILE_DL_ZLIB) REGISTER_LONG_CONSTANT(IMAGETYPE_SWC, IMAGE_FILETYPE_SWC, CONST_CS | CONST_PERSISTENT); #endif REGISTER_LONG_CONSTANT(IMAGETYPE_IFF, IMAGE_FILETYPE_IFF, CONST_CS | CONST_PERSISTENT); @@ -176,7 +176,7 @@ } /* }}} */ -#if HAVE_ZLIB +#if HAVE_ZLIB !defined(COMPILE_DL_ZLIB) /* {{{ php_handle_swc */ static struct gfxinfo *php_handle_swc(php_stream * stream TSRMLS_DC)
[PHP-CVS] cvs: php4(PHP_4_3) /ext/mime_magic mime_magic.c /ext/standard aggregation.c basic_functions.c image.c /main SAPI.c output.c
sniper Sun Feb 9 14:10:33 2003 EDT Modified files: (Branch: PHP_4_3) /php4/ext/mime_magicmime_magic.c /php4/ext/standard aggregation.c basic_functions.c image.c /php4/main SAPI.c output.c Log: MFH: fixed compile failures when ZLIB/PCRE are compiled as shared in same build. Index: php4/ext/mime_magic/mime_magic.c diff -u php4/ext/mime_magic/mime_magic.c:1.13.2.8 php4/ext/mime_magic/mime_magic.c:1.13.2.9 --- php4/ext/mime_magic/mime_magic.c:1.13.2.8 Sun Jan 26 04:20:12 2003 +++ php4/ext/mime_magic/mime_magic.cSun Feb 9 14:10:32 2003 @@ -15,7 +15,7 @@ | Author: Hartmut Holzgraefe [EMAIL PROTECTED] | +--+ - $Id: mime_magic.c,v 1.13.2.8 2003/01/26 09:20:12 sander Exp $ + $Id: mime_magic.c,v 1.13.2.9 2003/02/09 19:10:32 sniper Exp $ This module contains a lot of stuff taken from Apache mod_mime_magic, so the license section is a little bit longer than usual: @@ -194,7 +194,7 @@ static int fsmagic(char *fn TSRMLS_DC); -#if HAVE_ZLIB +#if HAVE_ZLIB !defined(COMPILE_DL_ZLIB) static int zmagic(unsigned char *, int); #endif @@ -1020,7 +1020,7 @@ /* * Try compression stuff */ -#if HAVE_ZLIB +#if HAVE_ZLIB !defined(COMPILE_DL_ZLIB) if (checkzmagic == 1) { if (zmagic(buf, nb) == 1) return; @@ -1569,7 +1569,7 @@ return matched; } -#if HAVE_ZLIB +#if HAVE_ZLIB !defined(COMPILE_DL_ZLIB) /* * compress routines: zmagic() - returns 0 if not recognized, uncompresses * and prints information if recognized uncompress(s, method, old, n, newch) Index: php4/ext/standard/aggregation.c diff -u php4/ext/standard/aggregation.c:1.11.4.3 php4/ext/standard/aggregation.c:1.11.4.4 --- php4/ext/standard/aggregation.c:1.11.4.3Sun Feb 9 13:47:30 2003 +++ php4/ext/standard/aggregation.c Sun Feb 9 14:10:32 2003 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: aggregation.c,v 1.11.4.3 2003/02/09 18:47:30 sniper Exp $ */ +/* $Id: aggregation.c,v 1.11.4.4 2003/02/09 19:10:32 sniper Exp $ */ #include php.h #include basic_functions.h @@ -508,7 +508,7 @@ } /* }}} */ -#if HAVE_PCRE || HAVE_BUNDLED_PCRE +#if (HAVE_PCRE || HAVE_BUNDLED_PCRE) !defined(COMPILE_DL_PCRE) /* {{{ proto void aggregate_methods_by_regexp(object obj, string class, string regexp [, bool exclude]) */ PHP_FUNCTION(aggregate_methods_by_regexp) Index: php4/ext/standard/basic_functions.c diff -u php4/ext/standard/basic_functions.c:1.543.2.7 php4/ext/standard/basic_functions.c:1.543.2.8 --- php4/ext/standard/basic_functions.c:1.543.2.7 Thu Feb 6 09:34:07 2003 +++ php4/ext/standard/basic_functions.c Sun Feb 9 14:10:32 2003 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: basic_functions.c,v 1.543.2.7 2003/02/06 14:34:07 andrey Exp $ */ +/* $Id: basic_functions.c,v 1.543.2.8 2003/02/09 19:10:32 sniper Exp $ */ #include php.h #include php_streams.h @@ -865,7 +865,7 @@ PHP_FE(aggregate_methods_by_list, first_arg_force_ref) PHP_FE(aggregate_properties,first_arg_force_ref) PHP_FE(aggregate_properties_by_list,first_arg_force_ref) -#if HAVE_PCRE || HAVE_BUNDLED_PCRE +#if (HAVE_PCRE || HAVE_BUNDLED_PCRE) !defined(COMPILE_DL_PCRE) PHP_FE(aggregate_methods_by_regexp, first_arg_force_ref) PHP_FE(aggregate_properties_by_regexp, first_arg_force_ref) #endif Index: php4/ext/standard/image.c diff -u php4/ext/standard/image.c:1.72.2.7 php4/ext/standard/image.c:1.72.2.8 --- php4/ext/standard/image.c:1.72.2.7 Tue Dec 31 11:35:29 2002 +++ php4/ext/standard/image.c Sun Feb 9 14:10:32 2003 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: image.c,v 1.72.2.7 2002/12/31 16:35:29 sebastian Exp $ */ +/* $Id: image.c,v 1.72.2.8 2003/02/09 19:10:32 sniper Exp $ */ #include php.h #include stdio.h @@ -34,7 +34,7 @@ #endif #include php_image.h -#if HAVE_ZLIB +#if HAVE_ZLIB !defined(COMPILE_DL_ZLIB) #include zlib.h #endif @@ -80,7 +80,7 @@ REGISTER_LONG_CONSTANT(IMAGETYPE_JP2, IMAGE_FILETYPE_JP2, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT(IMAGETYPE_JPX, IMAGE_FILETYPE_JPX, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT(IMAGETYPE_JB2, IMAGE_FILETYPE_JB2, CONST_CS | CONST_PERSISTENT); -#if HAVE_ZLIB +#if HAVE_ZLIB !defined(COMPILE_DL_ZLIB) REGISTER_LONG_CONSTANT(IMAGETYPE_SWC, IMAGE_FILETYPE_SWC, CONST_CS | CONST_PERSISTENT); #endif REGISTER_LONG_CONSTANT(IMAGETYPE_IFF, IMAGE_FILETYPE_IFF, CONST_CS | CONST_PERSISTENT); @@ -170,7 +170,7 @@ } /* }}} */ -#if HAVE_ZLIB +#if HAVE_ZLIB !defined(COMPILE_DL_ZLIB) /* {{{
Re: [PHP-CVS] cvs: php4 /ext/mime_magic mime_magic.c /ext/standard aggregation.c basic_functions.c image.c /main SAPI.c output.c
Jani Taskinen [EMAIL PROTECTED] wrote: Index: php4/main/SAPI.c diff -u php4/main/SAPI.c:1.163 php4/main/SAPI.c:1.164 --- php4/main/SAPI.c:1.163Tue Jan 21 06:03:57 2003 +++ php4/main/SAPI.c Sun Feb 9 14:09:51 2003 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: SAPI.c,v 1.163 2003/01/21 11:03:57 sas Exp $ */ +/* $Id: SAPI.c,v 1.164 2003/02/09 19:09:51 sniper Exp $ */ #include ctype.h #include sys/stat.h @@ -30,7 +30,7 @@ #if (HAVE_PCRE || HAVE_BUNDLED_PCRE) !defined(COMPILE_DL_PCRE) #include ext/pcre/php_pcre.h #endif -#if HAVE_ZLIB +#if HAVE_ZLIB !defined(COMPILE_DL_ZLIB) #include ext/zlib/php_zlib.h ZEND_EXTERN_MODULE_GLOBALS(zlib) #endif @@ -556,7 +556,7 @@ while (*ptr == ' ' *ptr != '\0') { ptr++; } -#if HAVE_ZLIB +#if HAVE_ZLIB !defined(COMPILE_DL_ZLIB) if(!strncmp(ptr, image/, sizeof(image/)-1)) { ZLIBG(output_compression) = 0; } @@ -704,7 +704,7 @@ return SUCCESS; } -#if HAVE_ZLIB +#if HAVE_ZLIB !defined(COMPILE_DL_ZLIB) /* Add output compression headers at this late stage in order to make it possible to switch it off inside the script. */ if (ZLIBG(output_compression)) { Hmm, this change may cause another problem that I mentioned in http://lists.php.net/article.php?group=php.devarticle=92781 Moriyoshi -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 /ext/mime_magic mime_magic.c /ext/standardaggregation.c basic_functions.c image.c /main SAPI.c output.c
Jani Taskinen [EMAIL PROTECTED] wrote: On Mon, 10 Feb 2003, Moriyoshi Koizumi wrote: } -#if HAVE_ZLIB +#if HAVE_ZLIB !defined(COMPILE_DL_ZLIB) /* Add output compression headers at this late stage in order to make it possible to switch it off inside the script. */ if (ZLIBG(output_compression)) { Hmm, this change may cause another problem that I mentioned in http://lists.php.net/article.php?group=php.devarticle=92781 I don't understand..if it's not available..how can it cause some problems? Wrong pointer? Then see http://bugs.php.net/16109 Moriyoshi -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 /ext/mime_magic mime_magic.c /ext/standardaggregation.c basic_functions.c image.c /main SAPI.c output.c
On Mon, 10 Feb 2003, Moriyoshi Koizumi wrote: Jani Taskinen [EMAIL PROTECTED] wrote: On Mon, 10 Feb 2003, Moriyoshi Koizumi wrote: } -#if HAVE_ZLIB +#if HAVE_ZLIB !defined(COMPILE_DL_ZLIB) /* Add output compression headers at this late stage in order to make it possible to switch it off inside the script. */ if (ZLIBG(output_compression)) { Hmm, this change may cause another problem that I mentioned in http://lists.php.net/article.php?group=php.devarticle=92781 I don't understand..if it's not available..how can it cause some problems? Wrong pointer? Then see http://bugs.php.net/16109 Eh..? --Jani -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 / NEWS
shane Sun Feb 9 14:52:43 2003 EDT Modified files: /php4 NEWS Log: news entry for previous commit Index: php4/NEWS diff -u php4/NEWS:1.1321 php4/NEWS:1.1322 --- php4/NEWS:1.1321Fri Feb 7 16:45:02 2003 +++ php4/NEWS Sun Feb 9 14:52:43 2003 @@ -1,6 +1,7 @@ PHP 4 NEWS ||| ? ? ??? 200?, Version 5.0.0 +- is_executable now works on windows - Moved extensions to PECL (http://pear.php.net/): (James, Tal) . ext/fribidi - Added get_headers() function, it can be used to retrieve headers sent -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 /ext/mime_magic mime_magic.c/ext/standardaggregation.c basic_functions.c image.c /main SAPI.c output.c
Jani Taskinen [EMAIL PROTECTED] wrote: On Mon, 10 Feb 2003, Moriyoshi Koizumi wrote: Jani Taskinen [EMAIL PROTECTED] wrote: On Mon, 10 Feb 2003, Moriyoshi Koizumi wrote: } -#if HAVE_ZLIB +#if HAVE_ZLIB !defined(COMPILE_DL_ZLIB) /* Add output compression headers at this late stage in order to make it possible to switch it off inside the script. */ if (ZLIBG(output_compression)) { Hmm, this change may cause another problem that I mentioned in http://lists.php.net/article.php?group=php.devarticle=92781 I don't understand..if it's not available..how can it cause some problems? Wrong pointer? Then see http://bugs.php.net/16109 Eh..? If zlib extension was built as shared any kinds of outputs such as generated images would be compressed when zlib.output_compression=1 and bug #16109 revisited. Moriyoshi -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/dba config.m4
sniper Sun Feb 9 14:57:51 2003 EDT Modified files: /php4/ext/dba config.m4 Log: break: First one not needed, second missing. Index: php4/ext/dba/config.m4 diff -u php4/ext/dba/config.m4:1.43 php4/ext/dba/config.m4:1.44 --- php4/ext/dba/config.m4:1.43 Sat Feb 1 17:19:04 2003 +++ php4/ext/dba/config.m4 Sun Feb 9 14:57:50 2003 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4,v 1.43 2003/02/01 22:19:04 helly Exp $ +dnl $Id: config.m4,v 1.44 2003/02/09 19:57:50 sniper Exp $ dnl dnl Suppose we need FlatFile if no support or only CDB is used. @@ -84,7 +84,6 @@ AC_DEFINE_UNQUOTED(GDBM_INCLUDE_FILE, $THIS_INCLUDE, [ ]) AC_DEFINE(DBA_GDBM, 1, [ ]) THIS_LIBS=gdbm - break ]) ]) fi @@ -302,6 +301,7 @@ elif test -f $i/include/gdbm/dbm.h; then THIS_PREFIX=$i THIS_INCLUDE=$i/include/gdbm/dbm.h +break fi done -- 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/dba config.m4
sniper Sun Feb 9 14:58:18 2003 EDT Modified files: (Branch: PHP_4_3) /php4/ext/dba config.m4 Log: MFH Index: php4/ext/dba/config.m4 diff -u php4/ext/dba/config.m4:1.29.2.12 php4/ext/dba/config.m4:1.29.2.13 --- php4/ext/dba/config.m4:1.29.2.12Sat Feb 1 17:19:31 2003 +++ php4/ext/dba/config.m4 Sun Feb 9 14:58:18 2003 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4,v 1.29.2.12 2003/02/01 22:19:31 helly Exp $ +dnl $Id: config.m4,v 1.29.2.13 2003/02/09 19:58:18 sniper Exp $ dnl dnl Suppose we need FlatFile if no support or only CDB is used. @@ -84,7 +84,6 @@ AC_DEFINE_UNQUOTED(GDBM_INCLUDE_FILE, $THIS_INCLUDE, [ ]) AC_DEFINE(DBA_GDBM, 1, [ ]) THIS_LIBS=gdbm - break ]) ]) fi @@ -302,6 +301,7 @@ elif test -f $i/include/gdbm/dbm.h; then THIS_PREFIX=$i THIS_INCLUDE=$i/include/gdbm/dbm.h +break fi done -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 /ext/mime_magic mime_magic.c/ext/standardaggregation.cbasic_functions.c image.c /main SAPI.c output.c
On Mon, 10 Feb 2003, Moriyoshi Koizumi wrote: Jani Taskinen [EMAIL PROTECTED] wrote: On Mon, 10 Feb 2003, Moriyoshi Koizumi wrote: Jani Taskinen [EMAIL PROTECTED] wrote: On Mon, 10 Feb 2003, Moriyoshi Koizumi wrote: } -#if HAVE_ZLIB +#if HAVE_ZLIB !defined(COMPILE_DL_ZLIB) /* Add output compression headers at this late stage in order to make it possible to switch it off inside the script. */ if (ZLIBG(output_compression)) { Hmm, this change may cause another problem that I mentioned in http://lists.php.net/article.php?group=php.devarticle=92781 I don't understand..if it's not available..how can it cause some problems? Wrong pointer? Then see http://bugs.php.net/16109 Eh..? If zlib extension was built as shared any kinds of outputs such as generated images would be compressed when zlib.output_compression=1 and bug #16109 revisited. If it's compiled as shared, the compression will not be available at all so how could it compress anything? Or did I misunderstood something now? --Jani -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/standard file.c
iliaa Sun Feb 9 15:05:14 2003 EDT Modified files: /php4/ext/standard file.c Log: Added feature request #14097 (option allowing file() command not to include line endings in it's output. As well as another option, which allows blank lines to be excluded from the output). Index: php4/ext/standard/file.c diff -u php4/ext/standard/file.c:1.296 php4/ext/standard/file.c:1.297 --- php4/ext/standard/file.c:1.296 Tue Jan 21 09:53:17 2003 +++ php4/ext/standard/file.cSun Feb 9 15:05:13 2003 @@ -21,7 +21,7 @@ +--+ */ -/* $Id: file.c,v 1.296 2003/01/21 14:53:17 iliaa Exp $ */ +/* $Id: file.c,v 1.297 2003/02/09 20:05:13 iliaa Exp $ */ /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */ @@ -458,11 +458,13 @@ int target_len, len; char eol_marker = '\n'; zend_bool use_include_path = 0; + zend_bool include_new_line = 1; + zend_bool skip_blank_lines = 0; php_stream *stream; /* Parse arguments */ - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, s|b, - filename, filename_len, use_include_path) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, s|bbb, + filename, filename_len, use_include_path, +include_new_line, skip_blank_lines) == FAILURE) { return; } @@ -488,19 +490,39 @@ if (stream-flags PHP_STREAM_FLAG_EOL_MAC) { eol_marker = '\r'; } - - do { - p++; - parse_eol: - if (PG(magic_quotes_runtime)) { - /* s is in target_buf which is freed at the end of the function */ - slashed = php_addslashes(s, (p-s), len, 0 TSRMLS_CC); - add_index_stringl(return_value, i++, slashed, len, 0); - } else { - add_index_stringl(return_value, i++, estrndup(s, p-s), p-s, 0); - } - s = p; - } while ((p = memchr(p, eol_marker, (e-p; + + /* for performance reasons the code is duplicated, so that the if +(include_new_line) +* will not need to be done for every single line in the file. +*/ + if (include_new_line) { + do { + p++; + parse_eol: + if (PG(magic_quotes_runtime)) { + /* s is in target_buf which is freed at the +end of the function */ + slashed = php_addslashes(s, (p-s), len, 0 +TSRMLS_CC); + add_index_stringl(return_value, i++, slashed, +len, 0); + } else { + add_index_stringl(return_value, i++, +estrndup(s, p-s), p-s, 0); + } + s = p; + } while ((p = memchr(p, eol_marker, (e-p; + } else { + do { + if (skip_blank_lines !(p-s)) { + s = ++p; + continue; + } + if (PG(magic_quotes_runtime)) { + /* s is in target_buf which is freed at the +end of the function */ + slashed = php_addslashes(s, (p-s), len, 0 +TSRMLS_CC); + add_index_stringl(return_value, i++, slashed, +len, 0); + } else { + add_index_stringl(return_value, i++, +estrndup(s, p-s), p-s, 0); + } + s = ++p; + } while ((p = memchr(p, eol_marker, (e-p; + } /* handle any left overs of files without new lines */ if (s != e) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 / NEWS
sniper Sun Feb 9 15:07:23 2003 EDT Modified files: /php4 NEWS Log: order, style.. Index: php4/NEWS diff -u php4/NEWS:1.1322 php4/NEWS:1.1323 --- php4/NEWS:1.1322Sun Feb 9 14:52:43 2003 +++ php4/NEWS Sun Feb 9 15:07:22 2003 @@ -1,23 +1,23 @@ PHP 4 NEWS ||| ? ? ??? 200?, Version 5.0.0 -- is_executable now works on windows - Moved extensions to PECL (http://pear.php.net/): (James, Tal) . ext/fribidi -- Added get_headers() function, it can be used to retrieve headers sent - by the browser for the specified URL. -- Added str_split() function, this function can break down a string into an - array of elements based on length. -- Added man page for CLI version of PHP. (marcus) -- Added array_walk_recursive() function that can apply user function - recursively to an array. (Ilia) -- Fixed bug #20155 (xmlrpc compile problem with ZE2). (Derick, Jan Schneider) - Fixed bug #20442 (upgraded bundled expat to 1.95.5). (Ilia) +- Fixed bug #20155 (xmlrpc compile problem with ZE2). (Derick, Jan Schneider) - Changed ext/mcrypt to require libmcrypt version 2.5.6 or greater. (Derick) - Changed uniqid() parameters to be optional and allow any prefix length. (Marcus) +- Improved is_executable() to be available on Windows. (Shane) - Improved JPEG 2000 support for getimagesize(). (Marcus, Adam Wright) - Improved array_search() to accept objects as a needle under ZE2. (Moriyoshi) +- Added get_headers() function, it can be used to retrieve headers sent + by the browser for the specified URL. (Ilia) +- Added str_split() function, this function can break down a string into an + array of elements based on length. (Ilia) +- Added man page for CLI version of PHP. (marcus) +- Added array_walk_recursive() function that can apply user function + recursively to an array. (Ilia) - Added command line parameters -B, -F, -R and -E which allow to process stdin line by line (See php -h for more). (Marcus) - Added string.base64 stream filter. (Moriyoshi) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 / NEWS
On Sun, 9 Feb 2003, Jani Taskinen wrote: sniperSun Feb 9 15:07:23 2003 EDT Modified files: /php4 NEWS Log: order, style.. yes, sir, yes! :-) Derick -- - Derick Rethans http://derickrethans.nl/ PHP Magazine - PHP Magazine for Professionals http://php-mag.net/ - -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/standard file.c
iliaa Sun Feb 9 15:35:54 2003 EDT Modified files: /php4/ext/standard file.c Log: Added feature request #17983 (optional parameter to mkdir() that makes directory creation recursive). Fixed prototype for file() function. Index: php4/ext/standard/file.c diff -u php4/ext/standard/file.c:1.297 php4/ext/standard/file.c:1.298 --- php4/ext/standard/file.c:1.297 Sun Feb 9 15:05:13 2003 +++ php4/ext/standard/file.cSun Feb 9 15:35:54 2003 @@ -21,7 +21,7 @@ +--+ */ -/* $Id: file.c,v 1.297 2003/02/09 20:05:13 iliaa Exp $ */ +/* $Id: file.c,v 1.298 2003/02/09 20:35:54 iliaa Exp $ */ /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */ @@ -444,7 +444,7 @@ } /* }}} */ -/* {{{ proto array file(string filename [, bool use_include_path]) +/* {{{ proto array file(string filename [, bool use_include_path [, bool +include_new_line [, bool skip_blank_lines]]]) Read entire file into an array */ #define PHP_FILE_BUF_SIZE 80 @@ -1733,32 +1733,86 @@ } /* }}} */ -/* {{{ proto bool mkdir(string pathname[, int mode]) + +/* {{{ proto int mkdir(char *dir int mode) +*/ + +PHPAPI int php_mkdir(char *dir, long mode TSRMLS_DC) +{ + int ret; + + if (PG(safe_mode) (!php_checkuid(dir, NULL, CHECKUID_CHECK_FILE_AND_DIR))) { + return -1; + } + + if (php_check_open_basedir(dir TSRMLS_CC)) { + return -1; + } + + if ((ret = VCWD_MKDIR(dir, (mode_t)mode)) 0) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, strerror(errno)); + } + + return ret; +} +/* }}} */ + +/* {{{ proto bool mkdir(string pathname [, int mode [, bool recursive]) Create a directory */ PHP_FUNCTION(mkdir) { int dir_len, ret; long mode = 0777; char *dir; + zend_bool recursive = 0; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, s|l, dir, dir_len, mode) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, s|lb, dir, dir_len, +mode, recursive) == FAILURE) { return; } - if (PG(safe_mode) (!php_checkuid(dir, NULL, CHECKUID_CHECK_FILE_AND_DIR))) { - RETURN_FALSE; - } - - if (php_check_open_basedir(dir TSRMLS_CC)) { - RETURN_FALSE; + if (!recursive) { + ret = php_mkdir(dir, mode); + } else { + /* we look for directory separator from the end of string, thus +hopefuly reducing our work load */ + char *p, *e, *buf; + struct stat sb; + + buf = estrndup(dir, dir_len); + e = buf + dir_len; + + /* find a top level directory we need to create */ + while ((p = strrchr(buf, DEFAULT_SLASH))) { + *p = '\0'; + if (VCWD_STAT(buf, sb) == 0) { + *p = DEFAULT_SLASH; + break; + } + } + if (p == buf) { + ret = php_mkdir(dir, mode); + } else if (!(ret = php_mkdir(buf, mode))) { + if (!p) { + p = buf; + } + /* create any needed directories if the creation of the 1st +directory worked */ + while (++p != e) { + if (*p == '\0' *(p + 1) != '\0') { + *p = DEFAULT_SLASH; + if ((ret = VCWD_MKDIR(buf, (mode_t)mode)) 0) +{ + php_error_docref(NULL TSRMLS_CC, +E_WARNING, strerror(errno)); + break; + } + } + } + } + efree(buf); } - ret = VCWD_MKDIR(dir, (mode_t)mode); if (ret 0) { - php_error_docref1(NULL TSRMLS_CC, dir, E_WARNING, %s, strerror(errno)); RETURN_FALSE; + } else { + RETURN_TRUE; } - RETURN_TRUE; } /* }}} */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/standard basic_functions.c file.c file.h /main php_streams.h streams.c
iliaa Sun Feb 9 15:43:06 2003 EDT Modified files: /php4/main streams.c php_streams.h /php4/ext/standard file.c file.h basic_functions.c Log: Added feature request #9173 (added stream_get_line(), this function will read either the specified number of bytes or until the ending string is found). Index: php4/main/streams.c diff -u php4/main/streams.c:1.144 php4/main/streams.c:1.145 --- php4/main/streams.c:1.144 Fri Feb 7 16:33:35 2003 +++ php4/main/streams.c Sun Feb 9 15:43:05 2003 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: streams.c,v 1.144 2003/02/07 21:33:35 iliaa Exp $ */ +/* $Id: streams.c,v 1.145 2003/02/09 20:43:05 iliaa Exp $ */ #define _GNU_SOURCE #include php.h @@ -29,6 +29,7 @@ #include php_open_temporary_file.h #include ext/standard/file.h #include ext/standard/basic_functions.h /* for BG(mmap_file) (not strictly required) */ +#include ext/standard/php_string.h /* for php_memnstr, used by +php_stream_get_record() */ #ifdef HAVE_SYS_MMAN_H #include sys/mman.h #endif @@ -2607,6 +2608,40 @@ PHPAPI HashTable *php_stream_get_url_stream_wrappers_hash() { return url_stream_wrappers_hash; +} + +PHPAPI char *php_stream_get_record(php_stream *stream, size_t maxlen, size_t +*returned_len, char *delim, size_t delim_len TSRMLS_DC) +{ + char *e, *buf; + size_t toread; + + php_stream_fill_read_buffer(stream, maxlen TSRMLS_CC); + + if (delim_len == 0) { + toread = maxlen; + } else { + if (delim_len == 1) { + e = memchr(stream-readbuf, *delim, stream-readbuflen); + } else { + e = php_memnstr(stream-readbuf, delim, delim_len, +(stream-readbuf + stream-readbuflen)); + } + + if (!e) { + toread = maxlen; + } else { + toread = e - (char *) stream-readbuf; + } + } + + buf = emalloc(toread + 1); + *returned_len = php_stream_read(stream, buf, toread); + + if (*returned_len = 0) { + return buf; + } else { + efree(buf); + return NULL; + } } /* Index: php4/main/php_streams.h diff -u php4/main/php_streams.h:1.67 php4/main/php_streams.h:1.68 --- php4/main/php_streams.h:1.67Fri Feb 7 17:49:21 2003 +++ php4/main/php_streams.h Sun Feb 9 15:43:05 2003 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_streams.h,v 1.67 2003/02/07 22:49:21 iliaa Exp $ */ +/* $Id: php_streams.h,v 1.68 2003/02/09 20:43:05 iliaa Exp $ */ #ifndef PHP_STREAMS_H #define PHP_STREAMS_H @@ -290,6 +290,7 @@ PHPAPI php_stream_filter *php_stream_filter_remove(php_stream *stream, php_stream_filter *filter, int call_dtor TSRMLS_DC); PHPAPI void php_stream_filter_free(php_stream_filter *filter TSRMLS_DC); PHPAPI php_stream_filter *_php_stream_filter_alloc(php_stream_filter_ops *fops, void *abstract, int persistent STREAMS_DC TSRMLS_DC); +PHPAPI char *php_stream_get_record(php_stream *stream, size_t maxlen, size_t +*returned_len, char *delim, size_t delim_len TSRMLS_DC); #define php_stream_filter_alloc(fops, thisptr, persistent) _php_stream_filter_alloc((fops), (thisptr), (persistent) STREAMS_CC TSRMLS_CC) #define php_stream_filter_alloc_rel(fops, thisptr, persistent) _php_stream_filter_alloc((fops), (thisptr), (persistent) STREAMS_REL_CC TSRMLS_CC) Index: php4/ext/standard/file.c diff -u php4/ext/standard/file.c:1.298 php4/ext/standard/file.c:1.299 --- php4/ext/standard/file.c:1.298 Sun Feb 9 15:35:54 2003 +++ php4/ext/standard/file.cSun Feb 9 15:43:05 2003 @@ -21,7 +21,7 @@ +--+ */ -/* $Id: file.c,v 1.298 2003/02/09 20:35:54 iliaa Exp $ */ +/* $Id: file.c,v 1.299 2003/02/09 20:43:05 iliaa Exp $ */ /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */ @@ -1128,6 +1128,37 @@ apply_filter_to_stream(1, INTERNAL_FUNCTION_PARAM_PASSTHRU); } /* }}} */ + +/* {{{ proto string stream_get_line(resource stream, int maxlen, string ending) + Read up to maxlen bytes from a stream or until the ending string is found */ +PHP_FUNCTION(stream_get_line) +{ + char *str; + int str_len; + long max_length; + zval *zstream; + char *buf; + size_t buf_size; + php_stream *stream; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, rls, zstream, +max_length, str, str_len) == FAILURE) { + RETURN_FALSE; + } + + if (max_length 0) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, The maximum allowed +length must be greater then or equal to zero.); + RETURN_FALSE; + } + + php_stream_from_zval(stream, zstream);
Re: [PHP-CVS] cvs: php4 /ext/mime_magic mime_magic.c/ext/standardaggregation.cbasic_functions.c image.c /main SAPI.c output.c
Jani Taskinen [EMAIL PROTECTED] wrote: If zlib extension was built as shared any kinds of outputs such as generated images would be compressed when zlib.output_compression=1 and bug #16109 revisited. If it's compiled as shared, the compression will not be available at all so how could it compress anything? Or did I misunderstood something now? Do you mean zlib.output_compression will not be available if zlib extension is compiled as shared? If so, what am I seeing in my telnet terminal now... Moriyoshi -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4_3) / NEWS
iliaa Sun Feb 9 15:51:16 2003 EDT Modified files: (Branch: PHP_4_3) /php4 NEWS Log: Bug fixing news. Index: php4/NEWS diff -u php4/NEWS:1.1247.2.63 php4/NEWS:1.1247.2.64 --- php4/NEWS:1.1247.2.63 Thu Feb 6 10:29:27 2003 +++ php4/NEWS Sun Feb 9 15:51:16 2003 @@ -15,6 +15,8 @@ - Added memory_get_usage(). Defined only when PHP is compiled with --enable-memory-limit. Returns the number of bytes allocated by the Zend's memory routines. (Andrey) +- Fixed bug #22103 (Added gdImageEllipse and replaced old gdImageFilledEllipse + with a better implementation) (Pierre). - Fixed bug #22088 (array_shift() left next index to be +1 too much). (Jani) - Fixed bug #22042 (pg_result_seek() would never seek to the 1st row in the result due to always seeking to row next to the one requested). (Ilia) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /main SAPI.c /sapi/apache mod_php4.c /sapi/thttpd thttpd.c
sas Sun Feb 9 16:15:55 2003 EDT Modified files: /php4/main SAPI.c /php4/sapi/apache mod_php4.c /php4/sapi/thttpd thttpd.c Log: use SUCCESS/FAILURE instead of 0/-1 Index: php4/main/SAPI.c diff -u php4/main/SAPI.c:1.164 php4/main/SAPI.c:1.165 --- php4/main/SAPI.c:1.164 Sun Feb 9 14:09:51 2003 +++ php4/main/SAPI.cSun Feb 9 16:15:54 2003 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: SAPI.c,v 1.164 2003/02/09 19:09:51 sniper Exp $ */ +/* $Id: SAPI.c,v 1.165 2003/02/09 21:15:54 sas Exp $ */ #include ctype.h #include sys/stat.h @@ -856,7 +856,7 @@ if (sapi_module.get_fd) { return sapi_module.get_fd(fd TSRMLS_CC); } else { - return -1; + return FAILURE; } } @@ -865,7 +865,7 @@ if (sapi_module.force_http_10) { return sapi_module.force_http_10(TSRMLS_C); } else { - return -1; + return FAILURE; } } @@ -875,7 +875,7 @@ if (sapi_module.get_target_uid) { return sapi_module.get_target_uid(obj TSRMLS_CC); } else { - return -1; + return FAILURE; } } @@ -884,7 +884,7 @@ if (sapi_module.get_target_gid) { return sapi_module.get_target_gid(obj TSRMLS_CC); } else { - return -1; + return FAILURE; } } Index: php4/sapi/apache/mod_php4.c diff -u php4/sapi/apache/mod_php4.c:1.154 php4/sapi/apache/mod_php4.c:1.155 --- php4/sapi/apache/mod_php4.c:1.154 Tue Feb 4 19:41:40 2003 +++ php4/sapi/apache/mod_php4.c Sun Feb 9 16:15:54 2003 @@ -17,7 +17,7 @@ | PHP 4.0 patches by Zeev Suraski [EMAIL PROTECTED] | +--+ */ -/* $Id: mod_php4.c,v 1.154 2003/02/05 00:41:40 iliaa Exp $ */ +/* $Id: mod_php4.c,v 1.155 2003/02/09 21:15:54 sas Exp $ */ #include php_apache_http.h #include http_conf_globals.h @@ -355,9 +355,9 @@ if (fd = 0) { if (nfd) *nfd = fd; - return 0; + return SUCCESS; } - return -1; + return FAILURE; } /* }}} */ @@ -369,7 +369,7 @@ r-proto_num = HTTP_VERSION(1,0); - return 0; + return SUCCESS; } /* {{{ sapi_apache_get_target_uid @@ -377,7 +377,7 @@ static int sapi_apache_get_target_uid(uid_t *obj TSRMLS_DC) { *obj = ap_user_id; - return 0; + return SUCCESS; } /* {{{ sapi_apache_get_target_gid @@ -385,7 +385,7 @@ static int sapi_apache_get_target_gid(gid_t *obj TSRMLS_DC) { *obj = ap_group_id; - return 0; + return SUCCESS; } /* {{{ sapi_module_struct apache_sapi_module Index: php4/sapi/thttpd/thttpd.c diff -u php4/sapi/thttpd/thttpd.c:1.81 php4/sapi/thttpd/thttpd.c:1.82 --- php4/sapi/thttpd/thttpd.c:1.81 Fri Jan 17 13:53:22 2003 +++ php4/sapi/thttpd/thttpd.c Sun Feb 9 16:15:55 2003 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: thttpd.c,v 1.81 2003/01/17 18:53:22 sas Exp $ */ +/* $Id: thttpd.c,v 1.82 2003/02/09 21:15:55 sas Exp $ */ #include php.h #include SAPI.h @@ -349,7 +349,7 @@ static int sapi_thttpd_get_fd(int *nfd TSRMLS_DC) { if (nfd) *nfd = TG(hc)-conn_fd; - return 0; + return SUCCESS; } static sapi_module_struct thttpd_sapi_module = { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4) /main SAPI.c /sapi/apache mod_php4.c /sapi/thttpd thttpd.c
sas Sun Feb 9 16:24:27 2003 EDT Modified files: (Branch: PHP_4) /php4/main SAPI.c /php4/sapi/apache mod_php4.c /php4/sapi/thttpd thttpd.c Log: MFH 0/-1 changes Index: php4/main/SAPI.c diff -u php4/main/SAPI.c:1.155.2.4.2.1 php4/main/SAPI.c:1.155.2.4.2.2 --- php4/main/SAPI.c:1.155.2.4.2.1 Tue Jan 21 06:11:22 2003 +++ php4/main/SAPI.cSun Feb 9 16:24:27 2003 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: SAPI.c,v 1.155.2.4.2.1 2003/01/21 11:11:22 sas Exp $ */ +/* $Id: SAPI.c,v 1.155.2.4.2.2 2003/02/09 21:24:27 sas Exp $ */ #include ctype.h #include sys/stat.h @@ -856,7 +856,7 @@ if (sapi_module.get_fd) { return sapi_module.get_fd(fd TSRMLS_CC); } else { - return -1; + return FAILURE; } } @@ -865,7 +865,7 @@ if (sapi_module.force_http_10) { return sapi_module.force_http_10(TSRMLS_C); } else { - return -1; + return FAILURE; } } @@ -875,7 +875,7 @@ if (sapi_module.get_target_uid) { return sapi_module.get_target_uid(obj TSRMLS_CC); } else { - return -1; + return FAILURE; } } @@ -884,7 +884,7 @@ if (sapi_module.get_target_gid) { return sapi_module.get_target_gid(obj TSRMLS_CC); } else { - return -1; + return FAILURE; } } Index: php4/sapi/apache/mod_php4.c diff -u php4/sapi/apache/mod_php4.c:1.146.2.3.2.1 php4/sapi/apache/mod_php4.c:1.146.2.3.2.2 --- php4/sapi/apache/mod_php4.c:1.146.2.3.2.1 Tue Jan 21 06:11:23 2003 +++ php4/sapi/apache/mod_php4.c Sun Feb 9 16:24:27 2003 @@ -17,7 +17,7 @@ | PHP 4.0 patches by Zeev Suraski [EMAIL PROTECTED] | +--+ */ -/* $Id: mod_php4.c,v 1.146.2.3.2.1 2003/01/21 11:11:23 sas Exp $ */ +/* $Id: mod_php4.c,v 1.146.2.3.2.2 2003/02/09 21:24:27 sas Exp $ */ #include php_apache_http.h #include http_conf_globals.h @@ -355,9 +355,9 @@ if (fd = 0) { if (nfd) *nfd = fd; - return 0; + return SUCCESS; } - return -1; + return FAILURE; } /* }}} */ @@ -369,7 +369,7 @@ r-proto_num = HTTP_VERSION(1,0); - return 0; + return SUCCESS; } /* {{{ sapi_apache_get_target_uid @@ -377,7 +377,7 @@ static int sapi_apache_get_target_uid(uid_t *obj TSRMLS_DC) { *obj = ap_user_id; - return 0; + return SUCCESS; } /* {{{ sapi_apache_get_target_gid @@ -385,7 +385,7 @@ static int sapi_apache_get_target_gid(gid_t *obj TSRMLS_DC) { *obj = ap_group_id; - return 0; + return SUCCESS; } /* {{{ sapi_module_struct apache_sapi_module Index: php4/sapi/thttpd/thttpd.c diff -u php4/sapi/thttpd/thttpd.c:1.77.2.2.2.1 php4/sapi/thttpd/thttpd.c:1.77.2.2.2.2 --- php4/sapi/thttpd/thttpd.c:1.77.2.2.2.1 Fri Jan 17 14:10:38 2003 +++ php4/sapi/thttpd/thttpd.c Sun Feb 9 16:24:27 2003 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: thttpd.c,v 1.77.2.2.2.1 2003/01/17 19:10:38 sas Exp $ */ +/* $Id: thttpd.c,v 1.77.2.2.2.2 2003/02/09 21:24:27 sas Exp $ */ #include php.h #include SAPI.h @@ -349,7 +349,7 @@ static int sapi_thttpd_get_fd(int *nfd TSRMLS_DC) { if (nfd) *nfd = TG(hc)-conn_fd; - return 0; + return SUCCESS; } static sapi_module_struct thttpd_sapi_module = { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4_3) /main SAPI.c SAPI.h /sapi/apache mod_php4.c /sapi/thttpd thttpd.c
sas Sun Feb 9 16:28:50 2003 EDT Modified files: (Branch: PHP_4_3) /php4/main SAPI.c SAPI.h /php4/sapi/apache mod_php4.c /php4/sapi/thttpd thttpd.c Log: MFH 0/-1 changes Index: php4/main/SAPI.c diff -u php4/main/SAPI.c:1.155.2.5 php4/main/SAPI.c:1.155.2.6 --- php4/main/SAPI.c:1.155.2.5 Sun Feb 9 14:10:32 2003 +++ php4/main/SAPI.cSun Feb 9 16:28:49 2003 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: SAPI.c,v 1.155.2.5 2003/02/09 19:10:32 sniper Exp $ */ +/* $Id: SAPI.c,v 1.155.2.6 2003/02/09 21:28:49 sas Exp $ */ #include ctype.h #include sys/stat.h @@ -856,7 +856,7 @@ if (sapi_module.get_fd) { return sapi_module.get_fd(fd TSRMLS_CC); } else { - return -1; + return FAILURE; } } @@ -865,9 +865,29 @@ if (sapi_module.force_http_10) { return sapi_module.force_http_10(TSRMLS_C); } else { - return -1; + return FAILURE; + } +} + + +SAPI_API int sapi_get_target_uid(uid_t *obj TSRMLS_DC) +{ + if (sapi_module.get_target_uid) { + return sapi_module.get_target_uid(obj TSRMLS_CC); + } else { + return FAILURE; + } +} + +SAPI_API int sapi_get_target_gid(gid_t *obj TSRMLS_DC) +{ + if (sapi_module.get_target_gid) { + return sapi_module.get_target_gid(obj TSRMLS_CC); + } else { + return FAILURE; } } + /* * Local variables: Index: php4/main/SAPI.h diff -u php4/main/SAPI.h:1.87.2.4 php4/main/SAPI.h:1.87.2.5 --- php4/main/SAPI.h:1.87.2.4 Wed Jan 15 16:20:05 2003 +++ php4/main/SAPI.hSun Feb 9 16:28:49 2003 @@ -190,6 +190,9 @@ SAPI_API int sapi_get_fd(int *fd TSRMLS_DC); SAPI_API int sapi_force_http_10(TSRMLS_D); +SAPI_API int sapi_get_target_uid(uid_t * TSRMLS_DC); +SAPI_API int sapi_get_target_gid(gid_t * TSRMLS_DC); + struct _sapi_module_struct { char *name; char *pretty_name; @@ -231,6 +234,9 @@ int (*get_fd)(int *fd TSRMLS_DC); int (*force_http_10)(TSRMLS_D); + + int (*get_target_uid)(uid_t * TSRMLS_DC); + int (*get_target_gid)(gid_t * TSRMLS_DC); }; Index: php4/sapi/apache/mod_php4.c diff -u php4/sapi/apache/mod_php4.c:1.146.2.3 php4/sapi/apache/mod_php4.c:1.146.2.4 --- php4/sapi/apache/mod_php4.c:1.146.2.3 Wed Jan 15 06:29:05 2003 +++ php4/sapi/apache/mod_php4.c Sun Feb 9 16:28:49 2003 @@ -17,9 +17,10 @@ | PHP 4.0 patches by Zeev Suraski [EMAIL PROTECTED] | +--+ */ -/* $Id: mod_php4.c,v 1.146.2.3 2003/01/15 11:29:05 sas Exp $ */ +/* $Id: mod_php4.c,v 1.146.2.4 2003/02/09 21:28:49 sas Exp $ */ #include php_apache_http.h +#include http_conf_globals.h #ifdef NETWARE #define SIGPIPE SIGINT @@ -354,9 +355,9 @@ if (fd = 0) { if (nfd) *nfd = fd; - return 0; + return SUCCESS; } - return -1; + return FAILURE; } /* }}} */ @@ -368,7 +369,23 @@ r-proto_num = HTTP_VERSION(1,0); - return 0; + return SUCCESS; +} + +/* {{{ sapi_apache_get_target_uid + */ +static int sapi_apache_get_target_uid(uid_t *obj TSRMLS_DC) +{ + *obj = ap_user_id; + return SUCCESS; +} + +/* {{{ sapi_apache_get_target_gid + */ +static int sapi_apache_get_target_gid(gid_t *obj TSRMLS_DC) +{ + *obj = ap_group_id; + return SUCCESS; } /* {{{ sapi_module_struct apache_sapi_module @@ -415,7 +432,9 @@ NULL, /* exe location */ 0, /* ini ignore */ sapi_apache_get_fd, - sapi_apache_force_http_10 + sapi_apache_force_http_10, + sapi_apache_get_target_uid, + sapi_apache_get_target_gid }; /* }}} */ Index: php4/sapi/thttpd/thttpd.c diff -u php4/sapi/thttpd/thttpd.c:1.77.2.3 php4/sapi/thttpd/thttpd.c:1.77.2.4 --- php4/sapi/thttpd/thttpd.c:1.77.2.3 Fri Jan 17 14:11:38 2003 +++ php4/sapi/thttpd/thttpd.c Sun Feb 9 16:28:49 2003 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: thttpd.c,v 1.77.2.3 2003/01/17 19:11:38 sas Exp $ */ +/* $Id: thttpd.c,v 1.77.2.4 2003/02/09 21:28:49 sas Exp $ */ #include php.h #include SAPI.h @@ -349,7 +349,7 @@ static int sapi_thttpd_get_fd(int *nfd TSRMLS_DC) { if (nfd) *nfd = TG(hc)-conn_fd; - return 0; + return SUCCESS; } static sapi_module_struct thttpd_sapi_module = { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/rpc/com com.c com_wrapper.c variant.h
wez Sun Feb 9 16:40:12 2003 EDT Modified files: /php4/ext/rpc/com com.c com_wrapper.c variant.h Log: Fix various little leaks and segfaults. Fix scripts like this: $obj = new COM('Foo'); $obj2 = $obj-get_object(); $obj2-method(); // -- would segfault here Index: php4/ext/rpc/com/com.c diff -u php4/ext/rpc/com/com.c:1.15 php4/ext/rpc/com/com.c:1.16 --- php4/ext/rpc/com/com.c:1.15 Sat Jan 18 23:09:31 2003 +++ php4/ext/rpc/com/com.c Sun Feb 9 16:40:12 2003 @@ -491,26 +491,18 @@ DISPID dispid; DISPPARAMS dispparams; HRESULT hr; - OLECHAR *funcname; - VARIANT *variant_args, *result; + OLECHAR *funcname = NULL; + VARIANT *variant_args; + VARIANT result; int current_arg, current_variant; char *ErrString; TSRMLS_FETCH(); - funcname = php_char_to_OLECHAR(method_name.str, method_name.len, CP_ACP, FALSE); + /* if the length of the name is 0, we are dealing with a pointer to a dispid */ + assert(method_name.len == 0); + dispid = *(DISPID*)method_name.str; - if (FAILED(hr = php_COM_get_ids_of_names((comval *) *data, funcname, dispid))) { - char *error_message; - - error_message = php_COM_error_message(hr); - php_error_docref(NULL TSRMLS_CC, E_WARNING,Unable to lookup %s: %s, method_name.str, error_message); - LocalFree(error_message); - efree(funcname); - - return FAILURE; - } - - variant_args = (VARIANT *) emalloc(sizeof(VARIANT) * num_args); + variant_args = num_args ? (VARIANT *) emalloc(sizeof(VARIANT) * num_args) : +NULL; for (current_arg = 0; current_arg num_args; current_arg++) { current_variant = num_args - current_arg - 1; @@ -522,10 +514,9 @@ dispparams.cArgs = num_args; dispparams.cNamedArgs = 0; - result = (VARIANT *) emalloc(sizeof(VARIANT)); - VariantInit(result); + VariantInit(result); - hr = php_COM_invoke((comval *) *data, dispid, DISPATCH_METHOD|DISPATCH_PROPERTYGET, dispparams, result, ErrString); + hr = php_COM_invoke((comval *) *data, dispid, +DISPATCH_METHOD|DISPATCH_PROPERTYGET, dispparams, result, ErrString); for (current_arg=0;current_argnum_args;current_arg++) { /* don't release IDispatch pointers as they are used afterwards */ @@ -535,13 +526,14 @@ } } - efree(result); - efree(funcname); + if (variant_args) { + efree(variant_args); + variant_args = NULL; + } if (FAILED(hr)) { char *error_message; - efree(result); error_message = php_COM_error_message(hr); if (ErrString) { php_error_docref(NULL TSRMLS_CC, E_WARNING,Invoke() failed: %s %s, error_message, ErrString); @@ -553,7 +545,8 @@ return FAILURE; } - RETVAL_VARIANT(result, C_CODEPAGE((comval *) *data)); + RETVAL_VARIANT(result, C_CODEPAGE((comval *) *data)); + return SUCCESS; } Index: php4/ext/rpc/com/com_wrapper.c diff -u php4/ext/rpc/com/com_wrapper.c:1.85 php4/ext/rpc/com/com_wrapper.c:1.86 --- php4/ext/rpc/com/com_wrapper.c:1.85 Sat Jan 18 19:45:47 2003 +++ php4/ext/rpc/com/com_wrapper.c Sun Feb 9 16:40:12 2003 @@ -18,7 +18,7 @@ | Wez Furlong [EMAIL PROTECTED] | +--+ */ -/* $Id: com_wrapper.c,v 1.85 2003/01/19 00:45:47 iliaa Exp $ */ +/* $Id: com_wrapper.c,v 1.86 2003/02/09 21:40:12 wez Exp $ */ /* * This module implements support for COM components that support the IDispatch * interface. Both local (COM) and remote (DCOM) components can be accessed. @@ -289,7 +289,9 @@ C_ENUMVARIANT_VT(obj)-Release(C_ENUMVARIANT(obj)); } - hr = C_DISPATCH_VT(obj)-Release(C_DISPATCH(obj)); + if (C_DISPATCH(obj)) { + hr = C_DISPATCH_VT(obj)-Release(C_DISPATCH(obj)); + } efree(obj); return hr; @@ -908,15 +910,13 @@ PHPAPI zval *php_COM_object_from_dispatch(IDispatch *disp) { comval *obj; - zval *zobj; TSRMLS_FETCH(); ALLOC_COM(obj); - MAKE_STD_ZVAL(zobj); php_COM_set(obj, disp, FALSE); - ZVAL_COM(zobj, obj); - return zobj; + return rpc_object_from_data(NULL, com, obj, NULL); + } #endif Index: php4/ext/rpc/com/variant.h diff -u php4/ext/rpc/com/variant.h:1.6 php4/ext/rpc/com/variant.h:1.7 --- php4/ext/rpc/com/variant.h:1.6 Tue Dec 31 11:07:24 2002 +++ php4/ext/rpc/com/variant.h Sun Feb 9 16:40:12 2003 @@ -33,20 +33,13 @@ #define ZVAL_VARIANT(z, v, cp) \ if
[PHP-CVS] cvs: php4(PHP_4_3) /ext/standard datetime.c
k.schroeder Sun Feb 9 16:42:31 2003 EDT Modified files: (Branch: PHP_4_3) /php4/ext/standard datetime.c Log: fix for #17928 Index: php4/ext/standard/datetime.c diff -u php4/ext/standard/datetime.c:1.96.2.5 php4/ext/standard/datetime.c:1.96.2.6 --- php4/ext/standard/datetime.c:1.96.2.5 Sun Feb 9 07:28:31 2003 +++ php4/ext/standard/datetime.cSun Feb 9 16:42:31 2003 @@ -19,7 +19,7 @@ */ -/* $Id: datetime.c,v 1.96.2.5 2003/02/09 12:28:31 k.schroeder Exp $ */ +/* $Id: datetime.c,v 1.96.2.6 2003/02/09 21:42:31 k.schroeder Exp $ */ #include php.h @@ -343,7 +343,11 @@ #if HAVE_TM_ZONE size += strlen(ta-tm_zone); #elif HAVE_TZNAME - size += strlen(tname[0]); + if (ta-tm_isdst 0 ) { + size += strlen(tname[1]); + } else { + size += strlen(tname[0]); + } #endif break; case 'Z': /* timezone offset in seconds */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 /ext/mime_magicmime_magic.c/ext/standardaggregation.cbasic_functions.c image.c /main SAPI.coutput.c
On Mon, 10 Feb 2003, Moriyoshi Koizumi wrote: Jani Taskinen [EMAIL PROTECTED] wrote: If zlib extension was built as shared any kinds of outputs such as generated images would be compressed when zlib.output_compression=1 and bug #16109 revisited. If it's compiled as shared, the compression will not be available at all so how could it compress anything? Or did I misunderstood something now? Do you mean zlib.output_compression will not be available if zlib extension is compiled as shared? If so, what am I seeing in my telnet terminal now... I guess I misunderstood it. Feel free to fix it. :) --Jani -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4_3) / NEWS
sniper Sun Feb 9 17:56:47 2003 EDT Modified files: (Branch: PHP_4_3) /php4 NEWS Log: sex with punctuation mark.. Index: php4/NEWS diff -u php4/NEWS:1.1247.2.64 php4/NEWS:1.1247.2.65 --- php4/NEWS:1.1247.2.64 Sun Feb 9 15:51:16 2003 +++ php4/NEWS Sun Feb 9 17:56:47 2003 @@ -16,7 +16,7 @@ --enable-memory-limit. Returns the number of bytes allocated by the Zend's memory routines. (Andrey) - Fixed bug #22103 (Added gdImageEllipse and replaced old gdImageFilledEllipse - with a better implementation) (Pierre). + with a better implementation). (Pierre) - Fixed bug #22088 (array_shift() left next index to be +1 too much). (Jani) - Fixed bug #22042 (pg_result_seek() would never seek to the 1st row in the result due to always seeking to row next to the one requested). (Ilia) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 / NEWS
sniper Sun Feb 9 18:09:23 2003 EDT Modified files: /php4 NEWS Log: We move, fix, change or add stuff Index: php4/NEWS diff -u php4/NEWS:1.1324 php4/NEWS:1.1325 --- php4/NEWS:1.1324Sun Feb 9 15:47:32 2003 +++ php4/NEWS Sun Feb 9 18:09:23 2003 @@ -5,21 +5,20 @@ . ext/fribidi - Fixed bug #20442 (upgraded bundled expat to 1.95.5). (Ilia) - Fixed bug #20155 (xmlrpc compile problem with ZE2). (Derick, Jan Schneider) +- Changed get_extension_funcs() to return list of the built-in Zend Engine + functions if zend is specified as the module name. (Ilia) +- Changed is_executable() to be available also on Windows. (Shane) +- Changed array_search() to accept objects also as a needle. (Moriyoshi) - Changed ext/mcrypt to require libmcrypt version 2.5.6 or greater. (Derick) - Changed uniqid() parameters to be optional and allow any prefix length. (Marcus) -- Added stream_get_line(), this function will read either the specified - number of bytes or until the ending string is found). (Ilia) -- Added optional parameter to mkdir() which makes directory creation - recursive. (Ilia) -- Added option to file() command that will make the result array not contain - the line endings. Another option was added that if used in combination with - the previous option make the file() function skip over empty lines. (Ilia) -- get_extension_funcs() can now retrieve a list of the built-in Zend Engine - functions, if zend is specified as the module name. (Ilia) -- Improved is_executable() to be available on Windows. (Shane) -- Improved JPEG 2000 support for getimagesize(). (Marcus, Adam Wright) -- Improved array_search() to accept objects as a needle under ZE2. (Moriyoshi) +- Added improved JPEG 2000 support for getimagesize(). (Marcus, Adam Wright) +- Added stream_get_line() function. This function will read either + the specified number of bytes or until the ending string is found. (Ilia) +- Added optional parameter to mkdir() which makes directory creation recursive. + (Ilia) +- Added optional parameters to file() which make the result array not contain + the line endings and to skip empty lines. (Ilia) - Added get_headers() function, it can be used to retrieve headers sent by the browser for the specified URL. (Ilia) - Added str_split() function, this function can break down a string into an -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/standard file.c
wez Sun Feb 9 18:11:23 2003 EDT Modified files: /php4/ext/standard file.c Log: ZTS fix Index: php4/ext/standard/file.c diff -u php4/ext/standard/file.c:1.299 php4/ext/standard/file.c:1.300 --- php4/ext/standard/file.c:1.299 Sun Feb 9 15:43:05 2003 +++ php4/ext/standard/file.cSun Feb 9 18:11:23 2003 @@ -21,7 +21,7 @@ +--+ */ -/* $Id: file.c,v 1.299 2003/02/09 20:43:05 iliaa Exp $ */ +/* $Id: file.c,v 1.300 2003/02/09 23:11:23 wez Exp $ */ /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */ @@ -1802,7 +1802,7 @@ } if (!recursive) { - ret = php_mkdir(dir, mode); + ret = php_mkdir(dir, mode TSRMLS_CC); } else { /* we look for directory separator from the end of string, thus hopefuly reducing our work load */ char *p, *e, *buf; @@ -1820,8 +1820,8 @@ } } if (p == buf) { - ret = php_mkdir(dir, mode); - } else if (!(ret = php_mkdir(buf, mode))) { + ret = php_mkdir(dir, mode TSRMLS_CC); + } else if (!(ret = php_mkdir(buf, mode TSRMLS_CC))) { if (!p) { p = buf; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4(PHP_4_3) /main SAPI.c SAPI.h /sapi/apachemod_php4.c /sapi/thttpd thttpd.c
On Sun, 9 Feb 2003, Sascha Schumann wrote: } else { - return -1; + return FAILURE; + } +} + + +SAPI_API int sapi_get_target_uid(uid_t *obj TSRMLS_DC) +{ + if (sapi_module.get_target_uid) { + return sapi_module.get_target_uid(obj TSRMLS_CC); + } else { + return FAILURE; + } +} + +SAPI_API int sapi_get_target_gid(gid_t *obj TSRMLS_DC) +{ + if (sapi_module.get_target_gid) { + return sapi_module.get_target_gid(obj TSRMLS_CC); + } else { + return FAILURE; } } + Was the adding of these intentional? (in the PHP_4_3 branch!) --Jani -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/rpc rpc.c
phanto Sun Feb 9 18:17:42 2003 EDT Modified files: /php4/ext/rpc rpc.c Log: fix a memleak Index: php4/ext/rpc/rpc.c diff -u php4/ext/rpc/rpc.c:1.19 php4/ext/rpc/rpc.c:1.20 --- php4/ext/rpc/rpc.c:1.19 Sun Feb 9 16:37:40 2003 +++ php4/ext/rpc/rpc.c Sun Feb 9 18:17:41 2003 @@ -794,12 +794,11 @@ ZEND_API zend_object_value rpc_objects_new(zend_class_entry *class_type TSRMLS_DC) { - zend_object_value *zov; + zend_object_value zov; rpc_internal *intern; /* set up the object value struct */ - zov = (zend_object_value*) pemalloc(sizeof(zend_object_value), TRUE); - zov-handlers = rpc_handlers; + zov.handlers = rpc_handlers; /* set up the internal representation of our rpc instance */ intern = (rpc_internal *) pecalloc(1, sizeof(rpc_internal), TRUE); @@ -816,9 +815,9 @@ /* TODO: exception */ } - zov-handle = zend_objects_store_put(intern, rpc_objects_delete, NULL TSRMLS_CC); + zov.handle = zend_objects_store_put(intern, rpc_objects_delete, NULL +TSRMLS_CC); - return *zov; + return zov; } /***/ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4_3) /sapi/nsapi nsapi.c
sniper Sun Feb 9 18:27:50 2003 EDT Modified files: (Branch: PHP_4_3) /php4/sapi/nsapinsapi.c Log: MFH: Fixed _SERVER[] variables, memleaks Index: php4/sapi/nsapi/nsapi.c diff -u php4/sapi/nsapi/nsapi.c:1.28.2.1 php4/sapi/nsapi/nsapi.c:1.28.2.2 --- php4/sapi/nsapi/nsapi.c:1.28.2.1Tue Dec 31 11:27:13 2002 +++ php4/sapi/nsapi/nsapi.c Sun Feb 9 18:27:50 2003 @@ -13,6 +13,7 @@ | [EMAIL PROTECTED] so we can mail you a copy immediately. | +--+ | Author: Jayakumar Muthukumarasamy [EMAIL PROTECTED] | + | Uwe Schindler [EMAIL PROTECTED] | +--+ */ @@ -66,6 +67,8 @@ #define NSLS_CC, NSLS_C #define NSG(v) (request_context-v) +#define NS_BUF_SIZE 2048 + /* * ZTS needs to be defined for NSAPI to work */ @@ -95,17 +98,7 @@ static nsapi_equiv nsapi_headers[] = { { CONTENT_LENGTH, content-length }, - { CONTENT_TYPE, content-type }, - { HTTP_ACCEPT,accept }, - { HTTP_ACCEPT_ENCODING, accept-encoding }, - { HTTP_ACCEPT_LANGUAGE, accept-language }, - { HTTP_ACCEPT_CHARSET,accept-charset }, - { HTTP_AUTHORIZATION, authorization }, - { HTTP_COOKIE,cookie }, - { HTTP_IF_MODIFIED_SINCE, if-modified-since }, - { HTTP_REFERER, referer }, - { HTTP_USER_AGENT,user-agent }, - { HTTP_USER_DEFINED, user-defined } + { CONTENT_TYPE, content-type } }; static size_t nsapi_headers_size = sizeof(nsapi_headers)/sizeof(nsapi_headers[0]); @@ -113,14 +106,14 @@ { QUERY_STRING, query }, { REQUEST_LINE, clf-request }, { REQUEST_METHOD, method }, - { SCRIPT_NAME,uri }, + { PHP_SELF, uri }, { SERVER_PROTOCOL,protocol } }; static size_t nsapi_reqpb_size = sizeof(nsapi_reqpb)/sizeof(nsapi_reqpb[0]); static nsapi_equiv nsapi_vars[] = { { PATH_INFO, path-info }, - { PATH_TRANSLATED,path }, + { SCRIPT_FILENAME,path }, { AUTH_TYPE, auth-type }, { CLIENT_CERT,auth-cert }, { REMOTE_USER,auth-user } @@ -130,10 +123,26 @@ static nsapi_equiv nsapi_client[] = { { HTTPS_KEYSIZE, keysize }, { HTTPS_SECRETSIZE, secret-keysize }, - { REMOTE_ADDR,ip } + { REMOTE_ADDR,ip }, + { REMOTE_HOST,ip } }; static size_t nsapi_client_size = sizeof(nsapi_client)/sizeof(nsapi_client[0]); +static char * +nsapi_strdup(char *str) +{ + if (str != NULL) + return STRDUP(str); + return NULL; +} + +static void +nsapi_free(void *addr) +{ + if (addr != NULL) + FREE(addr); +} + static int sapi_nsapi_ub_write(const char *str, unsigned int str_length TSRMLS_DC) { @@ -280,9 +289,10 @@ sapi_nsapi_register_server_variables(zval *track_vars_array TSRMLS_DC) { nsapi_request_context *rc = (nsapi_request_context *)SG(server_context); - size_t i; - char *value; - char buf[128]; + register size_t i; + char *value,*p; + char buf[NS_BUF_SIZE + 1]; + struct pb_entry *entry; for (i = 0; i nsapi_reqpb_size; i++) { value = pblock_findval(nsapi_reqpb[i].nsapi_eq, rc-rq-reqpb); @@ -290,7 +300,7 @@ php_register_variable( (char *)nsapi_reqpb[i].env_var, value, track_vars_array TSRMLS_CC ); } } - + for (i = 0; i nsapi_headers_size; i++) { value = pblock_findval(nsapi_headers[i].nsapi_eq, rc-rq-headers); if (value) { @@ -298,6 +308,21 @@ } } + for (i=0; i rc-rq-headers-hsize; i++) { + entry=rc-rq-headers-ht[i]; + while (entry) { + snprintf(buf,NS_BUF_SIZE,HTTP_%s,entry-param-name); + for(p = buf + 5; *p; p++) { + *p = toupper(*p); + if(*p 'A' || *p 'Z') { + *p = '_'; + } + } + php_register_variable( buf, entry-param-value, +track_vars_array TSRMLS_CC ); + entry=entry-next; + } + } + for (i = 0; i nsapi_vars_size; i++) { value = pblock_findval(nsapi_vars[i].nsapi_eq, rc-rq-vars); if (value) { @@ -311,35 +336,69 @@
[PHP-CVS] cvs: php4 /win32/installer gen-nsis.php setini.php
wez Sun Feb 9 19:20:53 2003 EDT Modified files: /php4/win32/installer gen-nsis.php setini.php Log: Fix php.ini customization. Apparently, it seems that running the php script with output captured to the log prevented it from working correctly. Also, deletes the php.ini when uninstalled. TODO: The defaults install and activate all extensions. This is a problem for those extension that require non-bundled .dlls (such as OCI). Index: php4/win32/installer/gen-nsis.php diff -u php4/win32/installer/gen-nsis.php:1.1 php4/win32/installer/gen-nsis.php:1.2 --- php4/win32/installer/gen-nsis.php:1.1 Wed Feb 5 02:32:22 2003 +++ php4/win32/installer/gen-nsis.php Sun Feb 9 19:20:53 2003 @@ -1,7 +1,7 @@ ; PHP Installer for NSIS ; Based on Welcome/Finish Page Example Script (Written by Joost Verburg) ; Author: Wez Furlong [EMAIL PROTECTED] -; $Id: gen-nsis.php,v 1.1 2003/02/05 07:32:22 wez Exp $ +; $Id: gen-nsis.php,v 1.2 2003/02/10 00:20:53 wez Exp $ ?php define('PHPVERSION', phpversion()); @@ -314,7 +314,7 @@ !define MUI_PRODUCT PHP - Hypertext Preprocessor !define MUI_VERSION ?= PHPVERSION ? ; The second UI has a wider area for the component names -!define MUI_UI ${NSISDIR}\Contrib\UIs\modern3.exe +!define MUI_UI ${NSISDIR}\Contrib\UIs\modern2.exe !include ${NSISDIR}\Contrib\Modern UI\System.nsh @@ -347,16 +347,19 @@ ;Folder-selection page InstallDir C:\PHP-?= PHPVERSION ? - +;define NSIS_CONFIG_LOG install.log +;LogSet on + +!cd ?= SOURCEDIR ?win32\installer + ;Things that need to be extracted on startup (keep these lines before any File command!) ;Only useful for BZIP2 compression ;Use ReserveFile for your own Install Options ini files too! !insertmacro MUI_RESERVEFILE_INSTALLOPTIONS !insertmacro MUI_RESERVEFILE_SPECIALINI !insertmacro MUI_RESERVEFILE_SPECIALBITMAP - -; -;Modern UI System + +!cd ?= DISTDIR ? !insertmacro MUI_SYSTEM @@ -380,9 +383,9 @@ ; Extensions will call a function to activate their entry ; in the ini file as they are installed. - ifFileExists ?= $SYSDIR ?\php.ini +2 - Rename ?= $SYSDIR ?\php.ini ?= $SYSDIR ?\php.ini.old - CopyFiles $INSTDIR\php.ini-dist ?= $SYSDIR ?\php.ini + ifFileExists $WINDIR\php.ini +2 + Rename ?= $SYSDIR ?\php.ini $WINDIR\php.ini.old + CopyFiles $INSTDIR\php.ini-dist $WINDIR\php.ini ; For editing the ini, put the cli and the php4ts.dll in the same dir ; these files will be deleted during post-installation @@ -403,8 +406,7 @@ ; Perform final actions after everything has been installed Section -post ; Merge ini settings - nsExec::ExecToLog $\$INSTDIR\strap-php.exe$\ $\$INSTDIR\setini.php$\ $\?= $SYSDIR ?\php.ini$\ $\$INSTDIR\.ini-add$\ - + ExecWait $\$INSTDIR\strap-php.exe$\ $\$INSTDIR\setini.php$\ +$\$WINDIR\php.ini$\ $\$INSTDIR\.ini-add$\ Delete $INSTDIR\.ini-add ; Created by the AddIniSetting function Delete $INSTDIR\setini.php Delete $INSTDIR\strap-php.exe @@ -431,6 +433,7 @@ ?= $UNINSTALL ? Delete $INSTDIR\Uninstall.exe + Delete $WINDIR\php.ini RMDir $INSTDIR ; Remove from Add/Remove programs list DeleteRegKey /ifempty HKLM SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\PHP-?= PHPVERSION ? Index: php4/win32/installer/setini.php diff -u php4/win32/installer/setini.php:1.1 php4/win32/installer/setini.php:1.2 --- php4/win32/installer/setini.php:1.1 Wed Feb 5 02:32:22 2003 +++ php4/win32/installer/setini.php Sun Feb 9 19:20:53 2003 @@ -1,5 +1,5 @@ ?php -/* $Id: setini.php,v 1.1 2003/02/05 07:32:22 wez Exp $ +/* $Id: setini.php,v 1.2 2003/02/10 00:20:53 wez Exp $ * Wez Furlong [EMAIL PROTECTED] * * Set options in a php.ini file. @@ -9,6 +9,8 @@ * $argv[2] is the path to the option file */ +echo Running post-installation script to configure php.ini\n; + $ini_name = $argv[1]; $option_file = $argv[2]; @@ -20,9 +22,9 @@ list($name, $value) = explode(=, $line); if ($name == extension) { - $pat = /^;?extension\s*=\s* . $value . /i; + $pat = /^;?extension\s*=\s* . preg_quote($value, '/') . /i; } else { - $pat = /^;?$name\s*=\s*/i; + $pat = /^;? . preg_quote($name, '/') . \s*=\s*/i; } $opts[] = array('pat' = $pat, 'name' = $name, 'value' = $value); @@ -32,6 +34,9 @@ $dest = fopen($new_name, w); if (!$dest) { + echo Could not create temporary file! $new_name\n; + flush(); + sleep(10); die(Cannot create temporary file!); } @@ -43,10 +48,7 @@ extract($optdata); if (preg_match($pat, $line)) { - echo Found: $line\n; $line = $name=$value\r\n; - echo New value: $line\n; - // No need to match
[PHP-CVS] cvs: php4 /ext/notes php_notes.c
sniper Sun Feb 9 19:21:51 2003 EDT Modified files: /php4/ext/notes php_notes.c Log: some win32 fixes by Kai Index: php4/ext/notes/php_notes.c diff -u php4/ext/notes/php_notes.c:1.16 php4/ext/notes/php_notes.c:1.17 --- php4/ext/notes/php_notes.c:1.16 Tue Dec 31 11:07:05 2002 +++ php4/ext/notes/php_notes.c Sun Feb 9 19:21:50 2003 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_notes.c,v 1.16 2002/12/31 16:07:05 sebastian Exp $ */ +/* $Id: php_notes.c,v 1.17 2003/02/10 00:21:50 sniper Exp $ */ #ifdef COMPILE_DL_NOTES #define HAVE_NOTES 1 @@ -31,7 +31,12 @@ #include php_notes.h #include ext/standard/info.h +#ifdef PHP_WIN32 +#include global.h +#else #include notes_global.h +#endif + #include nsfdb.h #include nsfdata.h #include osmisc.h @@ -58,9 +63,14 @@ #include io.h #include direct.h #include fcntl.h - #include globerr.h + +#ifdef PHP_WIN32 +#include mail.h +#else #include notes_mail.h +#endif + #include mailserv.h #include nsf.h #include osfile.h /* OSPathNetConstruct */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 /ext/dba config.m4
At 20:57 09.02.2003, Jani Taskinen wrote: sniper Sun Feb 9 14:57:51 2003 EDT Modified files: /php4/ext/dba config.m4 Log: break: First one not needed, second missing. Thanks for the fix :-) marcus -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4_3) / NEWS
phanto Sun Feb 9 19:58:08 2003 EDT Modified files: (Branch: PHP_4_3) /php4 NEWS Log: 18 times the speed of light Index: php4/NEWS diff -u php4/NEWS:1.1247.2.65 php4/NEWS:1.1247.2.66 --- php4/NEWS:1.1247.2.65 Sun Feb 9 17:56:47 2003 +++ php4/NEWS Sun Feb 9 19:58:07 2003 @@ -45,6 +45,7 @@ get_browser()). (Ilia) - Fixed bug #21442 (crash in mail() on Windows when 1st parameter is empty). (Edin) +- Fixed bug #21378 (COM code crashes after update 4.2.1 to 4.3.0). (Harald) - Fixed bug #21338 (html_entity_decode() crashed when is passed). (Ilia) - Fixed bug #21297 (in CLI/CGI sapis on the #! it would leave a \n when the the code encounters \r\n). (Ilia) @@ -59,6 +60,7 @@ - Fixed bug #20857 (snmpset() failed always, patch by: [EMAIL PROTECTED]). (Jani) - Fixed bug #20802 (PHP would die silently when memory limit reached). (Ilia) - Fixed bug #20503 (imagesetbrush() not available on Windows). (Edin) +- Fixed bug #20282 (COM memory leak). (Harald) - Fixed bug #17868 (multiple !--include-- used to include PHP files crashes). (Ilia) - Fixed bug #17448 (Print the message when OCI_SUCCESS_WITH_INFO is returned). -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php