Connections should work fine under PHP 5.4.
As for the PHP warning. On a live site, it’s good practice to setup the PHP warnings to be logged rather than shown to the user. Look at the answer here: http://stackoverflow.com/questions/1645661/turn-off-warnings-and-errors-on-php-mysql
That answer explains how to make this change to the PHP config via the .htaccess file.
Hope that helps!