BeckyLiu Posted July 24, 2011 Share Posted July 24, 2011 I'm pretty much a php n00b and have been trying to google/find how to sort out my ereg depreciatation problems but I have no idea what I'm doing. I've uploaded OSC V2.2 RC2a PHP 5.3 compatible files downloaded from the contributions. I have also installed the product listing contribution to make it list the product horizontally. http://shop.beckyliu.com/index.php?cPath=3_10&sort=2a&filter_id=4 This is the error I'm getting on that page above Deprecated: Function ereg() is deprecated in /srv/disk3/548372/www/shop.beckyliu.com/index.php on line 195 Line 195 if ( (!isset($HTTP_GET_VARS['sort'])) || (!ereg('^[1-8][ad]$', $HTTP_GET_VARS['sort'])) || (substr($HTTP_GET_VARS['sort'], 0, 1) > sizeof($column_list)) ) { for ($i=0, $n=sizeof($column_list); $i<$n; $i++) { if ($column_list[$i] == 'PRODUCT_LIST_NAME') { $HTTP_GET_VARS['sort'] = $i+1 . 'a'; $listing_sql .= " order by pd.products_name"; break; Really annoyed and worried this is going to keep happening and I'll find more errors. Thanks! Quote Link to comment Share on other sites More sharing options...
pdcelec Posted July 24, 2011 Share Posted July 24, 2011 I'm pretty much a php n00b and have been trying to google/find how to sort out my ereg depreciatation problems but I have no idea what I'm doing. I've uploaded OSC V2.2 RC2a PHP 5.3 compatible files downloaded from the contributions. I have also installed the product listing contribution to make it list the product horizontally. http://shop.beckyliu.com/index.php?cPath=3_10&sort=2a&filter_id=4 This is the error I'm getting on that page above Deprecated: Function ereg() is deprecated in /srv/disk3/548372/www/shop.beckyliu.com/index.php on line 195 Line 195 if ( (!isset($HTTP_GET_VARS['sort'])) || (!ereg('^[1-8][ad]$', $HTTP_GET_VARS['sort'])) || (substr($HTTP_GET_VARS['sort'], 0, 1) > sizeof($column_list)) ) { for ($i=0, $n=sizeof($column_list); $i<$n; $i++) { if ($column_list[$i] == 'PRODUCT_LIST_NAME') { $HTTP_GET_VARS['sort'] = $i+1 . 'a'; $listing_sql .= " order by pd.products_name"; break; Really annoyed and worried this is going to keep happening and I'll find more errors. Thanks! Change that piece of code with if ( (!isset($_GET['sort'])) || (!preg_match('/^[1-8][ad]$/', $_GET['sort'])) || (substr($_GET['sort'], 0, 1) > sizeof($column_list)) ) { for ($i=0, $n=sizeof($column_list); $i<$n; $i++) { if ($column_list[$i] == 'PRODUCT_LIST_NAME') { $_GET['sort'] = $i+1 . 'a'; $listing_sql .= " order by pd.products_name"; break; BeckyLiu 1 Quote Link to comment Share on other sites More sharing options...
Guest Posted July 24, 2011 Share Posted July 24, 2011 Use the deprecated ereg contribution to look at all of the files that need to be updated. Chris Quote Link to comment Share on other sites More sharing options...
MrPhil Posted July 24, 2011 Share Posted July 24, 2011 (edited) Use the deprecated ereg contribution to look at all of the files that need to be updated. Is that just for the base osC code, or does that also fix any arbitrary contribution's code? I suspect the former, which means the OP will still have to manually fix any deprecated code found in her added contributions. http://us.php.net/manual/en/migration53.deprecated.php is the full list of PHP calls that may need to be changed, and how to change them. Edited July 24, 2011 by MrPhil BeckyLiu 1 Quote Link to comment Share on other sites More sharing options...
BeckyLiu Posted July 24, 2011 Author Share Posted July 24, 2011 Yeh MrPhil is right. I have already changed all of the files that needed to be updated through this contribution i think the product listing one effed it up a bit. @pdcelec Thank you so much!! It worked!!!!!! Thanks guys for the quick help! Quote Link to comment Share on other sites More sharing options...
germ Posted July 24, 2011 Share Posted July 24, 2011 Visit the link below: How to Secure Your Site Pay close attention to "SECURING THE ADMIN" - Yours is vulnerable. It's easier to do a few security fixes now than to clean up a hacked store later. And if you don't secure the admin your shop will be hacked. It's just a question of when...Today, tomorrow, next week, next month... Take your pick They always are. :'( BeckyLiu 1 Quote If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there > Link to comment Share on other sites More sharing options...
BeckyLiu Posted July 25, 2011 Author Share Posted July 25, 2011 Visit the link below: How to Secure Your Site Pay close attention to "SECURING THE ADMIN" - Yours is vulnerable. It's easier to do a few security fixes now than to clean up a hacked store later. And if you don't secure the admin your shop will be hacked. It's just a question of when...Today, tomorrow, next week, next month... Take your pick They always are. :'( I've secured it as much as I can for now thanks for the help/tips. Am slowly getting there with my shop now!! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.