can't upload images in Gallery

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
bibliopegist
Forum Members
Forum Members
Posts: 19
Joined: Thu Sep 08, 2011 11:33 am

can't upload images in Gallery

Post by bibliopegist »

When I try I have a message that says "ERROR: invalid uploaddirectory"

I can use image manager with no problem

I am on a centos 6 OS, latest CMS
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: can't upload images in Gallery

Post by Dr.CSS »

We need way more info, what version CMSMS, did you move it, upgrade, did host change PHP, etc. etc...
bibliopegist
Forum Members
Forum Members
Posts: 19
Joined: Thu Sep 08, 2011 11:33 am

Re: can't upload images in Gallery

Post by bibliopegist »

did not move anything have my own dedicated server, all permissions granted, image uploader works fine, getting an error in log:
[error] [client ] Directory index forbidden by Options directive: /var/www/vhosts/auria-photo.com/httpdocs/uploads/images/Gallery/Nice/
[error] [client ] Directory index forbidden by Options directive: /var/www/vhosts/auria-photo.com/httpdocs/uploads/images/Gallery/


Cms Version: 1.11.7
Installed Modules:
CMSMailer: 5.2.1
CMSPrinting: 1.0.4
FileManager: 1.4.3
MenuManager: 1.8.5
MicroTiny: 1.2.5
ModuleManager: 1.5.5
News: 2.12.12
Search: 1.7.8
ThemeManager: 1.1.8
TinyMCE: 2.9.12
Gallery3: 0.1
Gallery: 1.6.1
AdvancedContent: 0.9.4.3
FormBuilder: 0.7.3
Showtime: 3.3
Bookmarks: 2.1
Gbook: 1.1
MysqlDump: 1.2.4

Config Information:
php_memory_limit:
process_whole_template:
max_upload_size: 16000000
url_rewriting: mod_rewrite
page_extension: .html
query_var: page
image_manipulation_prog: GD
auto_alias_content: true
locale:
default_encoding: utf-8
admin_encoding: utf-8
set_names: true

Php Information:
phpversion: 5.3.3
md5_function: On (True)
gd_version: 2
tempnam_function: On (True)
magic_quotes_runtime: Off (False)
E_STRICT: 0
E_DEPRECATED: 0
memory_limit: 64M
max_execution_time: 60
output_buffering: 4096
safe_mode: Off (False)
file_uploads: On (True)
post_max_size: 32M
upload_max_filesize: 16M
session_save_path: No check because open basedir active
session_use_cookies: On (True)
xml_function: On (True)
xmlreader_class: On (True)

Server Information:
Server Api: cgi-fcgi
Server Db Type: MySQL (mysqli)
Server Db Version: 5.1.69
Server Db Grants: Found a "GRANT ALL" statement that appears to be suitable
bibliopegist
Forum Members
Forum Members
Posts: 19
Joined: Thu Sep 08, 2011 11:33 am

Re: can't upload images in Gallery

Post by bibliopegist »

Should I assume that if I don't get any response to this problem the Gallery module is flawed and nothing can be done to fix it? It's fine as I can get around the flaws by loading images with Image-manager, still it would be better for clients to be able to work with a fully functioning module.
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am
Location: The Netherlands

Re: can't upload images in Gallery

Post by velden »

Of course it would be better for the customer to be able to use the Gallery upload module as it is more efficient (multiple upload) and takes care of some client side scaling.

Although I don't recognize the error you could try to add the uploads_path (and optionally uploads_url) to the config.php file of cmsms.

There is a CMSMS_config_reference.pdf in the /doc directory that explains the use.
User avatar
Jo Morg
Dev Team Member
Dev Team Member
Posts: 1967
Joined: Mon Jan 29, 2007 4:47 pm

Re: can't upload images in Gallery

Post by Jo Morg »

