apache and sqlite, apache won't start properly (using virtualmin gpl)

Ok, so I installed sqlite, php5-sqlite package, the virtualmin sqlite package, and probably another couple things related to sqlite.

When it installed, I restarted apache and it gives an error in virtualmin. Something like:

error:
apache2 started successfully.

Weird, so I started it from SSH, and it just says apache2 started successfully.

However, in both those cases apache is running, but the process says “apache2 starting” or something like that and it’s at 99% cpu indefinitely. I’ve tried removing the lines in the PHP file calling pdo and pdo-sqlite libraries but apache still fails.

Anyway, before I go posting 3 dozen config files to the board, I was hoping someone might know off hand what to check. If you need to see a conf file, log file, an exact error message or whatever, let me know and I’ll post it after work:)

Thanks!

ps. this is on debian 5

What distro are you using?

And do you see any errors in the apache logfile?

A PHP module really shouldn’t prevent Apache from starting, but I am curious if it happens to work if you were to comment out the section where sqlite is loaded… that’s probably in /etc/php5/conf.d/ somewhere.

-Eric

Hey, I’m using debian 5. In all my fuss last night, I didn’t check the apache logs! I’ll check that out tonight.

I did comment out the sqlite loading in PHP (or I thought I did). If my logs don’t reveal the solution, I’ll let you know what they say and where I commented out the sqlite stuff in PHP.

ah ha!

[Sun Aug 02 20:49:51 2009] [notice] suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec) [Sun Aug 02 20:49:51 2009] [notice] Digest: generating secret for digest authentication ... [Sun Aug 02 20:49:51 2009] [notice] Digest: done PHP Warning: Module 'PDO' already loaded in Unknown on line 0 PHP Warning: Module 'pdo_sqlite' already loaded in Unknown on line 0 PHP Fatal error: PDO: driver sqlite requires PDO API version 20060511; this is PDO version 20060409 in Unknown on line 0 PHP Fatal error: Unable to start pdo_sqlite module in Unknown on line 0

so I assume I simply have an outdated version of PDO. How can i update this? when I run apt-get upgrade it’s not on the list. i have this:

The following packages will be upgraded: apache2-doc apache2-suexec-custom apache2-utils dhcp3-client dhcp3-common linux-image-2.6.26-2-686 linux-libc-dev 7 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

I’m afraid to do this in case something else breaks:P I assume none of these updates are necessary in order to get apache to work?

thanks!

Hmm, what do you see when you type:

dpkg -l ‘php*’

silo:/var/log/apache2# dpkg -l 'php*' Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad) ||/ Name Version Description +++-======================================-======================================-============================================================================================ ii php-pear 5.2.6.dfsg.1-1+lenny3 PEAR - PHP Extension and Application Repository un php4-cgi (no description available) un php4-cli (no description available) un php4-dev (no description available) un php4-mysql (no description available) un php4-pear (no description available) ii php5 5.2.6.dfsg.1-1+lenny3 server-side, HTML-embedded scripting language (metapackage) ii php5-cgi 5.2.6.dfsg.1-1+lenny3 server-side, HTML-embedded scripting language (CGI binary) ii php5-cli 5.2.6.dfsg.1-1+lenny3 command-line interpreter for the php5 scripting language ii php5-common 5.2.6.dfsg.1-1+lenny3 Common files for packages built from the php5 source ii php5-dev 5.2.6.dfsg.1-1+lenny3 Files for PHP5 module development un php5-json (no description available) un php5-mysql (no description available) ii php5-sqlite 5.2.6.dfsg.1-1+lenny3 SQLite module for php5 ii php5-xmlrpc 5.2.6.dfsg.1-1+lenny3 XML-RPC module for php5 un phpapi-20060613+lfs (no description available) silo:/var/log/apache2#

Hrm, poking around Google a bit, I see a bunch of folks having similar troubles as yourself – where the solution was to custom compile PHP.

That doesn’t seem particularly desirable :slight_smile:

However, I am curious if going into /etc/php/conf.d, and commenting out the line that’s loading the sqlite extension does allow Apache to startup again.

Once we have Apache working again, we can trying and figure out the sqlite stuff from there :slight_smile:

-Eric

[Mon Aug 03 23:16:34 2009] [notice] suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec) [Mon Aug 03 23:16:34 2009] [notice] Digest: generating secret for digest authentication ... [Mon Aug 03 23:16:34 2009] [notice] Digest: done PHP Fatal error: PDO: driver sqlite requires PDO API version 20060511; this is PDO version 20060409 in Unknown o$ PHP Fatal error: Unable to start pdo_sqlite module in Unknown on line 0

Still a no go. I commented out everything in pdo.ini pdo_sqlite.ini sqlite.ini, and I have the library calls commented out in php.ini too. Not sure what else to do to disable pdo/sqlite :frowning:

Any other ideas before I wipe it?

Well, that’s certainly a little surprising.

There’s bound to be some conf file that’s loading the problem module, I’m just not sure which one.

I’d certainly hate to see you wipe the system due to that – you could even just move all the files out of /etc/php5/conf.d, and if that works, move them back in one at a time until you figure out which one breaks them.

It also looks like you have php5-sqlite installed – you could try removing that as well.

Just some thoughts!

-Eric

Well, I think I’m just gonna format it and let virtualmin set it up again. I’ve kept my samba conf file and kept my /home directory on another partition, so it’ll literally take me 30 mins to get it back to how it was:D

Thanks though!