Thread: [Phpfreechat-svn] SF.net SVN: phpfreechat: [749] trunk/src/client/proxy.php.tpl
Status: Beta
Brought to you by:
kerphi
From: <ke...@us...> - 2006-09-11 11:18:03
|
Revision: 749 http://svn.sourceforge.net/phpfreechat/?rev=749&view=rev Author: kerphi Date: 2006-09-11 04:17:57 -0700 (Mon, 11 Sep 2006) Log Message: ----------- [en] Bug fix: on some servers (free.fr) the realpath() php function is not returning FALSE when the file is missing. [fr] Bug fix: sur certains serveurs (free.fr) la fonction php realpath() ne retourne pas FALSE lorsque le fichier cible n'existe pas. Modified Paths: -------------- trunk/src/client/proxy.php.tpl Modified: trunk/src/client/proxy.php.tpl =================================================================== --- trunk/src/client/proxy.php.tpl 2006-09-10 20:47:57 UTC (rev 748) +++ trunk/src/client/proxy.php.tpl 2006-09-11 11:17:57 UTC (rev 749) @@ -13,7 +13,7 @@ foreach($allowedpath as $ap) { $f = realpath($ap."/".$page); - if ($f !== FALSE) $files[] = $f; + if ($f !== FALSE && file_exists($f)) $files[] = $f; } $found = ""; for( $i = 0; $i < count($allowedpath) && $found == ""; $i++) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2006-09-20 18:32:27
|
Revision: 775 http://svn.sourceforge.net/phpfreechat/?rev=775&view=rev Author: kerphi Date: 2006-09-20 11:31:54 -0700 (Wed, 20 Sep 2006) Log Message: ----------- [en] Bug fix: the proxy.php loading was very long with gzhandler enabled (thanks to Alexander Blach from http://www.freakboard.de). [fr] Bug fix : le fichier proxy.php chargait tres lentement les pages lorsque gzhandler etait active (merci a Alexander Blach de http://www.freakboard.de) Modified Paths: -------------- trunk/src/client/proxy.php.tpl Modified: trunk/src/client/proxy.php.tpl =================================================================== --- trunk/src/client/proxy.php.tpl 2006-09-20 09:49:20 UTC (rev 774) +++ trunk/src/client/proxy.php.tpl 2006-09-20 18:31:54 UTC (rev 775) @@ -39,5 +39,5 @@ header("Content-Type: ".$contenttype); session_cache_limiter('public'); echo file_get_contents($file); - +flush(); // needed to fix problems with gzhandler enabled ?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2006-10-06 07:53:30
|
Revision: 823 http://svn.sourceforge.net/phpfreechat/?rev=823&view=rev Author: kerphi Date: 2006-10-06 00:53:24 -0700 (Fri, 06 Oct 2006) Log Message: ----------- [en] Bug fix: try to fix slow loading (>60sec) with gzip php output module [1h00] [fr] Bug fix : essai de r?\195?\169solution du probl?\195?\168me de chargement lent (>60sec) lorsque le module gzip est activ?\195?\169 dans php [1h00] Modified Paths: -------------- trunk/src/client/proxy.php.tpl Modified: trunk/src/client/proxy.php.tpl =================================================================== --- trunk/src/client/proxy.php.tpl 2006-10-06 06:35:09 UTC (rev 822) +++ trunk/src/client/proxy.php.tpl 2006-10-06 07:53:24 UTC (rev 823) @@ -1,5 +1,10 @@ <?php +// gzip compression should not be used because it can slowdown a lot the page loading (>60 seconds!) +ini_set('zlib.output_compression','Off'); + +ob_start(); // start capturing output + $rootpath = dirname(__FILE__)."/../../"; $allowedpath = array(); @@ -29,15 +34,27 @@ else $file = $found; +// setup the HTTP cache +// @todo understand how it really works +session_cache_limiter('public'); + +// output the file content +readfile($file); + +// output HTTP headers $contenttype = "text/plain"; -$contentlength = filesize($file); +//$contentlength = filesize($file); if (preg_match("/.js$/", $file)) $contenttype = "text/javascript"; else if (preg_match("/.css$/", $file)) $contenttype = "text/css"; +header("Content-Type: ".$contenttype); +$contentlength = ob_get_length(); header("Content-Length: ".$contentlength); -header("Content-Type: ".$contenttype); -session_cache_limiter('public'); -echo file_get_contents($file); -flush(); // needed to fix problems with gzhandler enabled + +// As far as I can tell the only way to mimic ob_flush()'s behaviour on PHP < 4.2.0 is calling ob_end_flush() followed by ob_start(). +// http://fr.php.net/manual/en/function.ob-flush.php#28477 +ob_end_flush(); +ob_start(); + ?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2006-10-17 07:44:50
|
Revision: 834 http://svn.sourceforge.net/phpfreechat/?rev=834&view=rev Author: kerphi Date: 2006-10-17 00:44:45 -0700 (Tue, 17 Oct 2006) Log Message: ----------- [en] Fix some missing content types in the proxy.php.tpl file. (thanks to bcc) [15min] [fr] Ajout de plusieurs types de fichiers manquants dans le fichier proxy.php.tpl (merci ?\195?\160 bcc) [15min] Modified Paths: -------------- trunk/src/client/proxy.php.tpl Modified: trunk/src/client/proxy.php.tpl =================================================================== --- trunk/src/client/proxy.php.tpl 2006-10-16 18:00:41 UTC (rev 833) +++ trunk/src/client/proxy.php.tpl 2006-10-17 07:44:45 UTC (rev 834) @@ -44,10 +44,18 @@ // output HTTP headers $contenttype = "text/plain"; //$contentlength = filesize($file); -if (preg_match("/.js$/", $file)) +if (preg_match("/\.js$/", $file)) $contenttype = "text/javascript"; -else if (preg_match("/.css$/", $file)) +else if (preg_match("/\.css$/", $file)) $contenttype = "text/css"; +else if (preg_match("/\.gif$/", $file)) + $contenttype = "image/gif"; +else if (preg_match("/\.jpg$/", $file)) + $contenttype = "image/jpeg"; +else if (preg_match("/\.jpeg$/", $file)) + $contenttype = "image/jpeg"; +else if (preg_match("/\.png$/", $file)) + $contenttype = "image/png"; header("Content-Type: ".$contenttype); $contentlength = ob_get_length(); header("Content-Length: ".$contentlength); @@ -57,4 +65,4 @@ ob_end_flush(); ob_start(); -?> \ No newline at end of file +?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2006-11-05 18:14:49
|
Revision: 866 http://svn.sourceforge.net/phpfreechat/?rev=866&view=rev Author: kerphi Date: 2006-11-05 10:14:36 -0800 (Sun, 05 Nov 2006) Log Message: ----------- [en] Ignore the ini_set warnings. It can occurs on servers which have disabled it for security reasons. [10min] [fr] Ignore les warnings de ini_set. Ceci peut arriver lorsque le serveur a d?\195?\169sactiv?\195?\169 cette fonction pour raison de s?\195?\169curit?\195?\169. [10min] Modified Paths: -------------- trunk/src/client/proxy.php.tpl Modified: trunk/src/client/proxy.php.tpl =================================================================== --- trunk/src/client/proxy.php.tpl 2006-11-05 11:09:12 UTC (rev 865) +++ trunk/src/client/proxy.php.tpl 2006-11-05 18:14:36 UTC (rev 866) @@ -1,7 +1,7 @@ <?php // gzip compression should not be used because it can slowdown a lot the page loading (>60 seconds!) -ini_set('zlib.output_compression','Off'); +@ini_set('zlib.output_compression','Off'); ob_start(); // start capturing output This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |