PDA

View Full Version : Using PHP to upload jpegs



brettgodfrey
10-24-2003, 01:37 PM
Hi
I have been having problems uploading .jpg files from my local machine to the server (trying a bit of content management...)

.gif No Problem but will not work with .jpg

It always seems to report .jpg with zero file size.
And the error Warning: Unable to open '' for reading: Permission denied in
Any ideas?

redcircle
10-24-2003, 04:14 PM
It would help to see some code.

paulhiles
10-24-2003, 04:31 PM
Hi Brett

A bit of code would be handy! Something for other members to comment on perhaps? By the sounds of it, it's more a problem with the file type than the actual upload script.. i.e. the upload itself is not causing an upload error as such.

I assume you have all the neccessary permissions on the server. Are you manipulating the image filename as part of the process? I've seen instances where that has been the root of the problem.
So more detail I guess! :c)

Paul

brettgodfrey
10-27-2003, 04:36 AM
Paul and Redcircle

Thanks for looking at the post but I've sorted the problem

Stupid of me not to put up the code.

As I was about to post the code I realised that the max-file-size was set too low on my form.

That was why it worked with small .gif files but not the larger .jpg files.

Thanks again