Upload file and memory limit php: Drupal on Godaddy.com

Yes, this takes some time to make it working.

After spending 3-4 hours on the net, I finally managed to increase the File Upload as well as the Post Max size limits; also the memory Limit. Solved!

The beginning

Godaddy (Linux package)  limits are as follows:

File upload = 8 mb; maximum post size = 64 mb; memory limit = 64 mb.

Back in 1and1, I used to put a php.ini file in every drupal installation (root of a website), with the following simple script:

register_globals = Off
memory_limit = 128M
post_max_size = 768M
upload_max_filesize = 768M

This didn't help on godaddy.

The failures

There were comments to change the php.ini as well as .htacess files as well the settings.php files in some Drupal forums like this: drupal.org/node/109994

It didn't work on godaddy.

Then I found the original godady's support for this: help.godaddy.com/article/1475

It didn't work.

Then I called godaddy (UK); they said Drupal is a "third party" and they don't provide support for that.

Then I bumped into this forum, and finally started to put the dots together...

The solution

You need to

  • download godaddy's own php5.ini file (not php.ini)
  • change the values
  • upload it into the /html (root) folder

Here are the steps in detail:

  1. (optional)  check your sizes
    1. download the phpinfo.php (right-click > save as)
    2. copy the attached phpinfo.php file in the root of your site
    3. go to yoursite.com/phpinfo.php and check the following:
    4. "Configuration File (php.ini) Path" (/web/conf  in my case)
    5. Further down, in Php Core you can check the values of your file and memory limits
    6. you should remove this file at the end of the testing/configuring process
       
  2. (recommended) download and edit godaddy's own php5.ini file
    1. Using the phpinfo.php, in "Configuration File (php.ini) Path" you can see where godaddy keeps it's own php5.ini file
    2. In my case it's /web/conf - go there and download the php5.ini file
    3. open it in a text editor and search for
      1. memory_limit
      2. post_max_size
      3. upload_max_filesize
    4. Change the values;
       
  3. (or) use my php5.ini file
     
  4. upload it to the /html (root) directory
    1. using an SFTP client, navigate to your root directory; it should look like this: /home/content/12/1234567/html
    2. upload the php5.ini file there
       
  5. (crucial) wait 15 minutes
    1. unlike 1and1, where the changes to the php.ini files are instant, in godaddy it takes about 15 minutes for the change to take effect

The good side is - one file does it for all. every single web-site on that root will use these maximum values.

You can limit your web-site's upload limit in Drupal's /admin/settings/uploads (Drupal 6)

Your rating: None Average: 4 (2 votes)