console.php bounce-handler

Discussion in 'Common issues' started by miojamo, Jan 13, 2019.

  1. miojamo

    miojamo New Member

    Joined:
    Jan 13, 2019
    Messages:
    5
    Likes Received:
    0
    S.E:
    Expired
    L.T:
    Regular
    L.C:
    1
    Hi,
    Under Postfix mail queue I have a strange error about the cron job:

    Cron <root@site> -x /usr/bin/php -q /home/send/public_html/apps/console/console.php send-transactional-emails >/dev/null 2>&1

    /bin/sh: 0: Illegal option -
     
  2. Dev1@OptiBiz1

    Dev1@OptiBiz1 Member

    Joined:
    Feb 17, 2016
    Messages:
    30
    Likes Received:
    6
    Have you tried running it with

    /usr/bin/php -q /home/send/public_html/apps/console/console.php send-transactional-emails --verbose=1

    ?
     
  3. miojamo

    miojamo New Member

    Joined:
    Jan 13, 2019
    Messages:
    5
    Likes Received:
    0
    S.E:
    Expired
    L.T:
    Regular
    L.C:
    1
    There is no output
     
  4. laurentiu

    laurentiu Member Staff Member

    Joined:
    Mar 13, 2018
    Messages:
    188
    Likes Received:
    21
    @miojamo - try this:
    /usr/local/bin/php -q /home/send/public_html/apps/console/console.php send-transactional-emails --verbose=1

    Insert correct php path. To get path where is installed php on your server, run command: which php
     
  5. miojamo

    miojamo New Member

    Joined:
    Jan 13, 2019
    Messages:
    5
    Likes Received:
    0
    S.E:
    Expired
    L.T:
    Regular
    L.C:
    1
    php path is correct, php version 7.1
     
  6. twisted1919

    twisted1919 Administrator Staff Member

    Joined:
    Dec 27, 2014
    Messages:
    9,852
    Likes Received:
    2,311
    @miojamo - what @laurentiu and @Dev1@OptiBiz1 said are both valid points.
    If you run the command correctly you should see something back, anything. If you don't, then maybe you are running the command as a user and the files are owned by another user and somehow you don't have permissions to run them.
     
  7. miojamo

    miojamo New Member

    Joined:
    Jan 13, 2019
    Messages:
    5
    Likes Received:
    0
    S.E:
    Expired
    L.T:
    Regular
    L.C:
    1
    I do launch them as root. I think there is nothing in the queue therefore there is no output. The problem is with the email about error sent about 100 times per day I had to disable the cron jobs.
    One more thing sending mails work it only the error: /bin/sh: 0: Illegal option -
     
  8. miojamo

    miojamo New Member

    Joined:
    Jan 13, 2019
    Messages:
    5
    Likes Received:
    0
    S.E:
    Expired
    L.T:
    Regular
    L.C:
    1
    I think -x causes the issue you may clsoe the ticket.
     

Share This Page