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
Updating model and its loaded relations with a single nested array
This is the initial get(), so nothing it doesn't even attempt to save. What is $e, in other words, was there an exception caught?
Comment by
WanWizard
March 2015
permalink
Updating model and its loaded relations with a single nested array
Which version of Fuel are you on? It isn't by any chance that you have an issue elsewhere because 'id' is part of the array, and ORM objects don't like their primary key being updated?
Comment by
WanWizard
March 2015
permalink
Updating model and its loaded relations with a single nested array
I don't really understand this error, the ORM sees an updated object, but it doesn't update any fields? set() supports an assoc array as input, so that should at least make sure 'username' got updated. It will ignore 'conta…
Comment by
WanWizard
March 2015
permalink
Invalid param count using parameter in where
I pushed a fix for this (to 1.8/develop): https://github.com/fuel/orm/commit/de31432d652ca355d76ae42cda4a94ec6943cbf5 But there are more issues: ORM does not support bind(), and ORM uses generated table aliases which you have to use to prefix "…
Comment by
WanWizard
March 2015
permalink
Invalid param count using parameter in where
The SQL builder seems to understand it from the looks of it, but the where() method bails out directly if only 1 argument is passed, so it doesn't even get to building the SQL. You could test by disabling the "Invalid param count for wher…
Comment by
WanWizard
March 2015
permalink
Question: FuelPHP global before or middleware
The Uri class isn't of much help here, since that uses the active request to determine the current uri, and at that point there is no request yet. The only way to use the Uri class is to use a base controller (a class all your controllers exte…
Comment by
WanWizard
March 2015
permalink
Invalid param count using parameter in where
Just checked, 1.8/develop also requires at least 2 arguments. It's probably better to run a normal DB query (not sure it has this limitation), and use as_object() if you want ORM objects as a result.
Comment by
WanWizard
March 2015
permalink
Question: FuelPHP global before or middleware
It depends a bit on where and how you want to do it. You could do it in your index.php, if you want to check $_SERVER directly, and use that for redirects. If you want to use Fuel, you can do it in your app bootstrap, after the call to Fuel::init()…
Comment by
WanWizard
March 2015
permalink
Invalid param count using parameter in where
Afaik where() expects 2 or 3 arguments, either "field" and "value", or "field", "operator" and "value". The error you get here is because only 1 argument is passed (hence the invalid param count). 1…
Comment by
WanWizard
March 2015
permalink
upload::save() not working
Ah, yes. Good you've got it fixed. Strange that you didn't get an error message saying that though...
Comment by
WanWizard
March 2015
permalink
upload::save() not working
It could be something that is fixed after the release of 1.7.2, which has been quite some time ago. Fixes are always applied in the current develop branch (now 1.8/develop), and it could be these issues have already been fixed. You create a local 1…
Comment by
WanWizard
March 2015
permalink
upload::save() not working
Can you switch to 1.8/develop and test that?
Comment by
WanWizard
March 2015
permalink
Session cleanup
Session keeps a chain to deal with potential lost sessions due to concurrent requests and id rotation. If a request comes in with an old session id, Fuel can use the chain to find out to which id the session was rotated to.
Comment by
WanWizard
March 2015
permalink
Session cleanup
Yes, you can. If you have enormous amounts of sessions it is even advised to do it manually, as it might have a protential performance hit on the frontend (apache) if gc kicks in. You have to find the balance on when to do it, obviously when using…
Comment by
WanWizard
March 2015
permalink
upload::save() not working
Which Fuel version? Which Upload package version (in your composer.json)?
Comment by
WanWizard
March 2015
permalink
Call to undefined function Fuel\Upload\finfo_open()
You didn't check the requirements (see http://fuelphp.com/docs/requirements.html). Fuel requires the finfo extension. For PHP 5.3+, this extension must be included, and on Linux builds in is. On some Windows builds, you need to enable the dll …
Comment by
WanWizard
March 2015
permalink
Updating model and its loaded relations with a single nested array
The question is what this error means. You clearly don't get a Fuel error, you get a SQL error, so I'm curious what is generated.
Comment by
WanWizard
March 2015
permalink
Remember me doesn't work
lol, that might explain it. ;-) If you update, it's best to go directly to 1.8/develop, it's the most stable version (and about to become the 1.7.3 release).
Comment by
WanWizard
March 2015
permalink
Remember me doesn't work
It's in both the Simpleauth and Ormauth Login drivers.
Comment by
WanWizard
March 2015
permalink
oil tasks
There's a 1.7.3 release in the making (which will be the current 1.8/develop code). Since there is no active development in v1 anymore, in general 1.8/develop is the most stable version, as it contains all bugfixes.
Comment by
WanWizard
March 2015
permalink
oil tasks
Ok, so although Fuel doesn't enable output buffering in CLI mode, something else does. I'd classify that as a bug, perhaps we should explicitly disable it instead of just not enable it. Could you create an issue for this at https://github…
Comment by
WanWizard
March 2015
permalink
oil tasks
The framework does output buffering by default, but it should be switched off when in cli mode. You might have to check if output buffering isn't configured in your php.ini (by default a lot of distro's define a 4096 byte output buffer, …
Comment by
WanWizard
March 2015
permalink
How do I configure db sessions?
Doesn't really matter what you use, I'd only advice not to use cookie based sessions but use a servers-side store. Fuel supports quite a few, and they all have their pro's and con's. Memory based ones (memcached, redis) are fast…
Comment by
WanWizard
March 2015
permalink
Virtual Host Setup
No experience with Novius, but for all FuelPHP apps, the DocumentRoot in your virtualhost definition must point to the folder that contains the frontloader (= index.php by default).
Comment by
WanWizard
March 2015
permalink
Many to Many on same table?
ORM doesn't really care what the underlying tables are. And it generates queries with aliases, so I don't think having a table multiple times in a query is a problem. But you'll know when you try it, setting up the relation only tak…
Comment by
WanWizard
March 2015
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:08PM
Roles
Administrator