Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

camunha's avatar

is_dir(): open_basedir restriction in effect

I'm developing web app in windows local pc. I deployed a first time in shared server running windows and it was worked, but now I have deployed second time and return me this error:

is_dir(): open_basedir restriction in effect. File(D:\Proyectos\Miproyecto\resources\views/vendor/notifications) is not within the allowed path(s): (C:/Inetpub/vhosts//clubhuellas.com;C:\Windows\Temp)

"D:\Proyectos\Miproyecto" is local path where I'm developing.

Between two deployment I made "update composer" for install "maatwebsite/excel", maybe this action is the problem?

0 likes
5 replies
camunha's avatar

SOLVE!! Only go to folder bootstrap/cache and rename config.php to anything you want and reload site.

2 likes
waqaspuri's avatar

@camunha Hello i have tried to do but it doesn't help in laravel 9 the error is

ErrorException
is_dir(): open_basedir restriction in effect. File(/web/storage/logs) is not within the allowed path(s): (/var/www/clients/client10/web15/web:/var/www/clients/client10/web15/private:/var/www/clients/client10/web15/tmp:/var/www/my-domain.com/web:/srv/www/my-domain.com/web:/usr/share/php5:/usr/share/php:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/dev/random:/dev/urandom)
1 like
fanievdm's avatar

My problem was solved by adding the folder to my php.ini.

Add open_basedir = "c:;\\devpc\devupdates\2024\08\banks".

Also set the path config\filesystem.php and get the path from there.

'disks' => [ 'network' => [ 'driver' => 'local', 'root' => '\\devpc\devupdates\2024\08\banks', ],

Get the path from filesystem: $path = config('filesystems.disks.network.root');

NB. Replace my devpc details with your information.

1 like

Please or to participate in this conversation.