Friday, 11 December 2009

Accessing the symfony development environment

No later than this morning was I trying to use my symfony dev environment from a different PC on the network, and came across the following error:

You are not allowed to access this file. Check xxxxx_dev.php for more information.

Well, to every simple problem it seems there is a simple solution :).

Just open xxxxx_dev.php and add the relevant IP address to the array as follows:


if (!in_array(@$_SERVER['REMOTE_ADDR'], array('127.0.0.1', '192.168.254.102', '::1')))
{
die('You are not allowed to access this file. Check '.basename(__FILE__).' for more information.');
}


Obviously you probably wouldn't want to do this on a public server but it's neat for LAN use all the same and I am just literally more and more impressed with all the inbuilt mechanisms that symfony has to offer!

Thoughts?

No comments:

Online Marketing
Add blog to our blog directory blog search directory Blog Directory Blogarama - The Blog Directory