Debugging

Debug Mode

If enabled, more detailed error messages will be shown on every error that occurs, otherwise a simple generic error is shown (usually with an error code). To enable use the debug option for PHP, and debug option for JavaScript.

Browser DevTools

If you get some unexpected error that even the debug mode doesn't show it, you can use browser dev tools to see the actual errors or response from server.

In Google Chrome, right-click and select Inspect Element, or use the keyboard shortcut: Ctrl+Shift+I (or Cmd+Opt+I on Mac).

Navigate to the Console tab to see potential JavaScript errors and the Network tab to see the HTTP requests when you upload a file (make sure Record Network Log is on). Watch this video.

Error Codes

  • 1 - The uploaded file exceeds the upload_max_filesize directive in php.ini.
  • 2 - The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form.
  • 3 - The uploaded file was only partially uploaded.
  • 4 - No file was uploaded.
  • 6 - Missing a temporary folder.
  • 7 - Failed to write file to disk.
  • 8 - A PHP extension stopped the file upload.
  • 9 - Could not move the file.