PHP Gallery System help

iosoft

PC enthusiast since MS DOS 5
Skilled
Hi

I need your suggestion on the image UPLOADING system for My Gallery.

This Gallery is a community gallery. Every user can upload (moderator will approve) just like a forum-system.

I am worried about the Image-Upload procedure.
Here are the steps -

1. Upload at most 5 images at a time through the form.
-for each image-
2. VALIDATE
3. The Images will be actually uploaded on a totally different Image Server - http://gallery.mysite.com/images/ (secondary server)
4. Upload-info will be added in the MySQL DB.
5. Create Thumbnail and store it in - http://gallery.mysite.com/images/TN/ (secondary server)
6. Watermark the main image.

As you can see that there are hell lots of steps.

Now, if I do all of the above in a single PHP script, there is a high chance that it will get 'time-out' or 'memory-out' by my server.
If I do it different scripts, user will see that pages gets redirected one after another. JUMPING JUMPING.
If I do this CORN based job, doesn't look good.

What do you suggest ?
 
No, due to some advance features, I have to build of my own.

Else too much Modification..... and also the CORE system is almost ready.

Just working of permission system and this uploading system.

Actually, currently using simple file upload method.

now want to enhance with the above features.
 
For your requirement, I don't think a cron job would cut it. Cause everytime a user uploads, it has to be called, and it may keep running forever depending on the number of uploads.

I guess you can do steps 1-4 in a single script. Validation for file extension, size, etc is better handled via javascript. Wouldn't need a very complex script to do that. As for watermarking, and thumbnail generation use gd or imagemagick bindings for php.

For example - Class: Thumbnail Party (thumbnail, watermark, imagemagick) - PHP Classes. It can automatically create a thumbnail and watermark the image for you. You can then store them in separate directories.
 
Back
Top