Search code examples
htmlterminalcomposer-phpzshmacports

May you help me to solve this problem with the output of Composer?


I have a problem, probably a misconfiguration or something like that.

If I run any command of "composer" on my Zsh Mac terminal, the task is completed but shows on the output some HTML documents that shouldn't be there. Most of them are empty, but I've noticed that in other cases, part of the response is inside the body of one of the HTML documents.

For example, If I run the command % composer --version, the terminal shows:

Composer version 2.0.8 2020-12-03 17:20:38
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
</body>
</html><!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
</body>
</html>%

I noticed this problem after doing some updates with MacPorts and touching the .zshrc file. I've been trying to identify the root of the problem, but I haven't found it yet. That's why I'm asking for help.

I would appreciate any hint or piece of advice that could help me solve the problem. I'm sorry I can't describe the situation better, but if you need any further information that can be useful. Please, don't hesitate to ask for it.

Thanks for your attention. I'm looking forward to your reply.

Kind regards.


Solution

  • I have just found where the error was.

    The problem was that one of the updates I had made with Macports was that I installed php74-tidy. That provoked that the php.ini file automatically updated with the property tidy.clean_output = On.

    That property was causing that every PHP request included an HTML document on the response. So, I commented that: ; tidy.clean_output = On and everything started working again.

    It took me days to find out the error. Thanks to everyone who spend some time reading the question and answering it.