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 19:12]
jonyo more footnotes
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 38: Line 39:
   Server Error occurred while processing!  Please try again with a smaller file, and make sure the file is not corrupted.   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.  This usually indicates one of 2 things:+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**:
  
-  * 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.  In the legacy uploader, the equivalent is a "white page" or a page with a PHP Fatal Error displayed.  You will need to make sure that PHP error logging is turned on, and look within the php error_log file for the error. +  * 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. 
-  * An error at the "server level" by Apache, such as a "permission denied" or similar error.  The most common culprit when this is the case, is "mod_security" blocking access.  Turning off mod_security usually fixes it, or you can contact your host to get them to add something to the mod_security whitelist.  The standard uploader uses Adobe Flash player to upload files, in most cases the "false positive" has something to do with that((Sometimes caused by the user-agent used by Flash Player for some reason throwing a red flag in mod_security)), but can vary from server to server. ((This was first reported in [[http://geodesicsolutions.com/geo_user_forum/showthread.php?t=8644|this forum post]], the post includes what the host did to fix but this may be different for different serverswhich is why we do not reference that "fix" directly here.))+  * 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 blockthen 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 pageand 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": If you are still having trouble finding the cause, another thing you can try with the standard uploader is to turn on "debug mode":
Line 58: Line 65:
  
 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.1255633971.txt.gz · Last modified: 2014/09/25 16:55 (external edit)