CodeIgniter Forums
Grid Host: open_basedir restriction workaround - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forum-21.html)
+--- Thread: Grid Host: open_basedir restriction workaround (/thread-33022.html)



Grid Host: open_basedir restriction workaround - El Forum - 08-12-2010

[eluser]Dave F[/eluser]
Since I'm using a free shared host and I can't request open_basedir to be deactivated, is it possible to tweak index.php instead to make my site work?


Grid Host: open_basedir restriction workaround - El Forum - 08-12-2010

[eluser]cahva[/eluser]
You must be doing something wrong if you get that error. User isnt supposed to use files outside his/her own directory and they would be mad to disable open_basedir. Error you get would be helpfull.


Grid Host: open_basedir restriction workaround - El Forum - 08-12-2010

[eluser]Dave F[/eluser]
This is an error I encounter when I access one of the pages.

Code:
Warning: is_dir(): open_basedir restriction in effect. File(application) is not within the allowed path(s): (VIRTUAL_DOCUMENT_ROOT) in /www/zymichost.com/q/u/i/quicknotes/htdocs/index.php on line 93 Warning: require_once(system/codeigniter/CodeIgniter.php): failed to open stream: Operation not permitted in /www/zymichost.com/q/u/i/quicknotes/htdocs/index.php on line 115 Fatal error: require_once(): Failed opening required 'system/codeigniter/CodeIgniter.php' (include_path='.:/usr/lib/php') in /www/zymichost.com/q/u/i/quicknotes/htdocs/index.php on line 115

You can check out the site at http://quicknotes.zymichost.com/. The front page works but clicking the links produces the error above.

My site works fine on my local server so I assume it is the host's problem.


Grid Host: open_basedir restriction workaround - El Forum - 08-13-2010

[eluser]cahva[/eluser]
Ok that is strange.. VIRTUAL_DOCUMENT_ROOT should be your own directory(or they have some kind of tweak, dunno).. But I'm baffled how does the home page work without problems as it includes the same files as the other pages. I think it would be best to give that error to your host.


Grid Host: open_basedir restriction workaround - El Forum - 08-14-2010

[eluser]Dave F[/eluser]
I've already posted in their forum.

In my observation, the host has a problem with CI's default URI mapping. For example, http://quicknotes.zymichost.com/ and http://quicknotes.zymichost.com/index.php/user/index both lead to the front page but, unlike the first, the second URL displays the error. The workaround was enabling CI's query strings support. My links should be working now.

Thanks.