I have a xampp serwer on windows XP: Apache 2.4.3 PHP 5.4.7
and I try to start learning Zend2.
I downloaded skeleton app: https://github.com/zendframework/ZendSkeletonApplication and run from cmd:
php composer.phar self-update
php composer.phar install
(not that I had to give a full link to php like C:\xxx\php.exe - I don't know why, I have php in my enviromental variables). It went ok - no errors.
I added this code to httpd-vhosts.conf :
<VirtualHost *:80>
ServerName zf2-tutorial.localhost
DocumentRoot /zf2-tutorial/public
SetEnv APPLICATION_ENV "development"
<Directory /zf2-tutorial/public>
DirectoryIndex index.php
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
I also added this line to C:\WINDOWS\system32\drivers\etc\hosts
127.0.0.1 zf2-tutorial.localhost localhost
When I run
http://zf2-tutorial.localhost
in the browser I get "Permission denied"
When I try
http://localhost/zf2-tutorial/public/
I get very long php error
Fatal error: Uncaught exception 'Zend\ServiceManager\Exception\InvalidArgumentException' with message 'Provided abstract factory must be the class name of an abstract factory or an instance of an AbstractFactoryInterface.' in C:\xampp\htdocs\zf2-tutorial\vendor\zendframework\zendframework\library\Zend\ServiceManager\ServiceManager.php:302 ...........
I figure sth is wrong with serwer since I get "Permission denied". What I am doing wrong? Thx in advance.
BIg Thanx Everyone. My final config:
<VirtualHost *:80>
ServerName zf2-tutorial.localhost
DocumentRoot C:/xampp/htdocs/zf2-tutorial/public
SetEnv APPLICATION_ENV "development"
<Directory C:/xampp/htdocs/zf2-tutorial/public>
DirectoryIndex index.php
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
127.0.0.1 zf2-tutorial.localhost
Works fine on: http://zf2-tutorial.localhost/