title: LOG4PHP File size Error
body: <p>I am running this script as a cron job on GoDaddy Shared Hosting (php 5.3.13), and am using log4php. The script seems to run fine, and finish. But then when log4php tries to finish up, it throws this error.</p>
  
  <p>It does seem to actually output the file, and its contents. And I even changed the file's permissions to 777. It seems to be throwing this error when it does the filesize check...</p>
  
  <p>Any help with the cause/solution to this error would be much appreciated.</p>
  
  <p>Error:</p>
  
  <pre><code>&lt;b&gt;Fatal error&lt;/b&gt;: Uncaught exception 'ErrorException' with message '2: filesize() [&amp;lt;a href='function.filesize'&amp;gt;function.filesize&amp;lt;/a&amp;gt;]: stat failed for log.txt, file: /home/content/89/10338789/html/Forum/phpBB3/program/log4php/appenders/LoggerAppenderRollingFile.php, line: 223' in /home/content/89/10338789/html/Forum/phpBB3/program/log4php/appenders/LoggerAppenderRollingFile.php:223
  Stack trace:
  #0 [internal function]: errorHandler(2, 'filesize() [&amp;lt;a ...', '/home/content/8...', 223, Array)
  #1 /home/content/89/10338789/html/Forum/phpBB3/program/log4php/appenders/LoggerAppenderRollingFile.php(223): filesize('log.txt')
  #2 /home/content/89/10338789/html/Forum/phpBB3/program/log4php/appenders/LoggerAppenderFile.php(165): LoggerAppenderRollingFile-&amp;gt;write(NULL)
  #3 /home/content/89/10338789/html/Forum/phpBB3/program/log4php/LoggerAppender.php(85): LoggerAppenderFile-&amp;gt;close()
  #4 [internal function]: LoggerAppender-&amp;gt;__destruct()
  #5 {main}
  thrown in &lt;b&gt;/home/content/89/10338789/html/Forum/phpBB3/program/log4php/appenders/LoggerAppenderRollingFile.php&lt;/b&gt; on line &lt;b&gt;223&lt;/b&gt;&lt;br /&gt;
  </code></pre>
  
  <p>Configuration File:</p>
  
  <pre><code>&lt;configuration xmlns="http://logging.apache.org/log4php/"&gt;
  
      &lt;appender name="myConsoleAppender" class="LoggerAppenderConsole"&gt;
          &lt;filter class="LoggerFilterLevelRange"&gt;
              &lt;param name="levelMin" value="info" /&gt;
          &lt;/filter&gt;
      &lt;/appender&gt;
  
      &lt;appender name="myFileAppender" class="LoggerAppenderRollingFile"&gt;
          &lt;layout class="LoggerLayoutPattern"&gt;
              &lt;param name="conversionPattern" value="%date %-5level - %message%newline" /&gt;
          &lt;/layout&gt;
          &lt;param name="file" value="log.txt" /&gt;
          &lt;param name="maxFileSize" value="10MB" /&gt;
      &lt;/appender&gt;
  
      &lt;appender name="myEmailAppender" class="LoggerAppenderMail"&gt;
          &lt;layout class="LoggerLayoutSimple" /&gt;
          &lt;param name="to" value="jonathonwisnoski@hotmail.com" /&gt;
          &lt;param name="from" value="logger@xxx.ca" /&gt;
          &lt;filter class="LoggerFilterLevelRange"&gt;
              &lt;param name="levelMin" value="info" /&gt;
          &lt;/filter&gt;
      &lt;/appender&gt;
  
      &lt;root&gt;
          &lt;appender_ref ref="myConsoleAppender" /&gt;
          &lt;appender_ref ref="myFileAppender" /&gt;
          &lt;appender_ref ref="myEmailAppender" /&gt;
      &lt;/root&gt;
  &lt;/configuration&gt;
  </code></pre>