Page 1 of 1

make email piping work in some shared hosting environments

Posted: Wed Oct 02, 2013 5:19 pm
by alpianon
In some shared hosting environments (like mine) if a php script is launched via command line by a user (with an email forwarder or as a cron job), it may not have access to mysql socket.
If one sets "localhost" as database host in mysql_connect, php tries to connect directly to the local socket instead of using TCP/IP.

In my case, email piping do not work if I set "localhost" as database host, because hesk_pipe.php script returns an error (can't connect to database).

I had to set 127.0.0.1 as database host in order to make email piping work.

Hope this helps someone else...
cheers,
Alberto

Re: make email piping work in some shared hosting environmen

Posted: Thu Oct 03, 2013 8:47 am
by Klemen
Thanks for the heads-up and sharing your solution!