I would like to pipe email through a PHP script.
To be recognized has a script to be execute by Shell, I've put that line a the begining of my file:
#!/usr/bin/php -q
I've enabled PHP's Mail Parse extension.
I have 2 issues:
If I move my script into a sub directory, any email can't be piped, despite of the new valid patch set in my c-panel (Seems like PHP IO stream can't be read in sub directories?). Otherwise, I can pipe email in /public_html (where my php.ini file is), but I'm still unable to call a Mail Parse's function that directory.
My script seems to use another php.ini file, because when I call a function from Mail Parse, PHP warns me that the function is undefined (if I use another script manually, in the same directory and same code, all works and there's no warning.). I've put that line to use a specific php.ini file
#!/usr/bin/php -c /homeXX/XXXX/public_html/php.ini
. It didn't worked.
Thanks for any answer, it'll be very appreciated.