-5

I am using codeigniter for a website in my localnet. I am making a call to a method in a view like this :

$.ajax({
    url: "<?php  
        if(ENABLEACTIVEDIRECTORYMODE == true)                                      
            echo site_url('login/loginController/loginControlWithActiveDirectory');
        else
            echo site_url('login/loginController/loginControl');
    ?>",
    type: 'POST',
    data: data,
    success: function(data1){   
        $("body").innerHTML("<h1>BOBAA</h1>");
        // To get rid of whitespaces etc.
        var reply = data1.replace(/\s+/, "");
        if( reply.toString() == 'OK' ){ 
           window.location.href = <?php echo json_encode(site_url()); ?> + '/operation/operationController';                           
        }else if( reply.toString() == 'FAIL' ){                           
            alert("Kullanıcı adı ve/veya parola yanlış girilmiştir.Lütfen tekrar deneyiniz.");
        }  
    }
});

As far as i check from firebug, it is giving an internal 500 error. I Am clicking a button to make this ajax request. Yet even though i get an internal 500 error. Nothing changes. Page stands still. There is no logging of any errors in apache log file. And php simply does not log even though, every setting in php.ini is correct.( I am sure about this because I have give a day to solve that problem before).

In my index.php, following lines are set.

error_reporting(E_ALL);
ini_set('display_errors', 1);

So I am pretty confused, i suscpect if nothing is logged because of codeigniter. I am not even sure if internal 500 is coming from the php file. But there is nothing else done by the clicking of the button.

All in all, I wanna see some errors. But why cant I , that is the question.

pnuts
  • 58,317
  • 11
  • 87
  • 139

2 Answers2

1

A 500 error is a server side error and probably a problem with your .htaccess file. Look at your server logs and see what they are saying. Also load the page directly and see if that outputs any information that is useful to you but codeigniter will never get logged cause the error is happening before PHP is getting invoked or the compiler is barfing at your syntax somewhere.

Michael Sole
  • 124
  • 4
0

http://ellislab.com/codeigniter/user-guide/general/errors.html

Also, are you checking the right log file for errors? Did you set a folder for errors in php.ini? Are you sure there isn't a different file for errors set in an apache config?

https://stackoverflow.com/a/3277783/183254
https://stackoverflow.com/a/13729932/183254
https://stackoverflow.com/a/9429681/183254

@Michael Sole is probably on the right track in regards to .htaccess;

If you are on *nix, you can grep through log folders looking for indications of where apache is logging

grep -Rn "loginController" /var/log

http://www.gnu.org/software/grep/manual/grep.html

Community
  • 1
  • 1
stormdrain
  • 7,915
  • 4
  • 37
  • 76
  • So wrong. Other than that, I am not sure if I was clear in the question, but I want logs, errors. The question is more about why there are no errors shown than why the error occurred. I am sorry if it was not clear. – Özüm Safaoğlu May 24 '13 at 15:09
  • So wrong? Anyway, you have to look in the right file. Try grepping through /var/log looking for todays date or something. – stormdrain May 24 '13 at 15:14
  • I dont have a .htacess file. However all my php.ini and codeigniter settings, also apache2.conf are set correctly. I am not a newbie about those cases. However even apache does not log anything after a 500 internal error. Isnt that a bit weird. – Özüm Safaoğlu May 24 '13 at 16:55
  • You know I actually doubt now if you and michael Sole actually read my post. W/e – Özüm Safaoğlu May 24 '13 at 17:25
  • Despite how utterly rude you are being to people who are **trying to help you**, I edited the answer with something else you might be able to try. Good luck. – stormdrain May 24 '13 at 18:13