Ticket #2124 (closed Bug: fixed)

Opened 7 years ago

Last modified 7 years ago

Path problem under Windows

Reported by: tgabi333 Owned by:
Priority: Normal Milestone: FCKeditor 2.6.1
Component: Server : PHP Version:
Keywords: Confirmed HasPatch Cc:



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( './' ) ;


$sRealPath = realpath( '.' ) ;

On linux systems these calls are equivalent, but under windows second one would work as expected.


2124.patch (1.1 KB) - added by wwalc 7 years ago.
2124_1.patch (542 bytes) - added by wwalc 7 years ago.

Change History

comment:1 Changed 7 years ago by w.olchawa

  • Keywords Pending WorksForMe added; php windows path removed
  • Milestone FCKeditor 2.6.1 deleted

Could you please specify what server on Windows are you using (Apache , IIS , something else)? Have you encountered problems with uploading while using the php connector? In my case it works fine using Apache 1.6.4 on Windows XP.

comment:2 Changed 7 years ago by tgabi333

My Windows system:

Vista business with Zend Core:

Zend Core Version 2.5.0

PHP Version 5.2.4

Zend Engine Version 2.2.0

Server API cgi-fcgi

Server Software Apache/2.2.4 (Win32)

Yes, I tried both uploading files and the provided test.html under /editor/filemanager/connectors/ directory.

It writes "Sorry, can't map "UserFilesPath" to a physical path. You must set the "UserFilesAbsolutePath" value in "editor/filemanager/connectors/php/config.php"

comment:3 Changed 7 years ago by wwalc

  • Keywords Confirmed HasPatch added; Pending WorksForMe removed
  • Milestone set to FCKeditor 2.6.1

Changed 7 years ago by wwalc

comment:4 Changed 7 years ago by wwalc

  • Status changed from new to closed
  • Resolution set to fixed

Fixed with [1942].

comment:5 Changed 7 years ago by alfonsoml

  • Status changed from closed to reopened
  • Resolution fixed deleted

I've uploaded a nightly to my server at http://martinezdelizarrondo.com/easyupload/ and it did raise an error stating that it couldn't create the folder, removing this change did fix the issue, so I guess that it should be reviewed better as more people might face the same problem.

comment:6 Changed 7 years ago by wwalc

Interesting... could you create a script with phpinfo() command and post a link to it? What are your settings in config.php? What are the permissions to each directory (to the target directory and all directories above)?

Sorry for all those questions but it works fine on my test servers.

comment:7 Changed 7 years ago by alfonsoml

This is the link to phpinfo(): http://www.martinezdelizarrondo.com/wiktor.php

The php connector is just the default, with this patch removed and the patch to fix the quickupload problem applied. And of course a nice $Config['Enabled'] = true ;

The permissions to /html/userfiles is 777 and its parent (root of the public web) /html/ is 750

Changed 7 years ago by wwalc

comment:8 Changed 7 years ago by wwalc

  • Status changed from reopened to closed
  • Resolution set to fixed

Fixed with [1998]. During tests I focused on windows servers and completely missed that I used wrong function to strip character only at the end of string. The correct funstion is of course rtrim.

Note: See TracTickets for help on using tickets.
© 2003 – 2012 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy