VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: skeg64 on November 29, 2011, 11:35:53 AM

Title: Does VM 2 still support PHP 5.1?
Post by: skeg64 on November 29, 2011, 11:35:53 AM
I have searched but can't find system requirements anywhere.

I am using PHP 5.1.6, which is supported by Joomla 1.5

If so, I have found references in VM to PHP functions that aren't supported in 5.1.
Title: Re: Does VM 2 still support PHP 5.1?
Post by: RolandD on November 29, 2011, 15:59:39 PM
I don't think VM2 should support PHP 5.1.6 it is old and no longer maintained and so is PHP 5.2. Everything should move to PHP 5.3, this is the current maintained version.
Title: Re: Does VM 2 still support PHP 5.1?
Post by: skeg64 on November 30, 2011, 01:45:36 AM
I agree, but that was not the question.

Should I report PHP 5.1 incompatibilities as bugs or not?
Title: Re: Does VM 2 still support PHP 5.1?
Post by: Milbo on November 30, 2011, 14:51:57 PM
No, dont report this as a bug.
Imho we just support one of the latest 5.2.x, but not 5.1
Title: Re: Does VM 2 still support PHP 5.1?
Post by: skeg64 on December 01, 2011, 03:03:10 AM
OK, but so far I have only had to make the following change: In adminstrator/components/com_virtuemart/models/config.php around line 90 there is a call to PHP's pathinfo() function. This function doesn't return the 'filename' in PHP 5.1. So I changed:


$path_info = pathinfo($file);


to:


$path_info = pathinfo($file);
if (!array_key_exists('filename', $path_info)) {
$path_info['filename'] = str_replace('.'.$path_info['extension'], '', $path_info['basename']);
}


see: http://php.net/manual/en/function.pathinfo.php
Title: Re: Does VM 2 still support PHP 5.1?
Post by: Milbo on December 01, 2011, 11:02:35 AM
ah good to know, yeah to add such a small fix for php5.1  should be considered. yes