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
Multiple Domain Sessions
Use stuff you know in all applications to generate a random key. For example: $shared_key = md5($user->id . \Input::real_ip() . \Input::user_agent() ); Which will generate the same key for this user, as long as it is accessed from the same PC …
Comment by
WanWizard
July 2011
permalink
Responding DB result set in a REST controller
Use as_array() to get the result as an array instead of as objects.
Comment by
WanWizard
July 2011
permalink
Packages & Models
shouldn't -> can't. Packages can't contain URI reachable controllers. A model, like any other piece of code in Fuel, is just a class. On the other hand, packages are positioned as extensions of the core, which makes them unlikely …
Comment by
WanWizard
July 2011
permalink
tags on fuelphp.com
If I look in the HTML for this thread, it says: FUEL - A simple, flexible, community driven PHP5.3 framework. > Forums | General | tags on fuelphp.com
Comment by
WanWizard
July 2011
permalink
Problem with URL rewrite
Just for my curiosity: what do you think that line does?
Comment by
WanWizard
January 2011
permalink
oil migration problem
See http://www.fuelphp.com/forums/topics/view/3072 Typical xAMP installation problem...
Comment by
WanWizard
July 2011
permalink
Oil migration probleme
Check if your php-cli installation can find the correct php.ini (which is used by your webserver). Some distributions (the xAMP's), have a custom PHP installation, so that the default php.ini is either missing on invalid. This is documented: …
Comment by
WanWizard
July 2011
permalink
Assets inside a module
Welcome here! Since your code is (or should be) outside the docroot, you'll have to deal with two locations. I use this stucture for my modules: fuel root - modules - modulename - public - assets - modulename - css - js …
Comment by
WanWizard
July 2011
permalink
error in creating controller
'oil command not found' is an error message from your operating system, telling you it can't find something it can execute with the name 'oil'. As I wrote, oil is not an executable, it's a php script. so you start it …
Comment by
WanWizard
July 2011
permalink
Can we discuss the different ways of fetching models and the security implications for each
The database classes, and that includes the ORM, don't check anything, they pass whatever you provide on to the database in the query, they only escape the value. With the ORM, you can use an observer to implement type checking. A typing obser…
Comment by
WanWizard
July 2011
permalink
Can we discuss the different ways of fetching models and the security implications for each
If you don't pass any parameters to find(), it is identical to query(). find() is basically a shortcut method, that allow you to quickly create common query's in an ORM context, like get the first, the last or all records. Model::find(…
Comment by
WanWizard
July 2011
permalink
error in creating controller
You can only start 'oil' from the commandline that way if you have installed the oil helper as described in the installation instructions in the documentation. If you haven't done that, you have to use 'php oil ...', as des…
Comment by
WanWizard
July 2011
permalink
Problem with URL rewrite
Maybe a rights issue? Or a rewrite issue?
Comment by
WanWizard
January 2011
permalink
Escape data in query
Not documented yet, but you might be able to do $first = 'John'; $last = 'Doe'; $query = DB::query("SELECT * FROM table WHERE first_name = :first AND last_name = :last"); $query->bind(':first', $first)-…
Comment by
WanWizard
July 2011
permalink
Multiple Domain Sessions
You can't keep them in sync, as session id's are randomly generated, and frequently rotated. So you'll have to resort to using a common key, known by both applications. Since you can't store that in the session without altering …
Comment by
WanWizard
July 2011
permalink
Escape data in query
Fuel does not promote writing hard-coded SQL statements. DB:query() is provided because sometimes you have to, but in general you should use the DB class methods to construct a query. It ensures everything is escaped, and allows the query builder t…
Comment by
WanWizard
July 2011
permalink
Best way to display uploaded images
Normally you would exclude your public files from rewriting.
Comment by
WanWizard
July 2011
permalink
Multiple Domain Sessions
I don't think you should refer to this as 'sessions', as you're clearly talking about different sessions. Sessions are bound to a host and/or domain and/or path via the session cookie, and will therefore always be different for…
Comment by
WanWizard
July 2011
permalink
MongoDb
Odd, since it works here on a fresh clone of develop...
Comment by
WanWizard
July 2011
permalink
APPPATH/routes.php
Correct.
Comment by
WanWizard
July 2011
permalink
Deployment using Git
There are only two options: - keep the existing structure and deal with 'public' being in the path (accept it or rewrite it out) - modify the structure so everything is inside 'public' (make public the repo root) I don't …
Comment by
WanWizard
July 2011
permalink
APPPATH/routes.php
Becauses routes are optional. If routes are not present, the autodetect functionality, in which a URI is directly mapped to the classes/controller folder, still works. The only thing that doesn't work is requesting the root, since there's…
Comment by
WanWizard
July 2011
permalink
Docs mess up
It does exist in develop, so many it was introduced recently? The example error looks like a copy-and-paste error, I'll correct that.
Comment by
WanWizard
July 2011
permalink
Changing source of view files
@Frank Bardon, Correct, views are searched for in 'views' folders, so that structure, like many others in a cascading filesystem, is mandatory.
Comment by
WanWizard
July 2011
permalink
MongoDb
Since you're using RC3, you could be suffering from a bug that has been fixed in development, because you're dump (and the error message) mentions MongoDB, not MongoDb. Check fuel/core/bootstrap, and change MongoDB to MongoDb. This has be…
Comment by
WanWizard
July 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,369
Last Active
6:13PM
Roles
Administrator