Port/Serial issues with PHP/Shell

While it makes some sense, that wouldnt explain why it wouldn't work in shell file. The shell file is behaving exactly the same as the php.serial class.