0

after changing the value of open_basedir in php.ini in this path /usr/local/php73/lib/php.ini to

/home/admin/:/tmp/:/var/tmp/:/opt/alt/php73/usr/share/pear/:/dev/urandom:/usr/local/php73/lib/:/usr/local/php73/lib/:/usr/local/lib/php/:/usr/bin/ffprobe/:/usr/bin/ffmpeg/  

It still does not work and I am trying to show php.ini in browser to check if these changes have been made, I see that it has not been added to the ini configuration.i see the changes for other conf like memory_limit after changing it's values but open_basedir not updated. How can this be fixed?

majid nazari
  • 440
  • 5
  • 6
  • 1
    Are you running this on the webserver? If so what does `phpinfo()` in the browser show for the `php.ini` path? Did you restart webserver? – AbraCadaver Sep 02 '20 at 13:34
  • I use a virtual server and yes, i restarted the server and also restarted the fpm by /bin/systemctl restart php-fpm73.service command. – majid nazari Sep 02 '20 at 14:04

1 Answers1

0

You have to restart your server to see the update of php.ini

  • 1
    yes i restarted the server,and more than 8 hours i try to fix this issue but i can't understand why php.ini not updated – majid nazari Sep 02 '20 at 14:06
  • file_exists(): open_basedir restriction in effect. File(/usr/bin/ffprobe) is not within the allowed path(s) its mean that the file you access not included in open_basedir path. And also in the php.ini file added with ". like if your path is /home/admin/:/tmp/:/dev/urandom:/usr/local/php73/lib/:/usr/local/php73/lib/:/usr/local/lib/php/:/usr/bin/ffprobe/:/usr/bin/ffmpeg/ then added as "/home/admin/:/tmp/:/var/tmp/:/usr/local/php73/lib/:/usr/local/php73/lib/:/usr/local/lib/php/:/usr/bin/ffprobe/:/usr/bin/ffmpeg/". Hope this will resolve the problem. thanks – Ziauddin Robin Sep 02 '20 at 23:36