Ticket #2124 (closed Bug: fixed)
Path problem under Windows
| Reported by: | tgabi333 | Owned by: | |
|---|---|---|---|
| Priority: | Normal | Milestone: | FCKeditor 2.6.1 |
| Component: | Server : PHP | Version: | |
| Keywords: | Confirmed HasPatch | Cc: |
Description
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
| $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.
Attachments
Change History
comment:1 Changed 5 years ago by w.olchawa
- Keywords Pending WorksForMe added; php windows path removed
- Milestone FCKeditor 2.6.1 deleted
comment:2 Changed 5 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 5 years ago by wwalc
- Keywords Confirmed HasPatch added; Pending WorksForMe removed
- Milestone set to FCKeditor 2.6.1
It's a PHP bug: http://bugs.php.net/bug.php?id=43248
comment:4 Changed 5 years ago by wwalc
- Status changed from new to closed
- Resolution set to fixed
Fixed with [1942].
comment:5 Changed 5 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 5 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 5 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

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.