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
duplicate session cookies set in redirect response
p.s. the Session class will be rewritten for 2.0, where this issue will be addressed. As the shutdown event is always executed, no matter how your script terminates, it is technically no longer needed to do a create-on-load.
Comment by
WanWizard
September 2012
permalink
duplicate session cookies set in redirect response
You will always have double cookies on new sessions, because it will create it as soon as you load the session class, and write a second one in the shutdown event. There is no option in PHP to delete or overwrite already set headers. In all other c…
Comment by
WanWizard
September 2012
permalink
Hello
You just have. You can foreach over the result object to retrieve the rows. By default it will return the row as an array, you can use ->as_object()->execute(); if you prefer stdclass objects.
Comment by
WanWizard
September 2012
permalink
Using composer packages.
Once you've mapped the namespace you should be able to load the class. get_declared_classes() lists the classes that are loaded, which doesn't happen until you actually use the class. Fuel doesn't load anything that isn't needed…
Comment by
WanWizard
September 2012
permalink
oil refine migrate error in Ubuntu 12.04 and about mysql strict mode.
Quite possible. In strict mode all "not null" columns are required to have a default value. Which you can't specify on the Oil commandline.
Comment by
WanWizard
September 2012
permalink
duplicate session cookies set in redirect response
If you have a shutdown event call in your index.php, you haven't upgraded your index.php when you upgraded the framework files. Which means perhaps you have more issues. When you upgrade to a new version, don't forget to verify and update…
Comment by
WanWizard
September 2012
permalink
Problem with daemon
Try the PDO driver, it has a reconnect feature in case of a 2006 error.
Comment by
WanWizard
September 2012
permalink
Using composer packages.
A PSR-0 compliant composer package always has a namespace with two parts, the vendor and the package name. This doesn't look compliant, it's only a single class, so you should not use the 'true' parameter to indicate a PSR-0 n…
Comment by
WanWizard
September 2012
permalink
oil refine migrate error in Ubuntu 12.04 and about mysql strict mode.
How did you generate? If you do php oil generate migration create_users name:text email:string password:string instead of php oil generate migration create_users name:text email:string[50] password:string[125] then the resulting migration is …
Comment by
WanWizard
September 2012
permalink
looking for tips to improve performance a bit
All Framework classes are manually added to the autoloader cache, so no file I/O is needed to find and load them. This happens in the bootstrap file of the core and all packages. By default app and module classes are loaded dynamically, but you can…
Comment by
WanWizard
September 2012
permalink
Insert where not exists
Use DB::query().
Comment by
WanWizard
September 2012
permalink
oil refine migrate error in Ubuntu 12.04 and about mysql strict mode.
You're missing the constraint in your definition. So VARCHAR misses it's length. Like "`name` varchar(10) NOT NULL," ...
Comment by
WanWizard
September 2012
permalink
a profile_fields' problem
If you're using an ORM model, use the Typing observer. protected static $_observers = array( 'Orm\\Observer_Typing' => array('before_save', 'after_save', 'after_load') ); Then define your profil…
Comment by
WanWizard
September 2012
permalink
Auth user keeps being logged out automatically
Easy to test with a new profile. I use firebug as well, but I don't use these extensions.
Comment by
WanWizard
September 2012
permalink
SQL query error with WEEK() mysql function
This way week() is seen as a php function. It should be ->where(DB::expr("WEEK('created_at')"), DB::expr("WEEK(CURRENT_DATE)"))
Comment by
WanWizard
September 2012
permalink
a profile_fields' problem
Why are you doing an html_entity_decode() ? Is this code in your view?
Comment by
WanWizard
September 2012
permalink
looking for tips to improve performance a bit
It is encrypted to protect the cookie against hijacking and tampering. In an unencrypted cookie you can modify the session id (by a stolen one) and hijack someone else's session. Fuel doesn't load anything that isn't needed. So class…
Comment by
WanWizard
September 2012
permalink
looking for tips to improve performance a bit
That's very interesting, as FuelPHP is one of the fastest frameworks around. If you refer to session cookies, yes, they are encrypted, and can get quite long. We use pbkdf2() encryption, which can be processor intensive on poor hardware. You s…
Comment by
WanWizard
September 2012
permalink
duplicate session cookies set in redirect response
I can reproduce two cookies, but not more. Checked the code, if the session does not exist, the driver will create one (which will set a cookie), and the shutdown event will update the session, which sets another cookie. When the session exists, I …
Comment by
WanWizard
September 2012
permalink
Rest Controller $this->response not returning anything - v1.3
You can not browse to it. The Controller_Rest expects an ajax call. If you want to see the result in the browser you will have to fake that.
Comment by
WanWizard
September 2012
permalink
Blog module?
Yes, it is. If you're into CodeIgniter that is, as fuelphp.com runs on PyroCMS at the moment... The Pyro code is extremely simple btw, so porting it shouldn't be to difficult.
Comment by
WanWizard
September 2012
permalink
a profile_fields' problem
The docs say: http://docs.fuelphp.com/packages/auth/simpleauth/login.html#/method_get_profile_fields If you want to access the user object directly (for example because you query the table outside Auth), you need to unserialize it yourself, or (if …
Comment by
WanWizard
September 2012
permalink
Rest Controller $this->response not returning anything - v1.3
Any error messages? Any logs? I can't find any reason why it shouldn't work. Lots of people, including myself, use it on a daily basis. btw, you don't need to use $this->response, your action can just return the array. The REST c…
Comment by
WanWizard
September 2012
permalink
A question for the FuelPHP Devs
We use interstateapp for our roadmap, you can access it via http://fuelphp.com/roadmap (which is not really up to date at the moment).
Comment by
WanWizard
September 2012
permalink
how to get result SQL code from ORM query?
FuelPHP uses exceptions to signal errors, so if there is an error, an exception of a specific type is thrown. In case of ORM most exceptions will come from the underlying DB classes. In case of a database error, \Database_Exception will be thrown, …
Comment by
WanWizard
September 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,373
Last Active
8:10AM
Roles
Administrator