4

I've been doing PHP development on my Mac for years at work but I'm having to change my deployment OS from Linux and Mac to Windows Server. I've set up a Windows Server the same as the machine I'm going to have to deploy to in a VMWare Fusion VM.

Much like a Vagrant setup, I've shared a folder from my local machine to the VM and I'm trying to get it to serve a Symfony2 application through the VM while continuing development on the Mac (where all my tools are).

The configuration page runs fine, but when I try to load an actual page I get the following errors:

InvalidArgumentException: Unable to parse file
"\\VMWARE-HOST\SHARED FOLDERS\Symfony\vendor\symfony\symfony\src\Symfony\Bundle
\FrameworkBundle\DependencyInjection/../Resources/config\web.xml".

and

InvalidArgumentException:
[WARNING 1549] failed to load external entity "file://///VMWARE-HOST/SHARED%20FOLDERS/Symfony/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/schema/dic/services/services-1.0.xsd" (in n/a - line 0, column 0)
[WARNING 3084] Element '{http://www.w3.org/2001/XMLSchema}import': Failed to locate a schema at location 'file://///VMWARE-HOST/SHARED%20FOLDERS/Symfony/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/schema/dic/services/services-1.0.xsd'. Skipping the import. (in in_memory_buffer - line 8, column 0)
[ERROR 1845] Element '{http://symfony.com/schema/dic/services}container': No matching global declaration available for the validation root. (in //vmware-host/Shared Folders/Symfony/web/ - line 5, column 0)

I haven't been able to figure out how to correct these errors... Any suggestions on how to correct these or am I DOOOMED!

Troubleshooting-wise: I have gotten a Laravel app up and running using the same VM/folder share, so it is something to do with Symfony2. I have also tried this with both a Composer install and a download-and-extraction from the Symfony2 site.

Daryl Gubler
  • 305
  • 2
  • 14
  • It seems that Symfony2 can't find the file. Please check that `file://///VMWARE-HOST/SHARED%20FOLDERS/[...]/services-1.0.xsd` exists and is readable by the server. – A.L Jan 27 '14 at 16:21
  • What version of Symfony2 are you running? Do you get the same issue with a fresh install of Symfony? – Adam Elsodaney Mar 07 '15 at 23:22
  • Could you try setting up a mapped network drive on the Windows server (using e.g. G:\ instead of \\vmware-host\shared folders) - if the problem is the UNC path itself, this might be a workaround. – Nils Mar 09 '15 at 14:38
  • There appears to be quite a lot of information about 'VM's, 'Symfony2' and 'Shared folders' on the 'web'. I suspect it would be useful if you added a list of 'url's of 'stuff', that you found and have tried, to your question. It will at least give us some clues as to what you have tried and found 'not so useful'. – Ryan Vincent Mar 09 '15 at 15:24
  • We really need the full stack-trace to get some ideas here, can you post it please. – David Soussan Mar 11 '15 at 05:35

2 Answers2

0

Same problem as here. Unfortunately, this issue does not have clear solution if you really need to use windows sharing for accessing Symfony app source code.

Symfony: InvalidArgumentException while parsing web.xml

Community
  • 1
  • 1
kba
  • 4,190
  • 2
  • 15
  • 24
-1

You should clear symfony's cache, it may be keeping references to obsolete files. Try first with:

php app/console cache:clear --no-debug

If the error persists, remove manually the cache files in app/cache/ and app/logs/. And set the proper permissions in both folders.

devilcius
  • 1,764
  • 14
  • 18
  • this is absolutely NOT the solution. This error appears at the very moment when the cache gets emptied. – Friedrich Mar 06 '15 at 13:02
  • @frieder, that's why I've added *if the error persists, remove manually* the contents of cache folders... It has happened to me before. – devilcius Mar 06 '15 at 13:08
  • and i did this, the error persists even when the cache content got removed, the question has a bounty not because of a simple "delete cache error" – Friedrich Mar 06 '15 at 13:12
  • 1
    @frieder and yet this kind of error do happen when obsolete references are kept in the cache folder. Nowhere in the question is mentioned that the cache has been cleared. Seemingly complex problems might have simple solutions. – devilcius Mar 06 '15 at 13:27