skip to Main Content

I made web application using symfony framework. When I run this app on my computer, it runs without a problem. But when I upload it to webhosting, this error is thrown: Unable to parse file "/3w/users/f/foer.wz.cz/web/vendor/doctrine/doctrine-bundle/DependencyInjection/../Resources/config/dbal.xml": The XML file "/3w/users/f/foer.wz.cz/web/vendor/doctrine/doctrine-bundle/DependencyInjection/../Resources/config/dbal.xml" is not valid.

This error was thrown by different bundles as well, that I removed because they were only for development. But Doctrine bundle is not. I have no idea what could be the problem.
I also tried to delete cache files, but not with php bin/console cache:clear because I dont have access to the console.
Thanks for your help in advance.

2

Answers


  1. Chosen as BEST ANSWER

    I resolved my error by changing code on line 459

    from: $dom = XmlUtils::loadFile($file, $this->validateSchema(...));

    to: $dom = XmlUtils::loadFile($file, null);

    in file /vendor/symfony/dependency-injection/Loader/XmlFileLoader.php.

    I hope it doesn't ruin anything.


  2. Try installing only the bundles you need and then upload them to the host.
    If you installed them via composer and then deleted them before regenerating the autoloader it will search for them.
    If you had access to the shell on the host you could try to delete the unnecessary bundles from the composer.json and write composer install.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search