Problem receiving emil notifications

Dr. GBooky is here to help you with your guestbook problems ...
Post Reply
aaron_c
Posts: 6
Joined: Thu Oct 01, 2009 8:17 am

Problem receiving emil notifications

Post by aaron_c »

Script URL: www.aaroncasey.co.uk/gbook/gbook.php (version 1.6 - current, linked within my site)
www.aaroncasey.co.uk/gbook17/gbook.php (version 1.7 not yet linked just for my own testing)
Version of script: Both 1.6 and 1.7 while testing
Hosting company: UK2Net
URL of phpinfo.php: www.aaroncasey.co.uk/phpinfo.php
URL of session_test.php: www.aaroncasey.co.uk/session_test.php
What terms did you try when SEARCHING for a solution: admin, email, notification as well as browsing extensively through the forum

Write your message below: I'm having trouble getting the email notification to work when I receive a new entry in my guestbook. It was working intially and i haven't changed my settings file in any way so I had a look on here and also contated UK2net who have come back with the following:

"Recently, port 25 outgoing was blocked on the cpanel servers which means that scripts on your website can only use the local web server to send emails, and cannot connect to external mail servers (such as mail.uk2.net).

In order to use the local mail server for your cPanel server, you should utilize the following settings:
Change the SMTP Host to: localhost
The SMTP username should be your cPanel username
The SMTP password should be your cPanel password"

Where do I change the SMTP host etc in order to make the notification work again?

Thanks
Last edited by aaron_c on Thu Oct 01, 2009 7:53 pm, edited 2 times in total.
Henrie
Posts: 1095
Joined: Sun Aug 14, 2005 8:57 pm

Post by Henrie »

In the php.ini file of your server.

It is not a setting of GBook.

Greetings,
Henrie
I do not monitor the Gbook forums regularly anymore since I do not use the Gbook script myself anymore for a long time. But it helped me a lot in learning to understand php.
aaron_c
Posts: 6
Joined: Thu Oct 01, 2009 8:17 am

Post by aaron_c »

Thanks for that,

so how do I access that then i know where it is but cant see it via the file manager etc?
Henrie
Posts: 1095
Joined: Sun Aug 14, 2005 8:57 pm

Post by Henrie »

Sorry, i don't know how it is for your server and i never used cPanel
I think it should be able to be done through cPanel.
The path to the ini file is /usr/local/lib (found through the phpinfo.php)

But it could be that your webhosting company has disabled editing the php.ini file. In that case you should ask them to change it for you.

Greetings,
Henrie
I do not monitor the Gbook forums regularly anymore since I do not use the Gbook script myself anymore for a long time. But it helped me a lot in learning to understand php.
aaron_c
Posts: 6
Joined: Thu Oct 01, 2009 8:17 am

Post by aaron_c »

Yeah I kinda suspected that, as I looked everywhere last night even through all the various tools etc I'll get in touch with the hosting compant to see what they say. Thanks for your help
aaron_c
Posts: 6
Joined: Thu Oct 01, 2009 8:17 am

Post by aaron_c »

My web hosting company basically said that they wont edit it for me and I cant acess it, saying that I'd need to create my own one. I dont suppose anyone could help me with that? All I need to know is what I need to type in it, where to place it and also how to set permissions on it so it cant be viewed by people going on to my site as it would conatin my username and password in it? Any pointers wuld be greatly appreciated.
Henrie
Posts: 1095
Joined: Sun Aug 14, 2005 8:57 pm

Post by Henrie »

I am sorry, i (luckily) never had this problem and therefore do not know how to fix it.

But i think your hosting company is the party to talk to. They know best how their server is setup and where you can put your own php.ini and to tell the server to use it.

But my guess is, you need to either make some modifications (or create) a php.ini file in a specific directory maybe in combination with a .htaccess file with i don't know which settings.

Greetings,
Henrie
I do not monitor the Gbook forums regularly anymore since I do not use the Gbook script myself anymore for a long time. But it helped me a lot in learning to understand php.
aaron_c
Posts: 6
Joined: Thu Oct 01, 2009 8:17 am

Post by aaron_c »

well they basically said to put it in the same directory as the php script and if i created one with what was specified in the first post (detailed below) that would work, either that or to get the php script for the guestbook modified.

Change the SMTP Host to: localhost
The SMTP username should be your cPanel username
The SMTP password should be your cPanel password

I have no experience with PHP hence the reason I am looking for pointers. The companies support isnt of much use to be honest, but ill bear that in mind when it comes to renewing my domain for the next year which just so happens to be next month!
Henrie
Posts: 1095
Joined: Sun Aug 14, 2005 8:57 pm

Post by Henrie »

I don't know it either. Let's hope someone else that reads your posts can help you.

And if not, i think you should let your hosting provider that they either must help you or that you need to find a new hosting provider (maybe put a bit cruel, but who wants a hosting provider that is not there for you all the way).

Greetings,
Henrie
I do not monitor the Gbook forums regularly anymore since I do not use the Gbook script myself anymore for a long time. But it helped me a lot in learning to understand php.
aaron_c
Posts: 6
Joined: Thu Oct 01, 2009 8:17 am

Post by aaron_c »

Hello again, I tired making a PHP.ini file ater loads of searching how to's on the web but this hasnt worked, they are now saying the following:

"Thank you for your response. The problem is not the php.ini file, but we will not edit this for you in any case. The problem is that port 25 is blocked and the PHP mail() function uses that port unless you set it to use sendmail or authenticate using localhost. This is not something we will support though as you will need to look at your script and code it accordingly. Please let us know if there is anything on our end we can do for you. Thank you"

Can anyone tell me where to put this and the syntax I'd need to use, they also said about putting my website cpanel username and password in the script as well but will this not be visible to anyone viewing the site?
Henrie
Posts: 1095
Joined: Sun Aug 14, 2005 8:57 pm

Post by Henrie »

I tried to find a solution by using Google, but could not find any out of the box. I found some code, but don't know how to set it up to use sendmail through your server.

Maybe your provider has a script that can send out mail (for a mailform or something like that)? Than by examining that code maybe it can be found out what code is needed to send out mail. If that is known, than the same code can be added to in gbook instead of the standard php mail() function.

Greetings,
Henrie
I do not monitor the Gbook forums regularly anymore since I do not use the Gbook script myself anymore for a long time. But it helped me a lot in learning to understand php.
Post Reply