Page 1 of 1

image upload problem, files are not being uploaded.

Posted: Fri Feb 27, 2009 6:27 pm
by crazytopu
Please help!

I have written a class that resize images. The test script is working fine on my local server which runs php5. In my hosting package I have php 5 too. The problem I am getting is, while trying to upload an image for the first time the image directories are not being automatically created and hence no actual files are being transferred. Could you be kind enough to see if you can run this script on your server (local/remote) and can upload images. And I would also like to know what you may think that is stopping these directories to be created. I talked to the technical support and they said all write permissions have been granted. It's worth mentioning there is no database involved although the script prints a test sql command and a confirmation msg after a file is uploaded successfully. But so far that's just an illusion and still no images are actually being uploaded.

You can try it yourself by clicking on here : http://www.pinedacovalin.co.uk/chobi/index.php

Here is the link for the script: http://www.pinedacovalin.co.uk/chobi.zip

Please run the index.php file and see if you can diagnose anything in there.

I very much appreciate your help.

Re: image upload problem, files are not being uploaded.

Posted: Sat Feb 28, 2009 12:26 pm
by php_east
crazytopu wrote: I talked to the technical support and they said all write permissions have been granted.
no, write permission could not have been granted for new directories you created.
they have to be specifically chmodded.

what the host meant was that write permission have been granted to your account.
you still need to chmod new files/directories.

BTW, why do you have three entirely separate resize routines for PNG/jpg/gif when
they all use the same method differing only in one line, i.e. $oldImage = imagecreatefromXXX($src);
where XXX is the image type ? just curious.

also i searched for moveuploaded file, but is nowhere to be found in your script.
how do you handle this portion ? ( of php file upload )


ok, i found it.