Monday, June 14, 2021

PHP Warning: session_start(): Failed to read session data: files (path: /var/cpanel/php/sessions/ea-phpXX)

 After upgrading the server/ PHP version/ Cpanel account transferring to a different server we might face this PHP Warning. It because of the session path-changing issue.

Example before transferring Cpanel account their was the variable session.save_path   might set different

Before session.save_path=/var/cpanel/php/sessions/ea-php56

After you might need to update based on your php version like 7.2 7.3

session.save_path=/var/cpanel/php/sessions/ea-php72

Or 

session.save_path=/var/cpanel/php/sessions/ea-php73

We can change this variable session.save_path path  using changing php ini file or using cpanel 

Login Cpanel  then

MultiPHP INI Editor >> Basic Mode" for each version of PHP installed on the system. However, ensure to revert this value back to "/var/cpanel/php/sessions/ea-php$$"

Here $$ means your current PHP version. example php71 /php72 / php73 / php74 



Saturday, January 2, 2021

Create table and copy from another database

CREATE TABLE destination_db.new_table LIKE source_db.existing_table; INSERT destination_db.new_table SELECT * FROM source_db.existing_table;

Total Pageviews