title: Giving PHP permission to access COM port
body: <p>I'm creating a php script that connects to a 3G modem connected via serial connection on COM5.</p>
  
  <p>I'm getting the following error and I believe it is because php does not have r/w access to COM5:</p>
  
  <blockquote>
    <p>Warning: fopen(COM5:) [function.fopen]: failed to open stream: No such file or directory in C:\xampp\htdocs\SMStest\test2.php on line 9</p>
  </blockquote>
  
  <pre><code>// mode com1: BAUD=9600 PARITY=N data=8 stop=1 xon=off
  $fp = fopen ("COM5:", "w+");
  if (!$fp) {
      echo "Uh-oh. Port not opened.";
  } else {
      $e = chr(27);
      $string  = $e . "A" . $e . "H300";
      $string .= $e . "V100" . $e . "XL1SATO";
      $string .= $e . "Q1" . $e . "Z";
      echo $string;
      fputs ($fp, $string );
      fclose ($fp);
  }
  </code></pre>