kohana

Kohana 3 Command line output buffering?

房东的猫 提交于 2020-01-14 09:52:28
问题 I am using Kohana 3 and I have a controller that extends Kohana_Controller. I call it from the command line using: php /path/to//index.php --uri="url/path" It works just fine, but this particular script takes a long time and during the execution I am echoing status messages (echo 'status message';) but none of the messages appear until after the script has completed executing. I want to see the status messages as they are echoed, can anyone tell me how to do it? Thanks 回答1: It looks like

Kohana_Exception [ 0 ]: A valid cookie salt is required. Please set Cookie::$salt

感情迁移 提交于 2020-01-13 11:35:15
问题 I'm working through this tutorial (http://kowsercse.com/2011/09/04/kohana-tutorial-beginners/) and have run into this error message: Kohana_Exception [ 0 ]: A valid cookie salt is required. Please set Cookie::$salt. I'm a n00b and don't even know where to look for Cookie::$salt in the app. 回答1: You have to provide a salt as you can read in the official documentation //bootstrap.php Cookie::$salt = 'foobar'; I can highly recommend the official doc as well as the API browser. When you learn how

Forum/Board written atop one of the big PHP Frameworks

青春壹個敷衍的年華 提交于 2020-01-13 09:18:07
问题 I was looking for a fresh forum software (threaded) or bulletin board (flat/partitioned). And I'm wondering if there's an implementation based on one of the big PHP frameworks (CodeIgniter, Kohana, Yii, CakePHP, ZF, Seagull, Fusebox, Symfony, eZ, Prado, or whatever...). Reason: A framework based implementation would be inherently more secure, because of ORM and validation and abstracted processing logic. And also would be good showcase of the framework itself. Tutorials and example

Forum/Board written atop one of the big PHP Frameworks

旧巷老猫 提交于 2020-01-13 09:17:59
问题 I was looking for a fresh forum software (threaded) or bulletin board (flat/partitioned). And I'm wondering if there's an implementation based on one of the big PHP frameworks (CodeIgniter, Kohana, Yii, CakePHP, ZF, Seagull, Fusebox, Symfony, eZ, Prado, or whatever...). Reason: A framework based implementation would be inherently more secure, because of ORM and validation and abstracted processing logic. And also would be good showcase of the framework itself. Tutorials and example

help on building a basic php search engine

坚强是说给别人听的谎言 提交于 2020-01-11 10:34:10
问题 i looked for tutorials everywhere but just can't seem to get a good one... a search page with pagination, column header sorting, and multiple filtering(filters are in checkboxes) the problem: had pagination working, had sorting working, but can't get them to work together. add to that getting the filters working with a paginated and sorted resultset i want to make this work with php alone and with GET form methods alone (javascript comes in later, I want to apply progressive enhancement on

Delay in populating session.upload_progress data

你离开我真会死。 提交于 2020-01-06 15:07:25
问题 I'm trying to check the progress of files uploaded. I'm using the Kohana framework which has a Session class, but for the upload progress I'm using native PHP sessions. I'm calling session_start() in Kohana's bootstrap.php, which means session_start() will be called on every page request. After the upload form is submitted, I wait 1 second and then begin calling a PHP file to check the upload progress using jQuery $.ajax() . The problem is that $_SESSION[$key] ($key contains the key for the

display result from a query

时光怂恿深爱的人放手 提交于 2020-01-06 14:54:56
问题 I'm learning kohana 3.3. I'm working on the model part. Basic query. But i don't know how to display the results i got from a query. Here's the model. APPPATH/classes/model/people.php class Model_People extends Model { public function show_data() { $query = DB::query(Database::SELECT, 'SELECT * FROM people'); return $query; } } APPPATH/classes/controller/people.php class Controller_People extends Controller { public function action_index() { $model = Model::factory('people'); $view = View:

Kohana ORM - Incorrect table name

一笑奈何 提交于 2020-01-06 08:23:08
问题 I have a weird problem with the Kohana (3.2) ORM query builder and i can't figure out what is wrong. I get "Incorrect table name" exception: Database_Exception [ 1103 ]: Incorrect table name '' [ SELECT ``.* FROM `` JOIN `user_plugins` ON (`user_plugins`.`plugin_id` = ``.`id`) WHERE `user_plugins`.`user_id` = '9' ] As you can see the table is empty in the query. Controller: $user = ORM::factory('user', Auth::instance()->get_user()->id); if ($user->loaded() ) { $result = $user->plugin->find

Kohana ORM - Incorrect table name

穿精又带淫゛_ 提交于 2020-01-06 08:23:05
问题 I have a weird problem with the Kohana (3.2) ORM query builder and i can't figure out what is wrong. I get "Incorrect table name" exception: Database_Exception [ 1103 ]: Incorrect table name '' [ SELECT ``.* FROM `` JOIN `user_plugins` ON (`user_plugins`.`plugin_id` = ``.`id`) WHERE `user_plugins`.`user_id` = '9' ] As you can see the table is empty in the query. Controller: $user = ORM::factory('user', Auth::instance()->get_user()->id); if ($user->loaded() ) { $result = $user->plugin->find

Tags <script> cut out of the field <textarea> after the form is submitted

巧了我就是萌 提交于 2020-01-05 19:41:11
问题 I have an issue with sending POST data from my form. There is a <textarea> in the form where i'm trying to paste some data which contain a tag <script> (e.g. a code of counter for website traffic, it doesn't matter). <form action="/savepage" method="POST"> <button type="submit">Save</button> <fieldset> <textarea name="content"> Some <b>text</b> <script src="script_source" type="text/javascript"></script> </textarea> </fieldset> </form> After the form was submitted I receive the $_POST array