kohana

Kohana. Environment Tests. Filters not Enabled.

I use Kohana for my project, but when i located my project to hosting, environment test watch write it: The filter extension is either not loaded or not compiled in. I don`t understand... what is the problem? Sorry, for my language. ...

How can I beef up this security with cross domain user sessions?

I have a Mothership domain, and if you log into it, a token is created in the database for your login with user Id, created datetime, expiry datetime and user agent. The expiry is set to an hour after the token was made (created when the user logins). To be able to login from Mothership to Scoutship, I append a query string like so <a ...

Kohana Controller Setup unexpectly slow.

I am a fairly experienced PHP developer, who is new to kohana. I have built a website with Kohana, but after I uploaded to my server, I found part "Controller Setup" is unusually slow, took over 12s, whilst other take less than 0.5s, Kohana Loading 0.014 1 0.49MB Environment Setup 0.004 1 0.05MB System Initialization 0.007...

Am I "doing it wrong" in Kohana 3?

When I have a controller, e.g. article I often have a action_view() that handles most of the code. Sometimes, it can become 80-100 lines long. My controller usually handles all of these: binding template variables setting sessions (where appropriate) sending emails validating forms I could see bit and pieces that I could make anoth...

Auto-suggest with quick response using PHP/KohanaPHP + MySQL + jQuery

I need to know how to execute this in the best way possible so that the suggestions will load really quick and secured. I want something like how the Related Questions work here after typing a question title. ...

Kohana HABTM self join

Hi I have a problem with using the ORM and creating a has and belongs to many self join using Kohana 2.3.4 I have this table Tasks ID | Title | etc...... I need to be able to link tasks to other tasks, a task can have multiple children, and multiple parents. So I was thinking of having this table. Tasks_Tasks ID | task_1_id | tas...

Advice on using Wordpress or a PHP Framework?

I am currently building a blog type website for myself. I have used wordpress in the past and really enjoy it, but when it comes to building more than just a blog I usually get bogged down in writing hacks for it. The site I'm building is going to pretty much be a blog, but with a 'question and answer' side to it (NOT A FORUM - purely Q...

Favourite Kohana Tips & Features?

Inspired from the other community wikis, I'm interested in hearing about the lesser known Kohana tips, tricks and features. Please, include only one tip per answer. Add Kohana versions if necessary. This a community wiki. ...

New features in Kohana 3? Is it a wise decision to use ver 3 instead of 2?

I have used ver 2 before but i'm thinking of using ver 3 for my new project. Is it advisable to use ver 3 at this point event when it's not yet stable? ...

Kohana 3: Organize Classes (MVC) in Subfolders

Hi, i was wondering how to organize and name my classes The goal: classes books controller model view authors controller model view // thanks for helping ...

Hooks...exactly what they are

I have seen hooks in Kohana PHP framework, and they work as some sort of a callback function triggered by a certain event (Kohana's events that is, some sort of method overloading). I have seen hooks in Wordpress, and I don't know what they are or how to use them (just saw them yesterday). I'm looking for events in "non-frameworked" ph...

Your thoughts on kohana's Event component

Hi, I was wondering what others think about kohana's Event component. I like it very much and use it extensively although I am aware that the feature is not native to PHP. As I have to make a decision for a framework to use in an upcoming and traffic-intensive project I would like to hear your thoughts on the subject. Besides all op...

Kohana3: Absolute path to a file

Say I have a file in my kohana 3 website called assets/somefile.jpg. I can get the url to that file by doing echo Url::site('assets/somefile.jpg'); // /kohana/assets/somefile.jpg Is there a way I can get the absolute path to that file? Like if I want to fopen it or get the size of the file or something like that. In other words, I ...

How to arrange business logic in a Kohana 3 project

I'm looking for advice, tutorials and links at how to set up a mid-sized web application with Kohana 3. I have implemented MVC patterns in the past but never worked against a "formalized" MVC framework so I'm still getting my head around the terminology - toying around with basic examples, building views and templates, and so on. I'm pr...

Why is this HTTP request continually looping?

I'm probably overlooking something really obvious here. Comments are in to help explain any library specific code. public function areCookiesEnabled() { $random = 'cx67ds'; // set cookie cookie::set('test_cookie', $random); // try and get cookie, if not set to false $testCookie = cookie::get('...

How to quickly learn Python and Ruby frameworks coming from a PHP background.

I've been using CakaPHP and Kohanaphp but now I want to try out other frameworks from a more sophisticated OOP language for my next projects. How can I learn the following frameworks quickly so I can immediately pick what to use: Pylons Sinatra Ramaze Tutorials and examples from online resources would really be great. For php deve...

Kohana image library chmod error

Hey, i am confused by this weird error i get, I have an upload form that works fine but when it tries to rewrite an existing image it throws a chmod error, however it only does it with images that existed on the server, so if i upload a pic and upload that same pic, it rewrites it successfuly, but will throw an error on pics that were up...

How can I test a CRON job with PHP?

This is the first time I've ever used a CRON. I'm using it to parse external data that is automatically FTP'd to a subdirectory on our site. I have created a controller and model which handles the data. I can access the URL fine in my browser and it works (however I will be restricting this soon). My problem is, how can I test if it's...

Help with Kohana 3 and a CRON

I've set up a CRON to call a URL in Kohana 3. php /home/user/public_html/index.php my/route/in/bootstrap.php It seems to access the URL fine. However, I have received this error (send back in an email that my host sends per CRON) Undefined index: HTTP_HOST SYSPATH/classes/kohana/url.php [ 40 ] Source of url.php Which is in a Ko...

Kohana 3 and CRON always accessing index.php (not following the URI argument)

OK, I hope this is my last question about CRON jobs and Kohana 3. Note: others are not duplicates, just other problems. Here is my CRON job (setup in cPanel) php /home/user/public_html/index.php --uri=properties/update As per this answer. I have set it up so it emails me the output. It is running every 5 mins. Unfortunately, it alw...