|
Posted by kenoli on 10/12/06 19:40
I was referred to a great script for creating thumbnails of uploaded
images from someone on this list. I have been adapting it so it works
for several image formats and so I can use it to upload images to a
contacts database.
I thought I was doing great. It seemed to be working when I used my
computer as the php server. Once I uploaded it to my web server,
however, it totally broke. I figured out that the reason it was
working on my server is that I was linking to images that were in my
site directory. It broke on my computer as well the remote server when
I linked to images in another directory on my computer. But it breaks
even worse on the remote server.
I am obviously having a problem understanding how to get paths right,
how the php image upload process actually works and probably some other
things I don't understand I don't understand.
I don't actually have to keep an upload of the original image on the
remote server, only need to hold it in memory or in a temporary
directory in order to "read" it into the php script. This script
doesn't just resixe the image but rescans it to a new size and puts it
into a new image file.
What this script is supposed to do is to let you upload an image,
indicate max width and height dimensions, rescan the image to be within
those parameters and display the image in its new size.
I have provided full permissions to relevant directories so this would
not be a problem for the script. I know there are lots of security and
error checking issues and script refinements that need to be addressed,
but I am trying now to get the core script to work.
The files are in a zip file here:
http://www.communityassemblies.org/thumb_script/files/
You can see the script fail here:
http://www.communityassemblies.org/thumb_script/
Thanks in advance for any help on this.
--Kenoli
[Back to original message]
|