Solved

Installing SQLite3 on Apache/PHP5

Posted on 2008-10-11
3
5,414 Views
Last Modified: 2013-12-13
I've heard sqlite should be built in to php5 but for some reason it wasn't.
I ran apt-get install php5-sqlite3 and successfully got phpinfo() to show:

SQLITE3
SQLite3 support       enabled
sqlite3 library version       3.3.13

However when I run sqlite_open('database.sqlite') I get:

Call to undefined function sqlite_open()

How can I find out what's wrong? Any commands to try, or logs to check?

BTW, using Ubuntu and Apache 2.2.3.

Thanks
0
Comment
Question by:oct11
  • 2
3 Comments
 
LVL 35

Accepted Solution

by:
torimar earned 500 total points
ID: 22694763
Hi,

it could be this bug you just hit:
https://bugs.launchpad.net/ubuntu/+source/php-sqlite3/+bug/178906

On the Ubuntu forums, a successful workaround is said to have been this:
sudo aptitude install sqlite
sudo aptitude install php5-sqlite
sudo aptitude install sqlite3
sudo aptitude install php5-sqlite3
sudo /etc/init.d/apache2 restart


Hope this helps.
0
 

Author Comment

by:oct11
ID: 22695401
Yeah, it seems to at least partly relate to that bug.

Using that workaround I could make sqlite3 work by using PDO, but I could not use it with with function on http://se.php.net/sqlite.

Do you (or anyone) know if I could use the native sqlite functions if I recompiled PHP with the '--with-sqlite=/path/to/sqlite3' statement? (as explained here http://devzone.zend.com/node/view/id/760#Heading6)
0
 
LVL 35

Expert Comment

by:torimar
ID: 22696163
I don't exactly know, but I'm sure I'd try if I were in your position.

Good luck.
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

1. Introduction As many people are interested in Linux but not as many are interested or knowledgeable (enough) to install Linux on their system, here is a safe way to try out Linux on your existing (Windows) system. The idea is that you insta…
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now