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

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
ug2215
Posts: 8
Joined: Wed May 23, 2012 9:25 pm

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

Post 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"?
steve
Posts: 147
Joined: Tue Mar 27, 2012 9:32 pm

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

Post by steve »

I use host gator and I have no issue, that's curious.
-Steve
ug2215
Posts: 8
Joined: Wed May 23, 2012 9:25 pm

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

Post by ug2215 »

Huh, so you simply installed Hesk and emails sent just fine?
steve
Posts: 147
Joined: Tue Mar 27, 2012 9:32 pm

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

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

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

Post 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).
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
ug2215
Posts: 8
Joined: Wed May 23, 2012 9:25 pm

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

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

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

Post by Klemen »

You need to upgrade Hesk to version 2.3 to allow SMTP.
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
ug2215
Posts: 8
Joined: Wed May 23, 2012 9:25 pm

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

Post by ug2215 »

Alright, thanks Klemen.

I will upgrade later today.

Thanks for your help.
ug2215
Posts: 8
Joined: Wed May 23, 2012 9:25 pm

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

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

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

Post 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?
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
ug2215
Posts: 8
Joined: Wed May 23, 2012 9:25 pm

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

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

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

Post 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.
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
ug2215
Posts: 8
Joined: Wed May 23, 2012 9:25 pm

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

Post 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.
Post Reply