Ron*_*tel 8 php codeigniter azure
我的项目中有codeigniter框架.我的网站在windows azure平台上运行.有时它会给我这个错误:
PHP致命错误:Wincache失败[6484] free_memory:第44行的D:\ home\site\wwwroot\system\libraries\Log.php中未使用块0x41d56d8
我试图通过更改内存值来更改php.ini文件:
ini_set('memory_limit','2048M');
Run Code Online (Sandbox Code Playgroud)
但是,在我检查memory_get_peak_usage();之后,我发现应用程序甚至没有使用超过1MB.我不知道这里发生了什么.当发生这种情况时,我得到空白页面和网站.
请问我是否需要更多信息或代码.
Log.php:
public function __construct()
{
$config =& get_config();
$this->_log_path = ($config['log_path'] != '') ? $config['log_path'] : APPPATH.'logs/';
if ( ! is_dir($this->_log_path) OR ! is_really_writable($this->_log_path)) // This is line 44.
{
$this->_enabled = FALSE;
}
if (is_numeric($config['log_threshold']))
{
$this->_threshold = $config['log_threshold'];
}
if ($config['log_date_format'] != '')
{
$this->_date_fmt = $config['log_date_format'];
}
}
Run Code Online (Sandbox Code Playgroud)
log.php文件是默认的codeigniter文件.
最终解决方案:
我php.ini用这个更新了我的文件:
wincache.fcenabled=0
wincache.ocenabled=0
wincache.ucenabled=0
wincache.reroute_enabled = 0
wincache.srwlocks = 0
Run Code Online (Sandbox Code Playgroud)
这是 Windows Server 上的 IIS 或 WinCache 的问题。您可以关注iis 论坛上的官方帖子。为了确定起见,请检查 php.ini 中的以下选项:
wincache.reroute_enabled = 0
wincache.srwlocks = 0
Run Code Online (Sandbox Code Playgroud)
同时将 wincache 更新到最新版本。
| 归档时间: |
|
| 查看次数: |
671 次 |
| 最近记录: |