# |
Jul 25th 2017, 08:47 |
neon1024 |
At least then you can invalidate the cookie on the server side giving you more control |
# |
Jul 25th 2017, 08:47 |
neon1024 |
I’d probably just include a ‘remember me’ cookie or similar |
# |
Jul 25th 2017, 08:47 |
neon1024 |
I can’t think why you’d want to, it feels like a security risk to me |
# |
Jul 25th 2017, 08:47 |
neon1024 |
No idea, sorry, I don’t do it |
# |
Jul 25th 2017, 08:45 |
tawriq |
@neon1024 rather than renewing the sessions' expiry date, is it possible to extend it by a specified amount ? |
# |
Jul 25th 2017, 08:41 |
littleylv |
this is the path where to write cli-error.log |
# |
Jul 25th 2017, 08:40 |
littleylv |
@johnwayne see `app.php` and check `‘error’ => [ ‘className’ => ‘Cake\Log\Engine\FileLog’, ‘path’ => LOGS,` |
# |
Jul 25th 2017, 08:37 |
neon1024 |
s/must/just |
# |
Jul 25th 2017, 08:37 |
neon1024 |
I must prefer to log them out myself |
# |
Jul 25th 2017, 08:37 |
neon1024 |
Pretty sure that’s what @ionas does to keep his users logged in |
# |
Jul 25th 2017, 08:37 |
neon1024 |
Ajax then I suppose, on a timer, which goes to hit a PHP method which does something to refresh the session |
# |
Jul 25th 2017, 08:36 |
tawriq |
my bad :slightly_smiling_face: |
# |
Jul 25th 2017, 08:36 |
neon1024 |
Well you didn’t stipulate that! ;) |
# |
Jul 25th 2017, 08:36 |
tawriq |
@neon1024 that would effect all sessions. I am trying to change the expiry date of a particular session. |
# |
Jul 25th 2017, 08:34 |
johnwayne |
@littleylv Thats local path from another user, mine is different. He is trying to write log into this path, but I do not know how/where to change/set this path. Logically would be to take always path from current user/server |
# |
Jul 25th 2017, 08:30 |
neon1024 |
Using `ini_set('session.gc_maxlifetime', 3600);` would be my first thought |
# |
Jul 25th 2017, 08:25 |
tawriq |
Hi, I am using php 7.1 and cakephp 3.3.*. Is there an easy way to manipulate a sessions expiry date on the fly ? |
# |
Jul 25th 2017, 08:18 |
littleylv |
so you mean `/Users/chongChong/Documents/Work/myapp/logs/` is your local PC path. But when you run cli in your server, it attempt to write log into this fold? |
# |
Jul 25th 2017, 08:17 |
neon1024 |
Morning everyone |
# |
Jul 25th 2017, 08:09 |
johnwayne |
and localy there is no file like cli-error.log so my question is from where hes getting that path |
# |
Jul 25th 2017, 08:05 |
johnwayne |
@littleylv but that path doesnt exists on server.... its only local |
# |
Jul 25th 2017, 07:53 |
littleylv |
@johnwayne `chmod 777 /Users/chongChong/Documents/Work/myapp/logs/cli-error.log` or just delete it. It may be created by root or someone else but now you are trying to write it by apache |
# |
Jul 25th 2017, 07:46 |
dipesh22 |
$routes->connect('/authenticate', ['controller' => 'Users', 'action' => 'login', 'cors' => [ 'origin' => 'https://UI_PART_URL>', 'methods' => ['POST'], 'headers' => ['Access-Control-Allow-Credentials' = true] ]]); |
# |
Jul 25th 2017, 07:46 |
dipesh22 |
I have used below code for the same |
# |
Jul 25th 2017, 07:45 |
dipesh22 |
But, We are getting an error "Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource" |
# |
Jul 25th 2017, 07:45 |
dipesh22 |
@littleylv I have already used https://github.com/snelg/cakephp-cors |
# |
Jul 25th 2017, 07:44 |
johnwayne |
@littleylv but it is strange that I can see path from local PC on server online |
# |
Jul 25th 2017, 07:33 |
littleylv |
@johnwayne change your file permission with `chmod` |
# |
Jul 25th 2017, 07:31 |
littleylv |
@dipesh22 i am afraid i have no good idea but i searched github and find this https://github.com/snelg/cakephp-cors> . It’s for 3.0-3.2 and <https://github.com/ozee31/cakephp-cors for 3.3+ |
# |
Jul 25th 2017, 07:26 |
johnwayne |
Hi, I have problems with file_put_contents. Files are on server but in warning path pointing to local file. Warning: file_put_contents(/Users/chongChong/Documents/Work/myapp/logs/cli-error.log): failed to open stream: Permission denied in /Users/chongChong/Documents/Work/myapp/vendor/cakephp/cakephp/src/Log/Engine/FileLog.php on line |
# |
Jul 25th 2017, 07:25 |
dipesh22 |
@littleylv Thanks for your time. I have checked this URL in that there is mentioned that it's for 3.2 version. So, what about 3.0 version |
# |
Jul 25th 2017, 07:05 |
littleylv |
@dipesh22 https://book.cakephp.org/3.0/en/controllers/request-response.html#setting-cross-origin-request-headers-cors |
# |
Jul 25th 2017, 06:47 |
sonu_nk |
When i am accessing : http://myurl/api/forms/getforms.json is throwing error, but my http://myurl/api/forms.json is working well.. |
# |
Jul 25th 2017, 06:47 |
sonu_nk |
Error: ApiController could not be found. |
# |
Jul 25th 2017, 06:46 |
sonu_nk |
i am getting error when i am access api url ... https://pastebin.com/5g26RTU5 |
# |
Jul 25th 2017, 06:45 |
dipesh |
I want to use CORS in cakephp 3.0. So, how can I enable CORS? |
# |
Jul 25th 2017, 06:34 |
dipesh22 |
Hello, I am trying to use CORS in cakephp 3.0. So how can I enable it? |
# |
Jul 25th 2017, 05:47 |
Modicrumb |
sweet |
# |
Jul 25th 2017, 05:47 |
Modicrumb |
nevermind, got it handled |
# |
Jul 25th 2017, 05:32 |
Modicrumb |
it's true by default though... |
# |
Jul 25th 2017, 05:31 |
Modicrumb |
ahh i see there is an allowMultipleNulls |