Hi!
I stumbled across this when upgrading from PHP 5.0.5 to PHP 5.1.1
on my desktop box with Apache 1.3.30-something.
getCacheName() breaks when using '/' as directory separator on Windows.
This is because getCacheName() only conciders strings that start with
"<alnum>:\" to be windown drive+paths, but using '/ as the separator
works perfectly fine with Apache (I prefer to use '/' instead of '\\').
I submitted a ticket, but screwed things up when pasting the patch for
it. Stupid Wiki! Or more close to the truth; stupid me.
Attached is the patch.
Cheers,
Markus
--
Markus Lervik, CTO | "In God we Trust - all others
Necora Systems Ltd | must submit an X.509 certificate"
http://www.necora.fi | - Charles Forsythe
[EMAIL PROTECTED] | (X.509 certificate available at
+358-40-832 6709 | http://www.necora.fi/markus/x509.crt)
Index: D:/Projects/agavi/config/ConfigCache.class.php
===================================================================
--- D:/Projects/agavi/config/ConfigCache.class.php (revision 170)
+++ D:/Projects/agavi/config/ConfigCache.class.php (working copy)
@@ -221,7 +221,7 @@
public static function getCacheName ($config)
{
- if (strlen($config) > 3 && ctype_alpha($config{0}) &&
$config{1} == ':' && $config{2} == '\\') {
+ if (strlen($config) > 3 && ctype_alpha($config{0}) &&
$config{1} == ':' && ($config{2} == '\\' || $config{2} == '/')) {
// file is a windows absolute path, strip off the drive
letter
$config = substr($config, 3);
}
_______________________________________________
agavi-dev mailing list
[email protected]
http://labworkz.com/cgi-bin/mailman/listinfo/agavi-dev