One of our new clients is hosted on a Parallel Plesk system and I need to install Codeigniter into a sub-domain for my project. To do this I need to place files into a directory thats above the web root, but the only issue, is that Plesk blocks access to scripts in all base directories except for /private, /httpdocs & /httpsdocs. I have uploaded my application & system files to /private, but keep getting the following error:
Warning: realpath() [function.realpath]: open_basedir restriction in effect. File(/var/www/vhosts/example.com/private/system) is not within the allowed path(s): (/var/www/vhosts/example.com/httpdocs:/tmp) in /var/www/vhosts/example.com/httpdocs/sub-domains/dms/index.php on line 143
Warning: is_dir() [function.is-dir]: open_basedir restriction in
effect. File(/var/www/vhosts/example.com/private/system/) is not
within the allowed path(s):
(/var/www/vhosts/example.com/httpdocs:/tmp) in
/var/www/vhosts/example.com/httpdocs/sub-domains/dms/index.php on line
152 Your system folder path does not appear to be set correctly.
Please open the following file and correct this: index.php
I can’t upload to the /conf file, so I can’t place a vhost.conf file in there and use that work around. Any ideas?
2
Answers
The solution will depend on version of Plesk your customer is hosted on and whether they have shared hosting account or VPS/dedicated hosting (i.e. they have admin access to Plesk).
In case the version is 10.4 and they are have admin access to Plesk or they are given PHP settings management privileges in their shared hosting account –
click site name and open “PHP Settings” tab, then put appropriate value for “open_basedir” property
For earlier version or for the case no PHP settings management privilege granted, you have to request their hosting provider for the tuning of vhost.conf.
Alternatively, if that is Plesk 10+, you can put site in custom folder. So you make a site in “dir1/dir2” and place in “dir1/” files which should be above docroot.
I have the solution that you’ve wanted. you should change your config file.
(application>config>config.php)
Check your config file and change
sess_save_path
value under Session Variables.BEFORE:
AFTER: