Click here to Skip to main content
13,145,464 members (93,389 online)
Rate this:
Please Sign up or sign in to vote.
See more:
Im beginner in php language. in my web project i created a filepath.config.ini file which stores all file path in the website directories. for eg.
CLASS1 = bin/myclass1.php
CLASS2 = bin/myclass2.php

and im accessing those path by using:
require $_SERVER['DOCUMENT_ROOT'].'/'.GetfilePath('CLASS1');

in localhost server its working good and giving me path like this

when i upload those file on test server im getting this open_basedir restriction error.
Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/usr/local/apache/htdocs/projectfolder/bin/myclass1.php) is not within the allowed path(s): (/home/:/usr/lib/php:/tmp)

i know we can disable this restriction...but i dont know how to do that :P.
but is it good to use this server DOCUMENT_ROOT ???
or is their any alternate way to use the file path? what you people do to access those file path.
and what happen if i disable the open_basedir restriction? is it secure to do that?
please help me what to do?
Posted 16-Nov-12 21:02pm

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web01 | 2.8.170915.1 | Last Updated 17 Nov 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100