Questions tagged [open-basedir]

Setting in PHP.INI limiting whether PHP can access files outside of the specified directory tree.

148 questions
14
votes
3 answers

PHP - a different open_basedir per each virtual host

I've came across on this problem, I have a sever running apache and php. We have many virtual hosts but we've noticed that a potentially malicious user could use his web space to browse other user's files(via a simple php script) and even system…
Lopoc
  • 1,308
  • 5
  • 16
  • 26
9
votes
3 answers

Check if open_basedir restriction is in effect

I'm getting the following warning when using PHPass (http://www.openwall.com/phpass/): open_basedir restriction in effect. File(/dev/urandom) is not within the allowed path(s) Although this is not a big problem (it will fall back on something…
T.S.
  • 1,242
  • 13
  • 22
6
votes
1 answer

PHP open_basedir - to return value?

I want to return the value of open_basedir in a php script.. how can I do it? If value is blank it should echo that is blank.. Thanks!
Adrian M.
  • 7,183
  • 15
  • 46
  • 54
6
votes
2 answers

PHP: open_basedir allowed path

I have a few calls to is_dir on a page. They have always worked no problems. A few days ago, the hosting company upgraded PHP from 5.2 to 5.3. Since then, all my calls to is_dir have resulted in the following error (message): Warning: is_dir():…
Janus Bahs Jacquet
  • 859
  • 1
  • 11
  • 27
4
votes
2 answers

Zend -> Warning: is_readable() [function.is-readable]: open_basedir restriction in effect

I am getting the following warning in my code: Warning: is_readable() [function.is-readable]: open_basedir restriction in effect. File(/usr/share/php/./views/helpers/Doctype.php) is not within the allowed path(s):…
Amir s
  • 136
  • 1
  • 1
  • 9
4
votes
2 answers

file_exists with symlink-ed files?

For our application we need to store files above the root so they can be accessed by the streaming media software. I successfully created a symlink…
niggles
  • 1,010
  • 1
  • 9
  • 21
4
votes
1 answer

Phabricator Arcanist has errors ini_set(): open_basedir restriction in effect. File() is not within the allowed path(s)

I am running the latest Arch Linux I have looked at topics like these: Unlink Fails -> open_basedir issue Warning: unlink() [function.unlink]: open_basedir restriction in effect. File() is not within the allowed path(s): open_basedir restriction in…
vitiral
  • 8,446
  • 8
  • 29
  • 43
4
votes
2 answers

PHP directory error - open_basedir restriction in effect

I've got some PHP code that'll create a new file in a set directory: $target_path = "reports/" . basename($Report_Filename) . ".php"; if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)) { /* code here */ } It was working…
Nick
  • 1,233
  • 13
  • 26
  • 37
4
votes
3 answers

Codeigniter open_basedir_restriction in effect on shared hosting

Severity: Warning Message: mkdir(): open_basedir restriction in effect. File() is not within the allowed path(s): (/home/thelazyppl/:/home/thelazyppl:/tmp:/usr/local/lib/php/) Filename: drivers/Session_files_drivers.php The site's root folder is a…
Karl Wong
  • 594
  • 2
  • 7
  • 23
4
votes
1 answer

Warning, open_basedir restriction in effect caused by trailing path after php file

Let me start by saying I know this is asked a lot. Nothing really answers my issue though. Script kiddies are looking for admin paths by hitting urls like mysite.com/index.php/admin/login The main file is intercepting their request and looking to…
theHarvester
  • 563
  • 1
  • 4
  • 11
4
votes
1 answer

open_basedir restriction in effect Unknown on line 0?

I keep on getting these messages for every page at different times. What does line 0 mean?. Right now i'm using a free domain name from host(sub domain) and i'm using free hosting to test my site. I put this sign->.. down below to replace the real…
Holly
  • 91
  • 1
  • 5
4
votes
3 answers

Joomla tmp folder not writable? or open_basedir troubles?

i'm working on this joomla site and im not able to upload any extension. if i use normal upload method i get JFolder::create: Could not create directory Unable to create destination if i use upload from directory i get Copy failed JInstaller:…
guitarlass
  • 1,587
  • 7
  • 21
  • 45
3
votes
2 answers

Dynamic open_basedir with mod_vhost_alias

I'm using mod_vhost_alias and want to set dynamically open_basedir for each user. Something like php_admin_value open_basedir /var/www/vhosts/%1 But it doesn't work. Because I have a lot of virtual hosts (4000-5000) mod_macro does not suit me. I'm…
ALex_hha
  • 1,345
  • 15
  • 16
3
votes
2 answers

Access main domain files in Subdomain

Lets say i have domain.com and five other subdomains. The subdomains are stored in separate folders from domain.com In domain.com i am going to have 3 folders that i need to access when i am in other subdomains, i'm going to be accesing php, css,…
Peibol
  • 147
  • 4
  • 12
3
votes
0 answers

How can I use open_basedir with php5-fpm & Apache?

I was using open_basedir in each Apache virtual host with mod-php5. php_admin_value open_basedir "/var/www/abc/public_html" Now I have disabled mod_php5 and configured fastcgi and php5-fpm and no longer able to use open_basedir in virtual hosts. I…
Saqib Iqbal
  • 339
  • 5
  • 13
1
2 3
9 10