myhobbysite

Tech questions of any kind can be asked here.
Forum rules
Forum Specific Rules
So you got questions about audio/video? Wanna know how to rip a digital stream? Make an X/S/VCD to play on your DVD player? Maybe rip a video from VHS or TV? Find the answers here.
User avatar
deadone
That Was Just Your Thousandth Post
Posts: 1740
Joined: Tue Jul 31, 2007 11:23 pm
Location: corby northamtonshire UK
Country: United Kingdom

myhobbysite

Post by deadone »

hello all,
it seems as if i have an issue with my hobysite.
while trying to access pages i get these type of error messages

Fatal error: Cannot use result of built-in function in write context in /homepages/3/d628983707/htdocs/cms/includes/PEAR/Tar.php on line 534

this should be the page it takes me too
http://www.deadonetrading.com/cms/modul ... portal.php
User avatar
sjmike
Stone Cold Poster
Posts: 7950
Joined: Fri Jul 11, 2003 10:42 pm
Location: Sunny California
Country: United States

Re: myhobbysite

Post by sjmike »

Do you know if your host has possibly upgraded or changed the PHP version? MHS needs to run on PHP 5.X and isn't compatible with PHP 7.X
Interested in trading Metallica videos, check out my site:
Image
User avatar
deadone
That Was Just Your Thousandth Post
Posts: 1740
Joined: Tue Jul 31, 2007 11:23 pm
Location: corby northamtonshire UK
Country: United Kingdom

Re: myhobbysite

Post by deadone »

hi mike sorry about the delay.
im sure it was me. i was paying the extra for php support and i canceleed it thinking i didnt need it.
as far as im aware once canceleed they cant re-add it.
User avatar
deadone
That Was Just Your Thousandth Post
Posts: 1740
Joined: Tue Jul 31, 2007 11:23 pm
Location: corby northamtonshire UK
Country: United Kingdom

Re: myhobbysite

Post by deadone »

hi mike, update for ya, finally got it back up and running, all is great apart from one page thats driving me mad. its out of alignment and i havent changed anything as you can see here.
what do i need to change if you know

http://www.deadonetrading.com/cms/modul ... portal.php

cheers pal for all the help
User avatar
damage jackal
Trapped Under 800
Posts: 704
Joined: Tue Sep 06, 2005 7:44 pm
Location: Bulgaria
Country: Bulgaria

Re: myhobbysite

Post by damage jackal »

There's a function in MHS that creates thumbnail of your screenshots for the Random Video Recordings section. That function will not create thumbnail if the server doesn't have enough memory to process/resize the original image into thumbnail. In that case, it will output the full size of the screenshot.
User avatar
deadone
That Was Just Your Thousandth Post
Posts: 1740
Joined: Tue Jul 31, 2007 11:23 pm
Location: corby northamtonshire UK
Country: United Kingdom

Re: myhobbysite

Post by deadone »

thanx, is there a way to change it, it was fine before, i havent altered anything and now its gone mad on me :)
User avatar
damage jackal
Trapped Under 800
Posts: 704
Joined: Tue Sep 06, 2005 7:44 pm
Location: Bulgaria
Country: Bulgaria

Re: myhobbysite

Post by damage jackal »

Try to talk to your hosting provider. Ask them if they can increase the memory_limit value - http://php.net/manual/en/ini.core.php#ini.memory-limit
User avatar
sjmike
Stone Cold Poster
Posts: 7950
Joined: Fri Jul 11, 2003 10:42 pm
Location: Sunny California
Country: United States

Re: myhobbysite

Post by sjmike »

I noticed the thumbnail images work fine on the info pages but not the portal page.

You can always just edit the php file and remove that section too. It is strange why it would suddenly start acting up like that.
Interested in trading Metallica videos, check out my site:
Image
User avatar
deadone
That Was Just Your Thousandth Post
Posts: 1740
Joined: Tue Jul 31, 2007 11:23 pm
Location: corby northamtonshire UK
Country: United Kingdom

Re: myhobbysite

Post by deadone »

looks like im going to have to remove it. what is the exact file i need to edit, dont want to edit the wrong one :)

cheers guys for the assistance
User avatar
damage jackal
Trapped Under 800
Posts: 704
Joined: Tue Sep 06, 2005 7:44 pm
Location: Bulgaria
Country: Bulgaria

Re: myhobbysite

Post by damage jackal »

You need to edit includes/thumbnail.inc.php

Search for (should be somewhere in the top):

Code: Select all

    // Calculate the memory needed to process this image. If there isn't enough, output the original image instead of a thumbnail.
    $memoryNeeded = round(($info[0] * $info[1] * $info['bits'] * $info['channels'] / 8 + Pow(2, 16)) * 1.65);
    if (function_exists('memory_get_usage') && memory_get_usage() + $memoryNeeded > (integer) ini_get('memory_limit') * pow(1024, 2)) {
        switch ($info[2]) {
            case IMAGETYPE_GIF:
                header("Content-type: image/gif");
                readfile($file);
                return true;
                break;
            case IMAGETYPE_JPEG:
                header("Content-type: image/jpeg");
                readfile($file);
                return true;
                break;
            case IMAGETYPE_PNG:
                header("Content-type: image/png");
                readfile($file);
                return true;
                break;
            default:
                return false;
        }
    }
Add /* between $memoryNeeded and if(function_exists and add */ after the last curly closing brace. Should look something like this:

Code: Select all

    // Calculate the memory needed to process this image. If there isn't enough, output the original image instead of a thumbnail.
    $memoryNeeded = round(($info[0] * $info[1] * $info['bits'] * $info['channels'] / 8 + Pow(2, 16)) * 1.65);
/*
    if (function_exists('memory_get_usage') && memory_get_usage() + $memoryNeeded > (integer) ini_get('memory_limit') * pow(1024, 2)) {
        switch ($info[2]) {
            case IMAGETYPE_GIF:
                header("Content-type: image/gif");
                readfile($file);
                return true;
                break;
            case IMAGETYPE_JPEG:
                header("Content-type: image/jpeg");
                readfile($file);
                return true;
                break;
            case IMAGETYPE_PNG:
                header("Content-type: image/png");
                readfile($file);
                return true;
                break;
            default:
                return false;
        }
    }
*/
After that modification, it should never output full image anymore. Please, note I'm not professional coder, I wasn't part of MHS development team and I don't run MHS software myself, so I provide no guarantees whatsoever. If that didn't work or some side effects are introduced, revert the modification by removing the /* and */ lines you added.