New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Web-Server does not return symlinked assets #33089
Comments
Do these request run through your Symfony application or could this just be a web server configuration issue (Apache for example has options to forbid following symlinks)? |
@xabbuh I'm just using |
Maybe this issue is a bug of php's web server itself. |
Yep. It is not an issue of Symfony's web-server. It's also occurring when using the server directly:
This test.png was a symlink to ../real_image.png. It doesn't matter if the file is located within Document root. If it's a symlink it is not working at all. This could be an issue for PHP itself. |
Created a bug-report on php.net: https://bugs.php.net/bug.php?id=78400 |
Symfony version(s) affected: 4.3.3
Description / How to reproduce
I've created sym-links, pointing from
public/js/...
toassets/js/...
, on Windows.The local webserver returns code 200, when requesting an asset using the browser, but the contents are empty (length: 0).
This happens for files which are directly symlinked as well as files, which are inside a symlinked folder.
The symlinks has been created with symfony/filesystem's
symlink()
method (with admin privileges) and they work perfectly in Windows itself. Also, when I access a sym-linked file with php directly (file_get_contents('public/js/app.js')
) I receive the contents of the origin file in PHP.Just the web-server is not sending the assets' contents. Request:
Response:
Thanks!
The text was updated successfully, but these errors were encountered: