阿帕奇的httpdocs以外的符号链接到一个PHP脚本时提供空文件 [英] Apache serves empty file when symlinking to a php script outside of httpdocs

查看:139
本文介绍了阿帕奇的httpdocs以外的符号链接到一个PHP脚本时提供空文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如上所述,httpdocs目录之外的符号链接到一个PHP文件时的Apache / PHP提供一个空文件。但是,如果我改变扩展到html文件被正确担任的HTML文档。这使我相信,它不是一个权限错误,但可能是一些相关的PHP配置(可能的open_basedir会导致这?)或Apache。

As stated above, when symlinking to a php file outside of the httpdocs directory Apache/php serves an empty file. However if I change the extension to html the file is served properly as an html document. This leads me to believe that it is not a permissions error but could be something related to the php configuration (could open_basedir be causing this?) or Apache.

有谁知道这可能是导致这种行为?

Does anyone know what could be causing this behavior?

编辑:对于任何想了解这一点,这个问题是由PHP的open_basedir限制的原因。

For anyone wondering about this, the problem was cause by the php open_basedir restriction.

推荐答案

打开错误报告在PHP和检查你的PHP错误日志。 100%保证你有一个致命的脚本或配置错误。

Turn on error reporting in PHP and check your PHP error log. 100% guaranteed that you had a fatal scripting or configuration error.

这篇关于阿帕奇的httpdocs以外的符号链接到一个PHP脚本时提供空文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