Search code examples
phpdrupalutf-8warningsencode

difficulties in drupal with encoding


i would like to work on a website in order to develop other fonctionalities. It works on the server but not in localhost. I use MAMP on my MAC I use the server project.

The errors are :

  • Notice : Trying to get property of non-object in /Applications/MAMP/htdocs/var/www/includes/path.inc on line 51

    Sélectionner tout - Visualiser dans une fenêtre à part $path_language = $path_language ? $path_language : $language->language ;

  • warning : Cannot modify header information - headers already sent by (output started at /Applications/MAMP/htdocs/var/www/includes/path.inc:51) in /Applications/MAMP/htdocs/var/www/includes/common.inc on line 148.

    if (strlen($header)) { header($header) ; $stored_headers[] = $header ; }

  • warning : array_merge() [function.array-merge] : Argument #2 is not an array in /Applications/MAMP/htdocs/var/www/includes/theme.inc on line 976.

    $settings = array_merge($settings, variable_get(str_replace(‘/’, ‘’, ‘theme’. $key .’_settings’), array())) ;

Can you help me?


Solution

  • Try getting a fresh copy from the server to your machine following theses steps:

    • Get a database backup of the server
    • Create a database locally with the same collation as the server
    • Copy the files from the server to your machine while reserving their permissions, rsync would be a great tool to do that
    • alter drupal's settings file "sites/default/settings.php" to match your local database, it now should work fine