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
Session update failed, session record recovered using previous id
Ok. Doesn't help us much though. I'm still clueless. I've double checked our live apps, they all use the standard sessions table with the session_id primary key, and none has even a single insert error in the logs. Do you have multip…
Comment by
WanWizard
January 2018
permalink
Upload error
Could be quite possible, I would have to test. All our apps use option 3. Changing it do default however would cause all applications that use 1 or 2 to break as soon as they upgrade, so that is a change we don't do.
Comment by
WanWizard
January 2018
permalink
Session update failed, session record recovered using previous id
The rotation issues happen if you have an app with concurrent requests, for example ajax calls, in combination with having multiple windows open. In this situation it can happen that one call uses session key A which gets rotated to B, while the par…
Comment by
WanWizard
January 2018
permalink
Upload error
Defined and namespaced correctly? Fuel supports three ways of defining your controller class: namespace Module;class Controller_Subfolder_Files extends \Controller_Rest {} or namespace Module\Controller;class Subfolder_Files extends \Controller_Rest…
Comment by
WanWizard
January 2018
permalink
Can tasks be executed from the command line without oil
No. A task is a commandline controller, you can't run it without bootstrapping the framework. What is the problem with using oil? It is just a few lines long frontloader?
Comment by
WanWizard
January 2018
permalink
View from HTML not from file?
We use an extended View class in your apps so we can use a string as a template. It writes it to a temp file in the app tmp directory, and then sets that file as view template. We do this for caching and performance reasons. Alternatively you can pa…
Comment by
WanWizard
January 2018
permalink
Upload error
I would still like to know why the Autoloader doesn't call the _init method. You haven't messed with other autoloaders by any chance, like composers one? Fuel classes aren't compatible with it, Fuel's autoloader must be the firs…
Comment by
WanWizard
January 2018
permalink
New Year wishes
All the best for 2018, everyone!
Comment by
WanWizard
January 2018
permalink
Auth::check() return false after a login success (redirect)
No active session? Or an incorrect session configuration? Auth requires session storage (either in the browser using a cookie or on the server using one of the other backends) to transfer the login state from one request to the next.
Comment by
WanWizard
December 2017
permalink
Use FuelPHP's Email class with Google Apps or Gmail SMTP
That means the certificate store on the server, which holds the list of valid certificates, is out of date. On linux distro's, this is the ca-certificates package. Especially on "stable" distro's like RHEL or CentOS, it can be qu…
Comment by
WanWizard
December 2017
permalink
Can't access assets (redirecting to controller)
Files (any files) are fetched by the webserver, PHP and Fuel don't play a part in that process. So if you don't have any rewrites in place (that would redirect requests to Fuel), not serving assets is a webserver issue. I assume you have c…
Comment by
WanWizard
December 2017
permalink
Get MySQL error code when Exception is thrown
Addressed: https://github.com/fuel/core/commit/9d47bb390352729b410c729364ecec96d7c68b1c getCode() will continue to return the PDO SQLSTATE, a new getDbCode() method will return the underlying driver erorr code, if present. For non-PDO drivers, both …
Comment by
WanWizard
December 2017
permalink
Upload error
That failing controller isn't called Upload by any chance? So that it could be a bug in the autoloader?
Comment by
WanWizard
December 2017
permalink
Get MySQL error code when Exception is thrown
Have been thinking about this, but not sure this is a good idea, without something to keep the original PDO error code. Problem is that 23000 is a standard error, if you would swap MySQL by Oracle, the error will remain the same, so it can be caught…
Comment by
WanWizard
December 2017
permalink
Upload error
Definitely weird! The only thing I can think of is that the class isn't loaded by Fuel's autoloader, but by some other means, as the _init() method is Fuel's way to introduce a constuctor for static classes. Obviously, other loading …
Comment by
WanWizard
December 2017
permalink
Get MySQL error code when Exception is thrown
Thanks, I already see the issue, will look at it later today.
Comment by
WanWizard
December 2017
permalink
Upload error
Another class with the same name?
Comment by
WanWizard
December 2017
permalink
Validate ORM Relating Models
That is not going to be easy, since you can't validate the underlying key because it is only assigned a value when Model_Post is saved (assuming you have cascade_save on the relation). Personally I would consider this a developer error, and not…
Comment by
WanWizard
December 2017
permalink
Upload error
Then you'll have to debug to see why the _init() method in the Upload class doesn't create an Upload instance in static::$upload. You do have the Upload composer package installed?
Comment by
WanWizard
December 2017
permalink
Get MySQL error code when Exception is thrown
Can you not catch the exception, so you can see the backtrace and tell me which statement in which file generated the exception?
Comment by
WanWizard
December 2017
permalink
Get MySQL error code when Exception is thrown
For a query it seems to work fine too: Fuel\Core\Database_Exception [ 1146 ]:SQLSTATE[42S02]: Base table or view not found: 1146 Table 'test.table' doesn't exist with query...
Comment by
WanWizard
December 2017
permalink
Get MySQL error code when Exception is thrown
It looks like it's not very consistently used in the code. For example, if connect failed, it says: Fuel\Core\Database_Exception [ 1044 ]:SQLSTATE[HY000] [1044] Access denied for user '**********'@'localhost' to database …
Comment by
WanWizard
December 2017
permalink
"No changes allowed" when attempting to delete parent model
Do you have database profiling active? Can you see what it is trying to do? Which Fuel version are you on?
Comment by
WanWizard
December 2017
permalink
"No changes allowed" when attempting to delete parent model
I can imagine you getting this error if your self-reference points to itself.
Comment by
WanWizard
December 2017
permalink
Default _root_ route design question
I assume your question is how to test if the request is routable? That is not so easy, and not doable at that point in the framwork flow, as the routes aren't loaded yet. Instead, I would leave the routes.php with the default route: '_…
Comment by
WanWizard
December 2017
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,366
Last Active
April 29
Roles
Administrator