Jako / AjaxUpload

Snippet/jQuery Wrapper for Andrew Valums file upload in MODX Revolution
https://jako.github.io/AjaxUpload/
GNU General Public License v2.0
10 stars 18 forks source link

Call to undefined function tmpfile() #65

Closed claytonk closed 1 year ago

claytonk commented 1 year ago

I'm running AjaxUpload in a FormitForm and am getting a fatal PHP error from fileuploader.class.php. The error doesn't make sense. It's failing to find the PHP tmefile() function. Here's the redacted error output:

PHP Fatal error:  Uncaught Error: Call to undefined function tmpfile() in /---/public_html/core/components/ajaxupload/model/fileuploader/fileuploader.class.php:38
Stack trace:
#0 /---/public_html/core/components/ajaxupload/model/fileuploader/fileuploader.class.php(195): qqUploadedFileXhr->save()
#1 /---/public_html/core/components/ajaxupload/processors/web/upload.class.php(100): qqFileUploader->handleUpload()
#2 /---/public_html/core/components/ajaxupload/processors/web/upload.class.php(38): AjaxUploadUploadProcessor->createUploads()
#3 /---/public_html/core/model/modx/modprocessor.class.php(185): AjaxUploadUploadProcessor->process()
#4 /---/public_html/core/model/modx/modx.class.php(1770): modProcessor->run()
#5 ...', referer: https://creationsabbath.net/your-creation-sabbath-story

Any idea what might be causing this? Any advice would be welcome.

MODX 2.8.4 AjaxUpload 1.6.5 Formit 4.2.7 PHP 8.2

Jako commented 1 year ago

This error message does not make sense, tmpfile is a core PHP method. Is it possible that this method is disabled on your hosting? https://www.php.net/manual/en/ini.core.php#ini.disable-functions

claytonk commented 1 year ago

Yeah, that's what I'd thought as well but couldn't locate the issue in our setup. Talked with the host, discovered the issue, all good. Thanks for the reply.