Page 1 of 1

Email Piping issue.

Posted: Sat Jan 07, 2012 1:30 pm
by johndetlefs
Script URL: http://beachkettlebellworkouts.com
Version of script: 2.3
Hosting company: Hostgator
URL of phpinfo.php:
URL of session_test.php:
What terms did you try when SEARCHING for a solution:

Write your message below:

Has anybody had issues when trying to set up email piping to an addon domain?

So when I set up the email piping the path looks like /public_html/beachkettlebellworkouts.com/hesk etc

Does the .com in the path stuff things up?

I'm getting a local delivery failed return of email every time, and i've tried just about everything I can think of to fix it.

The only other thing that I can think of is the path to php in line 1.

is #!/usr/bin/php -q correct for Hostgator shared hosting accounts? I gave them a call and was told to use plain /usr/bin/php but that didn't change anything.

If anyone has any ideas they'd be much appreciated!

Cheers, and thanks in advance,

John Detlefs

Re: Email Piping issue.

Posted: Mon Jan 09, 2012 4:54 pm
by Klemen
The dot shouldn't be the problem if it's in your server path.

Check the returned email you get - what exactly does it say? Does it say just "local delivery failed" or is there an additional explanation (details) about the issue?

Can you post a sample returned mail you get here (change email addresses of course)?

Re: Email Piping issue.

Posted: Mon Jan 09, 2012 8:16 pm
by johndetlefs
Hey Klemen, thanks for helping out!

Here is the message that I get.

This message was created automatically by mail delivery software.

A message that you sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es) failed:

pipe to |/home/jdetlefs/public_html/beachkettlebellworkouts.com/hesk/inc/mail/hesk_pipe.php
generated by support@beachkettlebellworkouts.com

The following text was generated during the delivery attempt:

------ pipe to |/home/jdetlefs/public_html/beachkettlebellworkouts.com/hesk/inc/mail/hesk_pipe.php
generated by support@beachkettlebellworkouts.com ------

Error in argument 1, char 3: option not found
Usage: php [-q] [-h] [-s] [-v] [-i] [-f <file>]
php <file> [args...]
-a Run interactively
-b <address:port>|<port> Bind Path for external FASTCGI Server mode
-C Do not chdir to the script's directory
-c <path>|<file> Look for php.ini file in this directory
-n No php.ini file will be used
-d foo[=bar] Define INI entry foo with value 'bar'
-e Generate extended information for debugger/profiler
-f <file> Parse <file>. Implies `-q'
-h This help
-i PHP information
-l Syntax check only (lint)
-m Show compiled in modules
-q Quiet-mode. Suppress HTTP Header output.
-s Display colour syntax highlighted source.
-v Version number
-w Display source with stripped comments and whitespace.
-z <file> Load Zend extension <file>.
-T <count> Measure execution time of script repeated <count> times.

Re: Email Piping issue.

Posted: Tue Jan 10, 2012 3:53 am
by Hyvätti
You need to convert the hesk_pipe.php from the DOS/WINDOWS CR LF line termination to UNIX LF line termination. Or at least remove the CR character from the first line.

Re: Email Piping issue.

Posted: Tue Jan 10, 2012 4:31 am
by johndetlefs
You are a god. That worked perfectly... stupid of me not to have thought of it!

Cheers, and thankyou very much!

John Detlefs

Re: Email Piping issue.

Posted: Thu Jan 12, 2012 8:55 am
by buddybooker
Hyvätti wrote:You need to convert the hesk_pipe.php from the DOS/WINDOWS CR LF line termination to UNIX LF line termination. Or at least remove the CR character from the first line.
I am having exactly the same problem, although I do not know exactly how to accomplish the suggested fix.

A little more about how I got here.

Set up email piping to begin with and was not getting anything.

Removed the -q from the php path and it worked but ;
The ticket submitted ok and the corresponding email notifications
Still got the returned mail message as well.


Can you explain how to fix this in a little more detail?

Thanks

Re: Email Piping issue.

Posted: Thu Jan 12, 2012 12:26 pm
by Hyvätti

Code: Select all

tr -d '\r' < hesk_pipe.php > hesk_pipe.php.tmp
mv hesk_pipe.php.tmp hesk_pipe.php
As this is a common problem and this file is only used in UNIX type hosts, my suggestion would be to ship the file with UNIX LF only line termination.

Re: Email Piping issue.

Posted: Thu Jan 12, 2012 2:09 pm
by Klemen
Try this file: http://www.phpjunkyard.com/extras/hesk_23_pipe_nocr.zip

If your returend mail shows some other error (not the one mentioned above) post it here.

Re: Email Piping issue.

Posted: Fri Jan 13, 2012 12:53 am
by johndetlefs
I don't think this is Klemen's fault, although the instructions will lend to this error depending on what editor you use.

I use Text Wrangler which seems to have it's default set to Windows.

In the piping instructions you are told to check and make sure that that the first line of the file hesk_pipe.php has the correct path to php.

So I went in there, saw that it looked fine and then saved. Bingo, instant problem.

I just did a new install for another website, didn't go into the pipe file at all and it worked just fine.

So the file in itself I don't think is creating the problem, but the going in and having a look and then saving is what caused the problem for me.

Re: Email Piping issue.

Posted: Sat Jan 14, 2012 9:03 pm
by Hyvätti
Nope, the original file in original .zip has DOS CR LF in all lines, including the php command line.

Re: Email Piping issue.

Posted: Tue Mar 13, 2012 8:29 am
by ncompass
Converting the file to a UNIX format can also be done by editing the file in CPanel... just open using the File Manager and resave it. Much easier for those unfamiliar with SSH - thanks

Re: Email Piping issue.

Posted: Tue Mar 13, 2012 4:22 pm
by Klemen
Thanks for the tip!

Re: Email Piping issue.

Posted: Tue Mar 18, 2014 8:17 pm
by unadonis
I was getting the same error message:
Error in argument 1, char 3: option not found
Usage: php [-q] [-h] [-s] [-v] [-i] [-f <file>]

...until I used 23_pipe_nocr.zip, now the only problem is when a support ticket is generated by emailing the Hesk-piped email address directly, it doesn't replace the variables in the subject line:

Subject: [#%%TRACK_ID%%] Ticket received: %%SUBJECT%%

It DOES insert the actual Tracking_ID in the body of the email, just not the subject line.
Any ideas on how to fix that? I did open=> save hesk_pipe.php in CPanel to make sure it was UTF-8.
I'm using the current latest Hesk (v2.5, I believe)
Thanks in advance!

Re: Email Piping issue.

Posted: Wed Mar 19, 2014 9:39 am
by Klemen
You need to use the version 2.5 pipe file (you downloaded the one for version 2.3).

Try this one instead:
http://www.hesk.com/extras/hesk_25_pipe_EOL.zip