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
error_handling in fuel tasks how to allow to continue with the task execution
Which version of Fuel are you on? This has been vastly improved in 1.6.
Comment by
WanWizard
May 2013
permalink
Can it use Session class without cookie?
Short answer: no. Long answer: saving the session (which happens automatically) will always set a cookie. On a request, you can choose to pass the contents of the cookie in a GET or POST variable instead of using a cookie. This mechanism is used f…
Comment by
WanWizard
May 2013
permalink
Saving ManyToMany relationships : Is this correct?
forge() does not support loading relations at the moment. Why? Never implemented. If you want this, please create a feature request for it at https://github.com/fuel/orm/issues.
Comment by
WanWizard
May 2013
permalink
How to remove Set-Cookie from headers with REST implementation
The session drivers should not be concerned with a "login", they deal with session data. If you stick the session id in the request header instead of in a cookie, it would be logical that you would use the _get_cookie() method to get it f…
Comment by
WanWizard
May 2013
permalink
Anyway to return controller Auth error sanz redirect?
With REST controllers you should not use before, and do no redirect. Controller_Rest contains an option in the rest.php configuration file to configure your auth method. It supports 'basic' and 'digest' for manual authentication…
Comment by
WanWizard
May 2013
permalink
Problem with migrating auth tables
And the website itself runs fine, including database access? Now this is weird. You haven't changed locations (paths) of Fuel components? And forgot to change APPPATH etc in the oil script?
Comment by
WanWizard
May 2013
permalink
How to remove Set-Cookie from headers with REST implementation
If you use sessions, the cookie get's set in the shutdown event, which calls the write() method on the session driver class, using an event callback. Your best bet is probably to overload the Session_Driver class in your app, convert the _set_…
Comment by
WanWizard
May 2013
permalink
Problem with migrating auth tables
Hmm... Yeah, bad suggestion. On OSX, it's a common problem that the CLI version of PHP loads a different php.ini file from the SAPI version, which can cause a lot of misery too. But usually it already stops before this, and complains about PDO…
Comment by
WanWizard
May 2013
permalink
Get list of inserted id's of many relation
No, there is no other way then looping over the relation.
Comment by
WanWizard
May 2013
permalink
Get list of inserted id's of many relation
Oh, is the question the other way around, how can I get an array of PK's from a relation? In that case: $ids = array_keys($list->items); this only works for saved relations, newly assigned relations don't have a valid array key.
Comment by
WanWizard
May 2013
permalink
Get list of inserted id's of many relation
Then I don't understand your question. From your code snippit it looks like you get a list of id's posted that you want to use to assign to a models relation?
Comment by
WanWizard
May 2013
permalink
Get list of inserted id's of many relation
Is this the same question as http://fuelphp.com/forums/discussion/12221#Item_1?
Comment by
WanWizard
May 2013
permalink
Validation unique field in create and edit
You're checking if "name" is unique against a column called "field" in a table called "table"? Which is possibly services by a different model then the one that contains the "name" field? Just trying to …
Comment by
WanWizard
May 2013
permalink
Problem with migrating auth tables
The error message is pretty clear: fuel/core/classes/database/pdo/connection.php(89): PDO->__construct('', NULL, NULL, Array) so it's gets an empty DSN string passed, and NULL for username and password. if you run "oil conso…
Comment by
WanWizard
May 2013
permalink
error_handling in fuel tasks how to allow to continue with the task execution
FuelPHP doesn't generate errors, your code does. *) So look in the backtrace to see what in your code is causing the error, and fix it so it doesn't. Or put that in a try/catch block. Everything in Fuel is an exception, even standard PHP…
Comment by
WanWizard
May 2013
permalink
error_handling in fuel tasks how to allow to continue with the task execution
Your code should be error free, so any errors should be fixed, not ignored. If it is an error you can recover from, use a try/catch block in your code to catch the exception and handle it.
Comment by
WanWizard
May 2013
permalink
Problem with migrating auth tables
Your db config is not ok, or oil either picks the wrong environment (unless you set the environment, it will use 'development').
Comment by
WanWizard
May 2013
permalink
What's the best way to upgrade a production server to FuelPHP 1.6?
Indeed, and that's how we do it. The document root switch turned out to be the most easy solution. Any other would involve some part of the application (and the entire framework), which is exactly what you try to avoid when upgrading. A diffe…
Comment by
WanWizard
May 2013
permalink
"Cannot redeclare class" when migrating
Class names always have to be unique. The sequence number (that makes the file name unique) is not part of the class name.
Comment by
WanWizard
May 2013
permalink
Problem with migrating auth tables
That link does not exist, so I don't know what the problem is... Note that you need to setup Auth first (i.e. copy the auth.php and the config file for your chosen auth type to app/config) and set them up. The migration files use the config to…
Comment by
WanWizard
May 2013
permalink
integer, not intenger
Probably, most of the Team are non-native English speakers, a typo is easlily made. If you know the pages, please create an issue for them on https://github.com/fuel/docs/issues, or ever better, correct them and send a pull request (and be written …
Comment by
WanWizard
May 2013
permalink
Saving ManyToMany relationships : Is this correct?
You could fetch them all in one go using Model_List_Location::query()->where('id', 'IN', Input::post('list_locations'))->get(); assuming that you have validated the input first.
Comment by
WanWizard
May 2013
permalink
Using ORM in migration
ORM Models should be available without problems, like any other classes. Providing the Orm package is loaded, and the model class is loadable (if in a module you might have to load that module too). We do everything related to upgrades in migration…
Comment by
WanWizard
May 2013
permalink
Fuel Nested Sets
I've committed our version a few days ago: https://github.com/fuel/orm/blob/1.7/develop/classes/model/nestedset.php I've implemented your delete() behaviour too, a standard delete only deletes the node (and shifts the rest up), a delete_t…
Comment by
WanWizard
May 2013
permalink
What's the best way to upgrade a production server to FuelPHP 1.6?
It all depends on your environment. In our case, our production servers don't have outgoing internet access at all, so running a git operation (to a github repository) or a composer update is out of the question. So in our application reposit…
Comment by
WanWizard
May 2013
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,368
Last Active
9:34AM
Roles
Administrator