Spice up your Joomla and Mambo website with 2 great extensions!
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

 
Advanced search

38736 Posts in 10488 Topics by 27226 Members
Latest Member: tbl
Pages: [1]   Go Down
  Print  
Author Topic: Notice: Undefined variable: gd_support  (Read 4636 times)
0 Members and 1 Guest are viewing this topic.
dragonder
Newbie
*
Offline Offline

Posts: 2


View Profile
« on: April 15, 2008, 04:27:08 PM »

Hi,

I did a search on this but it seems uncovered yet.
We installed gd2 graphic lib on the server.

But the front end stil ends up with the following error:

Notice: Undefined variable: gd_support in C:\web\vrijdag.be\wwwroot\fotoshop\plugins\content\jwsigpro.php on line 100

you can check it live on http://www.vrijdag.be/fotoshop


any suggestions?

thnx

drag

edit: the images seem to open on the bottom of the page though.
« Last Edit: April 15, 2008, 04:28:50 PM by dragonder » Logged

Signatures appear only for members with more than 10 posts
dragonder
Newbie
*
Offline Offline

Posts: 2


View Profile
« Reply #1 on: April 15, 2008, 04:45:07 PM »

I erased that part in the code and it seems to work fine :-|
Logged

Signatures appear only for members with more than 10 posts
JoomlaWorks Support Team
Hero Member
*****
Offline Offline

Posts: 1461



View Profile WWW
« Reply #2 on: April 16, 2008, 05:28:12 PM »

At line 75 of the plugin just change the
Code:
if(!function_exists("gd_info")) {
to
Code:
if(function_exists("gd_info")) {

Thank you
« Last Edit: January 13, 2009, 12:57:26 PM by vinikey » Logged

JoomlaWorks Support Team
munchdes
Newbie
*
Offline Offline

Posts: 2


View Profile
« Reply #3 on: January 13, 2009, 12:54:09 AM »

I am getting the same error on the standard version (not the pro version):

Code:
Notice: Undefined variable: gd_support in .../oldnellynew.com.au/www/plugins/content/jwsig.php on line 83

Code on line 83 is:

Code:
if(count($gd_support)) {
foreach ($gdsupport as $k=>$v) {echo $v;}

Running Joomla! 1.5.9
The component is functioning reasonably well, I have a small layout issue but it may be completely unrelated. Any resolution for the error displayed would be great?

Luke
Logged

Signatures appear only for members with more than 10 posts
JoomlaWorks Support Team
Hero Member
*****
Offline Offline

Posts: 1461



View Profile WWW
« Reply #4 on: January 13, 2009, 01:02:52 PM »

Hi!

In the code, between the lines 74 to 86, can you see the follow code?
Code:
// GD2 Library Check
if(function_exists("gd_info")) {
   $gdinfo = gd_info();
   $gdsupport = array();
   $version = intval(ereg_replace('[[:alpha:][:space:]()]+', '', $gdinfo['GD Version']));
   if($version!=2) $gdsupport[] = '<div class="message">'._SIGPRO_GD_LIBMISSING.'</div>';
   if (!$gdinfo['JPG Support']) $gdsupport[] = '<div class="message">'._SIGPRO_GD_LIBNOJPG.'</div>';
   if (!$gdinfo['GIF Create Support']) $gdsupport[] = '<div class="message">'._SIGPRO_GD_LIBNOGIF.'</div>';
   if (!$gdinfo['PNG Support']) $gdsupport[] = '<div class="message">'._SIGPRO_GD_LIBNOPNG.'</div>';
   if(count($gd_support)) {
foreach ($gdsupport as $k=>$v) {echo $v;}
   }
}
It's strange because the $gd_support is initialized at line 77
Let's try this

Change
Code:
if(count($gd_support)) {
foreach ($gdsupport as $k=>$v) {echo $v;}
}
to
Code:
if(isset($gd_support) && count($gd_support)) {
foreach ($gdsupport as $k=>$v) {echo $v;}
}


Thank you!
Logged

JoomlaWorks Support Team
munchdes
Newbie
*
Offline Offline

Posts: 2


View Profile
« Reply #5 on: January 14, 2009, 03:31:05 AM »

Fixed!

Perfect, thanks very much!

Luke
Logged

Signatures appear only for members with more than 10 posts
Mario
Newbie
*
Offline Offline

Posts: 1


View Profile
« Reply #6 on: February 13, 2009, 04:47:27 PM »

It's strange because the $gd_support is initialized at line 77
Let's try this

Change
Code:
if(count($gd_support)) {
foreach ($gdsupport as $k=>$v) {echo $v;}
}
to
Code:
if(isset($gd_support) && count($gd_support)) {
foreach ($gdsupport as $k=>$v) {echo $v;}
}


Thank you!

Hi,
no $gd_support isn't initialized, but $gdsupport is (note the underscore)

Your isset solution won't really help, since there's no $gd_support the if() can't possibly be true regardless of GD2 working or not.

It's simply a typo, try to change

Code:
if(count($gd_support)) {

to

Code:
if(count($gdsupport)) {

and it should work as expected.

Cheers, Mario
Logged

Signatures appear only for members with more than 10 posts
Pages: [1]   Go Up
  Print  
 
Jump to: