Forum Moderators: coopster

Message Too Old, No Replies

Troubles Uploading Images

Images aren't comsistently uploading

         

mipapage

1:02 pm on Jan 29, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hey all,

I've developed a site that requires the owner to upload images. We had some hiccups at first on the live server due to safe_mode and open_basedir restrictions - sometimes images would upload, other times not;we got around that by setting the tmp dir local to the site:

/usr/www/mysite.com/:/var/tmp

This worked. For months. Now the problem has returned.

Sometimes images upload, other times not. I am not seeing any error messages.

When it does fail, the $_FILES array data are inserted into the database, but the BLOB data seems to be lost.

Only once have I not been able to upload from work, while the client has not been able to do so for a week now.

I'm looking into firewalls and antivirus progs as a possible issue, can anyone suggest anything else?

ISP issues? Caching issues?

mipapage

5:18 pm on Feb 2, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



BitBanger - Thanks for all of your help with this. You've been super patient, and a great bug-killer!

JAG - Thanks for stepping in as well, much appreciated.

This has been the most frustrating 'bug' I've ever had to kill...

Cheers - mipapage

mipapage

9:30 am on Feb 4, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Just to close things off, the problem was solved. We traced it down to a configuration problem on one of the servers - the on again off again nature of the problem was likely due to load balancing.

Thanks again for all of your help BitBanger.

justageek

12:21 pm on Feb 4, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Just curious....what was the config problem?

JAG

BitBanger

12:57 pm on Feb 4, 2004 (gmt 0)

10+ Year Member



Just to close things off, the problem was solved. We traced it down to a configuration problem on one of the servers - the on again off again nature of the problem was likely due to load balancing.

Wow, I hadn't even considered load balancing, though in retrospect it explains everything. The problem was that the path to the temp directory wasn't the same across all the servers. Therefore the open_basedir configuration was correct for some servers, and wrong for others.

This could have been solved by adding '/tmp' to the open_basedir configuration, though fixing the server config is a better solution.

Glad you finally found the problem. This is certainally one to file away for future use!

mipapage

1:01 pm on Feb 4, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hey JAG,

I'll have to ask.

What we wound up doing is setting my hosts file for the individual servers and trying to upload to each of them. On one of them it threw the SAFE_MODE and OPEN_BASEDIR errors and all of the other errors that come with them.

I find it strange that the clients always got that trouble server, yet I only sometimes. I wonder why that is? They are on different ISP's than I am.

I've never been so happy to see those errors as I was this time.

I'll get back to you with the response.

mipapage

1:06 pm on Feb 4, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Wow, I hadn't even considered load balancing, though in retrospect it explains everything.

I know - and now, in retrospect, I feel a bit silly for not having mentioned it earlier. Problem is that as I don't know too much about load balancing and multiple servers working together etc. I didn't realize the importance of that fact.

Was a bit of a 'doh!' moment, though I'm happy to have this one sorted out!


Thanks a lot to you both though - I had had them check the settings at the start, 'cause I had suspected it was the servers, but they said it was fine (in the httpd.conf).

So it wasn't until we'd checked off all of the other possibilites (and found that 'tmp/' vs 'tmp/var/' thing) that I went back to them.

justageek

2:24 pm on Feb 4, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I find it strange that the clients always got that trouble server

Often a client will use the term *always* when it really isn't :-)

Like BitBanger said...it explains everything...and now I know why we were all (at least I was) at a loss to explain it.

I'll be storing this one in the memory banks as well.

JAG

mipapage

8:17 pm on Feb 4, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



JAG,

here's is the 'config problem':

we left

upload_tmp_dir = /tmp

in php.ini on one server, so all the uploads were going there. We have
since commented it out.

Cheers - mipapage

This 38 message thread spans 2 pages: 38