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
Can I use the session DB driver for my API
You want the session class to generate keys? Or your want per-API-key session storage?
Comment by
WanWizard
November 2011
permalink
SQL Problem
The environment setting is "test", in lower case. Like this it will not detect it and use "development" instead. Which might be the reason the wrong config is used to connect to your database.
Comment by
WanWizard
November 2011
permalink
View::set_global and encode (parameter #3)
That is exactly the idea. When you don't want encoding for a variable, you have to make a conscious effort to disable it. So you know you are disabling security for that variable. Globally disabling it is a very bad idea. Instead, utilize the …
Comment by
WanWizard
November 2011
permalink
Native session handler
The only part of native sessions that could be usable is the backend, which doesn't have any advantage over the current file driver. FuelPHP is not going to use PHP native sessions cookie management. It is insecure. Period. FuelPHP is also not…
Comment by
WanWizard
November 2011
permalink
SQL Problem
The MySQL and MySQLi drivers are no PDO drivers, but native drivers. They therefore don't use the dsn, but require seperate fields: Fuel::DEVELOPMENT => array( 'type' => 'mysqli', 'connection' =&…
Comment by
WanWizard
November 2011
permalink
Native session handler
From a security point of view, I strongly disagree with you. PHP does an awesome job at providing you with an insecure, and potentionally very insecure session management system. It is the main reason why FuelPHP does not use it. We'll see wha…
Comment by
WanWizard
November 2011
permalink
Using Validation Rules (not from POST)
Correct. The production documentation is always linked to the current official release. Which in turn can be found in the master branch of that release number. The develop branch contains the current development version. Once that is getting ready …
Comment by
WanWizard
November 2011
permalink
Using Validation Rules (not from POST)
1.1 is in feature freeze as of 1.1 RC1. So all modifications are bugfixes, and for that reason 1.1/develop should be more stable than RC1. But as to docs it doesn't matter. /docs is for the current offficial release (1.0.1), and you're on…
Comment by
WanWizard
November 2011
permalink
Using Validation Rules (not from POST)
Please note that the official docs are for the official release, as of now that is 1.0.1. If you're using the develop branch code, you should look at http://fuelphp.com/dev-docs.
Comment by
WanWizard
November 2011
permalink
Using Validation Rules (not from POST)
Don't know which version you're looking at, but 1.1 returns the entire $_GET array when you use Input::get().
Comment by
WanWizard
November 2011
permalink
Autoloading a package
Correct. The only overhead multiple loads introduce is related to the call itself. The load() method will detect that the requested package is already loaded, and will terminate immediately. The package class is a new addition, so not present in th…
Comment by
WanWizard
November 2011
permalink
Autoloading a package
The autoloader doesn't know packages that have not been loaded. For performance reasons it doesn't scan your filesystem to see if it can find something that matches what you are calling, instead you have to tell it ( through the bootstrap…
Comment by
WanWizard
November 2011
permalink
Requesting assets from a view
Correct, that is a side-effect of early rendering, you need to make sure the rendered HTML is not escaped.
Comment by
WanWizard
November 2011
permalink
Trouble in using DB Abstraction Layer
It's going to be a complete rewrite (the current one is a Kohana derivative), so it will not be introduced into a '1.x' branch. For now, the best option is to extend or replace the offending classes by your own, by copying them from …
Comment by
WanWizard
November 2011
permalink
Trouble in using DB Abstraction Layer
We are aware of this. There is a rewrite of the Query Builder on the roadmap for v2.0, which will utilize platform specific drivers to generate the SQL.
Comment by
WanWizard
November 2011
permalink
How do I ignore undefined variable notices? Changes to config file are ignored.
It's one of the reasons we like to enable ALL error messages on development. Note that there's a difference between empty() and isset(). It's not going to be very important for views (as you'd probably need strings there), but y…
Comment by
WanWizard
November 2011
permalink
Requesting assets from a view
FuelPHP utilizes a mechanism called lazy rendering, which means that views are only rendered when they are being converted to string (i.e. when they are echo'd or explicitly cast to string). That indeed means that your page template is rendere…
Comment by
WanWizard
November 2011
permalink
How do I ignore undefined variable notices? Changes to config file are ignored.
Imho that is a very bad programming practice. Either always pass a value, or check if the value exists before using it. The reason for seeing these now is that FuelPHP in development mode enables all error messages. In your previous setup you'…
Comment by
WanWizard
November 2011
permalink
how to different frontend and backend
Depends entirely on your situation. I think most people choose to implement the backend in a module, which makes it very easy to re-use it for other projects. Depending on the design of the frontend, you can either put it entirely in app, or you ca…
Comment by
WanWizard
November 2011
permalink
1.1 and Database Configs
Looked at this again. This can never have worked. The insert() method requires a table name and optionally an array with column names. See http://fuelphp.com/dev-docs/classes/database/db.html#/method_insert. It does not accept key=>value pairs. …
Comment by
WanWizard
November 2011
permalink
1.1 and Database Configs
I can reproduce it. If it worked in 1.0.1, it's a regression error somewhere. Can you file a report about this bug on http://github.com/fuel/core/issues so it can be picked up?
Comment by
WanWizard
November 2011
permalink
Tutorial for using rest controller
FuelPHP only outputs what you put in the response. So it's not a problem for a standard controller method to return json, the only difference is that you'll have to hard-code ajax detection, json encoding/decoding, http headers, etc. This…
Comment by
WanWizard
November 2011
permalink
Magic Method __call in rest controller
A rest controller is a class like any other. No reason why a __call() magic method wouldn't work. If you give us more information on what you try to achieve, maybe we can figure out what the issue is. It is quite possible you don't fully …
Comment by
WanWizard
November 2011
permalink
User Registration Module?
Just look at the SimpleAuth class to get an idea of the supported methods, their function, and the arguments they require (by lack of docs at the moment). As to the email address, you can hide that in the driver. Perform the login procedure with wh…
Comment by
WanWizard
November 2011
permalink
1.1 and Database Configs
1. Is your php installation compiled with mysql support (or are the modules present)? 2. What is the exact statement? 3. That depends. For occasional use, I use the execute() parameter. If I need it throughout a class (or method), I fetch an instan…
Comment by
WanWizard
November 2011
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