PHP - How Do I Generate A Chunked Reply To A Get In Php / Apache?
I am working on an http interface to existing apps. These apps make a call to GET a CHUNKED reply with the payload being a Jpg (or series of jpg??) , or a single pdf file
The wireshark trace looks like this: Frame 1093: 209 bytes on wire (1672 bits), 209 bytes captured (1672 bits) on interface \Device\NPF_{9AF84BC1-E1F6-4A31-BC25-33964BBB83EC}, id 0 Ethernet II, Src: Motorola_18:69:75 (84:b8:b8:18:69:75), Dst: IntelCor_f8:a5:5c (a4:34:d9:f8:a5:5c) Internet Protocol Version 4, Src: 192.168.0.150, Dst: 192.168.0.99 Transmission Control Protocol, Src Port: 35138, Dst Port: 8000, Seq: 14994, Ack: 122074, Len: 155 Hypertext Transfer Protocol GET /eSCL/ScanJobs/NextDocument HTTP/1.1\r\n TE: chunked\r\n Host: 192.168.0.99:8000\r\n Connection: Keep-Alive\r\n Accept-Encoding: gzip\r\n User-Agent: okhttp/4.9.1\r\n \r\n [Full request URI: http://192.168.0.99:8000/eSCL/ScanJobs/NextDocument] [HTTP request 98/101] [Prev request in frame: 1091] [Response in frame: 1094] [Next request in frame: 1095] Then I see this in Wireshark, but nothing is ever downloaded the request is made over and over till cancelled: Frame 1094: 1319 bytes on wire (10552 bits), 1319 bytes captured (10552 bits) on interface \Device\NPF_{9AF84BC1-E1F6-4A31-BC25-33964BBB83EC}, id 0 Ethernet II, Src: IntelCor_f8:a5:5c (a4:34:d9:f8:a5:5c), Dst: Motorola_18:69:75 (84:b8:b8:18:69:75) Internet Protocol Version 4, Src: 192.168.0.99, Dst: 192.168.0.150 Transmission Control Protocol, Src Port: 8000, Dst Port: 35138, Seq: 122074, Ack: 15149, Len: 1265 Hypertext Transfer Protocol HTTP/1.1 200 OK\r\n Date: Tue, 13 Jul 2021 11:12:43 GMT\r\n Server: Apache/2.4.48 (Win64) OpenSSL/1.1.1k PHP/8.0.8\r\n Content-Length: 1038\r\n Keep-Alive: timeout=5, max=3\r\n Connection: Keep-Alive\r\n Content-Type: text/html;charset=UTF-8\r\n \r\n [HTTP response 98/101] [Time since request: 0.005202000 seconds] [Prev request in frame: 1091] [Prev response in frame: 1092] [Request in frame: 1093] [Next request in frame: 1095] [Next response in frame: 1096] [Request URI: http://192.168.0.99:8000/eSCL/ScanJobs/NextDocument] File Data: 1038 bytes Line-based text data: text/html (16 lines) <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">\n <html>\n <head>\n <title>Index of /eSCL/ScanJobs/NextDocument</title>\n </head>\n <body>\n <h1>Index of /eSCL/ScanJobs/NextDocument</h1>\n <table>\n <tr><th valign="top"><img src="/icons/blank.gif" alt="[ICO]"></th><th><a href="?C=N;O=D">Name</a></th><th><a href="?C=M;O=A">Last modified</a></th><th><a href="?C=S;O=A">Size</a></th><th><a href="?C=D;O=A">Description</a></th></tr>\n <tr><th colspan="5"><hr></th></tr>\n <tr><td valign="top"><img src="/icons/back.gif" alt="[PARENTDIR]"></td><td><a href="/eSCL/ScanJobs/">Parent Directory</a> </td><td> </td><td align="right"> - </td><td> </td></tr>\n <tr><td valign="top"><img src="/icons/text.gif" alt="[TXT]"></td><td><a href="index.php">index.php</a> </td><td align="right">2021-07-13 00:43 </td><td align="right">1.0K</td><td> </td></tr>\n <tr><th colspan="5"><hr></th></tr>\n </table>\n <address>Apache/2.4.48 (Win64) OpenSSL/1.1.1k PHP/8.0.8 Server at 192.168.0.99 Port 8000</address>\n </body></html>\n
So how do I get Apache/PHP to respond to this GET CHUNKED request in a way the client understands? Edited July 13 by markosjal Similar TutorialsCan someone assist with this, the form works, but the end user cannot simply click on reply, they have to copy/paste. I think it is just a header issue, but i'm not sure and the person who wrote this script is no longer availalble...any help would be much appreciated! Code: [Select] <?php if ($_POST['post'] != '') { $to = 'fetch@domain.com'; $subject = 'Appointment Request'; $message = "A user on the website has submitted an appointment request. Find their details below.\n\n"; $reqd = array('name', 'email', 'phone', 'phonetype1', 'petname'); $disregard = array('post', 'Appointment_Mail_'); $breaks = array('break', 'break2', 'break3'); foreach($_POST as $key=>$value) { if (in_array($key, $reqd) && $value == '') { $error .= '- Fill out '.$key.'<br />'; } elseif (!in_array($key, $disregard)) { if (in_array($key, $breaks)) { $message .= "\n"; } else { $message .= ucwords($key).": ".stripslashes($_POST[$key])."\n"; } } } if ($error == '') { mail('fetch@domain.com', $subject, $message, 'From: domain.com <noreply@domain.com>'); header('Location: http://www.domain.com/thanks.html'); die(); } else { $error = 'Please correct the following errors:<br />'.$error; } } ?> I want to be able to reply to the sender of the information ( the guy who fills the form online ). your help is much appreciated. here's the code <?php if(isset($_POST['submit'])) { $from = 'From: contactform@nisbetplantation.com'; $to = "reservations@nisbetplantation.com"; $subject = "Website Contact Form"; $name_field = $_POST['name']; $email_field = $_POST['email']; $address_field = $_POST['address']; $address2_field = $_POST['address2']; $city_field = $_POST['city']; $state_field = $_POST['state']; $zip_field =$_POST['zip']; $company_field =$_POST['company']; $IATA_field =$_POST['IATA']; $phone_field =$_POST['phone']; $fax_field =$_POST['fax']; $mail_from="$email"; $response1_field =$_POST['response1']; $areacode_field =$_POST['areacode']; $comments_field =$_POST['comments']; $body = "From: $name_field\n E-Mail: $email_field\n Address:\n $address_field Address2:\n $address2_field City:\n $city_field State:\n $state_field Zip:\n $zip_field Company:\n $company_field IATA:\n $IATA_field Phone:\n $phone_field Fax:\n $fax_field Visited Resort:\n $response1_field Area code:\n $areacode_field Comments:\n $comments_field'"; echo "Your Information has been submitted to $to!"; mail($to, $subject, $body); } else { echo "Please try again after some time..."; } ?> Hello. My first topic here was about getting the amount of unread messages. I'm now working on showing the unread messages in the inbox. Let's say we have 2 users. User1 sends user2 a message with the title: this is a title. User2 read the message and replied. User1 now has to see: this is a title. This is the code in: class Pm {} public function get_unread_pm() { $stmt = $this->db->prepare(' SELECT pm.title, pm.sender_id, pm.timestamp, (SELECT COUNT(pm2.id) FROM pm as pm1, pm as pm2 WHERE pm1.parent_id=pm2.id) AS replies, u.username as sender FROM pm LEFT JOIN users AS u ON u.id=pm.sender_id WHERE pm.receiver_id=:user_id AND pm.unread=1 AND pm.parent_id=pm.id'); $stmt->bindParam('user_id', $_SESSION['userid']); $stmt->execute(); return $stmt->fetchAll(); } I now get the original message because of the pm.parent=pm.id, but I want to get the message where the parent_id of a reply is the same parent_id as where the parent_id is equal to it's id. I think a less complicated description is: How do I get the last reply instead of the original message?
parent_id: When I reply to a message, my id still counts up, the parent_id is the id of the original message. This is what my data-table looks like:
The content:
If I'm doing this stuff really inefficient, I would be happy to know how to make it better Fabian Edited September 19, 2019 by FabelHi can anyone help this is my forum reply code: <?php include "connect.php"; // Get value of id that sent from hidden field $id=$_POST['id']; // Find highest answer number. $sql="SELECT MAX(a_id) AS Maxa_id FROM reply WHERE question_id='$id'"; $result=mysql_query($sql); $rows=mysql_fetch_array($result); // add + 1 to highest answer number and keep it in variable name "$Max_id". if there no answer yet set it = 1 if ($rows) { $Max_id = $rows['Maxa_id']+1; } else { $Max_id = 1; } // get values that sent from form $a_name=$_POST['a_username']; $a_answer=$_POST['a_reply']; // Insert answer $sql2="INSERT INTO reply(question_id, a_id, a_username, a_reply, a_date, a_time)VALUES('$id', '$Max_id', '$a_username', '$a_reply', CURDATE(), CURTIME())"; $result2=mysql_query($sql2); if($result2){ echo "Successful<BR>"; echo "<a href='viewtopic.php?id=".$id."'>View your answer</a>"; // If added new answer, add value +1 in reply column $sql3="UPDATE topic SET reply='$Max_id' WHERE id='$id'"; $result3=mysql_query($sql3); } else { echo "ERROR"; } mysql_close(); ?> and this is the error message anyone know why it gives this Thanks Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/fightwa1/public_html/addreply.php on line 10 please help i am making a message system which users can message each other. sending message works fine but having trouble with the reply message cant seem to get to_user value code so far Code: [Select] <?php session_start(); $myusername=$_SESSION['myusername']; require "database.php"; $messageid = $_GET['messageid']; $message = mysql_query("SELECT * FROM messages WHERE message_id = '$messageid' AND to_user = '$myusername'"); $message=mysql_fetch_assoc($message); // problem is here atm getuname returns Resource id instead of the username iam trying to reply to // $getuname= mysql_query("SELECT from_user FROM messages Where message_id='$message_id' AND to_user ='$myusername'"); echo "<h1>Title: ".$message['message_title']."</h1><br><br>"; echo "<h3>From: ".$message['from_user']."<br><br></h3>"; echo "<h3>Message: <br>".$message['message_contents']."<br></h3>"; echo '<form name="backfrm" method="post" action="inbox.php">'; echo '<input type="submit" value="Back to Inbox">'; // this where i need to the to user to carry over to the next page// echo '<a href="reply.php?username=' . "$getuname" . '">reply</a>'."<br/>"; echo '</form>'; ?> </body> </html> Hi, I have made personal messaging system however I can't reply unless it is to the last message! I think I've messed up the looping somewhere but can you see if you can figure out what's wrong with it? This is the code for the inbox page: <?php require('scripts/top.php'); ?> <title>Spares List | Your Messages</title> <div id='full'> <?php if ($username){ echo "<a href='create_message.php'>Create Message</a> <div id='box'> <b class='corners'> <b class='corners1'><b></b></b> <b class='corners2'><b></b></b> <b class='corners3'></b> <b class='corners4'></b> <b class='corners5'></b></b> <div class='cornersfg'> <div id='top'>Inbox for $username</div> <div id='bottom' style='padding: 10px;'>"; //////////////////////////////////////////////////////////////////////// require('scripts/connect.php'); $query = mysql_query("SELECT * FROM messages WHERE to_user='$username' ORDER BY id DESC"); $numrows = mysql_num_rows($query); if ($numrows > 0){ echo "<form action='delete_message.php' method='POST'>"; echo "<div id='messages'> <div id='leftside'><input type='checkbox' name='selectall'><input type='submit' name='deleteinbox' value='Delete' class='button'></div> <div id='rightside'>Date</div> <div id='center'>Subject and Message</div> <div style='clear: both;'></div> </div>"; while($row = mysql_fetch_assoc($query)){ $msg_id = $row['id']; $msg_to_user = $row['to_user']; $msg_to_id = $row['to_id']; $msg_from_user = $row['from_user']; $msg_from_id = $row['from_id']; $msg_subject = $row['subject']; $msg_content = $row['content']; $msg_date = $row['date']; $msg_from_delete = $row['from_delete']; $msg_to_delete = $row['to_delete']; if (!$msg_to_delete){ echo "<div id='messages'>"; echo "<div id='leftside'> <input type='checkbox' name='cb$msg_id' value='$msg_id'> <a href='profile.php?id=$msg_from_id' target='_blank'>$msg_from_user</a> </div>"; echo "<div id='rightside'>$msg_date</div>"; echo "<div id='center'> <span class='toggle'><a href='#'>$msg_subject</a></span> <div class='hiddenDiv'> <br>$msg_content<br><br> <span class='toggle'><a href='#'>REPLY</a></span> <div class='hiddenDiv'> <form action='reply.php' method='POST'> <input type='hidden' value='$msg_id' name='replyid'> <input type='text' name='replysubject' style='width: 300px;' class='text-box' value=' $msg_subject'><br> <textarea name='replycontent' style='width: 298px;' rows='5'></textarea><br><br> <input type='submit' name='replybutton' class='button' value='Reply'> </form> </div> </div> </div>"; echo "<div style='clear: both;'></div>"; echo "</div>"; $num += 1; } } if ($num == 0){ echo "You have no messages in your inbox."; } echo "</form>"; } else echo "You have no messages in your inbox."; //////////////////////////////////////////////////////////////////////// echo "</div> </div> <b class='corners'> <b class='corners5'></b> <b class='corners4'></b> <b class='corners3'></b> <b class='corners2'><b></b></b> <b class='corners1'><b></b></b></b> </div>"; ///////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////// echo "<div id='box'> <b class='corners'> <b class='corners1'><b></b></b> <b class='corners2'><b></b></b> <b class='corners3'></b> <b class='corners4'></b> <b class='corners5'></b></b> <div class='cornersfg'> <div id='top'>Outbox for $username</div> <div id='bottom' style='padding: 10px;'>"; //////////////////////////////////////////////////////////////////////// require('scripts/connect.php'); $query = mysql_query("SELECT * FROM messages WHERE from_user='$username' ORDER BY id DESC"); $numrows = mysql_num_rows($query); if ($numrows > 0){ echo "<form action='delete_message.php' method='POST'>"; echo "<div id='messages'> <div id='leftside'><input type='checkbox' name='selectall'><input type='submit' name='deleteoutbox' value='Delete' class='button'></div> <div id='rightside'>Date</div> <div id='center'>Subject and Message</div> <div style='clear: both;'></div> </div>"; while($row = mysql_fetch_assoc($query)){ $msg_id = $row['id']; $msg_to_user = $row['to_user']; $msg_to_id = $row['to_id']; $msg_from_user = $row['from_user']; $msg_from_id = $row['from_id']; $msg_subject = $row['subject']; $msg_content = $row['content']; $msg_date = $row['date']; $msg_from_delete = $row['from_delete']; $msg_to_delete = $row['to_delete']; if (!$msg_from_delete){ echo "<div id='messages'>"; echo "<div id='leftside'> <input type='checkbox' name='cb$msg_id' value='$msg_id'> <a href='profile.php?id=$msg_from_id' target='_blank'>$msg_from_user</a> </div>"; echo "<div id='rightside'>$msg_date</div>"; echo "<div id='center'> <span class='toggle'><a href='#'>$msg_subject</a></span> <div class='hiddenDiv'> <br>$msg_content<br><br> </div> </div>"; echo "<div style='clear: both;'></div>"; echo "</div>"; $num += 1; } } if ($num == 0){ echo "You have no messages in your outbox."; } echo "</form>"; } else echo "You have no messages in your outbox."; //////////////////////////////////////////////////////////////////////// echo "</div> </div> <b class='corners'> <b class='corners5'></b> <b class='corners4'></b> <b class='corners3'></b> <b class='corners2'><b></b></b> <b class='corners1'><b></b></b></b> </div>"; echo "</div>"; } else echo "<center><h2><font color='red'>You must be logged in to view this page.</font></h2></center>"; require('scripts/bottom.php'); ?> And this is the code for the deleteorsend php file: <?php include("header.inc"); ?> <table border="0" width="100%"><tr><td valign="top" width="800"> <div id="content"> <?php //Start Content $replybtn = $_POST['replybutton']; $inboxbtn = $_POST['deleteinbox']; $outboxbtn = $_POST['deleteoutbox']; if($_SESSION['uid']){ if ($replybtn){ $subject = $_POST['replysubject']; $content = $_POST['replycontent']; $replyid = $_POST['replyid']; if ($subject && $content){ $date = date("M d, Y"); $query = mysql_query("SELECT * FROM messages WHERE content='$content' AND date='$date'"); $numrows = mysql_num_rows($query); if ($numrows == 0){ $query = mysql_query("SELECT * FROM messages WHERE id='$replyid' AND to_user='$username'"); $numrows = mysql_num_rows($query); if ($numrows == 1){ $row = mysql_fetch_assoc($query); $to_id = $row['from_id']; $to_user = $row['from_user']; mysql_query("INSERT INTO messages VALUES ('', '$to_user', '$to_id', '$username', '$userid', '$subject', '$content', '$date', '0', '0')"); echo "Your reply has been sent. <a href='messages.php'>Click here</a> to return to your inbox."; } else echo "No message was sent. An error has occured!!!!"; } else echo "You can NOT resend the same messages."; } else echo "You did not supply a subject and/or message."; } else if($inboxbtn){ $query = mysql_query("SELECT * FROM messages WHERE to_user='$username'"); while ($row = mysql_fetch_assoc($query)){ $msg_id = $row['id']; $value = "cb"."$msg_id"; $checkbox = $_POST[$value]; if ($checkbox){ mysql_query("UPDATE messages SET to_delete='1' WHERE id='$msg_id'"); } } echo "The selected messages have been deleted! <a href='messages.php'>Click here</a> to return to your inbox."; } else if($outboxbtn){ $query = mysql_query("SELECT * FROM messages WHERE from_user='$username'"); while ($row = mysql_fetch_assoc($query)){ $msg_id = $row['id']; $value = "cb"."$msg_id"; $checkbox = $_POST[$value]; if ($checkbox){ mysql_query("UPDATE messages SET from_delete='1' WHERE id='$msg_id'"); } } echo "The selected messages have been deleted! <a href='messages.php'>Click here</a> to return to your inbox."; } else echo "You must click the button!"; } else echo "You must be logged in to do that!"; //End Content ?> </div> </td><td width="250"> <?php include("sidebar.inc"); ?> </td> </table> <?php include("footer.inc"); ?> </div> </div> I hope you can work out what is wrong as I am quite new to php. Thanks in advanced Cameron Hi! I have been on the paypal website a lot but I can't find what I am looking for. I trying to find some API so I can show Paypal links on every page I generate from mysql. When the user press Paypal button, he/or she will be redirected to paypal.com with a form where a field with the ID, already is filled in. So let's say I press Paypal button ,then a ID, to that page will be sent to paypal and when the user pay the money, a reply from paypal with the ID will come back and confirm the payment. How can I get this to work? I really hope you can help me with this! Thanks! I've already made fully working create topic, etc; what would I need to make to reply to a thread? I've gotten this so far... <?php $result = mysql_query("SELECT id FROM b ORDER BY id DESC"); while ($row = mysql_fetch_array($result, MYSQL_NUM)) { printf("<a href='reply.php?id=%s'>Reply</a><hr><br /><br />", $row[0]); } mysql_free_result($result); ?> reply.php?id=%s (%s equaling the thread id) when I click it, it does bring me to the appropriate page, but I don't know where to go from there. Any help? any other info you might need just ask I want to be able to reply to the email of the sender ( of the form ) heres the codes <?php $where_form_is="http://".$_SERVER['SERVER_NAME'].strrev(strstr(strrev($_SERVER['PHP_SELF']),"/")); // Checkbox handling $field_1_opts = $_POST['field_1'][0].",". $_POST['field_1'][1]; mail("harshad@madiganpratt.com","Invitation - Form submission","Form data: rooms: $field_1_opts First Name: " . $_POST['fname'] . " Last Name: " . $_POST['lname'] . " Your Email: " . $_POST['email'] . " Phone Number: " . $_POST['pnumber'] . " Request your arrival date: " . $_POST['field_2'] . " Request your departure date: " . $_POST['field_3'] . " Please send me an ownership package: " . $_POST['field_4'] . " ",$headers); include ("confirm.html"); ?> Hey guys i have been making a comment and reply script. When the user makes a post and others reply they appear below. However when another person makes a post and a reply is made to that they mess up it has the comments at the top and the replys at the bottom. DOes anyone know how i could order these? Or is there a tutorial online. Hope someone can help. Thanks what line of code should i add in order to be able to reply to the sender of contact form. right now its showing the last email created in the server. heres the code <?php $where_form_is="http://".$_SERVER['SERVER_NAME'].strrev(strstr(strrev($_SERVER['PHP_SELF']),"/")); // Checkbox handling $field_1_opts = $_POST['field_1'][0].",". $_POST['field_1'][1]; mail("randy@reefsclub.com","Invitation - Form submission","Form data: rooms: $field_1_opts First Name: " . $_POST['fname'] . " Last Name: " . $_POST['lname'] . " Your Email: " . $_POST['email'] . " Phone Number: " . $_POST['pnumber'] . " Request your arrival date: " . $_POST['field_2'] . " Request your departure date: " . $_POST['field_3'] . " Please send me an ownership package: " . $_POST['field_4'] . " ",$headers); include ("confirm.html"); ?> Hi all, I'm very new to the wonderful world of php, so I'd appreciate any and all help in the matter. I've greatly simplified the code below to hopefully help you in helping me. Thanks! Ok, so I'm integrating a very simple message board feature into my site. The basic idea is that people post a comment, and have the option of replying to existing comments. I'm definitely not looking for a complete forum; just something that allows users to post and reply. I've tackled the posting bit easily enough. I have a form. Users fill in the form and the message, along with user information, is sent to a MySQL database. The information includes the username(Poster), the message(Message), an id that corresponds to the topic in question(Messid), a unique ID code for the message itself (ID), and a number of other variables like date and rank. I then use a while statement to bring up all of the messages that pertain to a particular topic; The output will only show messages that share the same Messid, and they are arranged in terms of descending ID: Code: [Select] <? while($row = mysql_fetch_array($resultcomments)) { $poster=$row['Poster']; $message= $row['Message']; $ID=$row['ID']; echo $message.$poster.$ID; } So far, so good. What I want is for users to be able to click on any one of the particular messages, and post a response comment that will appear directly below the message to which it responds. Any ideas how I might go about such a task? So far, I've created a new MySQL table that corresponds to these "subcomments". Each subcomment has a "subID" that corresponds to the ID of the message to which it responds. By including a while statement within the while statement above, I can successfully list all of the subcomments that correspond to a message directly below it. The problem, of course, is that I have to insert the subID values manually in php_my_admin. I'm hoping there's a way for php to automatically detect the ID value of the message in question... Many many thanks for any assistance I can get. Once this revolution in communication makes me a billionaire, I will be certain to reward you most properly. Thanks again. Code: [Select] $IP = $_SERVER['REMOTE_ADDR']; $DATE = date("Y-m-d"); $TIME = date("H:i:s"); $NameOfSender = "BLABLABLABALLA"; $email = $fieldnm_3; // use their addy instead of yours $subject = 'ikwerkthuis.be inloggegevens introductie film'; // change subject $text = 'Beste $NameOfSender, Welkom bij ikwerkthuis.be. Hieronder vind U de logingevens voor het bekijken van de introductiefilm: Adres: http://ikwerkthuis.be/index.php/introductie Gebruikersnaam: introductie Paswoord: film2012 %DataOfForm% Wij nemen spoedig contact met u op. Met vriendelijke groeten, Het ikwerkthuis.be team IP: $IP Date: $Date Time: $Time'; // change text mail($email, $subject, $text, 'From: '.$emailadd.''); // send another one out header("Location:$success_page_name"); } ?> I have an auto responder in a php order form with the phrase "Our web sites uses a secure order form for customers to purchase products, and services..." When the message is sent, the word 'services' comes out like this: "...products, and 1s." Each instance of the word 'services' is changed to '1s'. Any ideas?
Hello, I'm working on this PHP website of my college. Where in after sending the order to the vendor an e-mail is sent to the person who ordered and the head of that department notifying them about the details of order along with that now I need to send a tracking number of every order in that e-mail which gets automatically incremented in subsequent orders. So please let me know how should I approach or do this. Thank you. So far, my company has been using Apache (Linux)-based web hosts for our hosting needs. Ever since the Heartbleed bug was found in OpenSSL, which is common to open source software, including Apache HTTP Server, I was wondering if Microsoft's IIS was any more secure than Apache. Opinions?
My arguement is that although IIS is a closed-source system, it is also a widely targeted platform (Windows) so that may be of concern. My argument for Apache is that it is open source, so exploits can be implemented using the source code as well, which is available for free download.
So, the question really is which HTTP server platform is more secure?
I'm trying to run a process using shell_exec, however the program i'm trying to run must communicate with a process that is not a system process, and everytime i run it, it fails, does anyone know how to make a apache server run active windows not in the system process? hey guys i have apache installed but im sure my .htaccess file isnt being read...is there something in the config file i have to do please?...thank you Apache https setup!
Okay so i made my own SSL certificate for my localhost using these commands
OpenSSL: ( CMD > c:\xampp\apache\bin\openssl )
req -config c:\xampp\php\extras\ssl\openssl.cnf -new -out jobnow.csr -keyout jobnow.pem rsa -in jobnow.pem -out c:\jobnow.key x509 -in jobnow.csr -out jobnow.crt -req -signkey c:\jobnow.key -days 369when asked for common name type your ip address. Then i install import the certificate to certmgr.msc Restate Apache https//192.168.0.14 - Doesnt work 192.168.0.14 - Works fine Apache error log: [Wed Sep 10 12:05:41.299000 2014] [ssl:warn] [pid 7840:tid 260] AH01909: RSA certificate configured for localhost:80 does NOT include an ID which matches the server name [Wed Sep 10 12:05:41.301000 2014] [ssl:warn] [pid 7840:tid 260] AH01909: RSA certificate configured for 192.168.0.14:443 does NOT include an ID which matches the server name [Wed Sep 10 12:05:41.301000 2014] [ssl:warn] [pid 7840:tid 260] AH01915: Init: (localhost:80) You configured HTTPS(443) on the standard HTTP(80) port! [Wed Sep 10 12:05:41.373000 2014] [co warn] [pid 7840:tid 260] AH00098: pid file C:/xampp/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run? [Wed Sep 10 12:05:41.616000 2014] [ssl:warn] [pid 7840:tid 260] AH01909: RSA certificate configured for localhost:80 does NOT include an ID which matches the server name [Wed Sep 10 12:05:41.617000 2014] [ssl:warn] [pid 7840:tid 260] AH01909: RSA certificate configured for 192.168.0.14:443 does NOT include an ID which matches the server name [Wed Sep 10 12:05:41.617000 2014] [ssl:warn] [pid 7840:tid 260] AH01915: Init: (localhost:80) You configured HTTPS(443) on the standard HTTP(80) port! [Wed Sep 10 12:05:41.659000 2014] [mpm_winnt:notice] [pid 7840:tid 260] AH00455: Apache/2.4.7 (Win32) OpenSSL/1.0.1e PHP/5.5.9 configured -- resuming normal operations [Wed Sep 10 12:05:41.659000 2014] [mpm_winnt:notice] [pid 7840:tid 260] AH00456: Apache Lounge VC11 Server built: Nov 21 2013 20:13:01 [Wed Sep 10 12:05:41.659000 2014] [co notice] [pid 7840:tid 260] AH00094: Command line: 'c:\\xampp\\apache\\bin\\httpd.exe -d C:/xampp/apache' [Wed Sep 10 12:05:41.661000 2014] [mpm_winnt:notice] [pid 7840:tid 260] AH00418: Parent: Created child process 7032 [Wed Sep 10 12:05:42.319000 2014] [ssl:warn] [pid 7032:tid 272] AH01909: RSA certificate configured for localhost:80 does NOT include an ID which matches the server name [Wed Sep 10 12:05:42.321000 2014] [ssl:warn] [pid 7032:tid 272] AH01909: RSA certificate configured for 192.168.0.14:443 does NOT include an ID which matches the server name [Wed Sep 10 12:05:42.321000 2014] [ssl:warn] [pid 7032:tid 272] AH01915: Init: (localhost:80) You configured HTTPS(443) on the standard HTTP(80) port! [Wed Sep 10 12:05:42.645000 2014] [ssl:warn] [pid 7032:tid 272] AH01909: RSA certificate configured for localhost:80 does NOT include an ID which matches the server name [Wed Sep 10 12:05:42.646000 2014] [ssl:warn] [pid 7032:tid 272] AH01909: RSA certificate configured for 192.168.0.14:443 does NOT include an ID which matches the server name [Wed Sep 10 12:05:42.646000 2014] [ssl:warn] [pid 7032:tid 272] AH01915: Init: (localhost:80) You configured HTTPS(443) on the standard HTTP(80) port! [Wed Sep 10 12:05:42.688000 2014] [mpm_winnt:notice] [pid 7032:tid 272] AH00354: Child: Starting 150 worker threads. [Wed Sep 10 12:05:54.589000 2014] [authz_co error] [pid 7032:tid 1652] [client 192.168.0.14:3112] AH01630: client denied by server configuration: C:/xampp/htdocs/ [Wed Sep 10 12:05:54.682000 2014] [authz_co error] [pid 7032:tid 1652] [client 192.168.0.14:3112] AH01630: client denied by server configuration: C:/xampp/htdocs/favicon.icoIt says my server name does not match, So i changed the server name to: ( httpd-ssl.conf ) around line 80 ServerName 192.168.0.14:443 DocumentRoot to my httpd.conf document root My .key is in apache/conf/ssl.key my crt is in apache/conf/ssl.crt I hope this helps someone else! i had to post this after how much trouble it was causing me! |