2b3ez / FileManager4TinyMCE

Plugin for manage and upload file for TinyMCE 4
151 stars 74 forks source link

On my server OK, on another, no thumbs displayed #9

Closed lordfpx closed 11 years ago

lordfpx commented 11 years ago

Hi !

I've got a big problem. Everything is working fine on my server. I gave it to someone and he put it on his server. Thumbs folder was set to the correct chmod (777). Pictures are correctly uploaded, thumbs are correctly generated (we checked both folders), but the popup doesn't display thumbs.

Any suggestions ?

Thanks a lot !

arndta commented 11 years ago

Odd, do you happen to a url I can look at where it's happening?

On Thu, Jun 13, 2013 at 10:51 AM, lordfpx notifications@github.com wrote:

Hi !

I've got a big problem. Everything is working fine on my server. I gave it to someone and he put it on his server. Thumbs folder was set to the correct chmod (777). Pictures are correctly uploaded, thumbs are correctly generated (we checked both folders), but the popup doesn't display thumbs.

Any suggestions ?

Thanks a lot !

— Reply to this email directly or view it on GitHubhttps://github.com/2b3ez/FileManager4TinyMCE/issues/9 .

lordfpx commented 11 years ago

Unfortunately, I can't provide an URL. But here is a part of my config.php :

$root = rtrim($_SERVER['DOCUMENT_ROOT'],'/'); // don't touch this configuration

$path = dirname($_SERVER['PHP_SELF']); $path2 = str_replace("admin/js/tinymce/plugins/filemanager", "map", $path); $base_url = ""; //url base of site if you want only relative url leave empty $upload_dir = $path2.'/img_upload/'; // path from base_url to upload base dir $current_path = '../../../../../map/img_upload/'; // relative path from filemanager folder to upload files folder

As you can see, my upload folder is not inside TinyMCE, but in another place. Here is the structure of both the front and back end. Pictures are uploaded in the frontend folder : admin/js/tinymce/plugins/filemanager map/img_upload/

trippo commented 11 years ago

the thumbs on file/image list are displayed?

lordfpx commented 11 years ago

No, that's the problem actually, the image list is blank even if pictures are in the upload and thumbs dir. Both directories have write permission.

lordfpx commented 11 years ago

could it be a problem of $_SERVER['DOCUMENT_ROOT'] ? Why is it necessary to get the root of the server ?

trippo commented 11 years ago

Because the php functions must have the full path, if you give me your folders trees i can understand the error

lordfpx commented 11 years ago

Here is where pictures are correctly put : admin/js/tinymce/plugins/filemanager/thumbs map/img_upload/

And here is the full structure : http://pastebin.com/y1y4pDa6

lordfpx commented 11 years ago

Maybe I found a workaround, can you tell me if it works for you ? I only changed this line in the dialog.php file : from $files = scandir($root . $cur_dir); to $files = scandir($current_path);

It works on my server (online and local), I don't know yet if it will on my client server.

trippo commented 11 years ago

in my server this configuration don't work but if work in your is ok :)

lordfpx commented 11 years ago

I guess the problem is not fixed anyway since servers can have different $_SERVER['DOCUMENT_ROOT'] configurations. Maybe a good deals would be to use a different path management more "bullet proof" ?