0

I am experiencing an error like the one below. Website works well on local but error occurs when uploading to hosting. Thank you very much!

A PHP Error was encountered
Severity: Warning

Message: is_dir(): open_basedir restriction in effect. File(/var/lib/php/session) is not within the allowed path(s): (/var/www/vhosts/my-website/:/tmp/)

Filename: drivers/Session_files_driver.php

Line Number: 134

Backtrace:

File: /var/www/vhosts/my-website/httpdocs/application/controllers/Trangchu.php
Line: 7
Function: __construct

File: /var/www/vhosts/my-website/httpdocs/index.php
Line: 315
Function: require_once
Hasta Dhana
  • 4,699
  • 7
  • 17
  • 26
  • There is a big thread about this [here on SO](https://stackoverflow.com/questions/1846882/open-basedir-restriction-in-effect-file-is-not-within-the-allowed-paths) – codedge May 19 '20 at 07:26

1 Answers1

0

Log with SSH on your host server and write this command:

chmod 755 -R /var/www/vhosts //and push enter
stefo91
  • 618
  • 6
  • 16