bibliopegist wrote:Should I assume that if I don't get any response to this problem the Gallery module is flawed and nothing can be done to fix it? It's fine as I can get around the flaws by loading images with Image-manager, still it would be better for clients to be able to work with a fully functioning module.
The module is functioning properly. However CMSMS doesn't support open basedir which may be interfering with Gallery.
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
bibliopegist
Forum Members
Forum Members
Posts: 19
Joined: Thu Sep 08, 2011 11:33 am

Re: can't upload images in Gallery

Post by bibliopegist »

OK, I fixed the open_basedir issue and still not functioning, so yes, there is a serious flaw with the module:
below is the new configuration


Cms Version: 1.11.7
Installed Modules:
CMSMailer: 5.2.1
CMSPrinting: 1.0.4
FileManager: 1.4.3
MenuManager: 1.8.5
MicroTiny: 1.2.5
ModuleManager: 1.5.5
News: 2.12.12
Search: 1.7.8
ThemeManager: 1.1.8
TinyMCE: 2.9.12
Gallery3: 0.1
Gallery: 1.6.1
AdvancedContent: 0.9.4.3
FormBuilder: 0.7.3
Showtime: 3.3
Bookmarks: 2.1
Gbook: 1.1
MysqlDump: 1.2.4

Config Information:
php_memory_limit:
process_whole_template:
max_upload_size: 16000000
url_rewriting: mod_rewrite
page_extension: .html
query_var: page
image_manipulation_prog: GD
auto_alias_content: true
locale:
default_encoding: utf-8
admin_encoding: utf-8
set_names: true

Php Information:
phpversion: 5.3.3
md5_function: On (True)
gd_version: 2
tempnam_function: On (True)
magic_quotes_runtime: Off (False)
E_STRICT: 0
E_DEPRECATED: 0
memory_limit: 64M
max_execution_time: 60
output_buffering: 4096
safe_mode: Off (False)
file_uploads: On (True)
post_max_size: 32M
upload_max_filesize: 16M
session_save_path: /tmp (1777)
session_use_cookies: On (True)
xml_function: On (True)
xmlreader_class: On (True)

Server Information:
Server Api: cgi-fcgi
Server Db Type: MySQL (mysqli)
Server Db Version: 5.1.69
Server Db Grants: Found a "GRANT ALL" statement that appears to be suitable
User avatar
Jo Morg
Dev Team Member
Dev Team Member
Posts: 1967
Joined: Mon Jan 29, 2007 4:47 pm

Re: can't upload images in Gallery

Post by Jo Morg »

bibliopegist wrote:OK, I fixed the open_basedir issue and still not functioning, so yes, there is a serious flaw with the module:below is the new configuration
This is a very interesting statement. Gallery is one of the most, if not the most downloaded/used non core module with about 579,052 downloads. You seem to be the only one complaining about this issue and stated mid August
bibliopegist wrote:Should I assume that if I don't get any response to this problem the Gallery module is flawed and nothing can be done to fix it?
However this error:
Directory index forbidden by Options directive
Just by googling I found a few interesting results assessing this is a server misconfiguration, which was something I already suspected:
Either the main httpd.conf or the .htaccess file in this directory or a nearby parent directory probably includes:
Options -Indexes
Your host may have to set it to +Indexes if you don't have access in .htaccess
It means there's no default document in that directory (index.html, index.php, etc...). On most webservers, that would mean it would show a listing of the directory's contents. But showing that directory is forbidden by server configuration (Options -Indexes)
Looks like someone disabled directory listing in Apache. If you are allowed to override it with .htaccess just place an .htaccess file in your root web directory with this information:
Options +Indexes
Mind you that it wasn't the help request that bothered me, but how easy it is for people to blame the module when a bit of patience and some research may solve things easily...
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am
Location: The Netherlands

Re: can't upload images in Gallery

Post by velden »

Looks like someone disabled directory listing in Apache. If you are allowed to override it with .htaccess just place an .htaccess file in your root web directory with this information:
Options +Indexes
I'm afraid I don't agree this time. Generally I think it's a bad idea to have Indexes on. It would reveal any file and sub directory to (malicious) visitors. And normally there is no reason to allow that.

