Red X?

Ask questions, request features, or just complement us about our software and services.
GC
Posts: 36
Joined: Mon Aug 26, 2002 7:33 am
Location: Vancouver, BC
Contact:

Red X?

Post by GC »

http://mp3.uhoh-boom.com/whatimplayin.php

Code: Select all

<?php
include("includes.php");
dl("extensions/php_gd.dll");
header("Content-Type: image/png");
$im = imagecreatefrompng("songband1.png");

if ($im)
{
ImageString($im,  1,  17,  4,  "Playing: ".$current_song,  2);
ImageString($im,  1,  17,  17,  "There are ".$listeners,  2);

ImagePNG($im);
}
?> 
I added 'dl("extensions/php_gd.dll");' instead of recompling PHP with GD to get imagecreate to work properly.

The first couple times, the image appeared with just the base text (e.x. Playing:), and nothing after it. Now it just comes up as a red x every time. Could the red x that comes up instead of the image be that I still haven't set something up correctly, or am I just a horrible failure?
-GC
User avatar
Jay
Will work for food (Administrator)
Posts: 3020
Joined: Mon Jan 14, 2002 12:48 am
Location: Next Door
Contact:

Post by Jay »

could you copy the contents of your includes.php file into a post here so I can examine it?

Thanks,
- Jay
GC
Posts: 36
Joined: Mon Aug 26, 2002 7:33 am
Location: Vancouver, BC
Contact:

Post by GC »

Jay wrote:could you copy the contents of your includes.php file into a post here so I can examine it?

Thanks,

Code: Select all

<!-- Song stats Generated by Radio ToolBox written by Jay Krivanek -->
<?php
$current_song = 'Matthew Good Band - 03 - Apparitions';
$listeners = '0';
$max_listeners = '1';
$touch_interval = '30';
$lastsong[0] = 'Janes Addiction - Jane Says';
$lastsong[1] = 'Matthew Good Band - 10 - Anti-Pop';
$lastsong[2] = 'Swordfish - 01 - Paul Oakenfold - Swordfish Intro';
$lastsong[3] = 'Our Lady Peace - 07 - Are You Sad';
$lastsong[4] = 'Our Lady Peace - 05 - Made of Steel';
$lastsong[5] = 'Our Lady Peace - 11 - Neon Crossing';
$lastsong[6] = 'Red Hot Chili Peppers - 03 - This Is The Place';
$lastsong[7] = 'Swordfish - 08 - Lemon Jelly - Kneel Before Your God';
$lastsong[8] = 'Swordfish - 05 - Muse - New Born (Paul Oakenfold Mix)';
$lastsong[9] = 'Filter - Where Do We Go From Here';
?>
^^^ Winamp's extraordinary randomization at work..
-GC
User avatar
Jay
Will work for food (Administrator)
Posts: 3020
Joined: Mon Jan 14, 2002 12:48 am
Location: Next Door
Contact:

Post by Jay »

yea I was afraid of this, some distribution of catcher is generating an HTML comment.

I can't find it in my dist but anyhow download www.radiotoolbox.com/radiotoolbox/rtb_catcher_php.zip this and reconfigure it.

Sorry about that.
- Jay
GC
Posts: 36
Joined: Mon Aug 26, 2002 7:33 am
Location: Vancouver, BC
Contact:

Post by GC »

Jay wrote:yea I was afraid of this, some distribution of catcher is generating an HTML comment.

I can't find it in my dist but anyhow download www.radiotoolbox.com/radiotoolbox/rtb_catcher_php.zip this and reconfigure it.

Sorry about that.
Well, now it at least sizes the image correctly.. still a red x though.. :cry:
-GC
User avatar
Jay
Will work for food (Administrator)
Posts: 3020
Joined: Mon Jan 14, 2002 12:48 am
Location: Next Door
Contact:

Post by Jay »

change the line that reads
header("Content-Type....

to

// header("Content-Type...

this way we can see what PHP is returning as an error
- Jay
GC
Posts: 36
Joined: Mon Aug 26, 2002 7:33 am
Location: Vancouver, BC
Contact:

Post by GC »

Jay wrote:change the line that reads
header("Content-Type....

to

// header("Content-Type...

this way we can see what PHP is returning as an error
http://mp3.uhoh-boom.com/whatimplayin.php

Looks like mostly gibberish to me..

Code: Select all

‰PNG  IHDR,Põ‘m±PLTEÿÿÿ’’……
-GC
User avatar
Jay
Will work for food (Administrator)
Posts: 3020
Joined: Mon Jan 14, 2002 12:48 am
Location: Next Door
Contact:

Post by Jay »

yes but if you view the source of the page you will clearly see that our HTML comment is still there. Go ahead and delete the includes.php file

make sure that RTB is running and updating your script
- Jay
GC
Posts: 36
Joined: Mon Aug 26, 2002 7:33 am
Location: Vancouver, BC
Contact:

Post by GC »

Jay wrote:yes but if you view the source of the page you will clearly see that our HTML comment is still there. Go ahead and delete the includes.php file

make sure that RTB is running and updating your script
Done.. whatimplaying.php returns the base image with the base text, but catcher.php is broken now..
-GC
User avatar
Jay
Will work for food (Administrator)
Posts: 3020
Joined: Mon Jan 14, 2002 12:48 am
Location: Next Door
Contact:

Post by Jay »

is RTB saying anything in the Current Stats screen about the Script service?
- Jay
GC
Posts: 36
Joined: Mon Aug 26, 2002 7:33 am
Location: Vancouver, BC
Contact:

Post by GC »

Jay wrote:is RTB saying anything in the Current Stats screen about the Script service?
It's working normally..
-GC
User avatar
Jay
Will work for food (Administrator)
Posts: 3020
Joined: Mon Jan 14, 2002 12:48 am
Location: Next Door
Contact:

Post by Jay »

hmm something weird is going on, I noticed a couple of things

when I went to your catcher.php file it just throws out the header but not BADPASSWORD, which it should because I am not sending it a username or password

try re-extracting the scripts and the config file and re-configuring it.

Another thing your domain appears to be a big frame pointing to your server. In RTB make sure you are using your IP not the domain.
- Jay
GC
Posts: 36
Joined: Mon Aug 26, 2002 7:33 am
Location: Vancouver, BC
Contact:

Post by GC »

Jay wrote:hmm something weird is going on, I noticed a couple of things

when I went to your catcher.php file it just throws out the header but not BADPASSWORD, which it should because I am not sending it a username or password

try re-extracting the scripts and the config file and re-configuring it.

Another thing your domain appears to be a big frame pointing to your server. In RTB make sure you are using your IP not the domain.
http://mp3.uhoh-boom.com/whatimplayin.php

Re-extracted, and re-configured. Well.. it works.. more, now. :) But the song data is not showing up..

Yeah, I am using the IP address of the machine.
-GC
User avatar
Jay
Will work for food (Administrator)
Posts: 3020
Joined: Mon Jan 14, 2002 12:48 am
Location: Next Door
Contact:

Post by Jay »

http://www.radiotoolbox.com/radiotoolbo ... er_php.zip redownload

extract just catcher.php and place it in your RTB directory. I just realized that you probably have Register_Globals off in PHP.
- Jay
GC
Posts: 36
Joined: Mon Aug 26, 2002 7:33 am
Location: Vancouver, BC
Contact:

Post by GC »

Jay wrote:http://www.radiotoolbox.com/radiotoolbo ... er_php.zip redownload

extract just catcher.php and place it in your RTB directory. I just realized that you probably have Register_Globals off in PHP.
Aces! It wasn't working, but then I added the following as you instructed me to in another thread:

Code: Select all

if (isset($_REQUEST)) { 
    while(list($varname, $varvalue) = each($_REQUEST)) { $$varname = $varvalue; } 
} 
if (isset($_SERVER)) { 
    while (list($varname, $varvalue) = each($_ENV)) { $$varname = $varvalue; } 
    while (list($varname, $varvalue) = each($_SERVER)) { $$varname = $varvalue; } 
} 
And now it works.. except for the listeners part. Is there a way I can remove that (I won't be needing it, really..)? And every other update or so I get 'The script has returned unrecognized data' messages, and the song is not getting updated. Under 'Log Service' it says Unrecognized Data.
Last edited by GC on Wed Sep 04, 2002 2:09 am, edited 3 times in total.
-GC
Post Reply