Love Fuel?
Donate
About
Forums
Discussions
Login
FuelPHP Forums
Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
WanWizard
a.k.a. WanWizard
Discussions
4
Comments
8242
Activity
Set thread subject to [SOLVED] if applicable
Eh... I am one...
Comment by
WanWizard
July 2012
permalink
Set thread subject to [SOLVED] if applicable
I don't think this forum allows editing of the subject. Unless I've missed a button somewhere...
Comment by
WanWizard
July 2012
permalink
AJAX Login - With Template
What do you use for session storage? If a cookie, it might be that because of the fact that you do the redirect in the browser after the ajax request, you lose the updated cookie that the ajax call must produce. Can you see in your browser debugger…
Comment by
WanWizard
June 2012
permalink
how to cache object use file cache?
Please define "not work"? What do you do? What happens? Any errors? I use the file cache all the time, without problems.
Comment by
WanWizard
July 2012
permalink
Catching Database Connection Exception
It doesn't get to the throw() because mysql_errno() causes a PHP error. I've just committed an update of the Error class to 1.3/develop which allows you to control which old-style PHP errors will throw an exception through the "error…
Comment by
WanWizard
June 2012
permalink
Catching Database Connection Exception
As said before, those are not exceptions, they are PHP warnings, errors, notices, and can not be caught using try/catch. It could be a possibility to have a PHP error handler catch them and convert them to Exceptions, I'll have to see if that&…
Comment by
WanWizard
June 2012
permalink
AJAX Login - With Template
Ok, so it's not "false", so it should fall through there. Next question: what is $controller_method set to?
Comment by
WanWizard
June 2012
permalink
Get all HTTP headers
What do you mean with "HTTP headers"? Json input? If so, use Input::json().
Comment by
WanWizard
July 2012
permalink
Error by using Response::redirect before Session::set
Are you sure you have your session config set to db? I've just tried public function action_index() { $string = str_repeat('0123456789', 3000); Session::set('text', $string); return 'done'; } which stores a 3…
Comment by
WanWizard
June 2012
permalink
AJAX Login - With Template
On to the next possible victim then. What does $auth->get_user_id() return?
Comment by
WanWizard
June 2012
permalink
AJAX Login - With Template
What happens if you paste that URL in the browser? If that also goes to login, either your router code is not ok, or you are not seen as logged in, so you need to debug that.
Comment by
WanWizard
June 2012
permalink
AJAX Login - With Template
Debug your code. What is the value of 'data.redirect' before doing the location.href change?
Comment by
WanWizard
June 2012
permalink
Where is the template controller & base controller which extends in controllers.
I just told you where Controller_Template is. It's part of the framework, so it's not in app. See also http://docs.fuelphp.com/general/controllers/base.html (and the pages of the framework supplied base controllers) if you're new to …
Comment by
WanWizard
July 2012
permalink
Where is the template controller & base controller which extends in controllers.
Which controller exactly are you referring to? The core base controllers (like Controller_Template, Controller_Hybrid and Controller_Rest)? They are in fuel/core/classes/controller.
Comment by
WanWizard
July 2012
permalink
Error by using Response::redirect before Session::set
As the message says, the object can't be sanitized. Pass it to the view raw: $view->set( 'valid', $valid, false ); don't forget that this passes fieldnames and values (as they can be part of the error message) to the view un…
Comment by
WanWizard
June 2012
permalink
Use Validation without Fieldset
If I look at http://docs.fuelphp.com/classes/validation/validation.html, I don't see any mention of a fieldset class. Forge a validation object, add the fields, run it. Job done. As to your fieldset remark, the fieldset form is generated usin…
Comment by
WanWizard
June 2012
permalink
Best practice for saving and retrieving relationships in controller
No, properties are the columns of the model's table (which you want to expose to the model, you don't have to list them all), relations are defined in their own model properties. Note that because of this, if you have a column and a relat…
Comment by
WanWizard
June 2012
permalink
Error by using Response::redirect before Session::set
The default template stores the validation objects in the session I see. Which is not a problem, providing you use session storage that can handle that amount of data. A cookie can't. You shouldn't use a cookie anyway, it's very limi…
Comment by
WanWizard
June 2012
permalink
DB::Execute not working
What doesn't work? What's the definition of "doesn't work"? Just tried that on a test table here, without problems, the UPDATE query runs fine.
Comment by
WanWizard
June 2012
permalink
Fuel 2.0
2.0 is still alpha. Kernel and Core are stable, but the API isn't fixed yet. Most of the functionality of the support classes isn't ported or rewritten yet, and not a lot of work is spend on backward compatibility (the legacy classes). Th…
Comment by
WanWizard
June 2012
permalink
proper way to generate a WHERE IN query
You can do Model_Name::find()->where('field', 'IN', array(1,3))->get();
Comment by
WanWizard
June 2012
permalink
Best practice for saving and retrieving relationships in controller
Not sure what exactly you mean by rendering a relationship, as that would be extremely application specific. But in general, you could so something like this: //fetch a parent and it's childeren $parent = Model_Parent::find()->where('i…
Comment by
WanWizard
June 2012
permalink
Error by using Response::redirect before Session::set
Thanks for sending me the code. I'll reply here so others might benefit from it. The message has nothing to do with redirects. Your application uses a cookie to store all session data (which is the default, and you haven't configured anyt…
Comment by
WanWizard
June 2012
permalink
Catching Database Connection Exception
I understand what you want. But unfortunately PHP doesn't generate exceptions for these errors, it just outputs a PHP warning (or error), which can not be caught.
Comment by
WanWizard
June 2012
permalink
Catching Database Connection Exception
You can catch Database_Exception, as that is the only real exceptions in there. The others are PHP errors or warnings, which can't be caught. Day in the life of a PHP programmer, I'm afraid. These errors are all programming errors, and sh…
Comment by
WanWizard
June 2012
permalink
More Comments
Howdy, Stranger!
It looks like you're new here. If you want to get involved, click one of these buttons!
Sign In
Apply for Membership
About
Username
WanWizard
Joined
January 2011
Visits
2,375
Last Active
12:36AM
Roles
Administrator