Installation using LiteSpeed

From Habari Project

Revision as of 05:35, 10 May 2013 by Michaeltwofish (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search



Configure PHP

Compile PDO Extensions

Using LiteSpeed's inbuilt compiler these options work for MySQL. For sqlite you'll need to ensure you have sqlite installed on the system and use appropriate configure options.

--with-mysql=/usr --with-mysql-sock=/var/run/mysqld/mysqld.sock --with-zlib --with-gd --enable-shmop --enable-track-vars --enable-sockets --enable-sysvsem
--enable-sysvshm --enable-magic-quotes --enable-mbstring --enable-pdo=shared --with-pdo-sqlite=shared --with-sqlite=shared --with-pdo-mysql=shared

Load PDO Extensions

As we specified the location of the php config file in the configure line above to be ../php, this should map to /opt/lsws/php/php.ini. Open that file and make sure the following is present

;extension_dir = ./

PHP will then use the extension_dir that is compiled into it.

To verify all is well create a new file info.php and inside put

<?php phpinfo() ?>

When you view this you should see the PDO extension and drivers enabled.

Configure Virtual Host

It's a lot simpler to deal with LiteSpeed as LiteSpeed rather using all your Apache knowledge and treat LSWS like Apache. So don't use .htaccess just setup rewrite rules in the Virtual Host config.

Do everything you normally do for a php webapp. The part you need to take note of is the Rewrite tab. Ensure Rewrite is enabled and that these rules are present.

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteBase /
RewriteRule . index.php [PT]

Update RewriteBase to where you have Habari installed. I've setup on the root dir.

Restart LiteSpeed and you should be good to install.

Personal tools