• Welcome to the Chevereto user community!

    Here users from all over the world gather around to learn the latest about Chevereto and contribute with ideas to improve the software.

    Please keep in mind:

    • This community is user driven. Be polite with other users.
    • We recommend purchasing a Chevereto license to participate in this community.
    • Purchase a Community Subscription to get even faster ticket response times.

Can't upload multiple images

Status
Not open for further replies.

wout000

Chevereto Member
http://www.stfimages.com/

I can upload single images just fine, but multiple images just redirect back to the homepage or give me the error that no images have been uploaded.

Error reporting is on yet no errors are being shown.
 
Mcmar said:
tried reuploading config, etc? xD
Yeah, nothing wrong in that.

Danny.Domb said:
Could you activate error debugging in your config.php files, it will help us, help you =P
Error reporting is on, no errors are being shown

Rodolfo said:
Likely to be a session issue.
Read this: http://chevereto.com/forums/topic1417-solved-unable-to-upload-multiple-images.html

In config.php add this before ?>
PHP:
session_save_path (__CHV_ROOT_DIR__) ;

Did that, didn't work.

What i get now when uploading multiple images is the "no images were uploaded" message.
 
Told you.. session issue:

Code:
<br />
<b>Warning</b>:  session_start() [<a href='function.session-start'>function.session-start</a>]: open(/home/stfimages/domains/stfimages.com/public_html//sess_99a7662a26645aeaa6fbe225e1bbb966, O_RDWR) failed: Permission denied (13) in <b>/home/stfimages/domains/stfimages.com/public_html/includes/uploader.php</b> on line <b>34</b><br />
<br />
<b>Warning</b>:  session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cache limiter - headers already sent (output started at /home/stfimages/domains/stfimages.com/public_html/includes/uploader.php:34) in <b>/home/stfimages/domains/stfimages.com/public_html/includes/uploader.php</b> on line <b>34</b><br />
{"ImgName":"zUTPJ.png"}

Go to your hosting company and tell them that php can't write/read sessions.
 
I am my own hosting company, lol.

It's a dedicated server. I have several, i'll host it on another one that i know works.
I'll have to see why this one doesn't allow it..

thanks.
 
Well this is just plain weird.

I know the sessions work, cause i added a line in the .htaccess file with the correct directory to it

Code:
php_value session.save_path /home/stfimages/tmp/
And the folder get's populated by sessions when i try and upload more than 1 image, yet it still says 'no images uploaded'

Rodolfo, where did you get those errors? i never get any errors...

*EDIT*

I take that back, apparently the .htaccess way isn't a good solution, now it gives me the same 'no image uploaded' when i try and upload 1 file
 
To fetch that error you must open your console log (i.e. Firebug, chrome inspector, etc) and do a remote upload. has you can see the error is clear: Session permissions.

This means that php can store sessions but can't read it back, bla bla bla. Permissions are not correct. This is normal to happen in dedicated servers because people don't set up this.
 
Rodolfo said:
To fetch that error you must open your console log (i.e. Firebug, chrome inspector, etc) and do a remote upload. has you can see the error is clear: Session permissions.

This means that php can store sessions but can't read it back, bla bla bla. Permissions are not correct. This is normal to happen in dedicated servers because people don't set up this.

It's weird, i use the normal /tmp folder like 99% of the people do and run a PHPBB board on that server which has no issues.
 
Yeah but that doesn't mean that this website setup couldn't be wrong.
 
True but then it means that adding session_save_path (__CHV_ROOT_DIR__) ; to my config file should take care of it and it doesn't.

*EDIT*

So this is what i did:

1. SSH'ed into my server as root
2. set the permissions on the tmp directory to 1777
3. checked the permissions using ls -ld /tmp

Permissions are fine. I find this extremely weird.
 
I decided to install this on a clean dedicated server.
Same issues. /tmp is writeable and can be read from but the chevereto script can't seem to do it.

The session_save_path (__CHV_ROOT_DIR__) ; fix doesn't work.

Any other ideas?
 
Send me your FTP details to inbox@chevereto.com I have to sneak around.
 
Ok, I have test and you know what? Is a session issue (told you)

Setting up the root dir to store sessions (and then upload files) you will notice that session files are not written on the root dir, php sessions are just files that normally are stored on /tmp but in this case to prove that PHP can't write sessions I have forced the session save path to the root.

Once multiple images are uploaded, they go to ?uploaded and you will see this (if you have error_reporting enabled):
HTML:
Warning: session_start() [function.session-start]: open(/home/stfimages/domains/stfimages.com/public_html//sess_fe6a522f4e0ee582846a24eb6172693d, O_RDWR) failed: Permission denied (13) in /home/stfimages/domains/stfimages.com/public_html/includes/classes/class.handler.php on line 98

Now, you will get this error when you remove the @ before session_start() in uploader.php
HTML:
onComplete response: 
Warning: session_start() [function.session-start]: open(/home/stfimages/domains/stfimages.com/public_html//sess_fe6a522f4e0ee582846a24eb6172693d, O_RDWR) failed: Permission denied (13) in /home/stfimages/domains/stfimages.com/public_html/includes/uploader.php on line 33

You may think that the error is because the double slash, well.. Nope. Doing this will get rid of the extra slash:

PHP:
session_save_path("/home/stfimages/domains/stfimages.com/public_html");

And the error is still on. A final workaround was create the folder "sessions" on the root folder of Chevereto and assign 755 permission and finally you will notice that sessions are being created but php can't read them. Sessions are being stored with permission 600 that means that only the owner can read/write so if php (apache) can'tread/write is because apache is not in the owner group, so he can't touch the file anymore.

As I told you long before, php can't read the sessions files, is not a matter of folder permissions is a matter of how you are running apache. If apache where owner, you didn't even need to have 777 permission on your images folder.

Since you are making this server, I will strongly recommend that you always, always use updated software. You are running php 5.2 for instance, I'm sure that your kernel is also outdated. Try to run last php with php fpm... Anyway I'm not qualified to give you assistance in server setup but there are users in this forum that really know how to tune up servers.

By the way, I have updated your Chevereto to 2.0.18, you was running 2.0.12
 
It was a clean server so i haven't done anything on it, that's why there are some outdated packages.
What i'm seeing is that this might be a bug related to PHP.

Anyway i fixed it by adding this

Code:
$dirname = dirname(__FILE__);
session_save_path($dirname.'/tmp/cache');

To the end of my config file and making sure there is a /tmp/cache/ folder under 'includes'
chmod the tmp/cache to 1777 and we're good to go.
 
Status
Not open for further replies.
Back
Top