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
Ormauth
Maybe a better solution: // do we have a user? $loggedin = Auth::check(); if ($loggedin) { $this->current_user = Config::get('auth.driver', 'Simpleauth') == 'Ormauth' ? Model\Auth_User::find_by_username…
Comment by
WanWizard
December 2013
permalink
Ormauth
I think you have run into the problem that the auth config file is loaded in the Auth class init method. But if you get to this if() statement before you have accessed Auth at all, the config file isn't loaded. You can test this by changing …
Comment by
WanWizard
December 2013
permalink
-Arr::merge() - all arguments must be arrays.-
Still not a lot of information, so some guesswork is involved: The framework is attempting to load a config file (which I don't know without a full backtrace), but that config file doesn't return an array.
Comment by
WanWizard
December 2013
permalink
-Arr::merge() - all arguments must be arrays.-
Can you give more information? Which version of FuelPHP are you using? What is the exact error? Which file? Which line number? What is the backtrace? You can make a screenshot of the error and post it somewhere if that is easier.
Comment by
WanWizard
December 2013
permalink
Ormauth
I know you're not on 2.0, it doesn't have either ORM or Auth atm. ;-) I'm clueless. Guess you need to start debugging, start with checking what that Config::get() returns, and try to find out why it does that. It looks like it can&…
Comment by
WanWizard
December 2013
permalink
Implementing a image cropping feature: OutOfBoundsException [ Error ]: Image file does not exist.
load() uses realpath(), so it needs a FQFN, with relative paths the results may be undefined. It's a path/filename you pass in your load() call, no config is involved?
Comment by
WanWizard
December 2013
permalink
throw new HttpNotFoundException error
404 processing happens in your index.php, by catching the exception and forging a new request for your _404_ route. Did you alter your index.php, or using one from an old version of Fuel that you forgot to upgrade?
Comment by
WanWizard
December 2013
permalink
Ormauth
Looks like that Config::get() does not return what is configured. Which Fuel version are you on? I'm thinking about https://github.com/fuel/auth/commit/7894eca8bebfd5b6e95be7fd40dbf8604ebec253, a fix of 6 months ago.
Comment by
WanWizard
December 2013
permalink
Ormauth
It means that if (Config::get('auth.driver', 'Simpleauth') == 'Ormauth') returns false. So what have you configured as auth driver? Not "OrmAuth" by any chance?
Comment by
WanWizard
December 2013
permalink
Ormauth
The base controller contains: // Assign current_user to the instance so controllers can use it if (Config::get('auth.driver', 'Simpleauth') == 'Ormauth') { $this->current_user = A…
Comment by
WanWizard
December 2013
permalink
CSRF Error FuelPHP 1.8
No, it's up to you whether or not you want/need to use it. By default, security.csrf_autoload is false in the config, so it isn't checked.
Comment by
WanWizard
December 2013
permalink
CSRF Error FuelPHP 1.8
I have changed the topic title, and moved the topic, because this has no relation with Ormauth at all. You can only get this if: - there is no csrf value in the posted data - there is a csrf value, but it doesn't match Since you say you have …
Comment by
WanWizard
December 2013
permalink
Best way to test the Upload class?
Upload is part of the Fuel v2 codebase, and we're aiming to provide 100% code coverage for all v2 code. In light of that it would not be needed to run tests on framework code, you may assume that is tested (which currently is not the case yet…
Comment by
WanWizard
December 2013
permalink
MySQL Connection Errors
It could also be that it's not MySQL that is closing the connection, but the operating system (the tcp connect timeout) or a firewall. Do I understand you correctly that you have a farm of identical servers, all connecting to the same database…
Comment by
WanWizard
December 2013
permalink
Implementing a image cropping feature: OutOfBoundsException [ Error ]: Image file does not exist.
load() does an is_file() check on the filename passed, and if that fails, you'll get this exception. You use: $raw->load('/files/'.$img_path);are your files really in the root of your filesystem? Or did you mean a relative path ba…
Comment by
WanWizard
December 2013
permalink
Uncaught ReferenceError: fuel_debug_toggle is not defined
Nope. The javascript function is defined inline, and echo'd out the first time you call dump(). It should be just above the first "
Comment by
WanWizard
December 2013
permalink
Export to Excel
Never had a need for it, but I hear good things about https://github.com/PHPOffice/PHPExcel
Comment by
WanWizard
December 2013
permalink
Assets over HTTPS
And you've got a reply. For others finding this thread in a search: it looks like Amazon uses a reverse proxy or load-balancing system that offloads the SSL, and connects to the backend webserver on http port 80. It does insert the standard X-…
Comment by
WanWizard
December 2013
permalink
Assets over HTTPS
at least it's consistent. ;-) Can you dump $_SERVER? You can sent it to me via PM here or via email "wanwizardfuelphp.com" so I can check where it goes wrong? It should at least be able to pick up port 443...
Comment by
WanWizard
December 2013
permalink
Assets over HTTPS
In 1.5, fuel checks if $_SERVER['HTTPS'] exists, or if $_SERVER['SERVER_PORT'] is 443. And if so, it determines you're an a https connection. Otherwise, it will return 'http'. What kind of server setup do you have…
Comment by
WanWizard
December 2013
permalink
Assets over HTTPS
You can check your version by echoing \Fuel::VERSION. The asset url is defined in the config/asset.php config file. By default it's configured to use the base_url, and if the base_url isn't defined, it will be constructed from the current…
Comment by
WanWizard
December 2013
permalink
Ordering many_to_many relation
You can only do that if you create a model for your join table, it hasn't really been designed for that. Either: - you have a many-to-many with a through table that only contains both foreign keys Or: - you have a one-to-many relation between…
Comment by
WanWizard
December 2013
permalink
Assets over HTTPS
Asset uses the current URI to serve the assets, unless you've defined a hardcoded URL somewhere. If you need to construct a hardcoded URL, you can use Input::protocol(), which will return "http" or "https", depending on the…
Comment by
WanWizard
December 2013
permalink
Ordering many_to_many relation
You can just use the normal order_by(), as in my first reply, but instead of prefixing the column name with a relation name, you prefix it with the name of the through_table as defined in your many-to-many relation definition. Like it's docume…
Comment by
WanWizard
December 2013
permalink
Multiple driver sessions
There is (normally) only one session, so if both drivers use 'username' etc as session variable, one will overwrite the next. We use "drivername.username" in our drivers to avoid this collision.
Comment by
WanWizard
December 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,389
Last Active
5:16PM
Roles
Administrator