<div dir="ltr">Also, here are links for information regarding error code 7:<div><br></div><div><a href="https://www.php.net/manual/en/features.file-upload.post-method.php">https://www.php.net/manual/en/features.file-upload.post-method.php</a><br></div><div><a href="https://www.php.net/manual/en/features.file-upload.errors.php">https://www.php.net/manual/en/features.file-upload.errors.php</a><br></div><div><br></div><div>Hope this helps.</div><div><br></div><div>Best,</div><div>Nicolas</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jul 24, 2020 at 1:18 PM Nicolas Brossard <<a href="mailto:nicolasbrossard.mni@gmail.com">nicolasbrossard.mni@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi Eli,<div><br></div><div>If you have specified a value for TMPDIR in your environment file, you should also set the value of variable <span style="font-family:Menlo;font-size:11px;font-variant-ligatures:no-common-ligatures;color:rgb(255,255,255);background-color:rgb(0,0,0)">upload</span><span style="color:rgb(0,0,0);font-family:Menlo;font-size:11px;font-variant-ligatures:no-common-ligatures">_tmp_dir </span><span style="color:rgb(0,0,0);font-variant-ligatures:no-common-ligatures"><font face="arial, sans-serif">in your </font><font face="monospace">php.ini</font><font face="arial, sans-serif"> file, otherwise the uploader will still use the default system temporary directory (usually /tmp, which most often than not has limited space).</font></span></div>
</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jul 24, 2020 at 12:26 PM Eli Johnson <<a href="mailto:joh17964@umn.edu" target="_blank">joh17964@umn.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi Nicolas, <div><br></div><div>I do have a custom path for TMPDIR set in the environment file and I have confirmed that the directory is writable (by user apache in this case since OS is RHEL) and has plenty of space. </div><div><br></div><div>Where do I find what the upload error code number indicates? I saw that it was 7 but couldn't find where it was being set or what it meant. </div><div><br></div><div>Any other recommendations for debugging this? The error log is sparse and not particularly helpful here. Should I still be looking in imaging_uploader.class.inc or is this an issue that begins in a parent library (ie File_Upload.class.inc)? </div><div><br></div><div>Best, </div><div>Eli</div><div><br clear="all"><div><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><span style="font-size:12.8px">Eli Johnson</span><br></div>Developer/Researcher<br>Institute of Child Development<br>University of Minnesota<div><a href="mailto:joh17964@umn.edu" target="_blank">joh17964@umn.edu</a></div></div></div></div></div></div></div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jul 24, 2020 at 11:03 AM Nicolas Brossard <<a href="mailto:nicolasbrossard.mni@gmail.com" target="_blank">nicolasbrossard.mni@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi Eli,<div><br></div><div>Looking at what is being passed to <font face="monospace">$file->setHandlerArgs</font>, I can see that the upload error code is set to 7, which means that the system could not copy your file in the temporary directory dedicated to uploading files on the server. By default, uploaded files are written in <font face="monospace">/tmp,</font> but you can override this by setting variable <span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0);font-family:Menlo;font-size:11px">TMPDIR</span> in <font face="monospace"><LORIS_MRI_ROOT>/environment</font>. I would check that whichever directory you are uploading to has enough free space to allow the upload and that user <font face="monospace">www-data</font> has write permission on that directory. </div><div><br></div><div>Let me know if that fixes the issue.</div><div><br></div><div>Best,</div><div>Nicolas</div>
</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jul 23, 2020 at 11:50 PM Eli Johnson <<a href="mailto:joh17964@umn.edu" target="_blank">joh17964@umn.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div>Using LORIS v23.0 on RHEL 7, accessing LORIS front end from Chrome. <br><div><br></div><div>I'm currently setting up the LORIS-MRI and imaging modules for LORIS. I am running into an issue with the Imaging Uploader on the front end where it is returning the error message "<font face="monospace">The file TEST111_986793_testing1.zip is not of type .tgz, .tar.gz or .zip.</font>" When checking the error-log from the back end I'm seeing...</div><div><br></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><font face="monospace">PHP Warning: mime_content_type(): Empty filename or path in /<basepath>/modules/imaging_uploader/php/imaging_uploader.class.inc on line 646, referer: http://<site>/imaging_uploader</font></div></blockquote><div><br></div><div>Upon further investigation into imaging_uploader.class.inc, the function isCompressed() is being passed an empty string from isValid(). IsValid is passing it $temp_file, defined in <font face="monospace">$temp_file=$file->fileInfo['tmp_name']</font>, but this is also an empty string. So I'm trying to figure out at what stage 'tmp_name' should be defined for $file->fileInfo but I am struggling to track it down. I checked what was being passed in $file->setHandlerArgs and it contains this:</div><div><br></div></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><div><font face="monospace">Array</font></div></div><div><div><font face="monospace">(</font></div></div><div><div><font face="monospace"> [IsPhantom] => N</font></div></div><div><div><font face="monospace"> [candID] => 986793</font></div></div><div><div><font face="monospace"> [pSCID] => TEST111</font></div></div><div><div><font face="monospace"> [visitLabel] => testing1</font></div></div><div><div><font face="monospace"> [mriFile] => Array</font></div></div><div><div><font face="monospace"> (</font></div></div><div><div><font face="monospace"> [name] => TEST111_986793_testing1.zip</font></div></div><div><div><font face="monospace"> [type] => </font></div></div><div><div><font face="monospace"> [tmp_name] => </font></div></div><div><div><font face="monospace"> [error] => 7</font></div></div><div><div><font face="monospace"> [size] => 0</font></div></div><div><div><font face="monospace"> )</font></div></div><div><div><font face="monospace">)</font></div></div></blockquote><div><div><font face="monospace"><br></font></div><div>Any suggestions on how to get the uploader working? I have verified that the MRIUploadIncomingPath variable is set appropriately and is an existing, writable directory. I also am able to successfully upload the same zip file from the back end. </div><div><br></div><div><br></div><div>Thanks, </div><div>Eli</div><div><br></div><div><br clear="all"><div><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><span style="font-size:12.8px">Eli Johnson</span><br></div>Developer/Researcher<br>Institute of Child Development<br>University of Minnesota<div><a href="mailto:joh17964@umn.edu" target="_blank">joh17964@umn.edu</a></div></div></div></div></div></div></div></div></div></div></div></div></div>
_______________________________________________<br>
Loris-dev mailing list<br>
<a href="mailto:Loris-dev@bic.mni.mcgill.ca" target="_blank">Loris-dev@bic.mni.mcgill.ca</a><br>
<a href="https://mailman.bic.mni.mcgill.ca/mailman/listinfo/loris-dev" rel="noreferrer" target="_blank">https://mailman.bic.mni.mcgill.ca/mailman/listinfo/loris-dev</a><br>
</blockquote></div>
</blockquote></div>
</blockquote></div>
</blockquote></div>