I've checked two of my customers installs and one has it on and one off (easy to check by browsing to ;http://www.example.com/uploads/images/Gallery). Both sites work fine regarding uploading new images.
[error] [client ] Directory index forbidden by Options directive: /var/www/vhosts/auria-photo.com/httpdocs/uploads/images/Gallery/Nice/
[error] [client ] Directory index forbidden by Options directive: /var/www/vhosts/auria-photo.com/httpdocs/uploads/images/Gallery/
Not sure where this comes from but as it states '[client]' I'd assume it's a web browser (not php) that 'visits' both directories. Maybe it's the Flash uploader - that comes with Gallery - but then again, it should not be required to have indexes one.


Did you add the upload configuration options as I suggested earlier?
Last edited by Dr.CSS on Thu Feb 13, 2014 4:53 pm, edited 1 time in total.
Reason: Please use double quotes or something on fake links so they aren't clickable...
User avatar
Jo Morg
Dev Team Member
Dev Team Member
Posts: 1967
Joined: Mon Jan 29, 2007 4:47 pm

Re: can't upload images in Gallery

Post by Jo Morg »

velden wrote:I'm afraid I don't agree this time. Generally I think it's a bad idea to have Indexes on. It would reveal any file and sub directory to (malicious) visitors. And normally there is no reason to allow that.
+1, although my suggestion was to google for an answer....
I missed the one quote that was different, and another possible solution
...the simple solution is to create an empty index.html file in the directory ...
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
bibliopegist
Forum Members
Forum Members
Posts: 19
Joined: Thu Sep 08, 2011 11:33 am

Re: can't upload images in Gallery

Post by bibliopegist »

adding the index.html file in the directory does not help, same error and yes the path to the upload directory is in the config file.

The only settings for option indexes in my http.conf file are:
Options Indexes FollowSymLinks
IndexOptions FancyIndexing VersionSort NameWidth=* HTMLTable Charset=UTF-8

the .htaccess file in the upload directory is the one provided by the install, not modified.

And because I am the first one to mention this problem does not mean it's not happening on other, I'm not that special. The fact that the image uploader functions flawlessly leads me to believe that it's not a server issue.
User avatar
Jo Morg
Dev Team Member
Dev Team Member
Posts: 1967
Joined: Mon Jan 29, 2007 4:47 pm

Re: can't upload images in Gallery

Post by Jo Morg »

bibliopegist wrote:And because I am the first one to mention this problem does not mean it's not happening on other, I'm not that special.
Indeed. I just didn't like the "...seriously flawed..." and the "and nothing can be done to fix it?", when probably the module developer may not be around for this period of time, being summer and all...
Also, for this to be solved, assuming it's a bug, probably the developer may need a lot more info in order to try to reproduce it and eventually solve it. :)
If at all possible file a bug report with as much information as you can, trust me it helps.
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
bibliopegist
Forum Members
Forum Members
Posts: 19
Joined: Thu Sep 08, 2011 11:33 am

Re: can't upload images in Gallery

Post by bibliopegist »

By the way, thank you for helping, I really do appreciate your efforts, it's nice of you to spend the time on this problem.

Denis
bibliopegist
Forum Members
Forum Members
Posts: 19
Joined: Thu Sep 08, 2011 11:33 am

Re: can't upload images in Gallery

Post by bibliopegist »

Never said the module was flawed, read my post again:
"Should I assume that if I don't get any response to this problem the Gallery module is flawed and nothing can be done to fix it? "
all in the interrogative form. I did not suggest that it was flawed.
Before I open a bug report, I figured I ask the forum for help solving the problem.
bibliopegist
Forum Members
Forum Members
Posts: 19
Joined: Thu Sep 08, 2011 11:33 am

SOLVED: can't upload images in Gallery

Post by bibliopegist »

After adding path to directory in config file, setting basedirectory to none, and AFTER clearing cache, it works!!!!
Thanks
Locked

Return to “Modules/Add-Ons”