From nobody Sat Mar 5 22:06:00 2022 X-Original-To: freebsd-questions@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 916A619EF06C for ; Sat, 5 Mar 2022 22:06:02 +0000 (UTC) (envelope-from dalescott@shaw.ca) Received: from omta001.cacentral1.a.cloudfilter.net (omta001.cacentral1.a.cloudfilter.net [3.97.99.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4K9zLx3mtmz4fwN for ; Sat, 5 Mar 2022 22:06:01 +0000 (UTC) (envelope-from dalescott@shaw.ca) Received: from shw-obgw-4003a.ext.cloudfilter.net ([10.228.9.183]) by cmsmtp with ESMTP id QaDOn97MJ43SgQcXJnlKhZ; Sat, 05 Mar 2022 22:06:01 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=shaw.ca; s=s20180605; t=1646517961; bh=CE5dd2LGwabP9J4PJK9948Zdw4l317MgfuksAp1XiFo=; h=Date:From:To:Cc:In-Reply-To:References:Subject; b=PpBaE0n+6DKTIFnPhGrQMXYmH7it7s1zOUwLo/hI8GUmr1bigj029h7VmBJX3IiqI t1AgczVqIrFTetHzkuOb/CAYhChKluuGsFaFUWMnjaNysz7hPGMXQRJeEWBE26rKYx tinbmkewk9XZHd2qGC6RGfXaGYghvrKP8znC4MPTdT1XCi6KOxYdrGOeT6lc7QAQYV xMYNWQiJbYtGfKOYGv1Vbd5DG6d6cgDpun1/F27jHILKY7GF95VkXCaRP24+eCmMsS F6HltFSgOXiTSX/pYBOJN45GJM4Y0ox4VoRxkuGS2UB2vHLFHDYR9jALxrrrHF92dZ Cnljh2QhQBPFw== Received: from cds220.dcs.int.inet ([64.59.134.6]) by cmsmtp with ESMTP id QcXInavPQQV6mQcXInNjMz; Sat, 05 Mar 2022 22:06:00 +0000 X-Authority-Analysis: v=2.4 cv=PbTsOwtd c=1 sm=1 tr=0 ts=6223dec8 a=9zdlX7M534QhL7mOrorEvQ==:117 a=FKkrIqjQGGEA:10 a=RDteU5_PNoYA:10 a=_pxgbcHMAAAA:8 a=_Dj-zB-qAAAA:8 a=6I5d2MoRAAAA:8 a=pGLkceISAAAA:8 a=90PLdJ6jAAAA:8 a=NEAV23lmAAAA:8 a=d_vwxoezFxQgmPApmFoA:9 a=6RyHdP9wf0s6W1bbVaoE2bQoMl4=:19 a=QEXdDO2ut3YA:10 a=KSm_7-Y4wPUzMKIS-HsA:9 a=zSts2VLwKLnP_QiC:21 a=_W_S_7VecoQA:10 a=Wq6Fn18McuFsL2SXrvNs:22 a=c-cOe7UV8MviEfHuAVEQ:22 a=IjZwj45LgO3ly-622nXo:22 a=rR5iFTc2WBX2y04PNCJS:22 Date: Sat, 5 Mar 2022 15:06:00 -0700 (MST) From: Dale Scott To: Mario Lobo Cc: freebsd-questions Message-ID: <599882921.762148.1646517960127.JavaMail.zimbra@shaw.ca> In-Reply-To: References: Subject: Re: file upload issues with SuiteCRM V7/8 (or apache24 and php8 diff FreeBSD vs Debian) List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="=_b0c20182-6ebc-4888-9201-37696442d304" X-Originating-IP: [174.0.43.39, 174.0.43.39] X-Mailer: Zimbra 8.8.15_GA_4203 (ZimbraWebClient - GC99 (Linux)/8.8.15_GA_4232) Thread-Topic: file upload issues with SuiteCRM V7/8 (or apache24 and php8 diff FreeBSD vs Debian) Thread-Index: lDiERLliJUkNMR4JnF7POvT1tKLhjw== X-CMAE-Envelope: MS4xfPy1hZJnKI2IoG9Q8Y4W4kIyOP3c8I9tJ2U+RQlJvNIHBlEkmxa04EtJhZ7BSYZvGPJKt0ZOOA1bWzP97ZBn5qE8kQFha+c8i3AABNRn+0cHzb3D3Bky lDKefgZwfGDJfvWWsCSMOW4jAIuLH0Bj1wDvZTXHxfsxWxSHt5REr5aPtEKChYNjrqxDGWtWChs8NWnrECW/HTEJLlJYDqFicvpUyrD992GuoUkQ0OOygD+Q X-Rspamd-Queue-Id: 4K9zLx3mtmz4fwN X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=shaw.ca header.s=s20180605 header.b=PpBaE0n+; dmarc=pass (policy=none) header.from=shaw.ca; spf=pass (mx1.freebsd.org: domain of dalescott@shaw.ca designates 3.97.99.32 as permitted sender) smtp.mailfrom=dalescott@shaw.ca X-Spamd-Result: default: False [-4.10 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[shaw.ca:s=s20180605]; HAS_XOIP(0.00)[]; FROM_HAS_DN(0.00)[]; RWL_MAILSPIKE_GOOD(0.00)[3.97.99.32:from]; R_SPF_ALLOW(-0.20)[+ip4:3.97.99.32/31]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; DWL_DNSWL_NONE(0.00)[shaw.ca:dkim]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[shaw.ca:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[shaw.ca,none]; NEURAL_HAM_SHORT(-1.00)[-1.000]; MLMMJ_DEST(0.00)[freebsd-questions]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:16509, ipnet:3.96.0.0/15, country:US]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_IN_DNSWL_LOW(-0.10)[3.97.99.32:from] X-ThisMailContainsUnwantedMimeParts: N --=_b0c20182-6ebc-4888-9201-37696442d304 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit > From: "Mario Lobo" > To: "Dale Scott (dalescott@shaw)" > Cc: "freebsd-questions" > Sent: Saturday, March 5, 2022 12:40:16 PM > Subject: Re: file upload issues with SuiteCRM V7/8 (or apache24 and php8 diff > FreeBSD vs Debian) > On Sat, Mar 5, 2022, 01:33 Dale Scott < [ mailto:dalescott@shaw.ca | > dalescott@shaw.ca ] > wrote: >> On Mar 1, 2022 6:21 PM, Waitman Gobble < [ mailto:gobble.wa@gmail.com | >> gobble.wa@gmail.com ] > wrote: >>> OK. The latest release they have on their site is 8.x something but >>> there's no mention of it on their git repository, I wonder if they >>> haven't yet released 8.x for PHP 8 to "community". >> Good news. The error had nothing to do with FreeBSD and I had a patch the next >> day. It was nice to see the community response. Thanks again for your help >> Waitman. Cheers, Dale > Hi Dale. > Could you please post the patch, or a link to it? Sure. Sorry for my oversight. The patch replaces line 267 in download.php and line 269 modules/Documents/Document.php, in both SuiteCRM-7.12.4 and . In SuiteCRM-8.0.3 (in SuiteCRM-8.0.3 the files are identical but have been moved to .../legacy/.... directory). E.g. in download.php, replace: if (in_array($row['file_ext'], $sugar_config['allowed_preview'], true)) { with: if (isset($row['file_ext'], $sugar_config['allowed_preview']) && in_array($row['file_ext'], $sugar_config['allowed_preview'], true)) { Link to topic in the SuiteCRM forum with reply from project maintainer Matt with patch: [ https://community.suitecrm.com/t/php-fatal-error-after-file-upload-on-v7-and-v8-solved/84177 | https://community.suitecrm.com/t/php-fatal-error-after-file-upload-on-v7-and-v8-solved/84177 ] Link to issue reported to SuiteCRM GitHub repo: [ https://github.com/salesagility/SuiteCRM/issues/9530 | https://github.com/salesagility/SuiteCRM/issues/9530 ] Cheers, Dale --=_b0c20182-6ebc-4888-9201-37696442d304 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
From: <= /b>"Mario Lobo" <lobo@bsd.com.br>
To: "Dale Sco= tt (dalescott@shaw)" <dalescott@shaw.ca>
Cc: "f= reebsd-questions" <freebsd-questions@freebsd.org>
S= ent: Saturday, March 5, 2022 12:40:16 PM
Subject: Re: file upload issues with SuiteCRM V7/8 (or apache24 and php8 diff FreeB= SD vs Debian)


On Sat, Mar 5, 2022, 01:33 Dale Scott <d= alescott@shaw.ca> wrote:
On Mar 1, 2022 6:21 PM, Waitm= an Gobble <gobble.wa@gmail.com> wro= te:

OK. The latest release they have = on their site is 8.x something but
there's no mention of it on their git repository, I wonder if they
haven't yet released 8.x for PHP 8 to "community".


Good news= . The error had nothing to do with FreeBSD and I had a patch the next day. = It was nice to see the community response. Thanks again for your help Waitm= an. Cheers, Dale

Hi Dale.
=
Could you please post the patch, or a link= to it?

Sure. Sorr= y for my oversight.

The patch replaces line 267 in download.php and line 269 modules/Document= s/Document.php, in both SuiteCRM-7.12.4 and . In SuiteCRM-8.0.3 (in Su= iteCRM-8.0.3 the files are identical but have been moved to .../legacy/....= directory).

E.g. in download.php, replace:

if (in_array($row['file_ext'], $sugar_con= fig['allowed_preview'], true)) {

with:

<= div>if (isset($row['file_ext'], $sugar_config['allowed_preview']) &= ;& in_array($row['file_ext'], $sugar_config['allowed_preview'], true)) = {

=

Link to topic in = the SuiteCRM forum with reply from project maintainer Matt with patch: = ;https://community.suitecrm.com/t/php-fatal-e= rror-after-file-upload-on-v7-and-v8-solved/84177

Link to issue reported to SuiteCRM GitH= ub repo: https://github.com/salesagility/SuiteCRM/issues/9530

Cheers,
D= ale

--=_b0c20182-6ebc-4888-9201-37696442d304--