User Tools

Site Tools


tutorials:image_upload_problems:start

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
tutorials:image_upload_problems:start [2009/10/15 18:23]
jonyo changed name to troubleshooting
tutorials:image_upload_problems:start [2014/09/25 16:55] (current)
Line 11: Line 11:
  
 LISTING SETUP > FILE UPLOAD & DISPLAY SETTINGS > Photo Directory URL LISTING SETUP > FILE UPLOAD & DISPLAY SETTINGS > Photo Directory URL
 +
 LISTING SETUP > FILE UPLOAD & DISPLAY SETTINGS > Server Path to Root of Photos Directory 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. 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.+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 ===== ===== 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.  +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. 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.
Line 34: Line 35:
 **No "error code"**: **No "error code"**:
  
-If you are getting an error message saying that there has been a server error processing the imagethis usually means there was a PHP error, in which case you will need to look within the php error_log file for the error If there is not much to go on in PHP logs you can try turning on the standard upload "debug mode":+If you are getting an error message similar to((This error message could have been changed in the admin panel, the exact text referenced is the default text.)):
  
-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:+  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**: 
 + 
 +  * Do you have basic authentication on the directory you are using the software on?  If so remove it for a test.  The flash uploaded does some behind the scenes communication with the server to hide any errors from direct client view and basic authentication can corrupt that communication. 
 +  * If the Legacy Uploader produces a //white screen// or PHP Fatal Error: There was a PHP error such as running over the memory_limit, a timeout error, or something like that which stopped the rest of the script from continuing.  You will need to make sure that PHP error logging is turned on, and look within the php error_log file for the error, or if the legacy uploader displays a Fatal Error that would also point to the problem. 
 +  * If the Legacy Uploader works but the standard uploader does not: 
 +    * The most common culprit is "mod_security" blocking access.  You can try turning off mod_security, or contact your host to adjust the mod_security configuration to allow Flash-based uploads to work((This was first reported in [[http://geodesicsolutions.com/geo_user_forum/showthread.php?t=8644|this forum post]])).  Your host will need to look at the mod security logs to find the reason for the block, then adjust the configuration so that it no longer blocks based on that "criteria"((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)).  If you just want to turn it off real quick to see if that fixes it, with most hosts, mod_security can be turned off by adding these 2 lines to your **.htaccess** file at the top((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.)): <code>SecFilterEngine Off 
 +SecFilterScanPOST Off</code> 
 +    * It could be the server "sent" the information back just fine, but the response is being inadvertently blocked by certain types of software running on the computer.  It could be a software firewall, ad-blocking or JS blocking software installed, or it could be a virus scanner that has "Internet Security" built in that might be blocking it from working.  You would need to check for any such software that might block things from loading on your computer, and temporarily disable them one by one, until you find the one that is stopping it from working. 
 +    * If you have added a <base> tag to the template used on the image uploader page, and the URL is different than what is used on the site, for instance it has **www** when the user is browsing without the www, or visa versa, or there is a typo or some other problem with the URL used in the base tag.  The fix is to remove the base tag from the template.  If the base tag uses a different URL then the browser actually blocks certain things from working for security reasons. 
 +    * If you have added a <base> tag to the template used on the image uploader page, and the URL uses //https:// it will break things.  The fix is to remove the base tag from the template.  The standard uploader does **not work in SSL**, due to problems with Flash not working correctly in SSL.  The software adjusts for this, dropping out of SSL mode for the image upload page, but if you have a base tag in your template that uses https in the URL it will still cause it to break. 
 + 
 +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:
  
 <code html> <code html>
Line 46: Line 62:
 </code> </code>
  
-You would add that right before the </head> tag in the template HTML.  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.+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. 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===== ===== Legacy Uploader Debugging Messages=====
  
tutorials/image_upload_problems/start.1255631021.txt.gz · Last modified: 2014/09/25 16:55 (external edit)