Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

 
Advanced search

2506 Posts in 649 Topics- by 1316 Members - Latest Member: kortuem

eTicket CommunitySupportInstallation Help & Software Support (Moderators: jason, Hummdis)Topic: [SOLVED] pipe.php now WORKING
Pages: [1]   Go Down
Print
Author Topic: [SOLVED] pipe.php now WORKING  (Read 6276 times)
0 Members and 1 Guest are viewing this topic.
Mike Rogers
New Member
*

Karma: +0/-0
Offline Offline

Posts: 9


« on: October 07, 2008, 01:40:54 AM »

Ok I was having trouble getting pipe.php working and it seems so were a few others.  I have solved the problem at least for me and this may help some others as well I hope.

Seems that the issue for me lies with php-cli and that it doesn't change to the script directory when the script is ran and pipe.php has to be ran from the directory it's in because it calls all the other files without their full directory, ie it calls ( "init.php", not "/home/user/support/init.php" ).

Anyway you probably only really care about how to fix it and make it work for you..  Grin, so here is what I did.  In my .procmailrc file I changed the working directory to the location of my "pipe.php" file right before the recipe and VIOLA, it's now working, all messages are being sent to the ticket system.  Here's the coding I used in my .procmailrc:

Code:
# change working directory for this recipe
MAILDIR=/home/extrememarketingandleads/public_html/support
:0 c
* ^To.*support@
| /home/extrememarketingandleads/public_html/support/pipe.php

You may want to change the MAILDIR back if you have other recipes after this one.

Hope this helps and remember YMMV.

Mike Rogers
http://www.ExtremeMarketingAndLeads.com
« Last Edit: October 07, 2008, 01:43:30 AM by Mike Rogers » Logged
Charybdis
New Member
*

Karma: +0/-0
Offline Offline

Posts: 25


« Reply #1 on: October 07, 2008, 04:51:04 AM »

No, it doesn't work. you already set the directory in |/home/extrememarketingandleads/public_html/support/pipe.php, so MAILDIR is obsolete.

Most likely the developers haven't tested pipe.php on more than 1 hosting, and it is broken. I can configure pipe.php, but it does random things.
Logged
Mike Rogers
New Member
*

Karma: +0/-0
Offline Offline

Posts: 9


« Reply #2 on: October 07, 2008, 07:53:34 AM »

No, it doesn't work. you already set the directory in |/home/extrememarketingandleads/public_html/support/pipe.php, so MAILDIR is obsolete.

Most likely the developers haven't tested pipe.php on more than 1 hosting, and it is broken. I can configure pipe.php, but it does random things.

No go read the "procmail" documentation and the "php" and/or "php-cli", MAILDIR is valid and it makes complete sense.

As I stated this solution works perfectly for me and YMMV.

Logged
videoenmedia
New Member
*

Karma: +0/-0
Offline Offline

Posts: 6


« Reply #3 on: October 13, 2008, 05:11:02 PM »

Mike,

For what user do I need to create a .procmailrc ?
The mail to the ticketing system does not have a real user on my box.

I could create a user where al ticket mail is forwarded to but not sure if that's what you mean...
Logged
DaveSartory
New Member
*

Karma: +0/-0
Offline Offline

Posts: 3


« Reply #4 on: October 25, 2008, 11:55:23 AM »

MIKE!  You rock.  Thank you.  This was driving me NUTS and it worked perfectly.  Thanks for the sleuthing work.

Dave
Logged
donp_iri
New Member
*

Karma: +0/-0
Offline Offline

Posts: 1


« Reply #5 on: October 29, 2008, 04:28:01 AM »

I too had a problem getting pipe.php to work because it expects to be run in the directory where it resides (it requires init.php). We don't use procmail for a local delivery agent.

As much as I hate to do it, I found the easiest thing was just to add a chdir('/your/scripts/location'); line at the top of pipe.php before the require_once lines.

If you don't want to have to maintain such a setup when you update, you could write a wrapper script that changes the working directory before execing pipe.php.
--
don
Logged
tachilders
New Member
*

Karma: +1/-0
Offline Offline

Posts: 3


« Reply #6 on: January 13, 2009, 06:42:45 PM »

OK I'm really not as technical as most people in here so I won't be able to answer any questions about this.

The thread did lead us to solving this problem and I felt compelled to post what we did because it's super simple to copy exactly what we did.

After reading this post I did not want to screw around with a file that was on my system but I didn't mind changing any files that came with eTicket. I can always upload an original copy.

I opened the pipe.php file in WordPad and added one line to the top of the file after the php code started.

This is what I added: "chdir(dirname(__FILE__));"

Please note I did not include the quotes "" just the code.

