PDA

View Full Version : Adding pics in RC2 - Solution found! :-)


smeyer
18th of February 2004 (Wed), 02:15
I feel REALLY stupid asking this, but how do I add pics to my exhibitions in RC2? I cant seem to find that option? :o

Problem: The gallery is up and running; the old exhibitions are showing fine. I've made a new one, and uploaded all the pics, thumbs and microthumbs and I've set up the paths. Now where do I click to "batch add" the pics tho the exhibition?

/Steffen

Jussuff
18th of February 2004 (Wed), 02:29
Nothing is changed to former versions of EE regarding the upload procedure of photos. When you use the "Upload to database" feature of EE (of course in the "admin section") you have to decide in which exhibition and with which size the photos will be shown etc and just hit the "upload" button. That's it. -
After this the photos can be checked, titled, described etc. with the "photo editor" and when the changes or adjustments are confirmed they are visible to the public.

Pekka
18th of February 2004 (Wed), 02:52
I feel REALLY stupid asking this, but how do I add pics to my exhibitions in RC2? I cant seem to find that option? :o

Problem: The gallery is up and running; the old exhibitions are showing fine. I've made a new one, and uploaded all the pics, thumbs and microthumbs and I've set up the paths. Now where do I click to "batch add" the pics tho the exhibition?

/Steffen

Manual input system is disabled temporarily in RC 2. You must use the upload page.

smeyer
18th of February 2004 (Wed), 03:04
Thanks guys - piece of cake, when you know how! :D

smeyer
19th of February 2004 (Thu), 13:40
Thanks guys - piece of cake, when you know how! :D
Hmmm - I spoke to soon.

I just tried to add 40 pics to an exhibition, by uploading them manually to the UPLOAD-folder and then using "Upload to database". Result: 40 pics copied to the exhibition, only 19 thumbnails made and NO microthumbnails. I got no error-messages - it just stopped!

Then I deleted all, and tried with 10 pics in stead. All pics were copied, all 10 thumbnails made (weeeee!), but still no microthumbs, and no error-messages.

Hm - then I tried with only 3 pics, and now it performs as it is supposed to: all pics are copied and all thumbs and microthumbs are created.

What's going on ???

/Steffen

Pekka
19th of February 2004 (Thu), 14:06
Thanks guys - piece of cake, when you know how! :D
Hmmm - I spoke to soon.

I just tried to add 40 pics to an exhibition, by uploading them manually to the UPLOAD-folder and then using "Upload to database". Result: 40 pics copied to the exhibition, only 19 thumbnails made and NO microthumbnails. I got no error-messages - it just stopped!

Then I deleted all, and tried with 10 pics in stead. All pics were copied, all 10 thumbnails made (weeeee!), but still no microthumbs, and no error-messages.

Hm - then I tried with only 3 pics, and now it performs as it is supposed to: all pics are copied and all thumbs and microthumbs are created.

What's going on ???

/Steffen

What does you "PHP maxtime: XX" say on bottom left of editor page?

smeyer
20th of February 2004 (Fri), 00:51
What does you "PHP maxtime: XX" say on bottom left of editor page?
It says "PHP maxtime: 30"

/Steffen

smeyer
23rd of February 2004 (Mon), 01:03
Hmm - one of the pics is 622Kb, and cannot be uploaded before the upload times out. What should I do?

/Steffen

Pekka
23rd of February 2004 (Mon), 07:07
There are two ways to increase max time setting: one is to edit it in php.ini, the other is to add to .htaccess (or htaccess.txt in some servers) line

php_value max_execution_time 360

where 360 is maximum execution time in seconds.

If your server host can not accept either of these, then your only chance is to upload smaller photos, less at one time, use less and smaller sizes (and without watermark) or wait for 1.51 which will should have new code where one improvement is that you'll have a choice to use a method of uploading where one command is done at a time so that php's 30s basic time restriction can be overcome. A similar technical solution is used in EE Backup's "slow restore" command.

smeyer
24th of February 2004 (Tue), 10:04
If your server host can not accept either of these, then your only chance is to upload smaller photos, less at one time, use less and smaller sizes (and without watermark)
They couldn't (or rather wouldn't) - they are afraid that this will open up for all kinds of "heavy scripts" being executed on the server.

I guess it's small photos and a few at a time for now. Thanks anyway! :)

smeyer
24th of February 2004 (Tue), 11:38
I guess it's small photos and a few at a time for now. Thanks anyway! :)

Or not! I think I've found a work-around that seems to work for my purposes:

1. First I make the thumbs and microthumbs on my harddisk (as I would in earlier versions of EE)2. Then I ftp the microthumbs to the UPLOAD-directory on the server3. Now I use the "Upload to database" feature to add the microthumbs to the exhibition. Since the files are VERY small, php doesnt time out!4. And now (ta-daaaa!) I ftp the photos (real size), thumbs and microthumbs to the appropriate directories on the server.
I don't know if anyone else has this problem, but this method seems to make it possible to add larger numbers of pics, whithout timeout errors!

/Steffen

Evanrich
24th of February 2004 (Tue), 21:55
why not just upload the full size images manually to the upload folder, then have GD2 or imagemagick do the auto resizing for you? seems easier to me

smeyer
24th of February 2004 (Tue), 23:56
why not just upload the full size images manually to the upload folder, then have GD2 or imagemagick do the auto resizing for you? seems easier to me
I would love to, and it WOULD be easier, but as I wrote earlier in the thread: php times out, when I try doing that.

manutremo
25th of February 2004 (Wed), 12:44
There are two different settings that can cause your problem (I'm assuming you a re using apache+php).

First one is in php.ini, and is called upload_max_filesize. In my installation the default is 2M. This means that php will process data in a batch up to a maximum of 2Mb. If your batch is bigger, it will give you an error.

The other one I think to remember that was in the Apache configuration file, httpd.conf. It's marked with these lines:

#
# Timeout: The number of seconds before receives and sends time out.
#
Timeout 300

Change 300 to other number if your batches take longer to process.

I hope I have been of help.

Pekka
25th of February 2004 (Wed), 14:14
First one is in php.ini, and is called upload_max_filesize. In my installation the default is 2M. This means that php will process data in a batch up to a maximum of 2Mb. If your batch is bigger, it will give you an error.

That setting affects ONLY upload to UPLOAD folder, i.e it affects only the form on top of upload page.

The other one I think to remember that was in the Apache configuration file, httpd.conf. It's marked with these lines:

#
# Timeout: The number of seconds before receives and sends time out.
#
Timeout 300

Change 300 to other number if your batches take longer to process.

Apache does not ever time out because during upload it receives data to http, a technique used also in EE Backup.

What the problem is is PHP maximum execution time, for which there is no other workaround (if you can't change php.ini or use server directives like htaccess) than create a batch process queue and reload php page on each step of the batch, which is what will be done for EE soon after 1.5 release.