# |
Apr 1st 2019, 18:03 |
challgren |
https://github.com/cakephp/app/blob/master/config/routes.php#L50 |
# |
Apr 1st 2019, 18:02 |
challgren |
Check your routes.php https://github.com/cakephp/app/blob/master/config/routes.php#L58 |
# |
Apr 1st 2019, 18:02 |
snake-venom |
in beforeFilter but its still throwing error CSRF |
# |
Apr 1st 2019, 18:02 |
snake-venom |
i also added $this->getEventManager()->off($this->Csrf); |
# |
Apr 1st 2019, 18:02 |
challgren |
@snake-venom check your routes.php |
# |
Apr 1st 2019, 18:01 |
snake-venom |
in 3.7 cakephp , i want to disable CSRF for api .. |
# |
Apr 1st 2019, 17:12 |
shoe |
@admad, and of course, that worked like a charm. Thanks again. |
# |
Apr 1st 2019, 17:06 |
shoe |
@admad, I was just about to do that… I WANT remove() to do that… but I totally get it. Thanks! |
# |
Apr 1st 2019, 17:05 |
admad |
@shoe set the cookie with date in the past |
# |
Apr 1st 2019, 17:03 |
shoe |
Unfortunately, that removes it from the $cookies object, but after a refresh the cookie is still there. If anyone knows more about this thing than I do, I’d be much obliged for some insight. |
# |
Apr 1st 2019, 17:02 |
shoe |
```$cookies = $this->request->getCookieCollection(); if ($cookies->has('remember_me')) { $cookies = $cookies->remove('remember_me'); } $this->request = $this->request->withCookieCollection($cookies);``` |
# |
Apr 1st 2019, 17:02 |
shoe |
Re: deleting cookies. I feel like this is what needs to happen |
# |
Apr 1st 2019, 16:57 |
shoe |
Were you simply uploading a single file? Sounded like you were uploading multiples in a single request |
# |
Apr 1st 2019, 16:48 |
birdy247 |
@shoe that says max files per single request |
# |
Apr 1st 2019, 16:40 |
shoe |
Probably need to change max_file_uploads in php.ini |
# |
Apr 1st 2019, 16:37 |
birdy247 |
any ideas what would cause this? |
# |
Apr 1st 2019, 16:36 |
birdy247 |
fine* |
# |
Apr 1st 2019, 16:36 |
birdy247 |
I removed some files, and it was fin |
# |
Apr 1st 2019, 16:36 |
birdy247 |
maxim number of files exceeded |
# |
Apr 1st 2019, 16:35 |
birdy247 |
I recieved a weird error when trying to upload a file to my server |
# |
Apr 1st 2019, 16:12 |
shoe |
I’m new to it, as well, but I think I do need to apply it back to the response/request object. if I debug the cookie after removing it, it’s not there, but in the next load it is. Just like using $cookies->add() you need to apply that back to the request/response for it to take effect. Again, I may be wrong, but that’s what I’m seeing. |
# |
Apr 1st 2019, 16:07 |
berarma |
Slap me if I'm wrong. |
# |
Apr 1st 2019, 16:07 |
berarma |
You don't need to apply that back. You're getting the main instance of CookieCollection for that response object. |
# |
Apr 1st 2019, 16:05 |
berarma |
Ah, sorry. |
# |
Apr 1st 2019, 16:05 |
shoe |
@berarma Because it’s deprecated in 3.7. |
# |
Apr 1st 2019, 16:03 |
berarma |
@shoe: why not use https://book.cakephp.org/3.0/en/controllers/components/cookie.html? |
# |
Apr 1st 2019, 15:54 |
slackebot2 |
how to I apply that back to the cookieCollection? |
# |
Apr 1st 2019, 15:54 |
shoe |
Hello! I’m working with cakePHP 3.7 and using the new CookieCollection from 3.5. I’m successfully adding and reading cookies using: `$cookies = new CookieCollection([$cookie]); $this->response = $this->response->withCookie($cookie);` but I’m having difficulty determining how to remove the cookie. I guessing I need to get the cookie collection using $cookies = $this->response->getCookieCollection(); and then $cookies->remove(‘my_cookie |
# |
Apr 1st 2019, 15:36 |
skor |
ok thanks, its actually two containers and nginx server declarations, looks like a subdir but is a different app. got it figured out thanks again! |
# |
Apr 1st 2019, 15:35 |
admad |
The default skeleton works out of the box from subdirectory too if using Apache |
# |
Apr 1st 2019, 15:28 |
skor |
Hi everyone! im running cake 3.7 in a “subdirectory”, and i cant load the css files, is there a link for recommendations in these cases? thanks |
# |
Apr 1st 2019, 15:00 |
josbeir |
does 3.3 already have dotenv support? |
# |
Apr 1st 2019, 15:00 |
feLiruc |
I think that the internet posts about this are all about plugins, and not real systems |
# |
Apr 1st 2019, 14:59 |
feLiruc |
Hello guys, can anybody help me to configurate Travis-CI in my open source cakephp project, with auto deploy to a VPN? |
# |
Apr 1st 2019, 14:18 |
johnwayne |
And why do we need package for env. vars if `getenv()` is already in php.... |
# |
Apr 1st 2019, 14:14 |
johnwayne |
I am using cakePhp 3.3 version... I will also try with this solution. Thx |
# |
Apr 1st 2019, 14:13 |
berarma |
You aren't doing the same. |
# |
Apr 1st 2019, 14:13 |
berarma |
@johnwayne https://github.com/cakephp/app/blob/fa2b3fbf6bc0c9411bce3ee1556e97a334a583ee/config/bootstrap.php#L56 |
# |
Apr 1st 2019, 14:08 |
johnwayne |
my .env is on the root of project, but each key in .env is null |
# |
Apr 1st 2019, 14:08 |
johnwayne |
@berarma Yes, I have ``` /* * Load an environment local configuration file. * You can use a file like app_local.php to provide local overrides to your * shared configuration. */ Configure::load(CORE_PATH , '.env'); ``` |
# |
Apr 1st 2019, 14:03 |
berarma |
@johnwayne Have you uncommented the related code in config/bootstrap.php |