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
csrf help
I assume you've read http://fuelphp.com/docs/general/security.html#csrf ? It's quite simple actually: - step 1: add a hidden field to your form containing the csrf token - step 2: before processing the form, check if the form contains t…
Comment by
WanWizard
August 2011
permalink
Just began using, possible to get around having "public" in the URL
MAMP in the end is an apache installation like all others. Somewhere you'll have a virtualhost definition for your site, and in that definition a DocumentRoot statement with a path behind it, currently pointing to the web root of your fuel ins…
Comment by
WanWizard
August 2011
permalink
form select issues
Capture the dummy value in your validation or in your controller code, and return a "please select a value" message. You should validate all input before saving it into the database anyway.
Comment by
WanWizard
August 2011
permalink
Error handling question (v.1.0)
You can avoid the notice by using // only clean the buffer if it has any data in it ob_end_length() and ob_end_clean();
Comment by
WanWizard
August 2011
permalink
Just began using, possible to get around having "public" in the URL
As the documentation explains, the setup of Fuel is so that the public folder represents your webserver DOCROOT, and all fuel folder are one level up, outside of the DOCROOT, and inaccessable by the browser. If you don't want that, or you can&…
Comment by
WanWizard
August 2011
permalink
Error handling question (v.1.0)
This is indeed 1.1 only. For 1.0, you could still throw the exception, and capture it in your index.php using a try/catch (see the 1.1 version of the index.php for an example). That way it will make the transition into 1.x easier as well...
Comment by
WanWizard
August 2011
permalink
form select issues
I don't understand what you mean. If you don't provide a pre-select value, your browser is going the select the first option in the dropdown, this is by design. If you don't want that, add a dummy value as first option to the values …
Comment by
WanWizard
August 2011
permalink
form select issues
In the example, 'none' refers the the first element in the values array...
Comment by
WanWizard
August 2011
permalink
global variable not working after update
In general, the Fuel supplied packages follow the core, so if you update the core, update the packages as well. The exec_time/mem_usage is now being dealt with in your public/index.php, so you'll have to update that as well.
Comment by
WanWizard
August 2011
permalink
form select issues
The pre-select value (or array of values in case of a multi-select) is the second parameter of Form::select().
Comment by
WanWizard
August 2011
permalink
fatal error when trying to delete the data
Always try to deal with potentially destructive operations using a POST instead of a GET. And use CSRF to protect the form from being vulnerable from outside attacks. If not possible, make sure the security of your application is such that the link…
Comment by
WanWizard
August 2011
permalink
Error handling question (v.1.0)
hmm... did I miss anything? Ah, change in the Error class. So the route is to define a custom exception that has this method, and then throw it? This seems to work:
Comment by
WanWizard
August 2011
permalink
Upgrading to newest release and Log::info() doesn't write anything to the log now.
Log::info() calls Log::write(). There are only two reasons for that method not to write anything: the log level of your message is below the threshold. For Info to work, the log_threshold in your app/config/config.php file should be set to Fuel::L_…
Comment by
WanWizard
August 2011
permalink
Model not found!
I saw an issue flying by today about case issues in the autoloader, related to models in a module. You might want to update to the develop branch to see if that fixes your issue too.
Comment by
WanWizard
August 2011
permalink
Error handling question (v.1.0)
Hmm... Considering the remark about CI's show_error(), I think the TS wants something that terminates the script, *like* a 404 exception, but with a view of his choice. What you could do is throw new Request404Exception('views/this/that…
Comment by
WanWizard
August 2011
permalink
fatal error when trying to delete the data
This can happen if the error handler itself throws an error. Which version of Fuel are you using? p.s. did you know that code is very dangerous? By changing the 3rd segment of the URI, a user can delete all user records...
Comment by
WanWizard
August 2011
permalink
Error on Windows with EasyPHP
This happens when the PHP commandline utility can't find the database. This happens quite often when using pre-build environments, MAMP on Mac has the same issue, it's mentioned in the docs. Sometimes it's also caused by the webserve…
Comment by
WanWizard
August 2011
permalink
Error handling question (v.1.0)
No, there isn't. But $this->response->body = View::factory('errors/mine'); return; will do the trick quite nicely. Note that CodeIgniter has a pretty straitforward front-to-back flow, so you can easily break out and stop. Fuel…
Comment by
WanWizard
August 2011
permalink
Clearing out query builder objects - new feature?
I haven't really started yet, but it's on the roadmap. It is needed to properly support other SQL dialects than SQL-92, and DBMS platforms other then MySQL.
Comment by
WanWizard
August 2011
permalink
Clearing out query builder objects - new feature?
The QB currently doesn't support modifications to things already set, it can only add new items. For the moment, the only solution is to extend the QB in your application (core/classes/database/query/builder/where.php) and add methods to unset…
Comment by
WanWizard
August 2011
permalink
oil generate scaffolding error
There was a syntax error in the form template, which has been hotfixed last night. See https://github.com/fuel/oil/commit/2375b8b7b906aa8d76f4b18cb78e024151e3e60f. If you download v1.0, or checkout/clone the develop branch, you should get the fixe…
Comment by
WanWizard
July 2011
permalink
Forum readability
Both Scott and Phil are aware of the issues, it's a matter of having time available to fix things...
Comment by
WanWizard
July 2011
permalink
Document Versioning
Moved this topic to the ORM forum. I'm don't have the in-depth knowledge about the observer mechanism to say if it's possible to alter the ORM flow from within an observer (as in skipping the operation, or changing the update to an i…
Comment by
WanWizard
July 2011
permalink
instances for DB like validation?
Currently that is not how the DB system operates. If you use one of the static DB methods, you'll get a Query Builder object returned, which uses a fixed internal data structure to store the elements of your query. Only when you use the execut…
Comment by
WanWizard
July 2011
permalink
Setting session variables
Don't want to use the word desired, but it is consistent. All other method (like for example Config and Cache) use dot notation for retrieval only as well. If you want this behaviour, make a feature request for v1.1.
Comment by
WanWizard
July 2011
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,369
Last Active
10:51AM
Roles
Administrator