open_basedir restriction Error with CodeIgniter App in Subdirectory

828 Views Asked by At

I have a CodeIgniter Application for Administration purposes, put in a Subdirectory of the domain.

I get the following error when I update a record and try to clear the cached copy of the page, which resides in the Cache folder in domain root.

My server have Plesk control panel and I have tried modifying the vhost.conf and restarted the server but the problem still stays...

First of all I cannot understand why a php script in a subdirectory cannot access a folder in the root, is this because of CodeIgniter?

Please help... Following is the Error I receive.

A PHP Error was encountered

Severity: Warning

Message: unlink(): open_basedir restriction in effect. File(../../cache/2dd676d5e044a6190d27ccbaf094db7b.html) is not within the allowed path(s): (/var/www/vhosts/xyz.com/httpdocs/:/tmp/)

Filename: models/products_model.php

Line Number: 180
1

There are 1 best solutions below

5
On

do you actually have 'open_basedir' allowed on your server? It can often be turned off - and would generate this sort of error...