Table of Contents

Image Upload Troubleshooting

The software now has two ways for clients to upload images into your site. What we call the "Legacy Uploader" and the new "Standard Uploader" introduced in version 4.1. The new standard uploader will give your users a more fluid experience to your site eliminating many "white screen" error your clients may have seen with the legacy uploader. But with either method of uploading problems can occur until the site is properly configured to handle uploaded files.

The first step to addressing any photo upload problems is to make sure settings in the following admin tool are correct:

LISTING SETUP > FILE UPLOAD & DISPLAY SETTINGS

Specifically the following settings:

LISTING SETUP > FILE UPLOAD & DISPLAY SETTINGS > Photo Directory URL

LISTING SETUP > FILE UPLOAD & DISPLAY SETTINGS > Server Path to Root of Photos Directory

You can find more about these settings in the above wiki manual links.

Once you have the above settings correct how to determine the image upload problem may depend on the method you have chosen to allow clients to upload images. No matter the uploader chosen all the image problems outside of the above configurations will involve adjustment to settings within the PHP configuration. Inside the php.ini PHP configuration file if not somewhere else within the server configuration.

Standard Uploader Debugging Messages

One of the reasons we created this uploader was to head off some of the problems clients were having with the legacy uploader. Within the current standard uploader the client should never see a "white server error" page or empty page with only a "cryptic" PHP error message. The current standard uploader also forces the client to upload images individually stopping many of the timeout errors encountered by the legacy uploader when multiple images were uploaded at one time.

This uploader replaces those "ugly" error pages or sometimes blank screens, with a more user-friendly error message displayed inside a box on the current page. Sometimes the error message will have text similar to "Error Code 3" at the end, when that is the case you can reference the table below to see what the error number signifies.

"Error Code #" Code Number Reference:

Num. Explanation How to Fix
1 The uploaded file exceeds the upload_max_filesize directive in php.ini. Increase the value for upload_max_filesize in php.ini configuration.1)
3 The uploaded file was only partially uploaded. If this continually happens, contact your host.
6 Missing a temporary folder. Contact your host to resolve.
7 Failed to write file to disk. Contact your host to resolve.
8 File upload stopped by extension. Contact your host to adjust the server configuration.

See http://php.net/manual/en/features.file-upload.errors.php for full reference.

No "error code":

If you are getting an error message similar to2):

Server Error occurred while processing!  Please try again with a smaller file, and make sure the file is not corrupted.

This means that the uploader did not get back any meaningful error messages, such as "wrong file type" or an error code as mentioned in the previous section. To narrow down the possible causes of this, attempt to upload the same file using the Legacy Uploader:

If you are still having trouble finding the cause, another thing you can try with the standard uploader is to turn on "debug mode":

In the overall template used for the image upload page, by default this is the "basic page with my account links" template, edit the template and add the following right above the </head> tag in the template's HTML:

<script type="text/javascript">
Event.observe(window,'load',function () {
geoUH.debug = true;
});
</script>

Save the changes, then test uploading the image, and if that was inserted correctly, the error message it gives should have additional "debug" information which might help to point to the problem, whether it be running out of memory or timing out or what.

Simply uploading one image at a time cuts down on many errors. So debugging issues within the standard uploader are much fewer with respect to "php timeout" issues.

Legacy Uploader Debugging Messages

If an error happens using the legacy uploader you are most likely to see a "white page". This means that a server error has happened in processing the form page/image upload request. An error has happened and the server has stopped php execution. PHP always provides an error message but where this used to be predominantly displayed to the browser (unless configured otherwise) those messages are predominantly "written" to a php error log. While this may seem more painstaking to find the error message and debug this issue it is done to protect your server further. Hackers can use these error messages to learn about server configurations. So these error message have almost solely been written in error logs so only server admins and those with ftp access can view them.

Error Message Contents

Memory Allocation

The vast majority of image upload issue fall into the "php memory allowed" category. If the error message you see contains "memory allocation" you will need to increase the php memory limit value within your php.ini file. This error is better explained in the support wiki here:

PHP Memory Limit Error When Using Software

Timeout

The next most "popular" problem in uploading images to the site is that there is not enough time for the image to upload to the site before php itself times out waiting for the upload. You generall see "max execution time" exceeded within the php error you see.

One of the most important php configurations is the amount of time that a routine should stay "open" before it is automatically closed. The default php timeout is 30 seconds on almost all server configurations we have encountered. This is usually good enough for most single images to make it to the server. With the standard uploader this will be less of a problem as images are uploader individually. With the legacy uploader the timeout limit becomes more of a problem as all images must make it to the server before the timeout. Many times with the legacy uploader some images may make it fully uploaded to the server before timeout. When this happens your clients will get the "white screen" error and only some of the images appear in their listing.

To fix this issue you will need to increase the max_execution_time value in your server's php configuration php.ini file. As we have said 30 is the default value. The next value we suggest in 60 (for 60 seconds) and if some of your clients still have an issue because of slow Internet connections you may need to increase this value further.

1)
You may need to contact your host to make this adjustment.
2)
This error message could have been changed in the admin panel, the exact text referenced is the default text.
3)
This was first reported in this forum post
4)
We have found that what configuration changes are needed will vary from server to server, the most common problem is a red flag thrown by the user-agent used by Adobe Flash Player uploads
5)
You may still want to find a more "permanent" solution if this is the cause, by talking to your host. Note that for some hosts, adding the lines to the .htaccess file is the only solution.