php problem?

T

themasterrocker

Guest
Hey guys, I've got a php on my addon domain and everytime someone loads the page it comes back with this error: and the other PHP is uploaded, so it can't be that.
Code:
[16-Aug-2008 16:24:00] PHP Fatal error:  Call to undefined function imagecreatefromgif() in /home/sourmash/public_html/helprunescape.net/radio/current_song.php on line 34

But Me or Leafypiggy don't know whats wrong with it? Woiwky made me the php file. This is the php file

PHP:
<?php
//current_song.php

$file = 'song.txt';
$image = 'radioimage.gif';
$font = 'Tahoma.ttf';
$size = 9;

$fp = @fopen($file, 'r');
$song = fread($fp, 512);
fclose($fp);

list($song, $length) = explode("\n", $song);
include 'time_remaining.php';
$length = explode(':', $length);
$length = (intval($length[0]) * 60) + intval($length[1]);
$length -= time() - filemtime($file);

if ($length < 1) {
    $song = 'Between songs or offline';
}

if (strlen($song) > 32) {
    $p = strrpos(substr($song, 0, 32), ' ');
    $song = array(trim(substr($song, 0, $p)), trim(substr($song, $p)));
    if (strlen($song[1]) > 32) {
        $song[1] = substr($song[1], 0, 32) . '...';
    }
}
else {
    $song = array($song, '');
}

$img = imagecreatefromgif($image);
$blue = imagecolorallocate($img, 0, 0, 255);
$black = imagecolorallocate($img, 0, 0, 0);

imagettftext($img, $size, 0, 170, 46, $black, $font, $song[0]);
imagettftext($img, $size, 0, 169, 45, $blue, $font, $song[0]);
imagettftext($img, $size, 0, 170, 60, $black, $font, $song[1]);
imagettftext($img, $size, 0, 169, 59, $blue, $font, $song[1]);


header('Content-type: image/gif');
imagegif($img);
?>
 
Last edited by a moderator:
T

themasterrocker

Guest
I have. Woiwky, just come on msn. please. I upgraded a while ago.
 
Last edited by a moderator:

diabolo

Community Advocate
Community Support
Messages
1,682
Reaction score
32
Points
48
have you tried to hard code it directly rather than use the variable?


Code:
$img = imagecreatefromgif($image);
to

Code:
$img = imagecreatefromgif("radioimage.gif");
 

woiwky

New Member
Messages
390
Reaction score
0
Points
0
Was your upgrade request accepted though? And alright, I'll get on msn.
 

marshian

New Member
Messages
526
Reaction score
9
Points
0
They're doing a lot of stuff with server config and such lately, aren't they?
It looks a lot like they currently have the GD-thingie not installed or messed up. The function exists, so this is not a programming issue, but a server config-thingie. Try posting this in the free hosting section.
 
T

themasterrocker

Guest
Yes it was accepted.
Edit:
Ok me and Woiwky are talking about it on msn, we think it might be the server updates.
 
Last edited by a moderator:

woiwky

New Member
Messages
390
Reaction score
0
Points
0
They're doing a lot of stuff with server config and such lately, aren't they?
It looks a lot like they currently have the GD-thingie not installed or messed up. The function exists, so this is not a programming issue, but a server config-thingie. Try posting this in the free hosting section.

Kind of off topic, but do you know if any admin has said anything about this anywhere? I looked around yesterday for any official info on it and I couldn't find any. Since sunils said upgrading would fix it, I assumed there was word somewhere about that but it looks like that doesn't work either. Oh and by the way, happy birthday(still aug 16th in the US) ;-)
 
T

themasterrocker

Guest
It's you're birthday Marshian?? woah... Happy birthday you little monkey!! although its about 10 mins late :p
 
Last edited by a moderator:

marshian

New Member
Messages
526
Reaction score
9
Points
0
Kind of off topic, but do you know if any admin has said anything about this anywhere? I looked around yesterday for any official info on it and I couldn't find any. Since sunils said upgrading would fix it, I assumed there was word somewhere about that but it looks like that doesn't work either. Oh and by the way, happy birthday(still aug 16th in the US) ;-)

I noticed the topic about the updates was 11 pages long yesterday, so I kinda gave up on reading it... It could be in there (a). I'ld just wait a couple of days and if it still doesn't work try to open a topic in the free hosting section.
And thanks =]
 
T

themasterrocker

Guest
You're welcome and I'm asking them anyway Marshian. Asking can't hurt anybody.
 

marshian

New Member
Messages
526
Reaction score
9
Points
0
Get some sleep, that topic is 2 years old :p

I just saw this in Free Hosting though:

http://forums.x10hosting.com/free-h...rary-not-installed-cannot-process-images.html

So I guess that is the problem. You'd think they would have dealt with all issues in a testing environment before they made the updates live, but oh well. We'll just have to wait for all the problems to be sorted.

(Pretends to be awake and to have noticed the 2006.) Why do you think I said that topic is not useful? xD
Anyway Themasterrocker, it might be a good idea to link to this topic in your post in the Free Hosting section, as you don't really explain your problems really specificly there...

EDIT: by the way, I'm going to sleep now, so don't expect me to give any more stupid responses! ^^
 
Last edited:
T

themasterrocker

Guest
I deleted it lol, we'll wait for the GD library to come back on.
Edit:
Yeah i now can comfirm it was due to PHP being down. Close the thread please.
 
Last edited by a moderator:
Top