我有几个Drupal网站在我的本地机器上安装WAMP(apache 2.2.17,php 5.3.4和mysql 5.1.53)。 每当我尝试访问pipe理页面,PHP进程似乎死亡。 来自apache_error.log:
[Fri Nov 09 10:43:26 2012] [notice] Parent: child process exited with status 255 -- Restarting. [Fri Nov 09 10:43:26 2012] [notice] Apache/2.2.17 (Win32) PHP/5.3.4 configured -- resuming normal operations [Fri Nov 09 10:43:26 2012] [notice] Server built: Oct 24 2010 13:33:15 [Fri Nov 09 10:43:26 2012] [notice] Parent: Created child process 9924 [Fri Nov 09 10:43:26 2012] [notice] Child 9924: Child process is running [Fri Nov 09 10:43:26 2012] [notice] Child 9924: Acquired the start mutex. [Fri Nov 09 10:43:26 2012] [notice] Child 9924: Starting 64 worker threads. [Fri Nov 09 10:43:26 2012] [notice] Child 9924: Starting thread to listen on port 80.
一些研究使我得到了一个关于'4096字节错误'的php错误报告。 我想看看,如果我有任何文件的文件大小为4096字节的倍数,但我不知道如何做到这一点。
我已经安装了gitBash,并且可以使用大多数典型的linux工具(find,grep等),但是我不熟悉linux来自己弄清楚。 帮助不大?
既然你在Windows上,你可以用PowerShell来做到这一点
Get-ChildItem C:\PathToTopDirectory -recurse | ForEach-Object { if(($_.length % 4096 -eq 0) -and (! $_.PSIsContainer)) {Write-Host $_.FullName} }
它所做的是获取Get-ChildItem命令中path下的所有内容的列表,并评估每个对象。 由于文件夹没有大小,我们希望排除它们,这就是-and (! $_.PSIsContainer)所做的。
然后我们只需要看看文件的大小是以字节为单位(这是length属性除以4096就剩下零余数,这意味着文件是4096或者是其倍数,这就是$_.length % 4096 -eq 0块呢。
Write-Host cmdlet将输出写入命令窗口。 如果你想把它放在文本文件中,你可以很容易地用Out-File c:\stuff.txtreplace它。