win32 non pear path bug
Tom H
hellfrozeover at gmail.com
Mon Jan 15 16:48:44 PST 2007
The following error occurs under win32 when
examples/consumer/try_auth.php is run using Auth_OpenID directly
(copying Auth folder into the consumer folder, as suggested in the
readme):
Warning: main(Auth/OpenID.php): failed to open stream: No such file or
directory in \path\toAuth\OpenID\Consumer.php on line 167
This is because the code at the top of examples/consumer/common.php,
which sets the include path hard codes ":" as the path seperator, but
win32 uses ";" as the path seperator.
The PHP constant PATH_SEPARATOR can be used instead:
--- common_old.php 2007-01-16 00:34:26.213269400 +0000
+++ common.php 2007-01-16 00:34:32.947644400 +0000
@@ -2,7 +2,7 @@
$path_extra = dirname(dirname(dirname(__FILE__)));
$path = ini_get('include_path');
-$path = $path_extra . ":" . $path;
+$path = $path_extra . PATH_SEPARATOR . $path;
ini_set('include_path', $path);
/**
thanks,
Tommeh
More information about the Dev
mailing list