This topic is locked

SyntaxError: Unexpected token '<', "< script > d"... is not valid JSON

12/23/2025 18:43:04
PHPRunner General questions
D
Davi author

Hello, I'm having the following problem: in any registration form where I use a field with file upload, when trying to add a record, an error occurs. When I click the button to select the attached file, the application tries to upload the file, but in the end it gives an error. This didn't happen before. The error is shown in the attached image and occurs in both versions 11.1 and 11.2. I think this started happening after installing version 11.2.

erro1.png
erro3.png
erro2.png
ChatGPT 12/23/2025

It sounds like you're experiencing a file upload issue in PHPRunner after updating to version 11.2. Here are some steps you can take to troubleshoot and potentially resolve the issue:

  1. Check File Permissions: Ensure that the directory where files are being uploaded has the correct permissions. The web server must have write access to that directory.


  2. Verify PHP Settings: Check your PHP configuration (php.ini file) for the following settings:

    • file_uploads should be set to On.
    • upload_max_filesize should be large enough to accommodate your files.
    • post_max_size should also be larger than upload_max_filesize.
    • max_file_uploads should be set to a number that allows multiple uploads if needed.


  3. Error Logging: Enable error logging in PHP to get more detailed error messages. You can do this by setting display_errors to On and error_reporting to E_ALL in your php.ini or by adding the following lines to your script:

    ini_set('display_errors', 1);
    ini_set('display_startup_errors', 1);
    error_reporting(E_ALL);

  4. Check Browser Console: Open your browser's developer console (usually F12) and check for any JavaScript errors or network issues when you try to upload a file. This can sometimes provide clues about what's going wrong.


  5. Review PHPRunner Settings: Go through the file upload field settings in PHPRunner to ensure everything is configured correctly. Make sure the field is set up to accept the correct file types.


  6. Revert Changes: If the problem started after updating to version 11.2, consider reverting back to version 11.1 to see if the issue persists. If it works in 11.1, you may want to reach out to PHPRunner support for assistance with the new version.


  7. Check for Updates: Sometimes, issues are resolved in subsequent patches or minor updates. Check if there are any newer updates or patches for version 11.2 that might address this problem.


  8. Contact Support: If none of the above steps help, consider reaching out to PHPRunner's support team with detailed information about the error, including any error messages or logs you have.



By following these steps, you should be able to identify the cause of the file upload issue and hopefully resolve it.