First day using D7, downloaded alpha 2 release today, no patches. I created a field in content types for a file to use with a Page. I then created a new content type called resource and pulled in the existing file field.

When I try to add an attachment to the resource, I get the following screen:

The message is:
An AJAX HTTP request terminated abnormally.
Debugging information follows.
Path: /file/ajax/field_attachments/und/0/form-35306b043fef5e2f0fd39ce439c0722c
StatusText: n/a
ReadyState: undefined

I'm not at all familiar with AJAX, so not following - the only path /file I can find is under the module file, but there is no ajax subdirectory there.


everyday.nice’s picture

I encountered an identical issue.

A message "ajax","Invalid form POST data." was recorded in dblog.

burlap’s picture

The same here, clean install of alpha 2.

burlap’s picture

It's possible my hosting here is to blame, because Drupal 6 didn't work either: now both 7 and 6 work after I created a tmp folder in the directory where Drupal is installed (Drupal is inside a folder and not in the server root).

mwoodwar’s picture

Has anyone else noticed this to be especially true using Chrome? I get errors in Chrome, but not FF

aspilicious’s picture

There is an issue bout these errors. I think they are all (unitl now) caused by providers.
Try to install the website on a localhost, and try again.

Check also php version and stuff like that

aspilicious’s picture

hd’s picture

I can reproduce this error reliably, actually it happens all the time, with Chromium browser on Linux 32/64 bit and on Vista with Chrome browser when doing a file (image) upload based on file.module (D7 alpha 5 (and D& CVS HEAD) as it comes "out of the box") and on D6 when using the corresponding CCK (filefield) modules. The file does get uploaded though most of the time, but one gets this huge error message:

