ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Server Move Gone Bad

August 06, 2010 12:20pm

Subscribe [4]
  • #1 / Aug 06, 2010 12:20pm

    julianps

    175 posts

    Hi, I moved a 1.6.8/MSM site between servers and I’ve hit a burp.

    I loaded everything to the new location, updated path.php and admin/config.php and ran update and replace across the db to change all references in setting, templates and entries. Now, when I go to perform certain tasks EE hisses at me; the following came as the result of attempting to edit an existing entry;

    Notice: Undefined variable: ret in /home/xxxx/public_html/admin/core/core.functions.php on line 1099
    Notice: Undefined variable: ret in /home/xxxx/public_html/admin/core/core.functions.php on line 1099
    Notice: Undefined variable: ret in /home/xxxx/public_html/admin/core/core.functions.php on line 1099
    Notice: Undefined variable: ret in /home/xxxx/public_html/admin/core/core.functions.php on line 1099

    and

    A PHP Error was encountered
    Severity: Warning
    Message: Cannot modify header information - headers already sent by (output started at /home/xxxx/public_html/admin/core/core.functions.php:1099)
    Filename: core/core.functions.php
    Line Number: 296

    As I do not know the first thing about php can anyone suggest what I’ve done wrong so that I might get back on track?

    ///////////////

    Line 296 looks like is part of

    /** ----------------------------------------
        /**  Redirect
        /** ----------------------------------------*/
        
        function redirect($location)
        {    
            global $PREFS;
                    
            $location = str_replace('&', '&', $this->insert_action_ids($location));
                    
            switch($PREFS->ini('redirect_method'))
            {
                case 'refresh' : header("Refresh: 0;url=$location");
                    break;
                default        : header("Location: $location");
                    break;
            }
            
            exit;
        }
        /* END */

    Line 1099 looks like it is part of

    /** -----------------------------------------
        /**  Delete Direcories
        /** -----------------------------------------*/
    
        function delete_directory($path, $del_root = FALSE)
        {
            $path = rtrim($path, '/');
            
            if ( ! is_dir($path))
            {
                return FALSE;
            }
            
            // let's try this the sane way first
            @exec("mv {$path} {$path}_delete", $out, $ret);
            
            if ($ret == 0)
            {
                if ($del_root === FALSE)
                {
                    @mkdir($path, 0777);
                    
                    if ($fp = @fopen($path.'/index.html', 'wb'))
                    {
                        fclose($fp);
                    }                
                }
    
                @exec("rm -r -f {$path}_delete");
            }
            else
            {
                if ( ! $current_dir = @opendir($path))
                {
                    return;
                }
    
                while($filename = @readdir($current_dir))
                {        
                    if ($filename != "." AND $filename != "..")
                    {
                        if (@is_dir($path.'/'.$filename))
                        {
                            if (substr($filename, 0, 1) != '.')
                            {
                                $this->delete_directory($path.'/'.$filename, TRUE);
                            }
                        }
                        else
                        {
                            @unlink($path.'/'.$filename);
                        }
                    }
                }
    
                closedir($current_dir);
    
                if (substr($path, -6) == '_cache' && $fp = @fopen($path.'/index.html', 'wb'))
                {
                    fclose($fp);            
                }
    
                if ($del_root == TRUE)
                {
                    @rmdir($path);
                }    
            }
        }
        /* END */
  • #2 / Aug 06, 2010 7:53pm

    Brandon Jones

    5500 posts

    Jules, how did you perform the search and replace? Was it via EE’s Search and Replace utility or something else?

  • #3 / Aug 07, 2010 4:17am

    julianps

    175 posts

    Using EE’s utility.

    It missed the image upload directory settings but got pretty much everything else.

    I’m still none the wiser as to what’s going on in the two functions that seem to be burping.

  • #4 / Aug 07, 2010 5:57pm

    Greg Salt

    3988 posts

    Hi Jules,

    Is it possible to say exactly which actions are causing this error? You’ve mentioned editing an entry, which others are affected?

    Cheers

    Greg

  • #5 / Aug 07, 2010 6:04pm

    Greg Salt

    3988 posts

    Hi Jules,

    Further to my last, did you also copy over your cache directory? If so, can you clear your cache files please.

    Cheers

    Greg

  • #6 / Aug 09, 2010 6:57am

    julianps

    175 posts

    Greg,

    Good catch; whilst I did use Admin => Utilities => Clear Cached Data =>All caches I can now see looking at the server via FTP that the job was barely done and a number of the caches are still populated. Replacing the ~/cache/ folder with the one from the original installation pack removed the errors completely.

    Thank you for taking the time to review this issue and for your assistance.

    Regards, Jules

  • #7 / Aug 09, 2010 3:49pm

    Ingmar

    29245 posts

    So, just checking: you’re up and running?

  • #8 / Aug 09, 2010 5:04pm

    julianps

    175 posts

    yes.

  • #9 / Aug 09, 2010 5:07pm

    Ingmar

    29245 posts

    Excellent. Please start a new thread in case there’s anything else, thanks.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases