Ticket #560 (closed Bug: fixed)
Try to autodetect virtual paths in the php connector
| Reported by: | alfonsoml | Owned by: | alfonsoml |
|---|---|---|---|
| Priority: | Normal | Milestone: | FCKeditor 2.5 Beta |
| Component: | Server : PHP | Version: | SVN |
| Keywords: | Cc: |
Description
realpath fails in PHP if the target directory doesn't exist, so it can't be used directly as server.mapPath in asp to get the proper physical path for a url, but I think that it should be possible to get up in the url path until it gets a match and then append the missing directories.
so it should go like this:
/john/userfiles/images/
-> it doesn't exit, then check
/john/userfiles/
-> it doesn't exit, then check
/john/
-> its physical path is /home/users/john/ , so we end up with a physical path of /home/users/john/userfiles/images/
The difference with the current method (if UserFilesAbsolutePath isn't specified) is that currently it would try to get the realPath of / that it can be /public/html and so it puts the files in /public/html/john/userfiles/images/
I just hope that it works fine