Lunarpages Hosting 2MB Upload Limit

I just realized today that I was suffering from the default 2MB PHP upload limit on my home recording site which is hosted at Lunarpages. My recording forum encourages users to upload their mp3 so other users can give their opinion on the quality of the mix. Well, a 2MB mp3 at 128kps is only 2 minutes long. At 256kps, this is only 1 minute. This is not going to cut it!

So, I had to figure out how to increase the php upload limit to something more like 8MB.

Luckily, Lunarpages comes default with a php.ini file in the default folder for the site. This is powerful because it allows the webmaster to make changes to the settings of the site that are otherwise a total pain to change (or just not changeable at all).

I had to do 2 things to increase the PHP upload limit with Lunarpages.

1) I had to open up the .htaccess located in the site root (in the same folder as your index page) and paste the following code:

suPHP_ConfigPath /home/your_username_goes_here/public_html
<Files php.ini>
order allow,deny
deny from all
</Files>

Note: Whree I’ve placed “your_username_goes_here”, you should place the username for your lunarpages login, which should be your ftp.

2) I edited the php.ini (found in the site root as well) and pasted the following code at the just under the line that says “register_globals = Off”.

upload_max_filesize = 50M
post_max_size = 50M
memory_limit = 50M
upload_tmp_dir = 50M
max_execution_time = 20000

After uploading the php.ini file and the .htaccess I have no increased the php upload limit on my lunarpages site to 50 MB. 50 MB is probably a bit much, but I don’t see it becoming a problem. If it does, I can always change “50M” to something more like “8M”.

Now my users of my home recording forum and take upload mp3s again.

Related posts:

  1. htaccess Folder Protection Allows Single Referrer Here's an .htaccess script to only allow a single domain...

Related posts brought to you by Yet Another Related Posts Plugin.

Leave a Reply

You must be logged in to post a comment.