All over the Internet you can find questions and answers regarding sqlite support in PHP on Fedora Core, Red Hat, and CentOS distributions. While many of them have differences in how to go about enabling support, all of them say the same thing about the cause: packages for PHP on those distributions are compiled without support for SQLite (to my knowledge it was not built into these distributions since Fedora Core 4). To my knowledge there are no current RPM's for easily installing php-sqlite3.
Additionally, it is not recommended that you install the PECL extension for SQLite, as that is deprecated and no longer supported.
That being said, PHP on these distributions does include support for php-pdo and you can use that to access sqlite databases. The primary differences are the connection strings (you do not use sqlite_open but instead use a pdo string - for example:
$db = new PDO('sqlite:/tmp/foo.db');). A list of sqlite functions using PDO can be found in the PHP Manual. I believe that if you modify your code to use these functions instead of the functions in php-sqlite that your problems will be solved.
If you need php-sqlite support and php-pdo does not work, you can try the following to recompile php with support for php-sqlite. Download the source for PHP from http://php.net/downloads.php and compile it with support for the SQLite module.
tar xfvj php-5.3.2.tar.bz2