Web Hosting Forum | Lunarpages


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



Login with username, password and session length
May 25, 2012, 07:19:51 AM

Pages: [1]   Go Down
  Print  
Author Topic: Running a shell script (.sh) to fire off a .php  (Read 440 times)
gritmonger
Newbie
*
Offline Offline

Posts: 2


« on: January 24, 2005, 09:48:35 AM »

Specifically, I am attempting to get this to occur on either a chron or .forward-type event on delivery.  It's part of a mod for phpBB 2.0.11 or so to allow it to act as both a forum and a mailing list, and while the code for the .php to grab the e-mails from the lunarpages account works fine (heck, works great! - makes new subjects, keeps threads with hidden header variables...) I cannot get the .sh file to execute either on chron or on mail delivery, nor can I execute the php on either condition.

The syntax I was given was:

|/path/to/m2f/m2f_posting.sh

(or similar- don't have the filename in front of me)

To be added to a .forward script.  I looked at making an Exim compatable .forward, but I don't want to be filtering all of my e-mail, just a .forward file for this particular account alone.  

Besides which, I don't know if I'd be doing this correctly, as the chron at least informs me of : "Permission denied", while the .forward and forwarding attempts I've made simply die on the vine with no response.

I guess I really need some help with regards to Unix syntax and permissions, but technically this relates to phpBB.

Thanks in advance...


Pat Kelley
Logged
gritmonger
Newbie
*
Offline Offline

Posts: 2


« Reply #1 on: January 24, 2005, 01:36:55 PM »

I think I have the syntax down, and I'm going to be trying to modify the chown properties to 775 on the .sh, but I'd still like to know what restrictions there are to piping content to scripts.  

Currently, I'm looking to forward both to the original mail folder and to the script, but the script doesn't really need any content: only to fire off when mail has come in, as I'd rather not get a bunch of "local delivery failed" replies in my inbox.


But does this syntax look correct?


|/home/usr/public_html/phpBB/m2f/m2f_import_msgs.sh
Logged
GMTurner
Berserker Poster
*****
Offline Offline

Posts: 7539



WWW
« Reply #2 on: January 24, 2005, 07:50:45 PM »

in general it seems correct, though I'm wondering why you aren't calling the php file directly? Also, I think the permission might need to be set to 755 instead of 775, which is the case with PHP files and such, not sure about the case with shell scripts...
Logged

The above post was made at a time when I gave a dang and doesn't necessarily reflect my current views or opinions.

For those no longer with us ... Grr..!!

Turner's Lounge
Pages: [1]   Go Up
  Print  
 
Jump to: