TinyPortal

Development => Support => Topic started by: MoreBloodWine on May 15, 2011, 06:14:03 AM

Title: So I upgraded to RC1.1 and some block content broke...
Post by: MoreBloodWine on May 15, 2011, 06:14:03 AM
Not sure what the deal is here but...

When I upgraded to 1.1 it seems to have broken some block content that was 100% functional before the upgrade.

Here's just one example...

The PSN Status block on my site.

Here's the content from the named file which I call inside of an img src tag.

<?php  
global
$sourcedir;

if (file_exists('/removed/public_html/SSI.php') && !defined('SMF'))
require_once('/removed/public_html/SSI.php');
   elseif (!
defined('SMF'))
    die('This script wasn\'t able to connect to SMF...');
   
if (($temp = cache_get_data('psn_status', 300)) == null)
{
require_once($sourcedir . '/Subs-Package.php');
$request = @fetch_web_data('http://en.playstation.com/psn/');

if ($request !== false && preg_match('~<img src="/static/furn/icons/psn_status/psnstatus_red.gif"/>~smi', $request, $matches))
$temp = 'http://www.eojmarket.com/xbox_and_psn_network_status/psn-down.png';
else if ($request !== false && preg_match('~<img src="/static/furn/icons/psn_status/psnstatus_green.gif"/>~smi', $request, $matches))
$temp = 'http://www.eojmarket.com/xbox_and_psn_network_status/psn-up.png';
else
die('Unable to connect to the PlayStation Network...');

cache_put_data('psn_status', $temp, 300);
}

$imgPng = imageCreateFromPng($temp);
imageAlphaBlending($imgPng, true);
imageSaveAlpha($imgPng, true);
header("Content-type: image/png");
imagePng($imgPng);
?>


Now here's what I'm getting inside of an error_log file where the file with the above code is contained.

[15-May-2011 00:51:13] PHP Notice:  Undefined index:  show_download in /removed/public_html/Sources/TPSubs.php on line 201

Edit: Even my site statistic sig which many of you have seen in my sig here is broke... all I get is a red x box in place of the image just like I do for the broken PSN status deal that I got on my site.
Title: Re: So I upgraded to RC1.1 and some block content broke...
Post by: IchBin on May 16, 2011, 05:22:45 PM
That error should have nothing to do with your block. It's an error that has already been reported and fixed. A search here or the bugtracker will show the fix. It looks to me like your script for the PSN isn't working. Hitting it directly does nothing, which would mean TP isn't doing anything to it.
http://www.eojmarket.com/xbox_and_psn_network_status/psn-status.php

Title: Re: So I upgraded to RC1.1 and some block content broke...
Post by: MoreBloodWine on May 17, 2011, 12:51:53 AM
Quote from: IchBinâ,,¢ on May 16, 2011, 05:22:45 PM
That error should have nothing to do with your block. It's an error that has already been reported and fixed. A search here or the bugtracker will show the fix. It looks to me like your script for the PSN isn't working. Hitting it directly does nothing, which would mean TP isn't doing anything to it.
http://www.eojmarket.com/xbox_and_psn_network_status/psn-status.php

Edit: All previous text removed.

New Content:

Ok, I don't know what the deral is but it's something with a TP edit or something because when TP's not installed all of my custom code from my recent block to the PSN status thing to my stat sig here works but when TP's installed it ALL breaks.
Title: Re: So I upgraded to RC1.1 and some block content broke...
Post by: IchBin on May 17, 2011, 03:35:05 AM
Well sorry, there's not much we can do from our end for this. You'll have to troubleshoot it yourself or get your host involved if you can't figure it out as we dont have access to your server and stuff.
Title: Re: So I upgraded to RC1.1 and some block content broke...
Post by: MoreBloodWine on May 17, 2011, 03:42:52 AM
Quote from: IchBinâ,,¢ on May 17, 2011, 03:35:05 AM
Well sorry, there's not much we can do from our end for this. You'll have to troubleshoot it yourself or get your host involved if you can't figure it out as we dont have access to your server and stuff.
Well, it shouldnt be hard to troubleshoot part of it since I'm hoping if you use the previously posted code on a site with TP and modify the paths to yours it shouldnt work but then should when TP is turned off / uninstalled. Like right now if I uninstall TP then my stat sig here which is currently broke and the PSN thing would work.
Title: Re: So I upgraded to RC1.1 and some block content broke...
Post by: IchBin on May 17, 2011, 03:52:57 AM
Your script doesn't work for me because their site looks like it's changed. At least I don't remember if looking that way last time. And the code your looking for likely has changed.
Title: Re: So I upgraded to RC1.1 and some block content broke...
Post by: MoreBloodWine on May 17, 2011, 03:58:25 AM
Quote from: IchBinâ,,¢ on May 17, 2011, 03:52:57 AM
Your script doesn't work for me because their site looks like it's changed. At least I don't remember if looking that way last time. And the code your looking for likely has changed.
I'm gonna dump my site in maint and turn off TP just to show you the code works in it's current format.

