108 reputation
5
bio website vixo.com
location Linlithgow, United Kingdom
age 51
visits member for 1 year, 8 months
seen Mar 13 '13 at 7:19

CEO/CTO at vixo.com. Former Chief Technical Architect at if.com (Intelligent Finance)


Sep
11
awarded  Student
Jan
22
awarded  Scholar
Jan
22
awarded  Supporter
Jan
22
accepted WordPress Ajax Problems
Jan
22
comment WordPress Ajax Problems
Cheers Fabien - I (eventually) worked that out myself as well by writing debugging lines into WordPress core. I'm getting there.
Jan
22
comment WordPress Ajax Problems
helgatheviking - the curl command isn't running inside the php. I am writing an ajax service that lets a remote server see if a user is logged in by using a redirect - curl simulates that. I type the curl command at the command line. The problem turned out to be the fact that admin-ajax doesn't expect json in the format I was putting it in - still not sure what format it does expect - but making progress.
Jan
21
awarded  Editor
Jan
21
comment WordPress Ajax Problems
The php code runs in the main plugin file - which I assume is executing when I activate the plugin. That file only contains some require statements and the code shown above.
Jan
21
revised WordPress Ajax Problems
added 345 characters in body
Jan
21
comment WordPress Ajax Problems
If I go into admin-ajax.php and run debug comments in there it turns out that it doens't get the action through.
Jan
21
comment WordPress Ajax Problems
> You have nothing specific to do to "load" modified php code in Wordpress. All files are just loaded as is at execution time... So if I edit a file and then externally submit an http request direct to the ajax handler it will automatically reload my changed file before executing the code? What do you mean by 'execution time'?
Jan
21
comment WordPress Ajax Problems
> Perhaps you are executing your CURL command too early? Ie, before the ajax callbacks have a chance to be recognized? - I have no idea what that means. The code to handle the request is in the plugin. I run curl. There is no logical connection between them. I am not running curl from a page served by WordPress. I don't know how to check if the ajax callback has been registered. Can I call a PHP fn to do that?
Jan
21
asked WordPress Ajax Problems
Jan
21
awarded  Autobiographer