Welcome Guest ( Log In | Register )

 Forum Rules Extensions Support
 
Reply to this topicStart new topic
> Post By Mail Cron Not Working [solved]
marcodeluca
post Aug 8 2012, 07:57 PM
Post #1


Newbie
*

Group: Members
Posts: 3
Joined: 8-August 12
Member No.: 1,303



Just purchased the post by mail component and setup cron jobs as you described and they were not working. So I setup a bunch of cronjobs with different syntax, and am getting errors like:

Код
Warning: Invalid argument supplied for foreach() in /home/server/public_html/workincity/libraries/joomla/string/string.php on line 970
xajax Error: xajax failed to automatically identify your Request URI.Please set the Request URI explicitly when you instantiate the xajax object.


I think something is wrong with your cron.post_by_email.php script.
Go to the top of the page
 
+Quote Post
Web Design Seo
post Aug 9 2012, 07:01 AM
Post #2


Web Design Seo
****

Group: Root Admin
Posts: 4,332
Joined: 29-April 09
From: Sofia
Member No.: 1



I dont see any error from files of post by email. If you find something more, please, post it here after 20 august. Support will be available only after 20 august.


--------------------
Правила на форума | Forum Rules | How to receive support. 3D Web Design: Уеб дизайн, Seo оптимизация, Web Site Extensions, Oscommerce Addons, Wordpress plugins and Joomla Extensions. Изработка на уеб сайтове и оптимизация на сайт за търсачки и Seo услуги.
Go to the top of the page
 
+Quote Post
marcodeluca
post Aug 9 2012, 10:54 AM
Post #3


Newbie
*

Group: Members
Posts: 3
Joined: 8-August 12
Member No.: 1,303



Well, there's definitely something not working. Sorry I posted in a rush yesterday so here are more details:

- Post by Email Pro 1.5.9
- j2.5
- cPanel on a dedicated host

I regularly setup cron jobs without issues, executing a php file is a simple job so Im really not sure what the problem is. But it's definitely not working for me.

Has anyone else out there set this component up on j25 and configured cron job to work properly?
Go to the top of the page
 
+Quote Post
marcodeluca
post Aug 9 2012, 03:45 PM
Post #4


Newbie
*

Group: Members
Posts: 3
Joined: 8-August 12
Member No.: 1,303



Okay I got it working. For anyone else doing this through cpanel, if you have problems it could be because of user permissions accessing the cron or wget folders on your server. I used curl, and I made sure that the cpanel user running the cron had permission to access /usr/bin/curl, and then used the following syntax for cron:

CODE
/usr/bin/curl -o --url http://mysite.com/administrator/components/com_post_by_email/cron.post_by_email.php > /dev/null 2>&1


You'll need to have root access to edit the permissions of /usr/bin/curl, and you can use CHOWN or CHMOD commands to fix permission problems.
Go to the top of the page
 
+Quote Post
Chris Grant
post Nov 10 2012, 09:08 AM
Post #5


Newbie
*

Group: Members
Posts: 8
Joined: 15-December 11
Member No.: 1,001



QUOTE (marcodeluca @ Aug 9 2012, 04:45 PM) *
Okay I got it working. For anyone else doing this through cpanel, if you have problems it could be because of user permissions accessing the cron or wget folders on your server. I used curl, and I made sure that the cpanel user running the cron had permission to access /usr/bin/curl, and then used the following syntax for cron:

CODE
/usr/bin/curl -o --url http://mysite.com/administrator/components/com_post_by_email/cron.post_by_email.php > /dev/null 2>&1


You'll need to have root access to edit the permissions of /usr/bin/curl, and you can use CHOWN or CHMOD commands to fix permission problems.


I have just moved my site to SiteGround VPS running php 5.3.16 and J1.7.5 with Kunena 2+

The script runs fine from a browser but as sson as I put it in a cron I get errors in my cron email

xajax Error: xajax failed to automatically identify your Request URI.Please set the Request URI explicitly when you instantiate the xajax object.

I'm using
/usr/local/bin/php -q /home/mysite/public_html/administrator/components/com_post_by_email/cron.post_by_email.php

I never have trouble running other php scripts on cron like this.

A bit of googling suggests that axaj is no longer supported in php 5.3 and above
e.g.http://forums.eukhost.com/f29/cron-error-14971/

If this is the case Ivan then when will you be able to fix it please, loads of Linux hosts are running 5.3+ and I don't recall any warning on your spec. Is the ajax actually needed for the Kunena imports or is it there for other apps that I don't need. Perhaps I can rem it out for now?

Thanks for your tip Marco but I don't have root access to try what you suggest so I'm stuck.
Go to the top of the page
 
+Quote Post
Ivan Stamenov
post Nov 12 2012, 10:30 AM
Post #6


Advanced User
****

Group: Advanced Member
Posts: 218
Joined: 15-April 11
Member No.: 761



Hi, Chris.

Please try the following:

1. Open /administrator/components/com_post_by_email/cron.post_by_email.php
2. Put the following code somewhere at the beginning of the file, e.g. right after the opening PHP tag:
Код
if (empty($_SERVER['HTTP_HOST']))
    $_SERVER['HTTP_HOST'] = 'localhost';
if (empty($_SERVER['REQUEST_METHOD']))
    $_SERVER['REQUEST_METHOD'] = 'get';


This will allow the xajax object to initialize successfully.
This is a quick and dirty fix, though. You will get the xajax response XML on your e-mail every time the cron fires (if you set an e-mail address to receive the cron output at).

Xajax will be completely removed in the next version of PBM.

Best regards,

Ivan
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

Collapse

> Similar Topics

  Topic Replies Topic Starter Views Last Action
No new Cron Jobs Not Executing With Easycron After Updating
4 Kat 273,491 9th September 2021 - 06:41 PM
Last post by: Kat
No New Posts Cron Jobs Failing
1 Kat 62,337 29th July 2021 - 06:08 AM
Last post by: Web Design Seo
No new Pinned: Topic has attachmentsPost By Email Pro
Pro version of Post By Email component
116 Ivan Stamenov 630,836 24th March 2021 - 01:56 PM
Last post by: Web Design Seo
No New Posts Post By Email Pro - Cron Warnings
JROUTER_MODE warnings
3 Brian Craigie 124,189 12th March 2020 - 08:35 AM
Last post by: Web Design Seo
No New Posts Post By Email To K2 Images Not Resizing
1 bossies 127,204 31st May 2019 - 10:49 AM
Last post by: Web Design Seo
No New Posts Post By Email, Error 500
500 error on backend
1 galamarco 172,102 17th January 2019 - 06:29 AM
Last post by: Web Design Seo
No New Posts Mailorder In Costum Module
1 Robert Johansson 58,562 2nd July 2018 - 06:46 AM
Last post by: Web Design Seo
No New Posts Cron Job Working But With Notices
1 Kat 48,965 5th May 2017 - 05:56 AM
Last post by: Web Design Seo
No New Posts Mailorder Pro Plugin Blank Form In Internet Explorer 9
mailorder pro plugin blank form in internet explorer 9
3 rajinfosys 59,605 27th February 2017 - 10:25 AM
Last post by: Web Design Seo
No New Posts Notepad++ New Line Replace
How to find and replace new line in Notepad++
0 Web Design Seo 84,143 8th December 2016 - 01:45 PM
Last post by: Web Design Seo


 



RSS Lo-Fi Version Time is now: 2nd June 2026 - 01:58 AM