[PHP-CVS] cvs: php4 /ext/mssql php_mssql.c php_mssql.h
fmk Thu Jan 9 03:00:08 2003 EDT Modified files: /php4/ext/mssql php_mssql.c php_mssql.h Log: Restire BC for mssql_execute(). This will not break the new feature for handling multiple results from a single stired procedure. Adding mssql_free_statement() Index: php4/ext/mssql/php_mssql.c diff -u php4/ext/mssql/php_mssql.c:1.94 php4/ext/mssql/php_mssql.c:1.95 --- php4/ext/mssql/php_mssql.c:1.94 Wed Jan 8 21:44:44 2003 +++ php4/ext/mssql/php_mssql.c Thu Jan 9 03:00:07 2003 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_mssql.c,v 1.94 2003/01/09 02:44:44 fmk Exp $ */ +/* $Id: php_mssql.c,v 1.95 2003/01/09 08:00:07 fmk Exp $ */ #ifdef COMPILE_DL_MSSQL #define HAVE_MSSQL 1 @@ -77,6 +77,7 @@ PHP_FE(mssql_init, NULL) PHP_FE(mssql_bind, a3_arg_force_ref) PHP_FE(mssql_execute, NULL) + PHP_FE(mssql_free_statement,NULL) PHP_FE(mssql_guid_string, NULL) {NULL, NULL, NULL} }; @@ -910,7 +911,7 @@ parameter = (char*)dbretname(mssql_ptr-link, i); type = dbrettype(mssql_ptr-link, i); - if (statement-binds!=NULL ) { /* Maybe a non-parameter sp*/ + if (statement-binds != NULL) { /* Maybe a non-parameter +sp*/ if (zend_hash_find(statement-binds, parameter, strlen(parameter), (void**)bind)==SUCCESS) { switch (type) { case SQLBIT: @@ -942,7 +943,7 @@ } } } - if (statement-binds!=NULL ) { /* Maybe a non-parameter sp*/ + if (statement-binds != NULL) { /* Maybe a non-parameter sp*/ if (zend_hash_find(statement-binds, RETVAL, 6, (void**)bind)==SUCCESS) { if (dbhasretstat(mssql_ptr-link)) { convert_to_long_ex(bind-zval); @@ -1032,7 +1033,7 @@ return i; } -/* {{{ proto int mssql_fetch_batch(string result_index) +/* {{{ proto int mssql_fetch_batch(resource result_index) Returns the next batch of records */ PHP_FUNCTION(mssql_fetch_batch) { @@ -1166,12 +1167,13 @@ /* }}} */ -/* {{{ proto int mssql_free_result(string result_index) +/* {{{ proto int mssql_free_result(resource result_index) Free a MS-SQL result index */ PHP_FUNCTION(mssql_free_result) { zval **mssql_result_index; mssql_result *result; + int retvalue; if (ZEND_NUM_ARGS()!=1 || zend_get_parameters_ex(1, mssql_result_index)==FAILURE) { WRONG_PARAM_COUNT; @@ -1182,14 +1184,14 @@ } ZEND_FETCH_RESOURCE(result, mssql_result *, mssql_result_index, -1, MS SQL-result, le_result); -#ifndef HAVE_FREETDS - if (dbdataready(result-mssql_ptr-link)) - dbresults(result-mssql_ptr-link); -#endif + /* Release remaining results */ + do { + retvalue = dbresults(result-mssql_ptr-link); + } while (retvalue != NO_MORE_RESULTS retvalue != FAIL); + zend_list_delete(Z_RESVAL_PP(mssql_result_index)); RETURN_TRUE; } - /* }}} */ /* {{{ proto string mssql_get_last_message(void) @@ -2053,12 +2055,10 @@ RETURN_FALSE; } - /* The following is just like mssql_query, fetch all rows from the server into -* the row buffer. We add here the RETVAL and OUTPUT parameters stuff -*/ + /* The following is just like mssql_query, fetch all rows from the first +result +* set into the row buffer. +*/ result=NULL; - /* if multiple recordsets in a stored procedure were supported, we would - use a while (retval_results!=NO_MORE_RESULTS) instead an if */ if (retval_results==SUCCEED) { if ( (retvalue=(dbnextrow(mssql_ptr-link)))!=NO_MORE_ROWS ) { num_fields = dbnumcols(mssql_ptr-link); @@ -2079,9 +2079,10 @@ result-statement = statement; } } - else if (retval_results==NO_MORE_RESULTS) { - _mssql_get_sp_result(mssql_ptr, statement TSRMLS_CC); - } + /* Try to get output parameters. Won't work if there are more record sets +* in the batch until they are all retrieved with mssql_next_result(). +*/ + _mssql_get_sp_result(mssql_ptr, statement TSRMLS_CC); if (result==NULL) { RETURN_TRUE;/* no recordset returned ...*/ @@ -2089,6 +2090,33 @@ else { ZEND_REGISTER_RESOURCE(return_value, result,
[PHP-CVS] cvs: php4 /ext/mssql php_mssql.c
fmk Thu Jan 9 03:19:42 2003 EDT Modified files: /php4/ext/mssql php_mssql.c Log: Use the correct link when checking for more results on stored procedures Index: php4/ext/mssql/php_mssql.c diff -u php4/ext/mssql/php_mssql.c:1.95 php4/ext/mssql/php_mssql.c:1.96 --- php4/ext/mssql/php_mssql.c:1.95 Thu Jan 9 03:00:07 2003 +++ php4/ext/mssql/php_mssql.c Thu Jan 9 03:19:41 2003 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_mssql.c,v 1.95 2003/01/09 08:00:07 fmk Exp $ */ +/* $Id: php_mssql.c,v 1.96 2003/01/09 08:19:41 fmk Exp $ */ #ifdef COMPILE_DL_MSSQL #define HAVE_MSSQL 1 @@ -2112,7 +2112,7 @@ ZEND_FETCH_RESOURCE(statement, mssql_statement *, mssql_statement_index, -1, MS SQL-statement, le_statement); /* Release remaining results */ do { - retvalue = dbresults(statement-link); + retvalue = dbresults(statement-link-link); } while (retvalue != NO_MORE_RESULTS retvalue != FAIL); zend_list_delete(Z_RESVAL_PP(mssql_statement_index)); -- 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/mssql php_mssql.c php_mssql.h
fmk Thu Jan 9 03:28:19 2003 EDT Modified files: (Branch: PHP_4_3) /php4/ext/mssql php_mssql.c php_mssql.h Log: MFH Index: php4/ext/mssql/php_mssql.c diff -u php4/ext/mssql/php_mssql.c:1.86.2.7 php4/ext/mssql/php_mssql.c:1.86.2.8 --- php4/ext/mssql/php_mssql.c:1.86.2.7 Wed Jan 8 18:20:42 2003 +++ php4/ext/mssql/php_mssql.c Thu Jan 9 03:28:18 2003 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_mssql.c,v 1.86.2.7 2003/01/08 23:20:42 fmk Exp $ */ +/* $Id: php_mssql.c,v 1.86.2.8 2003/01/09 08:28:18 fmk Exp $ */ #ifdef COMPILE_DL_MSSQL #define HAVE_MSSQL 1 @@ -77,6 +77,7 @@ PHP_FE(mssql_init, NULL) PHP_FE(mssql_bind, a3_arg_force_ref) PHP_FE(mssql_execute, NULL) + PHP_FE(mssql_free_statement,NULL) PHP_FE(mssql_guid_string, NULL) {NULL, NULL, NULL} }; @@ -705,7 +706,7 @@ ZEND_FETCH_RESOURCE2(mssql_ptr, mssql_link *, mssql_link_index, id, MS SQL-Link, le_link, le_plink); if (mssql_link_index) - zend_list_delete(Z_LVAL_PP(mssql_link_index)); + zend_list_delete(Z_RESVAL_PP(mssql_link_index)); else zend_list_delete(id); @@ -910,7 +911,7 @@ parameter = (char*)dbretname(mssql_ptr-link, i); type = dbrettype(mssql_ptr-link, i); - if (statement-binds!=NULL ) { /* Maybe a non-parameter sp*/ + if (statement-binds != NULL) { /* Maybe a non-parameter +sp*/ if (zend_hash_find(statement-binds, parameter, strlen(parameter), (void**)bind)==SUCCESS) { switch (type) { case SQLBIT: @@ -942,7 +943,7 @@ } } } - if (statement-binds!=NULL ) { /* Maybe a non-parameter sp*/ + if (statement-binds != NULL) { /* Maybe a non-parameter sp*/ if (zend_hash_find(statement-binds, RETVAL, 6, (void**)bind)==SUCCESS) { if (dbhasretstat(mssql_ptr-link)) { convert_to_long_ex(bind-zval); @@ -1032,7 +1033,7 @@ return i; } -/* {{{ proto int mssql_fetch_batch(string result_index) +/* {{{ proto int mssql_fetch_batch(resource result_index) Returns the next batch of records */ PHP_FUNCTION(mssql_fetch_batch) { @@ -1166,12 +1167,13 @@ /* }}} */ -/* {{{ proto int mssql_free_result(string result_index) +/* {{{ proto int mssql_free_result(resource result_index) Free a MS-SQL result index */ PHP_FUNCTION(mssql_free_result) { zval **mssql_result_index; mssql_result *result; + int retvalue; if (ZEND_NUM_ARGS()!=1 || zend_get_parameters_ex(1, mssql_result_index)==FAILURE) { WRONG_PARAM_COUNT; @@ -1182,14 +1184,14 @@ } ZEND_FETCH_RESOURCE(result, mssql_result *, mssql_result_index, -1, MS SQL-result, le_result); -#ifndef HAVE_FREETDS - if (dbdataready(result-mssql_ptr-link)) - dbresults(result-mssql_ptr-link); -#endif - zend_list_delete(Z_LVAL_PP(mssql_result_index)); + /* Release remaining results */ + do { + retvalue = dbresults(result-mssql_ptr-link); + } while (retvalue != NO_MORE_RESULTS retvalue != FAIL); + + zend_list_delete(Z_RESVAL_PP(mssql_result_index)); RETURN_TRUE; } - /* }}} */ /* {{{ proto string mssql_get_last_message(void) @@ -2053,12 +2055,10 @@ RETURN_FALSE; } - /* The following is just like mssql_query, fetch all rows from the server into -* the row buffer. We add here the RETVAL and OUTPUT parameters stuff -*/ + /* The following is just like mssql_query, fetch all rows from the first +result +* set into the row buffer. +*/ result=NULL; - /* if multiple recordsets in a stored procedure were supported, we would - use a while (retval_results!=NO_MORE_RESULTS) instead an if */ if (retval_results==SUCCEED) { if ( (retvalue=(dbnextrow(mssql_ptr-link)))!=NO_MORE_ROWS ) { num_fields = dbnumcols(mssql_ptr-link); @@ -2079,9 +2079,10 @@ result-statement = statement; } } - else if (retval_results==NO_MORE_RESULTS) { - _mssql_get_sp_result(mssql_ptr, statement TSRMLS_CC); - } + /* Try to get output parameters. Won't work if there are more record sets +* in the batch until they are all retrieved with mssql_next_result(). +
[PHP-CVS] cvs: CVSROOT / modules
zeevThu Jan 9 04:31:01 2003 EDT Modified files: /CVSROOTmodules Log: Add virtual php5 Index: CVSROOT/modules diff -u CVSROOT/modules:1.32 CVSROOT/modules:1.33 --- CVSROOT/modules:1.32Thu Jan 2 20:30:03 2003 +++ CVSROOT/modules Thu Jan 9 04:31:01 2003 @@ -1,7 +1,7 @@ # # The CVS Modules File # -#ident @(#)cvs/examples:$Name: $:$Id: modules,v 1.32 2003/01/03 01:30:03 imajes Exp $ +#ident @(#)cvs/examples:$Name: $:$Id: modules,v 1.33 2003/01/09 09:31:01 zeev Exp $ # # Three different line formats are valid: # key -aaliases... @@ -36,6 +36,7 @@ php4 php4 Zend TSRM ze2-dir -d Zend ZendEngine2 php4-ze2 php4 ze2-dir TSRM +php5 php4 ze2-dir TSRM #php3 php3 phpweb phpweb pear pear -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 / configure.in /main php_version.h
zeevThu Jan 9 05:03:27 2003 EDT Modified files: /php4 configure.in /php4/main php_version.h Log: Time for an update Index: php4/configure.in diff -u php4/configure.in:1.411 php4/configure.in:1.412 --- php4/configure.in:1.411 Thu Jan 2 14:20:55 2003 +++ php4/configure.in Thu Jan 9 05:03:26 2003 @@ -1,4 +1,4 @@ -dnl ## $Id: configure.in,v 1.411 2003/01/02 19:20:55 iliaa Exp $ -*- sh -*- +dnl ## $Id: configure.in,v 1.412 2003/01/09 10:03:26 zeev Exp $ -*- sh -*- dnl ## Process this file with autoconf to produce a configure script. divert(1) @@ -41,8 +41,8 @@ AC_CANONICAL_HOST AC_CONFIG_HEADER(main/php_config.h) -MAJOR_VERSION=4 -MINOR_VERSION=4 +MAJOR_VERSION=5 +MINOR_VERSION=0 RELEASE_VERSION=0 EXTRA_VERSION=-dev VERSION=$MAJOR_VERSION.$MINOR_VERSION.$RELEASE_VERSION$EXTRA_VERSION Index: php4/main/php_version.h diff -u php4/main/php_version.h:1.67 php4/main/php_version.h:1.68 --- php4/main/php_version.h:1.67Wed Nov 13 14:19:05 2002 +++ php4/main/php_version.h Thu Jan 9 05:03:26 2003 @@ -1,7 +1,7 @@ /* automatically generated by configure */ /* edit configure.in to change version number */ -#define PHP_MAJOR_VERSION 4 -#define PHP_MINOR_VERSION 4 +#define PHP_MAJOR_VERSION 5 +#define PHP_MINOR_VERSION 0 #define PHP_RELEASE_VERSION 0 #define PHP_EXTRA_VERSION -dev -#define PHP_VERSION 4.4.0-dev +#define PHP_VERSION 5.0.0-dev -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: functable / dslgen
hholzgraThu Jan 9 08:11:30 2003 EDT Modified files: /functable dslgen Log: quoting style does matter in DSSSL :( Index: functable/dslgen diff -u functable/dslgen:1.12 functable/dslgen:1.13 --- functable/dslgen:1.12 Fri Sep 20 07:55:43 2002 +++ functable/dslgenThu Jan 9 08:11:30 2003 @@ -1,5 +1,5 @@ #!/usr/local/bin/php -? +?php include config.php; @@ -81,23 +81,23 @@ echo (define (version-info nl)\n; echo (cond\n; - echo - ((equal-ci? (data nl) 'array') (literal 'PHP 3, PHP 4 ')) - ((equal-ci? (data nl) 'echo') (literal 'PHP 3, PHP 4 ')) - ((equal-ci? (data nl) 'empty') (literal 'PHP 3, PHP 4 ')) - ((equal-ci? (data nl) 'eval') (literal 'PHP 3, PHP 4 ')) - ((equal-ci? (data nl) 'exit') (literal 'PHP 3, PHP 4 ')) - ((equal-ci? (data nl) 'isset') (literal 'PHP 3, PHP 4 ')) - ((equal-ci? (data nl) 'list') (literal 'PHP 3, PHP 4 ')) - ((equal-ci? (data nl) 'print') (literal 'PHP 3, PHP 4 ')) - ((equal-ci? (data nl) 'unset') (literal 'PHP 3, PHP 4 ')) - ; + echo ' + ((equal-ci? (data nl) array) (literal PHP 3, PHP 4 )) + ((equal-ci? (data nl) echo) (literal PHP 3, PHP 4 )) + ((equal-ci? (data nl) empty) (literal PHP 3, PHP 4 )) + ((equal-ci? (data nl) eval) (literal PHP 3, PHP 4 )) + ((equal-ci? (data nl) exit) (literal PHP 3, PHP 4 )) + ((equal-ci? (data nl) isset) (literal PHP 3, PHP 4 )) + ((equal-ci? (data nl) list) (literal PHP 3, PHP 4 )) + ((equal-ci? (data nl) print) (literal PHP 3, PHP 4 )) + ((equal-ci? (data nl) unset) (literal PHP 3, PHP 4 )) + '; foreach($doc_version as $key = $version) { - echo((equal-ci? (data nl) '$key') (literal '$version'))\n; + echo((equal-ci? (data nl) \$key\) (literal \$version\))\n; } - echo(else (literal 'no version information, might be only in CVS'))\n; + echo(else (literal \no version information, might be only in CVS\))\n; echo)\n; echo )\n; ? -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: CVSROOT / avail
ssb Thu Jan 9 08:18:23 2003 EDT Modified files: /CVSROOTavail Log: Index: CVSROOT/avail diff -u CVSROOT/avail:1.573 CVSROOT/avail:1.574 --- CVSROOT/avail:1.573 Wed Jan 8 13:29:39 2003 +++ CVSROOT/avail Thu Jan 9 08:18:21 2003 @@ -48,7 +48,7 @@ avail|moh,sterling,jon,rael,jlp,sebastian,troels,urs,jpm,adaniel,tuupola,mj,metallic,richard,aj,andre,zimt,uw,jeichorn,bjoern,chregu,bkelly,tfromm,subjective,cox,fireclaw,jmcastagnetto,kaltoft,jccann,amiller,mansion,zyprexia,alexmerz,yavo,clambert,vblavet,bernd,nohn,mog,mfischer,kvn,jan,eru,murahachibu,hayk,cain,nhoizey,aditus,ludoo,imajes,graeme,eriksson,maehdros,jasonlotito,dallen,lsmith,timmyg,pajoye,artka,tal,kk,cmv,rashid,alexios,baba,reywob,ekilfoil,floripa,sagi,jrust,mehl,dickmann,alan_k,fab,thku,busterb,miked,pgc,ctrlsoft,tychay,dexter,sachat,svenasse,mw21st,arahn,matthias,dias,jfbus,djanubis,derick,chief,sigi,tony,olivier,nepto,voyteck,cnb,dams,peterk,ernani,edink,quipo,egnited,arnaud,mcmontero,ruibarreiros,mbretter,nicos,philip,k.schroeder,xnoguer,sjr,meebey,jellybob,darkelder,max|pear,peardoc avail|cox,mj,vblavet,dickmann|php4/pear -avail|alan_k,chagenbu,cmv,cox,derick,dickmann,jon,mj,pajoye,richard,tal,nicos|pearweb +avail|alan_k,chagenbu,cmv,cox,derick,dickmann,jon,mj,pajoye,richard,tal|pearweb avail|alexmerz,arnaud,bjoern,chregu,dams,david,jmcastagnetto,rashid,tuupola|pearweb/weeklynews avail|sroebke|peardoc -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4_3) / configure.in
sniper Thu Jan 9 11:38:32 2003 EDT Modified files: (Branch: PHP_4_3) /php4 configure.in Log: MFH: Fix bug #21511 Index: php4/configure.in diff -u php4/configure.in:1.396.2.22 php4/configure.in:1.396.2.23 --- php4/configure.in:1.396.2.22Thu Jan 2 14:21:52 2003 +++ php4/configure.in Thu Jan 9 11:38:28 2003 @@ -1,4 +1,4 @@ -dnl ## $Id: configure.in,v 1.396.2.22 2003/01/02 19:21:52 iliaa Exp $ -*- sh -*- +dnl ## $Id: configure.in,v 1.396.2.23 2003/01/09 16:38:28 sniper Exp $ -*- sh -*- dnl ## Process this file with autoconf to produce a configure script. divert(1) @@ -1297,7 +1297,7 @@ fi fi -catX +cat X ++ | License: | | This software is subject to the PHP License, available in this | @@ -1316,13 +1316,11 @@ | about the implications of having register_globals set to on, and | | avoid using it if possible.| ++ - X -PHP_CONFIGURE_PART(Thank you for using PHP.) -catX - -X +PHP_CONFIGURE_PART( +Thank you for using PHP. +) fi ]) -- 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 .cvsignore config.w32.h config.w32.h.in /win32 php4dll.dsp php4dllts.dsp
sebastian Thu Jan 9 11:52:14 2003 EDT Added files: (Branch: PHP_4_3) /php4/main config.w32.h Removed files: /php4/main config.w32.h.in Modified files: /php4/main .cvsignore /php4/win32 php4dll.dsp php4dllts.dsp Log: MFH: Revert config.w32.h.in - config.w32.h build step. Index: php4/main/.cvsignore diff -u php4/main/.cvsignore:1.8 php4/main/.cvsignore:1.8.4.1 --- php4/main/.cvsignore:1.8Thu May 2 05:57:45 2002 +++ php4/main/.cvsignoreThu Jan 9 11:52:13 2003 @@ -25,4 +25,3 @@ Release_TSDbg Release_TS_inline Debug_TS -config.w32.h Index: php4/win32/php4dll.dsp diff -u php4/win32/php4dll.dsp:1.37.2.1 php4/win32/php4dll.dsp:1.37.2.2 --- php4/win32/php4dll.dsp:1.37.2.1 Wed Nov 13 16:38:57 2002 +++ php4/win32/php4dll.dsp Thu Jan 9 11:52:14 2003 @@ -237,26 +237,7 @@ # End Source File # Begin Source File -SOURCE=..\main\config.w32.h.in - -!IF $(CFG) == php4dll - Win32 Debug - -!ELSEIF $(CFG) == php4dll - Win32 Release - -!ELSEIF $(CFG) == php4dll - Win32 Release_inline - -# Begin Custom Build - Generating main/config.w32.h -InputPath=..\main\config.w32.h.in - -config.w32.h : $(SOURCE) $(INTDIR) $(OUTDIR) - if not exist ..\main\config.w32.h ( - copy ..\main\config.w32.h.in ..\main\config.w32.h nul - ) - -# End Custom Build - -!ENDIF - +SOURCE=..\ext\standard\config.w32.h # End Source File # Begin Source File Index: php4/win32/php4dllts.dsp diff -u php4/win32/php4dllts.dsp:1.87.2.2 php4/win32/php4dllts.dsp:1.87.2.3 --- php4/win32/php4dllts.dsp:1.87.2.2 Thu Dec 26 08:27:08 2002 +++ php4/win32/php4dllts.dspThu Jan 9 11:52:14 2003 @@ -270,58 +270,7 @@ # End Source File # Begin Source File -SOURCE=..\main\config.w32.h.in - -!IF $(CFG) == php4dllts - Win32 Debug_TS - -# Begin Custom Build - Generating main/config.w32.h -InputPath=..\main\config.w32.h.in - -..\main\config.w32.h : $(SOURCE) $(INTDIR) $(OUTDIR) - if not exist ..\main\config.w32.h ( - copy ..\main\config.w32.h.in ..\main\config.w32.h nul - ) - -# End Custom Build - -!ELSEIF $(CFG) == php4dllts - Win32 Release_TS - -# Begin Custom Build - Generating main/config.w32.h -InputPath=..\main\config.w32.h.in - -..\main\config.w32.h : $(SOURCE) $(INTDIR) $(OUTDIR) - if not exist ..\main\config.w32.h ( - copy ..\main\config.w32.h.in ..\main\config.w32.h nul - ) - -# End Custom Build - -!ELSEIF $(CFG) == php4dllts - Win32 Release_TS_inline - -# Begin Custom Build - Generating main/config.w32.h -InputPath=..\main\config.w32.h.in - -..\main\config.w32.h : $(SOURCE) $(INTDIR) $(OUTDIR) - if not exist ..\main\config.w32.h ( - copy ..\main\config.w32.h.in ..\main\config.w32.h nul - ) - -# End Custom Build - -!ELSEIF $(CFG) == php4dllts - Win32 Release_TSDbg - -# Begin Custom Build - Generating main/config.w32.h -InputPath=..\main\config.w32.h.in - -..\main\config.w32.h : $(SOURCE) $(INTDIR) $(OUTDIR) - if not exist ..\main\config.w32.h ( - copy ..\main\config.w32.h.in ..\main\config.w32.h nul - ) - -# End Custom Build - -!ENDIF - +SOURCE=..\ext\standard\config.w32.h # End Source File # Begin Source File Index: php4/main/config.w32.h +++ php4/main/config.w32.h /* config.w32.h. Configure file for win32 platforms */ /* tested only with MS Visual C++ V5 */ /* if you have resolv.lib and lib44bsd95.lib you can compile the extra dns functions located in dns.c. Set this to 1. add resolv.lib and lib33bsd95.lib to the project settings, and add the path to the bind include directory to the preprocessor settings. These libs are availabe in the ntbind distribution */ #define HAVE_BINDLIB 1 /* set to enable bcmath */ #define WITH_BCMATH 1 /* should be added to runtime config*/ #define PHP3_URL_FOPEN 1 /* The following are defaults for run-time configuration ---*/ #define PHP_SAFE_MODE 0 #define MAGIC_QUOTES 0 /* This is the default configuration file to read */ #define CONFIGURATION_FILE_PATH php3.ini #define USE_CONFIG_FILE 1 /* Undefine if you want stricter XML/SGML compliance by default */ /* this disables ?expression? and ?=expression? */ #define DEFAULT_SHORT_OPEN_TAG 1 #define PHP_TRACK_VARS 1 /* The following defines are for those modules which require external libraries to compile. These will be removed from here in a future beta, as these modules will be moved out to dll's ---*/ #if !defined(COMPILE_DL) #define HAVE_SNMP 0 #define HAVE_MYSQL 0 # define HAVE_ERRMSG_H 0 /*needed for mysql 3.21.17 and up*/ #define HAVE_LDAP 0 #define DBASE 0 #define NDBM 0 #define GDBM 0 #define BSD2 0
[PHP-CVS] cvs: php4(PHP_4_3) /ext/standard math.c /ext/standard/tests/math bug21523.phpt
iliaa Thu Jan 9 11:54:15 2003 EDT Added files: (Branch: PHP_4_3) /php4/ext/standard/tests/math bug21523.phpt Modified files: /php4/ext/standard math.c Log: MFH Index: php4/ext/standard/math.c diff -u php4/ext/standard/math.c:1.97.2.2 php4/ext/standard/math.c:1.97.2.3 --- php4/ext/standard/math.c:1.97.2.2 Tue Dec 31 11:35:31 2002 +++ php4/ext/standard/math.cThu Jan 9 11:54:15 2003 @@ -19,7 +19,7 @@ +--+ */ -/* $Id: math.c,v 1.97.2.2 2002/12/31 16:35:31 sebastian Exp $ */ +/* $Id: math.c,v 1.97.2.3 2003/01/09 16:54:15 iliaa Exp $ */ #include php.h #include php_math.h @@ -980,57 +980,91 @@ PHPAPI char *_php_math_number_format(double d, int dec, char dec_point, char thousand_sep) { - char *tmpbuf, *resbuf; + char *tmpbuf = NULL, *resbuf; char *s, *t; /* source, target */ + char *dp; + int integral; int tmplen, reslen=0; int count=0; int is_negative=0; - if (d0) { - is_negative=1; + if (d 0) { + is_negative = 1; d = -d; } dec = MAX(0, dec); - tmpbuf = (char *) emalloc(1+DBL_MAX_10_EXP+1+dec+1); - - tmplen=sprintf(tmpbuf, %.*f, dec, d); - if (!isdigit((int)tmpbuf[0])) { + tmplen = spprintf(tmpbuf, 0, %.*f, dec, d); + + if (tmpbuf == NULL || !isdigit((int)tmpbuf[0])) { return tmpbuf; } - if (dec) { - reslen = dec+1 + (tmplen-dec-1) + ((thousand_sep) ? (tmplen-1-dec-1)/3 : 0); + /* calculate the length of the return buffer */ + dp = strchr(tmpbuf, '.'); + if (dp) { + integral = dp - tmpbuf; } else { - reslen = tmplen+((thousand_sep) ? (tmplen-1)/3 : 0); + /* no decimal point was found */ + integral = tmplen; + } + + /* allow for thousand separators */ + if (thousand_sep) { + integral += integral / 3; } + + reslen = integral + 1 + dec; + + /* add a byte for minus sign */ if (is_negative) { reslen++; } - resbuf = (char *) emalloc(reslen+1); - + resbuf = (char *) emalloc(reslen+1); /* +1 for NUL terminator */ + s = tmpbuf+tmplen-1; t = resbuf+reslen; - *t-- = 0; - + *t-- = '\0'; + + /* copy the decimal places. +* Take care, as the sprintf implementation may return less places than +* we requested due to internal buffer limitations */ if (dec) { - while (isdigit((int)*s)) { - *t-- = *s--; + int declen = dp ? strlen(dp+1) : 0; + int topad = declen 0 ? dec - declen : 0; + + /* pad with '0's */ + while (topad--) { + *t-- = '0'; } - *t-- = dec_point; /* copy that dot */ + + /* now copy the chars after the point */ + memcpy(t - declen + 1, dp + 1, declen); + + t -= declen; + s -= declen; + + /* add decimal point */ + *t-- = dec_point; s--; } - while(s=tmpbuf) { + /* copy the numbers before the decimal place, adding thousand +* separator every three digits */ + while(s = tmpbuf) { *t-- = *s--; if (thousand_sep (++count%3)==0 s=tmpbuf) { *t-- = thousand_sep; } } + + /* and a minus sign, if needed */ if (is_negative) { *t-- = '-'; } + efree(tmpbuf); + return resbuf; } Index: php4/ext/standard/tests/math/bug21523.phpt +++ php4/ext/standard/tests/math/bug21523.phpt --TEST-- Bug #21523 number_format tries to allocate negative amount of memory --FILE-- ?php // $Id: bug21523.phpt,v 1.1 2003/01/09 15:44:49 wez Exp $ vim600:syn=php var_dump(number_format(-2000, 2768)); echo OK; ? --EXPECT-- string(2775)
[PHP-CVS] cvs: php4 /ext/standard basic_functions.c basic_functions.h formatted_print.c /tests/strings 002.phpt
wez Thu Jan 9 12:29:31 2003 EDT Modified files: /php4/ext/standard basic_functions.c basic_functions.h formatted_print.c /php4/tests/strings 002.phpt Log: Implement fprintf() and vfprintf(). Add a couple of tests. Index: php4/ext/standard/basic_functions.c diff -u php4/ext/standard/basic_functions.c:1.556 php4/ext/standard/basic_functions.c:1.557 --- php4/ext/standard/basic_functions.c:1.556 Tue Jan 7 06:37:09 2003 +++ php4/ext/standard/basic_functions.c Thu Jan 9 12:29:31 2003 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: basic_functions.c,v 1.556 2003/01/07 11:37:09 zeev Exp $ */ +/* $Id: basic_functions.c,v 1.557 2003/01/09 17:29:31 wez Exp $ */ #include php.h #include php_streams.h @@ -387,6 +387,8 @@ PHP_NAMED_FE(printf,PHP_FN(user_printf), NULL) PHP_FE(vprintf, NULL) PHP_FE(vsprintf, NULL) + PHP_FE(fprintf, + NULL) + PHP_FE(vfprintf, + NULL) PHP_FE(sscanf, third_and_rest_force_ref) PHP_FE(fscanf, third_and_rest_force_ref) PHP_FE(parse_url, NULL) Index: php4/ext/standard/basic_functions.h diff -u php4/ext/standard/basic_functions.h:1.112 php4/ext/standard/basic_functions.h:1.113 --- php4/ext/standard/basic_functions.h:1.112 Sat Jan 4 22:24:38 2003 +++ php4/ext/standard/basic_functions.h Thu Jan 9 12:29:31 2003 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: basic_functions.h,v 1.112 2003/01/05 03:24:38 pollita Exp $ */ +/* $Id: basic_functions.h,v 1.113 2003/01/09 17:29:31 wez Exp $ */ #ifndef BASIC_FUNCTIONS_H #define BASIC_FUNCTIONS_H @@ -83,6 +83,8 @@ PHP_FUNCTION(restore_include_path); PHP_FUNCTION(print_r); +PHP_FUNCTION(fprintf); +PHP_FUNCTION(vfprintf); PHP_FUNCTION(connection_aborted); PHP_FUNCTION(connection_status); Index: php4/ext/standard/formatted_print.c diff -u php4/ext/standard/formatted_print.c:1.60 php4/ext/standard/formatted_print.c:1.61 --- php4/ext/standard/formatted_print.c:1.60Tue Dec 31 11:07:41 2002 +++ php4/ext/standard/formatted_print.c Thu Jan 9 12:29:31 2003 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: formatted_print.c,v 1.60 2002/12/31 16:07:41 sebastian Exp $ */ +/* $Id: formatted_print.c,v 1.61 2003/01/09 17:29:31 wez Exp $ */ #include math.h /* modf() */ #include php.h @@ -452,9 +452,9 @@ * */ static char * -php_formatted_print(int ht, int *len, int use_array TSRMLS_DC) +php_formatted_print(int ht, int *len, int use_array, int format_offset TSRMLS_DC) { - zval ***args, **z_format, **array; + zval ***args, **z_format; int argc, size = 240, inpos = 0, outpos = 0, temppos; int alignment, width, precision, currarg, adjusting, argnum; char *format, *result, padding; @@ -462,39 +462,49 @@ argc = ZEND_NUM_ARGS(); + /* verify the number of args */ + if ((use_array argc != (2 + format_offset)) + || (!use_array argc (1 + format_offset))) { + WRONG_PARAM_COUNT_WITH_RETVAL(NULL); + } + args = (zval ***)emalloc(argc * sizeof(zval *)); + + if (zend_get_parameters_array_ex(argc, args) == FAILURE) { + efree(args); + WRONG_PARAM_COUNT_WITH_RETVAL(NULL); + } + if (use_array) { int i = 1; + zval ***newargs; + zval **array; - if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(argc, z_format, array) == FAILURE) { - WRONG_PARAM_COUNT_WITH_RETVAL(NULL); - } + z_format = args[format_offset]; + array = args[1 + format_offset]; + SEPARATE_ZVAL(array); convert_to_array_ex(array); + argc = 1 + zend_hash_num_elements(Z_ARRVAL_PP(array)); - args = (zval ***)emalloc(argc * sizeof(zval *)); - args[0] = z_format; + newargs = (zval ***)emalloc(argc * sizeof(zval *)); + newargs[0] = z_format; +
[PHP-CVS] cvs: php4 /ext/ctype ctype.c
moriyoshi Thu Jan 9 15:23:36 2003 EDT Modified files: /php4/ext/ctype ctype.c Log: Fixed typo Index: php4/ext/ctype/ctype.c diff -u php4/ext/ctype/ctype.c:1.25 php4/ext/ctype/ctype.c:1.26 --- php4/ext/ctype/ctype.c:1.25 Tue Dec 31 11:06:20 2002 +++ php4/ext/ctype/ctype.c Thu Jan 9 15:23:36 2003 @@ -59,7 +59,7 @@ }; /* }}} */ -/* {{{ ctype_mpodule_entry +/* {{{ ctype_module_entry */ zend_module_entry ctype_module_entry = { STANDARD_MODULE_HEADER, -- 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 filestat.c /main safe_mode.c safe_mode.h
pollita Thu Jan 9 17:29:03 2003 EDT Modified files: (Branch: PHP_4_3) /php4/ext/standard filestat.c /php4/main safe_mode.c safe_mode.h Log: MFH Index: php4/ext/standard/filestat.c diff -u php4/ext/standard/filestat.c:1.112.2.2 php4/ext/standard/filestat.c:1.112.2.3 --- php4/ext/standard/filestat.c:1.112.2.2 Tue Dec 31 11:35:27 2002 +++ php4/ext/standard/filestat.cThu Jan 9 17:29:02 2003 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: filestat.c,v 1.112.2.2 2002/12/31 16:35:27 sebastian Exp $ */ +/* $Id: filestat.c,v 1.112.2.3 2003/01/09 22:29:02 pollita Exp $ */ #include php.h #include safe_mode.h @@ -564,7 +564,7 @@ char *stat_sb_names[13]={dev, ino, mode, nlink, uid, gid, rdev, size, atime, mtime, ctime, blksize, blocks}; - if (PG(safe_mode) (!php_checkuid(filename, NULL, CHECKUID_CHECK_FILE_AND_DIR))) { + if (PG(safe_mode) (!php_checkuid_ex(filename, NULL, +CHECKUID_CHECK_FILE_AND_DIR, IS_EXISTS_CHECK(type) ? CHECKUID_NO_ERRORS : 0))) { RETURN_FALSE; } Index: php4/main/safe_mode.c diff -u php4/main/safe_mode.c:1.51.2.1 php4/main/safe_mode.c:1.51.2.2 --- php4/main/safe_mode.c:1.51.2.1 Tue Dec 31 11:26:26 2002 +++ php4/main/safe_mode.c Thu Jan 9 17:29:02 2003 @@ -15,7 +15,7 @@ | Author: Rasmus Lerdorf [EMAIL PROTECTED]| +--+ */ -/* $Id: safe_mode.c,v 1.51.2.1 2002/12/31 16:26:26 sebastian Exp $ */ +/* $Id: safe_mode.c,v 1.51.2.2 2003/01/09 22:29:02 pollita Exp $ */ #include php.h @@ -44,7 +44,7 @@ * 5 - only check file */ -PHPAPI int php_checkuid(const char *filename, char *fopen_mode, int mode) +PHPAPI int php_checkuid_ex(const char *filename, char *fopen_mode, int mode, int +flags) { struct stat sb; int ret, nofile=0; @@ -85,10 +85,14 @@ ret = VCWD_STAT(path, sb); if (ret 0) { if (mode == CHECKUID_DISALLOW_FILE_NOT_EXISTS) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, Unable to access %s, filename); + if (flags CHECKUID_NO_ERRORS == 0) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, +Unable to access %s, filename); + } return 0; } else if (mode == CHECKUID_ALLOW_FILE_NOT_EXISTS) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, Unable to access %s, filename); + if (flags CHECKUID_NO_ERRORS == 0) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, +Unable to access %s, filename); + } return 1; } nofile = 1; @@ -129,7 +133,9 @@ /* check directory */ ret = VCWD_STAT(path, sb); if (ret 0) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, Unable to access %s, filename); + if (flags CHECKUID_NO_ERRORS == 0) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, Unable to +access %s, filename); + } return 0; } duid = sb.st_uid; @@ -162,15 +168,21 @@ gid = dgid; filename = path; } - - if (PG(safe_mode_gid)) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, SAFE MODE Restriction in effect. The script whose uid/gid is %ld/%ld is not allowed to access %s owned by uid/gid %ld/%ld, php_getuid(), php_getgid(), filename, uid, gid); - } else { - php_error_docref(NULL TSRMLS_CC, E_WARNING, SAFE MODE Restriction in effect. The script whose uid is %ld is not allowed to access %s owned by uid %ld, php_getuid(), filename, uid); - } + + if (flags CHECKUID_NO_ERRORS == 0) { + if (PG(safe_mode_gid)) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, SAFE MODE +Restriction in effect. The script whose uid/gid is %ld/%ld is not allowed to access +%s owned by uid/gid %ld/%ld, php_getuid(), php_getgid(), filename, uid, gid); + } else { + php_error_docref(NULL TSRMLS_CC, E_WARNING, SAFE MODE +Restriction in effect. The script whose uid is %ld is not allowed to access %s owned +by uid %ld, php_getuid(), filename, uid); + } + } + return 0; } +PHPAPI int php_checkuid(const char *filename, char *fopen_mode, int mode) { + return php_checkuid_ex(filename, fopen_mode, mode, 0); +} PHPAPI char
[PHP-CVS] cvs: php4 /main safe_mode.c
iliaa Thu Jan 9 17:33:43 2003 EDT Modified files: /php4/main safe_mode.c Log: Fixed compiler warnings. Index: php4/main/safe_mode.c diff -u php4/main/safe_mode.c:1.53 php4/main/safe_mode.c:1.54 --- php4/main/safe_mode.c:1.53 Thu Jan 9 16:57:45 2003 +++ php4/main/safe_mode.c Thu Jan 9 17:33:43 2003 @@ -15,7 +15,7 @@ | Author: Rasmus Lerdorf [EMAIL PROTECTED]| +--+ */ -/* $Id: safe_mode.c,v 1.53 2003/01/09 21:57:45 pollita Exp $ */ +/* $Id: safe_mode.c,v 1.54 2003/01/09 22:33:43 iliaa Exp $ */ #include php.h @@ -85,12 +85,12 @@ ret = VCWD_STAT(path, sb); if (ret 0) { if (mode == CHECKUID_DISALLOW_FILE_NOT_EXISTS) { - if (flags CHECKUID_NO_ERRORS == 0) { + if ((flags CHECKUID_NO_ERRORS) == 0) { php_error_docref(NULL TSRMLS_CC, E_WARNING, Unable to access %s, filename); } return 0; } else if (mode == CHECKUID_ALLOW_FILE_NOT_EXISTS) { - if (flags CHECKUID_NO_ERRORS == 0) { + if ((flags CHECKUID_NO_ERRORS) == 0) { php_error_docref(NULL TSRMLS_CC, E_WARNING, Unable to access %s, filename); } return 1; @@ -133,7 +133,7 @@ /* check directory */ ret = VCWD_STAT(path, sb); if (ret 0) { - if (flags CHECKUID_NO_ERRORS == 0) { + if ((flags CHECKUID_NO_ERRORS) == 0) { php_error_docref(NULL TSRMLS_CC, E_WARNING, Unable to access %s, filename); } return 0; @@ -169,7 +169,7 @@ filename = path; } - if (flags CHECKUID_NO_ERRORS == 0) { + if ((flags CHECKUID_NO_ERRORS) == 0) { if (PG(safe_mode_gid)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, SAFE MODE Restriction in effect. The script whose uid/gid is %ld/%ld is not allowed to access %s owned by uid/gid %ld/%ld, php_getuid(), php_getgid(), filename, uid, gid); } else { -- 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 safe_mode.c
iliaa Thu Jan 9 17:34:27 2003 EDT Modified files: (Branch: PHP_4_3) /php4/main safe_mode.c Log: MFH Index: php4/main/safe_mode.c diff -u php4/main/safe_mode.c:1.51.2.2 php4/main/safe_mode.c:1.51.2.3 --- php4/main/safe_mode.c:1.51.2.2 Thu Jan 9 17:29:02 2003 +++ php4/main/safe_mode.c Thu Jan 9 17:34:27 2003 @@ -15,7 +15,7 @@ | Author: Rasmus Lerdorf [EMAIL PROTECTED]| +--+ */ -/* $Id: safe_mode.c,v 1.51.2.2 2003/01/09 22:29:02 pollita Exp $ */ +/* $Id: safe_mode.c,v 1.51.2.3 2003/01/09 22:34:27 iliaa Exp $ */ #include php.h @@ -85,12 +85,12 @@ ret = VCWD_STAT(path, sb); if (ret 0) { if (mode == CHECKUID_DISALLOW_FILE_NOT_EXISTS) { - if (flags CHECKUID_NO_ERRORS == 0) { + if ((flags CHECKUID_NO_ERRORS) == 0) { php_error_docref(NULL TSRMLS_CC, E_WARNING, Unable to access %s, filename); } return 0; } else if (mode == CHECKUID_ALLOW_FILE_NOT_EXISTS) { - if (flags CHECKUID_NO_ERRORS == 0) { + if ((flags CHECKUID_NO_ERRORS) == 0) { php_error_docref(NULL TSRMLS_CC, E_WARNING, Unable to access %s, filename); } return 1; @@ -133,7 +133,7 @@ /* check directory */ ret = VCWD_STAT(path, sb); if (ret 0) { - if (flags CHECKUID_NO_ERRORS == 0) { + if ((flags CHECKUID_NO_ERRORS) == 0) { php_error_docref(NULL TSRMLS_CC, E_WARNING, Unable to access %s, filename); } return 0; @@ -169,7 +169,7 @@ filename = path; } - if (flags CHECKUID_NO_ERRORS == 0) { + if ((flags CHECKUID_NO_ERRORS) == 0) { if (PG(safe_mode_gid)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, SAFE MODE Restriction in effect. The script whose uid/gid is %ld/%ld is not allowed to access %s owned by uid/gid %ld/%ld, php_getuid(), php_getgid(), filename, uid, gid); } else { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/mssql config.m4
fmk Thu Jan 9 17:35:16 2003 EDT Modified files: /php4/ext/mssql config.m4 Log: Adding extended checks for where FreeTDS is installed Index: php4/ext/mssql/config.m4 diff -u php4/ext/mssql/config.m4:1.3 php4/ext/mssql/config.m4:1.4 --- php4/ext/mssql/config.m4:1.3Tue Jan 7 00:19:48 2003 +++ php4/ext/mssql/config.m4Thu Jan 9 17:35:16 2003 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4,v 1.3 2003/01/07 05:19:48 fmk Exp $ +dnl $Id: config.m4,v 1.4 2003/01/09 22:35:16 fmk Exp $ dnl PHP_ARG_WITH(mssql,for MSSQL support via FreeTDS, @@ -8,13 +8,39 @@ if test $PHP_MSSQL != no; then + + FREETDS_INSTALLATION_DIR= if test $PHP_MSSQL = yes; then -MSSQL_INCDIR=/usr/local/freetds/include -MSSQL_LIBDIR=/usr/local/freetds/lib - else -MSSQL_INCDIR=$PHP_MSSQL/include -MSSQL_LIBDIR=$PHP_MSSQL/lib + +for i in /usr/local /usr; do + if test -f $i/freetds/include/tds.h; then +FREETDS_INSTALLATION_DIR=$i/freetds +break + fi +done + +if test -z $FREETDS_INSTALLATION_DIR; then + AC_MSG_ERROR(Cannot find FreeTDS in known installation directories) +fi + + elif test $PHP_MSSQL != no; then + +if test -f $PHP_MSSQL/include/tds.h; then + FREETDS_INSTALLATION_DIR=$PHP_MSSQL +elif test -f $PHP_MSSQL/freetds/include/tds.h; then + FREETDS_INSTALLATION_DIR=$PHP_MSSQL/freetds +else + AC_MSG_ERROR(Directory $PHP_MSSQL is not a FreeTDS installation directory) +fi + fi + + if test ! -r $FREETDS_INSTALLATION_DIR/lib/libtds.a; then + AC_MSG_ERROR(Could not find $FREETDS_INSTALLATION_DIR/lib/libtds.a) fi + + MSSQL_INCDIR=$FREETDS_INSTALLATION_DIR/include + MSSQL_LIBDIR=$FREETDS_INSTALLATION_DIR/lib + PHP_ADD_INCLUDE($MSSQL_INCDIR) PHP_ADD_LIBRARY_WITH_PATH(sybdb, $MSSQL_LIBDIR, MSSQL_SHARED_LIBADD) PHP_NEW_EXTENSION(mssql, php_mssql.c, $ext_shared) -- 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/mssql config.m4
fmk Thu Jan 9 17:36:02 2003 EDT Modified files: (Branch: PHP_4_3) /php4/ext/mssql config.m4 Log: MFH Index: php4/ext/mssql/config.m4 diff -u php4/ext/mssql/config.m4:1.1.2.2 php4/ext/mssql/config.m4:1.1.2.3 --- php4/ext/mssql/config.m4:1.1.2.2Tue Jan 7 00:20:42 2003 +++ php4/ext/mssql/config.m4Thu Jan 9 17:36:02 2003 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4,v 1.1.2.2 2003/01/07 05:20:42 fmk Exp $ +dnl $Id: config.m4,v 1.1.2.3 2003/01/09 22:36:02 fmk Exp $ dnl PHP_ARG_WITH(mssql,for MSSQL support via FreeTDS, @@ -8,13 +8,39 @@ if test $PHP_MSSQL != no; then + + FREETDS_INSTALLATION_DIR= if test $PHP_MSSQL = yes; then -MSSQL_INCDIR=/usr/local/freetds/include -MSSQL_LIBDIR=/usr/local/freetds/lib - else -MSSQL_INCDIR=$PHP_MSSQL/include -MSSQL_LIBDIR=$PHP_MSSQL/lib + +for i in /usr/local /usr; do + if test -f $i/freetds/include/tds.h; then +FREETDS_INSTALLATION_DIR=$i/freetds +break + fi +done + +if test -z $FREETDS_INSTALLATION_DIR; then + AC_MSG_ERROR(Cannot find FreeTDS in known installation directories) +fi + + elif test $PHP_MSSQL != no; then + +if test -f $PHP_MSSQL/include/tds.h; then + FREETDS_INSTALLATION_DIR=$PHP_MSSQL +elif test -f $PHP_MSSQL/freetds/include/tds.h; then + FREETDS_INSTALLATION_DIR=$PHP_MSSQL/freetds +else + AC_MSG_ERROR(Directory $PHP_MSSQL is not a FreeTDS installation directory) +fi + fi + + if test ! -r $FREETDS_INSTALLATION_DIR/lib/libtds.a; then + AC_MSG_ERROR(Could not find $FREETDS_INSTALLATION_DIR/lib/libtds.a) fi + + MSSQL_INCDIR=$FREETDS_INSTALLATION_DIR/include + MSSQL_LIBDIR=$FREETDS_INSTALLATION_DIR/lib + PHP_ADD_INCLUDE($MSSQL_INCDIR) PHP_ADD_LIBRARY_WITH_PATH(sybdb, $MSSQL_LIBDIR, MSSQL_SHARED_LIBADD) PHP_NEW_EXTENSION(mssql, php_mssql.c, $ext_shared) -- 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 Thu Jan 9 17:49:19 2003 EDT Modified files: /php4/ext/standard file.c Log: Fixed a memory corruption that occurs when an unterminated is encountered this bug maybe be related to #21556. Index: php4/ext/standard/file.c diff -u php4/ext/standard/file.c:1.288 php4/ext/standard/file.c:1.289 --- php4/ext/standard/file.c:1.288 Sun Jan 5 17:24:49 2003 +++ php4/ext/standard/file.cThu Jan 9 17:49:18 2003 @@ -21,7 +21,7 @@ +--+ */ -/* $Id: file.c,v 1.288 2003/01/05 22:24:49 pollita Exp $ */ +/* $Id: file.c,v 1.289 2003/01/09 22:49:18 iliaa Exp $ */ /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */ @@ -2276,7 +2276,7 @@ efree(lineEnd); efree(temp); efree(buf); - zval_ptr_dtor(return_value); + zval_dtor(return_value); RETURN_FALSE; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: CVSROOT / avail
ssb Thu Jan 9 18:29:18 2003 EDT Modified files: /CVSROOTavail Log: * restrict nicos to ext/{odbc,mysqli} Index: CVSROOT/avail diff -u CVSROOT/avail:1.574 CVSROOT/avail:1.575 --- CVSROOT/avail:1.574 Thu Jan 9 08:18:21 2003 +++ CVSROOT/avail Thu Jan 9 18:29:18 2003 @@ -17,7 +17,7 @@ # The PHP Developers have full access to the full source trees for # PHP and PEAR, as well as the documentation. -avail|mfischer,fmk,hirokawa,jah,eschmid,dbeu,sebastian,samjam,avsm,ronabob,derick,sterling,venaas,stas,hholzgra,cmv,phildriscoll,jmoore,andre,sniper,sr,david,jdonagher,chagenbu,jon,elixer,joosters,jason,mysql,kalowsky,opaquedave,steinm,phanto,gluke,shuric,svanegmond,rjs,vlad,jimjag,emile,wez,sasha,camber,ohrn,romolo,martin,lurcher,wsanchez,dreid,bmcadams,swm,zhang,kevin,joey,entity,cardinal,coar,jflemer,svbegg,raphael,danda,rbb,mboeren,dougm,mlwmohawk,edink,alexwaugh,bernd,zak,sesser,yohgaki,imajes,markonen,dickmeiss,helly,sander,jedi,jan,kir,aaron,jwoolley,pbannister,rvenkat,dali,rodif_bl,hyanantha,witten,georg,msopacua,mpdoremus,fujimoto,iliaa,chregu,azzit,gschlossnagle,andrey,dan,moriyoshi,dviner,bfrance,flex,iwakiri,john,harrie,pollita,nicos|phpfi,php3,php4,phpdoc,pear,peardoc,ZendAPI,phpdoc-ar,phpdoc-cs,phpdoc-de,phpdoc-es,phpdoc-fi,phpdoc-fr,phpdoc-he,phpdoc-hk,phpdoc-hu,phpdoc-it,phpdoc-ja,phpdoc-kr,phpdoc-lt,phpdoc-nl,phpdoc-pl,phpdoc-pt_BR,phpdoc-ro,phpdoc-ru,phpdoc-sk,phpdoc-sl,phpdoc-sv,phpdoc-tr,phpdoc-tw,phpdoc-zh +avail|mfischer,fmk,hirokawa,jah,eschmid,dbeu,sebastian,samjam,avsm,ronabob,derick,sterling,venaas,stas,hholzgra,cmv,phildriscoll,jmoore,andre,sniper,sr,david,jdonagher,chagenbu,jon,elixer,joosters,jason,mysql,kalowsky,opaquedave,steinm,phanto,gluke,shuric,svanegmond,rjs,vlad,jimjag,emile,wez,sasha,camber,ohrn,romolo,martin,lurcher,wsanchez,dreid,bmcadams,swm,zhang,kevin,joey,entity,cardinal,coar,jflemer,svbegg,raphael,danda,rbb,mboeren,dougm,mlwmohawk,edink,alexwaugh,bernd,zak,sesser,yohgaki,imajes,markonen,dickmeiss,helly,sander,jedi,jan,kir,aaron,jwoolley,pbannister,rvenkat,dali,rodif_bl,hyanantha,witten,georg,msopacua,mpdoremus,fujimoto,iliaa,chregu,azzit,gschlossnagle,andrey,dan,moriyoshi,dviner,bfrance,flex,iwakiri,john,harrie,pollita|phpfi,php3,php4,phpdoc,pear,peardoc,ZendAPI,phpdoc-ar,phpdoc-cs,phpdoc-de,phpdoc-es,phpdoc-fi,phpdoc-fr,phpdoc-he,phpdoc-hk,phpdoc-hu,phpdoc-it,phpdoc-ja,phpdoc-kr,phpdoc-lt,phpdoc-nl,phpdoc-pl,phpdoc-pt_BR,phpdoc-ro,phpdoc-ru,phpdoc-sk,phpdoc-sl,phpdoc-sv,phpdoc-tr,phpdoc-tw,phpdoc-zh # People who work on the Engine @@ -120,9 +120,10 @@ avail|emile,davidg,alan_k,ab|php4/ext/midgard avail|fmk|php4/ext/mssql avail|georg|php4/ext/mysql +avail|georg,nicos|php4/ext/mysqli avail|brad|php4/ext/notes avail|asautins,dbenson,maxim,ray,abonamous,ldixon|php4/ext/oci8 -avail|kara,fmk,sschadt,kshallow|php4/ext/odbc +avail|kara,fmk,sschadt,kshallow,nicos|php4/ext/odbc avail|venaas,maehdros|php4/ext/openssl avail|mitch,kara|php4/ext/oracle avail|nmav|php4/ext/ovrimos -- 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 Thu Jan 9 18:23:32 2003 EDT Modified files: /php4/ext/standard file.c Log: CS fixes Index: php4/ext/standard/file.c diff -u php4/ext/standard/file.c:1.289 php4/ext/standard/file.c:1.290 --- php4/ext/standard/file.c:1.289 Thu Jan 9 17:49:18 2003 +++ php4/ext/standard/file.cThu Jan 9 18:23:32 2003 @@ -21,7 +21,7 @@ +--+ */ -/* $Id: file.c,v 1.289 2003/01/09 22:49:18 iliaa Exp $ */ +/* $Id: file.c,v 1.290 2003/01/09 23:23:32 iliaa Exp $ */ /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */ @@ -639,13 +639,15 @@ WRONG_PARAM_COUNT; } - if (url_stream_wrappers_hash = php_stream_get_url_stream_wrappers_hash()) { + if ((url_stream_wrappers_hash = php_stream_get_url_stream_wrappers_hash())) { array_init(return_value); for(zend_hash_internal_pointer_reset(url_stream_wrappers_hash); (key_flags = zend_hash_get_current_key_ex(url_stream_wrappers_hash, stream_protocol, stream_protocol_len, NULL, 0, NULL)) != HASH_KEY_NON_EXISTANT; - zend_hash_move_forward(url_stream_wrappers_hash)) - if (key_flags == HASH_KEY_IS_STRING) + zend_hash_move_forward(url_stream_wrappers_hash)) { + if (key_flags == HASH_KEY_IS_STRING) { add_next_index_stringl(return_value, stream_protocol, stream_protocol_len, 1); + } + } } else { RETURN_FALSE; } @@ -660,17 +662,17 @@ php_stream *stream; int this_fd; - if (Z_TYPE_P(stream_array) != IS_ARRAY) + if (Z_TYPE_P(stream_array) != IS_ARRAY) { return 0; - + } for (zend_hash_internal_pointer_reset(Z_ARRVAL_P(stream_array)); zend_hash_get_current_data(Z_ARRVAL_P(stream_array), (void **) elem) == SUCCESS; zend_hash_move_forward(Z_ARRVAL_P(stream_array))) { php_stream_from_zval_no_verify(stream, elem); - if (stream == NULL) + if (stream == NULL) { continue; - + } /* get the fd. * NB: Most other code will NOT use the PHP_STREAM_CAST_INTERNAL flag * when casting. It is only used here so that the buffered data warning @@ -693,9 +695,9 @@ HashTable *new_hash; int this_fd, ret = 0; - if (Z_TYPE_P(stream_array) != IS_ARRAY) + if (Z_TYPE_P(stream_array) != IS_ARRAY) { return 0; - + } ALLOC_HASHTABLE(new_hash); zend_hash_init(new_hash, 0, NULL, ZVAL_PTR_DTOR, 0); @@ -704,9 +706,9 @@ zend_hash_move_forward(Z_ARRVAL_P(stream_array))) { php_stream_from_zval_no_verify(stream, elem); - if (stream == NULL) + if (stream == NULL) { continue; - + } /* get the fd * NB: Most other code will NOT use the PHP_STREAM_CAST_INTERNAL flag * when casting. It is only used here so that the buffered data warning @@ -715,8 +717,9 @@ if (SUCCESS == php_stream_cast(stream, PHP_STREAM_AS_FD | PHP_STREAM_CAST_INTERNAL, (void*)this_fd, 1)) { if (FD_ISSET(this_fd, fds)) { zend_hash_next_index_insert(new_hash, (void *)elem, sizeof(zval *), (void **)dest_elem); - if (dest_elem) + if (dest_elem) { zval_add_ref(dest_elem); + } ret++; continue; } @@ -740,9 +743,9 @@ HashTable *new_hash; int ret = 0; - if (Z_TYPE_P(stream_array) != IS_ARRAY) + if (Z_TYPE_P(stream_array) != IS_ARRAY) { return 0; - + } ALLOC_HASHTABLE(new_hash); zend_hash_init(new_hash, 0, NULL, ZVAL_PTR_DTOR, 0); @@ -751,9 +754,9 @@ zend_hash_move_forward(Z_ARRVAL_P(stream_array))) { php_stream_from_zval_no_verify(stream, elem); - if (stream == NULL) + if (stream == NULL) { continue; - + } if ((stream-writepos - stream-readpos) 0) { /* allow readable non-descriptor based streams to participate in stream_select. * Non-descriptor streams will only work if they have previously buffered the @@ -762,8 +765,9 @@ * operate correctly in stream_select. * */
[PHP-CVS] cvs: php4(PHP_4_3) / NEWS
iliaa Thu Jan 9 20:17:04 2003 EDT Modified files: (Branch: PHP_4_3) /php4 NEWS Log: Bug fixing news. Index: php4/NEWS diff -u php4/NEWS:1.1247.2.47 php4/NEWS:1.1247.2.48 --- php4/NEWS:1.1247.2.47 Wed Jan 8 10:01:59 2003 +++ php4/NEWS Thu Jan 9 20:17:03 2003 @@ -9,6 +9,18 @@ . Disallow linkage of Berkeley db submodules against libraries with different major version. . Disallow configuring of more than one Berkeley db handler. +- Fixed bug #21511 (config.status warning). (Jani) +- Fixed bug #21531 (file_exists() and other filestat functions report errors + when the requested file/directory does not exists). (Sara) +- Fixed bug #21544 (Extended checks for where FreeTDS is installed). (Frank) +- Fixed bug #21523 (number_format could cause a memory allocation for a + negative memory size in situations where the sprintf implementation of the + host system generated less decimal places than were requested). (Wez) +- Fixed bug #21529 (memory corruption by fsockopen()). (Ilia) +- Fixed bug #21518 (imagecreatefromstring() crashed when dealing with invalid + image files). (Ilia) +- Fixed bug #20802 (PHP would die silently when memory limit is reached). + (Ilia) - Fixed bug #21498 (mysql_pconnect connection problems). (Georg) - Fixed bug #21443 (improper handling of ? surrounded by spaces in get_browser()). (Ilia) -- 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
iliaa Thu Jan 9 21:00:41 2003 EDT Modified files: /php4/ext/gd/libgd gd.c Log: Fixed ImageRotate when rotation angle is 90 degrees, patch by [EMAIL PROTECTED] Index: php4/ext/gd/libgd/gd.c diff -u php4/ext/gd/libgd/gd.c:1.39 php4/ext/gd/libgd/gd.c:1.40 --- php4/ext/gd/libgd/gd.c:1.39 Wed Dec 18 16:13:21 2002 +++ php4/ext/gd/libgd/gd.c Thu Jan 9 21:00:39 2003 @@ -2492,10 +2492,10 @@ FuncPtr f; if (src-trueColor) { - dst = gdImageCreateTrueColor ( src-sx,src-sy); + dst = gdImageCreateTrueColor(src-sy, src-sx); f = gdImageGetTrueColorPixel; } else { - dst = gdImageCreate (src-sx, src-sy); + dst = gdImageCreate (src-sy, src-sx); f = gdImageGetPixel; } -- 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/gd/libgd gd.c
iliaa Thu Jan 9 21:00:52 2003 EDT Modified files: (Branch: PHP_4_3) /php4/ext/gd/libgd gd.c Log: MFH Index: php4/ext/gd/libgd/gd.c diff -u php4/ext/gd/libgd/gd.c:1.24.2.1 php4/ext/gd/libgd/gd.c:1.24.2.2 --- php4/ext/gd/libgd/gd.c:1.24.2.1 Thu Dec 19 22:44:41 2002 +++ php4/ext/gd/libgd/gd.c Thu Jan 9 21:00:52 2003 @@ -2414,10 +2414,10 @@ FuncPtr f; if (src-trueColor) { - dst = gdImageCreateTrueColor ( src-sx,src-sy); + dst = gdImageCreateTrueColor(src-sy, src-sx); f = gdImageGetTrueColorPixel; } else { - dst = gdImageCreate (src-sx, src-sy); + dst = gdImageCreate (src-sy, src-sx); f = gdImageGetPixel; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/iconv iconv.c
moriyoshi Thu Jan 9 23:32:25 2003 EDT Modified files: /php4/ext/iconv iconv.c Log: Added missing cast operators Index: php4/ext/iconv/iconv.c diff -u php4/ext/iconv/iconv.c:1.80 php4/ext/iconv/iconv.c:1.81 --- php4/ext/iconv/iconv.c:1.80 Mon Jan 6 10:47:24 2003 +++ php4/ext/iconv/iconv.c Thu Jan 9 23:32:25 2003 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: iconv.c,v 1.80 2003/01/06 15:47:24 moriyoshi Exp $ */ +/* $Id: iconv.c,v 1.81 2003/01/10 04:32:25 moriyoshi Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -641,7 +641,7 @@ } } - if (cnt = offset) { + if (cnt = (unsigned int)offset) { if (cd2 == NULL) { cd2 = icv_open(enc, GENERIC_SUPERSET_NAME); @@ -790,7 +790,7 @@ } } if (offset = 0) { - if (cnt = offset) { + if (cnt = (unsigned int)offset) { if (_php_iconv_memequal(buf, ndl_buf_p, sizeof(buf))) { if (match_ofs == (unsigned int)-1) { match_ofs = cnt; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/standard reg.c
moriyoshi Thu Jan 9 23:44:22 2003 EDT Modified files: /php4/ext/standard reg.c Log: Reduced compiler warnings Index: php4/ext/standard/reg.c diff -u php4/ext/standard/reg.c:1.69 php4/ext/standard/reg.c:1.70 --- php4/ext/standard/reg.c:1.69Tue Dec 31 11:07:54 2002 +++ php4/ext/standard/reg.c Thu Jan 9 23:44:21 2003 @@ -17,7 +17,7 @@ | Jaakko Hyvätti [EMAIL PROTECTED] | +--+ */ -/* $Id: reg.c,v 1.69 2002/12/31 16:07:54 sebastian Exp $ */ +/* $Id: reg.c,v 1.70 2003/01/10 04:44:21 moriyoshi Exp $ */ #include stdio.h #include ctype.h @@ -347,7 +347,7 @@ walkbuf = buf[tmp + subs[0].rm_so]; walk = replace; while (*walk) - if ('\\' == *walk isdigit(walk[1]) walk[1] - '0' = re.re_nsub) { + if ('\\' == *walk isdigit(walk[1]) walk[1] - '0' += (int)re.re_nsub) { if (subs[walk[1] - '0'].rm_so -1 subs[walk[1] - '0'].rm_eo -1 /* this next case shouldn't happen. it does. */ subs[walk[1] - '0'].rm_so = subs[walk[1] - '0'].rm_eo) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/standard filestat.c /main safe_mode.c safe_mode.h
pollita Thu Jan 9 16:57:45 2003 EDT Modified files: /php4/ext/standard filestat.c /php4/main safe_mode.c safe_mode.h Log: Bug #21531 file_exists() and other filestat functions throw errors when in safe mode and file/directory does not exist. Extended php_checkuid function to add flags field via rename to php_checkuid_ex with alias for BC in functions that do want safe mode errors thrown. Index: php4/ext/standard/filestat.c diff -u php4/ext/standard/filestat.c:1.117 php4/ext/standard/filestat.c:1.118 --- php4/ext/standard/filestat.c:1.117 Sat Jan 4 19:56:17 2003 +++ php4/ext/standard/filestat.cThu Jan 9 16:57:44 2003 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: filestat.c,v 1.117 2003/01/05 00:56:17 derick Exp $ */ +/* $Id: filestat.c,v 1.118 2003/01/09 21:57:44 pollita Exp $ */ #include php.h #include safe_mode.h @@ -564,7 +564,7 @@ char *stat_sb_names[13]={dev, ino, mode, nlink, uid, gid, rdev, size, atime, mtime, ctime, blksize, blocks}; - if (PG(safe_mode) (!php_checkuid(filename, NULL, CHECKUID_CHECK_FILE_AND_DIR))) { + if (PG(safe_mode) (!php_checkuid_ex(filename, NULL, +CHECKUID_CHECK_FILE_AND_DIR, IS_EXISTS_CHECK(type) ? CHECKUID_NO_ERRORS : 0))) { RETURN_FALSE; } Index: php4/main/safe_mode.c diff -u php4/main/safe_mode.c:1.52 php4/main/safe_mode.c:1.53 --- php4/main/safe_mode.c:1.52 Tue Dec 31 10:58:54 2002 +++ php4/main/safe_mode.c Thu Jan 9 16:57:45 2003 @@ -15,7 +15,7 @@ | Author: Rasmus Lerdorf [EMAIL PROTECTED]| +--+ */ -/* $Id: safe_mode.c,v 1.52 2002/12/31 15:58:54 sebastian Exp $ */ +/* $Id: safe_mode.c,v 1.53 2003/01/09 21:57:45 pollita Exp $ */ #include php.h @@ -44,7 +44,7 @@ * 5 - only check file */ -PHPAPI int php_checkuid(const char *filename, char *fopen_mode, int mode) +PHPAPI int php_checkuid_ex(const char *filename, char *fopen_mode, int mode, int +flags) { struct stat sb; int ret, nofile=0; @@ -85,12 +85,16 @@ ret = VCWD_STAT(path, sb); if (ret 0) { if (mode == CHECKUID_DISALLOW_FILE_NOT_EXISTS) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, Unable to access %s, filename); + if (flags CHECKUID_NO_ERRORS == 0) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, +Unable to access %s, filename); + } return 0; } else if (mode == CHECKUID_ALLOW_FILE_NOT_EXISTS) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, Unable to access %s, filename); + if (flags CHECKUID_NO_ERRORS == 0) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, +Unable to access %s, filename); + } return 1; - } + } nofile = 1; } else { uid = sb.st_uid; @@ -129,7 +133,9 @@ /* check directory */ ret = VCWD_STAT(path, sb); if (ret 0) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, Unable to access %s, filename); + if (flags CHECKUID_NO_ERRORS == 0) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, Unable to +access %s, filename); + } return 0; } duid = sb.st_uid; @@ -162,15 +168,21 @@ gid = dgid; filename = path; } - - if (PG(safe_mode_gid)) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, SAFE MODE Restriction in effect. The script whose uid/gid is %ld/%ld is not allowed to access %s owned by uid/gid %ld/%ld, php_getuid(), php_getgid(), filename, uid, gid); - } else { - php_error_docref(NULL TSRMLS_CC, E_WARNING, SAFE MODE Restriction in effect. The script whose uid is %ld is not allowed to access %s owned by uid %ld, php_getuid(), filename, uid); - } + + if (flags CHECKUID_NO_ERRORS == 0) { + if (PG(safe_mode_gid)) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, SAFE MODE +Restriction in effect. The script whose uid/gid is %ld/%ld is not allowed to access +%s owned by uid/gid %ld/%ld, php_getuid(), php_getgid(), filename, uid, gid); + } else { + php_error_docref(NULL TSRMLS_CC, E_WARNING, SAFE MODE +Restriction in effect. The script whose uid is %ld is not allowed to access