500 Internal Server Error Xmlhttp.send
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up 500 Internal Server Error on XHR Request up vote 0 down vote favorite Here is my code: var fd = new FormData(document.querySelector('#form-step1')); var xhr = new XMLHttpRequest(); xhr.open('POST', '/Handlers/newAccount_handler.php', true); xhr.send(fd); // this line is causing a 500 Internal Server Error and the data is not saved to the MySQL table Why is the last line causing a 500 Internal Server Error? Is there anything wrong with the code or do I need to log anything first to see? javascript mysql xml xmlhttprequest share|improve this question asked Oct 9 '13 at 7:41 James Anderson 1101728 Are you sure '/Handlers/newAccount_handler.php' is the right location. Give us your file tree of your server. –AxelPAL Oct 9 '13 at 9:10 add a comment| 2 Answers 2 active oldest votes up vote 1 down vote There is nothing wrong with the last line. The '500 Internal Server Error' is simply the result the server sends back as the result of the request. This means that '/Handlers/newAccount_handler.php' is the real problem. If you open this URL in a browser it will show you an error. share|improve this answer answered Oct 9 '13 at 9:07 Sander_P 1,1471519 Hi @sander_p, the file does exist and if I navigate to it on my browser, it does open. –James Anderson Oct 9 '13 at 16:50 1 In that case, when running the above code, use your browser to see what's going on. With Chrome, press F12, then go to the Network tab, press F5 and clic
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up XMLHttpRequest returns status code 500 up vote 0 down vote favorite When I try to get data from another web site using Ajax, I get a status code 500 error response. This is my http://stackoverflow.com/questions/19265914/500-internal-server-error-on-xhr-request code example: var requestUrl = "http://www.mywebsite.com:8090/api/service.asmx/method"; var postedDataJson = JSON.stringify({ para1: 'value 1', para2: 'value 1' }); try { $.ajax({ type : "POST", url : requestUrl, data : postedDataJson, contentType : "application/json; charset=utf-8", dataType : "json", crossDomain : true, success : function(response) { console.log("success"); }, error : function(jqXhr, exception) { console.log("error"); } }); } catch (e) { options.error("oops! Something whent wrong."); } How can I fix this? ajax xmlhttprequest share|improve this question edited Sep 28 '15 at 10:47 Alex H 1,139421 http://stackoverflow.com/questions/32293493/xmlhttprequest-returns-status-code-500 asked Aug 30 '15 at 5:30 Ishantha 11 A HTTP 500 error is a server-side error. Something about the data you're posting to the service is causing the problem. Without any information on the server error (500 is as generic as it gets), there's no way to tell what's going on. –Shawn Conn Aug 30 '15 at 6:10 add a comment| 1 Answer 1 active oldest votes up vote 0 down vote A response with a status code 500 indicates an Internal Server Error. That means that there was an unexpected error on the server side that your request triggered. If you're the developer of the server software, look at the logs or debug the server application to get to the root of the problem. Your JS code looks ok. share|improve this answer answered Sep 1 '15 at 6:28 theDmi 7,40533276 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign up using Facebook Sign up using Email and Password Post as a guest Name Email Post as a guest Name Email discard By posting your answer, you agree to the privacy policy and terms of service. Not the answer you're looking for? Browse other questions tagged ajax xmlhttprequest or ask your own question. asked 1 year ago viewed 1428 times active 1 year ago Related 300How many concurrent AJAX (XmlHttpRequest) requests are allowed in popular
Studio 2015 products Visual Studio Team Services Visual Studio Code Visual Studio Dev Essentials Office Office Word/Excel/PowerPoint Microsoft Graph Outlook OneDrive/Sharepoint https://social.msdn.microsoft.com/Forums/ie/en-US/c5ae745a-cb91-4914-9538-f4c6b81f7f9c/xmlhttprequest-500-internal-server-error?forum=iewebdevelopment Skype Services Store Cortana Bing Application Insights Languages & platforms Xamarin ASP.NET C++ TypeScript .NET - VB, C#, F# Server Windows Server SQL Server BizTalk Server http://www.inmotionhosting.com/support/community-support/general-server-setup/internal-error-500 SharePoint Dynamics Programs & communities Students Startups Forums MSDN Subscriber downloads Sign in Search Microsoft Search Windows Dev Center Windows Dev Center Explore What’s new for Windows 500 internal 10 Intro to Universal Windows Platform Coding challenges Develop for accessibility Build for enterprise Windows Store opportunities Docs Windows apps Get started Design and UI Develop API reference Publish Monetize Promote Games Get started UI design Develop Publish Desktop Get started Design Develop API reference Test and deploy Compatibility Windows IoT Microsoft Edge Windows 500 internal server Holographic Downloads Samples Support Why Windows Dashboard Explore What’s new for Windows 10 Intro to Universal Windows Platform Coding challenges Develop for accessibility Build for enterprise Windows Store opportunities Docs Windows apps Get started Design and UI Develop API reference Publish Monetize Promote Games Get started UI design Develop Publish Desktop Get started Design Develop API reference Test and deploy Compatibility Windows IoT Microsoft Edge Windows Holographic Downloads Samples Support Why Windows Dashboard Ask a question Quick access Forums home Browse forums users FAQ Search related threads Remove From My Forums Asked by: XmlhttpRequest - 500 Internal Server Error Internet Explorer Development > Internet Explorer Web Development Question 0 Sign in to vote I have this javascript in an aspx page and when executed gives me a 500 Internal Server Error for status. What I am trying to do is call a web service out on the net using XmlhttpRequest. What am I doing wrong? Jam Heres the page: Cod
DOMAINS WEB DESIGN WEB DESIGN SERVICES CREATE YOUR OWN WEBSITE SITE HOSTING TOOLS MEET US MEET US ABOUT US PARTNERS & AWARDS BLOG WE'RE HIRING CONTACT US AMP LOGIN SUPPORT CENTER Search Support Center Product Guides Dedicated Hosting Reseller Hosting KnowledgeBase Website Email Domain Names Reseller Billing Community Support Browse Questions Ask a Question User Submitted Articles Education Channels Android BoldGrid cPanel DokuWiki Drupal 7 Drupal 8 Everything Email Joomla 2.5 Joomla 3.1 K2 Magento 1.6 Mambo MediaWiki Moodle Movable Type OpenCart OpenCart 2.0 osCommerce PHP-Fusion PHP-Nuke phpBB phpList Premium Website Builder PrestaShop 1.5 PrestaShop 1.6 SMF Tiki Wiki VirtueMart 3 Web Hosting Manager Website Design WordPress Tools & Resources Email Configuration Blacklist Check Visual DNS Lookup Quick Tagger Icon Sets Favicon Generator Bounce Back Parser What is my IP address? >>Community Support Community Support Browse Questions Ask a Question User Submitted Articles Community Support Questions Categories Users Ask a question Internal server error 500 Category: General Server Setup landervs 17 Points Asked: 2013-05-21 3:17 pm EST Hits: 1,336 Hi guys, I'm the webmaster of the eargroup.net, i made the site on my own test server, but when i moved the site to the realtime server i was'nt able to upload any images anymore with jQuery axuploader. I checked the error logs in cPanel, they give me an internal 500 error. I debugged with chrome, and the error occurs on this line: xhr.send(chunk);//send request of file I also experimented with the permissions of the folders and scripts, without succes. Most of permissions are 755 or 644. I hope you're able to read more detailled error logs and maybe help us to find the bug. Sincerly, Lander You must login before