0

I've duplicated an online site to a WAMP localhost site. The front page layout is broken and the front page shows this error.

The file could not be created. The website encountered an unexpected error. Please try again later.

The WAMP PHP error log contains about 20 copies of the following 2 errors.

PHP Notice: unserialize(): Error at offset 347 of 1093 bytes in C:\wamp\www\example.local\sites\all\modules\contrib\entity\includes\entity.controller.inc on line 261

Warning: Creating default object from empty value in C:\wamp\www\example.local\sites\all\modules\contrib\rules\includes\rules.core.inc on line 46

The sites\default\local.settings.php file contains the following code.

$conf['domain_301_redirect_enabled'] = '0';
$conf['cache_backends'][] = 'sites/all/modules/contrib/memcache/memcache.inc';
// The 'cache_form' bin must be assigned no non-volatile storage.
$conf['cache_class_cache_form'] = 'DrupalDatabaseCache';
// $conf['cache_default_class'] = 'MemCacheDrupal';
// $conf['memcache_key_prefix'] = 'miningbu_primary';
// Performance.
$conf['cache'] = '1';
$conf['block_cache'] = '1';
$conf['page_compression'] = '1';
$conf['preprocess_css'] = '1';
$conf['preprocess_js'] = '1';
//Itomic Hosting Function (IHF) presets.
$conf['ihf_redirect_www'] = FALSE;
$conf['ihf_staging_protect'] = 0;
$conf['ihf_staging_address'] = 'uat.example.net';
$conf['ihf_staging_passphrase'] = 'test';
$conf['ihf_staging_template'] = 'ihf-uat';
// Shield.
$conf['shield_enabled'] = '0';
$conf['shield_user'] = 'mbm';
$conf['shield_pass'] = 'mbm';
$conf['shield_allow_cli'] = '1';

I am not a Drupal expert and I don't know where to go from there to troubleshoot this error.

The online site uses memcache, but the local site doesn't have it installed. I think this might explain the issue.

3
  • 2
    The first error is a permission issue. The /web/sites/default/files doesn't have the appropriate permission and/or doesn't have the correct owner/group assignation; thus, apache doesn't have permission to create/generate the aggregated CSS & JS files.
    – No Sssweat
    Jul 6, 2021 at 20:20
  • 1
    I suggest you empty the DB and try to install Drupal first to make sure the installer isn't giving you critical errors. Once you get passed installation, empty db again and import your cloned db.
    – No Sssweat
    Jul 6, 2021 at 20:25
  • 3
    Sometimes you just need to visit the Admin -> Configuration -> Media -> File system, ensure everything is correct, and re-save so that all the APIs tie everything together correctly. Also, any errors will show up when you click save, so you know what to fix.
    – Jaypan
    Jul 7, 2021 at 0:50

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.