

On a windows system we recommend using Putty and on Mac OSX CoolTerm (see this FAQ for more details) to configure a serial for for transmitting and receiving data. In order to test sending and receiving serial data in PHP, the other end of the serial port should be open. Open terminal program at other end of serial connection Navigate to the file the a web browser to confirm that an error is not produced which tells you to install PHP Direct IO. Windows: restart IIS webserver, or WAMP serverĭownload the file above and place it in your web-servers root directory.Unix: commands vary, on mac for example: sudo apachectl restart.To the bottom of the php.ini file add the following. Next the php.ini file needs to be updated to tell it to use the extension.

The dll file should be copied into your php_extension folder (often located in ext or libphpext ) Configure PHP to use the extension On windows download the latest php direct io extension dll from. On Unix system install the extension using PECL, open a terminal and type: We will use this extension for serial port communication. PHP by default does not offer good COM port support however a PHP extension called Direct IO does offers low level access to IO. Configure PHP file with correct local serial port settings.Open terminal program at other end of serial connection.An installed Brainboxes Serial port product.

#Coolterm serial port error how to
This article explains how to configure PHP in order to send and receive data over a serial port on a Unix system or a windows system. However PHP can also be used to control and communicate with other devices. Typically PHP is used to generate web pages by interrogating a database and files. PHP (PHP HyperText Preprocessor) is a server side scripting language popular with website developers. Communicate-Over-Serial-Port-In-PHP.zip (1.2 kB)
