Welcome Guest, Not a member yet? Register   Sign In
upload jpg problem
#1

[eluser]tfncruz[/eluser]
Hi!
I can't upload jpgs through the backoffice... the browser just stays there... thinking... and nothing happens. I already cheked filesize, dimensions, permissions... everything ok. Btw, I can upload png and gif with no problems. The website is hosted on mediatemple.

Everything is working fine on my local machine! I can't see why this is happening... any ideas?

Best regards,
Tiago
#2

[eluser]Dam1an[/eluser]
The only thing I can think of, which is a common culprit with these problems, is the mime types
#3

[eluser]tfncruz[/eluser]
But the mime types are well defined...
Here's the code:
Code:
//conf settings for the upload
        $config['upload_path'] = 'imgs/content/'.$nome_autor;
        $config['allowed_types'] = 'gif|jpg|jpe|jpeg|bmp|png';
        $config['max_size']    = '2000';
        $config['max_width'] = '1600';
        $config['max_height'] = '1200';
        $config['overwrite'] = TRUE;
#4

[eluser]Dam1an[/eluser]
I'm assuming the file size limit in php.ini is the default (at least 2mb)?
#5

[eluser]tfncruz[/eluser]
yes... 20MB :S
#6

[eluser]tfncruz[/eluser]
ok... I transfered the entire site to another server and everything is functioning properly!
I guess it's something to do with MediaTemple... The problem is that they insist that the issue is on my code.

Any ideas on what's causing this...?
#7

[eluser]Evil Wizard[/eluser]
just as a test, because I have had issues with the upload class before, change the file type of the jpg image to, say a doc file type. The upload class doesn't look too carefully at the actual mime type of the uploaded file, only that the file extension is in the allowed files list. After, try changing the file type of one of the other images (gif or png) to the name of the jpg that won't upload. That should let you know if the problem is with the file type or the specific file. Also check that the path in ...
Code:
$config['upload_path'] = 'imgs/content/'.$nome_autor;
is actually valid and writable, you could get more feedback if you did a var_dump on the upload class display_errors method after the upload fails.
#8

[eluser]tfncruz[/eluser]
Ok... here's the situation...

Without changing anything in the code, sometimes I can upload images with no problems, sometimes I can't. The browser just stays there, thinking, and nothing happens.

MediaTemple insists that the problem is in the code... but how can this be true if there's moments when I actually can upload the images?!

I really don't understand this problem. I'm still thinking that the problem is on MediaTemple's server.
#9

[eluser]ownersbox[/eluser]
tfncruz, were you able to fix the problem? I'm having the same problem on MT and I can't find a solution.
#10

[eluser]tfncruz[/eluser]
@ownersbox

I really don't know what was causing this. I contacted MT several times about this issue and everytime they respond saying that the problem was on my code and that they tried to upload the images and everything was working fine. Then, after I received this message the problem is fixed. Till now I didn't experience the same issue. But I didn't change anything on the code too!

I don't know... I'm thinking that the problem was on MT, they fixed something, and then they respond saying that "no, the problem is on your side"... I don't know...

Try different browsers, clear cache, upload on another server... If the only place that it isn't functioning properly is on MT, then contact them.

I uploaded the entire project to another account on Dot5Hosting and send the link to MT so that they can confirm that everything was working fine and the problem was not on my code...




Theme © iAndrew 2016 - Forum software by © MyBB