Last few days i was trying to solve a path issue regarding the Fckeditor. I was using the editor with php.It was little bit annoying this time cause it took few hours to find out. The editor was working fine wihtout any problem. For no reason suddenly the editor started showing the error messge while i was tyring to upload an image with the html editor. Most of the time the error seems more or less like below :
-
Error creating folder '/Resources/ImageFile/image' {Can't create 'image' directory}
-
Not getting the UserFilesAbsolutePath.
Well the editor have a configuration file for solving this issue with php.Here we need to be sure for the following three lines of code.
- $Config['UseFileType'] = true ;
- $Config['UserFilesPath'] = ‘/Resources/ImageFile/’ ;
- $Config['UserFilesAbsolutePath'] = ‘D:/PHPWorks/alpha-v2/Resources/ImageFile/’ ;
Remember the file path for UserFilesAbsolutePath usually not given while we download Fckeditor. In few versions of fckeditor it works fine without this path. But to stop the error message if any we should enter an absolute path for the destination directory. In my case my server was a windows server. Thats why i used the absolute path like above.
Last but not least imoprtant issue is the chmod of the destination directory should be set to 777 that means the directory should be writable to upload an image in it.