An AJAX HTTP request terminated abnormally.
Debugging information follows.
Path: /file/ajax/field_image/und/0/form-ExtTDNqKX5K6Tw9XXswPUvwBWu0NTByBr9v6QSjuJ2w
StatusText: n/a
ResponseText: [{"command":"settings","settings":{"basePath":"\/","overlay":{"paths":{"admin":"node\/*\/edit\nnode\/*\/delete\nnode\/*\/revisions\nnode\/*\/revisions\/*\/revert\nnode\/*\/revisions\/*\/delete\nnode\/add\nnode\/add\/*\nadmin\nadmin\/*\nbatch","non_admin":""},"ajaxCallback":"overlay-ajax"},"ajax":{"edit-field-image-und-0-remove-button":{"wrapper":"edit-field-image-und-0-ajax-wrapper","effect":"none","progress":{"type":"throbber","message":null},"event":"mousedown","keypress":true,"selector":"#edit-field-image-und-0-remove-button","speed":"none","method":"replaceWith","url":"\/file\/ajax\/field_image\/und\/0\/form-ExtTDNqKX5K6Tw9XXswPUvwBWu0NTByBr9v6QSjuJ2w","submit":{"_triggering_element_name":"field_image_und_0_remove_button","_triggering_element_value":"Remove"}}}},"merge":false},{"command":"insert","method":"replaceWith","selector":null,"data":"\u003cdiv id=\"edit-field-image-und-0-ajax-wrapper\"\u003e\u003cdiv class=\"form-item form-type-managed-file form-item-field-image-und-0\"\u003e\n \u003clabel for=\"edit-field-image-und-0\"\u003eImage \u003c\/label\u003e\n \u003cdiv class=\"image-widget form-managed-file clearfix\"\u003e\u003cdiv class=\"image-preview\"\u003e\u003cimg typeof=\"foaf:Image\" src=\"http:\/\/\/image\/generate\/thumbnail\/public\/field\/image\/Far_far_north_480x270.jpg\" alt=\"\" \/\u003e\u003c\/div\u003e\u003cdiv class=\"image-widget-data\"\u003e\u003cspan class=\"file\"\u003e\u003cimg class=\"file-icon\" alt=\"\" title=\"image\/jpeg\" src=\"\/modules\/file\/icons\/image-x-generic.png\" \/\u003e \u003ca href=\"http:\/\/\/sites\/default\/files\/field\/image\/Far_far_north_480x270.jpg\" type=\"image\/jpeg; length=42581\"\u003eFar_far_north_480x270.jpg\u003c\/a\u003e\u003c\/span\u003e \u003cspan class=\"file-size\"\u003e(41.58 KB)\u003c\/span\u003e \u003cinput type=\"submit\" name=\"field_image_und_0_remove_button\" id=\"edit-field-image-und-0-remove-button\" value=\"Remove\" class=\"form-submit\" \/\u003e\n\u003cdiv class=\"form-item form-type-textfield form-item-field-image-und-0-alt\"\u003e\n \u003clabel for=\"edit-field-image-und-0-alt\"\u003eAlternate text \u003c\/label\u003e\n \u003cinput type=\"text\" maxlength=\"80\" name=\"field_image[und][0][alt]\" id=\"edit-field-image-und-0-alt\" size=\"60\" value=\"\" class=\"form-text\" \/\u003e\n \u003cdiv class=\"description\"\u003eThis text will be used by screen readers, search engines, or when the image cannot be loaded.\u003c\/div\u003e\n\u003c\/div\u003e\n\u003cinput type=\"hidden\" name=\"field_image[und][0][fid]\" id=\"edit-field-image-und-0-fid\" value=\"10\" \/\u003e\n\u003cinput type=\"hidden\" name=\"field_image[und][0][display]\" id=\"edit-field-image-und-0-display\" value=\"1\" \/\u003e\n\u003c\/div\u003e\u003c\/div\u003e\n \u003cdiv class=\"description\"\u003eUpload an image to go with this article.\u003c\/div\u003e\n\u003c\/div\u003e\n\u003c\/div\u003e\u003cspan class=\"ajax-new-content\"\u003e\u003c\/span\u003e","settings":{"basePath":"\/","overlay":{"paths":{"admin":"node\/*\/edit\nnode\/*\/delete\nnode\/*\/revisions\nnode\/*\/revisions\/*\/revert\nnode\/*\/revisions\/*\/delete\nnode\/add\nnode\/add\/*\nadmin\nadmin\/*\nbatch","non_admin":""},"ajaxCallback":"overlay-ajax"},"ajax":{"edit-field-image-und-0-remove-button":{"wrapper":"edit-field-image-und-0-ajax-wrapper","effect":"none","progress":{"type":"throbber","message":null},"event":"mousedown","keypress":true,"selector":"#edit-field-image-und-0-remove-button","speed":"none","method":"replaceWith","url":"\/file\/ajax\/field_image\/und\/0\/form-ExtTDNqKX5K6Tw9XXswPUvwBWu0NTByBr9v6QSjuJ2w","submit":{"_triggering_element_name":"field_image_und_0_remove_button","_triggering_element_value":"Remove"}}}}}] closepinpinsearchzoomoutzoominzoomin
ReadyState: undefined

IMHO: Basically this amounts to D7 file uploads based on AJAX being unusable with Chrome/Chromium browser. Other browsers work fine for me.

aspilicious’s picture

I use chrome all the time never get these errors....

hd’s picture

Replying to myself in #7: Eventually I found that the Chrome browser extension EzLinkPreview was causing the problem. Disabling the extension fixed the problem.

aspilicious’s picture

Status:Active» Closed (duplicate)

I'm going to close this as this is a duplicate of #240777: Attach: An HTTP Error 0 occurred (on file upload) in some way.
Feel free to reopen if necessary...

paulobsousa’s picture

Priority:Normal» Critical

I have this error on drupal, when i use views, i cannot create one view because this error.

Please Help.

An AJAX HTTP request terminated abnormally.
Debugging information follows.
ReadyState: 4

my website is off-line because this.



yazzz.b’s picture

I encountered the same problem and after much frustration found out that I don't get the error if I use Firefox. I only tested it out on Firefox 3.6, IE 8, Opera 11, and Opera 11.1beta. I also noticed I don't have any problems when I'm on a Windows XP machine, just on Windows 7. I have Windows 7 Ultimate, not sure if that matters. It's weird, I used the same versions of browsers and XP has no problems so I can't say for certain if it's really my host to blame. I would really like to know if anyone got to the bottom of this or noticed any other patterns because I need to do something since most of my users are on IE and Windows 7. Although I haven't actually tested it out on other Win 7 machines. Will do more testing and post an update soon.

