By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,968 Members | 1,844 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,968 IT Pros & Developers. It's quick & easy.

Cannot get sqlite to work in PHP5

P: n/a
I am using Windows XP. The docs say that sqlite is built in to PHP5.1
<?php
$sql=sqlite_open(":memory:");
$sql->close();
?>
When I run this code, I get the message below

C:\PhpApps>php-cgi php-1.php
PHP Stack trace:
PHP 1. {main}() C:\PhpApps\PHP-1.php:0
PHP Fatal error: Call to undefined function sqlite_open() in
C:\PhpApps\PHP-1.p
hp on line 7
X-Powered-By: PHP/5.1.2
Content-type: text/html
I then add php_sqlite to my php.ini. When I run it it gives a different
message about php_pdo.dll missing.

Any help is appreciated.

Jun 22 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Ok, I got it to work, my mistake.

1) php_pdo.dll is there, but was not showing as a comment in the INI
file. I looked in extensions and added the line.

2) extension=php_pdo.dll must precede extension=php_sqlite.dll.
Otherwise same error.
ImOk wrote:
I am using Windows XP. The docs say that sqlite is built in to PHP5.1
<?php
$sql=sqlite_open(":memory:");
$sql->close();
?>
When I run this code, I get the message below

C:\PhpApps>php-cgi php-1.php
PHP Stack trace:
PHP 1. {main}() C:\PhpApps\PHP-1.php:0
PHP Fatal error: Call to undefined function sqlite_open() in
C:\PhpApps\PHP-1.p
hp on line 7
X-Powered-By: PHP/5.1.2
Content-type: text/html
I then add php_sqlite to my php.ini. When I run it it gives a different
message about php_pdo.dll missing.

Any help is appreciated.


Jun 22 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.