Score:0

Why do I get "The file could not be created." on a site I locally duplicated?

jp flag

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.

No Sssweat avatar
ua flag
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 avatar
ua flag
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.
Jaypan avatar
de flag
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.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.