Skip to content

File upload - Uncaught ReferenceError; possible file upload attack

Problem


When uploading a file, first i get the following error:
jquery-3.3.1-wkfix.js:3827 Uncaught ReferenceError: phpGrid_membership is not defined at HTMLDocument.<anonymous> (athlete.php:1099:1) at mightThrow (jquery-3.3.1-wkfix.js:3534:29) at process (jquery-3.3.1-wkfix.js:3602:12)

Secondly when i try to upload a file (image ) I get a dialog box saying

Possible file upload attack. The file will be automatically deleted.


Solution:


Actually forgot the preceding slash

chmod -R 777 /your/upload/folder/name/

I assume you have the settings in conf.php as

define('UPLOADDIR', '/your/upload/folder/name/');

In addition, be sure list the file extensions that are allowed for upload:

define('UPLOADEXT', 'gif,png,jpg,jpeg');

Feedback and Knowledge Base