One of my hobbies is to develop websites and I have ended up developing quite a few of them. Time has come when it is necessary to regularly back up the websites lest I run into issues should something goes wrong with the web host. Cron jobs help back up websites (including databases) fairly easily. But I ran into AJAX error issue when I went to set up cron through cPanel.
For example, I went into cPanel's "Cron jobs" and tried to set up a cron using the file path "/home/myusername/public_html/myfolder/xyz.php" in the "Command" line. The set up went through smoothly but the cron didn't run at the specified time. I found out that I needed to have "/usr/local/bin/php -q" just before "/home/myusername/public_html/myfolder/xyz.php". But when I added that extra bit of code, I ended up getting AJAX error. Searching around for a solution, I ran into a discussion at cPanel's Website regarding this issue. But I did not find any solution in that discussion thread. After almost two days of looking around, I finally got an answer from one of the system admin at my hosting company. He asked me if I am using a cPanel proxy to log into my account and my answer was YES. He simply asked me to use specific port to log in instead of proxy. I tried that out and BINGO! All is well and no more AJAX error. Then he went on to mention that cPanel's proxy interface is having some issues with their x3 theme. Geez.....thanks for telling me that now after two days of fooling around. It's even more ridiculous because that's the only theme which is being offered right now through my WebHost Manager (WHM).
But for any one else out there who are having same issues, try out the following to see if it works.
AJAX Error if you try to set up cron using
http://cpanel.mywebsite.com
No AJAX Error if yu try to set up cron using
http://mywebsite.com:0000
or
http://111.111.111.111:0000
NOTE: Replace 111.111.111.111 with the IP address of your website. If you don't know, simply check the WHOIS database. 0000 stands for port. If you don't know the specific port to access your cPanel, ask your web hosting company.
Thanks for the info.
it Works for me too..
Many thanks for sharing :-)
Thanks for the info.