If the communication is not being held it may be solved as follows :
The port specified in the php file may be wrong. Check that.
The port used may have permission issues.
Run the following: sudo chmod 777 /dev/PORTNAME
Running the following let's you know what issues the server may be having related to the php_serial.class.php file. cat /var/log/apache2/error.log