Installation Issues with lighttpd, php and sqlite

54 views
Skip to first unread message

barleytea

unread,
Aug 18, 2008, 3:09:46 PM8/18/08
to habari-users
Hi all,

I have a NAS at home and one of its functions is my experimental web
server. It is running a powerpc version of Debian. I've installed
lighttpd, php5, mysql and am currently running Wordpress 2.6 on it.
My goal is to run Habari 0.5 using Lighttpd, php5 and sqlite and see
how the performance compares to WP on my NAS.

However, I have been trying on and off for the last 3 weeks without
success. I have enabled mod_rewrite and mod_fastcgi for Lighttpd. My
php is > 5.2 and has the required modules installed. Following the
instruction on http://wiki.habariproject.org/en/Installation#Installing_Habari,
I checked out the Habari SVN and downloaded Habari to my NAS.

But when I try to access Habari installer, I received this message:
"The installer couldn't verify your settings, possibly because your
server is not correctly configured. See the manual for information on
how to correct this problem, or continue without verification."

I have a feeling that I am missing something obvious. Can anyone
please help me debug this issue? Thanks in advance.

Scott Merrill

unread,
Aug 18, 2008, 3:18:41 PM8/18/08
to habari...@googlegroups.com
On Mon, Aug 18, 2008 at 3:09 PM, barleytea <gar...@gmail.com> wrote:
> But when I try to access Habari installer, I received this message:
> "The installer couldn't verify your settings, possibly because your
> server is not correctly configured. See the manual for information on
> how to correct this problem, or continue without verification."

What are the permissions for the directory into which you have
installed Habari? Does the account used by the web server have
permissions to create new files?

If not, you can manually create a config.php file that contains all
the necessary bits for your installation. Or, you could relax
permissions on the Habari directory so that the installer can create
the config.php and .htaccess files, and then tighten things up when
you're done (though be advised that SQLite requires world-writable
permissions on the directory in which the SQLite data file resides).

Cheers,
Scott

barleytea

unread,
Aug 19, 2008, 2:45:44 AM8/19/08
to habari-users
Thanks for the reply, Scott. I'm using lighttpd for my web server and
it does not use .htaccess files. I do think there is some
configuration issue in my /etc/lighttpd/lighttpd.conf, as the error
message states. But I am a newbie to current web technologies so I'm
just googling and trying different things to no avail.

I downloaded habari via svn to /habari directory on my NAS. This
directory permission is set to 777 and accessible by www-data, used by
lighttpd. The listing from ls -all:
NAS-01G:/var/www# ls -all
drwxr-xr-x 8 www-data www-data 4096 2008-08-19 14:14 .
drwxr-xr-x 14 root root 4096 2008-07-14 04:08 ..
drwxr-xr-x 5 root root 4096 2008-08-19 14:13 blog
drwxrwxrwx 8 www-data www-data 4096 2008-08-19 04:19 habari
-rw-r--r-- 1 root root 3586 2008-07-14 05:10 index.html
drwxr-xr-x 10 root root 4096 2008-07-15 04:03 phpmyadmin
drwxr-xr-x 4 root root 4096 2008-07-18 01:24 rtgui
-rwxr--r-- 1 root root 23 2008-07-15 03:54 test.php
NAS-01G:/var/www#

In the midst of my attempts trying to get habari to work, I have
deleted Wordpress 2.6 and did a clean install of WordPress 2.6.1. I
still very much like to try Habari on lighttpd + php5 + sqlite as WP
with mySQL is a little sluggish on my little server.

Did anyone try to install with this particular setup? What are the
steps to configure lighttpd for use with Habari?


On Aug 19, 3:18 am, "Scott Merrill" <ski...@skippy.net> wrote:

barleytea

unread,
Aug 19, 2008, 3:57:00 AM8/19/08
to habari-users
OK, I just searched for lighttpd in this group and found my answer. I
needed to add this line in my lighttpd.conf:
server.error-handler-404 = "/index.php"

In my case, I put my Habari installation in a sub-folder (e.g.:
http://my.dyndns.org/habari), so I put:
server.error-handler-404 = "/habari/index.php"

Great. Something simple that had actually been on this group all
along. ;-)

I still had to set the read,write,excute rights for www-data
(lighttpd) for /habari/user/cache. To do that, I just set the owner
and group setting to www-data recursively for /user and its
subfolders.

Matt Read

unread,
Aug 21, 2008, 1:32:51 AM8/21/08
to habari...@googlegroups.com
On Tue, Aug 19, 2008 at 3:57 AM, barleytea <gar...@gmail.com> wrote:
>
> OK, I just searched for lighttpd in this group and found my answer. I
> needed to add this line in my lighttpd.conf:
> server.error-handler-404 = "/index.php"
>
> In my case, I put my Habari installation in a sub-folder (e.g.:
> http://my.dyndns.org/habari), so I put:
> server.error-handler-404 = "/habari/index.php"

see also http://asymptomatic.net/2008/03/29/2713/implemeting-the-front-controller-pattern-in-lighttpd
for additional way of doing this with mod_rewrite, and reasons why the
404 method is not the "best" way.

Also, I have found that using mod_magnet works even better for the
front controller pattern. It requires a lua script which you attract
the physical path to. I have used this script http://pastoid.com/0q
and mod_magnet successfully with habari + lighty. You simply save that
as a script called rewrite.lua and place it where you would place
.htaccess, then use:

magnet.attract-physical-path-to = ( server.document-root + "/rewrite.lua" )

here is an example lighttpd.conf that I used for my sites (note
mod_magnet is the first in the list of modules, that is important):

http://pastoid.com/0r

hope that made sense.

tris

unread,
Aug 23, 2008, 3:44:31 PM8/23/08
to habari-users
> server.error-handler-404 = "/index.php"
>
> In my case, I put my Habari installation in a sub-folder (e.g.:http://my.dyndns.org/habari), so I put:
> server.error-handler-404 = "/habari/index.php"

ahh god, I've searched hours and hours on this issue, wondering why my
habari installation on the root server works and on the test machine
not.
thanks a lot, guys.
Reply all
Reply to author
Forward
0 new messages