HTTP 500 error when adding a new message

Dr. GBooky is here to help you with your guestbook problems ...
Post Reply
Jomar
Posts: 50
Joined: Tue May 22, 2007 8:09 pm

HTTP 500 error when adding a new message

Post by Jomar »

Script URL: http://www.allezmama.nl/gastenboek.html
Version of script: 1.5
Hosting company: Nitroserve
URL of phpinfo.php:
URL of session_test.php:
What terms did you try when SEARCHING for a solution:
PHP Warning: mail() [function.mail]: "sendmail_from" not set in php.ini or custom "From:" header missing

Write your message below:
Hoster is using new servers and the location of the guestbook has changed so at first it didn't work anymore.
The location of the entries.txt is now updated and it's working again, but when I post a new message I get a blank page with HTTP 500 error.
I have to use the backbutton of my browser to see the messages.

The hoster get the following message:
PHP Warning: mail() [function.mail]: "sendmail_from" not set in php.ini or custom "From:" header missing in \\data\files\root\localuser\allezma\gbook15\gbook.php on line 745

The only lines that have been changed is the location in settings.php.
Henrie
Posts: 1095
Joined: Sun Aug 14, 2005 8:57 pm

Post by Henrie »

Hello Jomar,

Try opening the gbook.php file in an editor.
Find line (line 760)

Code: Select all

mail("$settings[admin_email]","Someone has just signed your guestbook",$message);
and change it to

Code: Select all

mail("$settings[admin_email]","Someone has just signed your guestbook",$message,"From: $name <$email>\r\n");
Try if that helps.

Groeten,
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.
Jomar
Posts: 50
Joined: Tue May 22, 2007 8:09 pm

Post by Jomar »

Henrie, you are amazing!!

That's gonna be two drinks, and maybe a snack to at the Harleyday :D
Henrie
Posts: 1095
Joined: Sun Aug 14, 2005 8:57 pm

Post by Henrie »

I am not sure i will be at the Harley day in 2010. I booked my vacation last friday and will be gone to Cuba from July 31th till August 15th :D
So maybe another time :)

Groeten,
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.
jpprice47
Posts: 5
Joined: Thu Sep 02, 2010 6:01 pm

Re:

Post by jpprice47 »

Henrie wrote:Hello Jomar,

Try opening the gbook.php file in an editor.
Find line (line 760)

Code: Select all

mail("$settings[admin_email]","Someone has just signed your guestbook",$message);
and change it to

Code: Select all

mail("$settings[admin_email]","Someone has just signed your guestbook",$message,"From: $name <$email>\r\n");
Try if that helps.

Groeten,
Henrie
I am having the same problem, but I am using version 1.7 and that line is not on line 760 or anywhere else.

Any help?
Henrie
Posts: 1095
Joined: Sun Aug 14, 2005 8:57 pm

Re: HTTP 500 error when adding a new message

Post by Henrie »

Hello jpprice47,

In version 1.7, there are two places in which the e-mail addres is used, here were go:

Line 989

Code: Select all

mail($settings['admin_email'],$lang['t41'],$message,"Content-type: text/plain; charset=".$lang['enc']);
replace it with

Code: Select all

mail($settings['admin_email'],$lang['t41'],$message,"From: $name <$email>\nReply-to: $email\nReturn-path: $email\nContent-type: text/plain; charset=".$lang['enc']);
Line 953

Code: Select all

mail($settings['admin_email'],$lang['t41'],$message,"Content-type: text/plain; charset=".$lang['enc']);
replace it with

Code: Select all

mail($settings['admin_email'],$lang['t41'],$message,"From: $name <$email>\nReply-to: $email\nReturn-path: $email\nContent-type: text/plain; charset=".$lang['enc']);
There is actually a third on line 489

Code: Select all

mail($email,$lang['t80'],$message,"From: $settings[website_title] <$settings[admin_email]>\nReply-to: $settings[admin_email]\nReturn-path: $settings[admin_email]\nContent-type: text/plain; charset=".$lang['enc']);
But this one does not need replacement.

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.
jpprice47
Posts: 5
Joined: Thu Sep 02, 2010 6:01 pm

Re: HTTP 500 error when adding a new message

Post by jpprice47 »

Thank you!
Post Reply