Keyword

ereg_replace deprecated error after enabling gd2 lib

More
15 years 4 months ago #29151 by Ivy
I installed the Simple Gallery plugin in Joomla.  Worked right away except for the thumbnails.  

I noticed on the install it said either showthumbs.php must be not writable or gd library is not installed.

I went into php.ini and changed this:
;extension=php_gd2.dll

to
extension=php_gd2.dll

I then restarted IIS web server.

Now the page errors with this text:

PHP Deprecated: Function ereg_replace() is deprecated in C:\inetpub\wwwroot\joomla15\plugins\content\jwsig.php on line 78 PHP Notice: Undefined index: JPG Support in C:\inetpub\wwwroot\joomla15\plugins\content\jwsig.php on line 80 PHP Notice: Undefined variable: gd_support in C:\inetpub\wwwroot\joomla15\plugins\content\jwsig.php on line 83 \

Anyone know what I'm doing wrong?  

Thank you so much.

Please Log in or Create an account to join the conversation.

More
15 years 1 month ago #29152 by karmalingyel
even me i am geting same problem but out of three i think i can solve two

in JPG, insert JPEG
  in $gd_ support remove underscore

but even me i am strugling with third problem ereg_replace

Please Log in or Create an account to join the conversation.

More
14 years 6 months ago #29153 by tyrantit

I installed the Simple Gallery plugin in Joomla.  Worked right away except for the thumbnails.  

I noticed on the install it said either showthumbs.php must be not writable or gd library is not installed.

I went into php.ini and changed this:

;extension=php_gd2.dll

to
extension=php_gd2.dll

I then restarted IIS web server.

Now the page errors with this text:

PHP Deprecated: Function ereg_replace() is deprecated in C:\inetpub\wwwroot\joomla15\plugins\content\jwsig.php on line 78 PHP Notice: Undefined index: JPG Support in C:\inetpub\wwwroot\joomla15\plugins\content\jwsig.php on line 80 PHP Notice: Undefined variable: gd_support in C:\inetpub\wwwroot\joomla15\plugins\content\jwsig.php on line 83 \

Anyone know what I'm doing wrong?  

Thank you so much.

you should change code:
$version = intval(ereg_replace('[[:alpha:][:space:]()]+', '', $gdinfo));
to
preg_match('/\d/', $gdinfo, $match);
$version = $match[0];
:-*

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum