63 posts
  • Bought between 10 and 49 items
  • Has been a member for 5-6 years
  • United Kingdom
dan888 says

Hi, calling all PHP people.

I’m getting http error 500 during email sending from a php script called from my form.

Email works fine.

It seems to be on the exit… or where I call the next page!

Any advice welcome

Cheers

Dan

faevilangel_designs
faevilangel_designs Recent Posts
Threads Started
83 posts
  • Exclusive Author
  • Has been a member for 4-5 years
  • United Kingdom
faevilangel_designs says

what’s the code?

63 posts
  • Bought between 10 and 49 items
  • Has been a member for 5-6 years
  • United Kingdom
dan888 says

Hi,

Its sends the mail fine then bombs after the mail() with;

Server Error 500 – Internal server error There is a problem with the resource you are looking for and it cannot be displayed

Here is the part of the code…

$email_send = mail($email_to, $email_subject, $email_body, $email_headers);

if($email_send) {header(“Location: ”.$goto_after_email);} else {print “We encountered an error sending your email”;}

Thanks

Dan

426 posts
  • Beta Tester
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 5-6 years
  • Referred between 10 and 49 users
  • Sold between 5 000 and 10 000 dollars
  • United States
vasilios says

Just to debug and check to see if the $goto_after_email page is broken (mod_rewrite/apache error?), change that statement to redirect to the index page (or back to the form). That’ll let you know that the page you redirect to after the email is successfully sent is the problem. :)

63 posts
  • Bought between 10 and 49 items
  • Has been a member for 5-6 years
  • United Kingdom
dan888 says

Not sure I understand you. Do you mean change;

header(“Location: ”.$goto_after_email);

to

header(“Location: ”.”some url here”);

426 posts
  • Beta Tester
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 5-6 years
  • Referred between 10 and 49 users
  • Sold between 5 000 and 10 000 dollars
  • United States
vasilios says

Yes. :)

63 posts
  • Bought between 10 and 49 items
  • Has been a member for 5-6 years
  • United Kingdom
dan888 says

Still bombs out? Help!

by
by
by
by
by
by