Author Topic: Bug in VM 1.1.5 for SSL on PHP 5.3?  (Read 8173 times)

blans

  • Jr. Member
  • **
  • Posts: 80
Bug in VM 1.1.5 for SSL on PHP 5.3?
« on: October 18, 2010, 17:01:48 pm »
I just upgraded to VM 1.1.5 because my hoster goes to PHP 5.3.

However I get the error:
Deprecated: Function ereg_replace() is deprecated in /home/users/mysiteftp/mysite.nl/administrator/components/com_virtuemart/global.php on line 137

Shouldn't ereg be preg??? I'm no coder so any help is very welcome.
see also: http://php.net/manual/en/function.ereg-replace.php

If I just change ereg to preg in:

Code: [Select]
$GLOBALS['real_mosConfig_live_site'] = $GLOBALS['mosConfig_live_site'];
if( $_SERVER['SERVER_PORT'] == 443 || @$_SERVER['HTTPS'] == 'on' || @strstr( $page, "checkout." )) {
    // Change the global Live Site Value to HTTPS
    $GLOBALS['mosConfig_live_site'] = ereg_replace('/$','',SECUREURL);
    $mm_action_url = SECUREURL;

I get an error that there is no closing tag or something... So just changing ereg to preg is not enough.

In other posts people advice to switch off the error reporting but 1. I don't know how to switch this off and 2. I don't think this is a real cure.

What to do...?

Multilingual VM Webshop
Joomla 1.5.26
VM 1.1.9
Joomfish 2.1.7
Artio JoomSEF 3.8.2
CSVi VM 3.8.1

VM2 has the power of Magento and the usability of Opencart. I just can't get it to do what I managed to do with VM1 for so long...

blans

  • Jr. Member
  • **
  • Posts: 80
Re: Bug in VM 1.1.5 for SSL on PHP 5.3?
« Reply #1 on: October 26, 2010, 15:44:58 pm »
No One??? Soon everyone will go to a PHP 5.3 environment so please don't wait until it hits you but try to help me so VM can fix this.

Virtuemart now gives an error with PHP 5.3 and those of us with a good hosting company are finding this to be a major problem! :'(

Multilingual VM Webshop
Joomla 1.5.26
VM 1.1.9
Joomfish 2.1.7
Artio JoomSEF 3.8.2
CSVi VM 3.8.1

VM2 has the power of Magento and the usability of Opencart. I just can't get it to do what I managed to do with VM1 for so long...

jenkinhill

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 27670
  • Always on vacation
    • Jenkin Hill Internet
Re: Bug in VM 1.1.5 for SSL on PHP 5.3?
« Reply #2 on: October 26, 2010, 19:13:09 pm »
What you saw was a "notice" of a deprecated function - it is not an "error" message and the function still works. It may not work, however, in PHP versions to be released at some future time.

Many hosts install PHP5.3 with the standard supplied php.ini which has notice reporting turned on by default. This was not the case with earlier PHP versions that I have used, where notices were turned off. It is a simple matter to edit php.ini as the file actually contains an explanation of the notice/error reporting functions - and any good host will allow access to that file to edit it. Alternatively you can use .htaccess

See http://forum.virtuemart.net/index.php?topic=77498.msg257431#msg257431

I'm sure that VirtueMart 1.5 (now VirtueMart 2) wont have any issues with deprecated code.
Kelvyn

Jenkin Hill Internet,
Lowestoft, Suffolk, UK

Unsolicited PMs/emails will be ignored.

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Currently using VM 3.6.11 10292 on Joomla 3.9.16 PHP 7.0.33

blans

  • Jr. Member
  • **
  • Posts: 80
Re: Bug in VM 1.1.5 for SSL on PHP 5.3?
« Reply #3 on: October 28, 2010, 13:39:11 pm »
Thanks Jenkinhill,

I understand. My host gives me the possibility to show the notices or not, so no problem. I was also a bit frustrated because Joomfish gave some problems. Apparently the switch to PHP 5.3 is pretty heavy.

Because my website is Joomla-VM-Artio-Fish-CP I'm always the first to get hit by any update or change because there is almost always a component that gets effected or effects the others.

Thank you for your info. Hopefully everything keeps working smoothly.
Multilingual VM Webshop
Joomla 1.5.26
VM 1.1.9
Joomfish 2.1.7
Artio JoomSEF 3.8.2
CSVi VM 3.8.1

VM2 has the power of Magento and the usability of Opencart. I just can't get it to do what I managed to do with VM1 for so long...

sirius

  • Beginner
  • *
  • Posts: 29
    • OCTeam
Re: Bug in VM 1.1.5 for SSL on PHP 5.3?
« Reply #4 on: January 24, 2011, 00:37:59 am »
Hi,

it still on 1.1.6

replace:
Code: [Select]
    $GLOBALS['mosConfig_live_site'] = ereg_replace('/$','',SECUREURL);
by:
Code: [Select]
    $GLOBALS['mosConfig_live_site'] = preg_replace('/\/$/','',SECUREURL);

lejeannotfr

  • Jr. Member
  • **
  • Posts: 59
Re: Bug in VM 1.1.5 for SSL on PHP 5.3?
« Reply #5 on: April 23, 2013, 23:17:47 pm »
Quote
Hi,

it still on 1.1.6

yes... and it is still in 1.1.9...