PHP File Uploads

Posted on

Yesterday at work I spent the better part of the afternoon trying to figure out why a form couldn't handle multiple file uploads. These uploads where failry big - quicktime and wmv files - so I thought the culprit was the large file size. But the script was not returning any error warnings or notices which made it quite a pain to debug. With a co-workers help we traced it to two settings in php.ini.

  • post_max_size = (some number)M
  • upload_max_filesize = (some number)M

post_max_size controls the total size of your post request while upload_max_filesize controls the max size of each file uploaded. The sum of file sizes can't exceed the maximum size of the post request.

A related apache setting could come in to play here, LimitRequestBody, which also sets a limit on how large a post request can be. So, in order to have working uploads for your php scripts, these 3 numbers have to jive. LimitRequestBody = post_max_size >>> upload_max_filesize

Tags: Apache, Career

─── ✧ ─── ✦ ─── ✧ ───

Finally scored when it counted...

Posted on

I've been subbing on my fiance's co-ed indoor soccer team when they need extra guys to play. Last night, we lost a tight game but I managed to score one goal and get an assist on our first goal. This is the first time I've scored a goal in a non-pickup game. At least I've matched my career scoring record of one basket when I played in elementary school.

The goal was pure reaction, I found myself in the goal box after another shot rebounded. I noticed the goal keeper had commited to his left and sent my shot to his right. For a brief moment I was in a zone where I didn't have to consciously think - my body just knew what to do. On the assist, it was a more creative set of quick passes. I received a quick pass at the top of the box and curled the ball one time behind the defender into the path of our forward.

While we lead at the half, we weren't able to defend our lead and we lost the game. I think fatigue did us in at the end.

Tags: Soccer

─── ✧ ─── ✦ ─── ✧ ───

From Reuters:

Posted on

Fragile Bolivia Unites, for Now, on Chile Sea Spat

For 120 years, Bolivia has demanded neighboring Chile give back coastline seized in a 1879-1883 war, saying that this landlocked Andean nation needs access to the sea, and therefore an easier route to world markets, to escape centuries of poverty.

The issue historically resurfaces in Bolivia during times of crisis, and was a main rallying cry during street protests in October that killed dozens and forced the resignation of Gonzalo Sanchez de Lozada.

I wasn't aware that Bolivia was "teetering on the edge of chaos." I do remember that some TV stations in Bolivia still sign off each night by showing footage of Pacific beaches.

Tags: Bolivia

─── ✧ ─── ✦ ─── ✧ ───