MyBB Community Forums

Full Version: Serious Issue - Attachment Images - Portal / Thread
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey guys i have a issue that needs fixing quickly.

Now the images are not showing on the first page of the portal or on the threads that the images are on, they are attachments, they can be viewed directly via the .attach file. and the .jpg thumb is also showing.


My site: http://cyanlabs.net

Problem pages : http://cyanlabs.net/portal.php & http://cyanlabs.net/Thread-Monthly-Updat...ember-2014

Please note i am using timthumb.php to resize the images, this was working fine till today, Even if i go to the url directly e.g attachment.php?aid=38 it still doesn't work.


Any ideas, need help quick Smile Thanks.
image request is returning internal server error.
can you check server error log at web host control panel to find the cause ..
(2014-09-02, 12:26 PM).m. Wrote: [ -> ]image request is returning internal server error.
can you check server error log at web host control panel to find the cause ..

Hi yeah sure, Also i edited the attachment.php file to make it show the image filename instead of outputting it and it's defintely the correct file.

http://cyanlabs.net/attachment.php?aid=27
OUTPUT
/uploads/201407/post_1_1405540676_0c4f9fd027390c36170e48d38f56c7a6.attach

Then i edited it back to the stock file again, i am however running 1 patch but even with it disabled it doesn't work so i don't think it's relevant, all it does is makes guest able to see image attachments.

Also what does this mean? Failed to load resource: net::ERR_CACHE_MISS i'm getting it in the chrome console.

My error log isn't showing anything.. i have no error log only a access log since i haven't had any errors.

EDIT: ok so i had the error log cyanlabs.net off on my VPS, Enabled and checking error log i get this no sign of any attachment.php errors.

2014/09/02 14:53:31 [error] 11848#0: *249 open() "/srv/cyanlabs.net/images/mobile/arrow_down.gif" failed (2: No such file or directory), client: 141.101.98.176, server: cyanlabs.net, request: "GET /images/mobile/arrow_down.gif HTTP/1.1", host: "cyanlabs.net", referrer: "http://cyanlabs.net/Thread-Install-XPEnology-DSM-5-0-on-the-N54L"

OK so i just restored a backup from the day before but it is still doing it (file backup).

EDIT: IMPORTANT.. i renamed the broken attachment.php to attachment-broke.php and forced made a temporary attachment.php redirect to a "Technical Issues" image so to test this you will need to go to attachment-broke.php this way i don't get slowdowns on my site from broken image loading. 

OK so this is weird, Even with my custom attachment.php file just doing this
<?php
/**
 * MyBB 1.6
 * Copyright 2010 MyBB Group, All Rights Reserved
 *
 * Website: http://mybb.com
 * License: http://mybb.com/about/license
 *
 * $Id$
 */

define("IN_MYBB", 1);
define('THIS_SCRIPT', 'attachment.php');

//require_once "./global.php";

if (file_exists("/srv/cyanlabs.net/technical.jpg")) {
        header('Content-Type: image/jpeg');
        readfile("/srv/cyanlabs.net/technical.jpg");
        exit;
    }
?>

it still didn't work unless i commented out the global.php file require.

OK this has to be a DB issue, no other answer as i restored all old files, but not DB

OK so i restored the DB and now it works but what the hell caused it?

OK and now they are not working again, seriously what is going on?

OK so finally fixed it (well got it working) i reverted the DB to a few days ago, and manually re-added the new users, posts and threads and then rebuilt all caches and recounted everything Smile

Any ideas what caused it though?