Questions tagged [kohana-3.3]

Kohana is an open source, object oriented MVC web framework built using PHP5 by a team of volunteers that aims to be swift, secure, and small.

Anything can be extended using the unique filesystem design, little or no configuration is necessary, error handling helps locate the source of errors quickly, and debugging and profiling provide insight into the application.

To help secure your applications, tools for input validation, signed cookies, form and HTML generators are all included. The database layer provides protection against SQL injection. Of course, all official code is carefully written and reviewed for security.

156 questions
0
votes
1 answer

Kohana cURL sent data is empty

I'm sending data using cURL on the following code block: $content = $data['email'].'|'.$data['limit'].'|'.$data['docs']; $curl = curl_init(ACCESS_URL); curl_setopt($curl, CURLOPT_HEADER, false); curl_setopt($curl, CURLOPT_RETURNTRANSFER,…
0
votes
2 answers

How can I include a class that is in the parent directory using Kohana PHP

I made a helper class which have lots of small functions that will help me to create my content, but when I try to include it in my code the PHP shows an error saying that my class doesn't exist. I just use require_once('../general.php'); but it…
0
votes
1 answer

Can't login with Auth::login()

I've remembered about login role and I don't know where's a problem. Here's some code: config/auth.php return array( 'driver' => 'ORM', 'hash_method' => 'sha256', 'hash_key' => 'hashKey', 'lifetime' =>…
matiit
  • 7,969
  • 5
  • 41
  • 65
0
votes
1 answer

Kohana - ORM_Tree

Found a couple of links suggesting using 'ORM_Tree' to handle a self-referential table: http://ninjapenguin.co.uk/blog/2008/09/25/kohana-orm-tip-orm-tree http://attic.ist.unomaha.edu/blogs/zac/2009/12/15/orm-tree-in-kohana/ However, get an error…
0
votes
1 answer

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

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…
Pierre
  • 4,976
  • 12
  • 54
  • 76
0
votes
0 answers

Kohana 3.3 ORM 'has_many' and 'through' case problems with different model and table name

I can't seem to get the ORM "has_many" and "through" case working when I use PSR-0 model names that have more than one word because my model is User_Business_Unit and my table is user_business_unit. For example: Here is the has_many relationship in…
Craig Nakamoto
  • 2,075
  • 2
  • 18
  • 19
0
votes
1 answer

How to allow a variable part including slashes in the route?

For example: mysite.com/questions/test/1 And I want to know if it's realy contains a string test with id which is 1 in this example. Note. It's not a standart controller vs action and id. I must to check this and set the route(controller vs.…
Smash
  • 513
  • 5
  • 23
0
votes
5 answers

Where can I put my global code in Kohana 3.3?

Say I want a constant, a function or a class to be available in all my models, views and controllers code (within a particular web site (application)). Where can I put them? I don't mind importing them explicitly in every file I need them in but I…
Ivan
  • 63,011
  • 101
  • 250
  • 382
0
votes
1 answer

PHP Kohana 3.3 Controller Sub Folder

I've looked at so many Stackoverflow questions regarding this and none of them seem to solve my problem. I just want to have a admin folder and controllers within those. Here is what my route looks so far /* * Set the routes. Each route must have a…
Ozair Patel
  • 1,658
  • 1
  • 12
  • 17
0
votes
1 answer

how php decides whether to send session cookie

I've visited my website for the first time and I see the session cookie set by server. I'm reloading the page and I see that only my browser sends the session identifier to server, while server doesn't return session cookie. I'm using Kohana…
Max Koretskyi
  • 101,079
  • 60
  • 333
  • 488
0
votes
1 answer

Why is my Kohana 3.3 controller response NULL when called from within another controller?

Why does a controller of mine work ok when called directly but does not respond (though the action code seems to be executed ok) when called from within another controller? Below is the code example. // This contoller works ok when called…
Ivan
  • 63,011
  • 101
  • 250
  • 382
0
votes
1 answer

Custom validation rule messages when uploading files in Kohana

I would like to create a custom error message when uploading file fails validation using Kohana 3.3. This code is getting the rules and checking them: $image = $_FILES['image']; $rules = Model_Image::get_file_rules(); $validation =…
xylar
  • 7,433
  • 17
  • 55
  • 100
0
votes
0 answers

Kohana Auth Framework - Run Login twice

could anybody tell me what happens if an already logged-in user sends another login request with different credentials to the Kohana ORM Auth module? Is this equal to the current user's logout and login with the new credentials? If I look at the…
Apollo13
  • 119
  • 1
  • 1
  • 11
0
votes
1 answer

Does Kohana always use native sessions for something even when using database sessions?

I'm using Kohana 3.3 and in my bootstrap.php I'm setting Session::$default = 'database'; Sessions are indeed going into the database and seem to be working fine. However, the browser is still getting a "native" session cookie. It has both…
BrewJitsu
  • 3
  • 1
0
votes
2 answers

get file like pics and media through controller

I have the following link on my website - http://mywebsite/multimedia/pronounciation/265.mp3 which gets me the file bypassing controllers. But I would like to log request and then return this file. So I created controller which logs request and then…
Max Koretskyi
  • 101,079
  • 60
  • 333
  • 488