Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

osTicket v1.10 (stable) and Maintenance Release v1.9.15 are now available! Go get it now

Error with pipe.php

This is a dump of the first two lines of /api/pipe.php

<?php
#!/usr/bin/php -q

I'm no expert but shouldn't the lines be interchanged for the script to be processed by php. I'm sure the shell only reads the first line to establish how to execute the script.

I can't get this script to work properly! Is there any debugging output when it executes?

my /var/log/maillog says...

Jan 2 23:04:26 www postfix/local[12106]: 7791E1C08B36: to=<osticket@workanyware.co.uk>, relay=local, delay=0.06, delays=0.02/0.01/0/0.03, dsn=5.3.5, status=
bounced (local configuration error)

r

PS Don't shoot me if I'm wrong

Comments

  • Correct me if I'm wrong, but using a # in php is the same as using // or /* */. It comments out lines.

    In other words #!/usr/bin/php -q is not doing anything at all atm.
  • The shell looks at the first line comment and uses it to execute the script.

    This says use /usr/bin/php -q to execute the rest of the script.

    r
  • I need a bit of help here...

    When I call the script using the aliases file and postfix the includes don't work because the paths can't be followed. Am I missing something in the config. here?

    If I add chdir ('/var/www/html/suport/api'); to the top of the pipe.php file I get a better results but not success. See below ...

    Jan 3 10:13:40 www postfix/local[17871]: 4CDA61C08B2D: to=, relay=local, delay=0.11, delays=0.01/0/0/0.1, dsn=5.6.0, status=bounced (data format error. Command output: PHP Notice: Undefined index: REMOTE_ADDR in /var/www/html/support/main.inc.php on line 97 PHP Notice: Undefined variable: dblink in /var/www/html/support/include/mysql.php on line 25 PHP Notice: Undefined variable: dblink in /var/www/html/support/include/mysql.php on line 28 PHP Notice: Undefined index: cc in /var/www/html/support/include/class.mailparse.php on line 84 PHP Notice: Undefined property: stdClass::$parts in /var/www/html/support/include/class.mailparse.php on line 107 PHP Notice: Undefined variable: ticket in /var/www/html/support/api/pipe.php on line 96 PHP Notice: Undefined index: phone in /var/www/html/support/include/class.validator.php on line 54 PHP Notice: Undefined index: attachment in /var/www/html/support/include/class.ticket.php on line 842 PHP Notice: Undefined index: api in
  • email piping...

    rharrison see my post here http://osticket.com/forums/showthread.php?t=69&page=3
    it may help with the pipe.php issue of the first couple lines :)
Sign In or Register to comment.