Unexpected data in output buffer (v2019)

Hi everybody:

I’m using PHPMaker v2019.0.10
I’m suddenly getting the subject error, the same than these two posts:

http://www.hkvforums.com/viewtopic.php?f=4&t=43548&p=135313
http://www.hkvforums.com/viewtopic.php?f=4&t=45381&p=143581

A few days ago, I solved the issue with the last post of arbei saying:
“check FTP client and change the transfer type to “Binary””

But now I’m receiving the error again in a lookup search.
The complete error in /api/index.php is
Fatal error: Uncaught RuntimeException: Unexpected data in output buffer. Maybe you have characters before an opening <?php tag? in /var/www/clients/client1/web1/web/vendor/slim/slim/Slim/App.php:621 Stack trace: #0 /var/www/clients/client1/web1/web/vendor/slim/slim/Slim/App.php(317): Slim\App->finalize(Object(Slim\Http\Response)) #1 /var/www/clients/client1/web1/web/classes/Api.php(323): Slim\App->run() #2 /var/www/clients/client1/web1/web/api/index.php(12): PHPMaker2019\semicom\Api->run() #3 {main} thrown in /var/www/clients/client1/web1/web/vendor/slim/slim/Slim/App.php on line 621

I’ve opened /api/index.php with Notepad++ and show all characters.
In some lines I get CRLF characters, in other ones just CR.
If I delete all the CRLF lines, then the output of api/index.php is: run();?>

If I remove the CR character between <?php and the next line (<?php namespace PHPMaker2019.…:wink: then I get not output from /api/index.php, but there’s no response in console too.
I’ve re-generated index.php (api), the class, and I’ve made an update composer and uploaded again the vendor folder, in binary mode…

Any ideas?

Thanks in advance

Please follow the suggestion from the post (especially 3):

Some output from the script before the real output. Possibly some warnings or notices or errors from PHP on your Linux server.

  1. Make sure you use PHP >= 5.5. If you use PhpSpreadsheet, use PHP >= 5.6.
  2. Browse /your/path/api.php directly in browser and check if there is any output.
    ***3. Press F12 in your browser, when you see the error, check the Network panel and check the output from api.php.

I had follow the suggestions from that post too, with no success.

After a lot of tries, I’ve uploaded again the full site (I was just uploading the API classes and files) in binary mode, and it started to work again.

Thanks a lot (again) for your help