Hello!
I noticed that FCKeditor's PHP Connector doesn't work under Windows. Linux is work as expected.
The problem is in io.php file on line 156: $sRealPath = realpath( './' ) ;
Under windows $sRealPath will be "c:\....\editor\filemanager\connectors\php\".
That last backslash is the problem, it doesn't appear on linux systems. Thats why line 168
if ( $position === false || $position <> strlen( $sRealPath ) - strlen( $sSelfPath ) ) is true.
I suggest to change this:
$sRealPath = realpath( './' ) ;
to
$sRealPath = realpath( '.' ) ;
On linux systems these calls are equivalent, but under windows second one would work as expected.
I noticed that FCKeditor's PHP Connector doesn't work under Windows. Linux is work as expected.
The problem is in io.php file on line 156: $sRealPath = realpath( './' ) ;
Under windows $sRealPath will be "c:\....\editor\filemanager\connectors\php\".
That last backslash is the problem, it doesn't appear on linux systems. Thats why line 168
if ( $position === false || $position <> strlen( $sRealPath ) - strlen( $sSelfPath ) ) is true.
I suggest to change this:
$sRealPath = realpath( './' ) ;
to
$sRealPath = realpath( '.' ) ;
On linux systems these calls are equivalent, but under windows second one would work as expected.
Re: PHP Connector Compatiblity issue under Windows
I've run the PHP connector with no problems under XAMPP in Windows.
Re: PHP Connector Compatiblity issue under Windows
"In my experience PHP will automatically convert / marks to \ for file operations under windows."
In file operations, yes, but not in string comparison.
This is a php-bug is 5.2.4 and 5.2.5 (http://bugs.php.net/bug.php?id=43248)
Re: PHP Connector Compatiblity issue under Windows
I don't see any string comparison happening in the code you posted.
String *lengths* are being compared ... but not the strings themselves.
Perhaps just this:
Would ensure that no extra slashes are sat on the end.