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
Regarding presenter
No, you don't have to. In general, you would use a presenter if your view needs data that is not related to the request itself, is not generated by models, and would clutter the controller. Think for example about:- data lookups for columns in …
Comment by
WanWizard
February 2017
permalink
Source files?
No.
Comment by
WanWizard
February 2017
permalink
about Model_Crud::get_connection
I think both are wrong, because the docs imply it's an object and the code implies it's a string. But technically, it can be both, you have to define the connection in your model, and both the database profile name (as a string) and a Data…
Comment by
WanWizard
February 2017
permalink
Locale problems on Windows
So set the locale in your config? Windows uses non-standard locale strings, and Windows doesn't support UTF-8 in itself, so you'll always have to do something when working on Windows. See https://fuelphp.com/docs/general/configuration.html…
Comment by
WanWizard
February 2017
permalink
orm cache
Example of caching a result (from the Auth ACL driver): // get the list of valid rolestry{ static::$_valid_roles = \Cache::get(\Config::get('ormauth.cache_prefix', 'auth').'.roles');}catch (\CacheNotFoundException $e…
Comment by
WanWizard
February 2017
permalink
Sessions blocks other requests
Fuel's own session drivers are non blocking (but may have concurrency issues when updating the session), PHP's own session handling is blocking (for exactly that reason). session_write_close() is a PHP statement, which Fuel doesn't us…
Comment by
WanWizard
February 2017
permalink
orm cache
You mean cache the result of a query?
Comment by
WanWizard
February 2017
permalink
Is DBUtil::create_database() working?
I do see now that `DEV` and DEFAULT don't have a space in between, so if you don't have any delimiters defined, that could become DEVDEFAULT. I have pushed a fix for that: https://github.com/fuel/core/commit/d25fe8dbaa6cbf7a2f78985021e8c4a…
Comment by
WanWizard
February 2017
permalink
Is DBUtil::create_database() working?
Good question. First remark: "utf8_general_ci" is a collation, not a charset. If I use your code, I get Fuel\Core\Database_Exception [ 42000 ]:SQLSTATE[42000]: Syntax error or access violation: 1115 Unknown character set: 'utf8_genera…
Comment by
WanWizard
February 2017
permalink
How to upload , resize and save an image
Note that this is a 6 your old thread, with code from Fuel v1.1 that no longer works.
Comment by
WanWizard
January 2017
permalink
error: Call to undefined method Fuel\Core\Image::factory()
What goes in there or not is not a problem. Your code uses Image::factory(), but the Image class does not contain a method called "factory", which is why you have this error. You have an error in your code, not your config.
Comment by
WanWizard
January 2017
permalink
error: Call to undefined method Fuel\Core\Image::factory()
What part of "that method does not exist" did you not understand? You get the same error if you use Image::somerandommethodthatdoesnotexist();
Comment by
WanWizard
January 2017
permalink
error: Call to undefined method Fuel\Core\Image::factory()
As the error says, there is no such method. See the docs: http://fuelphp.com/docs/classes/image.html
Comment by
WanWizard
January 2017
permalink
Error Oil in Windows 10
I'd assumed that was ok, given the error message. Otherwise you would have seen something like "executable not found" or so (disclaimer: not a windows user ;-)
Comment by
WanWizard
January 2017
permalink
query in DB::select
The git history? You only have that directory if you have a local repository.
Comment by
WanWizard
January 2017
permalink
query in DB::select
A sub-query is indeed just a second query object. This works both in DB and ORM.
Comment by
WanWizard
January 2017
permalink
Query_Bulder_Select: How to join using bracket "()"
Solution committed to 1.9-dev. $db = \DB::select() ->from('a_table') ->join('b_table') ->on('a_table.user_id','=','b_table.id') ->…
Comment by
WanWizard
January 2017
permalink
Twig Autoloader not found
Lol, these things happen.
Comment by
WanWizard
January 2017
permalink
Twig Autoloader not found
Use http://fuelphp.com/docs/classes/view.html#/method_set_global
Comment by
WanWizard
January 2017
permalink
Session update failed, session record recovered using previous id
The warning means that you did a request with an old session cookie, while another request (second open Window?) had rotated the session id. For the session data, it means you have a concurrency issue, the other request may have updated the session…
Comment by
WanWizard
January 2017
permalink
Error Oil in Windows 10
You have to do that in the installation root of your project, the "oil" file needs to be in the current directory.
Comment by
WanWizard
January 2017
permalink
How to generate and send csrf token to controller via ajax post
If you are using standard templates, you have to explicitly pass variables on, unless they were set on the View as "global". See http://fuelphp.com/forums/discussion/comment/21096#Comment_21096
Comment by
WanWizard
January 2017
permalink
How to generate and send csrf token to controller via ajax post
I have to say I don't know, I've never used Twig myself.
Comment by
WanWizard
January 2017
permalink
How to generate and send csrf token to controller via ajax post
That config would throw a HttpBadRequestException when the validation failed, which you should be able to find back in the application log files. You might want to debug Security::check_token(), and see if static::$csrf_token_key contains "fue…
Comment by
WanWizard
January 2017
permalink
Database class not working with PostgreSQL
What you can do is have your default db.php, with the correct default settings, in app/config, and then write a db.php to app/config/production with only the changes to the default (assuming your app runs in production mode, which it should ;)). Th…
Comment by
WanWizard
January 2017
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,367
Last Active
May 4
Roles
Administrator