Arduino Com port and PHP Bug
Sounds like the COM port is not setup. Opening the Arduino IDE probably does this automatically.

Try running the following command, only once, after turning on your pc to initialize the COM port.

mode COM3 BAUD=9600 PARITY=n DATA=8


Ps. I'm not a windows user, so this is an educated guess - reference.

Pps. I think you're winning the award for the most complicated way to ring a bell. :)