Since i updated to 6.x-1.0-beta1 there were no files created in my cache/www... folder. admin/reports/status reports boost is setup correct.

i am using the new boosted2.txt like i did before in 6.x-1.0-alpha4

My configuration:
Drupal/6.12
Apache/2.2.11
MySQL-Database/5.1.33
PHP/5.2.9
Windows Server 2008 Build 6001 (Service Pack 1)

CommentFileSizeAuthor
#6 boost-480266.patch1.64 KBmikeytown2
#5 boost-480266.patch1.64 KBmikeytown2

Comments

mikeytown2’s picture

Do you have any errors or drupal messages that show up on your page?
#385924: Don't cache pages when there are PHP/MySQL errors

To test run this in a php code block


if ($error = error_get_last()){
  echo 'errors:' . $error['type'] . ' ';
}
echo 'messages:' . count(drupal_get_messages(NULL, FALSE)) . ' ';
echo 'boost_is_cacheable():' . boost_is_cacheable($GLOBALS['_boost_path']);

It should output messages:0 boost_is_cacheable():1 if its working correctly.
#478306: front page not cached

XerraX’s picture

Version: 6.x-1.x-dev » 6.x-1.0-beta1

There were no errors in drupal log or in apache logs and the pages were displayed fine.

I will test the code-block later this day.

william haller’s picture

error_get_last() is reported as a PHP fatal error for undefined function for PHP 5.1 CentOS. Commenting out that bit of code in boost.module takes care of not serving pages here.

mikeytown2’s picture

Title: no files created since update to 6.x-1.0-beta1 » PHP < 5.2.0 - No files created since update to 6.x-1.0-beta1 due to missing error_get_last()
Component: Code » PHP compatibility

Thanks for the heads up http://us3.php.net/error_get_last php 5.2 and up support it; I need to wrap it around a function_exists().

mikeytown2’s picture

Status: Active » Needs review
StatusFileSize
new1.64 KB
mikeytown2’s picture

StatusFileSize
new1.64 KB

last one was bad forgot the () for the if statement.

XerraX’s picture

the block says:

errors:2048 messages:0 boost_is_cacheable():1

I disabled the error_get_last stuff temporary, server is now serving the cached sites without problems.

where do i look for the error type?

mikeytown2’s picture

Status: Needs review » Needs work

@XerraX
http://us3.php.net/manual/en/errorfunc.constants.php#errorfunc.constants...
PHP is nagging that somewhere in the code base your using some deprecated functions. I should probably make this (halt on error_get_last()) a setting on the performance page so pages can still be cached even if PHP is throwing dumb errors like this.

While you have that error would you mind running this PHP code block for me

$error = FALSE;
if (function_exists('error_get_last')) {
  $error = error_get_last();
}
$drupal_msg = count(drupal_get_messages(NULL, FALSE));

if ($error || $drupal_msg != 0) {
  $ttl = boost_file_get_ttl(boost_file_path($GLOBALS['_boost_path']));
  $output = t('There are <strong>php errors</strong> or <strong>drupal messages</strong> on this page, preventing boost from caching.');
  if ($error){
    $output .= t(' ERRORS: <pre>%error</pre>. %link', array('%error' => print_r($error, TRUE), '%link' => l(t('Lookup Error'), 'http://php.net/errorfunc.constants')));
  }
  if ($drupal_msg != 0) {
    $output .= t(' MESSAGES: %msg', array('%msg' => $drupal_msg));
  }
}

It should give you nicer looking output.

mikeytown2’s picture

Status: Needs work » Closed (duplicate)