Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 03 Feb 2019 17:07:20 +0000
From:      bugzilla-noreply@freebsd.org
To:        ports-bugs@FreeBSD.org
Subject:   [Bug 235467] www/oscommerce
Message-ID:  <bug-235467-7788@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D235467

            Bug ID: 235467
           Summary: www/oscommerce
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Many People
          Priority: ---
         Component: Individual Port(s)
          Assignee: ports-bugs@FreeBSD.org
          Reporter: gwq_uk@yahoo.com

Created attachment 201689
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D201689&action=
=3Dedit
Both files that can be extracted using "tar xzf both_files.tgz"

Background:
For some time the oscommerce port has been ignored due to compatibility
problems with php70+.
The main issue is that "each()" has been "deprecated" from php70+ and
oscommerce uses it extensively.
I downloaded the latest oscommerce from oscommerce.com which at the time was
version 2.3.4.1 .

After looking at the effected code and carefully translating each command t=
hat
used "each()" to use "foreach()" instead. Which has been available since
php4.?!

=3D=3D=3D
#This code example 1:
   reset($array);
   while (list($key, ) =3D each($array)) {

#Is updated to this code example 1:
   foreach(array_keys($array) as $key) {
=3D=3D=3D
#This code example 2:
reset($array);
while (list(, $value) =3D each($array)) {

#Is updated to this code example 2
foreach($array as $value) {
=3D=3D=3D
# This code example 3
reset($array);
while (list($key, $value) =3D each($array)) {

#Is updated to example 3
foreach($array as $key =3D> $value) {
=3D=3D=3D

Thses are the proposed fixes to all the effected files in oscommerce2.3.4.1
Attached are the "diff -u" (patches_oscommerce_php7_each.tgz) and actual
patched files ending in "<file>.patched"
(patched_files_oscommerce_php7_each.tgz)

Please look at the code carefully!

Thanks for your help.
There is also a list of the patched files called "files_patched".

I have also installed (from packages) php73-mysqli-7.3.1_1          # The
mysqli shared extension for php

Note: I still get the error: "Unknown extension mysql for PHP 73."

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-235467-7788>