GetDotted Domains

Viewing Thread:
"ERROR 500, Problem Running a Script"

The "Freeola Customer Forum" forum, which includes Retro Game Reviews, has been archived and is now read-only. You cannot post here or create a new thread or review on this forum.

Thu 24/05/07 at 18:06
Regular
Posts: 45
Since server upgrade & PHP5 I can't get my Booking/Enquiry form handling script to work & instead of the usual 'Thank you for the enquiry etc' confirmation page, I receive.....

ERROR 500, Problem Running a Script...

A scripting/config error prevents the server from showing this page.

If you are the owner you can find more help at the Freeola Support Centre. or by speaking to a member of our technical support team on: 0871 210 9977

-----

However, I do receive the correctly completed Booking/Enquiry email on testing. I've tried renaming my form with .php5 and the form handling page .php5 but believe I can still keep them as .php ?

I've tried setting permissions to 755 & also tried 644 but no joy.

Part of the script does work ie if you dont supply a tel. no or email address you correctly receive the following....

Not transmitted

Error:
Please supply your Telephone number or Email address!
Click on the BACK button on your browser to return to the form

--

Any ideas as to whats wrong? my form is at http://www.ballifeary.com
Thu 31/05/07 at 20:44
Regular
Posts: 45
cheers for all your help Eccles
Wed 30/05/07 at 11:29
Staff Moderator
"Aargh! Broken..."
Posts: 1,408
I emailed you back the files I made changes to.
You have 2 options you could do if the user doesn't submit an email address. One is to display the default message you get when the telephone number and email address is blank. Just modify the line:
if($telephone == "" && $email == ""){
to
if($telephone == "" && $email == "" || $email == ""){
Of course this doesn't tell the user exactly which of the 2 fields they left blank so instead you could add an else clause to the end of if($email == ""){... }, something like:
if($email == ""){
process the form and email it..
} else {
echo 'whatever error message you want (Oops email left blank, not sent...)';
}


Hope that helps.
Tue 29/05/07 at 19:33
Regular
Posts: 45
I've messed up your fix so emailed you. As far as I can see the only change you made was to the result_form.php5 adding:

if($email != ""){ and at the end of the script }

If $email is blank how is the script executed beyond this if statement, ie. the booking form wouldnt be emailed to me.
Tue 29/05/07 at 19:32
Regular
Posts: 45
delete
Tue 29/05/07 at 16:49
Regular
Posts: 45
Thanks very much Eccles for your time and for fixing the problem. I've viewed the updated file & understand the changes. Cheers
Tue 29/05/07 at 16:25
Staff Moderator
"Aargh! Broken..."
Posts: 1,408
Thank you for the information.

Apologies for the emails you may have received from me but it should be working now.
You script was missing an if statement to control what would happen if the email field was left blank. The email value is used in the mail() function and so this wouldn't work if this was left blank. I have updated the php5 versions of the files as these are the live ones.
Let me know if things still aren't working correctly or if you don't understand what I've done!
Tue 29/05/07 at 14:27
Regular
Posts: 45
thanks Eccles, I've just emailed it 14:27
Tue 29/05/07 at 13:18
Staff Moderator
"Aargh! Broken..."
Posts: 1,408
Hello,

If you could send you sr number for the web space this form is hosted on we can have a look at it for you. Email it to webmaster at freeola.co.uk. I can't see anything obvious that would be causing this so maybe a closer look at the script will uncover something.
Sun 27/05/07 at 17:33
Regular
Posts: 45
This is strange as it worked prior to the upgrade but I've discovered the following:

The conditions are you must enter a Telephone or email address BUT NOW If you enter a Telephone number and no email you receive ERROR 500, Problem Running a Script

But if you enter an email address and no telephone number the script performs fine.

if ($Telephone == "" && $email == "")
{
echo "Not transmitted";
echo "
Error:
Please supply your Telephone number or Email address!
Click on the BACK button on your browser to return to the form";
}
else
{
echo "Enquiry Sent";

How is this? the value $Telephone is being correctly displayed in the email form received.
Fri 25/05/07 at 12:30
Regular
Posts: 45
Eccles I received your test form but still on testing myself I receive the script error page although form does reach me.

Freeola & GetDotted are rated 5 Stars

Check out some of our customer reviews below:

Continue this excellent work...
Brilliant! As usual the careful and intuitive production that Freeola puts into everything it sets out to do, I am delighted.
Everybody thinks I am an IT genius...
Nothing but admiration. I have been complimented on the church site that I manage through you and everybody thinks I am an IT genius. Your support is unquestionably outstanding.
Brian

View More Reviews

Need some help? Give us a call on 01376 55 60 60

Go to Support Centre
Feedback Close Feedback

It appears you are using an old browser, as such, some parts of the Freeola and Getdotted site will not work as intended. Using the latest version of your browser, or another browser such as Google Chrome, Mozilla Firefox, or Opera will provide a better, safer browsing experience for you.