
mjanosko
New Members-
Posts
7 -
Joined
-
Last visited
mjanosko's Achievements

Newbie (1/5)
0
Reputation
-
Code Runs Properly, Receive a 500 Error Message
mjanosko replied to mjanosko's topic in PHP Coding Help
It is, to both, just couldn't remember the name of the file in the ini when I posted. -
Code Runs Properly, Receive a 500 Error Message
mjanosko replied to mjanosko's topic in PHP Coding Help
Couldn't care any less about security, it's internal only, and to be honest I imagine most users will tell me to get f##ked before they actually use it, but thanks! Yeah, when I comment out that line and " $email_message .= "Features Requested: ".clean_string($features)."\n"; it runs fine. It runs fine NOW, just returns a 500 error, but the email stills come through perfectly. Removing the "." did not change anything. Same exact results. -
Code Runs Properly, Receive a 500 Error Message
mjanosko replied to mjanosko's topic in PHP Coding Help
No luck. -
Code Runs Properly, Receive a 500 Error Message
mjanosko replied to mjanosko's topic in PHP Coding Help
Enabled both of these, restarted IIS, loaded page from a browser I don't use (to avoid completely closing my browser and clearing cache), same thing. Generic 500 error. Nothing more. -
Code Runs Properly, Receive a 500 Error Message
mjanosko replied to mjanosko's topic in PHP Coding Help
I am using IIS 7.5. I have the error_log directory in PHP.ini set to C:\ and its not creating a file. This is what's in \inetpub\logs #Software: Microsoft Internet Information Services 7.5 #Version: 1.0 #Date: 2015-03-04 15:51:30 #Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) sc-status sc-substatus sc-win32-status time-taken 2015-03-04 15:51:30 172.16.1.9 POST /html_form_send.php - 80 - 172.16.5.45 Mozilla/5.0+(Windows+NT+6.3;+WOW64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/40.0.2214.115+Safari/537.36 500 0 0 826 2015-03-04 15:51:57 172.16.1.9 GET / - 80 - 172.16.5.45 Mozilla/5.0+(Windows+NT+6.3;+WOW64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/40.0.2214.115+Safari/537.36 200 0 0 0 2015-03-04 15:51:57 172.16.1.9 GET /logo.jpg - 80 - 172.16.5.45 Mozilla/5.0+(Windows+NT+6.3;+WOW64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/40.0.2214.115+Safari/537.36 304 0 0 46 2015-03-04 15:52:03 172.16.1.9 POST /html_form_send.php - 80 - 172.16.5.45 Mozilla/5.0+(Windows+NT+6.3;+WOW64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/40.0.2214.115+Safari/537.36 500 0 0 296 #Software: Microsoft Internet Information Services 7.5 #Version: 1.0 #Date: 2015-03-04 15:56:53 #Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) sc-status sc-substatus sc-win32-status time-taken 2015-03-04 15:56:53 172.16.1.9 POST /html_form_send.php - 80 - 172.16.5.45 Mozilla/5.0+(Windows+NT+6.3;+WOW64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/40.0.2214.115+Safari/537.36 500 0 0 218 2015-03-04 15:59:29 172.16.1.9 POST /html_form_send.php - 80 - 172.16.5.45 Mozilla/5.0+(Windows+NT+6.3;+WOW64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/40.0.2214.115+Safari/537.36 500 0 0 218 #Software: Microsoft Internet Information Services 7.5 #Version: 1.0 #Date: 2015-03-04 16:03:36 #Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) sc-status sc-substatus sc-win32-status time-taken 2015-03-04 16:03:36 172.16.1.9 POST /html_form_send.php - 80 - 172.16.5.45 Mozilla/5.0+(Windows+NT+6.3;+WOW64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/40.0.2214.115+Safari/537.36 500 0 0 202 -
Code Runs Properly, Receive a 500 Error Message
mjanosko replied to mjanosko's topic in PHP Coding Help
There is nothing for today in any of my Event Viewer logs, and adding that code results in the same error page. -
I have been working on a custom form for our office to use, and I am rounding the final corner (checkboxes!) and am stuck. I have finally gotten the code to actually function the way I want, but am greeted with a 500 error instead of the confirmation page. Maybe I'm just tired and missing something... HTML: <form name="htmlform" method="post" action="html_form_send.php"> <p><center><font size="18">Tucker Arensberg IT Equipment Request Form</font></center></p> <center><b><font color="red">Please Fill Out Entire Form, IT Department Is Not Responsible For Incomplete Information On Requests.</font></b></center><br> <table width="450px"> </tr> <tr> <td valign="top"> <label for="first_name"><b>First Name:</b></label> </td> <td valign="top"> <input type="text" name="first_name" maxlength="50" size="30"> </td> </tr> <tr> <td valign="top""> <label for="last_name"><b>Last Name:</b></label> </td> <td valign="top"> <input type="text" name="last_name" maxlength="50" size="30"> </td> </tr> <tr> <td valign="top"> <label for="email"><b>Email Address:</b><br> </label> </td> <td valign="top"> <input type="text" name="email" maxlength="80" size="30"> <br><b><font color="red">FULL EMAIL MUST BE ENTERED OR FORM WILL NOT BE SUBMITTED</font></b><br> </td> </tr> <tr> <td valign="top"> <label for="daterequest"><b>Pickup Date:</b><br> (mm/dd/yyyy)<br> <br> </label> </td> <td valign="top"> <input type="text" name="daterequest" maxlength="10" size="10"> </td> </tr> <tr> <td valign="top"> <label for="datereturn"><b>Estimated Return Date:</b><br> (mm/dd/yyyy)<br> <br> </label> </td> <td valign="top"> <input type="text" name="datereturn" maxlength="10" size="10"> </td> </tr> <tr> <td valign="top""> <b><label class="radio" for="usage">Usage:</label></b> </td> <td valign="top"> <input class="radio" type="radio" name="usage" value="internal" checked /> <span>Internal (On-Site)</span><br> <input class="radio" type="radio" name="usage" value="external" /> <span>External (Off-Site)</span><br><br> </td> <tr> <td valign="top"> <label for="equipment"><b>Equipment Needed:</b><br> (Any items not checked will not be included)</label> </td> <td valign="top"> <input type="checkbox" name="equipment" value="Laptop" /> Laptop<br /> <input type="checkbox" name="equipment" value="Carrying Case" /> Carrying Case<br /> <input type="checkbox" name="equipment" value="Mouse" /> Mouse<br /> <input type="checkbox" name="equipment" value="Hotspot" /> HotSpot/MiFi/Portable WiFi Device<br /> <input type="checkbox" name="equipment" value="usb" /> USB Thumb Drive<br /> <input type="checkbox" name="equipment" value="Vodka" /> Vodka<br /> <br> <br> </td> </tr> <tr> <td valign="top"> <b>Laptop Features Required:</b><br> (Any items not checked cannot be guaranteed on laptop) </td> <td valign="top"> <input type="checkbox" name="features[]" value="cd" /> CD Drive<br /> <input type="checkbox" name="features[]" value="dvd" /> DVD Drive<br /> <input type="checkbox" name="features[]" value="vpn" /> VPN Connection<br /> <input type="checkbox" name="features[]" value="netilla" /> Netilla<br /> <input type="checkbox" name="features[]" value="media" /> Media Playback (video files)<br> (Please include extension/format of video/audio files in COMMENTS section.)<br /> <input type="checkbox" name="features[]" value="vmware" /> VMWare<br /> <br> <br> </td> </tr> <tr> <td valign="top"> <label for="comments"><b>Additional Comments:</b></label> </td> <td valign="top"> <textarea name="comments" maxlength="1000" cols="25" rows="6"></textarea> </td> </tr> <br> <br> <tr> <td colspan="2" style="text-align:center"> <input type="submit" value="Submit"> </td> </tr> </table> </form> <br> <br> <center><img src='logo.jpg'> <br> Copyright 2015 Tucker Arensberg IT Department</center> PSP: <?php if(isset($_POST['email'])) { // EDIT THE 2 LINES BELOW AS REQUIRED $email_to = "blank@blank.com"; $email_subject = "New Equipment Checkout Request"; $first_name = $_POST['first_name']; // required $last_name = $_POST['last_name']; // required $email_from = $_POST['email']; // required $daterequest = $_POST['daterequest']; // not required $datereturn = $_POST['datereturn']; $usage = $_POST['usage']; $features .= implode(', ', $_POST['features']); $comments = $_POST['comments']; // required $comments = $_POST['comments']; // required $email_message = "Form details below.\n\n"; function clean_string($string) { $bad = array("content-type","bcc:","to:","cc:","href"); return str_replace($bad,"",$string); } $email_message .= "First Name: ".clean_string($first_name)."\n"; $email_message .= "Last Name: ".clean_string($last_name)."\n"; $email_message .= "Email: ".clean_string($email_from)."\n"; $email_message .= "Date Requested: ".clean_string($daterequest)."\n"; $email_message .= "Estimated Return Date: ".clean_string($datereturn)."\n"; $email_message .= "Usage: ".clean_string($usage)."\n"; $email_message .= "Features Requested: ".clean_string($features)."\n"; // $email_message .= "Estimated Return Date: ".clean_string($datereturn)."\n"; // $email_message .= "Comments: ".clean_string($comments)."\n"; // create email headers $headers = 'From: '."requests@tuckerlaw.com"."\r\n". 'Reply-To: '.$email_from."\r\n" . 'X-Mailer: PHP/' . phpversion(); @mail($email_to, $email_subject, $email_message, $headers); ?> <!-- include your own success html here --> Thank you for contacting us. We will be in touch with you very soon. <?php } ?> Of note, when I comment out the assignment and email-print for the "$features" variable, it runs without emailing the checkboxes, and gives the proper "confirmation" page. Thanks!