cancel
Showing results for 
Search instead for 
Did you mean: 

Failed to set ini option session.use_only_cookies

SOLVED

Re: Failed to set ini option session.use_only_cookies

my /env.php

file the code is 

 

'session' => [
'save' => 'files'
],

Re: Failed to set ini option session.use_only_cookies

Hello @ahmed_alhammadi 

 

You will require to edit this file - /public_html/m2/app/etc/env.php
 
You can replace your code with below code :
 
array ( 'save' => 'files', 'save_path' => '/tmp', )
Then check !
 
if issue solved,Click Kudos & Accept as Solution

Re: Failed to set ini option session.use_only_cookies

now showing me this 

 

This page isn’t working

is currently unable to handle this request.

HTTP ERROR 500

Re: Failed to set ini option session.use_only_cookies

Hello @ahmed_alhammadi 

 

500 internal server error - that means you have issue with your syntax

 

From the app/boostrap.php file

 

#ini_set('display_errors', 1);

 

Remove # from the above line - and you will able to see exact error on the browser

 


Hope it helps!

if issue solved,Click Kudos & Accept as Solution

Re: Failed to set ini option session.use_only_cookies

Parse error: syntax error, unexpected ''cache_types'' (T_CONSTANT_ENCAPSED_STRING), expecting ']' in /home/a7med/public_html/m2/app/etc/env.php on line 30

Re: Failed to set ini option session.use_only_cookies

Hello @ahmed_alhammadi 

 

Yes, its syntax error - so kindly validate the syntax of env.php file and then check it again

 

somewhere you missed to close the brackets of something

 

 

if issue solved,Click Kudos & Accept as Solution

Re: Failed to set ini option session.use_only_cookies

<?php
return [
'backend' => [
'frontName' => 'ZnAnz854an'
],
'crypt' => [
'key' => '961a950eebd241e82f4fc80ff3689c28'
],
'db' => [
'table_prefix' => '',
'connection' => [
'default' => [
'host' => 'localhost',
'dbname' => 'm40vip',
'username' => 'dxj3ov',
'password' => 'Dw2g8)~~t=z!',
'active' => '1'
]
]
],
'resource' => [
'default_setup' => [
'connection' => 'default'
]
],
'x-frame-options' => 'SAMEORIGIN',
'MAGE_MODE' => 'default',
array ( 'save' => 'files', 'save_path' => '/tmp', )

'cache_types' => 1,
'config' => 1,
'layout' => 1,
'block_html' => 1,
'collections' => 1,
'reflection' => 1,
'db_ddl' => 1,
'compiled_config' => 1,
'eav' => 1,
'customer_notification' => 1,
'config_integration' => 1,
'config_integration_api' => 1,
'full_page' => 1,
'config_webservice' => 1,
'translate' => 1,
'vertex' => 1
],
'install' => [
'date' => 'Wed, 06 Feb 2019 18:12:39 +0000'
]
];

Re: Failed to set ini option session.use_only_cookies

Hi @ahmed_alhammadi 

 

Yes you have syntax issue , kindly replace below code with the your existing env.php file code and make sure you take a backup !

 

<?php
return [
'backend' => [
'frontName' => 'ZnAnz854an'
],
'crypt' => [
'key' => '961a950eebd241e82f4fc80ff3689c28'
],
'db' => [
'table_prefix' => '',
'connection' => [
'default' => [
'host' => 'localhost',
'dbname' => 'm40vip',
'username' => 'dxj3ov',
'password' => 'Dw2g8)~~t=z!',
'active' => '1'
]
]
],
'resource' => [
'default_setup' => [
'connection' => 'default'
]
],
'x-frame-options' => 'SAMEORIGIN',
'MAGE_MODE' => 'default',
array ( 
'save' => 'files', 
'save_path' => '/tmp'
),

'cache_types' => 1,
'config' => 1,
'layout' => 1,
'block_html' => 1,
'collections' => 1,
'reflection' => 1,
'db_ddl' => 1,
'compiled_config' => 1,
'eav' => 1,
'customer_notification' => 1,
'config_integration' => 1,
'config_integration_api' => 1,
'full_page' => 1,
'config_webservice' => 1,
'translate' => 1,
'vertex' => 1
],
'install' => [
'date' => 'Wed, 06 Feb 2019 18:12:39 +0000'
]
];
if issue solved,Click Kudos & Accept as Solution

Re: Failed to set ini option session.use_only_cookies

Parse error: syntax error, unexpected ',', expecting ';' in /home/a7med/public_html/m2/app/etc/env.php on line 49

Re: Failed to set ini option session.use_only_cookies

Hi @ahmed_alhammadi 

 

I think you have removed the database details as well from the env.php !

 

in your env.php just one error - you forgot to add , (comma) after below code :

 

array ( 
'save' => 'files', 
'save_path' => '/tmp'
),

so kindly add , (comma) after this code and rest of the things we need to keep it as it is

 

it been going mashy with code - so do one thing whatever is there in env.php file keep it as it is - just need  to put above code with ending comma

 

Hope it helps !

if issue solved,Click Kudos & Accept as Solution