Uploading Large Files to a LAMP setup - upload_max_filesize, post_max_size, and max_allowed_packet
December 28, 2007 on 11:57 am | In linux | No CommentsSo you’re trying to upload a large file via PHP and you’re getting an error, eh? It’s probably because of PHP’s default configuration, which limits uploads to 2 Megs, or because of MySQL’s default 1.5 Meg limitation. Here’s how you change these defaults.
First, find your php.ini file. If you don’t know where it is, create a php file on your server that contains only the following:
<? phpinfo(); ?>
Load that up in your browser and look for the line that says
Configuration File (php.ini) Path
It’s probably set to something like /usr/local/lib/php.ini.
Once found, open up this file and edit the following lines as you see fit:
file_uploads = On
upload_max_filesize = 30M
post_max_size = 30M
In the above example, I’ve updated my configuration to allow uploads of up to 30 Megs.
Once this is complete, restart apache (using something like “/etc/init.d/httpd restart”) and voila, the file upload size limitation should be lifted.
If you’re trying to insert this large uploaded file into a MySQL database, you may, at this time, run into a second limitation:
An error has occured uploading that fileGot a packet bigger than ‘max_allowed_packet’ bytes
SQL: INSERT INTO …
That’s because mysql also has a limit on how large a single SQL query can be. This, too, can be raised - I edited my mysql configuration file at /etc/my.cnf and changed the max_allowed_packet size to 30M as well:
max_allowed_packet = 30M
After doing so, simply restart mysql using something like “/etc/init.d/mysql restart” and the problem should disappear.
Like this story? Share with others on:
 
del.icio.us
digg
reddit
furl
No, Dell, I don’t want a warranty extension. But you already knew that, didn’t you?
December 21, 2007 on 4:50 pm | In windows xp, privacy, consumer protection | No CommentsExtended warranties are very lucrative. So lucrative, in fact, that it’s reported that over 60% of large electronics retailers’ profits come from selling these protection plans.
Knowing how profitable these plans are, it didn’t surprise me when Dell called to ask if I wanted to extend the warranty on a computer I had purchased about a year ago. “No thanks, I answered.” It didn’t surprise me when I got a similar call about 2 days later, either - last December, I purchased quite a few Dell machines for both my home & office. With the third call, it started to get annoying. Then came the fourth call. Then the fifth. Then the sixth. And so on, and so on.
They call me on both my cell phone and my work phone, and they always start out with a fake buddy-buddy approach of “Hey, this is Jim from Dell, how are you doing today?” The message: at Dell, we don’t want to be in business with you, we’d rather be your friend.
If you really want to be my friend, Dell, you’ll stop calling me. I’ve asked (very politely, I might add) each of the last 4 people who’ve called to please stop calling. “No, I don’t want the warranty, just like I told the last few people who’ve called. Please stop calling me.”
“Oh, I’m so sorry sir…”
Really? If you were sorry, you’d stop calling.
Like this story? Share with others on:
 
