solidcodes — 2013-06-18T12:44:33-04:00 — #1
Sorry If I posted this here, because it's related to AJAX
Aside from viewing the error using Error Log in the CPANEL.
How do you see a PHP error behind an AJAX page?
I have a PHP function that is being called after the AJAX form page is executed.
My problem is since the form page doesn't refresh the whole page, I don't have any idea what's happening behind the AJAX.
How do I see the PHP error behind an AJAX page?
What is your solution to this?
Thanks in advanced.
fretburner — 2013-06-18T13:14:38-04:00 — #2
All the major browsers have built-in developer tools that allow you to inspect requests and the responses. The first thing I'd do is check if you getting any kind of response from the server which might give you a clue as to the problem. You should also have access to PHP's error log somewhere on your web hosting account (if I remember correctly, cpanel only gives you access to the apache error log), sometimes it's in the public_html folder of your site (or possibly the root) you'll have to have a dig around.
solidcodes — 2013-06-18T13:33:49-04:00 — #3
I'm familiar with FireBug but I'm not good at it.
fretburner — 2013-06-18T13:42:13-04:00 — #4
OK, so open Firebug and select the Net tab, and then navigate to or reload the page you're having problems with. As the page loads, you should see a series of GET requests appear in Firebug panel as the browser loads all the CSS, JS, images and stuff like that. Click the menu button for XHR (ajax requests) and then trigger the ajax request from the page. You should see the request to the server appear, which you can then click and choose the 'Response' tab which will show you the reply from the server.
solidcodes — 2013-06-18T23:27:58-04:00 — #5
But I don't see any error.
ketting00 — 2013-06-18T23:36:39-04:00 — #6
Use chrome and Ctrl + Shift + j is much simpler.