I have a sub-domain of the main domain which seems to be broken. The error states that "Server IP Address could not be found".
When I checked the logs I found the following error:
[04-Jun-2018 17:54:43 UTC] PHP Fatal error: Cannot redeclare is_writeable_ACLSafe() (previously declared in /home/testcompany/public_html/wp-content/plugins/wp-super-cache/wp-cache-phase2.php:1009) in
/home/testcompany/training.testcompany/wp-content/plugins/wp-super-cache/wp-cache.php on line 102
Line#102 belonging to the section
/home/thebettersoftwar/training.thebettersoftwarecompany.com/wp-content/plugins/wp-super-cache/wp-cache.php
function is_writeable_ACLSafe($path) {
// PHP's is_writable does not work with Win32 NTFS
if ($path{strlen($path)-1}=='/') // recursively return a temporary file path
return is_writeable_ACLSafe($path.uniqid(mt_rand()).'.tmp');
else if (is_dir($path))
return is_writeable_ACLSafe($path.'/'.uniqid(mt_rand()).'.tmp');
// check tmp file for read/write capabilities
$rm = file_exists($path);
$f = @fopen($path, 'a');
if ($f===false)
return false;
fclose($f);
if (!$rm)
unlink($path);
return true;
}
The code belonging to this section
previously declared in /home/thebettersoftwar/public_html/wp-content/plugins/wp-super-cache/wp-cache-phase2.php:1009 is:
function is_writeable_ACLSafe( $path ) {
// PHP's is_writable does not work with Win32 NTFS
if ( $path[ strlen( $path ) - 1 ] == '/' ) { // recursively return a temporary file path
return is_writeable_ACLSafe( $path . uniqid( mt_rand() ) . '.tmp' );
} elseif ( is_dir( $path ) ) {
return is_writeable_ACLSafe( $path . '/' . uniqid( mt_rand() ) . '.tmp' );
}
// check tmp file for read/write capabilities
$rm = file_exists( $path );
$f = @fopen( $path, 'a' );
if ( $f === false )
return false;
fclose( $f );
if ( ! $rm ) {
unlink( $path );
}
return true;
}
Problem Statement:
I am wondering what changes I should make in the code above so that I am able to run the website live again.