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
Parser package - share views between Javascript and PHP
No. I wrote "if it has to be developed by us, we will add it to 1.9/dev". ;-) I can add it to the todo list, but no guarantee as to when it will be available. The design philosophy of Fuel is that you keep as much as possible outside the d…
Comment by
WanWizard
July 2017
permalink
Parser package - share views between Javascript and PHP
There isn't currently a Handlebars parser for Fuel, and I don't know of any third-party parser for it. There is a PHP implementation for Handlebars (https://github.com/XaminProject/handlebars.php) so it shouldn't be too difficult to m…
Comment by
WanWizard
July 2017
permalink
log_threshold doesnt work for oil
I also tried to test 1.7, but that doesn't run on PHP 7.1, which I have on my development machine.
Comment by
WanWizard
July 2017
permalink
log_threshold doesnt work for oil
Just run the same test in 1.8: INFO - 2017-07-25 15:59:14 --> Fuel\Core\Request::__construct - Creating a new main Request with URI = ""INFO - 2017-07-25 15:59:14 --> Fuel\Core\Request::execute - CalledINFO - 2017-07-25 15:59:14 --&…
Comment by
WanWizard
July 2017
permalink
log_threshold doesnt work for oil
Ah, yeah. 1.8 doesn't display that. Try this: [wanwizard@catwoman] $ php oil consoleFuel 1.8 - PHP 7.1.7 (cli) (Jul 6 2017 12:10:30) [Linux]>>> \Fuel::$env;development>>> ^C But if you're running 1,8, it might also be a …
Comment by
WanWizard
July 2017
permalink
log_threshold doesnt work for oil
No, that should work. If you start the console: php oil console it will tell you what it thinks the environment is.
Comment by
WanWizard
July 2017
permalink
log_threshold doesnt work for oil
Oil doesn't use the vhost definition. You have to use the command format I gave you. And yes, it is important, the code checks in several places if the environment is set to \Fuel::PRODUCTION, to prevent leakage of sensitive information, and th…
Comment by
WanWizard
July 2017
permalink
log_threshold doesnt work for oil
Then it must be your environment setting.
Comment by
WanWizard
July 2017
permalink
log_threshold doesnt work for oil
btw, where do you set the environment for that call? web1:~# php /var/www/vhosts/app/oil r automerge:error_test will always run in development, not in production mode. You need to use web1:~# env FUEL_ENV=production php /var/www/vhosts/app/o…
Comment by
WanWizard
July 2017
permalink
log_threshold doesnt work for oil
What Fuel version are you on? It just looks like the error handler isn't running at all.
Comment by
WanWizard
July 2017
permalink
log_threshold doesnt work for oil
p.s. config.php: 'errors' => array( // Which errors should we show, but continue execution? You can add the following: // E_NOTICE, E_WARNING, E_DEPRECATED, E_STRICT to mimic PHP's default behaviour // (wh…
Comment by
WanWizard
July 2017
permalink
log_threshold doesnt work for oil
Ok, tried it here: [ /data/www/mvhosts/fuel.catwoman.flexcoders.local/19develop ] [ wanwizard@catwoman] $ FUEL_ENV=production oil r test:error_testtestNotice - Undefined variable: jhajkdh in APPPATH/views/welcome/index.php on line 1 Method used: …
Comment by
WanWizard
July 2017
permalink
log_threshold doesnt work for oil
You could add error_reporting(-1); at the top of the oil script, and see if that changes things? I think that should have been there all along. edit: hmm... That already seems to be there, at least in my test environment it is.
Comment by
WanWizard
July 2017
permalink
log_threshold doesnt work for oil
I've checked the code. It doesn't log anything if error_reporting() returns zero. If it is not zero:- if the error count is equal to the throttle value in the config, it doesn't log but throws an exception- if the error count is lower…
Comment by
WanWizard
July 2017
permalink
log_threshold doesnt work for oil
The configured log_threshold is processed by the Log class when it initializes, no matter where it is used. Are you sure your webserver and oil are using the same environment, and therefore read the same config file? Oil by default runs in developme…
Comment by
WanWizard
July 2017
permalink
Error when change e-mail address in FuelPHP forum
Not very good. Can you check again please?
Comment by
WanWizard
July 2017
permalink
FuelPHP and Varnish Cache
Glad you've got it sorted. I'm not sure you need to extend the Session class, the class is perfectly capable to create multiple session instances, even with different backends. Was there any specific reason for extending it?
Comment by
WanWizard
July 2017
permalink
FuelPHP and Varnish Cache
The downside of this is obviously that you can't use sessions for public pages, and that includes flash variables. So if you use those to pass data from page to page, you have to come up with an alternative solution. You can't have your c…
Comment by
WanWizard
July 2017
permalink
Connection string for package migration
Since migrations aren't designed to work over multiple databases (the state of migrations are tracked in the database itself), the is no feature available to configure this. The state is also tracked in the migrations config file. However, the …
Comment by
WanWizard
July 2017
permalink
Rest Controller Format Request 404
Thanks for the feedback.
Comment by
WanWizard
July 2017
permalink
FuelPHP and Varnish Cache
The only thing you can do is to disable default Session class loading. Then check manually in your base controller if the session cookie exist, and if so, load the Session class and call Auth::check() to set the login status. If it returns false (l…
Comment by
WanWizard
July 2017
permalink
Rest Controller Format Request 404
Turned out to be an easy fix: https://github.com/fuel/oil/commit/b03f3c7b89a420285541797e8fc977f1fcf7409d
Comment by
WanWizard
July 2017
permalink
Rest Controller Format Request 404
Ok, I can reproduce it, which means I can now debug it.
Comment by
WanWizard
July 2017
permalink
Rest Controller Format Request 404
You mean that if you start 'php oil server' as root on port 80, it does work fine? And if you use http://localhost:80/... it fails again? In other words, is it related to the port number, or to the way the commandline server parses the req…
Comment by
WanWizard
July 2017
permalink
Rest Controller Format Request 404
Weird. Good you've got it sorted though.
Comment by
WanWizard
July 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,368
Last Active
9:34AM
Roles
Administrator