Magento 2 Increase Customer Session Time

While customer logged, default session timeout 3600 seconds (60 Minute / 1 Hour).

There are following below steps to increase customer session timout

Solution:

1-Step: By Using Magento 2 Admin

Go to Stores > Settings > Configuration > General > Web > Default Cookie Settings > Cookie Lifetime

By default default session timeout 3600 seconds (60 Minute / 1 Hour), you can change Cookie Lifetime value to any values in seconds

For 1 Hour (3600 Seconds)

For 24 Hour (86400 Seconds)

For 1 Month (2592000 Second)

For 1 Year (31536000 Seconds)

2-Step: By Using SQL Query

INSERT INTO core_config_data (scope, scope_id, path, value) VALUES 
('default', 0, 'web/cookie/cookie_httponly', '1'), 
('default', 0, 'web/cookie/cookie_domain', NULL), 
('default', 0, 'web/cookie/cookie_path', NULL), 
('default', 0, 'web/cookie/cookie_lifetime', '31536000');

Magento 2 All Database Tables [500 & more Tables]


How To Set Multi Shipping Settings In Magento 2


How To Set Origin Shipping in Magento 2


Difference Between Offline Shipping Method and Online Shipping Method


Magento 2 Online Customers Options



How To Apply Customer Group Price of Products in Magento 2



How To Add Customer Groups Dropdown in Magento 2 Admin Form and Grid By UI Component


How To Get all Customers Data in Magento 2


How To Create Customer Order in Magento 2 Admin Panel


Magento 2 Login As Customer Not Enabled


How To Configure Customer Account Sharing Options in Magento 2


Magento 2 Redirect To Customer Dashboard After Login


Which Magento 2 database table store customer shipping and billing address


How To Remove Sales Order Data & Customer Data in Magento 2


Which Magento 2 database table store customer’s Email Data


Which Magento 2 Database Table Store Customer Newsletter Data


Which Magento 2 database table store customer’s shipping and billing address



How To Remove Sales Order Data & Customer Data in Magento 2


Which Magento 2 Database Tables Store Customer Rating


Which Magento 2 Database Tables Store Customer Wishlist Products



Magento 2 Increase Customer Session Time


Which Magento 2 Database Table Store Patches

Magento 2.4 Two Factor Authentication

Once Magento 2.4.x Installation done & try to open admin & facing issue 

"Failed to send the message. Please contact the administrator
You need to configure Two-Factor Authorization in order to proceed to your store's admin area
An Email was sent to you with further instructions"

Solution:

To disable Two Factor Authentication on localhost/dev server.

Execute CLI Command as below

php bin/magento module:disable Magento_TwoFactorAuth

or,

Open app/etc/config.php and change value for ‘Magento_TwoFactorAuth’ to 0

Finally, Magento 2.4.x Two Factor Authentication Admin Login issue has been resolved & you can successfully Login in Magento 2.4.x Admin

In PatchApplier.php line 170: Unable to apply data patch Magento\Theme\Setup\Patch\Data\RegisterThemes for module Magento_Theme. Original exception message: Wrong file In Gd2.php line 64:

When installing Magento 2.4 & getting below error

In PatchApplier.php line 170:

Unable to apply data patch Magento\Theme\Setup\Patch\Data\RegisterThemes for module Magento_Theme. Original exception message: Wrong file

In Gd2.php line 64:

Wrong file

Error format as below

Solution: Find validateURLScheme function in vendor\magento\framework\Image\Adapter\Gd2.php file. at line 96. Replace function with this: !file_exists($filename)

Replace existing validateURLScheme function with modified validateURLScheme function as per below code

private function validateURLScheme(string $filename) : bool
  {
      $allowed_schemes = ['ftp', 'ftps', 'http', 'https'];
      $url = parse_url($filename);
      if ($url && isset($url['scheme']) && !in_array($url['scheme'], $allowed_schemes) && !file_exists($filename)) {
          return false;
      }

      return true;
  }

Finally, Magento 2.4 or 2.4.x Installation will be completed 100% after above changes

Other Important Magento 2.x Link

MAGENTO 2.4.5 released on 9th August, 2022 & Its Features


Magento 2.3 To Magento 2.4.5 Compatibility For PHP, MYSQL, Composer, Apache etc


Magento 2.4.3-p1 Installation Steps


Magento 2.4.3 Installation Steps


Magento 2.4.3 Features


Magento 2.4.3 – p1 Features


Magento 2.4 Two Factor Authentication


Magento 2.4.1 Features


Magento 2.4 Features


Magento 2.4 Installation


Magento 2.2, Magento 2.3, Magento2.4 Installation Issue on Windows 10, XAMPP


Magento 2 Installation at 51% Error: (Wrong file in Gd2.php:64) Module ‘Magento_Theme’


How To Upgrade Magento 2.4 To Magento 2.4.3 Enterprise-Edition / Commerce Cloud Edition


How To Upgrade Magento 2.4 To Magento 2.4.3 community-edition

Differentiate Between Apache and NGINX

ApacheNGINX
1FounderApache, an open-source Web server created by American software developer Robert McCool. Apache was released in 1995.
NGINX source code is written in the C programming language by Kernighan and Ritchie and maintains a consistent style
,released in 2005
released by Russian developer Igor Sysoev
2Running ByApache is running by ASFNGINX running by NGINX
3Designed ApproachApache based on
Process driven approach
NGINX based on
Event driven approach
4Concurrent OperationApache cannot handle 10k concurrent connections simultaneouslyNginx can handle 10k concurrent connections simultaneously
5Htaccess SupportApache Supports htaccessNginx does not support htaccess
6Static Content OperationApache performs
Slow operation in displaying static content & consumes more memory.
Nginx 2.5 times faster than Apache according to a benchmark test performed by running up to 1,000 simultaneous connections & display content
7MemoryApache consumed more memory to  perform operationNGINX faster and consumed less memory to perform operation
8OS SupportsApache Supports operating systems such as UNIX, Linux or BSD and Microsoft WindowsNGINX Supports operating systems such as UNIX, Linux or BSD but in case  of Microsoft Windows , It is not upto mark.
9Dynamic Content OperationApache performs faster Performance for dynamic contentNGINX does not perform good Performance for dynamic content, these content must be complied by core software.
10SecurityApache provides
excellent security
NGINX provides more excellent security
11Web ServerApache supports web server onlyNGINX supports web server as well as Reverse Proxy
12Availability / Open SourceApache fully Open Source
Apache software is always available for download free of charge from the ASF
NGINX availability as NGINX [open source] & NGINX PLUS a high-performance web server, a powerful front-end load balancer and a highly-scalable accelerating cache to create the ideal end-to-end platform
13Video StreamingNot Best for Video StreamingBest for Video Streaming as Netflix’s online video streaming service has grown to serve over 50 million subscribers in 40 countries
14Open Source / PaidApache software is always available for download free of charge from the ASFNGINX is Open Source , that is availability free while NGINX PLUS Starting at $2500 per year