-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Added compatibility with PHP 5.4+ built-in web server. #165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Phabricator requires mod_rewrite rule to emulate "routing" interface between web server and PHP aplication. Since PHP 5.4 where is built-in web server that can be invoked with "PHP -S 127.0.0.1:8000", but since it's very simple it don't have mod_rewrite functionality. But it have routing functionality if .php file is given via command-line - so this simple fix allows to use PHP 5.4+ built-in web server to start Phabricator. Useful for hacking, developing and testing. Use like this: "php -S 127.0.0.1:8000 ~/Documents/phabricator/webroot/ ~/Documents/phabricator/webroot/index.php"
The f()['idx'] syntax will break versions of PHP prior to 5.4, can you remove that? We currently support versions from PHP 5.2 forward, at least theoretically. (And, for consistency, also remove the inner space in parens and brackets -- see the style guide here: http://www.phabricator.com/docs/phabricator/article/PHP_Coding_Standards.html) Looks good otherwise. Thanks! (You can detect some of these problems automatically, and sometimes fix them automatically, by running "arc lint". Here's the current output for this patch:)
|
Fixed both PHP compatibility and code style. |
Thanks! |
Added compatibility with PHP 5.4+ built-in web server.
After running
opening
What am I doing wrong? |
Ah, my bad in comment: webroot is defined via "-t" command-line arg, so it must be: Also, make sure that paths are correct. I'm not sure that relative paths (that dn't start with "/") are correct :) |
Thanks. It is working great with "-t". |
Phabricator requires mod_rewrite rule to emulate "routing"
interface between web server and PHP aplication. Since PHP 5.4 where
is built-in web server that can be invoked with
"PHP -S 127.0.0.1:8000", but since it's very simple it don't have
mod_rewrite functionality. But it have routing functionality if .php
file is given via command-line - so this simple fix allows to
use PHP 5.4+ built-in web server to start Phabricator. Useful for
hacking, developing and testing. Use like this:
"php -S 127.0.0.1:8000 ~/Documents/phabricator/webroot/ ~/Documents/phabricator/webroot/index.php"