Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 5 Mar 2022 20:29:46 -0300
From:      Mario Lobo <lobo@bsd.com.br>
To:        Dale Scott <dalescott@shaw.ca>
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:  <CA%2ByoEx_0hobrP3_HUWV3JuX1WcJ8ag21d18=uAUnDqP654Qudw@mail.gmail.com>
In-Reply-To: <599882921.762148.1646517960127.JavaMail.zimbra@shaw.ca>
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> <599882921.762148.1646517960127.JavaMail.zimbra@shaw.ca>

index | next in thread | previous in thread | raw e-mail

[-- Attachment #1 --]
Got it, thanks man!

On Sat, Mar 5, 2022, 19:06 Dale Scott <dalescott@shaw.ca> wrote:

> *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 <dalescott@shaw.ca> wrote:
>
>> On Mar 1, 2022 6:21 PM, Waitman Gobble <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
>
> Link to issue reported to SuiteCRM GitHub repo:
> https://github.com/salesagility/SuiteCRM/issues/9530
>
> Cheers,
> Dale
>
>

[-- Attachment #2 --]
<div dir="auto">Got it, thanks man!</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Mar 5, 2022, 19:06 Dale Scott &lt;<a href="mailto:dalescott@shaw.ca">dalescott@shaw.ca</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="font-family:arial,helvetica,sans-serif;font-size:10pt;color:#000000"><div><div><div style="font-size:13.3333px"></div></div></div><div><blockquote style="border-left:2px solid #1010ff;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt"><span style="font-family:arial,helvetica,sans-serif;font-size:12pt"><b>From: </b>&quot;Mario Lobo&quot; &lt;<a href="mailto:lobo@bsd.com.br" target="_blank" rel="noreferrer">lobo@bsd.com.br</a>&gt;</span><br><span style="font-family:arial,helvetica,sans-serif;font-size:12pt"><b>To: </b>&quot;Dale Scott (dalescott@shaw)&quot; &lt;<a href="mailto:dalescott@shaw.ca" target="_blank" rel="noreferrer">dalescott@shaw.ca</a>&gt;</span><br><span style="font-family:arial,helvetica,sans-serif;font-size:12pt"><b>Cc: </b>&quot;freebsd-questions&quot; &lt;<a href="mailto:freebsd-questions@freebsd.org" target="_blank" rel="noreferrer">freebsd-questions@freebsd.org</a>&gt;</span><br><span style="font-family:arial,helvetica,sans-serif;font-size:12pt"><b>Sent: </b>Saturday, March 5, 2022 12:40:16 PM</span><br><span style="font-family:arial,helvetica,sans-serif;font-size:12pt"><b>Subject: </b>Re: file upload issues with SuiteCRM V7/8 (or apache24 and php8 diff FreeBSD vs Debian)</span><br></blockquote></div><div><blockquote style="border-left:2px solid #1010ff;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt"><div dir="auto"><div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr"><span style="font-family:arial,helvetica,sans-serif;font-size:12pt">On Sat, Mar 5, 2022, 01:33 Dale Scott &lt;<a href="mailto:dalescott@shaw.ca" rel="nofollow noopener noreferrer noreferrer" target="_blank">dalescott@shaw.ca</a>&gt; wrote:</span><br></div><blockquote class="gmail_quote" style="margin:0 0 0 0.8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><div dir="auto"><span style="font-family:arial,helvetica,sans-serif;font-size:12pt">On Mar 1, 2022 6:21 PM, Waitman Gobble &lt;<a href="mailto:gobble.wa@gmail.com" rel="noreferrer nofollow noopener noreferrer noreferrer" target="_blank">gobble.wa@gmail.com</a>&gt; wrote:</span><br></div><div class="gmail_extra" dir="auto"><div class="gmail_quote"><blockquote style="margin:0 0 0 0.8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr"><span style="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="font-family:arial,helvetica,sans-serif;font-size:12pt">
there&#39;s no mention of it on their git repository, I wonder if they
</span><br><span style="font-family:arial,helvetica,sans-serif;font-size:12pt">
haven&#39;t yet released 8.x for PHP 8 to &quot;community&quot;.</span><br></p></blockquote></div></div><div dir="auto"><br></div><div dir="auto"><span style="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 Waitman. Cheers, Dale</span></div></div></blockquote></div></div><div dir="auto"><br></div><div dir="auto"><span style="font-family:arial,helvetica,sans-serif;font-size:12pt">Hi Dale.</span></div><div dir="auto"><br></div><div dir="auto"><span style="font-family:arial,helvetica,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="font-family:arial,helvetica,sans-serif;font-size:12pt">Sure. Sorry for my oversight.</span></div><div><br></div><div><span style="font-family:arial,helvetica,sans-serif;font-size:12pt">The patch replaces <span style="color:rgb(0,0,0);font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline!important">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).</span></span></div><div><span style="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-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline!important"><br></span></div><div><span style="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-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline!important">E.g. in download.php, replace:</span></div><div><span style="font-size:12pt;font-family:arial,helvetica,sans-serif"><br></span></div><div><span style="font-size:12pt;font-family:arial,helvetica,sans-serif">if (in_array($row[&#39;file_ext&#39;], $sugar_config[&#39;allowed_preview&#39;], true)) {</span><br></div><div><br></div><div><span style="font-family:arial,helvetica,sans-serif;font-size:12pt">with:</span></div><div><br></div><div><span style="font-family:arial,helvetica,sans-serif;font-size:12pt">if (isset($row[&#39;file_ext&#39;], $sugar_config[&#39;allowed_preview&#39;]) &amp;&amp; in_array($row[&#39;file_ext&#39;], $sugar_config[&#39;allowed_preview&#39;], true)) {</span><br></div><div><br></div><div><span style="font-family:arial,helvetica,sans-serif;font-size:12pt"><br></span></div><div><span style="font-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="https://community.suitecrm.com/t/php-fatal-error-after-file-upload-on-v7-and-v8-solved/84177" target="_blank" rel="noreferrer">https://community.suitecrm.com/t/php-fatal-error-after-file-upload-on-v7-and-v8-solved/84177</a></span></div><div><br></div><div><span style="font-family:arial,helvetica,sans-serif;font-size:12pt">Link to issue reported to SuiteCRM GitHub repo: <a href="https://github.com/salesagility/SuiteCRM/issues/9530" target="_blank" rel="noreferrer">https://github.com/salesagility/SuiteCRM/issues/9530</a></span></div><div><br></div><div><span style="font-family:arial,helvetica,sans-serif;font-size:12pt">Cheers,</span></div><div><span style="font-family:arial,helvetica,sans-serif;font-size:12pt">Dale</span></div><div><br></div></div></div></div></blockquote></div>
help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CA%2ByoEx_0hobrP3_HUWV3JuX1WcJ8ag21d18=uAUnDqP654Qudw>