Questions tagged [open-basedir]

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

148 questions
0
votes
1 answer

WP ERROR: Warning: file_exists(): open_basedir restriction in effect. File(core/post-comments) is not within the allowed path(s)

a friend of mine is running a WordPress site and suddenly started getting this error on administrative pages. Warning: file_exists(): open_basedir restriction in effect. File(core/post-comments) is not within the allowed path(s):…
0
votes
2 answers

Acces file from plugin 1 to plugin 2

I've created a working plugin and now I've created a second one. I would like to acces a file that's in the plugin 2 directory, from within the plugin 1 directory. I've tried it by using the below code: require_once…
0
votes
1 answer

Ubuntu. Disable open_basedir and safemode

I am running an Ubuntu 10.04 VPS server with PHP 5.3. I got an error saying that curl does not work with safe mode and open_basedir activated Severity: Warning Message: curl_setopt_array(): CURLOPT_FOLLOWLOCATION cannot be activated when in…
Jonathan Clark
  • 19,726
  • 29
  • 111
  • 175
0
votes
1 answer

Plesk website - PHP open_basedir restriction in effect. File is not within the allowed path

I'm trying to run this code: $img = new Imagick('ttt.jpg'); $quality = $img->getImageCompressionQuality(); echo $quality; I have two websites which have this code and they are running on plesk. This code works fine on one of the websites but on the…
user17027702
0
votes
1 answer

Drupal / ImageMagick Error: open_basedir restriction in effect

I'm trying to use the ImageMagick toolkit in Drupal, but keep getting this error: warning: file_exists(): open_basedir restriction in effect. File(/usr/bin/convert) is not within the allowed path(s):…
Scooter5150
  • 157
  • 2
  • 3
  • 14
0
votes
1 answer

PHP: Can't Set Open_basedir

I try to execute: var_dump(ini_set("open_basedir",ini_get("open_basedir"))); with PHP and get false. Apache 2. PHP Version: 5.3.28, it should change it from script, how i read at php.net documentation. Currently open_basedir is…
odd90058
  • 5
  • 4
0
votes
3 answers

Why am I getting php error

I am working on twitter login application my config.php is: //My modification of Abraham's Config specifically for calling variables from the Question2Answer DB ////// First establish base directory for app define('QA_BASE_DIR',…
rohit
  • 1
0
votes
1 answer

file_exists(): open_basedir restriction in effect. File(/usr/bin/ffprobe) is not within the allowed path(s)

after changing the value of open_basedir in php.ini in this path…
majid nazari
  • 440
  • 5
  • 6
0
votes
1 answer

How to disable "ini_set" and "exec" for a particular VirtualHost?

I'm already using open_basedir to restrict a VirtualHost to a certain directory: ServerName test.example.com DocumentRoot /sites/test/www php_admin_value "open_basedir" "/sites/test/www" AllowOverride…
Basj
  • 41,386
  • 99
  • 383
  • 673
0
votes
1 answer

PHP restricted to document root, not file system root

I'm trying to change a text file located inside the /etc/nginx directory via php. I'm using fopen() to do this, however, I cannot access any directory outside my websites root folder. For example, I have my website stored in the absolute path:…
Syllith
  • 189
  • 10
0
votes
0 answers

open_basedir does not seem to set the base path

On my Synology (linux) server I have set-up three Apache2.4 / PHP web environment with the roots being: /volume1/web /volume1/webDevZone /volume1/webTstZone I would like to have a mechanism where I can call something like echo $_SERVER…
QuesnelJ
  • 35
  • 6
0
votes
0 answers

PHP - reach open_basedir maximum security

I run a server for several websites, driven by ISPConfig. There are (for now) 4 php versions installed : 5.6, 7.0, 7.2, 7.3. I would like to maximize the security and I arrived at the open_basedir settings. The directories allowed are…
Gaëtan Trema
  • 51
  • 1
  • 1
0
votes
1 answer

open_basedir loose it interest with a parent folder?

I use open_basedir with the ini_set function. I want to restrict it to a specific directory like this __DIR__ . '/my_directory'; So like this it works! I can't include the parent folder with this include include "../parent/my_file.php"; But if I…
Develogg
  • 134
  • 3
  • 13
0
votes
1 answer

CaBundle open_basedir restriction

We have a project that has been in production for months (all its configs were working fine, no issues - including https and user access). We rewrote part of code under Symfony 4 (no framework was used before that). Everything works perfectly on…
zozo
  • 8,230
  • 19
  • 79
  • 134
0
votes
2 answers

PHP Error Log - why am I getting so many openbase_dir issues?

Firstly, apologies for the vague title. Not sure how best to word it. I'll start off with a copy of my php logs. [25-Jun-2019 12:21:44] WARNING: [pool corrigansni.ivech.co.uk] child 58505 said into stderr: "NOTICE: PHP message: PHP Warning: …
user1530205
  • 302
  • 6
  • 19