[PHP] Daemon with a PHP file
Hello my name is Sebastian ,i'm from Argentina ,this is my first question in this list.I would like to know how to run a php file every day at 8 AM , my intention was to create a cron with the crontab command.Something like this ... 0 8 * * * /home/users/sebas/citas.php3 but this doesnt work ,do u know how to do this ? ,thanks Sebastin Renzi Consultora Desarrollo de Sistemas. CODES S.A -- 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 /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 /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]
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 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 /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 @@ ?php +// +--+ +// | 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: 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.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 @@ ?php - // +--+ // | PHP version 4.0 | // +--+ @@ -17,7 +16,7 @@ // | Sebastian Bergmann [EMAIL PROTECTED] | // +--+ // -// $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 preloa
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 / 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]
[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."br"; +* } * +* $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 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 ; font color="??" 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
[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 ; font color="??" 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 /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: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 . "br"; -* for($i=1;$i1000;$i++){} -* return strrev($string); +* print $string . "br"; +* for($i=1;$i1000;$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]
AW: [PHP] Passing values from ASP to PHP
Hi you could try to ad a filter for 'exactfilename.asp' and assign it to php. i forgot most of my iis knowledge, but as far as i recal the .asp filter can be changed on per-directory basis. putting exactfilename.asp in the filter- tab higher then the asp one should map it to php it can be done with apache even easier, but as you use asp, i assume you use iis Sebastian -Ursprungliche Nachricht- Von: Isaac [mailto:[EMAIL PROTECTED]] Gesendet: Mittwoch, 28. Februar 2001 22:08 An: [EMAIL PROTECTED] Betreff: [PHP] Passing values from ASP to PHP I've been given a project that I want to use PHP with, but unfortunately there are unchangable hard-coded values that point clients to an ASP script residing on our server. Here's what I want to do, and I don't really know how to do it: I want to pass all the key/value pairs that are passed to the ASP script to a PHP script. I can get values with Request.Form("key_name"), but that takes hard-coding the name of the key. So if the following is passed to the ASP script: one=bluetwo=redthree=yellow Then I would want to redirect to myscript.php?one=bluetwo=redthree=yellow How do I go about walking through all the key/values that have been passed in ASP? I really don't want to have to learn this ugly language.. -- Isaac Force [EMAIL PROTECTED] (503)656-2489 http://gorgonous.dhs.org Real Users find the one combination of bizarre input values that shuts down the system for days. -- 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 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 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 ?php // +--+ // | 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: 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 /**
[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 ?php // +--+ // | 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: 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); retu
[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 ?php // +--+ // | 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: 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-flushPreload(); + if (!($dh = opendir($this-cache_dir))) return new CacheError("Can't access cache directory.", __FILE__, __LINE__); Index: php4/pear/Ca
[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 ?php // +--+ // | 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: 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('img src="%s" %s', $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. *
[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)": ?php $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 ?php // +--+ // | 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: 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 / 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 /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 / 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]
[PHP] download prompt not woking on macintosh
Hi all I tried to build a script that displays the 'save-file dialog', because the files that should be downloaded are huge 32bit jpeg for printing. the problem is that it works in IE on PC, Netscape on PC and MAC, but not in IE on a MAC. the files are jpeg, IE on Mac either tried to open the files ( which does not work, because they are CYMK), or displayes the filename 'download.php' in the save dialog PLEASE HELP our designers can't be the only persons to use Mac on the world... i tried everycombination of the following headers, but without success... thanks sebastian code : /* header("Content-Type: application/octet-stream"); header("Content-Disposition: inline; filename=\"".basename($download)."\""); set_time_limit(0); readfile($download) or die ("File nicht gefunden oder sonstiger Fehler aufgetreten."); */ header("Content-Type: application/download\n"); header("Content-Disposition: inline; filename=\"$download\""); set_time_limit(0); readfile($download); /* header("Content-Type: application/download\n"); header("Content-Disposition: attachment; filename=\"$download\""); $fn=fopen("$download" , "r"); fpassthru($fn); */ /* header("Content-Type: doesn/matter\r\n"); header("Content-Disposition: filename=$download\r\n\r\n"); header("Content-Transfer-Encoding: binary\r\n"); readfile($download) or die ("File nicht gefunden oder sonstiger Fehler aufgetreten."); */ /* header("Content-Type: doesn/matter\r\n"); header("Content-Disposition: filename=$download"); header("Content-Transfer-Encoding: binary\r\n"); header("Content-Length: ".filesize($download)); readfile($download); */ -- 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]
AW: [PHP] Bad Practices
OR you could tell apache to parse everything that ends with .inc with php. you can name it .inc .linux .linuxsucks .microsoftsucks (you'll need to have access to http.conf or .htaccess+right to override ...) sebastian -Ursprngliche Nachricht- Von: Rick Hodger [mailto:[EMAIL PROTECTED]] Gesendet: Mittwoch, 14. Februar 2001 09:51 An: [EMAIL PROTECTED] Betreff: Re: [PHP] Bad Practices "Jeff Oien" [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Would people like to list bad practices and also point us newbies to any articles online dealing with syntax, correct use of single and double quotes etc.? People who create scripts that include a need for access to a SQL database, meaning you need to give it a username and password then making the damn configuration file be called something stupid like config.inc. When you are scripting, using anything with a .inc extension is just asking for trouble. If someone requests that file, it'll get passed straight to them. It's a .inc, which means that PHP does not know to parse it. Which means, that person can see your usernames and passwords. And because it's a public package, they're far more likely to know the path to said file. -- Rick Hodger -- 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 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] can i install apache php-module AND php-cgi on the same windows-apache?
i need it, because i want to do some image genaration and that is broken in win32 in the apache module. i would like to have a different ending for these skripts that need to be executed as CGI... it would be easy possible with IIS, but i still would prefer apache, since with IIS there are other problems... ( no i won't switch to linux on my laptop, because...) thanks sebastian -- 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]
AW: [PHP] gethostbyaddr timeout
I'm at the end of my rope here... I have a 100,000+ line file containing IP addresses. For each line, I need to run a "gethostbyaddr" command. However, some lines take a long time to timeout. Is there a way I can decrease this timeout period to one or two seconds? i don't know about any function that does that, what i did with something simmilar is to automaticly generate a frames page that calls the script which then only performs 10 or so of the tasks. you can easyly have that page open 10 or so browserwindows. if you generate a framesmatrix 10*10 open 10 pages at least the time it takes will be devided by 1000 ( in avg.) ( and of cause you will need something threadsafe/stable to safe the results.) sebastian -- 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] W2K Pro, IIS5.0 + PHP4.4 install trouble....
i just installed php on IIS5.01. i placed a file phpinfo.php in the webroot --- ?php phpinfo(); ? -- whatever i try i always get the following error : Warning opening 'c:\inetpub\wwwroot\phpinfo.php' for inclusion (include_path='') in unknown on line 0 i'm not sure what this include thing is about but on an old installation on a nt4.0 ihave nothing written in it.. if i write phpscripts they are executed perfectly, ?php echo ""test"; ? but i don't get any information from phpinfo ( which is pretty usefull..) any sugestions? sebastian
[PHP] could someone point me to a phpbased searchengine crawler?
I have a tool, that submits our clients pages to popular searchengines. now i need a script that crawls popular searchengines and look where our pages are ranked... i'm sure there must be something like that out there, but i can't find it Sebastian Stadtlich
[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 m_string.h #undef getpid #include process.h 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]
AW: [PHP] Non-existant folders??
hi you can do that by assigning custom error pages if you use apache. if you have access to the hhtp.conf place this in it : ErrorDocument 404 /redirect.php is you can't access httpd.conf you can hope that you are allowed to overide it by a .htaccess in redirect.php you need to parse the $REDIRECT_SCRIPT_URI to know what the user wanted to see. also you have to send a header("HTTP/1.1 200 OK");. otherwise apache will ad 404 by itself an IE will display it's stupid own errormessages sebastian Hi, I'm creating a little app whereby people will be able to create a simple site for themselves (maybe 10 html pages). here's the problem: say their company is called "companyname" and my site is called "www.mysite.com" i'd like their site to be located at "http://www.mysite.com/companyname" Is there a way i can do this without creating indivual folders for each company.I'd like the whole creation process to be automated. I'm sure the ftp functions in php would allow for the generation of new folders for each,but since all content/style etc. will be pulled from a DB it's seems to me a little pointless having all these folders with the same php page in each.essentially i'd like a php script to run automatically each time taking what looks like a folder name and making a call to the db using this name as a variable. easy,difficult or impossible? thanx, adrian -- 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 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 / 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]
AW: [PHP] url hide
you can do that by using a frames site that just has 1 frame(=the 'hidden' url). this is very weak , because the user just has to take a look at page properties to see the real URL. another aproach would be to wrap all access to your server through apache 404 to a php that opens the desired url with fopen and then parses the html for a href, etc and fixes them to links to your desird address. i doubt that this is a good idea for a heavy-traffic site or in case you try to steal some content that the admin of the other server will not notice that there are a lot of requests from your servers ip. sebastian -Ursprungliche Nachricht- Von: Eric Dahnke [mailto:[EMAIL PROTECTED]] Gesendet: Montag, 22. Januar 2001 12:24 An: [EMAIL PROTECTED] Betreff: Re: [PHP] url hide I just asked a similar question two hours ago, and would like to express my interest in this same question. Sorry it for a no answer response. AJDIN BRANDIC wrote: Perhaps not related to php but I was wandering, is it possible to hide site's real url and replace it with something else (some other URL). ie. someone clicks on a link on www.blah.co.uk which takes the user to an designated area (ie. /house-search/) on www.foo.co.uk. I want the user still to see www.blah.co.uk. This is just for aesthetic reasons since ones the user finishes the search for houses (on www.foo.co.uk/house-search/) he/she will return to www.blah.co.uk. I have tried www.javascripts.com but no success?? Thanks Ajdin -- 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 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 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]
[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 ?php // // +--+ // | PHP version 4.0 | // +--+ // | 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| // | 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: 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
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]
AW: [PHP] problem with rewind
[Sebastian Stadtlich] you are missing 2 times a ' $file = fopen (' http://ultra10:9000/cgi-bin/query?mss=search http://ultra10:9000/cgi-bin/query?mss=search ', "r"); ok? Sebastian Hi! I try use this code, but not work $file = fopen ( http://ultra10:9000/cgi-bin/query?mss=search http://ultra10:9000/cgi-bin/query?mss=search , "r"); if (!$file) { echo "pUnable to open remote file.\n"; exit; "rewind($file);" This is the error mesagge: "Warning: Unable to find file identifier 1 in /www/radar/busca.php3 " Why?? Telecom Internet Jorge Inti Benites Roche Tel: +54 (11)4968-6106 Gcia. Web Services