The14thGOD Posted September 21, 2007 Share Posted September 21, 2007 Hey, I tried my script on two servers, it's just a simple email script..so I don't know why it's messing up, this is the error: Error 500 - Internal server error An internal server error has occured! Please try again later. this is the code: <?php import_request_variables('pg'); if ($send) { if ($name && $email) { $body = "Name: $name \r\n"; $body .= "E-mail: $email"; $subject = "New Core Value Entry"; //$sendto = "someone"; mail("someone@somewhere.com",$subject,$body,"From: $name"); header("Location: question01.html"); exit(0); }else { header("Location: register.php"); exit(0); } } ?> Thanks in advanced Quote Link to comment https://forums.phpfreaks.com/topic/70182-solved-not-sure-why-this-error-is-happening/ Share on other sites More sharing options...
php_dave Posted September 21, 2007 Share Posted September 21, 2007 If this is a production server - check the log files (apache i assume) for the exact error - if its a non production server turn on error reporting in php.ini - so you can see a description of the error. HTH Dave Quote Link to comment https://forums.phpfreaks.com/topic/70182-solved-not-sure-why-this-error-is-happening/#findComment-352509 Share on other sites More sharing options...
The14thGOD Posted September 21, 2007 Author Share Posted September 21, 2007 currently I am on a mac and, if I remember correctly it's a hidden file, and I don't know how to show hidden files. Also I'm not sure where the php.ini file is, im not familiar with editing that. Quote Link to comment https://forums.phpfreaks.com/topic/70182-solved-not-sure-why-this-error-is-happening/#findComment-352514 Share on other sites More sharing options...
php_dave Posted September 21, 2007 Share Posted September 21, 2007 Add this to the top of your php script error_reporting(E_ALL ^ E_NOTICE); Quote Link to comment https://forums.phpfreaks.com/topic/70182-solved-not-sure-why-this-error-is-happening/#findComment-352521 Share on other sites More sharing options...
The14thGOD Posted September 21, 2007 Author Share Posted September 21, 2007 So I found out that the mail function was not properly written... Thanks for the help though Quote Link to comment https://forums.phpfreaks.com/topic/70182-solved-not-sure-why-this-error-is-happening/#findComment-352527 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.