With PHP 5.4+ we get a built-in webserver, http://php.net/manual/en/features.commandline.webserver.php
Has anyone had luck setting this up with Craft? It seems like it could be pretty straightforward, but I am not sure how to wire up a mysql database.
In particular I am hoping to run this with Gulp/BrowserSync so that I can just fire up a livereload instance of Craft quick and easily.
On a very basic pass-through I just did, it seems to kind of work - except it just has 404 pages and a "Craft can’t connect to the database" error.
Here is my gulpfile.js for reference:
gulp.task('php', function() {
php.server({ base: 'public', port: 8010, keepalive: true});
});
gulp.task('serve', ['php'], function() {
browserSync.init({
notify: false,
reloadOnRestart: true,
open: false,
proxy: '127.0.0.1:8010'
});
gulp.watch('*.js').on('change', reload);
gulp.watch("*.html").on('change', reload);
gulp.watch("*.php").on('change', reload);
});
gulp.task('default', ['serve']);
Edit: I connected to mysql without much problem (installed using Homebrew, and connecting with 127.0.0.1), but now I am getting:
Your server doesn’t meet the following requirements to run Craft:
Mcrypt is required.