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
8247
Activity
Oil won't detect migration version
Migrations are tracked in two ways: - the migrations.php config file - the migrations table The table always reflect the current state of your migrations, the config file can be used to control which migrations should run on deployment using the --…
Comment by
WanWizard
May 2014
permalink
Extend/Overrides Shared Module ?
Depends on what you want to override. With that setup, at the module level, a module "news" in APPPATH will be found before one in SHAREDPATH, so this is now you overload modules. If you want to overload a single class of a module, you c…
Comment by
WanWizard
May 2014
permalink
how i get a CSV file downloable with headers?
What is in that variable? You can't stick a "table" in a variable? The name of the table? And how big is this table? Any special requirements to the format of the CSV file?
Comment by
WanWizard
May 2014
permalink
how i get a CSV file downloable with headers?
I'm a bit confused to what you exactly want to do, I read a lot of actions in your question. Start: you have a table with rows of data. -- some interaction in between -- Final result: you want to download this table as a CSV file. Correct? So…
Comment by
WanWizard
May 2014
permalink
index.php display_errors
Agreed. It is not for nothing we have a mechanism in place for all our virtual hosts on all webservers. Unless the site has a custom maintenance page (we also have a standard mechanism for that), you will get this when the site is unavailable: http…
Comment by
WanWizard
May 2014
permalink
Get id from simpleauth?
cool, problem solved then! ;-)
Comment by
WanWizard
May 2014
permalink
index.php display_errors
lol, remove the core folder. Like "I want a warning sign on my car dashboard if someone has removed the engine"... :-) There are several solutions to a maintance page, depending on your environment: The best solution is completely outs…
Comment by
WanWizard
May 2014
permalink
index.php display_errors
Can you give an example (or screenshot). That should not be the case so we need to look into how to prevent that (instead of worked around ;)). Apart from that: ideally your application should have a maintenance mode for these operations, processin…
Comment by
WanWizard
May 2014
permalink
index.php display_errors
No. A Fuel app will never display errors, or divulge any application details, in a production environment. In what situation whould you see an error that isn't handled?
Comment by
WanWizard
May 2014
permalink
"No changes allowed" when attempting to delete parent model
You get a FrozenObject Exception when there is an attempt to modify an object that is being saved or deleted (this is to prevent recursion into relations). Could you swap your ORM install for the 1.8/develop version (just do a pull and checkout if …
Comment by
WanWizard
May 2014
permalink
ORM Memory leak
The ORM caches in memory, on a per-request basis, which is why memory consumption grows with every object created. There is no method to reset the cache, but you can easily add one to your model, or to a base model class if you have one. All you n…
Comment by
WanWizard
May 2014
permalink
Get id from simpleauth?
get_user_id() is the method to use. The docs (http://docs.fuelphp.com/packages/auth/simpleauth/usage.html#/method_get_user_id) gives examples of how it works. The question is why your user object doesn't have an 'id' field, as it is …
Comment by
WanWizard
May 2014
permalink
Cache visibility between task & app
Just tried that (using the 1.8/develop codebase), and I can not reproduce it. Action on the oil commandline to show the value is set: [hverton@catwoman] $ php oil console Fuel 1.8-dev - PHP 5.5.12 (cli) (May 3 2014 07:09:18) [Linux] >>> …
Comment by
WanWizard
May 2014
permalink
Cache visibility between task & app
memcache or memcached?
Comment by
WanWizard
May 2014
permalink
ORM Memory leak
The ORM caches all objects it sees for re-use, it has never been designed for batch operations. Perhaps this is the issue?
Comment by
WanWizard
May 2014
permalink
HHVM
i know. But no time, and the priorities are elsewhere at the moment.
Comment by
WanWizard
May 2014
permalink
Using lang from database
The structure of the language table, and how to define which table contains your lang strings, is documented in the introduction of the lang class. Selecting the backend for Lang works the same as with all other Fuel classes that have this function…
Comment by
WanWizard
May 2014
permalink
Who to execute this using DB::query() method
p.s. print_r() works too, but the result is unreadable, so I used var_dump instead...
Comment by
WanWizard
May 2014
permalink
Who to execute this using DB::query() method
I used this code to test your query here (using 1.8/develop of the framework core): public function action_union() { $cats = array('COMPUTERS', 'ELECTRICAL', 'MATHEMATICS', 'CHEMISTRY', 'E…
Comment by
WanWizard
May 2014
permalink
Modules
If this is too difficult for you, I don't know where to start. The Modules page in the documentation describes - what (in the context of FuelPHP) a module is - how you configure the framework to use modules - the module namespace - the module …
Comment by
WanWizard
May 2014
permalink
Modules
Modules extend or make the application modules (the frontend), Packages extend the framework (the backend). In a truly modular system, you need both. I have for example a package for pdf generation (https://github.com/WanWizard/fuel-pdf), that I si…
Comment by
WanWizard
May 2014
permalink
Learning FuelPhp
For starters you need to know object oriented PHP. There are tons of books about the subject, but in my experience nothing beats getting your hands dirty and start coding. You'll learn quicker from your mistakes than from books. To be able to …
Comment by
WanWizard
May 2014
permalink
Building library
Namespaces and traits are generic PHP, and not specific to FuelPHP. So you can read anything you like. With regards to external classes, Fuel supports everything Composer can throw at you (just add it to the composer.json and run an update), and yo…
Comment by
WanWizard
May 2014
permalink
Best way for a stylish Form?
You can always use fieldset, the question is what you can automate with it. With forms this complex, you probably have to create the structure manually (like it is done now, and replace the input fields with individual echo $fieldset->build(…
Comment by
WanWizard
May 2014
permalink
how to set conditions to _has_many
You found a bug. I have fixed it in 1.8/develop, the fix will be part of the 1.7.2 release. If you need it you can backport fuel/core/classes/database/query/builder/join.php to 1.7.1 without problems.
Comment by
WanWizard
May 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,454
Last Active
5:33AM
Roles
Administrator