(https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Fwww.eojmarket.com%2Fxbox_and_psn_network_status%2Fpsn-status.php&hash=6584f18687f0004dfd64895ba17b4e457b998dfc)

Also notice how my stat sig works now to (seen below and in my signature)... when you reply I'll turn TP back on / reinstall it and you'll see how they both break back down.

(https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Fwww.eojmarket.com%2Fsigninfo.php&hash=3b6c806a8db73720e584a0d11f7f23f99e910500)

And again, the code currently used for the PSN setup.

<?php  
global
$sourcedir;

if (file_exists('/removed/public_html/SSI.php') && !defined('SMF'))
require_once('/removed/public_html/SSI.php');
   elseif (!
defined('SMF'))
    die('This script wasn\'t able to connect to SMF...');
   
if (($temp = cache_get_data('psn_status', 300)) == null)
{
require_once($sourcedir . '/Subs-Package.php');
$request = @fetch_web_data('http://en.playstation.com/psn/');

if ($request !== false && preg_match('~<img src="/static/furn/icons/psn_status/psnstatus_red.gif"/>~smi', $request, $matches))
$temp = 'http://www.eojmarket.com/xbox_and_psn_network_status/psn-down.png';
else if ($request !== false && preg_match('~<img src="/static/furn/icons/psn_status/psnstatus_green.gif"/>~smi', $request, $matches))
$temp = 'http://www.eojmarket.com/xbox_and_psn_network_status/psn-up.png';
else
die('Unable to connect to the PlayStation Network...');

cache_put_data('psn_status', $temp, 300);
}

$imgPng = imageCreateFromPng($temp);
imageAlphaBlending($imgPng, true);
imageSaveAlpha($imgPng, true);
header("Content-type: image/png");
imagePng($imgPng);
?>


