If it's not the hosting provider and not XMB then you might have damaged some of the files or even database entries. I could not think of any other
reasonable explanation until I get my hands on your forum source code which is unlikely. You said that you transferred hosting. Can you give more
details? Was it the same hosting company? They just simply switched it to PHP7 or moved you to a different virtual server?
I suggest you take the copy of the database and file system and check if it works outside your hosting. You could use some tools like
"wamp","xammp","mamp" or even some other free hosting provider just to test if it's actually a script problem or not. If the script on different
host/localhost works fine, then something is indeed wrong with your main hosting.
If it's configuration related, you need to ask them for php.ini contents. Most of shared web hosting providers never give a direct access to php.
ini
In addition, turn on debug level to max maybe it will show some additional notifications/errors etc..
If it was me, I would probably use something like
http://filp.github.io/whoops/. A perfect error handler.
POST EDIT: It might be misconfiguration inside the ACP or no permissions to read the directory.
Скачиваемый файл
испорчен. Скачивание
прекращено.
English definition:
$lang['filecorrupt'] = "The file you are trying to download appears corrupt. File download aborted.";
Code: |
// Verify file is available
$path = '';
$size = 0;
if ($file['subdir'] == '') {
$size = strlen($file['attachment']);
} else {
$path = $SETTINGS['files_storage_path'];
if (substr($path, -1) != '/') {
$path .= '/';
}
$path = $path.$file['subdir'].'/'.$file['aid'];
if (!is_file($path)) {
header('HTTP/1.0 500 Internal Server Error');
error($lang['filecorrupt']);
}
$size = intval(filesize($path));
}
if ($size != $file['filesize']) {
header('HTTP/1.0 500 Internal Server Error');
error($lang['filecorrupt']);
}
|
From ACP:
Attachment Storage Path:
Optional, disk storage location for new files.
Check if $SETTINGS['files_storage_path'] is defined correctly and matches the folder of storage(if you use it in the first place because by default
it's optional). If the folder actually exists and defined properly then it might not be readable. Try making it readable, writable and executable
(chmod 777).
The second conditional aims for size, if size doesn't match it's also going to throw the same error. So in order to know where it occurs exactly you
have add some simple debugging to the
files.php:
Code: |
// Verify file is available
$path = '';
$size = 0;
if ($file['subdir'] == '') {
$size = strlen($file['attachment']);
} else {
$path = $SETTINGS['files_storage_path'];
if (substr($path, -1) != '/') {
$path .= '/';
}
$path = $path.$file['subdir'].'/'.$file['aid'];
if (!is_file($path)) {
header('HTTP/1.0 500 Internal Server Error');
error('PATH RELATED: '.$lang['filecorrupt']);
}
$size = intval(filesize($path));
}
if ($size != $file['filesize']) {
header('HTTP/1.0 500 Internal Server Error');
error('SIZE RELATED: '.$lang['filecorrupt']);
}
|
In your case the errors will look like that:
SIZE RELATED: Скачиваемый файл
испорчен. Скачивание
прекращено.
OR
PATH RELATED: Скачиваемый файл
испорчен. Скачивание
прекращено.
Tell us which one you are getting.