Serial COM Port issue with Linux hosting server using PHP
<p>As I am not able access the COM port Value with references to Linux Server and windows server.So explain me what all setting need to made with references to Linux &amp; windows Server.As this below code is working properly in localhost</p>

<pre><code>&lt;?php


    //You need to set the com with a dos command like like:
    //for windows
    //$output = "mode COM1: BAUD=9600 PARITY=N data=8 stop=1 XON=off TO=on";
    for linux
   $output = "mode /dev/ttyS1: BAUD=9600 PARITY=N data=8 stop=1 XON=off TO=on";

    //The next command executes the dos command through php:
    system($output);

    //Create the resource id:
    //for Windows
     $fp = fopen('COM1', 'r+');
    //for Linux
    $fp = fopen('/dev/ttyS1', 'r+');
    if(!$fp)
    {
      echo"Port not accessible";
    }
    else
    {
      echo"Port COM1 opened successfully";
    }

    //Read from port:
    $buffer = fgets($fp);

    echo"Read from buffer: $buffer";

    $file = "output/a.txt";
    file_put_contents($file,$buffer);

    ?&gt;
</code></pre>

<p>*</p>