rodrigoaguilera’s picture


zopa’s picture

Status:Closed (duplicate)» Needs review

i'm running Drupal 7.10 on PHP 5.2.17 -- i get this error message when i try to upload an image:

An AJAX HTTP request terminated abnormally.
Debugging information follows.
Path: /?q=file/ajax/field_image/und/form-3F2eSnm6KPiqWLfcTEmPmVbQ0k9Vm4JXg0DPPB0CaIE
StatusText: n/a
Fatal error: Call to undefined function file_mimetype_mapping() in /home/mangalas/public_html/DRUPAL7/includes/ on line 316
ReadyState: undefined

i'm new to Drupal and at a total loss - can someone please help?

my drupal installation in a subdirectory off root

xjm’s picture

Status:Needs review» Closed (duplicate)

Hi zopa,

This issue is closed and related to a specific issue. I'd suggest opening a separate issue or creating a forum post. (To help troubleshoot, exact steps to reproduce from "Install Drupal 7.10" would also be a good idea, in that separate post.)

ericwenger’s picture

I was also getting this error. What worked for me was the solution suggested here:

ericwenger’s picture

I guess I can't post links yet, so go to:

and do a search for:
500 internal server error

The post that comes up is the answer (at least for me)

featherbelly’s picture

I am getting something similar when clicking "remove" on an uploaded file link (an image). I have tried the same build on 2 other servers and it works fine... But not on the production server!!! The error does not seem to give much indication of what I should do. If anyone has any pointers!!

Type ajax
Date Friday, 27 January 2012 - 7:00am
User administrator
Message Invalid form POST data.
Severity warning

If I check the location this is what is there:

