Date: Sat, 5 Mar 2022 15:06:00 -0700 (MST) From: Dale Scott <dalescott@shaw.ca> To: Mario Lobo <lobo@bsd.com.br> Cc: freebsd-questions <freebsd-questions@freebsd.org> Subject: Re: file upload issues with SuiteCRM V7/8 (or apache24 and php8 diff FreeBSD vs Debian) Message-ID: <599882921.762148.1646517960127.JavaMail.zimbra@shaw.ca> In-Reply-To: <CA%2ByoEx-PMZVae3_s7K0hd10Y1-myT3v%2BKNWuD=jQP7abpRBTNA@mail.gmail.com> References: <CAFuo_fzwWoideFk7AEt3JJephZAFfn0Ty_h==H7AUTfoNFe_nA@mail.gmail.com> <a571119b-d7d5-4f56-800a-019230095b42@email.android.com> <CA%2ByoEx-PMZVae3_s7K0hd10Y1-myT3v%2BKNWuD=jQP7abpRBTNA@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--=_b0c20182-6ebc-4888-9201-37696442d304 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit > From: "Mario Lobo" <lobo@bsd.com.br> > To: "Dale Scott (dalescott@shaw)" <dalescott@shaw.ca> > Cc: "freebsd-questions" <freebsd-questions@freebsd.org> > 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 <html><body><div style=3D"font-family: arial, helvetica, sans-serif; font-s= ize: 10pt; color: #000000"><div data-marker=3D"__SIG_PRE__"><div><div style= =3D"font-size:13.3333px"></div></div></div><div data-marker=3D"__HEADERS__"= ><blockquote style=3D"border-left:2px solid #1010FF;margin-left:5px;padding= -left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:n= one;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><span style=3D"= font-family: arial, helvetica, sans-serif; font-size: 12pt;" data-mce-style= =3D"font-family: arial, helvetica, sans-serif; font-size: 12pt;"><b>From: <= /b>"Mario Lobo" <lobo@bsd.com.br></span><br><span style=3D"font-famil= y: arial, helvetica, sans-serif; font-size: 12pt;" data-mce-style=3D"font-f= amily: arial, helvetica, sans-serif; font-size: 12pt;"><b>To: </b>"Dale Sco= tt (dalescott@shaw)" <dalescott@shaw.ca></span><br><span style=3D"fon= t-family: arial, helvetica, sans-serif; font-size: 12pt;" data-mce-style=3D= "font-family: arial, helvetica, sans-serif; font-size: 12pt;"><b>Cc: </b>"f= reebsd-questions" <freebsd-questions@freebsd.org></span><br><span sty= le=3D"font-family: arial, helvetica, sans-serif; font-size: 12pt;" data-mce= -style=3D"font-family: arial, helvetica, sans-serif; font-size: 12pt;"><b>S= ent: </b>Saturday, March 5, 2022 12:40:16 PM</span><br><span style=3D"font-= family: arial, helvetica, sans-serif; font-size: 12pt;" data-mce-style=3D"f= ont-family: arial, helvetica, sans-serif; font-size: 12pt;"><b>Subject: </b= >Re: file upload issues with SuiteCRM V7/8 (or apache24 and php8 diff FreeB= SD vs Debian)</span><br></blockquote></div><div data-marker=3D"__QUOTED_TEX= T__"><blockquote style=3D"border-left:2px solid #1010FF;margin-left:5px;pad= ding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decorati= on:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><div dir=3D= "auto"><div><br><br><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gm= ail_attr"><span style=3D"font-family: arial, helvetica, sans-serif; font-si= ze: 12pt;" data-mce-style=3D"font-family: arial, helvetica, sans-serif; fon= t-size: 12pt;">On Sat, Mar 5, 2022, 01:33 Dale Scott <<a href=3D"mailto:= dalescott@shaw.ca" target=3D"_blank" rel=3D"nofollow noopener noreferrer">d= alescott@shaw.ca</a>> wrote:</span><br></div><blockquote class=3D"gmail_= quote" style=3D"margin:0 0 0 0.8ex;border-left:1px #ccc solid;padding-left:= 1ex"><div dir=3D"auto"><div dir=3D"auto"><span style=3D"font-family: arial,= helvetica, sans-serif; font-size: 12pt;" data-mce-style=3D"font-family: ar= ial, helvetica, sans-serif; font-size: 12pt;">On Mar 1, 2022 6:21 PM, Waitm= an Gobble <<a href=3D"mailto:gobble.wa@gmail.com" rel=3D"noreferrer nofo= llow noopener noreferrer" target=3D"_blank">gobble.wa@gmail.com</a>> wro= te:</span><br></div><div class=3D"gmail_extra" dir=3D"auto"><div class=3D"g= mail_quote"><blockquote style=3D"margin:0 0 0 0.8ex;border-left:1px #ccc so= lid;padding-left:1ex"><p dir=3D"ltr"><span style=3D"font-family: arial, hel= vetica, sans-serif; font-size: 12pt;" data-mce-style=3D"font-family: arial,= helvetica, sans-serif; font-size: 12pt;">OK. The latest release they have = on their site is 8.x something but </span><br><span style=3D"font-family: arial, helvetica, sans-serif; font-s= ize: 12pt;" data-mce-style=3D"font-family: arial, helvetica, sans-serif; fo= nt-size: 12pt;"> there's no mention of it on their git repository, I wonder if they </span><br><span style=3D"font-family: arial, helvetica, sans-serif; font-s= ize: 12pt;" data-mce-style=3D"font-family: arial, helvetica, sans-serif; fo= nt-size: 12pt;"> haven't yet released 8.x for PHP 8 to "community".</span><br></p></blockquo= te></div></div><div dir=3D"auto"><br></div><div dir=3D"auto"><span style=3D= "font-family: arial, helvetica, sans-serif; font-size: 12pt;" data-mce-styl= e=3D"font-family: arial, helvetica, sans-serif; font-size: 12pt;">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</span></div></div></blockquote></div></div><div dir=3D"aut= o"><br></div><div dir=3D"auto"><span style=3D"font-family: arial, helvetica= , sans-serif; font-size: 12pt;" data-mce-style=3D"font-family: arial, helve= tica, sans-serif; font-size: 12pt;">Hi Dale.</span></div><div dir=3D"auto">= <br></div><div dir=3D"auto"><span style=3D"font-family: arial, helvetica, s= ans-serif; font-size: 12pt;" data-mce-style=3D"font-family: arial, helvetic= a, sans-serif; font-size: 12pt;">Could you please post the patch, or a link= to it?</span></div></div></blockquote><div><br></div><div><span style=3D"f= ont-family: arial, helvetica, sans-serif; font-size: 12pt;" data-mce-style= =3D"font-family: arial, helvetica, sans-serif; font-size: 12pt;">Sure. Sorr= y for my oversight.</span></div><div><br data-mce-bogus=3D"1"></div><div><s= pan style=3D"font-family: arial, helvetica, sans-serif; font-size: 12pt;" d= ata-mce-style=3D"font-family: arial, helvetica, sans-serif; font-size: 12pt= ;">The patch replaces <span style=3D"color: rgb(0, 0, 0); font-style: = normal; font-variant-ligatures: normal; font-variant-caps: normal; font-wei= ght: 400; letter-spacing: normal; orphans: 2; text-align: start; text-inden= t: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing:= 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);= text-decoration-thickness: initial; text-decoration-style: initial; text-d= ecoration-color: initial; float: none; display: inline !important;" data-mc= e-style=3D"color: #000000; font-style: normal; font-variant-ligatures: norm= al; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; or= phans: 2; text-align: start; text-indent: 0px; text-transform: none; white-= space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px= ; background-color: #ffffff; text-decoration-thickness: initial; text-decor= ation-style: initial; text-decoration-color: initial; float: none; display:= inline !important;">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).</span></span></div><div><span style=3D"color: rgb(0, 0, 0); fo= nt-family: arial, helvetica, sans-serif; font-size: 12pt; font-style: norma= l; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: = 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0p= x; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;= -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text= -decoration-thickness: initial; text-decoration-style: initial; text-decora= tion-color: initial; float: none; display: inline !important;" data-mce-sty= le=3D"color: #000000; font-family: arial, helvetica, sans-serif; font-size:= 12pt; font-style: normal; font-variant-ligatures: normal; font-variant-cap= s: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align= : start; text-indent: 0px; text-transform: none; white-space: normal; widow= s: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: = #ffffff; text-decoration-thickness: initial; text-decoration-style: initial= ; text-decoration-color: initial; float: none; display: inline !important;"= ><br data-mce-bogus=3D"1"></span></div><div><span style=3D"color: rgb(0, 0,= 0); font-family: arial, helvetica, sans-serif; font-size: 12pt; font-style= : normal; font-variant-ligatures: normal; font-variant-caps: normal; font-w= eight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-ind= ent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacin= g: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255= ); text-decoration-thickness: initial; text-decoration-style: initial; text= -decoration-color: initial; float: none; display: inline !important;" data-= mce-style=3D"color: #000000; font-family: arial, helvetica, sans-serif; fon= t-size: 12pt; font-style: normal; font-variant-ligatures: normal; font-vari= ant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; tex= t-align: start; text-indent: 0px; text-transform: none; white-space: normal= ; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-= color: #ffffff; text-decoration-thickness: initial; text-decoration-style: = initial; text-decoration-color: initial; float: none; display: inline !impo= rtant;">E.g. in download.php, replace:</span></div><div><span style=3D"font= -size: 12pt; font-family: arial, helvetica, sans-serif;" data-mce-style=3D"= font-size: 12pt; font-family: arial, helvetica, sans-serif;"><br data-mce-b= ogus=3D"1"></span></div><div><span style=3D"font-size: 12pt; font-family: a= rial, helvetica, sans-serif;" data-mce-style=3D"font-size: 12pt; font-famil= y: arial, helvetica, sans-serif;">if (in_array($row['file_ext'], $sugar_con= fig['allowed_preview'], true)) {</span><br></div><div><br data-mce-bogus=3D= "1"></div><div><span style=3D"font-family: arial, helvetica, sans-serif; fo= nt-size: 12pt;" data-mce-style=3D"font-family: arial, helvetica, sans-serif= ; font-size: 12pt;">with:</span></div><div><br data-mce-bogus=3D"1"></div><= div><span style=3D"font-family: arial, helvetica, sans-serif; font-size: 12= pt;" data-mce-style=3D"font-family: arial, helvetica, sans-serif; font-size= : 12pt;">if (isset($row['file_ext'], $sugar_config['allowed_preview']) &= ;& in_array($row['file_ext'], $sugar_config['allowed_preview'], true)) = {</span><br data-mce-bogus=3D"1"></div><div><br data-mce-bogus=3D"1"></div>= <div><span style=3D"font-family: arial, helvetica, sans-serif; font-size: 1= 2pt;" data-mce-style=3D"font-family: arial, helvetica, sans-serif; font-siz= e: 12pt;"><br data-mce-bogus=3D"1"></span></div><div><span style=3D"font-fa= mily: arial, helvetica, sans-serif; font-size: 12pt;" data-mce-style=3D"fon= t-family: arial, helvetica, sans-serif; font-size: 12pt;">Link to topic in = the SuiteCRM forum with reply from project maintainer Matt with patch: = ;<a href=3D"https://community.suitecrm.com/t/php-fatal-error-after-file-upl= oad-on-v7-and-v8-solved/84177">https://community.suitecrm.com/t/php-fatal-e= rror-after-file-upload-on-v7-and-v8-solved/84177</a></span></div><div><br d= ata-mce-bogus=3D"1"></div><div><span style=3D"font-family: arial, helvetica= , sans-serif; font-size: 12pt;" data-mce-style=3D"font-family: arial, helve= tica, sans-serif; font-size: 12pt;">Link to issue reported to SuiteCRM GitH= ub repo: <a href=3D"https://github.com/salesagility/SuiteCRM/issues/95= 30">https://github.com/salesagility/SuiteCRM/issues/9530</a></span></div><d= iv><br data-mce-bogus=3D"1"></div><div><span style=3D"font-family: arial, h= elvetica, sans-serif; font-size: 12pt;" data-mce-style=3D"font-family: aria= l, helvetica, sans-serif; font-size: 12pt;">Cheers,</span></div><div><span = style=3D"font-family: arial, helvetica, sans-serif; font-size: 12pt;" data-= mce-style=3D"font-family: arial, helvetica, sans-serif; font-size: 12pt;">D= ale</span></div><div><br data-mce-bogus=3D"1"></div></div></div></body></ht= ml> --=_b0c20182-6ebc-4888-9201-37696442d304--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?599882921.762148.1646517960127.JavaMail.zimbra>