I have installed Symfony on localhost under CentOS under VMware player. (Windows 7, 32 bit) My PHP version is 5.3.3. CentOS is 6.5. VMware player is 6.0.1.
When I attempt to connect with localhost/Symfony/web/app_dev.php
I get the following error
ClassNotFoundException: Attempted to load class "DOMDocument" from the global namespace in /var/www/html/Symfony/vendor/symfony/symfony/src/Symfony/Component/Config/Util/XmlUtils.php line 47.
Did you forget a use statement for this class?
line 47 is
$dom = new \DOMDocument();
I get 102 hits when I grep "DOMDocument".
Most hits display
$dom = new \DOMDocument();
or
$dom = new DOMDocument();
I had previously installed Symfony on an external server following the same script and was able to exercise app_dev.php
without problem. (FreeBSD)
What is the difference between new \DOMDocument();
and new DOMDocument();
.
I am a JavaScript and PHP novice. Does anyone know what I should do to correct this ? or some clues as to how to trouble-shoot ?