我在访问 Blob 存储时在 Azure fastCGI 上收到一般服务器错误。
错误是:
500内部服务器错误。
您要查找的资源有问题,无法显示。
下面是代码。此代码在本地测试中运行良好,并且作为内容上传到 Azure 的所有文件都运行良好。
谁能告诉我如何调试和查看实际错误?
<pre><?php
error_reporting(E_ALL);
header('Content-type: text/html');
echo 'C2, Start';
require_once('Microsoft/WindowsAzure/Storage/Blob.php');
$client = new Microsoft_WindowsAzure_Storage_Blob(
"blob.core.windows.net",
"xxxxxxxxxx",
"yyyyyyyyyyyyyyy=="
);
$filename= getcwd() . '\folders.txt';
echo $filename . '<br>';
if ($client) {
$client->getBlob('setup', 'folders.txt', $filename);
echo 'Blob Load ok! <br>';
} else {
echo 'Blob Storage Error <br>';
}
echo ', END';
?></code>
thanks.
默认情况下,当任何应用程序生成异常时,Windows 托管服务器会显示一般错误。我们显示一般错误是因为详细的错误消息允许恶意用户获取敏感信息。
要解决该错误,您可以修改您的网络配置文件并指定显示自定义错误消息。自定义错误消息可帮助您找到导致问题的特定代码。
使用下面的示例代码在 IIS 7 上显示自定义错误消息:
<configuration>
<system.webServer>
<httpErrors errorMode="Detailed" />
<asp scriptErrorSentToBrowser="true"/>
</system.webServer>
<system.web>
<customErrors mode="Off"/>
<compilation debug="true"/>
</system.web>
</configuration>
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)