Php Post Error 500
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and
500 Internal Server Error Php Ajax
policies of this site About Us Learn more about Stack Overflow the how to solve 500 internal server error in php company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users
500 Internal Server Error Php Cpanel
Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes internal server error php localhost a minute: Sign up JQUERY & php post error 500 (server internal error) up vote 0 down vote favorite I am stuck with an error in a webapp that I am developing, I am sure that it is quite basic error. Whenever I run this code in the web the chromium debbuger return me this error: POST http://my_ip/server_wrapper.php 500 (Internal Server 500 internal server error php codeigniter Error) PHP server works properly, phpinfo() returns the whole information correctly The web server is Apache. Iptables is completly open, and I am just using it under LAN. The permission of all the file in the web root directory are 755. Here is the JQUERY, js file fragment" this.post = function () { $.post ("server_wrapper.php", { _id: this.id, _question: this.question, _type: "none" }, function (data, status) { alert ("DATA: " + data + " status: " + status); } ); } Here is the php file: EDIT This is what the log return over and over again: PHP Fatal error: Call to undefined function mysqli_connect() in /var/www/server_wrapper.php php jquery html mysql ajax share|improve this question edited Jun 17 '13 at 18:53 Joe Frambach 17.7k73771 asked Jun 11 '13 at 17:26 Vic
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the
Php Error 500 Debug
workings and policies of this site About Us Learn more about Stack 500 internal server error php godaddy Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs
500 Internal Server Error Php Iis
Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join http://stackoverflow.com/questions/17050164/jquery-php-post-error-500-server-internal-error them; it only takes a minute: Sign up jQuery Post Method Results Success With 500 Server Error up vote -4 down vote favorite I use this code: $.post('contact.php', { name: $('#name').val(), email: $('#email').val(), message: $('#message').val() }, function(data) { if (data == 'Message sent!') { alert('Success') ; } }); PHP file returns "Message sent!", but with 500 Internal Server Error. http://stackoverflow.com/questions/28407424/jquery-post-method-results-success-with-500-server-error How can I accomplish this problem? Thanx! php jquery ajax post share|improve this question asked Feb 9 '15 at 10:18 Digerkam 390522 look in error.log from your apache? and post the error –donald123 Feb 9 '15 at 10:20 2 500 internal server error means there's problem with server code, display/log error and you'll know what need to be corrected –kmlnvm Feb 9 '15 at 10:20 add a comment| 2 Answers 2 active oldest votes up vote 1 down vote It is because after echoing 'Message Sent' your php files looks for something which is not found on server like favicon.ico or any other file might be js or css. So to remove this use exit; after echoing like, echo 'Message Sent!'; exit; share|improve this answer answered Feb 9 '15 at 10:21 Rohan Kumar 26.9k63565 Nothing effected –Digerkam Feb 9 '15 at 10:26 add a comment| up vote 1 down vote Internal Server Error messages indicate that something in general is wrong. Most of the time, "wrong" means an issue with the
October 24, 2006inApache,lighttpd,TroubleshootingYou get "500 - Internal server error" error message when a user tries to access your Apache or Lighttpd based dynamic php http://www.cyberciti.biz/tips/http-error-500-internal-server-for-php-pages-and-solution.html application (such as forum or blog software).
Generally, to solve this problem you need to take help of log files located at following location:=> /var/log/message=> /var/log/httpd/error_logs (/var/log/lighttpd/error_log or /var/log/httpd/error_log)So you may be wondering why your PHP script throws an Internal Server Error 500.This error only occurs because of web server software. However after looking through logs internal server you may not find many details. This problem may be caused by:A malformed php cgi script An invalid directive in an .htaccess or other config fileLimitation imposed by file system and server software (for example php log file size set to 10Mb)Missing php.ini (or cannot read php.ini file)In most case it is an invalid internal server error .htaccess directive. However recently I came across a web server w/o /etc/php.ini file. A long time ago I setup this server )Apache chrooted jail). So you need to maintain two files one outside jail and another inside jail:=> /etc/php.ini=> /chroot/etc/php.ini <-- this file was missing Many scripts open this file on fly to get correct configuration directives. If this file not found you get error 500. It took some time to figure out this problem. Finally strace helped me out to debug this problem. For me it was another day with another interesting problem ;)Share this on:TwitterFacebookGoogle+Download PDF version Found an error/typo on this page?About the author: Vivek Gite is a seasoned sysadmin and a trainer for the Linux/Unix & shell scripting. Follow him on Twitter. OR read more like this:Test and Troubleshoot Chrooted Apache JailLighttpd php segfault at 0000000000000040 rip 0000003e30228278 rsp…Lighttpd web server setup custom PHP.INI file for each user or domainThe rise of bots, spammers, crack attacks and libwww-perlSetu