Page 1 of 1

500 Internal Server Error

Posted: Thu Apr 02, 2015 5:07 pm
by ianc2000
Script URL: gBook
Version of script: 1.72
Hosting company: FastHosts
URL of phpinfo.php: http://pollokshaws.org.uk/testing/guest/gbook.php
URL of session_test.php:
What terms did you try when SEARCHING for a solution:

Write your message below:

Hi, I have installed gBook successfully but I seem to be getting a 500 error when I submit a guestbook entry.

The entry is passed to the entries.txt successfully and therefore displays in the guestbook, but no email is sent to my account and of course the user will keep seeing the 500 error every time they submit.

I'm sure it is something simple I have missed as everything else has been plain sailing.

Thanks,

Ian

Re: 500 Internal Server Error

Posted: Fri Apr 03, 2015 12:50 pm
by Klemen
Your server generates that error, not GBook. You will need to talk to your hosting company and ask why the error is happening (perhaps mod_security blocks?).

Re: 500 Internal Server Error

Posted: Sat Apr 04, 2015 12:14 am
by ianc2000
Klemen,

The issue has been resolved, I had my service provider temporarily display error messages in browser and the first issue related to line 751 of gbook.php connected to 'one_per_session' I sorted this in settings.php by removing the one per session limitation temporarily. I then got an error pointing to line 992 in gbook.php 'mail("$settings[admin_email]",$lang['t41'],$message);' I copied this line into Google and found an article you wrote for Joshau on the subject 'changing email address of notification email'. You suggested changing this line to 'mail("$settings[admin_email]",$lang['t41'],$message,"From:you@yourmail.com\nReply-to:you@yourmail.com\nReturn-path:you@yourmail.com");'

This might not be the right solution to the error I was getting but it has resolved my issue and the guestbook now works fine, thanks.

Any other suggestions are appreciated.

Ian

Re: 500 Internal Server Error

Posted: Sat Apr 04, 2015 8:56 am
by Klemen
This all sounds like your service provider is running some sort of security software, probably to prevent users abusing the servers. If your GBook works after the changes you are good to go.

Re: 500 Internal Server Error

Posted: Sat Apr 04, 2015 8:55 pm
by ianc2000
Great stuff, thanks.

One final issue, probably doing something stupid, I am receiving both emails from the site, the one:

"Someone has just signed your guestbook" and the one

"Thank you for your email" which should go to the guestbook signer, any suggestions where I went wrong.

Ian