make email piping work in some shared hosting environments

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
alpianon
Posts: 1
Joined: Wed Oct 02, 2013 5:04 pm

make email piping work in some shared hosting environments

Post 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
Klemen
Site Admin
Posts: 10147
Joined: Fri Feb 11, 2005 4:04 pm

Re: make email piping work in some shared hosting environmen

Post by Klemen »

Thanks for the heads-up and sharing your solution!
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Post Reply