These forums are provided for community interactions only. For official support please submit a support ticket.

You are not logged in.

#1 2010-08-11 23:12:17

geoffroth
New Member
Registered: 2010-07-04
Posts: 1

PHP XML Builder (images.php) & php 5.3.0 incompatibility

My apologies if this has been covered elsewhere.

Line 65 of images.php:

if (eregi('.jpg|.gif|.png|.swf|.flv', $image)) {

Causes the following php warning to show and the gallery display to fail (at least for me):
<b>Deprecated</b>:  Function eregi() is deprecated in <b>images.php</b> on line <b>65</b>

Turns out eregi is deprecated as of 5.3.0:
http://php.net/manual/en/function.eregi.php

Now, I'm no regex master, but I replaced that line with:
if (preg_match('/.jpg|.gif|.png|.swf|.flv/i', $image)) {

...and it seems to have done the trick.
-g

Offline

 

#2 2011-04-11 07:25:49

sleepless
New Member
Registered: 2010-01-06
Posts: 2

Re: PHP XML Builder (images.php) & php 5.3.0 incompatibility

Thank you.

This was real lifesaver, for SSP Standalone.

This will likely be a big help when people run into trouble after upgrades.

Offline

 

#3 2011-08-30 17:16:10

pcook
New Member
Registered: 2006-09-18
Posts: 2

Re: PHP XML Builder (images.php) & php 5.3.0 incompatibility

This saved me. Thanks. When I came across the error my first thought was to download the images.php file with hopes it had been updated. Maybe you could add this fix permanently to the downloadable file?

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson