Removed the @ symbols from the connection calls. This can cause massive confusion when trying to diagnose issues as it did for me. Try not having php-mysql installed and you'll see why it's a problem.