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 use PDO with FuelPHP
Why do you need low-level calls? That sort of defeats the purpose of using a framework. The DB drivers do a fetchAll by default, and return the result encapsulated in a result object. Doing it this way requires 10 lines of code where the framework …
Comment by
WanWizard
March 2013
permalink
FuelPHP 1.5.3 config security uri_filter to convert hyphens to camel-case
Not at the moment. I've created an issue for it so it can be looked at. It is not a good idea to skip duplicate detection, and will make your application very slow (the filter is called hunderds of times in a single request) and may break stuf…
Comment by
WanWizard
March 2013
permalink
phpdocumentor
Not a problem, we do the same for our API docs See http://api.fuelphp.com for the current release version, and http://dev-api.fuelphp.com for the current development version. This is our cron script: cd /data/github/1.6/develop git pull > /dev/…
Comment by
WanWizard
March 2013
permalink
How to disable error reporting in development environment
Error reporting and display is enabled in your index.php. But why you want to disable it is beyond me. You're not interested in errors while you are developing?
Comment by
WanWizard
March 2013
permalink
How to use PDO with FuelPHP
Depends on what you mean with "use PDO with FuelPHP". The DB layer uses PDO by default, so add a platform, database and credential to your /db.php. Job done. Or do you mean something else?
Comment by
WanWizard
March 2013
permalink
FuelPHP 1.5.3 config security uri_filter to convert hyphens to camel-case
Does replacing is_array($config) and \Config::set('security.'.$setting, array_keys(array_flip($config)));by is_array($config) and \Config::set('security.'.$setting, array_unique($config));fix it?
Comment by
WanWizard
March 2013
permalink
Is set_config working with cookie based sessions ?
My applications use two session objects: one that is high-performance (usually memcached) and short-lived, the other is stored in the DB, and long lived. User state is stored in the short lived session, remember-me state in the long lived. This wa…
Comment by
WanWizard
March 2013
permalink
core Upload class - bug correction
Could you tell me what the detected mimetype was? And on which server platform you've encountered it (OS and webserver)? The new 2.0 package (which will be used in 1.6+) will check if the mimetype has the correct format, and if not will defaul…
Comment by
WanWizard
March 2013
permalink
Is set_config working with cookie based sessions ?
Did you check the expiration of the cookie directly after you processed this request? This should work fine, but obviously only on the page where you submit a form that has an input field called 'remember'. On the next page, it will be se…
Comment by
WanWizard
March 2013
permalink
ErrorException [ Error ]: Class 'Log' not found
In 1.5 Log has become a package, which is installed by default, but not enabled. So you'll have to add it to always_load. It's a temporary thing, in 1.6 Log has moved back into the core, as a facade on the Monolog composer package.
Comment by
WanWizard
March 2013
permalink
Fuel folder placing
If you create a docroot first, and then run an install, it's pretty obvious everything is installed in the docroot. The idea is the other way around. You run the install, then create a virtual host and point the docroot of that virtual host to…
Comment by
WanWizard
March 2013
permalink
How to build a 'and'-where query for relation
You can use or_where() instead of where() if you need OR instead of AND. If you want to use database expressions, you need to encapsulate them into DB::expr(), to prevent them from being escaped like a literal.
Comment by
WanWizard
March 2013
permalink
Session not working?
Which FuelPHP version? There's no need to manually create a new session, the only reason for calling create() is if you want to destroy one session, and immediately create a new one. Otherwise, a session is automatically created if there is no…
Comment by
WanWizard
March 2013
permalink
How to build a 'and'-where query for relation
I never use array notation, as it's limited to what it can do. This is an example, you can add multiple WHERE clauses, but only in an AND, not in an OR. With chaining, you can: http://docs.fuelphp.com/packages/orm/crud.html#/complex_wheres
Comment by
WanWizard
March 2013
permalink
Fatal error in FuelPHP installation
Normally it's a server setting, so it should be correct for all PHP applications running on the server. So it's best to fix it in php.ini. If you don't have access to that, the index.php is an alternative.
Comment by
WanWizard
March 2013
permalink
Browscap is closed.
That still means that if there is a hickup when the cache just expired, you'll re-cache the expired cache for another week. I've come up with a better and more transparent solution, which I'll commit in a minute...
Comment by
WanWizard
March 2013
permalink
core Upload class - bug correction
Can you exactly say what the problem was? 1.6 will use the new upload library written for 2.0, I want to make sure it doesn't have the same issue.
Comment by
WanWizard
March 2013
permalink
Fuel form with captcha
Do you have a link to the package?
Comment by
WanWizard
March 2013
permalink
Fuel form with captcha
I don't know simpleacaptcha, so I can't comment on it. But if it's not written for FuelPHP, chances are it will use standard PHP sessions to store the generated captcha. Which is a mechanism you can't use with FuelPHP.
Comment by
WanWizard
March 2013
permalink
Browscap is closed.
It's best to download the browscap file manually and store it locally. Then either use that for Agent, and use cron to update your local file. Or capture the case that the download/update fails, and if so switch to your local backup. That wil…
Comment by
WanWizard
March 2013
permalink
Can I pass controller data to an observer?
What trouble do you have? Maybe I can help? You might want to upgrade to 1.6/develop btw, it's more stable then 1.5 at the moment.
Comment by
WanWizard
March 2013
permalink
Can I pass controller data to an observer?
It creates a tight coupling with your controller, and that's considered bad practice. So I wouldn't use it, but if it works for you...
Comment by
WanWizard
March 2013
permalink
Fatal error in FuelPHP installation
Might also be that you haven't configured date.timezone in your php.ini. You get this message because you get an exception either in the exception handler, or in the shutdown handler. Unfortunately PHP is crap at reporting these errors...
Comment by
WanWizard
March 2013
permalink
ORM order_by being ignored/improperly placed into query
Can you add a ticket for this at https://github.com/fuel/core/issues, with this description?
Comment by
WanWizard
March 2013
permalink
phpdocumentor
To do what?
Comment by
WanWizard
March 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,390
Last Active
5:57AM
Roles
Administrator