OK I will use this function to extract error details.
OK I will use this function to extract error details.
I have used the following line of code:
ini_set("display_errors","2");
ERROR_REPORTING(E_ALL);
in my root folder PHP file when this file is access from EZ pages using AJAX call I don't see any error but AJAX does not work.
The EZ Pages block all PHP errors.
What should I do now?
Where are you looking for the errors? How do you know that the AJAX hasn't worked? Which step in the AJAX process isn't working?
Kuroi Web Design and Development | Twitter
(Questions answered in the forum only - so that any forum member can benefit - not by personal message)
I'm using Jquery for AJAX call.
The Success function or any other function like Error or Complete does not execute once I send the AJAX Call.
I'm using json_encode to get everything back on EZ pages on Zen cart. After including Application_top.php file nothing comes back through JSON_ENCODE, rather i receive 0 bytes.
All you're telling us is that you're not getting a response after triggering an ajax message. But you telling us anything about what steps you've taken to work out whether it's a problem with sending your message, or with receiving it on the server, or with handling the message or with preparing the response or with sending the response.
You do suggest that you're using json_encode to send the response, but that's not what json_encode does. It's function is merely to take a value (usually an array for AJAX) in UTF-8 format and return a string in json format. It doesn't send it anywhere.
The situation you find yourself in is normal when developing ajax, since by definition, much of the processing is hidden away. I find the Firebug console feature invaluable for exposing the messages to and from the server.
Errors on the server can be seen in your site's or your apache log files, and if they're not reported there, insert some dumps of your own and write them to your own log files (or echo or var_dump trace information and pick it up in the ajax response shown in the Firebug console).
However, the only person who can do all this is you, as it requires access to your server, and possibly your admin (though your later posts suggest that you're doing something on your EZ-Pages rather than in your admin, so maybe not), and specific knowledge of the code you're writing.
Kuroi Web Design and Development | Twitter
(Questions answered in the forum only - so that any forum member can benefit - not by personal message)
Thank you so much for your detailed response. I will try to track the error and will inform you where the exact problem is.
Previously, I had enabled PHP reporting but no error was detected when AJAX stopped working after including application_top.php file.
I think Firebug is the right option at this time to track what the exact problem is?
I know you cant test what I'm trying to do but if you want I can paste the code here. Let me know if by pasting code here can give you better understanding of how I'm implementing AJAX. ?
Thank you so much for all your effort.
BUT I HAVE JUST GIVEN UP !
I have tried everything but i don't know why php file is not sending response back to JS file when I include application_top.php file.
I have given one more attempt to this issue. The following code is tested:
myphp.php file:
<?php
echo 'Testing module';
require('../includes/application_top.php');
echo 'Code after Application_top.php';
?>
When I call this myphp.php file through AJAX I get only "Testing module" printed but no other message after application_top.php file is executed.
It shows that when require('../includes/application_top.php'); is executed it redirects somewhere else without giving any error therefore nothing after that line is executed. That is why I'm not getting any response from AJAX as soon as I include application_top.php file.
I hope now you can realize that there are some settings or some variables in application_top.phph which does not allow further execution of my php file.
Can you suggest any solution now?
this is late I'm sure but this was my solution. I needed to add the chdir. With out that no matter if I put the full path or not it would not work
chdir('../../');
require_once('includes/application_top.php');
Bookmarks