I have created a copy of my Magento 2.2.4 in another domain to use as a development server. I have changed the env.php pointing to the new database, I have also modified the urls in the database but when entering the new domain it gives me this error.

1 exception(s): Exception #0 (Exception): Warning: Cannot modify header information - headers already sent by (output started at /home/wwwdos9/public_html/vendetucasaenchina.com/app/bootstrap.php:1) in /home/wwwdos9/public_html/vendetucasaenchina.com/vendor/magento/framework/Stdlib/Cookie/PhpCookieManager.php on line 148

Could you help me?


I think,

This issues is you are missing the some tag like start the

You should check for any empty lines at the end of your .php files.Simply remove the empty line at the end of your script( after the final "?>" or "php>" string) and check your website again.

This tag you are missed your custom module or you last modified filed missed tag and check

If your error points to functions.php, you can carry out the same procedure.

Second setp :-

You import last database and file backup on your server

And after, showing same error showing??

Hope help this


  • Hello Mohit. directly copy all the content of my domain in production with the exception of the images to the new domain that will be Development. Then I copied the Database. I modified the data of the new database in env.php and finally I modified the paths of the secure and insecure url in core_config_data, deleted cache. I even tried to put into production mode and it still gives me the same error. It is simply a copy of the production version to a new production version. Any idea what is happening? because I haven't touched any php file. – Juan Dosil Feb 24 '20 at 11:29
  • Please check your env.php file you remove white space – Mohit Patel Feb 24 '20 at 15:40
  • I looked at the error logs and permissions and then tried enabling output_buffering in php.ini file. I guess that did the trick – Juan Dosil Feb 24 '20 at 15:49
  • enable the output_buffering = on and after check solve this error – Mohit Patel Feb 24 '20 at 15:52
  • solve error info me ?? – Mohit Patel Feb 24 '20 at 15:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.