Editing your PHP settings with Go Daddy Web Hosting

I have a Windows Web Hosting account through Go Daddy and I recently installed the Coppermine image gallery program using Go Daddy Hosting Connection. When I started to upload pictures, the Coppermine program was running out of memory while doing batch adds. This meant it wouldn’t create thumbnails and ultimately wouldn’t add my pictures.

Since Coppermine uses PHP, we need to increase the memory usage allowed. To do this, we need to edit the php.ini file. This file contains all the settings that Go Daddy web servers will consider when running PHP for your account. Please note, the below procedure is for Windows with PHP 5; if you have another installation, please see this article.

First, let’s output the php.ini file. Here’s a sample script you can create and put your root directory. Name the file test.php and upload it to your FTP root.
<? system("type c:\\cgi\\php5\\php.ini"); ?>

Execute that script by loading it up in your web browser. It should now output the full php.ini that Go Daddy uses by default. Save that to disk and open it up in your favorite text editor.

In that file, search for “Resource Limits” and you’ll find a section like this:
;;;;;;;;;;;;;;;;;;;
; Resource Limits ;
;;;;;;;;;;;;;;;;;;;

max_execution_time = 30 ; Maximum execution time of each script, in seconds
max_input_time = 60 ; Maximum amount of time each script may spend parsing ...
max_input_nesting_level = 64 ; Maximum input variable nesting level
memory_limit = 32M ; Maximum amount of memory a script may consume (128MB)

I just had to bump up my memory_limit from 32M to 64M. After you make that change, save the file as “php5.ini” and upload it to your FTP root.

That did the trick and I was able to upload pictures no problem. If you do all of the above and it doesn’t work, try logging into your HCC and recycling your application pool.