473,387 Members | 1,569 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Cannot get sqlite to work in PHP5

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
1 4868
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: R. Rajesh Jeba Anbiah | last post by:
This is kind of survey like... bit off topic indeed. I'm interested to know, how many of you really use sqlite with PHP. Many people are scared of it's locking system. If you use it, how big is...
3
by: Cafer ÅžimÅŸek | last post by:
Hi all, I want to use SQLite databases to my site. But the hosting company's server does not support SQLite extension. Is there any way to use SQLite DB's to my site? PS: safe mode is off,...
1
by: David Fowler | last post by:
I'm new to getting in touch with other PHP users/PHP team, so please excuse me if this post is at all inappropriate or in the wrong place. In the current release of PHP (5.1.4) and in the CVS for...
0
by: dirtycow | last post by:
Hi all, I'm trying to compile PHP 5.2.1 on my Ubuntu 6.10 server. I've downloaded the source code from php.net and am running the following "configure" command on it: ../configure...
1
by: Roberto | last post by:
I have been using pg_escape_string from the php5-pgsql library even though I am using SQLite. This is because I've found no equivalent for SQLite. Can someone tell me how to replace this with a...
1
by: Roberto | last post by:
Which is the most advised way to reach SQLite from PHP5/Apache2? I have both pdo_sqlite and php5-sqlite3 installed (on Ubuntu Feisty, in case you were wondering). I want to use the best practice...
8
by: Gilles Ganault | last post by:
Hello I need to compile PHP5 with SQLite statically and without PDO. I don't need DB-independence, so it's fine using sqlite_*() functions instead of PDO. 1. I've downloaded, compiled, and...
10
by: Chuck Anderson | last post by:
Firefox 3 uses sqlite files for bookmarks, browse history, form history, cookies, ...... When I execute : $sqlite_db_file = 'cookies.sqlite'; $db = sqlite_open($sqlite_db_file, 0666,...
8
by: john6630 | last post by:
I am trying to get PDO for sqlite to work on my localhost system. I have modified the PHP5.ini file as shown below and run the following PHP script. As stated below, it reports the mssql, mysql and...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.