[{"command":"settings","settings":{"basePath":"\/","pathPrefix":"","ajaxPageState":{"theme":"titanblack_zen","theme_token":"HQSKDetrd2Vw8xtSEHZ0cxdePgx1Xofi3AROpe_G9DI","css":[]},"colorbox":{"transition":"elastic","speed":"350","opacity":"0.85","slideshow":false,"slideshowAuto":true,"slideshowSpeed":"2500","slideshowStart":"start slideshow","slideshowStop":"stop slideshow","current":"{current} of {total}","previous":"\u00ab Prev","next":"Next \u00bb","close":"Close","overlayClose":true,"maxWidth":"100%","maxHeight":"100%","initialWidth":"300","initialHeight":"100","fixed":true,"__drupal_alter_by_ref":["none"]},"jcarousel":{"ajaxPath":"\/jcarousel\/ajax\/views"},"nice_menus_options":{"delay":"800","speed":"fast"},"overlay":{"paths":{"admin":"node\/*\/webform\nnode\/*\/webform\/*\nnode\/*\/webform-results\nnode\/*\/webform-results\/*\nnode\/*\/submission\/*\nnode\/*\/clone\nnode\/*\/edit\nnode\/*\/delete\nnode\/*\/revisions\nnode\/*\/revisions\/*\/revert\nnode
\/edit\/*","non_admin":"admin\/structure\/block\/demo\/*\nadmin\/reports\/status\/php"},"ajaxCallback":"overlay-ajax"},"CToolsModal":{"loadingText":"Loading...","closeText":"Close Window","closeImage":"\u003cimg typeof="foaf:Image" src="http:\/\/\/sites\/all\/modules\/contrib\/ctools\/images\/icon-close-window.png" alt="Close window" title="Close window" \/\u003e","throbber":"\u003cimg typeof="foaf:Image" src="http:\/\/\/sites\/all\/modules\/contrib\/ctools\/images\/throbber.gif" alt="Loading" title="Loading..." \/\u003e"},"modal-popup-small":{"modalSize":{"type":"fixed","width":300,"height":300},"modalOptions":{"opacity":0.7,"background":"#000"},"animation":"fadeIn","modalTheme":"ModalFormsPopup","throbber":"\u003cimg typeof="foaf:Image" src="http:\/\/\/sites\/all\/modules\/site\/tb_modal_forms\/images\/preload_bar2.gif" alt="Loading..." title="Loading" \/\u003e","closeText":"Close"},"modal-popup-medium":{"modalSize":{"type":"fixed","width":600,"height":500},"modalOptions":{"opacity":0.7,"background":"#000"},"animation":"fadeIn","modalTheme":"ModalFormsPopup","throbber":"\u003cimg typeof="foaf:Image" src="http:\/\/\/sites\/all\/modules\/site\/tb_modal_forms\/images\/preload_bar2.gif" alt="Loading..." title="Loading" \/\u003e","closeText":"Close"},"modal-popup-large":{"modalSize":{"type":"scale","width":0.8,"height":0.8},"modalOptions":{"opacity":0.7,"background":"#000"},"animation":"fadeIn","modalTheme":"ModalFormsPopup","throbber":"\u003cimg typeof="foaf:Image" src="http:\/\/\/sites\/all\/modules\/site\/tb_modal_forms\/images\/preload_bar2.gif" alt="Loading..." title="Loading" \/\u003e","closeText":"Close"},"extlink":{"extTarget":"_blank","extClass":"ext","extSubdomains":1,"extExclude":"","extInclude":"","extAlert":0,"extAlertText":"This link will take you to an external web site. We are not responsible for their content.","mailtoClass":"mailto"}},"merge":true},{"command":"insert","method":"replaceWith","selector":null,"data":"\u003cdiv class="messages error"\u003e\n\u003ch2 class="element-invisible"\u003eError message\u003c\/h2\u003e\nAn unrecoverable error occurred. The uploaded file likely exceeded the maximum file size (128 MB) that this server supports.\u003c\/div\u003e\n","settings":null},{"command":"insert","method":"prepend","selector":"head","data":"\u003cstyle media="all"\u003e\n\u003c!--\/*--\u003e\u003c![CDATA[\/*\u003e\u003c!--*\/\n\n\n\/*]]\u003e*\/--\u003e\n\u003c\/style\u003e\n","settings":null}]
TheOptimizer’s picture

I have encountered this error as well. And indeed, there seems to be no solution for this, till I digged a bit deeper.

Probably your PHP runs as FastCGI application. Then probably you are affected by this:

In FastCGI, for some reason, the default value has changed from 1GB to 130kB as you can read on the link above:

Before 2.3.6, this defaulted to 1GB. Most users of earlier versions should use this directive to set a more reasonable limit.

You should have following error in your error.log:
[Thu Feb 09 19:01:04 2012] [warn] [client] mod_fcgid: HTTP request length 131860 (so far) exceeds MaxRequestLen (131072), referer: .........

There are 2 ways you can solve this: change FastCGI or make PHP run as apache module. Here I explain how you can change your server configuration.

You should add following to your server config or virtual host config:

<IfModule mod_fcgid.c>
  # 20MB should be enough
  MaxRequestLen 20000000

You cannot add this to your .htaccess file, so you will need to have access to your server.

Please let me know if this helps.

sainf’s picture

Thanks TheOptimizer!!

Putting "MaxRequestLen 20000000" in the virtualhost file work perfect.

Using Drupal 7.14.

ownage’s picture

Worked for me as well! Thanks for the help!

For those still having trouble, make sure to restart your server after changing the file so the changes can take place.

wmad’s picture

Increasing PHP memory size to allow it to resize large images worked for me. See

allenshorter’s picture

For me the issue was related to FastCGI.

Saw this in my server log....
mod_fcgid: HTTP request length 16778734 (so far) exceeds MaxRequestLen (16777216)

I turned off FastCGI using Parallels on my server using the opposite of the instructions here...

Hope this helps someone. There is a way to do this with FastCGI still on, but I was having other issues so I decided to turn it off.

pipep’s picture

For me the problem was solved by changing the value of "max_execution_time" to "0", on the php.ini file.

defconjuan’s picture

TheOptimizer #19 was exactly the fix in our case. Thanks, I added this solution to a few of the other posts on this topic

ranvel’s picture

#4 worked for me! I loaded it up in FireFox and everything worked 100%!

Thanks for the fix!

rooby’s picture

@pipep in #24:

I would recommend not doing that.

That means that any request to your site can run indefinitely, which could end up killing your server.

At least set some sort of limit, even if it is large, like 300 (5 minutes) or something.

If someone's connection is too slow to be uploading a file in 5 minutes then it is quite likely they should be using a faster connection or uploading a smaller file (at least in most cases).

defconjuan’s picture

solved by changing the value of "max_execution_time" to "0"

Epic. That's like chopping off a leg to fix a broken toe.

pjbarry21’s picture

This is an old issue, but thought I'd post here since I had almost the identical error in 7.22 recently.

The fix that worked for us was using jQuery Update, WITH the patch from here:

It updated the jquery.form.js and jquery.form.min.js files/versions that jQuery Update uses. Prior to the patch, jQuery Update version 7.x-2.3 alone did not solve the issue -- post patch, it appears to be working.

smatron’s picture

Version:7.x-dev» 7.22
Priority:Critical» Normal

how i would add this virtual host config in godaddy

<IfModule mod_fcgid.c>
  # 20MB should be enough
  MaxRequestLen 20000000
Sahin’s picture

#19 explains the problem and the solution very well: if you get the "500 Internal Server Error" (during an update or the installation of Drupal or a module etc.) and you read [date etc...] ... mod_fcgid: HTTP request length ... exceeds MaxRequestLen (...), referer:... in your Apache error log, which was my case, then the solution is most probably , thanks to TheOptimizer.
I can only add that while editing your config file (e.g. conf/httpd.conf) be careful to use the same name/alias given for the fcgid module, i.e. if the module is loaded by

LoadModule fcgid_module modules/

then you have to add
<IfModule fcgid_module>...
<IfModule mod_fcgid.c>...

Nonnie’s picture

Issue summary:View changes

I tried all of these fixes... MY fix was....

I have a settings.php $base_url WITH the 'www'

Then in .htaccess file (root of folder), I un-commented (removed the hashtag):

RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^ http%{ENV:protossl}://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

Error is gone.

Thanks for Drupal community guidance!

sjiuh’s picture

@TheOptimizer #19

Solid gold! thanx a million!

aharown07’s picture

For NGINX users....
I was getting the same (or very nearly) error uploading audio files larger than 1MB.
There is a max body parameter that needs to be adjusted in nginx.conf
Details here:

Short version: find your nginx.conf file.
add or modify the following line inside http {…}
client_max_body_size 20M;

Worked for me.

Ectopod’s picture

Just went through a few weeks of trying to fix the exact same issue. In our case, the problem was caused by the Suhosin PHP extension. That extension was limiting GET and POST requests in a way that was breaking almost any Drupal feature using AJAX. Thought I would mention that here in case it helps anyone else.

juanadmin123’s picture

Ectopod how the hell did you figure this out?????? ive tried everything and finally found your comment after searching for a long time. Thanks so much!!!!!!

firel0rd’s picture

The solution in #35 worked for me as well. Thank you.

kevinnivek’s picture

For me adding this to my mysql config (/etc/my.cnf) file fixed the problem :


Though it may be useful to ensure that your web server, php.ini and other related service configs are also accommodating php request, post size, memory limits, upload size and other related functions.

randa.elayan’s picture

Thank you Ectopod for your reply. I have a question, what did you do do with Suhosin? disabled it or what?

crane_cio’s picture

I just ran into this same issue and found a different solution to this problem.
We are on a share hosting platform with and it turns out that this was caused by a Mod Security rule being tripped.
I was able to talk to the support team and have them create a mod security exception that allowed image and file attachments via AJAX to work.

anavrin’s picture

# 20MB should be enough
MaxRequestLen 20000000

I added this to my vhost configuration at it did the trick :)

Actually in my case I made it 200MB

MaxRequestLen 200000000

Thanks Smatron #30 - it helped.