We have one Gruntfile.js that looks like this on my coworker's machine.
php: {
dist: {
options: {
port: 8888,
useAvailablePort: true,
keepalive: true,
router: '_router.php',
base: 'src' //dev mode
}
}
},
...and it works fine on his machine but not mine. _router.php
is at the top level directory. Running grunt dev
leads into no errors in my console during dev deploy.
PHP 5.5.27 Development Server started at Wed Sep 23 17:31:54 2015
Listening on http://127.0.0.1:8888
Document root is /Users/toszter/Engineering/moo/sources/local/web/src
Press Ctrl-C to quit.
[Wed Sep 23 17:39:33 2015] 127.0.0.1:53910 Invalid request (Unexpected EOF)
Yet, I see in my browser at localhost:8888...
Warning: Unknown: failed to open stream: No such file or directory in Unknown on line 0
Fatal error: Unknown: Failed opening required '_router.php' (include_path='.:') in Unknown on line 0
Changing the router
property in the code above to router: 'src/_router.php'
fixes the problem on my machine, but breaks everyone else.
So it stands needing a bit of explanation: Why do I need to re-specify the base directory explicitly in my router
property and no one else on my team?