Thank you, I have switched to 5.2 but it did not work.
At the moment script works normally at other host with PHP 5.3.22., Apache ver. 2.2.23, MySQL version 5.1.70-cll
Now at HH: Apache version 2.2.24, MySQL version 5.5.32-cll
The issue may be related to Apache or MySQL versions.