del.icio.us
digg
reddit
furl
Baseball’s Mitchell Report Names Leaked
December 13, 2007 on 1:51 pm | In sports, windows xp | 1 CommentFormer U.S. Senator George Mitchell will release a report today about drug use in Major League Baseball. It will reportedly contain a list of 50 players who have used steroids in the past. Various internet sources have reported that the list has already been leaked to WNBC. WNBC is, however, not printing the list.
I ran across a comment at The Big Lead that claims to have the inside scoop on the list.
I have no idea if the list is accurate.
This is what the commenter claims is the list:
Brady Anderson, Manny Alexander, Rick Ankiel, Jeff Bagwell, Barry Bonds, Aaron Boone, Rafaeil Bettancourt, Bret Boone, Milton Bradley, David Bell, Dante Bichette, Albert Belle, Paul Byrd, Wil Cordero, Ken Caminiti, Mike Cameron, Ramon Castro, Jose and Ozzie Canseco, Roger Clemens, Paxton Crawford, Wilson Delgado, Lenny Dykstra, Johnny Damon, Carl Everett, Kyle Farnsoworth, Ryan Franklin, Troy Glaus, Rich Garces, Jason Grimsley, Troy Glaus, Juan Gonzalez, Eric Gagne, Nomar Garciaparra, Jason Giambi, Jeremy Giambi, Jose Guillen, Jay Gibbons, Juan Gonzalez, Clay Hensley, Jerry Hairston, Felix Heredia, Jr., Darren Holmes, Wally Joyner, Darryl Kile, Matt Lawton, Raul Mondesi, Mark McGwire, Guillermo Mota, Robert Machado, Damian Moss, Abraham Nunez, Trot Nixon, Jose Offerman, Andy Pettitte, Mark Pior, Neifi Perez, Rafael Palmiero, Albert Pujols, Brian Roberts, Juan Rincon, John Rocker, Pudge Rodriguez, Sammy Sosa, Scott Schoenweiis, David Segui, Alex Sanchez, Gary Sheffield, Miguel Tejada, Julian Tavarez,Fernando Tatis, Maurice Vaughn, Jason Varitek, Ismael Valdez, Matt Williams and Kerry Wood.
A second commenter adds:
Admitted Users (17)
Ken Caminiti - Steroids
Barry Bonds - Steroids
Bobby Estalella - Steroids and hGH
Jason Giambi - Steroids and hGH
Jeremy Giambi - Steroids
Armando Rios - Steroids and hGH
Benito Santiago - Steroids and hGH
Gary Sheffield - Steroids
Jose Canseco - Steroids and hGH
Tom House - Steroids
Wally Joyner - Steroids
Paxton Crawford - Steroids and hGH
Jason Grimsley - Steroids and hGH
Jim Leyritz - hGH
David Segui - hGH
John Rocker - hGH
Paul Byrd - hGH
Implicated Players (29)
Mark McGwire - Steroids
Manny Alexander - Steroids
Chuck Finley - Steroids
Marvin Bernard - Steroids and hGH
Randy Velarde - Steroids
Wilson Alvarez - Steroids and hGH
Bret Boone - Steroids
Ozzie Canseco - Steroids
Juan Gonzalez - Steroids and hGH
Dave Martinez - Steroids
Ivan Rodriguez - Steroids and hGH
Tony Saunders - Steroids and hGH
Miguel Tejada - Steroids
Lenny Dykstra - Steroids and hGH
Dave Hollins - Steroids
Roger Clemens - “PE Drugs”
Andy Pettitte - “PE Drugs”
Brian Roberts - Steroids
Jay Gibbons - Steroids
Gary Matthews Jr. - hGH
Jerry Hairston Jr. - hGH
David Bell - hCG
Darren Holmes - Steroids and hGH
Rick Ankiel - hGH
Troy Glaus - Steroids
Scott Schoeneweis - Steroids
Matt Williams - Steroids and HGH
Jose Guillen - Steroids and HGH
Ismael Valdez - Steroids
MLB Posiive Tests (16)
Alex Sanchez - Unknown
Jorge Piedra - Unknown
Agustin Montero - Unknown
Jamal Strong - Unknown
Juan Rincon - Unknown
Rafael Betancourt - Unknown
Rafael Palmeiro - Stanzolol (Steroid)
Ryan Franklin - Unknown
Mike Morse - Unknown
Carlos Almanzar - Unknown
Felix Heredia - Unknown
Matt Lawton - Boldenone (Steroid)
Yusaku Iriki - Unknown
Guillermo Mota - Unknown
Juan Salas - Unknown
Dan Serafini - Unknown
Non-MLB Positive Tests (2)
Termel Sledge - Precursor (Andro)
Derrick Turnbow - Precursor (Andro)
and another 15 or so names he mentioned later
Albert Pujols
Mo Vaughn
Darryl Kile
Trot Nixon
Jason Varitek
Mark Prior
Kerry Wood
Brady Anderson
Albert Belle
Johnny Damon
Carl Everett
Kyle Farnsoworth
Ryan Franklin
Troy Glaus
Eric Gagne
Nomar Garciaparra
Like this story? Share with others on:
 
del.icio.us
digg
reddit
furl
Why you shouldn’t use Amazon’s Unbox Service
December 1, 2007 on 11:01 am | In windows xp, PSA, internet, movies | No Comments
Amazon’s Unbox service allows customers to purchase movies & tv shows for viewing on their computer or Tivo DVR. When purchasing a movie, you’re often presented with 2 choices - you can rent the movie for around $4, or you can purchase the movie for about the price of a DVD, about $20. If you choose to purchase the movie, a copy is stored in your “Digital Locker” and you are entitled to watch and re-watch the movie as many times as you’d like. Sounds like a pretty cool idea, right?
Not so fast.
Check out Amazon’s Wii purchase policy, found over on the Slickdeals forum:
Wii Purchase Policy
As you may know, the Nintendo Wii is in great demand, and there are shortages of this product across the U.S. In an effort to provide as many customers as possible with the opportunity to purchase a Wii, we are limiting the number of Wiis customers can purchase in a given calendar month. As a result, each household may only purchase up to 3 Nintendo Wii units per calendar month.Failure to comply with this policy will result in account actions including, but not limited to:
Cancellation of all outstanding orders, including Wii orders and other orders.
Closure of the offending customer account and related accounts, including:
The customer account used for making purchases and selling items on Amazon.com Seller accounts
Any international accounts at Amazon.ca, Amazon.co.uk, Amazon.de, Amazon.fr, or Amazon.co.jp
The Your Media Library account area, including any digital products you may have purchased
Any Amazon.com Associates account or Advantage account attached to the closed account
When an account is closed, access to any Amazon Wish List, Baby or Wedding Registry, or profile pages is lost. Any purchase history, saved gifts in Gift Central, and digital products in Your Media Library will not be accessible. Additionally, any outstanding Amazon.com gift certificate or check funds balance will be unavailable.
That’s right - if you do something that Amazon doesn’t like, which can be (gasp!) simply purchasing too many of a particular product from them, they will CLOSE your Unbox account, taking away all of the digital content that you’ve previously paid for.
This is no different than Amazon sending an agent out to your house to repossess all books & DVD’s that they’ve sold you i the past, simply because the decided that you shouldn’t have them any more.
Amazon Unbox? Thanks but no thanks, Amazon. I’ll never use the service again.
Like this story? Share with others on:
 
del.icio.us
digg
reddit
furl
Powered by WordPress with Pool theme design by Borja Fernandez.
Entries and comments feeds.
Valid XHTML and CSS. ^Top^
38 queries. 0.211 seconds.
