Page 1 of 1

Cannot Run PHP Scripts as "Nobody", how to send email?

Posted: Wed May 23, 2012 9:27 pm
by ug2215
Version of script: 2.2
Hosting company: HostGator
What terms did you try when SEARCHING for a solution:

Write your message below:

I read http://www.hesk.com/knowledgebase/?article=25 and confirmed that number 5 is a conflict with HostGator. What can I do about this?

Is there another way to configure Hesk to send email?

Can I tell Hesk to not run the script as "Nobody"?

Re: Cannot Run PHP Scripts as "Nobody", how to send email?

Posted: Wed May 23, 2012 11:50 pm
by steve
I use host gator and I have no issue, that's curious.

Re: Cannot Run PHP Scripts as "Nobody", how to send email?

Posted: Thu May 24, 2012 2:36 am
by ug2215
Huh, so you simply installed Hesk and emails sent just fine?

Re: Cannot Run PHP Scripts as "Nobody", how to send email?

Posted: Thu May 24, 2012 3:00 am
by steve
That's right, maybe somebody here can offer some insight.

Maybe try the HostGator Live Chat? I use it every time I have a hosting issue, they are extremely helpful.

Re: Cannot Run PHP Scripts as "Nobody", how to send email?

Posted: Thu May 24, 2012 12:48 pm
by Klemen
#5 in the article only effects you if your scripts are being run under user "Nobody", so in your case it isn't an issue.

What I would check is:
- is your "No reply email" an actual, valid and working email address?
- check for typos in your email (set on the "Profile" page)
- did notification end up in SPAM folder?

Using mail() should work fine on HostGator like Steve confirmed. The alternative would be to setup a new email address (hesk@yourdomain.com) and use SMTP to send emails (enter SMTP details you would use in your email client into HESK settings).

Re: Cannot Run PHP Scripts as "Nobody", how to send email?

Posted: Thu May 24, 2012 4:00 pm
by ug2215
I did speak with HostGator chat, they had me run a test to confirm that PHP Mail() is working. Since Hesk indicates that it uses PHP Mail() there wasn't much more they could do. I did confirm with them that PHP scripts cannot be run as "Nobody" on their systems. I'm not sure if Hesk runs any PHP scripts as "Nobody" but that is what's indicated by the article I linked to.

My email addresses are valid and working on other machines. They actually haven't been changed since the Hesk installation was exported and imported to this machine from an older server.

I have checked the spam folders of both the Hesk admin and the user submitting the ticket and nothing appears to have been recieved.

I am willing to reconfigure Hesk to use a different email method but there is nowhere to configure SMTP or anything else in its Settings screen.

Re: Cannot Run PHP Scripts as "Nobody", how to send email?

Posted: Thu May 24, 2012 6:47 pm
by Klemen
You need to upgrade Hesk to version 2.3 to allow SMTP.

Re: Cannot Run PHP Scripts as "Nobody", how to send email?

Posted: Fri May 25, 2012 4:49 pm
by ug2215
Alright, thanks Klemen.

I will upgrade later today.

Thanks for your help.

Re: Cannot Run PHP Scripts as "Nobody", how to send email?

Posted: Fri Jun 15, 2012 12:57 am
by ug2215
So, it turns out that this was not the problem at all.

I have determined that my Hesk is unable to send emails to the Support, Webmaster and No-Reply email addresses.

I ran several tests to determine that it can successfully send emails to ticket creators. It still cannot send to the "admin" addresses when they are the same as the ticket creators'.

I then installed version 2.3 and tested with both PHP Mail() and SMTP; same results.

Even with smtp.php installed and an apparently successful SMTP test, it still does not send mail to the listed "admin" addresses and still successfully sends mail to the ticket creator.

I came back to share this oddity as it may be useful and to ask if there's any way to fix this w/o re-installing Hesk from scratch.

Re: Cannot Run PHP Scripts as "Nobody", how to send email?

Posted: Fri Jun 15, 2012 2:34 pm
by Klemen
If emails are sent to the customers but not to admins then email sending is working fine, the problem is elsewhere.

The first thing that comes to mind is to double-check your email addresses for any typos/misspelling.

The second thing - your SPAM filters. Check that any SPAM filters aren't blocking mail from HESK.

Have you tried submitting a ticket using an "admin" email address from the customer interface? Does the customer notification of a new ticket arrive to your "admin" address then?

Re: Cannot Run PHP Scripts as "Nobody", how to send email?

Posted: Sat Jun 16, 2012 6:23 pm
by ug2215
The addresses themselves are correct and nothing has ever shown up in the SPAM folders.

I had not run your suggested test, it resulted in the email being sent properly and showing up in the inbox immediately.

An "admin" address in a new ticket works but any address in the "admin" slots will not.

Re: Cannot Run PHP Scripts as "Nobody", how to send email?

Posted: Sun Jun 17, 2012 8:27 am
by Klemen
This means your email sending works absolutely fine.

You do know email notification to admin is sent only to the staff to whom the ticket is assigned to, not all staff members (disable auto-assign to send emails to all users)?

Also, staff members can disable email notifications on their "Profile" page.

Re: Cannot Run PHP Scripts as "Nobody", how to send email?

Posted: Mon Jun 18, 2012 8:19 pm
by ug2215
Thank You Klemen, you found the problem for us.

We intend for all notifications to go to a shared email address but we did have more than once account in Hesk. New tickets were being repeatedly assigned to this other account, a user whose email I was not checking. I have now pulled them out of ticket assignment rotation because they have access to the shared email account.

It started working again immediately.

Thanks for all of your help, sorry I missed this for so long.