Hey there,
I have tried for days to get this to work properly and I am pretty sure I must have read and reread everything I can find on these forums about WHMCS by now. I am trying to set up the trial of WHMCS since I can’t find anything that has open source that works any good and everyones raving about it. So I got it set up and finally managed to get email working through cron. However… I want to get it to work through pipe.
I was getting numerous emails from the cron it told me to set up until I added > /dev/null to the end of it. But I still think it would be great to have pipe setup and running properly and securely so I don’t have to have yet another cron job running. Or maybe its just because I’m stubborn and don’t like settling for second best when I can have the best.
So what exactly do I do?
CentOS 5.4, Virtualmin Pro w/ bleeding edge repos.
Latest ionCube loaders are installed.
with the ionCube PHP Loader v3.3.14, Copyright © 2002-2010, by ionCube Ltd.
Additional Modules
ionCube Loader
Here is exactly what I’ve tried thus far.
Apparently it won’t run in fcgi so I tried cgi but gave up on that too and stuck the domain in mod_php though it would really be nice to have fcgi since everything else on the server is running like that. So I put it on FCGId where it is right now. It seems to be working fine except for this pipe thing.
In WHMCS I am at Utilities > PHP info and check it to be sure:
Server API CGI/FastCGI
I have a server hosting.domain.com where WHMCS is installed and running.
I will do a fresh test so you can see exactly what happens.
I create a new mail alias test@hosting.domain.com and I put in the Advanced tab to Feed to Program and paste in exactly what WHMCS gives me… | php -q /home/hosting.domain.com/public_html/pipe/pipe.php
Then it says: Failed to save alias : ‘’ is not a valid program or does not exist
So I change it to php -q /home/hosting.domain.com/public_html/pipe/pipe.php
and that goes on and lets me create the alias.
I add that test@hosting.domain.com support department into WHMCS leaving everything as default.
I send an email from Gmail to test@hosting.domain.com and in the /var/log/maillog I have this line:
Apr 3 22:27:26 server1 postfix/local[9202]: 757C9808054: to=test-hosting.domain.com@server1.server.com, orig_to=test@hosting.domain.com, relay=local, delay=0.34, delays=0.14/0/0/0.21, dsn=5.3.0, status=bounced (Command died with status 1: “php -q /home/hosting.domain.com/public_html/pipe/pipe.php”. Command output: Could not open input file: /home/hosting.domain.com/public_html/pipe/pipe.php )
At this point here is what I have for permissions:
/home(755)/hosting.domain.com(750)/public_html(750)/pipe(755)/pipe.php(750)
Except for /home which is set to root:root the rest are owned by hosting:hosting
So I chmod them all to 755 except for pipe.php and sent a test mail to test@hosting.domain.com and it sends back an email with this error:
test-hosting.domain.com@server1.server.com (expanded from
test@hosting.domain.com): Command died with status 1: “php -q
/home/hosting.domain.com/public_html/pipe/pipe.php”. Command output: Could
not open input file: /home/hosting.domain.com/public_html/pipe/pipe.php
Chmod 755 on pipe.php sends back an email with this error:
test-hosting.domain.com@server1.server.com (expanded from
test@hosting.domain.com): Command died with status 255: “php -q
/home/hosting.domain.com/public_html/pipe/pipe.php”
I create a new email user test2@hosting.domain.com.
I create a .forward file at /home/hosting.domain.com/homes/test2/.forward and chown it to test2.hosting.domain.com:hosting and chmod +x .forward.
Then I paste this into it :
“|/home/hosting.domain.com/public_html/pipe/pipe.php”
I go create the test2 support department and leave things as default.
Sending a test mail gets the same error as above with Command died with status 255.
The odd thing now is that each time I get one of these status 255 errors it seems to do something, because in WHMCS when I click Home and go to the main admin screen it now says: 2 Ticket(s) Awaiting Reply
However I see no tickets. Is it a cache of WHMCS or something? I don’t know, but I don’t think so because I didn’t get any emails saying there was a new ticket. All I get is Undelivered Mail Returned to Sender back to my Gmail address.
So, any ideas on what to try next? =)
Ryan