kohana-3.3

custom error page - can't get into handler

痞子三分冷 提交于 2019-12-25 05:16:35
问题 I'm trying to add my custom pages. I'm using Kohana 3.3. The official documentation states that I should ovveride the method hander of native Kohana_Exception class. This is pretty easy to do so I've done that. Now I'm expecting that Kohana would call that method every time an exception or an error occurs. But this is not the case. I've found 2 catch blocks where an exception is caught inside execute_request method of Kohana_Request_Client_Internal class. First catch catch (HTTP_Exception $e)

Kohana 3.3 ORM Validation - unique value not working when value is empty

≡放荡痞女 提交于 2019-12-25 02:14:33
问题 In a Model_Page class, extending the Kohana ORM class, I have this rules definition : public function rules() { return array( 'url' => array( array('Model_Page::unique_url', array($this)), ), ); } To simplify here, I will just return false from this function, so it should never validate when I try to save/update a page : public static function unique_url($page) { return false; } This works as expected, if the value for url is not NULL or not an empty string . But if I already have a page with

Kohana 3.3 not using MySQLi driver

末鹿安然 提交于 2019-12-13 21:10:52
问题 I'm working on a project that uses Kohana 3.3. I've run into a problem where I want to connect to a database. The application is telling me it's using MySQL and it's decrepated. To solve this I've downloaded a MySQLi driver for Kohana 3.3 and followed the instructions (creating a mysqli folder in the modules folder and adding a new line in bootstrap.php to enable it). However when I try to perform any database actions it still says it's using MySQL. The error reads: "Database_Exception [ 8192

Kohana The requested URL /home was not found on this server

可紊 提交于 2019-12-12 04:58:17
问题 I am getting this error from a red hat apache environment which is running php with a Kohana application. This application was migrated from a wamp installation where it was functioning. Currently if I hit the following URL I get a 404 error http://server/home But if I hit this the page renders http://server/index.php/home I assume this has to do with my .htaccess files, but I have been unable to resolve the issue. Below is the .htaccess file found in apache/htdocs where my application

What's the simplest way to clear the cache in Kohana 3.3.1?

别说谁变了你拦得住时间么 提交于 2019-12-11 16:01:18
问题 I inherited a web application in Kohana 3.3.1 (I'm used to working in Symfony). What is the simplest command or process to clear the entire cache? I've looked at http://forum.kohanaframework.org/discussion/5779/how-i-can-clear-the-cache-folder-in-ko3/p1 and http://www.hcs.harvard.edu/~powerpak/kohanadocs/libraries/cache.html But I'm really looking for something that can be automated as part of our deploy/CI process. Thanks! 回答1: I think what easiest way will be write a minion task ( https:/

How to upgrade from Kohana 3.2 to 3.3 (implementing PSR-0)?

纵然是瞬间 提交于 2019-12-09 01:38:18
问题 What steps do I need tot take to upgrade from Kohana 3.2 to 3.3 with respect to the implementation of PSR-0 and what commands have to be executed from the command line? 回答1: Unix command line: These are the steps I took to implement PSR-0 in my Kohana application. I removed the following system/ dir: rm -rf system In your current bootstrap.php the only change is to make the classes start with an upper, so best is to keep your old bootstrap and just change the following lines on top of the

How to upgrade from Kohana 3.2 to 3.3 (implementing PSR-0)?

谁都会走 提交于 2019-12-01 00:57:58
What steps do I need tot take to upgrade from Kohana 3.2 to 3.3 with respect to the implementation of PSR-0 and what commands have to be executed from the command line? Daan Unix command line: These are the steps I took to implement PSR-0 in my Kohana application. I removed the following system/ dir: rm -rf system In your current bootstrap.php the only change is to make the classes start with an upper, so best is to keep your old bootstrap and just change the following lines on top of the file: // Load the core Kohana class require SYSPATH.'classes/Kohana/Core'.EXT; if (is_file(APPPATH.