Forum

Kohana and Gallery 3 troubles

Odd-Jarle
30 September 2010, 18:24
I tried to install Gallery 3 under Hiawatha but can't seem to get it to work.

I followed the instructions for a Kohana framework by creating a toolkit;
CGIhandler = /usr/local/sbin/php-fcgi:php

FastCGIserver {
FastCGIid = PHP5
ConnectTo = 127.0.0.1:2005
Extension = php, php5
SessionTimeout = 300
}

UrlToolkit {
ToolkitID = kohana
Match ^/(application|modules|system) DenyAccess
RequestURI exists Return
Match ^/(.*) Rewrite /index.php?kohana_uri=$1
}

VirtualHost {
Hostname = www.innflytter.no, innflytter.no
WebsiteRoot = /webstuff/innflytter
StartFile = index.php
ErrorLogfile = /hiawatha/innflytter_error.log
UseFastCGI = PHP5
TimeForCGI = 300
UseToolkit = kohana
}

And then editing the /webstuff/innflytter/gallery3/application/config/config.php with (old settings commented out);
/* $config["site_domain"] =
substr($_SERVER["SCRIPT_NAME"], 0,
strpos($_SERVER["SCRIPT_NAME"], basename($_SERVER["SCRIPT_FILENAME"]))); */
$config["site_domain"] = "/";

/* $config["index_page"] = isset($_GET["kohana_uri"]) ? "" : "index.php"; */
$config["index_page"] = "";

But the page looks ... well far from good. Images display ok if I change site_domain to "/gallery3" but the layout and functions are all non-functional.

The irritating thing is it works under big ole Apache if I let it serve the same stuff on the same server. So I am assuming php.ini is ok.

Any tips on how to get it working with Hiawatha? Thanks

Hiawatha version: 7.3
Operating System: FreeBSD 8.1-release
PHP 5.3.3 with Suhosin-Patch
Hugo Leisink
1 October 2010, 19:05
Why do you use the UrlToolkit rule for Kohana while you are using Gallery3??
Odd-Jarle
2 October 2010, 09:25
Since it didn't work wihtout a toolkit, and their site says

"Kohana - We evaluated many PHP frameworks before choosing Kohana. It's speed, flexibility and power made it just what we needed. Thanks to the Kohana folks for providing this first class application framework!"

So I figured that was the poblem.

But I guess this will not work since they only support Apache after I asked for some pointers at their site.
Hugo Leisink
2 October 2010, 16:02
Ah, Gallery3 is based on Kohana. That explains a lot. In that case, yes, you need the Kohana UrlToolkit rule.
This topic has been closed.