Yii Framework Forum: Piping Email To PHP Script - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Piping Email To PHP Script Error in argument 1, char 3: option not found Rate Topic: -----

#1 User is offline   auzadventure 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 26
  • Joined: 20-August 15
  • Location:Singapore

Posted 10 December 2017 - 04:40 AM

Hi when you pipe your program to your script you may encounter this error

Make sure you have the Shebang on the top of your script
#!/usr/bin/php -q


You might see this error
Error in argument 1, char 3: option not found


The following text was generated during the delivery attempt:

------ pipe to |/home1/<account>/pipe.php
generated by pipe@example.com ------

Quote

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.

------ This is a copy of the message, including all the headers. ------


This could mean the file is in the wrong format because you are using windows.

Solution

Hi, The solution is > 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.

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 in cpanel
Questions are the Answer.

Wesvault - Premium Economy Software
Yii2 Framework Specialist
http://www.wesvault.com

Singapore
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users