This might be a little to server focused, but I hope someone can help.
I have a PHP CodeIgniter application that I am trying to set up to have the configuration files (like application/config/database.php) set on the server (or local computer) so they are not in github (so database password isn't tracked) and it makes everything easier.
So I have it working perfectly on local host, basically it goes back to:
/path_before_httpdocs/config/development/config.php
but on the server I have the folder structure set up, but I get this error:
Warning: require(): open_basedir restriction in effect.
File(/var/www/vhosts/mysite.com/subdomains/staging/config/staging/config.php) is not within the allowed path(s):
(/var/www/vhosts/mysite.com/subdomains/staging/httpdocs/:/tmp/:/var/www/vhosts/mysite.com/subdomains/staging/httpsdocs/:/tmp/)
in /home/mysite/staging/deploy/releases/20130312155222/httpdocs/application/config/config.php on line 12
so first thing I did was go to php.ini file and see what it was. It wasn't set, so I set it to the php.ini then restarted httpd. So now if I run phpinfo() i see this:
Directive | Local Value | Master Value
open_basedir | /var/www/vhosts/mysite.com/subdomains/staging/httpdocs/:/tmp/:/var/www/vhosts/mysite.com/subdomains/staging/httpsdocs/:/tmp/ | /var/www/vhosts/mysite.com/subdomains/staging/config/staging/:/tmp/
I still get the error. So next thing I did was try
ini_set('open_basedir', '/var/www/vhosts/mysite.com/subdomains/staging/config/staging/:/tmp/');
this also did not work. So next thing was i just echoed ini_get('open_basedir') and this returned
/var/www/vhosts/mysite.com/subdomains/staging/httpdocs/:/tmp/:/var/www/vhosts/mysite.com/subdomains/staging/httpsdocs/:/tmp/
so it looks like it ignore my php.ini
I tried to follow this article (I am hosted on a DV 4 on mediatemple). Mediatemple support said they could not help me. Does anyone here have any ideas? I can also provide more information if needed.