If you are looking for my personal day-to-day blog of adventures, please visit my main blog at http://blog.nztechie.com
Showing posts with label memory_limit. Show all posts
Showing posts with label memory_limit. Show all posts

Saturday, March 29, 2008

Easy Application Install (Gallery2) on IXWebhosting

Web hosting company IXwebhosting offer a number of one-click GPL applications that their hosting customers can implement on their websites.

I recently attempted to install Gallery2 using this facility. I had previously installed Gallery2 on my Startlogic web hosting account through its standard installation script.

Unfortunately my experience installing Gallery2 on IXwebhosting was not perfect. I ran into problems relating to file uploads. I had two distinct problems:

- Photos over 2 Megabytes in size were rejected with an "Upload Failed" error message

- File uploads would fail with the following error:

"filename.ext: You may need to set LimitRequestBody 16777216 and memory_limit=64M in /etc/php.ini and /etc/httpd/conf.d/php.conf on your Gallery server java.net.SocketException: Connection reset"

How I resolved this issue

The 2 megabyte file restriction appears to be a default setting from ixwebhosting which effectively blocks any web-based application from uploading files greater then 2 megabytes in size. (This wont affect you using FTP to upload content to your own site)

In the cgi-bin folder I created a new php.ini configuration file. In this file I added the following text string:

upload_max_filesize = 2048M

The other file upload problem was easily remedied by following the instructions within the error message. I followed the instructions relating to the php.ini file and the issue appears resolved. I added the following two lines to the php.ini file:

LimitRequestBody 16777216 memory_limit=64MB

It is a bit disappointing that this "easy application" required a bit of fiddling with in order to get in to operation under this hosting environment.

When installing on Startlogic the only extra configuration required was actually documented in the installation check of the Gallery2 installer itself.