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
expected and actual unit test failures
Ah, I see it. The 'id' of the generated HTML is different, and this is probably because you run the tests on an installation that has modified config files. In this case, the form.php config file.
Comment by
WanWizard
February 2013
permalink
expected and actual unit test failures
Just ran the tests on 1.5.2, they run fine too.
Comment by
WanWizard
February 2013
permalink
expected and actual unit test failures
On which version? The tests on 1.6/develop run fine, I run those on a daily basis.
Comment by
WanWizard
February 2013
permalink
Exception thrown without a stack frame in Unknown on line 0
From 1.6/develop you mean? Those are the same fixes as in 1.5.2.
Comment by
WanWizard
February 2013
permalink
How can I pass the current URL as a URI segment?
Correct. I should not try to write code before my morning coffee... :-)
Comment by
WanWizard
February 2013
permalink
How can I pass the current URL as a URI segment?
If the goal is to redirect back to the page you were coming from in base::action_lang(), you can use something like this: $url = '/'; if (isset(\Input::server('HTTP_REFERER')) and strpos(\Input::server('HTTP_REFERER'), …
Comment by
WanWizard
February 2013
permalink
Error when unit testing
The sticky bit will be inherited from the directory for new files. I use something like this to set the rights on a production FuelPHP installation: chown : . -R find . -type d -exec chmod 2750 {} \; find . -type f -exec chmod 2640 {} \; cd fuel\a…
Comment by
WanWizard
February 2013
permalink
Error when unit testing
I personally only work with the group. I give that write rights where needed, make sure both the webserver user and all users that need commandline access are member of that group, and set the group 'sticky' so new files automatically get …
Comment by
WanWizard
February 2013
permalink
Error when unit testing
it is the user that runs the tests. In your case, only the webserver has write access on UID, others only have read access, either through group membership or the world rights.
Comment by
WanWizard
February 2013
permalink
Sometimes an object, sometimes and array
It is an object on a has_one/belongs_to, it is an array of objects if it is a has_many (or part of a many-many).
Comment by
WanWizard
February 2013
permalink
Where clause with ending periods
The Observer_Slug uses Inflector::friendly_title() to generate the slug. And as far as I can see that strips the dot from the string passed, both in ASCII as in UTF-8 mode. So how your slug can contain a dot, I don't know. Which version of Fu…
Comment by
WanWizard
February 2013
permalink
Include a normal class
The autoloader requires a class named "Htmlparser", in a file called APPPATH.'classes/htmlparser.php'. If you have done it like that, I wouldn't know why it didn't work. That works fine here.
Comment by
WanWizard
February 2013
permalink
Include a normal class
Yes, it does. But this class doesn't follow the coding standards rules, which says that classnames MUST be ucfirst(). Also, all filenames in FuelPHP MUST be lower case. If you insist on using this non-standard name, you'll have to tell th…
Comment by
WanWizard
February 2013
permalink
Where clause with ending periods
A dot in the URL is seen as the extension separator, which the Framework strips off. The only way to work around it is to disable 'strip_extensions' in the routing section of your config.php.
Comment by
WanWizard
February 2013
permalink
Sometimes an object, sometimes and array
And your question is?
Comment by
WanWizard
February 2013
permalink
Error when unit testing
It says "permission denied", so something must be wrong in that area...
Comment by
WanWizard
February 2013
permalink
DB Class error ? ('IN' and 'NOT IN')
No, it's a feature. :-) Whenever you pass a string literal where a variable is expected, you have to encapsulate it using DB::expr(); Like so: ->where('id', 'IN', DB::expr('(1,2)')) You can also just pass an …
Comment by
WanWizard
February 2013
permalink
Anyone implement shared sessions between fuel/php and other languages?
As of 1.6, the session cookie only stores the session id, which doesn't have to be encrypted. So if your other apps can access the storage backend you store the sessions in, they can access that directly using the session id.
Comment by
WanWizard
February 2013
permalink
Incorrect output from REST Controller
The jQuery ajax call. You either need to pass the accept type (and not ignore the accept header) to fix it client side, or force the controller to return json server side by setting the 'format' property to 'json'.
Comment by
WanWizard
February 2013
permalink
Anyone implement shared sessions between fuel/php and other languages?
All possible, but not simple. You need the same encrypt/decrypt routines, you need to keys used, etc. You also need access to the backend in case the payload is not in the cookie. I personally wouldn't bother. Instead, I would provide a secure…
Comment by
WanWizard
February 2013
permalink
Sorting + 0
Don't think you can't, as the order_by fieldname in this syntax is an array key. I never use find(), I prefer method chaining.
Comment by
WanWizard
February 2013
permalink
Sorting + 0
You can pass anything as-is to DB by encapsulating whatever you want to pass using DB::expr().
Comment by
WanWizard
February 2013
permalink
Auto AES_ENCRYPT() and AES_DECRYPT solution?
That is what I currently do. I have extended Observer_Typing for this purpose. I'll have a chat with my team to see if we can open source that extension.
Comment by
WanWizard
February 2013
permalink
Routing Param return URI String
Routes are processed in the order in which they are defined. Like this, a URI like "/cards/1989/topps/baseball" will be matched by the first route, 'cards/:year'. Reverse them, always start with your most specific routes.
Comment by
WanWizard
February 2013
permalink
Using FuelPHP with PHP 5.2.6
Maybe they should find a job they are qualified for... :-)
Comment by
WanWizard
February 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,391
Last Active
6:50AM
Roles
Administrator