Solved

Installing SQLite3 on Apache/PHP5

Posted on 2008-10-11
3
5,402 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

The purpose of this article is to show how we can create Linux Mint virtual machine using Oracle Virtual Box. To install Linux Mint we have to download the ISO file from its website i.e. http://www.linuxmint.com. Once you open the link you will see …
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
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.

920 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

16 Experts available now in Live!

Get 1:1 Help Now