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
8243
Activity
How to disable 'routed mode' for modules?
Brillant find! Hadn't even thought of that solution. Happy coding... ;-)
Comment by
WanWizard
September 2014
permalink
How to disable 'routed mode' for modules?
Ok, so that is easy: 'settings/(:segment)(:any)' => '$1/settings$2', So, like in a regex, you can create back references in your routes, where $1 point to the first regex in brackets, and $2 to the second one. This allows yo…
Comment by
WanWizard
September 2014
permalink
How to disable 'routed mode' for modules?
So if I understand it correctly, you have modules each having their own settings controller, but you want it to appear all under the same /settings/... URI structure? So you want to route /settings/modulename/bla/bla to /modulename/settings/bla/bla…
Comment by
WanWizard
September 2014
permalink
simpleauth security questions
I don't agree with that recommendation. A per user salt is to create more randomness to protect against using rainbow tables. The problem is, to be able to use that method of attack, the hacker needs access to the user table. And if that is …
Comment by
WanWizard
September 2014
permalink
Admin scaffold // multiple forms
Yes, sure, that's a typo. You need to fetch the Reponse first, before you can get it's body. What doesn't it do, and what do you want to to do?
Comment by
WanWizard
September 2014
permalink
How to disable 'routed mode' for modules?
I'm a bit confused. How can you route manually without it being HMVC? Are you calling controllers cross-module yourself? This is exactly what Fuel's routing system is designed to do, so I'm completely puzzled why you would have some…
Comment by
WanWizard
September 2014
permalink
Admin scaffold // multiple forms
execute() returns a Response object, you need to extract the data from it: $article_hmvc['data'] = Request::forge('admin/article/edit/')->execute(array('id' => $id))->body(); Since the body is HTML, you can n…
Comment by
WanWizard
September 2014
permalink
FuelPHP's ORM isn't ordering items correctly?
Edit: re-reading your post again, it doesn't seem to be a collating sequence issue, it's simply not ordering at all, so I assume your array syntax is wrong.
Comment by
WanWizard
September 2014
permalink
FuelPHP's ORM isn't ordering items correctly?
Are you using MySQL? And if so, what collating sequence do you use for your table? MySQL as collating sequence with "ci" at the end (like utf8_general_ci), which are "case insensitive". Which means "aaa" and "AAA&…
Comment by
WanWizard
September 2014
permalink
How to disable 'routed mode' for modules?
Eh, well, no, it was meant to be "as opposed to HMVC calls to a module". If you have modules, but you don't want them to be routed to, what exactly do they do? Are they serving HMVC calls only?
Comment by
WanWizard
September 2014
permalink
Admin scaffold // multiple forms
The official answer is "use HMVC". So instead of embedding the view directly, call the method in the target controller that displays and processes the form, have the method return the View (if you're using Theme or Template) and use …
Comment by
WanWizard
September 2014
permalink
Admin scaffold // multiple forms
If you want to do this, you have to make sure the action attribute of the different forms point to the correct controller method. By default it points to the controller that displayed it.
Comment by
WanWizard
September 2014
permalink
Access Fuel classes from Behat Context
Oil is always an option, but since it's a plain SQL table, can't you run a query directly? disclaimer: never used Behat. ;-)
Comment by
WanWizard
September 2014
permalink
simpleauth security questions
You'd have to ask Jelmer, who wrote the original Auth package over 3 years ago. I don't think there was any reasoning behind it. I don't think you have to worry to much about Auth, we made very sure we have followed all OWASP recomme…
Comment by
WanWizard
September 2014
permalink
simpleauth security questions
In short: very. It has been audited and tested by both a US and a Japanese security company. The only issue found was a possibility for a time-based attack (a normal string compare varies slightly in processing time depending how many characters o…
Comment by
WanWizard
September 2014
permalink
Blank White Page after extracting the zip file
And remove eaccelerator... ;-)
Comment by
WanWizard
September 2014
permalink
Blank White Page after extracting the zip file
Ok, so your hoster doesn't allow you to change settings from htaccess. Then you have a problem, the only options left are report the problem to your hoster and hope they will fix it, or change hosters, because this one seems to be crap (nobody…
Comment by
WanWizard
September 2014
permalink
Blank White Page after extracting the zip file
Ah, EAccelerator. That's a piece of antique, and should not be running anymore. You should be able to disable it through cPanel? If you can't, you can try disabling it through the .htacess in the public folder, by adding php_admin_value…
Comment by
WanWizard
September 2014
permalink
Blank White Page after extracting the zip file
FuelPHP is designed so that all code is outside the webservers document root. With low-buget hosting, this can only be achieved by renaming the public folder to public_html, and FTP the installation to the file root of your hosting server. Installi…
Comment by
WanWizard
September 2014
permalink
Caching relational data from ORM
No, it doesn't work that way. From a peek in the code, it seams that the only support for views is to be able to swap a table for a view. So the result of the view will not be hydrated into related objects. If you can work with a flattened r…
Comment by
WanWizard
September 2014
permalink
Caching relational data from ORM
The problem with so much data, is that there's hardly an alternative, because it would mean holding all that data in memory. This query (I hope it's an example!) pulls in all change requests, with all their related pdmdata. Orm models sup…
Comment by
WanWizard
September 2014
permalink
Caching relational data from ORM
Nobody's stopping you from using Cache to cache an Orm object? But the problem may be in the way you access the data. With a filter like that, you get a subset of the entire one-2-many that exists between change_request and pdm_data, which is …
Comment by
WanWizard
September 2014
permalink
Custom observer creates method for model
No, an observer is a triggered event. There is a common misconception about Orm's, and how models (in an MVC context) should be used when using Orm's. Most people assume that since an Orm introduces standard methods on a model, these are…
Comment by
WanWizard
September 2014
permalink
User session Ghosting / Spoofing
No, you can easily extend/override the class, check http://docs.fuelphp.com/general/extending_core.html. Either overload the force_login() method, or create a second method that allows you to do what you want. All you need to do is not generate a n…
Comment by
WanWizard
September 2014
permalink
Lang class with php files
Fuel is designed to have only one active language, normally there is no need to have multiple languages active in the application at the same time. The only possible exception is when you have a "translation" controller, where you allow …
Comment by
WanWizard
September 2014
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,400
Last Active
1:26PM
Roles
Administrator