[Bug 235467] www/oscommerce
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Sun Feb 3 17:07:22 UTC 2019
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=235467
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 at FreeBSD.org
Reporter: gwq_uk at yahoo.com
Created attachment 201689
--> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=201689&action=edit
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 that
used "each()" to use "foreach()" instead. Which has been available since
php4.?!
===
#This code example 1:
reset($array);
while (list($key, ) = each($array)) {
#Is updated to this code example 1:
foreach(array_keys($array) as $key) {
===
#This code example 2:
reset($array);
while (list(, $value) = each($array)) {
#Is updated to this code example 2
foreach($array as $value) {
===
# This code example 3
reset($array);
while (list($key, $value) = each($array)) {
#Is updated to example 3
foreach($array as $key => $value) {
===
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."
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-ports-bugs
mailing list