• Resolved Tedd2011

    (@tedd2011)


    Hello,

    First of all, I want to say that I greatly admire your work and feel lucky to benefit from such a cool plugin.

    I have read many posts as well as the faq, help etc but I am unable to make the automatic posting feature work.

    Everything works fine when I manually fetch the emails by using the button in the wordpress dashboard.

    _______________________________________________________________________

    I tried fixing this by creating a SetCronJob with the following “url to call” :

    https://www.mydomain.org/wp-content/plugins/postie/get_mail.php

    But the SetCronJob result in a failure.
    Error log:
    HTTP/1.0 500 Internal Server Error
    Date: Wed, 22 May 2013 17:52:54 GMT
    Server: Apache/2.2.22 (Ubuntu)
    X-Powered-By: PHP/5.3.10-1ubuntu3.6
    Vary: Accept-Encoding
    Content-Encoding: gzip
    Content-Length: 20
    Connection: close
    Content-Type: text/html

    Last URL: https://www.mydomain.org/wp-content/plugins/postie/get_mail.php
    Last HTTP status: 500
    ____________________________________________________________________

    Since I’m working on my own linux server I tried using cron:
    I have added in my crontab :

    */10 * * * * /usr/bin/wget -O /dev/null https://mydomain.org/wp-content/plugins/postie/get_mail.php >/dev/null 2>&1

    */10 * * * * /usr/share/php /usr/share/wordpress/wp-content/plugins/postie/get_mail.php

    I had it checked, the cron is running but still nothing happens. Since I was told that it’s working fine, I have not searched for a log file.. now that I sum up everything here, maybe this was a mistake.

    Last thing I did was change the rights on my postie folder (chmod) just for the heck of it but to no avail. I would really welcome some help on this .. I have run out of options. If anyone is wondering, I replaced my real domain name with “mydomain.org” on each occurrence in this post.

    https://www.ads-software.com/extend/plugins/postie/

Viewing 4 replies - 1 through 4 (of 4 total)
  • I’m working on some similar issues, and while I can’t promise a fix (and I know nothing about the SetCronJob service), here are some thoughts:

    1) Do either running wget or php from the commandline as above work? That should tell you something. If you don’t redirect wget’s output to null, and don’t use the -O switch, you’ll get a little info on stdout and in the output get_mail.php. Using php should echo everything to stdout that Postie normally writes to the browser inside WP (i.e., when you use the button on the dashboard).

    2) Logging: according to this page, cron logs its jobs in /var/log/cron or similar. That should at least tell you whether your jobs ran.

    You can turn on Postie’s own logging, as described in the FAQ, second item from the bottom. It’s quite verbose, so you probably don’t want to keep it turned on long-term, and you have to troll through a lot of stuff to find useful info.

    You could also have wget log its output with
    wget -a mylog -O - [URL]
    (-a appends, -o mylog will recreate the file every time)

    And with php, you could just redirect the stdout and stderr to a log with something like:

    php [URL] >> mylog 2>&1
    (again, >> appends, > will recreate)

    3) You do realize that you don’t need both the wget call and the php call in your crontab, yes?

    HTH.

    Thread Starter Tedd2011

    (@tedd2011)

    Splaestro,

    Thank you very much for replying.

    1) I have dropped the -O switch and redirected wget’s outup to a file

    */10 * * * * /usr/bin/wget /tmp/cronlog https://www.sociart.org/wp-content/plugins/postie/get_mail.php >/tmp/cronglog 2>&1

    In the file, I can see that my cron job is trying to reach the url https://www.domain.org/wp-content/plugins/postie/get_mail.php but gets an internal server error 500

    2) There is no cron log file in /var/log/cron but I was able to find in /var/log/syslog something interesting that makes me think that my cron job is running:

    May 24 06:50:01 domainname CRON[31994]: (root) CMD (/usr/bin/wget -O /dev/null https://www.domain.org/wp-content/plugins/postie/get_mail.php >/dev/null 2>&1)
    May 24 06:50:01 domainname CRON[31995]: (root) CMD (/usr/share/php /usr/share/wordpress/wp-content/plugins/postie/get_mail.php)

    I have activated postie’s own logging and I am expecting the debug file to appear any minute now.

    The wget log output gives me the same as the 1) ( internal server error 500 when trying to reach my server) and the php log gives me the following :

    Could not open input file: https://www.mydomain.org/wp-content/plugins/postie/get_mail.php

    3) Yes I realize that ?? but I’m getting a little desperate therefore I’m trying everything I can.

    So I guess the problem is that the php file is unreachable ? But then why does it work when clicking the run button in the dashboard ? More questions do I have. And now i’m talking like Yoda, keeps getting better & better.

    Thread Starter Tedd2011

    (@tedd2011)

    And with php, you could just redirect the stdout and stderr to a log with something like:
    php [URL] >> mylog 2>&1

    I have been playing with this and found the following error message that might be interesting:

    PHP Warning: require_once(/etc/wordpress/wp-settings.php): failed to open stream: No such file or directory in /etc/wordpress/wp-config.php on line 90

    PHP Fatal error: require_once(): Failed opening required ‘/etc/wordpress/wp-settings.php’ (include_path=’.:/usr/share/php:/usr/share/pear’) in /etc/wordpress/wp-config.php on line 90

    Plugin Author Wayne Allen

    (@wayneallen-1)

    Where is your wp-settings.php file located?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Automatic posting not working (manual working)’ is closed to new replies.