简体   繁体   English

open_basedir限制有效,但在php.ini中指定了目录*

[英]open_basedir restriction in effect, but the directory *is specified* in php.ini

I'm running php 5.5.12 on Windows Server 2008 with IIS7 and FastCGI. 我在带有IIS7和FastCGI的Windows Server 2008上运行php 5.5.12。

Here's one of the log errors I'm getting: 这是我遇到的日志错误之一:

file_put_contents(): open_basedir restriction in effect. File(C:\Program Files (x86)\Wowza Media Systems\Wowza Streaming Engine 4.0.3\content\vod\test.smil) is not within the allowed path(s): (C:\Program Files (x86)\Wowza Media Systems\Wowza Streaming Engine 4.0.3\content\vod;C:\Windows\TEMP\;E:\webpage;C:\php) in E:\webpage\dev\vod\createsettings.php on line 41

Here's my open_basedir line in php.ini : 这是我在php.iniopen_basedir行:

open_basedir = "C:\Program Files (x86)\Wowza Media Systems\Wowza Streaming Engine 4.0.3\content\vod;C:\Windows\TEMP\;E:\webpage;C:\php"

As you can see, the destination directory is in fact specified in open_basedir , but it's acting as if it's restricted. 如您所见,目标目录实际上是在open_basedir中指定的,但它的作用就好像是受限制的。

Commenting out open_basedir and restarting IIS results in no error and everything works as expected. 注释掉open_basedir并重新启动IIS不会导致任何错误,并且一切正常。

Changing the destination directory to one of the other open directories ( C:\\Windows\\TEMP , for example) also works fine with no errors. 将目标目录更改为其他打开目录之一(例如C:\\Windows\\TEMP )也可以正常工作,没有错误。

I've read eight pages worth of issues here but haven't seen a match. 我在这里阅读了八页的问题,但没有找到匹配的问题。 Thanks in advance for any help you can offer! 在此先感谢您提供的任何帮助!

You're going to run into a lot of permission issues trying to use PHP and C:\\Program Files (x86). 您将在尝试使用PHP和C:\\ Program Files(x86)时遇到很多权限问题。 Both the 32-bit and 64-bit Program Files directories in Windows are very picky when it comes to write permissions. Windows中的32位和64位Program Files目录在写入权限方面都很挑剔。 If you move the directory outside of Program Files and right into the C:\\ drive it should alleviate some problems. 如果将目录移到“程序文件”之外,然后右移到C:\\驱动器,则应该可以缓解一些问题。 (ie, C:\\temp is usually easily accessible with PHP when doing file uploads, session storage, etc...). (即,在执行文件上传,会话存储等操作时,通常可以通过PHP轻松访问C:\\ temp。)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM