0

Just came to ddev from full virtual machines and love it. Thanks for developing such a great tool:-)

Setup is ddev on WSL, Ubuntu on top. Drupal 8 and 9.

I am now having weird issues with private files in Drupal9. After some debugging I discovered the following:

PHP realpath() returns:

'/home/name/' for realpath('/home/name')

false for realpath('/home/name/drupal9')

the same for any other directory like /home/name/xxx.

I have no idea where to start to fix this.

Any suggestions?

Many thanks Christophe

rfay
  • 9,963
  • 1
  • 47
  • 89

1 Answers1

1

DDEV-Local uses docker, and you can think of docker containers as separate machines with separately named filesystems.

So your project inside the web container is always mounted at /var/www/html. Even though your code may be at /home/name/something on the host (in WSL2 in this case), it's /var/www/html inside the container. So probably you need to use realpath() on something that's inside the project, as Jonas Eberle points out in the comments.

I hope that helps. If it doesn't, let's continue the conversation.

rfay
  • 9,963
  • 1
  • 47
  • 89
  • 1
    Hello Randy Jonas' and your comments helped me find the right path. It's /var/www/html/web for the root of a Drupal Composer installation. Excellent, thank you very much. Thanks for a great project, It blows my mind :-) – Christophe Galli Mar 17 '21 at 14:00