tags:

views:

493

answers:

4

I am trying to upload large files through my cms and was wondering how to change the php.ini file for heart internet.

Is this possible in shared hosting, if not are there any other work arounds?

Thanks in Advance

A: 

There is no way to upload files over 50MB without breaking your terms and getting your account shutdown.

However if the terms were different, you could split the file into parts and join them together on the server side.

I moved away from heart internet and got my own server for this exact reason as they wouldn't even let me pay a premium to get the restriction removed (restricted from there end I think)

Andi
A: 

If it is shared hosting you probably won't be able to, I have also discovered that you cannot use ini_set to set the correct settings because the file upload occurs before your script is executed. So if you want to accept large files via a form to a PHP script you have to use php.ini.

You might be a work around though, you could use an open FTP account, upload large files form there and code a bit of script to ask the user what file they have uploaded, then you can manipulate (move / rename) to your hearts content.

ILMV
It is possible on some shared hosting - for example, Heart Internet.
Sohnee
A: 

To override settings all you need to do is create either a php.ini or php5.ini file (if you are running PHP5) in your root directory. Then you can change settings like this:

upload_max_filesize = 20M ;
post_max_size = 20M ;
max_execution_time = 60 ;

This gives you maximum file size of 20MB and 60 second timeout.

As long as you keep this size within the allowed limits on your account, you can use this to increase the default size - which is 5MB.

Sohnee
A: 

It depends on whether your web hosting company allows you to override certain PHP settings or not. It might be possible to change some values but not others.

Secondly, the process for overriding settings differs depending on whether your hosting is IIS or Apache. If its Apache, try adding these two lines to your .htaccess file:

php_value upload_max_filesize 8M
php_value post_max_size       8M

This .htaccess file should do to the directory where your php upload script resides, or higher. I'd rather put it in the root directory.

Once done, create a php page containing this code:

<?php phpinfo( ); ?>

Compare the Local Value and Master Value of these settings to see if the changes are in effect.

Salman A