Score:0

Updating SQLite kills PHP

fi flag

SUMMARY: I updated the SQLite on my Ubuntu dedicated server, but now I get an Internal Server Error when trying to run any PHP script (even "Hello World").

DETAILS: I rent a "Fully Managed" server from a large host, but they refused to update the SQLite on the server that was a few years old, saying I'm on my own.

I found an article that said to do "apt install libsqlite3-dev", but when I tried, I got this excerpt:

libsqlite3-dev is already the newest version (3.22.0-1ubuntu0.7).

Which is not true, that's not close to the newest version. I also tried "apt install sqlite3" but got the same result.

From another article I did:

cd /usr/local/bin
wget https://www.sqlite.org/2022/sqlite-autoconf-3400000.tar.gz
tar zxvf sqlite-autoconf-3400000.tar.gz
cd sqlite-autoconf-3400000
./configure
make
make install

That got SQLite installed, but now when I tried to run a simple "Hello World" PHP script, I get an Internal Server Error. The error log says:

>AH01215: php80.cgi: symbol lookup error: php80.cgi: undefined symbol: sqlite3_column_table_name: /[host name redacted]/cgi-system/php80.cgi
>End of script output before headers: php80.cgi

My <helloworld.php> file is:

<!DOCTYPE html>
<html>
<head>
    <title>Hello world></title>
</head>
<body>
<?php echo'Hell, low whirled.';?>
</body>
</html>

I asked my host why my PHP won't run, and they said that I screwed something up when I updated SQLite. They said I can pay them $100 to "re-image" the server software (downgrading the SQLite), and then have them do a custom update of SQLite for me, for probably $300. I'm wary of paying $300 every time I want to update the software, so I'm hoping to get some help in getting my PHP/SQLite to play nice together (or to install SQLite properly after I pay $100 to have my server re-imaged).

My Ubuntu OS is 18.04.6 LTS (Bionic Beaver), and PHP is 8.0.

hr flag
A lot of work goes into making sure that each Ubuntu distribution ships with compatible versions of its software packages. If you don't want to do that yourself, the simplest option is generally to upgrade the whole system - Ubuntu 22.10 (kinetic) has [sqlite3 version 3.39](https://packages.ubuntu.com/kinetic/libsqlite3-0) for example. See [Why don't the Ubuntu repositories have the latest versions of software?](https://askubuntu.com/questions/151283/why-dont-the-ubuntu-repositories-have-the-latest-versions-of-software).
Michael Bluejay avatar
fi flag
Thank you very much, this is helpful. I'll try to upgrade the whole system.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.