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
Forge multiple Simpleauth instances with diffrent configs/db tables.
No, you can only use it once. It is not designed to be used like that, it has way to many hardcoded dependencies. You can make a copy of the Simpleauth driver (in app/classes), rename it, change all references to 'simpleauth' to something…
Comment by
WanWizard
December 2013
permalink
How to setup routes for URL's with traditional get parameters
You can not route on GET variables, only on URI segments. Fuel hasn't been designed to work with GET variables, the router doesn't even see that, it only sees the URL. It uses URI segments for everything (including parameters), although ob…
Comment by
WanWizard
December 2013
permalink
MySQL Connection Errors
interactive_timeout : interactive time out for mysql shell sessions in seconds like mysqldump or mysql command line tools. wait_timeout” : the amount of seconds during inactivity that MySQL will wait before it will close a connection on a non-i…
Comment by
WanWizard
December 2013
permalink
MySQL Connection Errors
You get this error because of a timeout, either on the PHP side, the network level (only applicable if MySQL is not running on the same server as the application), or in the MySQL engine itself. For PHP: - check the mysql.connect_timeout in your ph…
Comment by
WanWizard
December 2013
permalink
Ordering many_to_many relation
Easier than i thought, a permanent solution was implemented about 9 months ago. See the docs, http://docs.fuelphp.com/packages/orm/relations/many_many.html, "Ordering on a column in the through table"...
Comment by
WanWizard
December 2013
permalink
PDO connection, list_columns() returned data
Yes, the v2 ORM isn't finished yet.
Comment by
WanWizard
December 2013
permalink
Ordering many_to_many relation
You can order on related fields without problems, just prefix the fieldname with the relation name: $result = Model_Category::query()->related('article')->order_by('article.author', 'ASC')->get(); Or do you m…
Comment by
WanWizard
December 2013
permalink
PDO connection, list_columns() returned data
The current DB layer was ported from Kohana some three years ago, and is driver specific, instead of platform specific. So instead of having a MySQL, MSSQL, DB2 etc driver (that may or may not use PDO underneath), we have specific drivers directly …
Comment by
WanWizard
December 2013
permalink
Best way to test the Upload class?
File uploads are notoriously difficult to unit test. I don't know how you fake the upload, Upload only expects data in $_FILES. You can fake a lot with just adding entries to $_FILES, but that will fail when you call save(), as PHP will not a…
Comment by
WanWizard
December 2013
permalink
ACL Implementation
Simpleauth uses a config file. Default config files are provided in the package. You need to copy the auth.php config file to app/config, and configure it for simpleauth. Then copy the simpleauth.php to app/config too. In there you'll find exa…
Comment by
WanWizard
December 2013
permalink
FuelPHP 2.0 F.A
Thanks! Not there yet, but things are coming along nicely. Docs is high on the list, we're currently finalizing a new docs design, we really want something better then the current static HTML, which is very hard to maintain.
Comment by
WanWizard
December 2013
permalink
Assets being rendered 3 times (except the first one)
You're welcome! Happy coding! :-)
Comment by
WanWizard
December 2013
permalink
Assets being rendered 3 times (except the first one)
Nothing wrong with this controller, so I guess it's the template that gets rendered three times as well. If you are on 1.7 (not 1.7.1), or you have upgraded from 1.7 but haven't checked your index.php, it could be caused by a bug in there…
Comment by
WanWizard
December 2013
permalink
Assets being rendered 3 times (except the first one)
Start by debugging your rendering process. Make sure you have all logging enabled in your config (set it to L_ALL), then use something like in your views and templates. Make a page request, and check the logs, so you know whether or not you have…
Comment by
WanWizard
December 2013
permalink
HasMany - Unset related objects
Ah, ok. There is a many to many relation between Role and Permission, and between Group and Permission, which uses Grouppermission and Rolepermission as join table. So when you disconnect a permission, you have to use role->permission or group…
Comment by
WanWizard
December 2013
permalink
Assets being rendered 3 times (except the first one)
This shouldn't happen, so something is definitely wrong. The only reason I can think of is if that View is rendered multiple times for some reason. But that doesn't explain why the first one isn't repeated. Guess some debugging is n…
Comment by
WanWizard
December 2013
permalink
ACL Implementation
Assuming you use Auth, the code itself is pretty simple, if you want to go for access lists based on controller/actions: if ( ! \Auth::has_access('sales.sell')) { \\ handle your 403 error here, like display a message, redirect to a 40…
Comment by
WanWizard
December 2013
permalink
Problem with ORM Auth User Permissions
Hmm... I'll run some tests...
Comment by
WanWizard
December 2013
permalink
HasMany - Unset related objects
That doesn't execute anything, unless you add a get() to it. I meant the ORM is only aware of relations loaded from the database, it doesn't know what's in the database if you haven't queried it. There is a difference between d…
Comment by
WanWizard
December 2013
permalink
HasMany - Unset related objects
You need to get them first, otherwise the ORM doesn't know they exist, and can't determine the delta (what to delete and what was newly added).
Comment by
WanWizard
December 2013
permalink
Problem with ORM Auth User Permissions
I'm running 1.8/develop, which is virtually the same as 1.7.1, and I haven't seen this behaviour. I'll try to setup some tests, this is specific about permissions directly assigned to a specific user? Or do you have the same issue if…
Comment by
WanWizard
December 2013
permalink
Virtual Host Setup
That is not needed if you point your DocumentRoot to the public folder, like in your "tutorial" example. This is the standard FuelPHP design. This will ensure the index.php is in the document root of your website, and all your code is ou…
Comment by
WanWizard
December 2013
permalink
Virtual Host Setup
That is an apache virtual host definition, which has to go into your apache config. I personally use separate config files for that. In my /etc/httpd/conf/httpd.conf I have as last line: include /etc/httpd/vhosts/*.vhost Then in this directory I …
Comment by
WanWizard
December 2013
permalink
Problem with ORM Auth User Permissions
Which Fuel version are you on? Sure the Auth package has the same version?
Comment by
WanWizard
December 2013
permalink
Correct approach for a 'base' controller ?
Interesting, we use a similar setup, with Widget controllers returning theme partials (or not) via HMVC.
Comment by
WanWizard
December 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,389
Last Active
12:48AM
Roles
Administrator