Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [Symfony] Przeniesienie serwisu z hostingu na local problem
grasss
post
Post #1





Grupa: Zarejestrowani
Postów: 5
Pomógł: 0
Dołączył: 1.04.2015

Ostrzeżenie: (0%)
-----


Próbuję przenieść kopie serwisu zrobionego w Symfony z Home.pl na local. Serwer lokalny: Ubuntu 18.04, apache2, php 7.2.5 +mysql.
Wszystko skopiowane, baza mysql przeniesiona. Kopia serwisu na home.pl działa bez zarzutu. Niestety apache lokalny zgłasza fatal error:
Proszę o pomoc.
  1. PHP Fatal error: Uncaught Doctrine\\Common\\Persistence\\Mapping\\MappingException: No mapping file found named 'User.orm.xml' for class
  2. 'Application\\Sonata\\UserBundle\\Entity\\User'. in /var/www/html/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/MappingException.php:75
  3. \nStack trace:\n#0 /var/www/html/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/SymfonyFileLocator.php(237):
  4. Doctrine\\Common\\Persistence\\Mapping\\MappingException::mappingFileNotFound
  5. ('Application\\\\Son...', 'User.orm.xml')\n#1 /var/www/html/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/
  6. Driver/FileDriver.php(115): Doctrine\\Common\\Persistence\\Mapping\\Driver\\SymfonyFileLocator->findMappingFile('Application\\\\Son...')
  7. \n#2 /var/www/html/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php(58):
  8. Doctrine\\Common\\Persistence\\Mapping\\Driver\\FileDriver->getElement('Application\\\\Son...')
  9. \n#3 /var/www/html/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/MappingDriverChain.php(102):
  10. Doctrine\\ORM\\M in /var/www/html/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/MappingException.php on line 75


Ten post edytował grasss 30.06.2018, 14:53:09
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
grasss
post
Post #2





Grupa: Zarejestrowani
Postów: 5
Pomógł: 0
Dołączył: 1.04.2015

Ostrzeżenie: (0%)
-----


Na serwerze jak i na lokalu są te same pliki, są dwa rodzaje php i xml
- User.php - znajduje się w Public_html/src/Applications/Sonata/UserBundle/Entity
- User.orm.xml - znajdusię się w Public_html/src/Applications/Sonata/UserBundle/Resource/config/doctrine
oraz
- User.orm.xml w Public_html/vendor\friendsofsymfony\user-bundle\FOS\UserBundle\Resources\config\doctrine

Wydaje mi się ze jest problem w różnicy konfiguracji Apache między hostingiem a localem, działająca wersja jest na hostingu w home.pl, tam mam kilka kopi działającego serwisu, wystarczyło skopiować pliki do nowego katalogu i podpiąć nową bazę.

Dołączam plik config.yml

  1. config.yml
  2. # Doctrine Configuration
  3. doctrine:
  4. dbal:
  5. default_connection: default
  6.  
  7. connections:
  8. default:
  9. driver: %database_driver%
  10. dbname: %database_name%
  11. user: %database_user%
  12. host: %database_host%
  13. password: %database_password%
  14. charset: UTF8
  15. server_version: 5.6
  16. options:
  17. 1002: "SET NAMES 'UTF8'"
  18.  
  19.  
  20. types:
  21. json: Sonata\Doctrine\Types\JsonType
  22.  
  23. orm:
  24. auto_generate_proxy_classes: %kernel.debug%
  25. default_entity_manager: default
  26.  
  27. entity_managers:
  28. default:
  29. mappings:
  30. BitgrindMbusinessCore:
  31. type: yml
  32. dir: "%kernel.root_dir%/../src/Bitgrind/MbusinessCoreEntityMappings"
  33. alias: 'BitgrindMbusinessCore'
  34. prefix: 'Bitgrind\MbusinessCore'
  35. is_bundle: false
  36. BitgrindMbusinessBundle: ~
  37. BitgrindMbusinessSaleBundle: ~
  38. BitgrindMbusinessWarehouseBundle: ~




Koledzy może któryś z was by się podjął przeniesienia mi tej aplikacji na lokal oczywiście nie za darmo ?

Ten post edytował grasss 19.07.2018, 16:21:50
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 9.10.2025 - 09:18