UnitedForums - UK Web Hosting Forum UnitedHosting Community Hosting Forums
Network and Server StatusCustomer SupportUK Web Hosting
UnitedHostingUnitedHosting Sitemap UK Hosting ForumUK Web HostingWeb Hosting ForumsUK Reseller HostingWeb Host CommunityUK Managed Dedicated ServersHosting Help and SupportUK Domain Name Registration

Go Back   UnitedForums.co.uk > UnitedHosting Community > Website Development & Scripting

Reply
 
Thread Tools Rate Thread Display Modes
Old 29th August 2005, 06:56 PM   #21 (permalink)
spaceprogram
Registered User
 
Join Date: Nov 2003
Location: Stoke On Trent, UK
Posts: 27
Andy,

Ok I have added /usr/bin/php -q to the line in the procmailrc file. I can't edit the php has it is encoded with Zend.

Do I need to place the script in home/support/. can't I just run it globally.

/var/www/html/email_script.php

Current permissions are 644 ( rw-r-r ). These are the permissions set by the web installation. I am also trying to get an answer from the script developer but not have much luck.

Thanks for your help Andy.

Regards
Andy
spaceprogram is offline   Reply With Quote
Old 29th August 2005, 07:03 PM   #22 (permalink)
spaceprogram
Registered User
 
Join Date: Nov 2003
Location: Stoke On Trent, UK
Posts: 27
Just uploaded file to /home/support and changed the procmailrc to match the path and still doesn't work.

I am guessing that the script uses variables to lookup other values from other script which is why the directory structure is set out when installed.

This is why I changed the path to :

/var/www/html/helpdesk/email_parser.php

Still no luck though.

Any thoughts!

You have been so kind with your help.

Thank you
Andy
spaceprogram is offline   Reply With Quote
Old 29th August 2005, 07:05 PM   #23 (permalink)
Andy
Senior Member
 
Join Date: Aug 2003
Location: Westgate-on-Sea, Kent, ENGLAND
Posts: 2,228
I believe you may get file permission problems if you call the script in the main administrator web space from the support user - you'll have to experiment a bit.

If you copy your php script into /home/support/ you'll get around any permission problems.
If the php has dependencies on other scripts such as config.php and functions.php type scripts you'll need to copy those over too.

If you need to give execute permission, change permissions to 755 (rwxr-xr-x) with chmod 755 email_script.php

Andy
Andy is offline   Reply With Quote
Old 29th August 2005, 07:14 PM   #24 (permalink)
Andy
Senior Member
 
Join Date: Aug 2003
Location: Westgate-on-Sea, Kent, ENGLAND
Posts: 2,228
Add these lines to the front of your procmailrc file:

Code:
# Set on when debugging
VERBOSE=off

# Path to mailbox
MAILDIR=/var/spool/mail/support

# Path to log file - comment out for no logging
#LOGFILE=$HOME/procmail.log
To try and debug the problem change VERBOSE to on
and remove the # in front of LOGFILE.

If you send an email to the support address, check /home/support/procmail.log which should tell you of any errors.

Don't forget to set verbose off and comment the logfile line out again when your finished debugging.

If you end up in mail loop (it does happen!) just quickly comment out your .procmailrc with #'s at the front of the lines that forward mail to your script....Just thought i'd say as this happened to me once!

Andy
Andy is offline   Reply With Quote
Old 29th August 2005, 07:16 PM   #25 (permalink)
spaceprogram
Registered User
 
Join Date: Nov 2003
Location: Stoke On Trent, UK
Posts: 27
Andy,

Got it to work with :

| php -q /var/www/html/helpdesk/script.php

I have found now that it has created an infinte loop to send out all email alerts to admin when an email is sent. I can sort this because I need to change the settings on the script.

Thanks very much for your help and if I have any more issues I will post.

Thanks again

[EDIT] PS didn't see you last post but managed to stop the loop. Thanks . I will change the settings and try your comments about debugging if I get stuck.[/edit]
Andy

Last edited by spaceprogram : 29th August 2005 at 07:18 PM.
spaceprogram is offline   Reply With Quote
Old 24th April 2006, 01:34 AM   #26 (permalink)
ngray
Registered User
 
ngray's Avatar
 
Join Date: Mar 2006
Location: The dark side of the moon
Posts: 343
Send a message via Skype™ to ngray
Seems to have changed, I can't find email_scipt.php anywhere

Anyone using this recently? I've got the whole thing setup, db, admin, support user, but can't figure out how to setup the email to script thing...
__________________
Splattt there goes the 8:15 pie right on time. I hate mondays (Garfield)

If you drive you should be Smart Driving

Paranormal ghost map of the UK Thames Valley Paranormal Group
ngray is offline   Reply With Quote
Old 24th April 2006, 10:20 AM   #27 (permalink)
Andy
Senior Member
 
Join Date: Aug 2003
Location: Westgate-on-Sea, Kent, ENGLAND
Posts: 2,228
I think when we quoted "email_script.php" before it was a made up name to illustrate how to pipe email to php rather than a real life example.

I use cerberus now instead which is a far superior support desk in my opinion - my instructions for setting up cerberus are somewhere on this forum as i recently used them myself! (See Ticket System - OTRS or Other?)

Andy
Andy is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


All times are GMT. The time now is 01:46 PM.

UK Web Hosting  |  UK Reseller Hosting  |  UK Dedicated Servers UnitedHosting  |  UnitedSupport  |  SEO by vBSEO 3.0.0
Copyright © 1998-2009 United Communications Limited. All Rights Reserved. Registered in England and Wales 3651923 - VAT Reg No. 737662309