PHP error reporting / loggin

Discussion in 'PHP' started by scriptjerk, Oct 4, 2013.

  1. #1
    Hell everyone. I have a small problem that affects me from time to time.
    I get the error in a simple ajax login script.
    In firebug it shows i have an error and it give me a blank response, but i do not get an error_log generated or any new entries in the error_log nor do i get any error output to screen even tho i have set to report everything.

    Ive tested with:
    ini_set('display_errors', 1);
    error_reporting(~0);
    PHP:
    And ive tested with this:
    error_reporting(E_ALL);
    PHP:
    Both work for generating entried in error_log for error on other pages so i know its right, but there are just some errors i come across that dont tell me a single thing. Anyone out there know why because it gets really annoying and i am working on something now and am getting this error that dont report and its just buggin me because im not able to blindly guess what the problem is.

    Thanks in advanced, help is much appreciated
     
    Solved! View solution.
    scriptjerk, Oct 4, 2013 IP
  2. #2
    Well... are you sure it's a PHP-error, and not an error with the js/ajax-script? And is error-reporting enabled on the login-script? I mean, if you're running this through an ajax-script, you're calling the login.php (or whatever it's called) through an ajax-call, and if error-reporting isn't enabled in the login.php-file, you won't necessarily get an error. What does the ajax-script report back, if anything? Blank response, you say, but what kind of reporting/echoing is done in the login.php file?

    What are you supposed to see, and what are you seeing?
    Without any code, it's a bit hard to try to figure out the problem...
     
    PoPSiCLe, Oct 4, 2013 IP
  3. scriptjerk

    scriptjerk Active Member

    Messages:
    43
    Likes Received:
    4
    Best Answers:
    1
    Trophy Points:
    58
    #3
    The 2 sections of code above are 2 things i have tried directly in the login.php in hopes i will get the error in the response. I was getting a php strict standards error from calling a method statically, and i would get an entry in the error_log, once i fixed this, and deleted the error_log which is what i normally do, no more of that error, but still shows error and no response or error_log at this point. here is the link you can try on if you want, i must be missing something, like you said maybe not even php error but something else. http://xtubefun.com/massgrabber/

    This is a massgrabber module i sell, it works almost everywhere, but this server is giving me problems right from the start and its even a vps like mine with the same host and setup. I can copy the files to my server and it works, no errors. Normally when i get a no response error i end up doing a little trial and error but id rather just figure out once and for all what causes these no response errors. also normally the error reporting line is enabled with a setting and placed in the global config of this script, but when i get them i always put the report all error loggin code directly in the script like it is now.
     
    scriptjerk, Oct 4, 2013 IP
  4. scriptjerk

    scriptjerk Active Member

    Messages:
    43
    Likes Received:
    4
    Best Answers:
    1
    Trophy Points:
    58
    #4
    scriptjerk, Oct 4, 2013 IP
  5. scriptjerk

    scriptjerk Active Member

    Messages:
    43
    Likes Received:
    4
    Best Answers:
    1
    Trophy Points:
    58
    #5
    Well i did not figure it out, but my trial and error led to remove the www. for the scripts url in the config variable, and it now works, with no error, so i still dont get it, but remove it seems to have made it all work. that login.php was available www or not and going right to the page diretly shows it loaded and send back the JSON formatted data as expected with www or no www, so still at a loss as to why. but thanks for the help and if anyone can clue me in to why it would be awesome.
     
    scriptjerk, Oct 4, 2013 IP
  6. scriptjerk

    scriptjerk Active Member

    Messages:
    43
    Likes Received:
    4
    Best Answers:
    1
    Trophy Points:
    58
    #6
    Guess it might have something to do with ajax cannot do do cross-domain. Just found that out, so you were right PoPSiCLe was not even a php error.
     
    scriptjerk, Oct 4, 2013 IP
  7. PoPSiCLe

    PoPSiCLe Illustrious Member

    Messages:
    4,623
    Likes Received:
    725
    Best Answers:
    152
    Trophy Points:
    470
    #7
    Sounds like a server-setup mishap, perhaps. Maybe it's not set up to concoct both non-www and www of the same domain to the same site, either in the server config or via .htaccess. As long as all the content is on the same domain, ie. not on different hosts, it shouldn't treat it as cross-domain. www or no www shouldn't matter.
     
    PoPSiCLe, Oct 4, 2013 IP