This is what the file originally looked like:

Code:

#!/usr/bin/php
<?php
/**********************************************************************************


This is what I changed it to:

Code:

#!/usr/bin/php
<?php
chdir
(dirname(__FILE__));
/**********************************************************************************


I also made sure that the file that I modified was set to have CHMOD settings of 755.

I did not come up with this code on my own. A guy that works for me told me what to try. As soon as I did it the piping started working.

I hope this helps someone else too.

Good Luck.

« Last Edit: January 14, 2009, 10:18:44 AM by tachilders » Logged
Hummdis
Moderator
Super Member
*****

Karma: +13/-0
Offline Offline

Posts: 558



WWW
« Reply #7 on: January 14, 2009, 03:45:28 AM »

To make things easier for you in the future tachilders, use the forum code to start and stop code input.  That way people won't get confused by the full-quotes. Smiley

Here's a Forum Code Cheat Sheet.

Just a thought.
Logged

Don't PM me directly for help.  Post to the forums, that's what they are for after all.  PM's to me that request help will be ignored.

Hummdis Communications - Freelance Website Design & IT Consulting
tachilders
New Member
*

Karma: +1/-0
Offline Offline

Posts: 3


« Reply #8 on: January 14, 2009, 10:20:36 AM »

Thanks for the suggestion Hummidis and the link to the Forum Code Cheat Sheet.

I have modified my original post in hopes that it will be more clear and help others in the long haul. Smiley

Logged
Hummdis
Moderator
Super Member
*****

Karma: +13/-0
Offline Offline

Posts: 558



WWW
« Reply #9 on: January 14, 2009, 11:54:03 AM »

Thanks for the suggestion Hummidis and the link to the Forum Code Cheat Sheet.

I have modified my original post in hopes that it will be more clear and help others in the long haul. Smiley

Look better now! Smiley  Like I said, it just makes it easier so that you don't have to worry about someone accidentally adding characters they were not supposed to.
Logged

Don't PM me directly for help.  Post to the forums, that's what they are for after all.  PM's to me that request help will be ignored.

Hummdis Communications - Freelance Website Design & IT Consulting
jdurango
New Member
*

Karma: +0/-0
Offline Offline

Posts: 2


« Reply #10 on: January 30, 2009, 10:19:48 AM »

I also had problems with pipe method. But in my case I was receiving 2 mails: one for the notification of a new ticket and the other for Mail Delivery error. It was solved in this topic:

http://www.eticketsupport.com/installation_help_software_support/weird_pipephp_problem-t424.0.html

Regards
Logged
bigthink
New Member
*

Karma: +0/-0
Offline Offline

Posts: 1


« Reply #11 on: May 12, 2009, 07:45:41 AM »

I've tried the suggestion about placing the code
Code:
#!/usr/local/bin/php
<?php
chdir
(dirname(__FILE__));
/**********************************************************************************

exactly as shown and CMHOD the file "pipe. php" to 755.   But I'm getting nothing.


My forward on the email support at bigthinkagency. com is setup as follows:

Code:
|/home/username/public_html/eticket/pipe.php

What in the heck am I missing here?
Logged
FiFtHeLeMeNt
New Member
*

Karma: +0/-0
Offline Offline

Posts: 2


« Reply #12 on: May 16, 2009, 09:31:16 AM »

Quote from: tachilders link=topic=316. msg1622#msg1622 date=1231915365
OK I'm really not as technical as most people in here so I won't be able to answer any questions about this. 

The thread did lead us to solving this problem and I felt compelled to post what we did because it's super simple to copy exactly what we did. 

After reading this post I did not want to screw around with a file that was on my system but I didn't mind changing any files that came with eTicket.  I can always upload an original copy. 

I opened the pipe. php file in WordPad and added one line to the top of the file after the php code started. 

This is what I added: "chdir(dirname(__FILE__));"

Please note I did not include the quotes "" just the code.

This is what the file originally looked like:

Code:

#!/usr/bin/php
<?php
/**********************************************************************************


This is what I changed it to:

Code:

#!/usr/bin/php
<?php
chdir
(dirname(__FILE__));
/**********************************************************************************


I also made sure that the file that I modified was set to have CHMOD settings of 755.

I did not come up with this code on my own.  A guy that works for me told me what to try.  As soon as I did it the piping started working.

I hope this helps someone else too. 

Good Luck.



Thank you , it worked great for me :)
Logged
eTicket Community
   

 Logged
Pages: [1]   Go Up
Print
eTicket CommunitySupportInstallation Help & Software Support (Moderators: jason, Hummdis)Topic: [SOLVED] pipe.php now WORKING
Jump to: