I have a localhost on this computer, with a “local domain” that is: mywebsite.loc. The server i’m running is the wamp server 2.2D and works perfectly..
i’m just getting started with symfony so perhaps I missed a step somewhere…
I downloaded the symfony standard (without vendors) package from their site. I then extracted the archive and moved the files to my project folder..
Since I downloaded the version without any vendors, I have to install those. So from the command line I ran: php bin/vendors install and all standard vendors installed perfectly with no errors..
Just as a check to see if the local server is properly equipped to handle apache, I run: php app/check.php which comes out with the following:
********************************
* *
* Symfony requirements check *
* *
********************************
php.ini used by PHP: C:\wamp\bin\php\php5.3.10\php.ini
** WARNING **
* The PHP CLI can use a different php.ini file
* than the one used with your web server.
* (especially on the Windows platform)
* If this is the case, please ALSO launch this
* utility from your web server.
** WARNING **
** Mandatory requirements **
OK Checking that PHP version is at least 5.3.2 (5.3.10 installed)
OK Checking that the "date.timezone" setting is set
OK Checking that app/cache/ directory is writable
OK Checking that the app/logs/ directory is writable
OK Checking that the json_encode() is available
OK Checking that the SQLite3 or PDO_SQLite extension is available
OK Checking that the session_start() is available
OK Checking that the ctype_alpha() is available
OK Checking that the token_get_all() is available
OK Checking that the APC version is at least 3.0.17
** Optional checks **
OK Checking that the PHP-XML module is installed
OK Checking that the token_get_all() function is available
OK Checking that the mb_strlen() function is available
OK Checking that the iconv() function is available
OK Checking that the utf8_decode() is available
OK Checking that the intl extension is available
OK Checking that the intl ICU version is at least 4+
[[WARNING]] Checking that a PHP accelerator is installed: FAILED
*** Install a PHP accelerator like APC (highly recommended) ***
OK Checking that php.ini has short_open_tag set to off
OK Checking that php.ini has magic_quotes_gpc set to off
OK Checking that php.ini has register_globals set to off
OK Checking that php.ini has session.auto_start set to off
** Optional checks (Doctrine) **
OK Checking that PDO is installed
OK Checking that PDO has some drivers installed: mysql, sqlite
As you can see everything is good other than not having a PHP accelerator installed on my local machine.. In my vhosts config file, I have tried with the DocumentRoot being project_directory/ and project_directory/web/
When it’s set to just the standard project_directory/ I get the directory listing in the browser, but when I traverse into the web folder, the .htaccess picks up and takes me to app.php.
So either way, when I try and load app.php or app_dev.php I get the following:
This webpage is not available The connection to mywebsite.loc was
interrupted.
and I’ve got no clue how to fix that… Any help I can get would be awesome.. I’ll try anything to get it working..
[EDIT]
[2012-03-31 19:32:54] event.DEBUG: Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\ProfilerListener::onKernelRequest". [] []
[2012-03-31 19:32:54] event.DEBUG: Notified event "kernel.request" to listener "Symfony\Bundle\FrameworkBundle\EventListener\RouterListener::onEarlyKernelRequest". [] []
[2012-03-31 19:32:54] event.DEBUG: Notified event "kernel.request" to listener "Symfony\Bundle\FrameworkBundle\EventListener\SessionListener::onKernelRequest". [] []
[2012-03-31 19:32:54] event.DEBUG: Notified event "kernel.request" to listener "Symfony\Component\Security\Http\Firewall::onKernelRequest". [] []
[2012-03-31 19:32:54] event.DEBUG: Notified event "kernel.request" to listener "Symfony\Bundle\FrameworkBundle\EventListener\RouterListener::onKernelRequest". [] []
[2012-03-31 19:32:54] request.INFO: Matched route "_welcome" (parameters: "_controller": "Acme\DemoBundle\Controller\WelcomeController::indexAction", "_route": "_welcome") [] []
[2012-03-31 19:32:54] event.DEBUG: Notified event "kernel.request" to listener "Symfony\Bundle\AsseticBundle\EventListener\RequestListener::onKernelRequest". [] []
[2012-03-31 19:32:54] event.DEBUG: Notified event "kernel.controller" to listener "Symfony\Bundle\FrameworkBundle\DataCollector\RequestDataCollector::onKernelController". [] []
[2012-03-31 19:32:54] event.DEBUG: Notified event "kernel.controller" to listener "Sensio\Bundle\FrameworkExtraBundle\EventListener\ControllerListener::onKernelController". [] []
[2012-03-31 19:32:54] event.DEBUG: Notified event "kernel.controller" to listener "Sensio\Bundle\FrameworkExtraBundle\EventListener\ParamConverterListener::onKernelController". [] []
[2012-03-31 19:32:54] event.DEBUG: Notified event "kernel.controller" to listener "Sensio\Bundle\FrameworkExtraBundle\EventListener\TemplateListener::onKernelController". [] []
[2012-03-31 19:32:54] event.DEBUG: Notified event "kernel.controller" to listener "Acme\DemoBundle\ControllerListener::onKernelController". [] []
[2012-03-31 19:32:54] event.DEBUG: Notified event "kernel.controller" to listener "JMS\SecurityExtraBundle\Controller\ControllerListener::onCoreController". [] []
[EDIT1]
[Sat Mar 31 11:54:51 2012] [error] [client 127.0.0.1] client denied by server configuration: C:/Apache2, referer: http://mywebsite.loc/
[Sat Mar 31 11:54:51 2012] [error] [client 127.0.0.1] client denied by server configuration: C:/Apache2, referer: http://mywebsite.loc/
[Sat Mar 31 11:54:51 2012] [error] [client 127.0.0.1] client denied by server configuration: C:/Apache2, referer: http://mywebsite.loc/
[Sat Mar 31 11:54:51 2012] [error] [client 127.0.0.1] client denied by server configuration: C:/Apache2, referer: http://mywebsite.loc/
[Sat Mar 31 11:54:51 2012] [error] [client 127.0.0.1] client denied by server configuration: C:/Apache2, referer: http://mywebsite.loc/
[EDIT2]
in httpd.conf i added:
<Directory "G:/websites/">
Options Indexes FollowSymLinks
AllowOverride all
Order Allow,Deny
Allow from all
</Directory>
which works for all my other sites (not using symfony)
and my vhost looks like:
<VirtualHost *:80>
DocumentRoot "G:/websites/my websites/mywebsite/web/"
ServerName mywebsite.loc
ServerAlias www.mywebsite.loc
ErrorLog "logs/mywebsite.loc-error.log"
CustomLog "logs/mywebsite.loc-access.log" common
<Directory "G:/websites/my websites/mywebsite/web/">
Options Indexes FollowSymLinks
AllowOverride all
Order Allow,Deny
Allow from all
</Directory>
Somewhere, in either the server or something its trying to read C:/Apache2 which doesn’t exist.. but I can’t find where it is.. so I created the folder and copied over the entire apache folder to it..
but all i get in the logs is:
[Sat Mar 31 14:18:01 2012] [error] [client 127.0.0.1] client denied by server configuration: G:/websites/my websites/dpstruck.com/web/app_dev.php
[Sat Mar 31 14:18:02 2012] [error] [client 127.0.0.1] client denied by server configuration: G:/websites/my websites/dpstruck.com/web/app_dev.php
Ditching wamp altogether and installing each component 1 by 1 did the trick… Unsure why it wouldn’t work with wamp…