Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No Way is all over the place #476

Closed
AmrAlfoly opened this issue Mar 23, 2016 · 12 comments
Closed

No Way is all over the place #476

AmrAlfoly opened this issue Mar 23, 2016 · 12 comments

Comments

@AmrAlfoly
Copy link

i am using filemanager with Laravel and it works very well on my local machine but when i pushed the site to production the problems started and i managed to make the filemanager load correctly and to point to my files in public_html folder but when it loads all i can do is to upload one file correct and then it doesn't show it's thumbnail and when i try to enter any sub folders i got the No Way error
what will kill me is when i point the filemanager to my public directory outside the public_html it woks great but i can't use this folder , i have changed permissions to 0777 for both folders and i have read all the issues in your repo and followed a lot of the fixes they talk about but still nothing for me
hers is the code from my config file :
`

{
"_comment": "IMPORTANT : go to the wiki page to know about options configuration https://github.com/simogeo/Filemanager/wiki/Filemanager-configuration-file",
"options": {
"culture": "ar",
"lang": "php",
"theme": "default",
"defaultViewMode": "grid",
"autoload": true,
"showFullPath": false,
"showTitleAttr": false,
"browseOnly": false,
"showConfirmation": true,
"showThumbs": true,
"generateThumbnails": true,
"searchBox": true,
"listFiles": true,
"fileSorting": "default",
"chars_only_latin": true,
"splitterWidth": 250,
"splitterMinWidth": 250,
"dateFormat": "d M Y H:i",
"serverRoot": false,
"folder_path": "files/images/",
"fileRoot": "/",
"baseUrl": "/",
"logger": true,
"logfile": "mylog.txt",
"capabilities": ["select", "download", "rename", "delete", "replace"],
"plugins": []
},
"security": {
"allowFolderDownload": false,
"allowChangeExtensions": false,
"allowNoExtension": false,
"uploadPolicy": "DISALLOW_ALL",
"uploadRestrictions": [
"jpg",
"jpeg",
"gif",
"png",
"svg",
"txt",
"pdf",
"odp",
"ods",
"odt",
"rtf",
"doc",
"docx",
"xls",
"xlsx",
"ppt",
"pptx",
"csv",
"ogv",
"mp4",
"webm",
"m4v",
"ogg",
"mp3",
"wav"
]
},
"upload": {
"multiple": true,
"number": 5,
"overwrite": false,
"imagesOnly": false,
"fileSizeLimit": 16
},
"exclude": {
"unallowed_files": [
".htaccess",
"web.config"
],
"unallowed_dirs": [
"_thumbs",
".CDN_ACCESS_LOGS",
"cloudservers"
],
"unallowed_files_REGEXP": "/^./",
"unallowed_dirs_REGEXP": "/^./"
},
"images": {
"imagesExt": [
"jpg",
"jpeg",
"gif",
"png",
"svg"
],
"resize": {
"enabled":true,
"maxWidth": 960,
"maxHeight": 680
}
},
"videos": {
"showVideoPlayer": true,
"videosExt": [
"ogv",
"mp4",
"webm",
"m4v"
],
"videosPlayerWidth": 400,
"videosPlayerHeight": 222
},
"audios": {
"showAudioPlayer": true,
"audiosExt": [
"ogg",
"mp3",
"wav"
]
},
"edit": {
"enabled": false,
"lineNumbers": true,
"lineWrapping": true,
"codeHighlight": false,
"theme": "elegant",
"editExt": [
"txt",
"csv"
]
},
"customScrollbar": {
"enabled": true,
"theme": "inset-2-dark",
"button": true
},
"extras": {
"extra_js": [],
"extra_js_async": true
},
"icons": {
"path": "images/fileicons/",
"directory": "_Open.png",
"default": "default.png"
},

}`

@simogeo
Copy link
Owner

simogeo commented Mar 23, 2016

What is this `"folder_path": "files/images/" about in your config file ?

use fileRoot and serverRoot :

@AmrAlfoly
Copy link
Author

i have removed the "folder_path" form the configuration file and used the instructions in your link to specify a user folder but i got this error

The directory /files/images/ does not exist.

the folder i am trying to point to is not at the same level as filemanager folder in my public directory
so files/images is besides filemanager folder
how can i point to the filemanager script to it then ?

@AmrAlfoly
Copy link
Author

and if i tried to point to the files folder it doesn't work as mentioned in the wiki page i had to set serverRoot to false and filesRoot to files and i get this error

filemtime(): stat failed for /var/www/alamya/public/filesalbums
the script is trying to list the folder in it (albums) is one of them but it fails
what is the problem?

@psolom
Copy link
Collaborator

psolom commented Mar 24, 2016

filemtime(): stat failed for /var/www/alamya/public/filesalbums
the script is trying to list the folder in it (albums) is one of them but it fails
what is the problem?

What is your OS?
I faced similar problem on Windows. As I remebmer the issue was occured due to filenames in cp1251 encoding which is utilized in Windows OS. Anyway try to remove gaps in your filenames and any special chars.

@AmrAlfoly
Copy link
Author

i am using Ubuntu which is a Linux distro and there is no gaps in the folder names even i tried to point the script to an empty folder the script loads without errors but when i try to create sub folder or upload an image it creates/upload outside the folder for example :
my folder name was test and the scripts loaded very good without errors and i created a folder named mine inside it using the script i found that the folder created outside the test folder and it's name is testmine
please help

@simogeo
Copy link
Owner

simogeo commented Mar 24, 2016

/var/www/alamya/public/filesalbums

it seems at least, on '/' is missging, no ?

Try to enable log and see what's happening related to paths : https://github.com/simogeo/Filemanager/wiki/Enable-log-debug-in-PHP-connector

@AmrAlfoly
Copy link
Author

here is the output of the log file

[24/03/2016 04:54:57]#127.0.0.1#Filemanager::enableLog - Log enabled (in filemanager_log.txt file)
[24/03/2016 04:54:57]#127.0.0.1#Filemanager::__construct $this->root value /var/www/alamya/public/filemanager/
[24/03/2016 04:54:57]#127.0.0.1#Filemanager::__construct $this->path_to_files /var/www/alamya/public/files/images/
[24/03/2016 04:54:57]#127.0.0.1#Filemanager::__construct $this->doc_root value /var/www/alamya/public
[24/03/2016 04:54:57]#127.0.0.1#Filemanager::__construct $this->separator value images
[24/03/2016 04:54:57]#127.0.0.1#Filemanager::setFileRoot $this->doc_root value overwritten : /var/www/alamya/public//var/www/alamya/public/files/images/
[24/03/2016 04:54:57]#127.0.0.1#Filemanager::setFileRoot $this->dynamic_fileroot value /files/images/
[24/03/2016 04:54:57]#127.0.0.1#Filemanager::setFileRoot $this->path_to_files /var/www/alamya/public//var/www/alamya/public/files/images/
[24/03/2016 04:54:57]#127.0.0.1#Filemanager::setFileRoot $this->separator value images
[24/03/2016 04:54:57]#127.0.0.1#substr path : /
[24/03/2016 04:54:57]#127.0.0.1#real path : /
[24/03/2016 04:54:57]#127.0.0.1#Filemanager::error - error message : The directory /files/images/ does not exist.
[24/03/2016 04:54:57]#127.0.0.1#Filemanager::enableLog - Log enabled (in filemanager_log.txt file)
[24/03/2016 04:54:57]#127.0.0.1#Filemanager::__construct $this->root value /var/www/alamya/public/filemanager/
[24/03/2016 04:54:57]#127.0.0.1#Filemanager::__construct $this->path_to_files /var/www/alamya/public/files/images/
[24/03/2016 04:54:57]#127.0.0.1#Filemanager::__construct $this->doc_root value /var/www/alamya/public
[24/03/2016 04:54:57]#127.0.0.1#Filemanager::__construct $this->separator value images
[24/03/2016 04:54:57]#127.0.0.1#Filemanager::setFileRoot $this->doc_root value overwritten : /var/www/alamya/public//var/www/alamya/public/files/images/
[24/03/2016 04:54:57]#127.0.0.1#Filemanager::setFileRoot $this->dynamic_fileroot value /files/images/
[24/03/2016 04:54:57]#127.0.0.1#Filemanager::setFileRoot $this->path_to_files /var/www/alamya/public//var/www/alamya/public/files/images/
[24/03/2016 04:54:57]#127.0.0.1#Filemanager::setFileRoot $this->separator value images
[24/03/2016 04:54:57]#127.0.0.1#substr path : /
[24/03/2016 04:54:57]#127.0.0.1#real path : /
[24/03/2016 04:54:57]#127.0.0.1#Filemanager::error - error message : The directory /files/images/ does not exist.

@simogeo
Copy link
Owner

simogeo commented Mar 24, 2016

$this->path_to_files /var/www/alamya/public//var/www/alamya/public/files/images/

sould be :

$this->path_to_files /var/www/alamya/public/files/images/

what do you pass as parameter to setFileRoot() ?

@AmrAlfoly
Copy link
Author

i don't my config file is up you can check it
i am using your repo through this laravel repo
https://github.com/bestmomo/filemanager
and i maid all the configurations your wiki pages says

@simogeo
Copy link
Owner

simogeo commented Mar 24, 2016

I don't technically know that connector but see here : https://github.com/bestmomo/filemanager/blob/master/public/filemanager/connectors/php/default.config.php#L87

You may ask support for bestmomo ?

@AmrAlfoly
Copy link
Author

once i have removed this line the script worked good
i am a week after my delivery date because of this mistake
i guess in this week i have met with all the errors that might happen with your script
and it turns out that it was someone else's mistake
thank you for your response you really saved my day
how can i pay back ?

@simogeo
Copy link
Owner

simogeo commented Mar 24, 2016

You can make a donation.

I'm also ok with gratefulness you already expressed. Some people don't even thank after having a problem solved - of course, I hate this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants