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 */