Edit: I would still add that even with RC1.1 every time the PSN status is hit (when TP's installed obviously) that this line gets appended to an error_log file in the folder were the PSN code file is located. I also get the same line in an error_log file on another part of my site where the code file for my stat sig is located.

[17-May-2011 04:45:50] PHP Notice:  Undefined index:  show_download in /removed/public_html/Sources/TPSubs.php on line 201

I reallly have no clue as to what the hecks going on here but like I said, everything thats working when TP is not installed breaks when TP gets installed from the PSN status code to my custom recent posts block to even my stat sig currently seen working because I turned it off to prove a point.
Title: Re: So I upgraded to RC1.1 and some block content broke...
Post by: MoreBloodWine on May 17, 2011, 10:09:30 AM
It's late, I'm tired and I didn't want to leave my site in maint mode since it's an active site so I made this little video to clear things up and prove that it is indeed TP messing with not only my PSN status code but my stat sig as well.

Also, I know you said that "error" about show dl was fixed so I don't know what to tell you about each new appendige to the error_log file in the one folder. Again, it only ever comes up when TP's installed and the PSN code is hit for one example.

http://www.youtube.com/watch?v=T80ESX07qPM
Title: Re: So I upgraded to RC1.1 and some block content broke...
Post by: IchBin on May 17, 2011, 04:12:05 PM
Like I said, the Undefined index: show_download has been fixed for the next release. If you want to fix that error, do a quick search and you'll find the fix for it. As for the script, I just added the code to a file on my site. If I hit it directly it works just fine. And yes TP is installed as you can see there.
http://www.ichbin.us/test.php

As for your problem there is not much troubleshooting we can do when we are not running the same things you are. Not to mention we don't have access to your server to look at files and server logs. So look in your logs and see if there are errors. That includes both the SMF error log as well as the server error_log. If there are, post them so we can see.
Title: Re: So I upgraded to RC1.1 and some block content broke...
Post by: MoreBloodWine on May 17, 2011, 08:36:06 PM
Quote from: IchBinâ,,¢ on May 17, 2011, 04:12:05 PM
Like I said, the Undefined index: show_download has been fixed for the next release. If you want to fix that error, do a quick search and you'll find the fix for it. As for the script, I just added the code to a file on my site. If I hit it directly it works just fine. And yes TP is installed as you can see there.
http://www.ichbin.us/test.php

As for your problem there is not much troubleshooting we can do when we are not running the same things you are. Not to mention we don't have access to your server to look at files and server logs. So look in your logs and see if there are errors. That includes both the SMF error log as well as the server error_log. If there are, post them so we can see.
1. Ok, so I goofed on the error deal. I mistakingly that 1.1 had the downloa fix in it.
2. As I said before, a test forum with TP and a left block to call the PSN code from your end would allow you to trouble shoot whats going on since all you need to do is...

A. Make a site.
B. Install TP RC1.1
C. Put the below code in a file on your site, change the SSI path to suit your needs than in a block on your test site call the file inside of an HTML image tag.

Edit: I see you did do a test page... are you running it the way I am though, with the SSI include etc ?

I'll make a new test site of my own but I'm betting it won't work and I'll even go as far as to provide FTP access to the test sites folder.

<?php  
global
$sourcedir;

if (file_exists('/removed/public_html/SSI.php') && !defined('SMF'))
require_once('/removed/public_html/SSI.php');
   elseif (!
defined('SMF'))
    die('This script wasn\'t able to connect to SMF...');
   
if (($temp = cache_get_data('psn_status', 300)) == null)
{
require_once($sourcedir . '/Subs-Package.php');
$request = @fetch_web_data('http://en.playstation.com/psn/');

if ($request !== false && preg_match('~<img src="/static/furn/icons/psn_status/psnstatus_red.gif"/>~smi', $request, $matches))
$temp = 'http://www.eojmarket.com/xbox_and_psn_network_status/psn-down.png';
else if ($request !== false && preg_match('~<img src="/static/furn/icons/psn_status/psnstatus_green.gif"/>~smi', $request, $matches))
$temp = 'http://www.eojmarket.com/xbox_and_psn_network_status/psn-up.png';
else
die('Unable to connect to the PlayStation Network...');

cache_put_data('psn_status', $temp, 300);
}

$imgPng = imageCreateFromPng($temp);
imageAlphaBlending($imgPng, true);
imageSaveAlpha($imgPng, true);
header("Content-type: image/png");
imagePng($imgPng);
?>
Title: Re: So I upgraded to RC1.1 and some block content broke...
Post by: IchBin on May 17, 2011, 08:42:07 PM
Yes my test script is an exact copy of your script with the exception that I altered the paths to things. As you can see the script is working. Are you saying yours does not work even when hitting the script directly in the browser?
Title: Re: So I upgraded to RC1.1 and some block content broke...
Post by: MoreBloodWine on May 17, 2011, 08:50:13 PM
Quote from: IchBinâ,,¢ on May 17, 2011, 08:42:07 PM
Yes my test script is an exact copy of your script with the exception that I altered the paths to things. As you can see the script is working. Are you saying yours does not work even when hitting the script directly in the browser?
Your version works on my end, I just find it odd that on two sites of mine, one of which is a almost new install with nothing but TP that the script doesnt work.

Still tryin to work on my test site though because this is just weird... provided you saw the video.
Title: Re: So I upgraded to RC1.1 and some block content broke...
Post by: MoreBloodWine on May 17, 2011, 09:04:28 PM
Ok, absolutely 100% as of 20mints or whatever ago brand spanking new SMF 2.0 RC5 test site with TP RC1.1 no edits excpt for a top left HTML block which contains the following.

http://www.eojmarket.com/testforum/

<center>
<img style="margin: 0; padding: 5px 0px 0px 0px;" src="http://www.eojmarket.com/testforum/psn-status.php">
</center>


And the file contains the following...

<?php  
global
$sourcedir;

if (file_exists('/removed/public_html/SSI.php') && !defined('SMF'))
require_once('/removed/public_html/SSI.php');
   elseif (!
defined('SMF'))
    die('This script wasn\'t able to connect to SMF...');
   
if (($temp = cache_get_data('psn_status', 300)) == null)
{
require_once($sourcedir . '/Subs-Package.php');
$request = @fetch_web_data('http://en.playstation.com/psn/');

if ($request !== false && preg_match('~<img src="/static/furn/icons/psn_status/psnstatus_red.gif"/>~smi', $request, $matches))
$temp = 'http://www.eojmarket.com/xbox_and_psn_network_status/psn-down.png';
else if ($request !== false && preg_match('~<img src="/static/furn/icons/psn_status/psnstatus_green.gif"/>~smi', $request, $matches))
$temp = 'http://www.eojmarket.com/xbox_and_psn_network_status/psn-up.png';
else
die('Unable to connect to the PlayStation Network...');

cache_put_data('psn_status', $temp, 300);
}

$imgPng = imageCreateFromPng($temp);
imageAlphaBlending($imgPng, true);
imageSaveAlpha($imgPng, true);
header("Content-type: image/png");
imagePng($imgPng);
?>


If you want, I can give you access to this test sites admin account and even FTP to the test sites folder and for arguments sake, if I disable TP (as seen in the vid) on this brand spanking new test ste the PSN stuff works just fine.
Title: Re: So I upgraded to RC1.1 and some block content broke...
Post by: IchBin on May 17, 2011, 09:18:03 PM
What about logs? Error logs that I've asked you to check a couple times now. I don't have the time to do the personal support on your site right now. Sorry.

Maybe your host changed something too. Check to make sure they didn't upgrade/change their PHP install.
Title: Re: So I upgraded to RC1.1 and some block content broke...
Post by: MoreBloodWine on May 17, 2011, 09:28:57 PM
Quote from: IchBinâ,,¢ on May 17, 2011, 09:18:03 PM
What about logs? Error logs that I've asked you to check a couple times now. I don't have the time to do the personal support on your site right now. Sorry.

Maybe your host changed something too. Check to make sure they didn't upgrade/change their PHP install.
If there were logs to post I would have... all I keep getting is the download stuff. As for my host changing something, not a far as I know. Also, it would be kind of funny for them to change something just as I started playing with TP. On that note, what could my host possible have changed that would allow the PSN stuff to work when TP's not installed but break along with my custom stat sig etc when TP is installed ?
Title: Re: So I upgraded to RC1.1 and some block content broke...
Post by: IchBin on May 17, 2011, 10:28:40 PM
Well if there's nothing in the error log I'm afraid there's nothing I can troubleshoot. Are you looking in your error_log on the server? (Not the SMF error log in the admin panel). Host can often change things without users knowing. A simple config change to tighten security can cause all sorts of problems. It doesn't hurt to ask does it? I don't know what could cause it, that's whey we ask these questions. To see if there's something we need to look into. If you don't want to ask your host these questions, well then we are even more stuck I guess.
Title: Re: So I upgraded to RC1.1 and some block content broke...
Post by: MoreBloodWine on May 18, 2011, 12:07:40 AM
Nothing in the log that pertains to anything forum related...

As for what to ask my host, I wouldnt even know where to begin / what to ask. On top of that, grant it I dont understand alot of things I don't see what they could have possibly done to break all my custom stuff when TP's installed but allow it to work when it's not while also reminding you that even with TP installed it works if I remove the SSI hook.

In any case: http://www.eojmarket.com/php_info.php
Title: Re: So I upgraded to RC1.1 and some block content broke...
Post by: ZarPrime on May 18, 2011, 12:22:13 PM
Well, I don't know what you've got going on with your site but I just looked at your site and it appears that the only thing that isn't working is the XBox Live Status (attached image).

I really don't follow everything that you are trying to do but, if you hit those links directly, it shows the PSN Server Status being down with one and up with with the XBox link ...

http://www.eojmarket.com/xbox_and_psn_network_status/psn-status.php --> (https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Fwww.eojmarket.com%2Fxbox_and_psn_network_status%2Fpsn-status.php&hash=6584f18687f0004dfd64895ba17b4e457b998dfc)
http://www.eojmarket.com/xbox_and_psn_network_status/xbox-live-status.php --> (https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Fwww.eojmarket.com%2Fxbox_and_psn_network_status%2Fxbox-live-status.php&hash=824eddc85a71161d20866679fa55508f874481d9)

What's going on with that anyway?

ZarPrime
Title: Re: So I upgraded to RC1.1 and some block content broke...
Post by: IchBin on May 18, 2011, 03:06:51 PM
Yeah, so now I see that both the psn status and your signature issue are both working...
Title: Re: So I upgraded to RC1.1 and some block content broke...
Post by: MoreBloodWine on May 18, 2011, 03:27:06 PM
Wrong image for the xbox one... as for why there working... I had to make a totally seperate SMF install... link it to the same DB and leave TP out of the equation on it just to be able to use all of my custom code.
Quote from: ZarPrime on May 18, 2011, 12:22:13 PM
Well, I don't know what you've got going on with your site but I just looked at your site and it appears that the only thing that isn't working is the XBox Live Status (attached image).

I really don't follow everything that you are trying to do but, if you hit those links directly, it shows the PSN Server Status being down with one and up with with the XBox link ...

http://www.eojmarket.com/xbox_and_psn_network_status/psn-status.php --> (https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Fwww.eojmarket.com%2Fxbox_and_psn_network_status%2Fpsn-status.php&hash=6584f18687f0004dfd64895ba17b4e457b998dfc)
http://www.eojmarket.com/xbox_and_psn_network_status/xbox-live-status.php --> (https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Fwww.eojmarket.com%2Fxbox_and_psn_network_status%2Fxbox-live-status.php&hash=824eddc85a71161d20866679fa55508f874481d9)

What's going on with that anyway?

ZarPrime
Title: Re: So I upgraded to RC1.1 and some block content broke...
Post by: IchBin on May 18, 2011, 03:30:46 PM
lol, that is quite the workaround. I don't know of any way to troubleshoot this... but I'll keep thinking on how I can figure this out for you.
Title: Re: So I upgraded to RC1.1 and some block content broke...
Post by: MoreBloodWine on May 18, 2011, 03:33:33 PM
Quote from: IchBinâ,,¢ on May 18, 2011, 03:30:46 PM
lol, that is quite the workaround. I don't know of any way to troubleshoot this... but I'll keep thinking on how I can figure this out for you.
Ya well, it's the only workaround I can think of to get this working. At the very least I should probably get that test site back up the way things originally were to try and figure it out because like I said... when TP wasnt installed all was golden but with TP installed it seemed eveything that hooked SMF broke from my status deals to my stat sig seen here and even my custom recent posts block.

Hell, you saw the video...

Ps; Like I said, I'd be more than happy to FTP you to a test ite etc. I made the account yesterday. Just need to get the test site back up... if I didnt delete it yet.

I even just now realized I didnt edit the links for my status sig that showing the "codehook" install as I've deemed it.
Title: Re: So I upgraded to RC1.1 and some block content broke...
Post by: IchBin on May 18, 2011, 05:48:03 PM
What's crazy is that I have tested this code in both versions RC1 and RC1.1 and I cannot get it to work in a block. I remember that you had it working in a block previously, and I swear that I had tried it in a block too. But I can't get it to work in either version of TP. I can get it to work fine when just hitting the script directly, but the minute I add it to a block it makes my whole page go blank with no errors on output in the SMF or server log.
Title: Re: So I upgraded to RC1.1 and some block content broke...
Post by: MoreBloodWine on May 18, 2011, 05:54:09 PM
Quote from: IchBinâ,,¢ on May 18, 2011, 05:48:03 PM
What's crazy is that I have tested this code in both versions RC1 and RC1.1 and I cannot get it to work in a block. I remember that you had it working in a block previously, and I swear that I had tried it in a block too. But I can't get it to work in either version of TP. I can get it to work fine when just hitting the script directly, but the minute I add it to a block it makes my whole page go blank with no errors on output in the SMF or server log.
Souns like your experiencing something weirder than me because all I got was a broken image. It's def with the SMF hook when TP's installed because if you run it by itself with no SMF hooks and use file_get_contents it works fine like it does when TP's not installed (with the SMF hooks in tact). But like I said, it's not just that that breaks when TP's installed it's also my custom recent posts block and my stat sig which consists of nothing more than the following code... nevermind how it looks now since I had to butcher it a bit to get it to work but just with the SSI hook.

<?php

if (file_exists(dirname(__FILE__) . '/codehook/SSI.php')) {
  require(
dirname(__FILE__) . '/codehook/SSI.php');
}
else
die();

signature();

function
signature(){

$data = file_get_contents('index.php');
if (
preg_match('/$forum_version = [\'"]SMF\s*([^\']*)[\'"]/is', $data, $m)
 ||
preg_match('/Software Version:\s*SMF\s*([0-9\.]*(?:\s?RC[0-9]*)?)/is', $data, $m)
) {  
 
// $m[1] now holds the version number  
} else {  
 
// parse error  
}

if (
file_exists(dirname(__FILE__) . '/Sources/TPSubs.php')) {
$tpsrc = file_get_contents('./Sources/TPSubs.php');
if (
preg_match('/^\s*$string = [\'"]<a.*TinyPortal\s*([0-9]+\.[0-9]+(?:\s*RC\s*[0-9])?)/im', $tpsrc, $n)
||
preg_match('/^\*\s*TP version: ([0-9]+\.[0-9]+(?:\s*RC\s*[0-9]*)?)/im', $tpsrc, $n)
) {
// $n[1] now holds the version number
} else {
// parse error
}
}

global
$smcFunc, $context, $settings, $modSettings, $boardurl;

 
$request = $smcFunc['db_query']('', '
     SELECT count(session)        
     FROM {db_prefix}log_online
     '
,
     array()
  );
 
list (
$context['num_users_online']) = $smcFunc['db_fetch_row']($request);  
$smcFunc['db_free_result']($request);

$forum_name = $context['forum_name'];
$forum_url = $boardurl;
$now = forum_time();
$timel = date("F jS Y g:ia T", $now);
$total_members = $context['common_stats']['total_members'];
$online_members = $context['num_users_online'];
$total_topics = $context['common_stats']['total_topics'];
$total_posts = $context['common_stats']['total_posts'];
$last_member = $context['common_stats']['latest_member']['name'];
$forum_version = $m[1];
if (
file_exists(dirname(__FILE__) . '/Sources/TPSubs.php')) {
$tpversion = $n[1];
}

$image = "http://www.eojmarket.com/signature_info.png"; // or where you want
$im = imagecreatefrompng($image);
if (!
$im)
{
 
$im = imagecreatetruecolor(385, 110); // x-coordinate,  y-coordinate
  //default is black but if you want another background color uncheck
  //imagefill($im, 0, 0, 255, 0, 0); // red etc
}

$green = ImageColorAllocate ($im, 23, 124, 17);
$lightblue = ImageColorAllocate ($im, 0, 204, 153);
$lightgreen = ImageColorAllocate ($im, 153, 255, 51);
$red = ImageColorAllocate ($im, 255, 0, 0);
$white = ImageColorAllocate ($im, 255, 255, 255);

ImageString($im, 3, 6, 1, "Statistics of EoJ Market Place", $lightblue);
ImageString($im, 3, 104, 15, "http://www.eojmarket.com", $lightblue);
ImageString($im, 3, 104, 31, "Time: $timel", $lightgreen);
ImageString($im, 3, 104, 46, "Total Members: $total_members", $white);
ImageString($im, 3, 104, 61, "Online Members: $online_members", $white);
ImageString($im, 3, 242, 46, "Total Topics: $total_topics", $white);
ImageString($im, 3, 242, 61, "Total Posts: $total_posts", $white);
ImageString($im, 3, 104, 76, "Latest Member: $last_member", $lightgreen);

if (
file_exists(dirname(__FILE__) . '/Sources/TPSubs.php')) {
ImageString($im, 3, 104, 91, "Versions: Forum ($forum_version) - TP ($tpversion)", $red);
}else{
ImageString($im, 3, 104, 91, "Forum Version: $forum_version", $red);
}

$php = PHP_VERSION;
header("Content-Type: image/png");
if (@
version_compare(PHP_VERSION, '5.1.0', ">="))
 {
 
// if PHP v5.1 ++
 
Imagepng($im,null,9,null);  
 }
else {
   
Imagepng($im,null,9,null);
 }    
ImageDestroy ($im);
}
?>


Ps; It wasnt just block issues, even when I called it directly in the browser... mysite.com/file.php I got the same broken image look that I did in a block for the PSN / xBox things.
Title: Re: So I upgraded to RC1.1 and some block content broke...
Post by: IchBin on May 18, 2011, 06:40:42 PM
I haven't had any problems hitting the script directly....

Would you mind posting your custom recent posts blocks so I can test that?
Title: Re: So I upgraded to RC1.1 and some block content broke...
Post by: MoreBloodWine on May 19, 2011, 12:19:07 AM
Quote from: IchBinâ,,¢ on May 18, 2011, 06:40:42 PM
I haven't had any problems hitting the script directly....

Would you mind posting your custom recent posts blocks so I can test that?
Just updating for arguments sake but sent to you at SMF due the connection issues here I mentioned.
Title: Re: So I upgraded to RC1.1 and some block content broke...
Post by: IchBin on May 19, 2011, 04:11:29 PM
Ok looking at your PSN status code, I am wondering why you chose to use the create image functions? Seems like a lot of work, when all you are doing is outputting an image that you have already created. While troubleshooting your code I noticed that the image functions you are using is what is causing the problem with me. So chopped your code up a bit and changed it to not need those functions by simply echo'ing out the image. That should be a work around at least.

    global $sourcedir;

    if (file_exists('SSI.php') && !defined('SMF'))
        require_once('SSI.php');
    elseif (!defined('SMF'))
         die('This script wasn\'t able to connect to SMF...');

    if (($temp = cache_get_data('psn_status', 300)) == null)
    {
        require_once($sourcedir . '/Subs-Package.php');
        $request = @fetch_web_data('http://en.playstation.com/psn/');

        if ($request !== false && preg_match('~<img src="/static/furn/icons/psn_status/psnstatus_red.gif"/>~smi', $request, $matches))
            $temp = 'psn-down.png';
        else if ($request !== false && preg_match('~<img src="/static/furn/icons/psn_status/psnstatus_green.gif"/>~smi', $request, $matches))
            $temp = 'psn-up.png';
        else
            die('Unable to connect to the PlayStation Network...');

        cache_put_data('psn_status', $temp, 300);
    }

    echo '<img src="' . $temp .'" alt="" />';




I can't figure out the recent topics block yet. The thing that pisses me off is that there is absolutely no errors being output. Nothing in the server log and nothing in the SMF log. Makes it a @#$!@% to troubleshoot.
Title: Re: So I upgraded to RC1.1 and some block content broke...
Post by: MoreBloodWine on May 19, 2011, 09:43:24 PM
Thx and who knows...
Title: Re: So I upgraded to RC1.1 and some block content broke...
Post by: IchBin on May 19, 2011, 10:38:55 PM
I noticed something in your unread topics code. There is no javascript api to define your javascript functions unless you change it to use prototype. Once I changed that setting in blockcode.php your recent blocks post started working for me.
Title: Re: So I upgraded to RC1.1 and some block content broke...
Post by: MoreBloodWine on May 19, 2011, 11:04:36 PM
Quote from: IchBinâ,,¢ on May 19, 2011, 10:38:55 PM
I noticed something in your unread topics code. There is no javascript api to define your javascript functions unless you change it to use prototype. Once I changed that setting in blockcode.php your recent blocks post started working for me.
I already use the prototype.js for lightbox, thats why theres a setting to use or not use it in the block code.