I am testing an idea based on my last question, but I've run into a very interesting problem...
My home directory is on one path of the server (where all home directories reside) and for reasons I can only guess at, the PHP config for that directory does not have IMAP turned on.
However, my project directory, which exists on a test mirror of the live site does have IMAP enabled.
So what I'm testing is using a .forward file to trigger a php script when an email is sent. The only email I can easily use for this is my user email, which means I have to set up the .forward in my personal home directory.
The .forward works, but the email bounces back with part of an error. From what I can tell, the script is failing because of the "unexpected function open_imap()", which is what I got when I tried doing the whole thing in my personal folder.
So the problem seems to be that I can run the script directly from a browser, since the script is in a directory that has IMAP, but when I point an email at it from my home directory (which, again, doesn't have IMAP), it defaults to the PHP settings for the path of the file that triggered the script, not the configuration of the path of the script itself.
so:
- Am I totally wrong and just haven't debugged enough?
- If I am right, is there a way to get the script to adhere to its own path's php config?
- If not, is there any other way to make this work, aside from setting up all new email accounts or begging server admins to turn on IMAP?