# open_basedir too strict

- Thread: https://externals.io/message/1613
- Original archive: https://news-web.php.net/php.internals/1613
- Started by Patrick Welche on 2003-05-16T20:08:43+00:00
- Messages: 2
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #1613 — Patrick Welche — 2003-05-16T20:08:43+00:00

URL: https://externals.io/message/1613#1613

This may be a user error rather than an internals.. In php.ini I have

safe_mode = Off   
;open_basedir =
;include_path = ".:/php/includes"

among other things, yet with cvs PHP_4_3 code from May 16 13:48, I get:

[client 127.0.0.1] PHP Warning:  main(): open_basedir restriction in effect. File(../functions/strings.php) is not within the allowed path(s): (.:/usr/local/lib/php) in /usr/src/local/squirrelmail/src/login.php on line 19


I just made main/fopen_wrappers.c:php_check_open_basedir() return 0 always
to get around it..
I was under the impression that with open_basedir commented out, it would
be `NULL` and therefore not "be in effect", otherwise how could you turn it
off?

Cheers,

Patrick

---

## #1614 — Rasmus Lerdorf — 2003-05-16T20:10:24+00:00

URL: https://externals.io/message/1613#1614 · In reply to: #1613

> This may be a user error rather than an internals.. In php.ini I have
> 
> safe_mode = Off   
> ;open_basedir =
> ;include_path = ".:/php/includes"
> 
> among other things, yet with cvs PHP_4_3 code from May 16 13:48, I get:
> 
> [client 127.0.0.1] PHP Warning:  main(): open_basedir restriction in effect. File(../functions/strings.php) is not within the allowed path(s): (.:/usr/local/lib/php) in /usr/src/local/squirrelmail/src/login.php on line 19
> 
> 
> I just made main/fopen_wrappers.c:php_check_open_basedir() return 0 always
> to get around it..
> I was under the impression that with open_basedir commented out, it would
> be `NULL` and therefore not "be in effect", otherwise how could you turn it
> off?

That's correct.  You must be turning it one somewhere else.  Either in 
another ini file or somewhere in your apache .conf files.

-Rasmus
