Codeigniter Ajax Error 500
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you jquery ajax 500 internal server error codeigniter might have Meta Discuss the workings and policies of this site
500 Internal Server Error Php Codeigniter
About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or networkerror 500 internal server error in codeigniter 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
500 Internal Server Error Codeigniter Htaccess
4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Jquery AJAX returning error 500 despite the successful execution on server side up vote 5 down vote favorite I am encountering a problem with codeigniter and JQuery Ajax Post. My javscript $('.remove').click(function(){ var category=event.target.id; var id=$('input[name=article_id]').val(); var csrf codeigniter p={}; p['id']=id; $.ajax({ type: "POST", url: "/backend.php/blog/removeCategories", async:true, cache:false, data: {id: id, category: category } }).done(function(msg){ jQuery('#category_list').load('/backend.php/blog/refreshCategories/',p,function(str){}); }); My codeigniter's controller function removeCategories(){ $id=$_POST['id']; $category_id=$_POST['category']; $this->article->removeCategory($category_id,$id); } I can't get the ajax function to work because there is always an error 500 received from the server. Although, firebug returns that there is an error loading the resources, the function removeCategories was executed anyways. jquery codeigniter share|improve this question asked May 11 '12 at 13:40 Mark Seah 300215 your server side is not doing logging, and while it does something it also dies and has some fatal error. Enable PHP error logging and watch out for fatal errors. –hakre May 11 '12 at 15:50 add a comment| 3 Answers 3 active oldest votes up vote 3 down vote accepted Your error could be in the model. Use chrome dev toolkit to find out what the returned page content is. HTTP CODE 500 means server error, typically due to a sy
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta
500 Internal Server Error Ajax Post
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 http://stackoverflow.com/questions/10552518/jquery-ajax-returning-error-500-despite-the-successful-execution-on-server-side you, helping each other. Join them; it only takes a minute: Sign up CodeIgniter + AJAX Internal Error 500 up vote 1 down vote favorite 1 I'm trying to make a ajax call to one method in my Notification controller. My method is: public function testeAjax() { if($this->chamadaAjax()) echo 'Ajax'; else echo 'Form'; } The $this->chamadaAjax() simply http://stackoverflow.com/questions/10131473/codeigniter-ajax-internal-error-500 perform and $this->input->is_ajax_request() And this is my Ajax call: $.ajax({ type: "POST", url: '/office/notificacao/testeAjax', success: function(html) { alert(html); } }); I have a form with two buttons, one for form submit and another for ajax request. The thing is that when I add some data to the ajax like: data: "nome=Gerep", and call it, I receive a Internal Erro 500 When I don't send any data, it works, it returns me form when submitted and ajax when I call ajax request. Any ideas? EDIT Using FireBug here is what I get: f.support.ajax.f.ajaxTransport.sendjquery-1.7.1.min.js:4 f.extend.ajaxjquery-1.7.1.min.js:4 testenotificacao:140 (anonymous function)notificacao:113 onclick php ajax codeigniter share|improve this question edited Apr 12 '12 at 22:46 asked Apr 12 '12 at 20:41 Gerep 4,35283781 Did you check your server logs? If you have access to them the safest way to pinpoint the real reason is to check them out - there will be a reason logged for the HTTP /1.1 500. –holodoc Apr 12 '12 at 20:55
proper formatting. Kenneth_H02-18-2015, http://forum.codeigniter.com/archive/index.php?thread-1203.html 11:24 AM Hi I have tried to build an installer for my codeigniter application and after completing af small form for collecting the database information it should execute a method for setting everything up. This function is located in 500 internal the install controller and the method is called runci and takes no arguments. Currently looks like this: PHP Code: $data=array(
'status'=>'OK',
'http_response'=>200,
'message'=>'JSONdatarecieved'
);
returnjson_encode($data);
My JS looks like this and is written in-line at the bottom of my view-file: Code: //AJAX call to submit and install
$(document).ready(function(){
var formdata = ;
console.log(formdata);
try {
$.post('install/runci', formdata);
}
catch(e) {
console.log(e);
}
}); HTML output is correct, but after outputting the formdata to the console and then posting, I get this error back in the console: Code: POST http://ignitercms.khit.dev/install/runci 500 (Internal Server Error) I know that something is wrong, but I cannot see what. On