[PHP] Re: [PHP-DEV] Parse search string a la Google (Regular expression?)
Benny Rasmussen wrote: > Hi, > > In my application I would like to offer a search interface like Google > and other popular search engines. The complication for me is to explode > the search string into proper array elements, like this: > > $search_str = "\"search for this sentence\" -NotForThisWord > ButDefinitelyForThisWord"; > > $array[0]: "search for this sentence" > $array[1]: "-NotForThisWord" > $array[2]: "ButDefinitelyForThisWord" > > I have tried to use regular expressions but my case seems to be a bit > more complicated for this (?). > > Does anybody have a code snippet, a class or something, that can help > me with this? > > Thanks in advance, > Joachim > > -- > PHP Development Mailing List <http://www.php.net/> > To unsubscribe, visit: http://www.php.net/unsub.php Forwarding to [EMAIL PROTECTED], since this would be the appropriate list for the topic. [EMAIL PROTECTED] is for the development *of* PHP itself, not for developing *with* PHP. -- Sebastian Bergmann http://sebastian-bergmann.de/ http://phpOpenTracker.de/ Did I help you? Consider a gift: http://wishlist.sebastian-bergmann.de/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: [PHP-DEV] how to call a website from within a php script
christian tischler wrote: > Can anybody tell me how to call a website from within a php script. Please ask user questions on the [EMAIL PROTECTED] list. -- Sebastian Bergmann http://sebastian-bergmann.de/ http://phpOpenTracker.de/ Did I help you? Consider a gift: http://wishlist.sebastian-bergmann.de/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: [PHP-DEV] database select
Hans Prins wrote: > [...] Please ask user questions on the [EMAIL PROTECTED] list. -- Sebastian Bergmann http://sebastian-bergmann.de/ http://phpOpenTracker.de/ Did I help you? Consider a gift: http://wishlist.sebastian-bergmann.de/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: [PEAR-DEV] Please Help me..MySQL
Mohsen Pahlevanzadeh wrote: > Hi dears. Please post such questions to mailto:[EMAIL PROTECTED] Your posting has no reference to PEAR whatsover. Greetings, Sebastian -- Sebastian Bergmann http://sebastian-bergmann.de/ http://phpOpenTracker.de/ Das Buch zu PHP 5: http://professionelle-softwareentwicklung-mit-php5.de/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 /ext/odbc php_odbc.c php_odbc.h
Stig Bakken wrote: > ssb Sun Jan 14 17:11:06 2001 EDT > > Modified files: > /php4/ext/odbc php_odbc.c php_odbc.h > Log: > @- Added odbc_error() and odbc_errormsg() functions (Stig) PHP 4 does not build on Win32 after this patch: php_odbc.c D:\Programme\MS Visual Studio\Projekte\php\php4\ext\odbc\php_odbc.c(2445) : error C2065: 'odbc_globals' : nichtdeklarierter Bezeichner D:\Programme\MS Visual Studio\Projekte\php\php4\ext\odbc\php_odbc.c(2445) : error C2223: Der linke Teil von '->laststate' muss auf eine Struktur/Union zeigen D:\Programme\MS Visual Studio\Projekte\php\php4\ext\odbc\php_odbc.c(2445) : warning C4047: 'function' : Anzahl der Dereferenzierungen bei 'const char *' und 'int ' unterschiedlich D:\Programme\MS Visual Studio\Projekte\php\php4\ext\odbc\php_odbc.c(2445) : warning C4024: 'strncpy' : Unterschiedliche Typen fuer formalen und uebergebenen Parameter 2 D:\Programme\MS Visual Studio\Projekte\php\php4\ext\odbc\php_odbc.c(2445) : error C2198: 'strncpy' : Nicht genuegend Parameter uebergeben D:\Programme\MS Visual Studio\Projekte\php\php4\ext\odbc\php_odbc.c(2447) : error C2223: Der linke Teil von '->lasterrormsg' muss auf eine Struktur/Union zeigen D:\Programme\MS Visual Studio\Projekte\php\php4\ext\odbc\php_odbc.c(2447) : warning C4047: 'function' : Anzahl der Dereferenzierungen bei 'const char *' und 'int ' unterschiedlich D:\Programme\MS Visual Studio\Projekte\php\php4\ext\odbc\php_odbc.c(2447) : warning C4024: 'strncpy' : Unterschiedliche Typen fuer formalen und uebergebenen Parameter 2 D:\Programme\MS Visual Studio\Projekte\php\php4\ext\odbc\php_odbc.c(2447) : error C2198: 'strncpy' : Nicht genuegend Parameter uebergeben -- sebastian bergmann e-mail : [EMAIL PROTECTED] homepage : http://www.sebastian-bergmann.de make a gift : http://wishlist.sebastian-bergmann.de measure the usability of your web application -> http://phpOpenTracker.de -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-CVS] cvs: php4 /pear/HTML IT.php ITX.php /pear/PHPDoc prepend.php /pear/PHPDoc/redist IT.php ITX.php
sbergmann Wed Jan 17 08:15:18 2001 EDT Added files: /php4/pear/HTML IT.php ITX.php Removed files: /php4/pear/PHPDoc/redistIT.php ITX.php Modified files: /php4/pear/PHPDoc prepend.php Log: Move IT[x] to HTML/. Index: php4/pear/PHPDoc/prepend.php diff -u php4/pear/PHPDoc/prepend.php:1.1 php4/pear/PHPDoc/prepend.php:1.2 --- php4/pear/PHPDoc/prepend.php:1.1Sun Oct 8 03:03:18 2000 +++ php4/pear/PHPDoc/prepend.phpWed Jan 17 08:15:18 2001 @@ -44,9 +44,9 @@ require( PHPDOC_INCLUDE_DIR . "xmlexporter/PhpdocXMLModuleExporter.php" ); require( PHPDOC_INCLUDE_DIR . "xmlexporter/PhpdocXMLClassExporter.php" ); -// Redistributed IT[X] Templates from the PHPLib -require( PHPDOC_INCLUDE_DIR . "redist/IT.php" ); -require( PHPDOC_INCLUDE_DIR . "redist/ITX.php" ); +// IT[X] Templates +require_once "HTML/IT.php"; +require_once "HTML/ITX.php"; // XML Reader require( PHPDOC_INCLUDE_DIR . "xmlreader/PhpdocXMLReader.php" ); Index: php4/pear/HTML/IT.php +++ php4/pear/HTML/IT.php http://www.php.net/license/2_02.txt. | // | If you did not receive a copy of the PHP license and are unable to | // | obtain it through the world-wide-web, please send a note to | // | [EMAIL PROTECTED] so we can mail you a copy immediately. | // +--+ // | Authors: Ulf Wendel <[EMAIL PROTECTED]> | // +--+ // // $Id: IT.php,v 1.1 2001/01/17 16:15:17 sbergmann Exp $ // /** * Integrated Template - IT * * Well there's not much to say about it. I needed a template class that * supports a single template file with multiple (nested) blocks inside. * * Usage: * $tpl = new IntegratedTemplate( [string filerootdir] ); * * // load a template or set it with setTemplate() * $tpl->loadTemplatefile( string filename [, boolean removeUnknownVariables, boolean removeEmptyBlocks] ) * * // set "global" Variables meaning variables not beeing within a (inner) block * $tpl->setVariable( string variablename, mixed value ); * * // like with the Isotopp Templates there's a second way to use setVariable() * $tpl->setVariable( array ( string varname => mixed value ) ); * * // Let's use any block, even a deeply nested one * $tpl->setCurrentBlock( string blockname ); * * // repeat this as often as you neer. * $tpl->setVariable( array ( string varname => mixed value ) ); * $tpl->parseCurrentBlock(); * * // get the parsed template or print it: $tpl->show() * $tpl->get(); * * @author Ulf Wendel <[EMAIL PROTECTED]> * @version $Id: IT.php,v 1.1 2001/01/17 16:15:17 sbergmann Exp $ * @access public * @package PHPDoc */ class IntegratedTemplate { /** * Contains the error objects * @var array * @access public * @see halt(), $printError, $haltOnError */ var $err = array(); /** * Print error messages? * @var boolean * @access public * @see halt(), $haltOnError, $err */ var $printError = false; /** * Call die() on error? * @var boolean * @access public * @see halt(), $printError, $err */ var $haltOnError = false; /** * Clear cache on get()? * @var boolean */ var $clearCache = false; /** * First character of a variable placeholder ( _{_VARIABLE} ). * @var string * @access public * @see $closingDelimiter, $blocknameRegExp, $variablenameRegExp */ var $openingDelimiter = "{"; /** * Last character of a variable placeholder ( {VARIABLE_}_ ). * @var string * @access public * @see $openingDelimiter, $blocknameRegExp, $variablenameRegExp */ var $closingDelimiter = "}"; /** * RegExp matching a block in the template. * Per default "sm" is used as the regexp modifier, "i" is missing. * That means a case sensitive search is done. * @var string * @access public * @see $variablenameRegExp, $openingDelimiter, $closingDelimiter */ var $blocknameRegExp= "[0-9A-Za-z_-]+"; /** * RegExp matching a variable placeholder in the template. * Per default "sm" is used as the regexp modifier, "i" is missing. * That means a case sensitive search is done. * @var string * @access public * @see $blocknameRegExp, $openingDelimiter, $closingDelimiter */
[PHP] Merging PHPLIB into PEAR
Hello there, Kristian Köhntopp and Ulf Wendel approached me today and told me that they have decided to merge the existing classes and modules of PHPLIB 7 and those that are currently beeing worked on (for PHPLIB 8, which will now never be released) into PEAR and asked me to coordinate efforts in order to do so. The merging with PHPLIB brings thought-through, well-tested classes for Authorisation, User and Permission Management, classes for the abstraction of forms (with Layout Management Engine) and a lot of other stuff (table proxies, ...) into PEAR. I hope everyone is happy with this step, at least I am. :-) Why? Until now there were two standard repositories one could use and now there is the opportunity to join the strengths of both. One thing is for sure: The process of integrating PHPLIB's concept of Auth/User/Perm into PEAR will not be finished over-night. PHPLIB's Sess(ion) class is currently beeing ported to PHP 4 to act as a wrapper for the native session-management functions of PHP 4. What needs to be done now is port PHPLIB's classes for Auth/User/Perm to PEAR::DB, because they are using PHPLIB's own database abstraction system, which has come of age. Ulf Wendel is currently working on the new OOHForms and a Layout Management System. I am sure he can elaborate on this topic on this list. Ulf? A first, but rather unimportant step was my last commit which moved the IT[X] template classes from phpdoc/redist to HTML/ and removed the redist/ directory. Yours, Sebastian -- sebastian bergmann e-mail : [EMAIL PROTECTED] homepage : http://www.sebastian-bergmann.de make a gift : http://wishlist.sebastian-bergmann.de measure the usability of your web application -> http://phpOpenTracker.de -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-CVS] cvs: php4 /pear/HTML IT.php ITX.php
sbergmann Fri Jan 19 05:37:03 2001 EDT Modified files: /php4/pear/HTML IT.php ITX.php Log: Whitespace only. Index: php4/pear/HTML/IT.php diff -u php4/pear/HTML/IT.php:1.2 php4/pear/HTML/IT.php:1.3 --- php4/pear/HTML/IT.php:1.2 Thu Jan 18 12:43:25 2001 +++ php4/pear/HTML/IT.php Fri Jan 19 05:37:03 2001 @@ -13,10 +13,10 @@ // | obtain it through the world-wide-web, please send a note to | // | [EMAIL PROTECTED] so we can mail you a copy immediately. | // +--+ -// | Authors: Ulf Wendel <[EMAIL PROTECTED]> | +// | Authors: Ulf Wendel <[EMAIL PROTECTED]> | // +--+ // -// $Id: IT.php,v 1.2 2001/01/18 20:43:25 uw Exp $ +// $Id: IT.php,v 1.3 2001/01/19 13:37:03 sbergmann Exp $ // /** * Integrated Template - IT @@ -109,7 +109,7 @@ * * * @author Ulf Wendel <[EMAIL PROTECTED]> -* @version $Id: IT.php,v 1.2 2001/01/18 20:43:25 uw Exp $ +* @version $Id: IT.php,v 1.3 2001/01/19 13:37:03 sbergmann Exp $ * @accesspublic */ class IntegratedTemplate { Index: php4/pear/HTML/ITX.php diff -u php4/pear/HTML/ITX.php:1.2 php4/pear/HTML/ITX.php:1.3 --- php4/pear/HTML/ITX.php:1.2 Thu Jan 18 12:52:33 2001 +++ php4/pear/HTML/ITX.php Fri Jan 19 05:37:03 2001 @@ -13,10 +13,10 @@ // | obtain it through the world-wide-web, please send a note to | // | [EMAIL PROTECTED] so we can mail you a copy immediately. | // +--+ -// | Authors: Ulf Wendel <[EMAIL PROTECTED]> | +// | Authors: Ulf Wendel <[EMAIL PROTECTED]> | // +--+ // -// $Id: ITX.php,v 1.2 2001/01/18 20:52:33 uw Exp $ +// $Id: ITX.php,v 1.3 2001/01/19 13:37:03 sbergmann Exp $ // /** * Integrated Template Extension - ITX @@ -32,7 +32,7 @@ * * @author Ulf Wendel <[EMAIL PROTECTED]> * @accesspublic -* @version $Id: ITX.php,v 1.2 2001/01/18 20:52:33 uw Exp $ +* @version $Id: ITX.php,v 1.3 2001/01/19 13:37:03 sbergmann Exp $ */ class IntegratedTemplateExtension extends IntegratedTemplate { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-CVS] cvs: php4 /pear/Cache Function_Cache.php
sbergmann Sat Jan 20 09:40:06 2001 EDT Modified files: /php4/pear/CacheFunction_Cache.php Log: Fixed two small glitches. Note: The Shared Memory version of Function_Cache does not work correctly at the moment, but I'm on it. Index: php4/pear/Cache/Function_Cache.php diff -u php4/pear/Cache/Function_Cache.php:1.2 php4/pear/Cache/Function_Cache.php:1.3 --- php4/pear/Cache/Function_Cache.php:1.2 Tue Jan 9 17:01:53 2001 +++ php4/pear/Cache/Function_Cache.php Sat Jan 20 09:40:05 2001 @@ -3,7 +3,7 @@ // +--+ // | PHP version 4.0 | // +--+ -// | Copyright (c) 1997-2001 The PHP Group| +// | Copyright (c) 1997, 1998, 1999, 2000 The PHP Group | // +--+ // | This source file is subject to version 2.02 of the PHP license, | // | that is bundled with this package in the file LICENSE, and is| @@ -16,7 +16,7 @@ // | Authors: Sebastian Bergmann <[EMAIL PROTECTED]> | // +--+ // -// $Id: Function_Cache.php,v 1.2 2001/01/10 01:01:53 ssb Exp $ +// $Id: Function_Cache.php,v 1.3 2001/01/20 17:40:05 sbergmann Exp $ // /** @@ -58,7 +58,7 @@ * * @author Sebastian Bergmann <[EMAIL PROTECTED]> * @module Function_Cache -* @version $Revision: 1.2 $ +* @version $Revision: 1.3 $ * @access public */ @@ -192,7 +192,7 @@ function cache_set_lifetime( $func_name, $lifetime ) { // check $lifetime argument - if( is_number( $lifetime ) ) + if( is_integer( $lifetime ) ) { // store $lifetime $GLOBALS[ "_cache" ][ "lifetime" ][ $func_name ] = $lifetime; @@ -262,7 +262,7 @@ $shm = shm_attach( CACHE_SHM_KEY, CACHE_SHM_SIZE ); // read cache contents - $cache = shm_get_var( $shm, CACHE_SHM_VAR ); + $cache = @shm_get_var( $shm, CACHE_SHM_VAR ); // release shared memory sem_release( $sem ); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-CVS] cvs: php4 /pear/Cache Function_Cache.php
sbergmann Sat Jan 20 09:41:55 2001 EDT Modified files: /php4/pear/CacheFunction_Cache.php Log: Next time without the 'Oops!'. Index: php4/pear/Cache/Function_Cache.php diff -u php4/pear/Cache/Function_Cache.php:1.3 php4/pear/Cache/Function_Cache.php:1.4 --- php4/pear/Cache/Function_Cache.php:1.3 Sat Jan 20 09:40:05 2001 +++ php4/pear/Cache/Function_Cache.php Sat Jan 20 09:41:55 2001 @@ -3,7 +3,7 @@ // +--+ // | PHP version 4.0 | // +--+ -// | Copyright (c) 1997, 1998, 1999, 2000 The PHP Group | +// | Copyright (c) 1997-2001 The PHP Group| // +--+ // | This source file is subject to version 2.02 of the PHP license, | // | that is bundled with this package in the file LICENSE, and is| @@ -16,7 +16,7 @@ // | Authors: Sebastian Bergmann <[EMAIL PROTECTED]> | // +--+ // -// $Id: Function_Cache.php,v 1.3 2001/01/20 17:40:05 sbergmann Exp $ +// $Id: Function_Cache.php,v 1.4 2001/01/20 17:41:55 sbergmann Exp $ // /** @@ -58,7 +58,7 @@ * * @author Sebastian Bergmann <[EMAIL PROTECTED]> * @module Function_Cache -* @version $Revision: 1.3 $ +* @version $Revision: 1.4 $ * @access public */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-CVS] cvs: php4 / NEWS /ext/mysql/libmysql acinclude.m4 bmove.ccharset.c config-win.h dbug.h default.c errors.c fix_copyright global.hlibmysql.c m_string.h mf_dirname.c mf_format.c mf_pack.c mf_path.cmy_alloc.c my_create.c my_fopen.c my_i
MySQL Team wrote: > Log: > Upgrade ext/mysql/libmysql to version 3.23.32. One notable bug fix is > that the client can now connect to a server which is using a default > charset other than latin1. Great! All those compiler warnings in libmysql are gone on Win32 :-) -- sebastian bergmann e-mail : [EMAIL PROTECTED] homepage : http://www.sebastian-bergmann.de make a gift : http://wishlist.sebastian-bergmann.de measure the usability of your web application -> http://phpOpenTracker.de -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-CVS] cvs: php4 / NEWS /ext/mysql/libmysql acinclude.m4 bmove.ccharset.c config-win.h dbug.h default.c errors.c fix_copyright global.hlibmysql.c m_string.h mf_dirname.c mf_format.c mf_pack.c mf_path.cmy_alloc.c my_create.c my_fopen.c my_i
MySQL Team wrote: > Log: > Upgrade ext/mysql/libmysql to version 3.23.32. One notable bug fix is > that the client can now connect to a server which is using a default > charset other than latin1. I can't link the latest CVS of PHP on Win32: libmysql.lib(my_thr_init.obj) : error LNK2001: Nichtaufgeloestes externes Symbol _win_pthread_init libmysql.lib(my_compress.obj) : error LNK2001: Nichtaufgeloestes externes Symbol _compress libmysql.lib(my_compress.obj) : error LNK2001: Nichtaufgeloestes externes Symbol _uncompress ..\Release_TS_inline\php4ts.dll : fatal error LNK1120: 3 unaufgeloeste externe Verweise Nichtaufgeloestes externes Symbol == Not resolved external symbol -- sebastian bergmann e-mail : [EMAIL PROTECTED] homepage : http://www.sebastian-bergmann.de make a gift : http://wishlist.sebastian-bergmann.de measure the usability of your web application -> http://phpOpenTracker.de -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-CVS] cvs: php4 /pear/HTML ITX.php
sbergmann Wed Jan 24 03:19:29 2001 EDT Modified files: /php4/pear/HTML ITX.php Log: Forgot to include IT.php. Index: php4/pear/HTML/ITX.php diff -u php4/pear/HTML/ITX.php:1.3 php4/pear/HTML/ITX.php:1.4 --- php4/pear/HTML/ITX.php:1.3 Fri Jan 19 05:37:03 2001 +++ php4/pear/HTML/ITX.php Wed Jan 24 03:19:28 2001 @@ -16,8 +16,11 @@ // | Authors: Ulf Wendel <[EMAIL PROTECTED]> | // +--+ // -// $Id: ITX.php,v 1.3 2001/01/19 13:37:03 sbergmann Exp $ +// $Id: ITX.php,v 1.4 2001/01/24 11:19:28 sbergmann Exp $ // + +require_once "HTML/IT.php"; + /** * Integrated Template Extension - ITX * @@ -32,7 +35,7 @@ * * @author Ulf Wendel <[EMAIL PROTECTED]> * @accesspublic -* @version $Id: ITX.php,v 1.3 2001/01/19 13:37:03 sbergmann Exp $ +* @version $Id: ITX.php,v 1.4 2001/01/24 11:19:28 sbergmann Exp $ */ class IntegratedTemplateExtension extends IntegratedTemplate { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-CVS] cvs: php4 /ext/mysql/libmysql config-win.h update_sources
MySQL Team wrote: > mysql Wed Jan 24 10:11:25 2001 EDT > > Modified files: > /php4/ext/mysql/libmysqlconfig-win.h update_sources > Log: > Don't #define HAVE_COMPRESS on windows. The error libmysql.lib(my_thr_init.obj) : error LNK2001: Not resolved external symbol _win_pthread_init remains. The others are gone. -- sebastian bergmann e-mail : [EMAIL PROTECTED] homepage : http://www.sebastian-bergmann.de make a gift : http://wishlist.sebastian-bergmann.de measure the usability of your web application -> http://phpOpenTracker.de -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-CVS] cvs: php4 /ext/mysql/libmysql libmysql.dsp my_winthread.c
sbergmann Wed Jan 24 13:08:12 2001 EDT Added files: /php4/ext/mysql/libmysqlmy_winthread.c Modified files: /php4/ext/mysql/libmysqllibmysql.dsp Log: Added my_winthread.c. Thanks to Thimble Smith. Index: php4/ext/mysql/libmysql/libmysql.dsp diff -u php4/ext/mysql/libmysql/libmysql.dsp:1.11 php4/ext/mysql/libmysql/libmysql.dsp:1.12 --- php4/ext/mysql/libmysql/libmysql.dsp:1.11 Tue Dec 26 14:15:32 2000 +++ php4/ext/mysql/libmysql/libmysql.dspWed Jan 24 13:08:12 2001 @@ -406,6 +406,10 @@ # End Source File # Begin Source File +SOURCE=.\my_winthread.c +# End Source File +# Begin Source File + SOURCE=.\my_write.c # End Source File # Begin Source File Index: php4/ext/mysql/libmysql/my_winthread.c +++ php4/ext/mysql/libmysql/my_winthread.c /* Copyright Abandoned. Public domain, no warranty, etc. */ /* ** Simulation of posix threads calls for WIN95 and NT */ /* SAFE_MUTEX will not work until the thread structure is up to date */ #undef SAFE_MUTEX #include "mysys_priv.h" #if defined(THREAD) && defined(__WIN__) #include #undef getpid #include static pthread_mutex_t THR_LOCK_thread; struct pthread_map { HANDLE pthreadself; pthread_handler func; void *param; }; void win_pthread_init(void) { pthread_mutex_init(&THR_LOCK_thread,NULL); } /* ** We have tried to use '_beginthreadex' instead of '_beginthread' here ** but in this case the program leaks about 512 characters for each ** created thread ! ** As we want to save the created thread handler for other threads to ** use and to be returned by pthread_self() (instead of the Win32 pseudo ** handler), we have to go trough pthread_start() to catch the returned handler ** in the new thread. */ static pthread_handler_decl(pthread_start,param) { pthread_handler func=((struct pthread_map *) param)->func; void *func_param=((struct pthread_map *) param)->param; my_thread_init(); /* Will always succeed in windows */ pthread_mutex_lock(&THR_LOCK_thread); /* Wait for beginthread to return */ win_pthread_self=((struct pthread_map *) param)->pthreadself; pthread_mutex_unlock(&THR_LOCK_thread); free((char*) param);/* Free param from create */ pthread_exit((void*) (*func)(func_param)); return 0; /* Safety */ } int pthread_create(pthread_t *thread_id, pthread_attr_t *attr, pthread_handler func, void *param) { HANDLE hThread; struct pthread_map *map; DBUG_ENTER("pthread_create"); if (!(map=malloc(sizeof(*map DBUG_RETURN(-1); map->func=func; map->param=param; pthread_mutex_lock(&THR_LOCK_thread); #ifdef __BORLANDC__ hThread=(HANDLE)_beginthread((void(_USERENTRY *)(void *)) pthread_start, attr->dwStackSize ? attr->dwStackSize : 65535, (void*) map); #else hThread=(HANDLE)_beginthread((void( __cdecl *)(void *)) pthread_start, attr->dwStackSize ? attr->dwStackSize : 65535, (void*) map); #endif DBUG_PRINT("info", ("hThread=%lu",(long) hThread)); *thread_id=map->pthreadself=hThread; pthread_mutex_unlock(&THR_LOCK_thread); if (hThread == (HANDLE) -1) { int error=errno; DBUG_PRINT("error", ("Can't create thread to handle request (error %d)",error)); DBUG_RETURN(error ? error : -1); } VOID(SetThreadPriority(hThread, attr->priority)) ; DBUG_RETURN(0); } void pthread_exit(void *a) { _endthread(); } /* This is neaded to get the macro pthread_setspecific to work */ int win_pthread_setspecific(void *a,void *b,uint length) { memcpy(a,b,length); return 0; } #endif -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-CVS] cvs: php4 /ext/mysql/libmysql config-win.h update_sources
Thimble Smith wrote: > OK. Can you add the attached file to the libmysql directory > and see if it fixes the problem? If so, I'll add it to CVS. It works now, thank you. I already added my_winthread.c to the CVS and patched the MS VisualC++ workspace accordingly. -- sebastian bergmann e-mail : [EMAIL PROTECTED] homepage : http://www.sebastian-bergmann.de make a gift : http://wishlist.sebastian-bergmann.de measure the usability of your web application -> http://phpOpenTracker.de -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-CVS] cvs: php4 /win32 php4dll.dsp php4dllts.dsp
sbergmann Fri Feb 23 14:55:29 2001 EDT Modified files: /php4/win32 php4dll.dsp php4dllts.dsp Log: That should do the trick. Index: php4/win32/php4dll.dsp diff -u php4/win32/php4dll.dsp:1.8 php4/win32/php4dll.dsp:1.9 --- php4/win32/php4dll.dsp:1.8 Fri Jan 5 10:06:24 2001 +++ php4/win32/php4dll.dsp Fri Feb 23 14:55:28 2001 @@ -128,7 +128,7 @@ # End Source File # Begin Source File -SOURCE="..\main\fopen-wrappers.c" +SOURCE="..\main\fopen_wrappers.c" # End Source File # Begin Source File Index: php4/win32/php4dllts.dsp diff -u php4/win32/php4dllts.dsp:1.31 php4/win32/php4dllts.dsp:1.32 --- php4/win32/php4dllts.dsp:1.31 Wed Feb 21 15:52:57 2001 +++ php4/win32/php4dllts.dspFri Feb 23 14:55:28 2001 @@ -157,7 +157,7 @@ # End Source File # Begin Source File -SOURCE="..\main\fopen-wrappers.c" +SOURCE="..\main\fopen_wrappers.c" # End Source File # Begin Source File @@ -242,7 +242,7 @@ # End Source File # Begin Source File -SOURCE="..\main\fopen-wrappers.h" +SOURCE="..\main\fopen_wrappers.h" # End Source File # Begin Source File -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-CVS] cvs: php4 / TODO
sbergmann Tue Feb 27 01:11:56 2001 EDT Modified files: /php4 TODO Log: Daniel told me he is working on this one, and he is pretty close to finishing the job. Index: php4/TODO diff -u php4/TODO:1.117 php4/TODO:1.118 --- php4/TODO:1.117 Tue Feb 27 01:07:01 2001 +++ php4/TODO Tue Feb 27 01:11:56 2001 @@ -100,7 +100,7 @@ ext/sockets --- -* Make the extension work on windows +* Make the extension work on windows (Daniel Beulshausen) * Make the extension work with Solaris and the Sun GCC ext/standard -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-CVS] cvs: php4 / TODO
sbergmann Tue Feb 27 01:16:49 2001 EDT Modified files: /php4 TODO Log: PHP3_TLS_*() macros are no longer used in ext/dav/dav.c, ext/ldap/ldap.c. Index: php4/TODO diff -u php4/TODO:1.119 php4/TODO:1.120 --- php4/TODO:1.119 Tue Feb 27 01:15:02 2001 +++ php4/TODO Tue Feb 27 01:16:48 2001 @@ -27,7 +27,7 @@ target. * make sure all source files have the "right" copyright. * the following modules still use PHP3_TLS_*() macros (and thereby don't - work in ZTS mode): ext/dav/dav.c, ext/db/db.c, ext/gd/gd.c, ext/ldap/ldap.c + work in ZTS mode): ext/db/db.c, ext/gd/gd.c * make sure that all ZTS globals get destructed. Most ts_allocate_id() calls should have a dtor entry. * activate all extensions by default that don't rely on external -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-CVS] cvs: php4 /pear/Cache Cache.php Function_Cache.php /pear/Cache/Container cache_container.php cache_container_file.php
sbergmann Thu Mar 1 07:35:18 2001 EDT Added files: /php4/pear/CacheCache.php /php4/pear/Cache/Container cache_container.php cache_container_file.php Removed files: /php4/pear/CacheFunction_Cache.php Log: Removed my old Function_Cache class implementation. Initial commit of the multi-purpose Cache System Ulf Wendel and I worked on the last couple of days. In this first phase I commit the Cache base class, the Cache Container Base class and the File-based Cache Container. During the next couple of hours I hope to finish the Cache Container classes for caching with PEAR/DB, PHPLIB/DB_Sql and Native MySQL Heap Table support. I also have working versions of classes extending Cache, namely Function_Cache, Graphics_Cache and Output_Cache. Bare with me, tomorrow at the latest PEAR/Cache will be a extensive and efficient means for general caching purposes, besides specialized caching for graphics. Index: php4/pear/Cache/Cache.php +++ php4/pear/Cache/Cache.php http://www.php.net/license/2_02.txt. | // | If you did not receive a copy of the PHP license and are unable to | // | obtain it through the world-wide-web, please send a note to | // | [EMAIL PROTECTED] so we can mail you a copy immediately. | // +--+ // | Authors: Ulf Wendel <[EMAIL PROTECTED]> | // | Sebastian Bergmann <[EMAIL PROTECTED]> | // +--+ // // $Id: Cache.php,v 1.1 2001/03/01 15:35:18 sbergmann Exp $ /** * Cache is a base class for cache implementations. * * TODO: Simple usage example goes here. * * @author Ulf Wendel <[EMAIL PROTECTED]> * @version $Id: Cache.php,v 1.1 2001/03/01 15:35:18 sbergmann Exp $ * @package Cache * @access public */ class Cache { /** * Disables the caching. * * TODO: Add explanation what this is good for. * * @var boolean * @access public */ var $no_cache = false; /** * Garbage collection: probability in seconds * * If set to a value above 0 a garbage collection will * flush all cache entries older than the specified number * of seconds. * * @var integer * @see $gc_probability * @access public */ var $gc_time = 1; /** * Garbage collection: probability in percent * * TODO: Add an explanation. * * @var integer 0 => never * @see $gc_time * @access public */ var $gc_probability = 1; /** * Storage container object. * * @var object cache_container */ var $container; // // public methods // /** * * @paramstring Name of storage container class * @paramarray Array with storage class dependend config options * @see setOptions() */ function cache($storage_class, $storage_options = "") { $storage_class = "cache_container_" . $storage_class; include_once("Cache/Container/{$storage_class}.php"); $this->container = new $storage_class($storage_options); $this->garbageCollection(); } // end constructor /** * Returns the requested dataset it if exists and is not expired * * @paramstring dataset ID * @return mixed cached data or NULL on failure * @access public */ function get($id) { if ($this->no_cache) return ""; if ($this->isCached($id) && !$this->isExpired($id)) return $this->load($id); return NULL; } // end func get /** * Stores the given data in the cache. * * @paramstring dataset ID used as cache identifier * @parammixed data to cache * @paraminteger lifetime of the cached data in seconds - 0 for endless * @return boolean * @access public */ function save($id, $data, $expires = 0) { if ($this->no_cache) return true; return $this->container->save($id, $data, $expires); } // end func save /** * Loads the given ID from the cache. * * @paramstring dataset ID * @return mixed cached data or NULL on failure * @access public */ function load($id) { if ($this->no_cache) return ""; return $this->container->load($id); } // end func load /** * Removes the specified dataset from the cache. * * @paramstring dataset ID * @return boolean * @access public */ function delete($id) { if
[PHP-CVS] cvs: php4 /pear/Cache/Container cache_container_phplib.php
sbergmann Thu Mar 1 07:42:36 2001 EDT Added files: /php4/pear/Cache/Container cache_container_phplib.php Log: Added Cache Container class for PHPLIB's database abstraction layer DB_Sql. I can't test this right now, but Ulf told me earlier today that it works fine. Index: php4/pear/Cache/Container/cache_container_phplib.php +++ php4/pear/Cache/Container/cache_container_phplib.php http://www.php.net/license/2_02.txt. | // | If you did not receive a copy of the PHP license and are unable to | // | obtain it through the world-wide-web, please send a note to | // | [EMAIL PROTECTED] so we can mail you a copy immediately. | // +--+ // | Authors: Ulf Wendel <[EMAIL PROTECTED]> | // | Sebastian Bergmann <[EMAIL PROTECTED]> | // +--+ // // $Id: cache_container_phplib.php,v 1.1 2001/03/01 15:42:36 sbergmann Exp $ require_once("Cache/Container/cache_container.php"); /* CREATE TABLE cache ( id CHAR(32) NOT NULL DEFAULT '', data TEXT NOT NULL DEFAULT '', expires INT(9) NOT NULL DEFAULT 0, changed TIMESTAMP(14), INDEX (expires), PRIMARY KEY (id) ) */ /** * Stores cache data into a database table. * * @author Ulf Wendel <[EMAIL PROTECTED]>, Sebastian Bergmann <[EMAIL PROTECTED]> * @version $Id: cache_container_phplib.php,v 1.1 2001/03/01 15:42:36 sbergmann Exp $ * @package Cache */ class cache_container_phplib extends cache_container { /** * Name of the DB table to store caching data * * @see cache_container_file::$filename_prefix */ var $cache_table = "cache"; /** * PHPLib object * * @var object PEAR_DB */ var $db; /** * Name of the PHPLib DB class to use * * @var string * @see $db_path, $local_path */ var $db_class = ""; /** * Filename of your local.inc * * If empty, "local.inc" is assumed. * * @var string */ var $local_file = ""; /** * Include path for you local.inc * * HINT: If your're not using prepend.php you must * take care that all classes (files) references by you * local.inc are included automatically. So you might * want to write a new local2.inc that only referrs to * the database class (file) you're using and includes all required files! * * @var string path to your local.inc - make sure to add a trailing slash * @see $local_file */ var $local_path = ""; /** * * @parammixed */ function cache_container_phplib($options = "") { if (is_array($options)) $this->setOptions($options, array("db_class", "db_file", "db_path", "local_file", "local_path")); if (!$this->db_class) return new CacheError("No database class specified.", __FILE__, __LINE__); // include the required files include_once($this->local_path . $this->local_file); // create a db object $this->db = new $this->db_class; } // end constructor function fetch($id) { $query = sprintf("SELECT expires, data FROM %s WHERE id = '%s'", $this->cache_table, $id ); $this->db->query($query); if (!$this->db->Next_Record()) return array(NULL, NULL); return array($this->db->f("expires"), $this->decode($this->db->f("data"))); } // end func fetch function save($id, $data, $expires = 0) { $query = sprintf("REPLACE INTO %s (data, expires, id) VALUES ('%s', %d, '%s')", $this->cache_table, $this->encode($data), $expires, $id ); $this->db->query($query); return (boolean)$this->db->affected_rows(); } // end func save function delete($id) { $query = sprintf("DELETE FROM %s WHERE id = '%s'", $this->cache_table, $id ); $this->db->query($query); return (boolean)$this->db->affected_rows();
[PHP-CVS] cvs: php4 /pear/Cache/Container cache_container_shm.php
sbergmann Thu Mar 1 07:47:01 2001 EDT Added files: /php4/pear/Cache/Container cache_container_shm.php Log: Just hired Björn Schotte to foster the Shared Memory Cache Container implementation. He'll start working on it right away. Index: php4/pear/Cache/Container/cache_container_shm.php +++ php4/pear/Cache/Container/cache_container_shm.php http://www.php.net/license/2_02.txt. | // | If you did not receive a copy of the PHP license and are unable to | // | obtain it through the world-wide-web, please send a note to | // | [EMAIL PROTECTED] so we can mail you a copy immediately. | // +--+ // | Authors: Ulf Wendel <[EMAIL PROTECTED]> | // | Sebastian Bergmann <[EMAIL PROTECTED]> | // | Björn Schotte <[EMAIL PROTECTED]> | // +--+ // // $Id: cache_container_shm.php,v 1.1 2001/03/01 15:47:01 sbergmann Exp $ require_once("Cache/Container/cache_container.php"); /** * Stores cache data into shared memory. * * @author Björn Schotte <[EMAIL PROTECTED]> * @version $Id: cache_container_shm.php,v 1.1 2001/03/01 15:47:01 sbergmann Exp $ * @package Cache */ class cache_container_shm extends cache_container { function cache_container_shm($options = "") { } // end constructor function fetch($id) { } // end func fetch function save($id, $data, $expires = 0) { } // end func save function delete($id) { } // end func delete function flush() { } // end func flush function idExists($id) { } // end func isExists function garbageCollection() { } // end func garbageCollection } // end class cache_container_shm ?> -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-CVS] cvs: php4 /pear/Cache Container.php /pear/Cache/Container file.php phplib.php shm.php
sbergmann Thu Mar 1 09:18:23 2001 EDT Modified files: /php4/pear/CacheContainer.php /php4/pear/Cache/Container file.php phplib.php shm.php Log: Added flushPreload() method. Index: php4/pear/Cache/Container.php diff -u php4/pear/Cache/Container.php:1.1 php4/pear/Cache/Container.php:1.2 --- php4/pear/Cache/Container.php:1.1 Thu Mar 1 08:32:29 2001 +++ php4/pear/Cache/Container.php Thu Mar 1 09:18:22 2001 @@ -16,7 +16,7 @@ // | Sebastian Bergmann <[EMAIL PROTECTED]> | // +--+ // -// $Id: Container.php,v 1.1 2001/03/01 16:32:29 chagenbu Exp $ +// $Id: Container.php,v 1.2 2001/03/01 17:18:22 sbergmann Exp $ /** * Common base class of all cache storage container. @@ -36,7 +36,7 @@ * not recommended! * * @author Ulf Wendel <[EMAIL PROTECTED]> -* @version $Id: Container.php,v 1.1 2001/03/01 16:32:29 chagenbu Exp $ +* @version $Id: Container.php,v 1.2 2001/03/01 17:18:22 sbergmann Exp $ * @package Cache * @access public * @abstract @@ -147,13 +147,8 @@ if ($expired = ($this->expires <= time() || ($max_age && $this->expires <= time() + $max_age)) ) { $this->delete($id); + $this->flushPreload(); - // remove preloaded values - $this->id = ""; - $this->data = ""; - $this->expires = 0; - $this->unknown = true; - } return $expired; @@ -210,6 +205,7 @@ * @abstract */ function save($id, $data, $expire = 0) { +$this->flushPreload($id); return NULL; } // end func save @@ -223,6 +219,7 @@ * @abstract */ function delete($id) { +$this->flushPreload($id); return NULL; } // end func delete @@ -235,6 +232,7 @@ * @abstract */ function flush() { +$this->flushPreload(); return NULL; } // end func flush @@ -257,6 +255,7 @@ * @abstract */ function garbageCollection() { +$this->flushPreload(); } // end func garbageCollection /** @@ -288,6 +287,27 @@ return true; } // end func preload +/** +* Flushes the internal preload buffer. +* +* save(), delete() and flush() must call this method +* to preevent differences between the preloaded values and +* the real cache contents. +* +* @see preload() +*/ +function flushPreload($id = "") { + +if (!$id || $this->id == $id) { +// clear the internal preload values +$this->id = ""; +$this->data = ""; +$this->expires = -1; +$this->unknown = true; +} + +} // end func flushPreload + /** * Imports the requested datafields as object variables if allowed * Index: php4/pear/Cache/Container/file.php diff -u php4/pear/Cache/Container/file.php:1.1 php4/pear/Cache/Container/file.php:1.2 --- php4/pear/Cache/Container/file.php:1.1 Thu Mar 1 08:32:29 2001 +++ php4/pear/Cache/Container/file.php Thu Mar 1 09:18:23 2001 @@ -16,7 +16,7 @@ // | Sebastian Bergmann <[EMAIL PROTECTED]> | // +--+ // -// $Id: file.php,v 1.1 2001/03/01 16:32:29 chagenbu Exp $ +// $Id: file.php,v 1.2 2001/03/01 17:18:23 sbergmann Exp $ require_once 'Cache/Container.php'; @@ -24,7 +24,7 @@ * Stores cache contents in a file. * * @author Ulf Wendel <[EMAIL PROTECTED]> -* @version $Id: file.php,v 1.1 2001/03/01 16:32:29 chagenbu Exp $ +* @version $Id: file.php,v 1.2 2001/03/01 17:18:23 sbergmann Exp $ */ class Cache_Container_file extends Cache_Container { @@ -94,6 +94,8 @@ function save($id, $data, $expire = 0) { +$this->flushPreload($id); + $file = $this->getFilename($id); if (!($fh = @fopen($file, "wb"))) return new CacheError("Can't access '$file' to store cache data. Check access rights and path.", __FILE__, __LINE__); @@ -115,6 +117,8 @@ function delete($id) { +$this->flushPreload($id); + $file = $this->getFilename($id); if (file_exists($file)) { @@ -130,6 +134,8 @@ function flush() { +$this->flushPreload(); + if (!($dh = opendir($this->cache_dir))) return new CacheError("Can't access the cache directory '$this->cache_dir'. Check access rights and path", __FILE__, __LINE__); @@ -167,6 +173,8 @@ */ function garbageCollection() { +$this->
[PHP-CVS] cvs: php4 /pear Makefile.in /pear/Cache Graphics.php Output.php
sbergmann Thu Mar 1 11:22:26 2001 EDT Added files: /php4/pear/CacheGraphics.php Output.php Modified files: /php4/pear Makefile.in Log: Added Graphics and Output Cache. Index: php4/pear/Makefile.in diff -u php4/pear/Makefile.in:1.70 php4/pear/Makefile.in:1.71 --- php4/pear/Makefile.in:1.70 Thu Mar 1 09:02:05 2001 +++ php4/pear/Makefile.in Thu Mar 1 11:22:25 2001 @@ -36,6 +36,8 @@ Benchmark/Timer.php \ Cache.php \ Cache/Container.php \ + Cache/Graphics.php \ + Cache/Output.php \ Cache/Container/db.php \ Cache/Container/file.php \ Cache/Container/phplib.php \ Index: php4/pear/Cache/Graphics.php +++ php4/pear/Cache/Graphics.php http://www.php.net/license/2_02.txt. | // | If you did not receive a copy of the PHP license and are unable to | // | obtain it through the world-wide-web, please send a note to | // | [EMAIL PROTECTED] so we can mail you a copy immediately. | // +--+ // | Authors: Ulf Wendel <[EMAIL PROTECTED]> | // | Sebastian Bergmann <[EMAIL PROTECTED]> | // +--+ // // $Id: Graphics.php,v 1.1 2001/03/01 19:22:25 sbergmann Exp $ require_once'Cache.php'; /** * Graphics disk cache. * * The usual way to create images is to pass some arguments that describe the image * to a script that dynamically creates an image. For every image of a page * a new PHP interpreter gets started. This is a good way to kill your webserver. * * When dealing with dynamically generated images you should not call another script * to generate the images but generate the images by the script that produces the page * that contains the images. This is a major improvement but it's only half the way. * * There's no need to rerender an image on every request. A simple disk cache can reduce * the computation time dramatically. This is what the class graphics_cache is for. * * Usage: * * // create an instance of the graphics cache * $cache = new graphics_cache; * * $img = ImageCreate(...); * * // compute an ID for your image based on typical parameters * $id = m5d( $size, $colors, $label); * * // check if it's cached * if (!($link = $cache->getImageLink($id, "gif"))) { * * // hmmm, it's not cached, create it * ... * // cacheImageLink() and cacheImage() make the ImageGIF() call! * // cacheImage() returns the value of ImageGIF() [etc.], cacheImageLink() returns a URL * $link = $cache->cacheImageLink($id, $img, "gif"); * * } * * // Ok, let's build the ImageLink * $size = getImageSize($link[0]); * printf('', $link[1], $size[3]); * * // for cacheImage(): * // header("Content-type: image/gif"); print $cache->cacheImage($id, $img, "gif"); * * * The class requires PHP 4.0.2+ [ImageType()]. Note that cacheImage() works with * the output buffer. Modify it if required! * * @author Ulf Wendel <[EMAIL PROTECTED]> * @version $Id: Graphics.php,v 1.1 2001/03/01 19:22:25 sbergmann Exp $ */ class graphics_cache extends cache { /** * Cache URL prefix. * * Make sure that the cache URL prefix points to the $cache_dir, otherwise * your links will be broken. Use setCacheURL to specify the cache_url and * setCacheDir() for the cache_dir. * * @var string * @see setCacheURL(), setCacheDir() */ var $cache_url = ""; /** * Directory where cached files get stored. * s * Make sure that the cache_dir is writable and offers enough space. Check * also if your cache_url points to the directory. Use setCacheDir() to set * the variable. * * @var string * @see setCacheDir(), setCacheURL() */ var $cache_dir = ""; /** * Nameprefix of cached files. * * Per default the prefix "graphics_" gets used. You might use this * for versioning or to ease (manual) clean ups. * * @var string */ var $cache_file_prefix = "graphics_"; /** * Mapping from supported image type to a ImageType() constant. * * Referr to the PHP manual for more informations on ImageType() * * @var array * @link http://www.php.net/ImageType */ var $imagetypes = array( "gif" => IMG_GIF, "jpg" => IMG_JPG, "png" => IMG_PNG, "wbmp" => IMG_WBMP ); /** * TODO: add docs */ function graphics_cache() { $this->cache("cache_
[PHP-CVS] cvs: php4 /pear/Cache Graphics.php Output.php
sbergmann Thu Mar 1 11:38:04 2001 EDT Modified files: /php4/pear/CacheGraphics.php Output.php Log: I have nothing to do with this code :-) Index: php4/pear/Cache/Graphics.php diff -u php4/pear/Cache/Graphics.php:1.1 php4/pear/Cache/Graphics.php:1.2 --- php4/pear/Cache/Graphics.php:1.1Thu Mar 1 11:22:25 2001 +++ php4/pear/Cache/Graphics.phpThu Mar 1 11:38:04 2001 @@ -13,10 +13,9 @@ // | [EMAIL PROTECTED] so we can mail you a copy immediately. | // +--+ // | Authors: Ulf Wendel <[EMAIL PROTECTED]> | -// | Sebastian Bergmann <[EMAIL PROTECTED]> | // +--+ // -// $Id: Graphics.php,v 1.1 2001/03/01 19:22:25 sbergmann Exp $ +// $Id: Graphics.php,v 1.2 2001/03/01 19:38:04 sbergmann Exp $ require_once'Cache.php'; @@ -67,7 +66,7 @@ * the output buffer. Modify it if required! * * @author Ulf Wendel <[EMAIL PROTECTED]> -* @version $Id: Graphics.php,v 1.1 2001/03/01 19:22:25 sbergmann Exp $ +* @version $Id: Graphics.php,v 1.2 2001/03/01 19:38:04 sbergmann Exp $ */ class graphics_cache extends cache { Index: php4/pear/Cache/Output.php diff -u php4/pear/Cache/Output.php:1.1 php4/pear/Cache/Output.php:1.2 --- php4/pear/Cache/Output.php:1.1 Thu Mar 1 11:22:25 2001 +++ php4/pear/Cache/Output.php Thu Mar 1 11:38:04 2001 @@ -13,12 +13,11 @@ // | [EMAIL PROTECTED] so we can mail you a copy immediately. | // +--+ // | Authors: Ulf Wendel <[EMAIL PROTECTED]> | -// | Sebastian Bergmann <[EMAIL PROTECTED]> | // | Christian Stocker <[EMAIL PROTECTED]> | // | Vinai Kopp <[EMAIL PROTECTED]> | // +--+ // -// $Id: Output.php,v 1.1 2001/03/01 19:22:25 sbergmann Exp $ +// $Id: Output.php,v 1.2 2001/03/01 19:38:04 sbergmann Exp $ require_once'Cache.php'; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-CVS] cvs: php4 / NEWS
sbergmann Thu Mar 1 11:42:07 2001 EDT Modified files: /php4 NEWS Log: Added note about PEAR/Cache. Index: php4/NEWS diff -u php4/NEWS:1.601 php4/NEWS:1.602 --- php4/NEWS:1.601 Thu Mar 1 05:44:04 2001 +++ php4/NEWS Thu Mar 1 11:42:07 2001 @@ -2,6 +2,7 @@ ||| ?? ??? 200?, Version 4.0.5 +- Added PEAR/Cache as a generic Caching System. (Sebastian, PEAR/Cache) - IMAP quota support (imap_set_quota, imap_get_quota) enabled/added via c-client2000 (kalowsky) - Upgraded PCRE to version 3.4. (Andrei) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-CVS] cvs: php4 /pear/Cache/Container db.php
sbergmann Thu Mar 1 11:51:49 2001 EDT Modified files: /php4/pear/Cache/Container db.php Log: Added Chuck as author. Index: php4/pear/Cache/Container/db.php diff -u php4/pear/Cache/Container/db.php:1.1 php4/pear/Cache/Container/db.php:1.2 --- php4/pear/Cache/Container/db.php:1.1Thu Mar 1 09:22:59 2001 +++ php4/pear/Cache/Container/db.phpThu Mar 1 11:51:49 2001 @@ -14,9 +14,10 @@ // +--+ // | Authors: Ulf Wendel <[EMAIL PROTECTED]> | // | Sebastian Bergmann <[EMAIL PROTECTED]> | +// | Chuck Hagenbuch <[EMAIL PROTECTED]> | // +--+ // -// $Id: db.php,v 1.1 2001/03/01 17:22:59 chagenbu Exp $ +// $Id: db.php,v 1.2 2001/03/01 19:51:49 sbergmann Exp $ require_once 'DB.php'; require_once 'Cache/Container.php'; @@ -34,7 +35,7 @@ * ) * * @author Sebastian Bergmann <[EMAIL PROTECTED]> - * @version $Id: db.php,v 1.1 2001/03/01 17:22:59 chagenbu Exp $ + * @version $Id: db.php,v 1.2 2001/03/01 19:51:49 sbergmann Exp $ * @package Cache */ class Cache_Container_db extends Cache_Container { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] [Fwd: Problem in renaming file]
Carrie KL Tam wrote: > Hi Sebastian, > > Don't understand why the following code keep telling me the error "Rename > failed (Invalid argument)": > $forig = 'd:/pict/orig/YI3 ?a.3WOHF'; > $fcopy = 'd:/pict/copy/test1'; > if (rename($sourcepath,$ftppath)) > { > echo "pass 1\n"; > } > ?> > > Pls advise > > Cheers, > Carrie Tam > [EMAIL PROTECTED] -- sebastian bergmann e-mail : [EMAIL PROTECTED] homepage : http://www.sebastian-bergmann.de make a gift : http://wishlist.sebastian-bergmann.de measure the usability of your web application -> http://phpOpenTracker.de -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-CVS] cvs: php4 /pear Makefile.in /pear/Cache Function.php
sbergmann Thu Mar 1 23:52:56 2001 EDT Added files: /php4/pear/CacheFunction.php Modified files: /php4/pear Makefile.in Log: Added experimental version of Cache_Function module. Index: php4/pear/Makefile.in diff -u php4/pear/Makefile.in:1.71 php4/pear/Makefile.in:1.72 --- php4/pear/Makefile.in:1.71 Thu Mar 1 11:22:25 2001 +++ php4/pear/Makefile.in Thu Mar 1 23:52:56 2001 @@ -36,6 +36,7 @@ Benchmark/Timer.php \ Cache.php \ Cache/Container.php \ + Cache/Function.php \ Cache/Graphics.php \ Cache/Output.php \ Cache/Container/db.php \ Index: php4/pear/Cache/Function.php +++ php4/pear/Cache/Function.php http://www.php.net/license/2_02.txt. | // | If you did not receive a copy of the PHP license and are unable to | // | obtain it through the world-wide-web, please send a note to | // | [EMAIL PROTECTED] so we can mail you a copy immediately. | // +--+ // | Authors: Sebastian Bergmann <[EMAIL PROTECTED]> | // +--+ // // $Id: Function.php,v 1.1 2001/03/02 07:52:56 sbergmann Exp $ require_once 'Cache.php'; function cached_function_call() { static $cache; // create Cache object, if needed if (!is_object($cache)) { $cache = new Cache(CACHE_CONTAINER, CACHE_CONTAINER_OPTIONS) } // get arguments $arguments = func_get_args(); // generate cache id $id = md5(serialize($arguments)); // query cache $cached_object = $cache->get($id); // cache hit if ($cached_object != NULL) { $output = $cached_object[0]; $result = $cached_object[1]; } // cache miss else { $function_name = array_shift($arguments); // call function, save output and result ob_start(); $result = call_user_func_array($function_name, $arguments); $output = ob_get_contents(); ob_end_clean(); // store output and result of function call in cache $cache->save($id, array($output, $result)); } print $output; return $result; } ?> -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-CVS] cvs: php4 /pear/Cache Function.php
sbergmann Fri Mar 2 00:11:18 2001 EDT Modified files: /php4/pear/CacheFunction.php Log: Fixed typo. Index: php4/pear/Cache/Function.php diff -u php4/pear/Cache/Function.php:1.1 php4/pear/Cache/Function.php:1.2 --- php4/pear/Cache/Function.php:1.1Thu Mar 1 23:52:56 2001 +++ php4/pear/Cache/Function.phpFri Mar 2 00:11:17 2001 @@ -15,7 +15,7 @@ // | Authors: Sebastian Bergmann <[EMAIL PROTECTED]> | // +--+ // -// $Id: Function.php,v 1.1 2001/03/02 07:52:56 sbergmann Exp $ +// $Id: Function.php,v 1.2 2001/03/02 08:11:17 sbergmann Exp $ require_once 'Cache.php'; @@ -26,7 +26,7 @@ // create Cache object, if needed if (!is_object($cache)) { -$cache = new Cache(CACHE_CONTAINER, CACHE_CONTAINER_OPTIONS) +$cache = new Cache(CACHE_CONTAINER, CACHE_CONTAINER_OPTIONS); } // get arguments -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-CVS] cvs: php4 /pear/Cache Function.php
sbergmann Fri Mar 2 00:18:35 2001 EDT Modified files: /php4/pear/CacheFunction.php Log: Make it work, hopefully. Index: php4/pear/Cache/Function.php diff -u php4/pear/Cache/Function.php:1.2 php4/pear/Cache/Function.php:1.3 --- php4/pear/Cache/Function.php:1.2Fri Mar 2 00:11:17 2001 +++ php4/pear/Cache/Function.phpFri Mar 2 00:18:35 2001 @@ -15,18 +15,19 @@ // | Authors: Sebastian Bergmann <[EMAIL PROTECTED]> | // +--+ // -// $Id: Function.php,v 1.2 2001/03/02 08:11:17 sbergmann Exp $ +// $Id: Function.php,v 1.3 2001/03/02 08:18:35 sbergmann Exp $ require_once 'Cache.php'; function cached_function_call() { +global $FUNCTION_CACHE_CONTAINER, $FUNCTION_CACHE_CONTAINER_OPTIONS; static $cache; // create Cache object, if needed if (!is_object($cache)) { -$cache = new Cache(CACHE_CONTAINER, CACHE_CONTAINER_OPTIONS); +$cache = new Cache($FUNCTION_CACHE_CONTAINER, +$FUNCTION_CACHE_CONTAINER_OPTIONS); } // get arguments -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-CVS] cvs: php4 /pear/Cache Function.php
sbergmann Fri Mar 2 00:25:13 2001 EDT Modified files: /php4/pear/CacheFunction.php Log: Added PHPDoc doccomments. Index: php4/pear/Cache/Function.php diff -u php4/pear/Cache/Function.php:1.3 php4/pear/Cache/Function.php:1.4 --- php4/pear/Cache/Function.php:1.3Fri Mar 2 00:18:35 2001 +++ php4/pear/Cache/Function.phpFri Mar 2 00:25:12 2001 @@ -15,9 +15,49 @@ // | Authors: Sebastian Bergmann <[EMAIL PROTECTED]> | // +--+ // -// $Id: Function.php,v 1.3 2001/03/02 08:18:35 sbergmann Exp $ +// $Id: Function.php,v 1.4 2001/03/02 08:25:12 sbergmann Exp $ require_once 'Cache.php'; + +/** +* Function_Cache +* +* Purpose: +* +* Caching the result and output of functions. +* +* Example: +* +* require_once "Cache/Function.php"; +* +* function foo($string) +* { +* print $string . ""; +* for($i=1;$i<1000;$i++){} +* return strrev($string); +* } +* +* print cached_function_call("foo", "test"); +* +* Note: +* +* You cannot cache every function. You should only cache +* functions that only depend on their arguments and don't use +* global or static variables, don't rely on database queries or +* files, and so on. +* +* @author Sebastian Bergmann <[EMAIL PROTECTED]> +* @module Function_Cache +* @version $Revision: 1.4 $ +* @access public +*/ + +/** +* Calls a cacheable function or method. +* +* @return mixed $result +* @access public +*/ function cached_function_call() { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-CVS] cvs: php4 /pear/Cache Function.php
sbergmann Fri Mar 2 00:27:43 2001 EDT Modified files: /php4/pear/CacheFunction.php Log: Fixed example. Index: php4/pear/Cache/Function.php diff -u php4/pear/Cache/Function.php:1.4 php4/pear/Cache/Function.php:1.5 --- php4/pear/Cache/Function.php:1.4Fri Mar 2 00:25:12 2001 +++ php4/pear/Cache/Function.phpFri Mar 2 00:27:43 2001 @@ -15,7 +15,7 @@ // | Authors: Sebastian Bergmann <[EMAIL PROTECTED]> | // +--+ // -// $Id: Function.php,v 1.4 2001/03/02 08:25:12 sbergmann Exp $ +// $Id: Function.php,v 1.5 2001/03/02 08:27:43 sbergmann Exp $ require_once 'Cache.php'; @@ -30,11 +30,16 @@ * * require_once "Cache/Function.php"; * +* $FUNCTION_CACHE_CONTAINER = "file"; +* $FUNCTION_CACHE_CONTAINER_OPTIONS = array( +* "cache_dir" => "/tmp/", +* "filename_prefix" => "cache_"); +* * function foo($string) * { -* print $string . ""; -* for($i=1;$i<1000;$i++){} -* return strrev($string); +* print $string . ""; +* for($i=1;$i<1000;$i++){} +* return strrev($string); * } * * print cached_function_call("foo", "test"); @@ -48,7 +53,7 @@ * * @author Sebastian Bergmann <[EMAIL PROTECTED]> * @module Function_Cache -* @version $Revision: 1.4 $ +* @version $Revision: 1.5 $ * @access public */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-CVS] cvs: php4 /pear Cache.php
sbergmann Fri Mar 2 02:29:35 2001 EDT Modified files: /php4/pear Cache.php Log: Whitespace only. Index: php4/pear/Cache.php diff -u php4/pear/Cache.php:1.1 php4/pear/Cache.php:1.2 --- php4/pear/Cache.php:1.1 Thu Mar 1 08:32:28 2001 +++ php4/pear/Cache.php Fri Mar 2 02:29:34 2001 @@ -16,7 +16,7 @@ // | Sebastian Bergmann <[EMAIL PROTECTED]> | // +--+ // -// $Id: Cache.php,v 1.1 2001/03/01 16:32:28 chagenbu Exp $ +// $Id: Cache.php,v 1.2 2001/03/02 10:29:34 sbergmann Exp $ /** * Cache is a base class for cache implementations. @@ -24,7 +24,7 @@ * TODO: Simple usage example goes here. * * @author Ulf Wendel <[EMAIL PROTECTED]> -* @version $Id: Cache.php,v 1.1 2001/03/01 16:32:28 chagenbu Exp $ +* @version $Id: Cache.php,v 1.2 2001/03/02 10:29:34 sbergmann Exp $ * @package Cache * @access public */ @@ -85,7 +85,7 @@ { $storage_driver = strtolower($storage_driver); $storage_class = 'Cache_Container_' . $storage_driver; - $storage_classfile = 'Cache/Container/' . $storage_driver . '.php'; +$storage_classfile = 'Cache/Container/' . $storage_driver . '.php'; if (@include_once $storage_classfile) { $this->container = new $storage_class($storage_options); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-CVS] cvs: php4 /pear/Cache Output.php
sbergmann Fri Mar 2 02:39:37 2001 EDT Modified files: /php4/pear/CacheOutput.php Log: Fixed typo. Index: php4/pear/Cache/Output.php diff -u php4/pear/Cache/Output.php:1.2 php4/pear/Cache/Output.php:1.3 --- php4/pear/Cache/Output.php:1.2 Thu Mar 1 11:38:04 2001 +++ php4/pear/Cache/Output.php Fri Mar 2 02:39:36 2001 @@ -17,7 +17,7 @@ // | Vinai Kopp <[EMAIL PROTECTED]> | // +--+ // -// $Id: Output.php,v 1.2 2001/03/01 19:38:04 sbergmann Exp $ +// $Id: Output.php,v 1.3 2001/03/02 10:39:36 sbergmann Exp $ require_once'Cache.php'; @@ -124,7 +124,7 @@ */ function end($expire = 0) { -$content = ob_get_content(); +$content = ob_get_contents(); ob_end_clean(); // store in the cache -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-CVS] cvs: php4 /pear/Cache Graphics.php Output.php
sbergmann Fri Mar 2 08:16:00 2001 EDT Modified files: /php4/pear/CacheGraphics.php Output.php Log: Fixed small glitches. Index: php4/pear/Cache/Graphics.php diff -u php4/pear/Cache/Graphics.php:1.2 php4/pear/Cache/Graphics.php:1.3 --- php4/pear/Cache/Graphics.php:1.2Thu Mar 1 11:38:04 2001 +++ php4/pear/Cache/Graphics.phpFri Mar 2 08:16:00 2001 @@ -15,9 +15,9 @@ // | Authors: Ulf Wendel <[EMAIL PROTECTED]> | // +--+ // -// $Id: Graphics.php,v 1.2 2001/03/01 19:38:04 sbergmann Exp $ +// $Id: Graphics.php,v 1.3 2001/03/02 16:16:00 sbergmann Exp $ -require_once'Cache.php'; +require_once 'Cache.php'; /** * Graphics disk cache. @@ -66,7 +66,7 @@ * the output buffer. Modify it if required! * * @author Ulf Wendel <[EMAIL PROTECTED]> -* @version $Id: Graphics.php,v 1.2 2001/03/01 19:38:04 sbergmann Exp $ +* @version $Id: Graphics.php,v 1.3 2001/03/02 16:16:00 sbergmann Exp $ */ class graphics_cache extends cache { Index: php4/pear/Cache/Output.php diff -u php4/pear/Cache/Output.php:1.6 php4/pear/Cache/Output.php:1.7 --- php4/pear/Cache/Output.php:1.6 Fri Mar 2 07:18:39 2001 +++ php4/pear/Cache/Output.php Fri Mar 2 08:16:00 2001 @@ -17,9 +17,9 @@ // | Vinai Kopp <[EMAIL PROTECTED]> | // +--+ // -// $Id: Output.php,v 1.6 2001/03/02 15:18:39 uw Exp $ +// $Id: Output.php,v 1.7 2001/03/02 16:16:00 sbergmann Exp $ -require_once 'Cache/Cache.php'; +require_once 'Cache.php'; /** * Class to cache the output of a script using the output buffering functions -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-CVS] cvs: php4 /pear/Benchmark Timer.php
sbergmann Fri Mar 2 22:35:25 2001 EDT Modified files: /php4/pear/BenchmarkTimer.php Log: Whitespace only. Index: php4/pear/Benchmark/Timer.php diff -u php4/pear/Benchmark/Timer.php:1.7 php4/pear/Benchmark/Timer.php:1.8 --- php4/pear/Benchmark/Timer.php:1.7 Tue Jan 9 17:01:53 2001 +++ php4/pear/Benchmark/Timer.php Fri Mar 2 22:35:25 2001 @@ -16,7 +16,7 @@ // | Authors: Sebastian Bergmann <[EMAIL PROTECTED]> | // +--+ // -// $Id: Timer.php,v 1.7 2001/01/10 01:01:53 ssb Exp $ +// $Id: Timer.php,v 1.8 2001/03/03 06:35:25 sbergmann Exp $ // /** @@ -37,12 +37,11 @@ * $profiling = $timer->getProfiling(); * * @author Sebastian Bergmann <[EMAIL PROTECTED]> - * @version $Revision: 1.7 $ + * @version $Revision: 1.8 $ * @access public */ class Benchmark_Timer { - /** * Contains the markers * @@ -50,16 +49,7 @@ * @access public */ var $markers = array(); - - -/** - * Constructor - */ -function Benchmark_Timer() -{ -} - - + /** * Set "Start" marker. * @@ -70,7 +60,7 @@ { $this->setMarker('Start'); } - + /** * Set "Stop" marker. * @@ -81,7 +71,7 @@ { $this->setMarker('Stop'); } - + /** * Set marker. * @@ -94,7 +84,7 @@ $microtime = explode(' ', microtime()); $this->markers[$name] = $microtime[1] . substr($microtime[0], 1); } - + /** * Returns the time elapsed betweens two markers. * @@ -111,7 +101,7 @@ return $this->markers[$end] - $this->markers[$start]; } } - + /** * Returns profiling information. * @@ -150,9 +140,8 @@ $temp = $time; $i++; } - + return $result; } - } ?> -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-CVS] cvs: php4 /pear/Benchmark Iterate.php
sbergmann Fri Mar 2 22:36:45 2001 EDT Modified files: /php4/pear/BenchmarkIterate.php Log: Use call_user_func_array() in order to profile functions that take arguments. Index: php4/pear/Benchmark/Iterate.php diff -u php4/pear/Benchmark/Iterate.php:1.5 php4/pear/Benchmark/Iterate.php:1.6 --- php4/pear/Benchmark/Iterate.php:1.5 Fri Mar 2 10:23:59 2001 +++ php4/pear/Benchmark/Iterate.php Fri Mar 2 22:36:44 2001 @@ -16,7 +16,7 @@ // | Authors: Sebastian Bergmann <[EMAIL PROTECTED]> | // +--+ // -// $Id: Iterate.php,v 1.5 2001/03/02 18:23:59 mj Exp $ +// $Id: Iterate.php,v 1.6 2001/03/03 06:36:44 sbergmann Exp $ // require_once 'Benchmark/Timer.php'; @@ -30,14 +30,19 @@ * * Example: * +* require_once "Benchmark/Iterate.php"; * $benchmark = new Benchmark_Iterate; * -* $benchmark->run('my_function', 100); +* function foo($string) +* { +* print $string.""; +* } * +* $benchmark->run(100, 'foo', 'test'); * $result = $benchmark->get(); * * @author Sebastian Bergmann <[EMAIL PROTECTED]> -* @version $Revision: 1.5 $ +* @version $Revision: 1.6 $ * @access public */ @@ -48,24 +53,27 @@ /** * Benchmarks a function. * -* @param string $function name of the function to be benchmarked -* @param int $iterations number of iterations (default: 100) * @access public */ -function run($function, $iterations = 100) +function run() { +// get arguments +$arguments = func_get_args(); +$iterations = array_shift($arguments); +$function_name = array_shift($arguments); + // main loop -for($i = 1; $i <= $iterations; $i++) +for ($i = 1; $i <= $iterations; $i++) { // set 'start' marker for current iteration -$this->set_marker('start_'.$i); +$this->setMarker('start_'.$i); // call function to be benchmarked -call_user_func($function); +call_user_func_array($function_name, $arguments); // set 'end' marker for current iteration -$this->set_marker('end_'.$i); +$this->setMarker('end_'.$i); } } @@ -94,10 +102,10 @@ $iterations = count($this->markers)/2; // loop through iterations -for($i = 1; $i <= $iterations; $i++) +for ($i = 1; $i <= $iterations; $i++) { // get elapsed time for current iteration -$time = $this->time_elapsed('start_'.$i , 'end_'.$i); +$time = $this->timeElapsed('start_'.$i , 'end_'.$i); // sum up total time spent if (extension_loaded('bcmath')) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-CVS] cvs: php4 / php.ini-dist
sbergmann Fri Mar 2 22:55:06 2001 EDT Modified files: /php4 php.ini-dist Log: Added some more Win32 extension DLLs. Index: php4/php.ini-dist diff -u php4/php.ini-dist:1.68 php4/php.ini-dist:1.69 --- php4/php.ini-dist:1.68 Thu Feb 1 07:41:02 2001 +++ php4/php.ini-dist Fri Mar 2 22:55:06 2001 @@ -1,5 +1,5 @@ [PHP] -; $Id: php.ini-dist,v 1.68 2001/02/01 15:41:02 cmv Exp $ +; $Id: php.ini-dist,v 1.69 2001/03/03 06:55:06 sbergmann Exp $ ;;; ; About this file ; @@ -380,13 +380,18 @@ ;extension=php_filepro.dll ;extension=php_gd.dll ;extension=php_gettext.dll +;extension=php_gtk.dll +;extension=php_hyperwave.dll +;extension=php_iconv.dll ;extension=php_ifx.dll ;extension=php_iisfunc.dll ;extension=php_imap.dll +;extension=php_ingres.dll ;extension=php_interbase.dll ;extension=php_java.dll ;extension=php_ldap.dll ;extension=php_mhash.dll +;extension=php_ming.dll ;extension=php_mssql.dll ;extension=php_oci8.dll ;extension=php_openssl.dll -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-CVS] cvs: php4 / php.ini-dist
sbergmann Fri Mar 2 23:31:43 2001 EDT Modified files: /php4 php.ini-dist Log: Whitespace Fixes. Added another Win32 extension DLL. Removed configuration for non-existent debugger. Index: php4/php.ini-dist diff -u php4/php.ini-dist:1.69 php4/php.ini-dist:1.70 --- php4/php.ini-dist:1.69 Fri Mar 2 22:55:06 2001 +++ php4/php.ini-dist Fri Mar 2 23:31:43 2001 @@ -1,5 +1,5 @@ [PHP] -; $Id: php.ini-dist,v 1.69 2001/03/03 06:55:06 sbergmann Exp $ +; $Id: php.ini-dist,v 1.70 2001/03/03 07:31:43 sbergmann Exp $ ;;; ; About this file ; @@ -26,10 +26,10 @@ ; (e.g. E_ALL & ~E_NOTICE), or a quoted string ("foo"). ; ; Expressions in the INI file are limited to bitwise operators and parentheses: -; |bitwise OR -; &bitwise AND -; ~bitwise NOT -; !boolean NOT +; |bitwise OR +; &bitwise AND +; ~bitwise NOT +; !boolean NOT ; ; Boolean flags can be turned on using the values 1, On, True or Yes. ; They can be turned off using the values 0, Off, False or No. @@ -37,9 +37,9 @@ ; An empty string can be denoted by simply not writing anything after the equal ; sign, or by using the None keyword: ; -; foo = ; sets foo to an empty string -; foo = none ; sets foo to an empty string -; foo = "none"; sets foo to the string 'none' +; foo = ; sets foo to an empty string +; foo = none; sets foo to an empty string +; foo = "none" ; sets foo to the string 'none' ; ; If you use constants in your value, and these constants belong to a ; dynamically loaded extension (either a PHP extension or a Zend extension), @@ -64,7 +64,7 @@ asp_tags = Off ; The number of significant digits displayed in floating point numbers. -precision = 14 +precision= 14 ; Enforce year 2000 compliance (will cause problems with non-compliant browsers) y2k_compliance = Off @@ -130,12 +130,12 @@ ; Colors for Syntax Highlighting mode. Anything that's acceptable in ; would work. -highlight.string = #CC -highlight.comment = #FF9900 -highlight.keyword = #006600 -highlight.bg = #FF -highlight.default = #CC -highlight.html = #00 +highlight.string = #CC +highlight.comment = #FF9900 +highlight.keyword = #006600 +highlight.bg= #FF +highlight.default = #CC +highlight.html= #00 ; @@ -153,7 +153,7 @@ ;;; max_execution_time = 30 ; Maximum execution time of each script, in seconds -memory_limit = 8M ; Maximum amount of memory a script may consume (8MB) +memory_limit = 8M ; Maximum amount of memory a script may consume (8MB) ;; @@ -192,7 +192,7 @@ ; ; - Show all errors except for notices ; -error_reporting= E_ALL & ~E_NOTICE +error_reporting = E_ALL & ~E_NOTICE ; Print out errors (as a part of the output). For production web sites, ; you're strongly encouraged to turn this feature off, and use error logging @@ -275,7 +275,7 @@ magic_quotes_gpc = On ; Magic quotes for runtime-generated data, e.g. data from SQL, from exec(), etc. -magic_quotes_runtime = Off +magic_quotes_runtime = Off ; Use Sybase-style magic quotes (escape ' with '' instead of \'). magic_quotes_sybase = Off @@ -326,7 +326,7 @@ ; Temporary directory for HTTP uploaded files (will use system default if not ; specified). -;upload_tmp_dir= +;upload_tmp_dir = ; Maximum allowed size for uploaded files. upload_max_filesize = 2M @@ -390,6 +390,7 @@ ;extension=php_interbase.dll ;extension=php_java.dll ;extension=php_ldap.dll +;extension=php_mcrypt.dll ;extension=php_mhash.dll ;extension=php_ming.dll ;extension=php_mssql.dll @@ -414,7 +415,7 @@ ; Whether or not to define the various syslog variables (e.g. $LOG_PID, ; $LOG_CRON, etc.). Turning it off is a good idea performance-wise. In ; runtime, you can define these variables by calling define_syslog_variables(). -define_syslog_variables= Off +define_syslog_variables = Off [mail function] ; For Win32 only. @@ -426,11 +427,6 @@ ; For Unix only. You may supply arguments as well (default: 'sendmail -t -i'). ;sendmail_path = -[Debugger] -debugger.host = localhost -debugger.port = 7869 -debugger.enabled = False - [Logging] ; These configuration directives are used by the example logging mechanism. ; See examples/README.logging for more explanation. @@ -447,9 +443,9 @@ sql.safe_mode = Off [ODBC] -;odbc.default_db = Not yet implemented -;odbc.default_user = Not yet implemented -;odbc.default_pw = Not yet implemented +;odbc.default_db= Not yet implemented +;odbc.default_user = Not y
[PHP-CVS] cvs: php4 / php.ini-dist
sbergmann Fri Mar 2 23:37:18 2001 EDT Modified files: /php4 php.ini-dist Log: Whitespace only. Index: php4/php.ini-dist diff -u php4/php.ini-dist:1.70 php4/php.ini-dist:1.71 --- php4/php.ini-dist:1.70 Fri Mar 2 23:31:43 2001 +++ php4/php.ini-dist Fri Mar 2 23:37:18 2001 @@ -1,5 +1,5 @@ [PHP] -; $Id: php.ini-dist,v 1.70 2001/03/03 07:31:43 sbergmann Exp $ +; $Id: php.ini-dist,v 1.71 2001/03/03 07:37:18 sbergmann Exp $ ;;; ; About this file ; @@ -130,12 +130,12 @@ ; Colors for Syntax Highlighting mode. Anything that's acceptable in ; would work. -highlight.string = #CC -highlight.comment = #FF9900 -highlight.keyword = #006600 -highlight.bg= #FF -highlight.default = #CC -highlight.html= #00 +highlight.string = #CC +highlight.comment = #FF9900 +highlight.keyword = #006600 +highlight.bg = #FF +highlight.default = #CC +highlight.html= #00 ; @@ -326,7 +326,7 @@ ; Temporary directory for HTTP uploaded files (will use system default if not ; specified). -;upload_tmp_dir = +;upload_tmp_dir = ; Maximum allowed size for uploaded files. upload_max_filesize = 2M @@ -531,7 +531,7 @@ ; Maximum number of links (persistent + non-persistent). -1 means no limit. sybase.max_links = -1 -;sybase.interface_file = "/usr/sybase/interfaces" +;sybase.interface_file = "/usr/sybase/interfaces" ; Minimum error severity to display. sybase.min_error_severity = 10 @@ -567,7 +567,7 @@ bcmath.scale = 0 [browscap] -;browscap = extra/browscap.ini +;browscap = extra/browscap.ini [Informix] ; Default host for ifx_connect() (doesn't apply in safe mode). -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-CVS] cvs: php4 / php.ini-dist
sbergmann Sat Mar 3 05:10:13 2001 EDT Modified files: /php4 php.ini-dist Log: Jan says: 'Do not load php_gtk.dll through php.ini, only use dl(), otherwise it crashes (atleast on Win32).' Me thinks: 'There should be no crash, but a warning. Anyways, remove it from php.ini-dist, so others do not run into this... :-) Index: php4/php.ini-dist diff -u php4/php.ini-dist:1.71 php4/php.ini-dist:1.72 --- php4/php.ini-dist:1.71 Fri Mar 2 23:37:18 2001 +++ php4/php.ini-dist Sat Mar 3 05:10:13 2001 @@ -1,5 +1,5 @@ [PHP] -; $Id: php.ini-dist,v 1.71 2001/03/03 07:37:18 sbergmann Exp $ +; $Id: php.ini-dist,v 1.72 2001/03/03 13:10:13 sbergmann Exp $ ;;; ; About this file ; @@ -380,7 +380,6 @@ ;extension=php_filepro.dll ;extension=php_gd.dll ;extension=php_gettext.dll -;extension=php_gtk.dll ;extension=php_hyperwave.dll ;extension=php_iconv.dll ;extension=php_ifx.dll -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-CVS] cvs: php4 /ext/standard info.c
Zeev Suraski wrote: > zeevSun Mar 4 07:49:38 2001 EDT > > Modified files: > /php4/ext/standard info.c > Log: > Fix phpinfo() bug that crept in Now I'm getting these warnings: info.c D:\Programme\MS Visual Studio\Projekte\php\php4\ext\standard\info.c(92) : warning C4047: 'function' : Anzahl der Dereferenzierungen bei 'const char *' und 'char ** ' unterschiedlich D:\Programme\MS Visual Studio\Projekte\php\php4\ext\standard\info.c(92) : warning C4024: 'php_body_write' : Unterschiedliche Typen fuer formalen und uebergebenen Parameter 1 D:\Programme\MS Visual Studio\Projekte\php\php4\ext\standard\info.c(92) : warning C4047: 'function' : Anzahl der Dereferenzierungen bei 'const char *' und 'char ** ' unterschiedlich D:\Programme\MS Visual Studio\Projekte\php\php4\ext\standard\info.c(92) : warning C4024: 'strlen' : Unterschiedliche Typen fuer formalen und uebergebenen Parameter 1 But the crash is gone :-) -- sebastian bergmann e-mail : [EMAIL PROTECTED] homepage : http://www.sebastian-bergmann.de make a gift : http://wishlist.sebastian-bergmann.de measure the usability of your web application -> http://phpOpenTracker.de -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-CVS] cvs: php4 /pear Cache.php /pear/Cache Container.php Graphics.php Output.php /pear/Cache/Container db.php file.php phplib.php
sbergmann Tue Mar 6 07:27:30 2001 EDT Modified files: /php4/pear Cache.php /php4/pear/CacheContainer.php Graphics.php Output.php /php4/pear/Cache/Container db.php file.php phplib.php Log: Whitespace only. Index: php4/pear/Cache.php diff -u php4/pear/Cache.php:1.4 php4/pear/Cache.php:1.5 --- php4/pear/Cache.php:1.4 Sun Mar 4 06:26:58 2001 +++ php4/pear/Cache.php Tue Mar 6 07:27:30 2001 @@ -16,7 +16,7 @@ // | Sebastian Bergmann <[EMAIL PROTECTED]> | // +--+ // -// $Id: Cache.php,v 1.4 2001/03/04 14:26:58 mj Exp $ +// $Id: Cache.php,v 1.5 2001/03/06 15:27:30 sbergmann Exp $ /** * Cache is a base class for cache implementations. @@ -24,7 +24,7 @@ * TODO: Simple usage example goes here. * * @author Ulf Wendel <[EMAIL PROTECTED]> -* @version $Id: Cache.php,v 1.4 2001/03/04 14:26:58 mj Exp $ +* @version $Id: Cache.php,v 1.5 2001/03/06 15:27:30 sbergmann Exp $ * @package Cache * @access public */ @@ -63,7 +63,7 @@ * @access public */ var $gc_probability = 1; - + /** * Storage container object. * @@ -91,7 +91,7 @@ $this->garbageCollection(); } - + /** * Returns the requested dataset it if exists and is not expired * @@ -110,7 +110,6 @@ return NULL; } // end func get - /** * Stores the given data in the cache. * @@ -127,8 +126,7 @@ return $this->container->save($id, $data, $expires, $group, ""); } // end func save - - + /** * Stores a dataset without additional userdefined data. * @@ -149,7 +147,6 @@ return $this->container->save($id, $cachedata, $expires, $group, $userdata); } // end func extSave - /** * Loads the given ID from the cache. * @@ -164,8 +161,7 @@ return $this->container->load($id, $group); } // end func load - - + /** * Returns the userdata field of a cached data set. * @@ -181,8 +177,7 @@ return $this->container->getUserdata($id, $group); } // end func getUserdata - - + /** * Removes the specified dataset from the cache. * @@ -197,8 +192,7 @@ return $this->container->delete($id, $group); } // end func delete - - + /** * Flushes the cache - removes all data from it * @@ -211,8 +205,7 @@ return $this->container->flush($group); } // end func flush - - + /** * Checks if a dataset exists. * @@ -229,8 +222,7 @@ return $this->container->isCached($id, $group); } // end func isCached - - + /** * Checks if a dataset is expired * @@ -251,7 +243,7 @@ return $this->container->isExpired($id, $group, $max_age); } // end func isExpired - + /** * Generates a "unique" ID for the given value * @@ -286,9 +278,6 @@ $this->container->garbageCollection(); $last_run = time(); } - } // end func garbageCollection - - } // end class cache ?> Index: php4/pear/Cache/Container.php diff -u php4/pear/Cache/Container.php:1.5 php4/pear/Cache/Container.php:1.6 --- php4/pear/Cache/Container.php:1.5 Tue Mar 6 03:32:10 2001 +++ php4/pear/Cache/Container.php Tue Mar 6 07:27:30 2001 @@ -1,5 +1,4 @@ | // +--+ // -// $Id: Container.php,v 1.5 2001/03/06 11:32:10 chregu Exp $ +// $Id: Container.php,v 1.6 2001/03/06 15:27:30 sbergmann Exp $ /** * Common base class of all cache storage container. @@ -37,7 +36,7 @@ * not recommended! * * @author Ulf Wendel <[EMAIL PROTECTED]> -* @version $Id: Container.php,v 1.5 2001/03/06 11:32:10 chregu Exp $ +* @version $Id: Container.php,v 1.6 2001/03/06 15:27:30 sbergmann Exp $ * @package Cache * @access public * @abstract @@ -52,63 +51,56 @@ * @var boolean */ var $preload = true; - + /** * ID of a preloaded dataset * * @var string */ var $id = ""; - - + /** * Cache group of a preloaded dataset * * @var string */ var $group = ""; - - + /** * Expiration timestamp of a preloaded dataset. * * @var integer 0 means never, endless */ var $expires = 0; - - + /** * Value of a preloaded dataset. * * @var string */ var $cachedata = ""; - - + /** * Preloaded userdata field. * * @var string */ var $userdata = "
Re: [PHP-CVS] cvs: php4 /pear/Cache Container.php Output.php/pear/Cache/Container db.php file.php phplib.php
Christian Stocker wrote: > chregu Thu Mar 8 03:57:16 2001 EDT > > Modified files: > /php4/pear/CacheContainer.php Output.php > /php4/pear/Cache/Container db.php file.php phplib.php > Log: > Introduced getExpiresAbsolute($expire) function, which translates > relative/human readable/unixtime expire-times in unixtime-format. Could some kind soul have a look at the cvs commit mail script and let it send commit mails regarding PEAR/ to the new pear-cvs mailing list? Thanks, Sebastian -- sebastian bergmann e-mail : [EMAIL PROTECTED] homepage : http://www.sebastian-bergmann.de make a gift : http://wishlist.sebastian-bergmann.de measure the usability of your web application -> http://phpOpenTracker.de -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-CVS] cvs: php4 /pear/Cache Error.php
sbergmann Thu Mar 8 14:20:06 2001 EDT Modified files: /php4/pear/CacheError.php Log: I think we need to load PEAR.php here. Index: php4/pear/Cache/Error.php diff -u php4/pear/Cache/Error.php:1.1 php4/pear/Cache/Error.php:1.2 --- php4/pear/Cache/Error.php:1.1 Thu Mar 8 12:39:15 2001 +++ php4/pear/Cache/Error.php Thu Mar 8 14:20:06 2001 @@ -1,4 +1,26 @@ http://www.php.net/license/2_02.txt. | +// | If you did not receive a copy of the PHP license and are unable to | +// | obtain it through the world-wide-web, please send a note to | +// | [EMAIL PROTECTED] so we can mail you a copy immediately. | +// +--+ +// | Authors: Ulf Wendel <[EMAIL PROTECTED]> | +// | Christian Stocker <[EMAIL PROTECTED]> | +// | Vinai Kopp <[EMAIL PROTECTED]> | +// +--+ +// +// $Id: Error.php,v 1.2 2001/03/08 22:20:06 sbergmann Exp $ + +require_once "PEAR.php"; + /** * Cache Error class * -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-CVS] cvs: php4 /pear/Cache Error.php
sbergmann Thu Mar 8 14:20:55 2001 EDT Modified files: /php4/pear/CacheError.php Log: This is 100% pure Ulf :-) Index: php4/pear/Cache/Error.php diff -u php4/pear/Cache/Error.php:1.2 php4/pear/Cache/Error.php:1.3 --- php4/pear/Cache/Error.php:1.2 Thu Mar 8 14:20:06 2001 +++ php4/pear/Cache/Error.php Thu Mar 8 14:20:55 2001 @@ -13,11 +13,9 @@ // | [EMAIL PROTECTED] so we can mail you a copy immediately. | // +--+ // | Authors: Ulf Wendel <[EMAIL PROTECTED]> | -// | Christian Stocker <[EMAIL PROTECTED]> | -// | Vinai Kopp <[EMAIL PROTECTED]> | // +--+ // -// $Id: Error.php,v 1.2 2001/03/08 22:20:06 sbergmann Exp $ +// $Id: Error.php,v 1.3 2001/03/08 22:20:55 sbergmann Exp $ require_once "PEAR.php"; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-CVS] cvs: php4 /pear/Cache Output.php
sbergmann Sat Mar 10 23:46:58 2001 EDT Modified files: /php4/pear/CacheOutput.php Log: Updated example. Index: php4/pear/Cache/Output.php diff -u php4/pear/Cache/Output.php:1.10 php4/pear/Cache/Output.php:1.11 --- php4/pear/Cache/Output.php:1.10 Thu Mar 8 03:57:15 2001 +++ php4/pear/Cache/Output.php Sat Mar 10 23:46:58 2001 @@ -17,7 +17,7 @@ // | Vinai Kopp <[EMAIL PROTECTED]> | // +--+ // -// $Id: Output.php,v 1.10 2001/03/08 11:57:15 chregu Exp $ +// $Id: Output.php,v 1.11 2001/03/11 07:46:58 sbergmann Exp $ require_once 'Cache.php'; @@ -35,7 +35,7 @@ * Usage example: * * // place this somewhere in a central config file -* define(CACHE_STORAGE_CLASS, "cache_container_file"); +* define(CACHE_STORAGE_CLASS, "file"); * // file storage needs a dir to put the cache files * define(CACHE_DIR, "/var/tmp/"); * -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-CVS] cvs: php4 /ext/standard browscap.c
Sascha Schumann wrote: > sas Wed Mar 14 05:38:03 2001 EDT > > Modified files: > /php4/ext/standard browscap.c > Log: > Fix ZTS build Works - thanks, Sascha. -- sebastian bergmann e-mail : [EMAIL PROTECTED] homepage : http://www.sebastian-bergmann.de bonn.phpug.de || www.php.net || www.phpOpenTracker.de || www.titanchat.de -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-CVS] cvs: php4 /pear/Cache Output.php
sbergmann Thu Mar 15 23:58:35 2001 EDT Modified files: /php4/pear/CacheOutput.php Log: Fix the example. Index: php4/pear/Cache/Output.php diff -u php4/pear/Cache/Output.php:1.11 php4/pear/Cache/Output.php:1.12 --- php4/pear/Cache/Output.php:1.11 Sat Mar 10 23:46:58 2001 +++ php4/pear/Cache/Output.php Thu Mar 15 23:58:35 2001 @@ -17,7 +17,7 @@ // | Vinai Kopp <[EMAIL PROTECTED]> | // +--+ // -// $Id: Output.php,v 1.11 2001/03/11 07:46:58 sbergmann Exp $ +// $Id: Output.php,v 1.12 2001/03/16 07:58:35 sbergmann Exp $ require_once 'Cache.php'; @@ -50,7 +50,7 @@ * // "post" => $HTTP_POST_VAS" * // "cookie" => $HTTP_COOKIE_VARS * //); -* $cache_handle = $REQUEST_URI; +* $cache_handle = $cache->generateID($REQUEST_URI); * * // now the magic happens: if cached call die() * // to end the time consumptiong script script execution and use the cached value! -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-CVS] cvs: php4 /ext/domxml php_domxml.c
sbergmann Tue Mar 20 09:04:45 2001 EDT Modified files: /php4/ext/domxmlphp_domxml.c Log: Nuke another warning. Index: php4/ext/domxml/php_domxml.c diff -u php4/ext/domxml/php_domxml.c:1.30 php4/ext/domxml/php_domxml.c:1.31 --- php4/ext/domxml/php_domxml.c:1.30 Tue Mar 20 08:20:42 2001 +++ php4/ext/domxml/php_domxml.cTue Mar 20 09:04:45 2001 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_domxml.c,v 1.30 2001/03/20 16:20:42 steinm Exp $ */ +/* $Id: php_domxml.c,v 1.31 2001/03/20 17:04:45 sbergmann Exp $ */ #include "php.h" @@ -1620,7 +1620,6 @@ { zval *id, *arg1; xmlNode *nodep; - char *value; if ((ZEND_NUM_ARGS() == 1) && getParameters(ht, 1, &arg1) == SUCCESS) { id = getThis(); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-CVS] cvs: php4 / run-tests.php
sbergmann Tue Mar 20 22:33:00 2001 EDT Modified files: /php4 run-tests.php Log: Disable maximum execution time for tests. Index: php4/run-tests.php diff -u php4/run-tests.php:1.17 php4/run-tests.php:1.18 --- php4/run-tests.php:1.17 Tue Mar 20 22:04:36 2001 +++ php4/run-tests.php Tue Mar 20 22:33:00 2001 @@ -25,6 +25,7 @@ * - do not test PEAR components if base class and/or component class cannot be instanciated */ +set_time_limit(0); ob_implicit_flush(); define('TEST_PASSED', 0); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-CVS] cvs: php4 / TODO
sbergmann Mon Apr 16 06:55:18 2001 EDT Modified files: /php4 TODO Log: Daniel fixed this for PHP 4.0.6. Index: php4/TODO diff -u php4/TODO:1.120 php4/TODO:1.121 --- php4/TODO:1.120 Tue Feb 27 01:16:48 2001 +++ php4/TODO Mon Apr 16 06:55:18 2001 @@ -14,7 +14,6 @@ but don't declare those as const. This makes interaction with other interfaces difficult which pass const parameters to us. * add try..catch/throw exception handling -* make UNC filenames work with V_CD layer global -- -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-CVS] Re: [PHP-QA] RE: [PHP-CVS] cvs: php4(PHP_4_0_5) /ext/ircgconfig.m4ircg.c php_ircg.h
[EMAIL PROTECTED] wrote: > be covered by an RC I think. If an RC8 is finished, I'll test it on Win32 with Apache as CGI, and on Linux 2.4.3 with thttpd and ircg. -- sebastian bergmann[EMAIL PROTECTED] http://www.sebastian-bergmann.de bonn.phpug.de | www.php.net | www.phpOpenTracker.de | www.titanchat.de -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: [PEAR] PEAR/DB: Random row from result set
"Tomas V.V.Cox" wrote: > $row = $db_result->fetchRow($fetchmode, $row_number_to_fetch); Thanks. > This feature is unsupported in oci8 and ibase :-( As of now, I can live with that. -- sebastian bergmann[EMAIL PROTECTED] http://www.sebastian-bergmann.de bonn.phpug.de | www.php.net | www.phpOpenTracker.de | www.titanchat.de -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Apache 2.0.28 module
Jobarr wrote: > I need a build of PHP that can be used as a module with Apache 2.0.28 > beta. Please do not massively cross-post to the various php.net mailinglists or newsgroups. -- Sebastian Bergmann http://sebastian-bergmann.de/ http://phpOpenTracker.de/ Did I help you? Consider a gift: http://wishlist.sebastian-bergmann.de/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-CVS] cvs: php4 / run-tests.php
André Langhorst wrote: > in case you did not notice... it was not in there before, Sebastian > added it due to a misbehaviour I introduced with pathnames containing > spaces, but it is fixed now and is not needed anymore run-tests.php will still need more than 30 seconds (default) on some systems. If not now, then when more tests are added, etc. IMHO it should be in there. -- sebastian bergmann[EMAIL PROTECTED] http://www.sebastian-bergmann.de bonn.phpug.de | www.php.net | www.phpOpenTracker.de | www.titanchat.de -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-CVS] cvs: php4 / php.ini-dist
sbergmann Sat Mar 24 13:38:58 2001 EDT Modified files: /php4 php.ini-dist Log: Added php_dbx.dll. Index: php4/php.ini-dist diff -u php4/php.ini-dist:1.74 php4/php.ini-dist:1.75 --- php4/php.ini-dist:1.74 Tue Mar 20 14:45:10 2001 +++ php4/php.ini-dist Sat Mar 24 13:38:58 2001 @@ -1,5 +1,5 @@ [PHP] -; $Id: php.ini-dist,v 1.74 2001/03/20 22:45:10 phanto Exp $ +; $Id: php.ini-dist,v 1.75 2001/03/24 21:38:58 sbergmann Exp $ ;;; ; About this file ; @@ -378,6 +378,7 @@ ;extension=php_db.dll ;extension=php_dba.dll ;extension=php_dbase.dll +;extension=php_dbx.dll ;extension=php_domxml.dll ;extension=php_dotnet.dll ;extension=php_exif.dll -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-CVS] cvs: php4 /pear Makefile.in
sbergmann Sat Mar 24 13:40:26 2001 EDT Modified files: /php4/pear Makefile.in Log: Added missing files. Index: php4/pear/Makefile.in diff -u php4/pear/Makefile.in:1.73 php4/pear/Makefile.in:1.74 --- php4/pear/Makefile.in:1.73 Mon Mar 12 11:35:28 2001 +++ php4/pear/Makefile.in Sat Mar 24 13:40:25 2001 @@ -40,6 +40,7 @@ Cache/Graphics.php \ Cache/Output.php \ Cache/Container/db.php \ + Cache/Container/dbx.php \ Cache/Container/file.php \ Cache/Container/phplib.php \ Cache/Container/shm.php \ @@ -62,10 +63,14 @@ File/Find.php \ File/Passwd.php \ File/SearchReplace.php \ + HTML/Common.php \ HTML/Form.php \ HTML/IT.php \ HTML/ITX.php \ + HTML/Page.php \ HTML/Processor.php \ + HTML/Select.php \ + HTML/Table.php \ HTTP.php \ HTTP/Compress.php \ Image/Remote.php \ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-CVS] cvs: php4 / NEWS
sbergmann Mon Mar 26 11:03:36 2001 EDT Modified files: /php4 NEWS Log: Nitpicking. Index: php4/NEWS diff -u php4/NEWS:1.622 php4/NEWS:1.623 --- php4/NEWS:1.622 Mon Mar 26 10:59:01 2001 +++ php4/NEWS Mon Mar 26 11:03:36 2001 @@ -3,7 +3,7 @@ ?? ??? 200?, Version 4.0.6 - Modified get_parent_class() to accept a class name as well as a class - instance. (Andrei, Zend engine) + instance. (Andrei, Zend Engine) - Added support for UNC style paths (\\server\share\file & //server/share/file) (Daniel, TSRM) - Changed C++ style comments to C-style comments (Marc) @@ -150,7 +150,7 @@ - Fixed date('r') overflow - Made the php.ini path reported in phpinfo() always point to the absolute path that was opened (Zeev) -- Made the INI mechanism thread safe (Zeev, Zend engine) +- Made the INI mechanism thread safe (Zeev, Zend Engine) - Changed setlocale() to use LC_* constants. (Jani) - ctype functions now follow the extension naming conventions (Hartmut) - Added iconv() function (using libc or libiconv) (Stig) @@ -570,7 +570,7 @@ and currently run through a system call. This will speed up the UdmSearch php frontend significantly. (Rasmus) - Modified in_array() to not touch array pointer. (Andrei) -- Added restore_error_handler(). (Zeev, Zend engine) +- Added restore_error_handler(). (Zeev, Zend Engine) - Fixed erroneous file names and line numbers in error situations under the multithreaded version of PHP - most noticeably Win32 (Zeev, Zend Engine) - Fixed problem with CGI crashing on certain servers especially Windows Apache -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-CVS] cvs: php4 /pear/Experimental/Image color_helper.php
sbergmann Wed Mar 28 22:55:15 2001 EDT Modified files: /php4/pear/Experimental/Image color_helper.php Log: Added web-safe colors list. Index: php4/pear/Experimental/Image/color_helper.php diff -u php4/pear/Experimental/Image/color_helper.php:1.2 php4/pear/Experimental/Image/color_helper.php:1.3 --- php4/pear/Experimental/Image/color_helper.php:1.2 Wed Mar 28 05:08:11 2001 +++ php4/pear/Experimental/Image/color_helper.php Wed Mar 28 22:55:15 2001 @@ -16,7 +16,7 @@ // | Authors: Ulf Wendel <[EMAIL PROTECTED]| // +--+ // -// $Id: color_helper.php,v 1.2 2001/03/28 13:08:11 uw Exp $ +// $Id: color_helper.php,v 1.3 2001/03/29 06:55:15 sbergmann Exp $ // /** @@ -26,7 +26,7 @@ * functions to convert userdefined colors into RGB colors. * * @author Ulf Wendel <[EMAIL PROTECTED]> -* @version $Id: color_helper.php,v 1.2 2001/03/28 13:08:11 uw Exp $ +* @version $Id: color_helper.php,v 1.3 2001/03/29 06:55:15 sbergmann Exp $ */ class ColorHelper { @@ -38,11 +38,146 @@ * @see color2RGB() */ var $colornames = array( - "white"=> array(255, 255, 255), - "black"=> array(0, 0, 0), - "red" => array(255, 0, 0), - "green"=> array(0, 255, 0), - "blue" => array(0, 0, 255) +"AliceBlue" => array(240,248,255), +"AntiqueWhite" => array(250,235,215), +"Aqua" => array(0,255,255), +"Aquamarine" => array(127255212), +"Azure" => array(240,255,255), +"Beige" => array(245,245,220), +"Bisque" => array(255,228,196), +"Black" => array(0,0,0), +"BlanchedAlmond" => array(255,235,205), +"Blue" => array(0,0,255), +"BlueViolet" => array(138,43,226), +"Brown" => array(165,42,42), +"BurlyWood" => array(222,184,135), +"CadetBlue" => array(95,158,160), +"Chartreuse" => array(127,255,0), +"Chocolate" => array(210,105,30), +"Coral" => array(255,127,80), +"CornflowerBlue" => array(100,149,237), +"Cornsilk" => array(255,248,220), +"Crimson" => array(220,20,60), +"Cyan" => array(0,255,255), +"DarkBlue" => array(0,0,13), +"DarkCyan" => array(0,139,139), +"DarkGoldenrod" => array(184,134,11), +"DarkGray" => array(169,169,169), +"DarkGreen" => array(0,100,0), +"DarkKhaki" => array(189,183,107), +"DarkMagenta" => array(139,0,139), +"DarkOliveGreen" => array(85,107,47), +"DarkOrange" => array(255,140,0), +"DarkOrchid" => array(153,50,204), +"DarkRed" => array(139,0,0), +"DarkSalmon" => array(233,150,122), +"DarkSeaGreen" => array(143,188,143), +"DarkSlateBlue" => array(72,61,139), +"DarkSlateGray" => array(47,79,79), +"DarkTurquoise" => array(0,206,209), +"DarkViolet" => array(148,0,211), +"DeepPink" => array(255,20,147), +"DeepSkyBlue" => array(0,191,255), +"DimGray" => array(105,105,105), +"DodgerBlue" => array(30,144,255), +"FireBrick" => array(178,34,34), +"FloralWhite" => array(255,250,240), +"ForestGreen" => array(34,139,34), +"Fuchsia" => array(255,0,255), +"Gainsboro" => array(220,220,220), +"GhostWhite" => array(248,248,255), +"Gold" => array(255,215,0), +"Goldenrod" => array(218,165,32), +"Gray" => array(128,128,128), +"Green" => array(0,128,0), +
[PHP] PHP Wordfile for UltraEdit
Since I was not satisfied with the "official" Wordfiles provided by UltraEdit.com I started to create my own one, which can be found in an initial version in the "Projects" section of my homepage (URL see below). My wordfile uses the funclist.txt from cvs.php.net, so it includes ALL function names in order to syntax-highlight them. Have fun, Sebastian PS: Feedback is welcome! -- sebastian bergmann[EMAIL PROTECTED] http://www.sebastian-bergmann.de bonn.phpug.de | www.php.net | www.phpOpenTracker.de | www.titanchat.de -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: PHP Wordfile for UltraEdit
I just noticed that my domain provider has some problems, so www.sebastian-bergmann.de is currently unreachable. Please use http://sb.rc5.de/ for the time beeing. Thanks for your patience, Sebastian :-( -- sebastian bergmann[EMAIL PROTECTED] http://www.sebastian-bergmann.de bonn.phpug.de | www.php.net | www.phpOpenTracker.de | www.titanchat.de -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: PHP takes over UltraEdit
Philip Olson wrote: > This place : >http://www.ultraedit.com/downloads/additional.html > > Has very weak PHP representation. I know, that's why I started working on a new wordfile.txt, based upon one of theirs. > Want to round up some ideas and upgrade this section as a hole? Hm, why make it on their site? I'm just thinking about creating a SourceForge Account for a "PHP Mode for UltraEdit" project. This way we could update it ASAP, when needed. We can give UltraEdit the link (or the files, too), though. But I don't think they're willing to update the files in their download section everytime a function is added to PHP, for instance. > 0. Create new uberWord file (yours with aditions) and upon submittion, >remove all current word files. My current wordfile.txt is definetly just a start from where we need to go further - but it already contains all function names, as of yesterday's state od the CVS. > 1. Create a tag list. Coordinate tag/word file co-mingling in >intelligent manner. Yup. PS: I'm not subscribed to [EMAIL PROTECTED], so please CC me in your replies. -- sebastian bergmann[EMAIL PROTECTED] http://www.sebastian-bergmann.de bonn.phpug.de | www.php.net | www.phpOpenTracker.de | www.titanchat.de -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: PHP takes over UltraEdit
Sebastian Bergmann wrote: > I'm just thinking about creating a SourceForge Account for a > "PHP Mode for UltraEdit" project. Done, see http://sourceforge.net/projects/php4ue/ for details. Anyone who wishes to contribute to this project: Please e-mail me your SourceForge ID, so I can add you to the project. > PS: I'm not subscribed to [EMAIL PROTECTED], so please CC me > in your replies. -- sebastian bergmann[EMAIL PROTECTED] http://www.sebastian-bergmann.de bonn.phpug.de | www.php.net | www.phpOpenTracker.de | www.titanchat.de -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-CVS] cvs: php4 / NEWS
sbergmann Sun Apr 1 07:13:10 2001 EDT Modified files: /php4 NEWS Log: Fixed some glitches in NEWS. (Yes, you may call me pedantic :-) Index: php4/NEWS diff -u php4/NEWS:1.624 php4/NEWS:1.625 --- php4/NEWS:1.624 Mon Mar 26 12:10:19 2001 +++ php4/NEWS Sun Apr 1 07:13:09 2001 @@ -4,9 +4,8 @@ ?? ??? 200?, Version 4.0.6 - Modified get_parent_class() and get_class_methods() to accept a class name as well as a class instance. (Andrei, Zend Engine) -- Added support for UNC style paths (\\server\share\file & //server/share/file) +- Added support for UNC style paths. (\\server\share\file, //server/share/file) (Daniel, TSRM) -- Changed C++ style comments to C-style comments (Marc) - Added dbx module (database abstraction) to the repository. (Marc) - Using ITypeInfo instead of IDispatch if possible. This makes DCOM calls and even COM calls much faster. @@ -14,11 +13,10 @@ Now you need not provide a path to the file containing the typelib, you can also provide the GUID of the TypeLib - entry or an IID for preloading type - information. (phanto) -- Rewrite of domxml. It's now mostly DOM Level 2 conform (Uwe) +- Rewrite of domxml. It's now mostly DOM Level 2 conform. (Uwe) - Added array_map() function that applies a callback to the elements of given arrays and returns the result. It can also be used with a null callback to transpose arrays. (Andrei) -- New FastCGI server module. (Ben Mansell) - Added array_filter(), which allows filtering of array elements via the specified callback. (Andrei) - Fixed all relevant array functions to avoid moving the internal array @@ -29,6 +27,7 @@ (Zeev) ?? ??? 200?, Version 4.0.5 +- New FastCGI server module. (Ben Mansell) - Added array_reduce(), which allows iterative reduction of an array to a single value via a callback function. (Andrei) - The imageloadfont function of the gd extension should be not platform @@ -39,30 +38,32 @@ and vice versa. ([EMAIL PROTECTED]) - Fixed argument checking for call_user_func* functions and allowed specifying array($obj, 'method') syntax for call_user_func_array. (Andrei) -- Fixed parent::method() to also work with runtime bindings (Zeev, Zend Engine) +- Fixed parent::method() to also work with runtime bindings. + (Zeev, Zend Engine) - Implemented high-performance zlib-based output compression - see - zlib.output_compression INI directive (Zeev) -- Improved ob_gzhandler() to support chunked output buffering - it's recommended - to use it with 4KB chunks (Zeev) -- Fixed chunked output buffering (Zeev) + zlib.output_compression INI directive. (Zeev) +- Improved ob_gzhandler() to support chunked output buffering - it's + recommended to use it with 4KB chunks. (Zeev) +- Fixed chunked output buffering. (Zeev) - Forced call_user_method() and call_user_method_array() to take the object argument by reference. (Andrei) - Fixed binding of ROWIDs in OCI8. (Thies) - Added PEAR/Cache as a generic Caching System. (Sebastian, PEAR/Cache) -- IMAP quota support (imap_set_quota, imap_get_quota) enabled/added via - c-client2000 (kalowsky) +- Added IMAP quota support (imap_set_quota, imap_get_quota), enabled/added via + c-client2000. (kalowsky) - Upgraded PCRE to version 3.4. (Andrei) - Added array_search which works similar to in_array but returns the key instead of a boolean. ([EMAIL PROTECTED]) -- Fixed pgsql transaction support (Stig, PEAR/DB) +- Fixed pgsql transaction support. (Stig, PEAR/DB) - Added new object VARIANT() to encapsulate values for use with the COM and DOTNET module. Therefore it is now possible to pass values by reference, convert php values to extended variant types (currency, date, idispatch, iunknown, ...) and define the codepage that should be used for unicode - conversion. -- Improved overall speed of IRCG, added URL handling to message scanner (Sascha) +- Improved overall speed of IRCG, added URL handling to message scanner. + (Sascha) - Fixed some modules to allow using output-buffering. (Thies) -- Added the chroot() function (Derick) +- Added the chroot() function. (Derick) - PostgreSQL now does a rollback at the end of a request on every persistent connection. This is done by doing an "empty" transaction on the connection. This was advised by someone from the PostgreSQL @@ -70,8 +71,8 @@ - Fixed PostgeSQL pg_connect() bug. We would sometimes close the default link by accident. (Patch by: [EMAIL PROTECTED]) - Improved OCI8 dead-session detection. (Patch by: George Schlossnagle) -- Fixed get_meta_tags() multiline bug #4556 (Sean) -- Prefer random() over *rand48() (JimJag) +- Fixed get_meta_tags() multiline bug #4556. (Sean) +- Prefer random() over *rand48(). (JimJag) - Sped up WDDX serialization 2x. (Andrei) - Added a new parameter to mail() which appends aditional command line parameters to the mail program. (Derick) @@ -81,7 +82,7 @@ - Static methods can now be called via call_us
[PHP-CVS] cvs: php4(PHP_4_0_5) / NEWS
sbergmann Sun Apr 1 07:33:30 2001 EDT Modified files: (Branch: PHP_4_0_5) /php4 NEWS Log: Fixed some glitches in NEWS. (Yes, you may call me pedantic :-) Index: php4/NEWS diff -u php4/NEWS:1.611.2.1 php4/NEWS:1.611.2.2 --- php4/NEWS:1.611.2.1 Tue Mar 13 08:27:40 2001 +++ php4/NEWS Sun Apr 1 07:33:29 2001 @@ -2,8 +2,7 @@ ||| ?? ??? 200?, Version 4.0.5 -- IMPORTANT: removed /F modifier handling from preg_replace(). Instead - one should use new preg_replace_callback() function. (Andrei) +- New FastCGI server module. (Ben Mansell) - Added array_reduce(), which allows iterative reduction of an array to a single value via a callback function. (Andrei) - The imageloadfont function of the gd extension should be not platform @@ -14,30 +13,32 @@ and vice versa. ([EMAIL PROTECTED]) - Fixed argument checking for call_user_func* functions and allowed specifying array($obj, 'method') syntax for call_user_func_array. (Andrei) -- Fixed parent::method() to also work with runtime bindings (Zeev, Zend Engine) +- Fixed parent::method() to also work with runtime bindings. + (Zeev, Zend Engine) - Implemented high-performance zlib-based output compression - see - zlib.output_compression INI directive (Zeev) -- Improved ob_gzhandler() to support chunked output buffering - it's recommended - to use it with 4KB chunks (Zeev) -- Fixed chunked output buffering (Zeev) + zlib.output_compression INI directive. (Zeev) +- Improved ob_gzhandler() to support chunked output buffering - it's + recommended to use it with 4KB chunks. (Zeev) +- Fixed chunked output buffering. (Zeev) - Forced call_user_method() and call_user_method_array() to take the object argument by reference. (Andrei) - Fixed binding of ROWIDs in OCI8. (Thies) - Added PEAR/Cache as a generic Caching System. (Sebastian, PEAR/Cache) -- IMAP quota support (imap_set_quota, imap_get_quota) enabled/added via - c-client2000 (kalowsky) +- Added IMAP quota support (imap_set_quota, imap_get_quota), enabled/added via + c-client2000. (kalowsky) - Upgraded PCRE to version 3.4. (Andrei) - Added array_search which works similar to in_array but returns the key instead of a boolean. ([EMAIL PROTECTED]) -- Fixed pgsql transaction support (Stig, PEAR/DB) +- Fixed pgsql transaction support. (Stig, PEAR/DB) - Added new object VARIANT() to encapsulate values for use with the COM and DOTNET module. Therefore it is now possible to pass values by reference, convert php values to extended variant types (currency, date, idispatch, iunknown, ...) and define the codepage that should be used for unicode - conversion. -- Improved overall speed of IRCG, added URL handling to message scanner (Sascha) +- Improved overall speed of IRCG, added URL handling to message scanner. + (Sascha) - Fixed some modules to allow using output-buffering. (Thies) -- Added the chroot() function (Derick) +- Added the chroot() function. (Derick) - PostgreSQL now does a rollback at the end of a request on every persistent connection. This is done by doing an "empty" transaction on the connection. This was advised by someone from the PostgreSQL @@ -45,8 +46,8 @@ - Fixed PostgeSQL pg_connect() bug. We would sometimes close the default link by accident. (Patch by: [EMAIL PROTECTED]) - Improved OCI8 dead-session detection. (Patch by: George Schlossnagle) -- Fixed get_meta_tags() multiline bug #4556 (Sean) -- Prefer random() over *rand48() (JimJag) +- Fixed get_meta_tags() multiline bug #4556. (Sean) +- Prefer random() over *rand48(). (JimJag) - Sped up WDDX serialization 2x. (Andrei) - Added a new parameter to mail() which appends aditional command line parameters to the mail program. (Derick) @@ -56,7 +57,7 @@ - Static methods can now be called via call_user_method_* functions, e.g. call_user_method('method', 'class'), and also array('class', 'method') constructs (for array_walk(), for example). (Andrei, Zend Engine) -- microtime under windows now returns accurate values (James) +- microtime() under Windows now returns accurate values. (James) - Added PREG_SPLIT_DELIM_CAPTURE flag to preg_split() that allows for Perl-like functionality of capturing parenthesized delimiter expression. (Andrei) - Fixed strip_tags() to not strip a lone > character. (Rasmus) @@ -70,12 +71,12 @@ - Major change of the php pdf api. It could break some functions though backwards compatibility was tried to maintain. Adding some still missing functions as well. (Uwe) -- Added mnoGoSearch extension - http://search.mnogo.ru (Sergey K) -- Allow url encoding in DB usernames and passwords (Stig, PEAR) -- Added raiseError and setErrorHandling methods to PEAR class (Stig, PEAR) +- Added mnoGoSearch extension - http://search.mnogo.ru. (Sergey K) +- Allow URL encoding in DB usernames and passwords. (Stig, PEAR) +- Added raiseError and setErrorHandling me
[PHP] Re: UltraEdit - some useful function regexes
Geoff Caplan wrote: > Sebastian - if you like them, you might want to add them to your > "Open Source" wordfile... I'll have a look at your stuff tomorrow. The current wordfile.txt in the CVS is buggy somehow and I'm going to sort out some of those bugs tomorrow. -- sebastian bergmann[EMAIL PROTECTED] http://www.sebastian-bergmann.de bonn.phpug.de | www.php.net | www.phpOpenTracker.de | www.titanchat.de -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-CVS] cvs: php4 /pear/Cache URL.php
sbergmann Fri Apr 6 01:28:20 2001 EDT Added files: /php4/pear/CacheURL.php Log: Initial checkin of URL Cache. Index: php4/pear/Cache/URL.php +++ php4/pear/Cache/URL.php "/tmp/", * "filename_prefix" => "cache_"); * * $data = get_cached_url("http://www.test.com/"); * * @author Sebastian Bergmann <[EMAIL PROTECTED]> * @module URL_Cache * @modulegroup URL_Cache * @package Cache * @version $Revision: 1.1 $ * @access public */ // +--+ // | PHP version 4.0 | // +--+ // | Copyright (c) 1997, 1998, 1999, 2000, 2001 The PHP Group | // +--+ // | This source file is subject to version 2.0 of the PHP license, | // | that is bundled with this package in the file LICENSE, and is| // | available at through the world-wide-web at | // | http://www.php.net/license/2_02.txt. | // | If you did not receive a copy of the PHP license and are unable to | // | obtain it through the world-wide-web, please send a note to | // | [EMAIL PROTECTED] so we can mail you a copy immediately. | // +------+ // | Authors: Sebastian Bergmann <[EMAIL PROTECTED]> | // +--+ // // $Id: URL.php,v 1.1 2001/04/06 08:28:20 sbergmann Exp $ require_once 'Cache.php'; /** * Caches the contents of a remote URL. * * @param string $url * @param mixed $expires * @return string $data * @access public */ function get_cached_url($url, $expires = 0) { global $FUNCTION_CACHE_CONTAINER, $FUNCTION_CACHE_CONTAINER_OPTIONS; static $cache; // create Cache object, if needed if (!is_object($cache)) { $cache = new Cache($FUNCTION_CACHE_CONTAINER, $FUNCTION_CACHE_CONTAINER_OPTIONS); } // generate Cache ID $id = md5($url); // query Cache $data = $cache->get($id); // Cache miss: Retrieve document at given URL and store it if ($data == NULL) { $fp = @fopen($url, "r"); if($fp) { $data = fread($fp, 65536); fclose($fp); $cache->save($id, $data, $expires); } } return $data; } ?> -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: [PHP-QA] Looking for users list
Cyril Beaussier wrote: > I m looking for a list of PHP business web sites > Yahoo, HP, IBM or Amazon use PHP for its official site? > Thanks for help The QA in php-qa@ does not stand for "Questions & Answers", but for "Quality Assurance". Please ask your question on the php-general mailinglist, thank you. -- sebastian bergmann[EMAIL PROTECTED] http://www.sebastian-bergmann.de bonn.phpug.de | www.php.net | www.phpOpenTracker.de | www.titanchat.de -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-CVS] cvs: php4 / NEWS
sbergmann Tue Feb 20 22:22:41 2001 EDT Modified files: /php4 NEWS Log: Added note about PCRE update. Index: php4/NEWS diff -u php4/NEWS:1.597 php4/NEWS:1.598 --- php4/NEWS:1.597 Tue Feb 20 19:55:17 2001 +++ php4/NEWS Tue Feb 20 22:22:41 2001 @@ -2,6 +2,7 @@ ||| ?? ??? 200?, Version 4.0.5 +- Upgraded PCRE to version 3.4. (Andrei) - Added array_search which works similar to in_array but returns the key instead of a boolean. ([EMAIL PROTECTED]) - Fixed pgsql transaction support (Stig, PEAR/DB) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]