• Resolved joannie

    (@joannie)


    I’ve just moved my blog up a level, from https://www.stpetersoundle.org.uk/new to https://www.stpetersoundle.org.uk. Everything seems fine, until I try and go to the admin pages. I can get to the login screen, but after I log in I get a blank page with the error:-

    Fatal error: Cannot redeclare url_shorten() (previously declared in /home/t/tebesurmy/public_html/wp-admin/admin-functions.php:3) in /home/t/tebesurmy/public_html/wp-admin/admin-functions.php on line 1087

    url_shorten on line 1087 looks like this:-

    function url_shorten ($url) {
    $short_url = str_replace(‘https://’, ”, stripslashes($url));
    $short_url = str_replace(‘www.’, ”, $short_url);
    if (‘/’ == substr($short_url, -1))
    $short_url = substr($short_url, 0, -1);
    if (strlen($short_url) > 35)
    $short_url = substr($short_url, 0, 32).’…’;
    return $short_url;
    }

    I really don’t know what has gone wrong. Any ideas?

    Thanks, Joannie

Viewing 1 replies (of 1 total)
  • Thread Starter joannie

    (@joannie)

    Examining the admin-functions.php file mroe closely, I found that everything in it had been duplicated. This was the case with everything in the wp-admin folder. I just replaced all those files with a fresh install and it worked again.

Viewing 1 replies (of 1 total)
  • The topic ‘Cannot redeclare url_shorten()’ is closed to new replies.