Comments (10)
Not at all, let's go for it
from gulp-connect-php.
Sorry for the late reply on this. Can you please provide me some environment specifics? What os, php version etc.
from gulp-connect-php.
Hey there, I just ran into this issue on OSX Sierra with PHP 5.6/7.0/7.1 – the php process simply does not terminate when I stop the gulp task from running. Managed to kill the process by locating it first with lsof -i tcp:8000
and then killing the PID. Any thoughts? Thanks in advance.
EDIT: sometimes things will work as expected. Managed to reproduce a few times however.
from gulp-connect-php.
@vieko I am presently in the process of reworking portions of this, including its dependence on lsof
. The current status of where i am in this is available here: #41
You are welcome (encouraged) to test that out and see how it goes.
Please direct any bugs against 1.0.0 WIP against the other repo (https://github.com/grmartin/gulp-connect-php). Once it is merged in to this one, bug tracking will move here, i simply do not wish to muddy the waters in this repo until after that branch is mainlined.
from gulp-connect-php.
1.0.0 is now in the primary master branch of the original repository. See: http://github.com/micahblu/gulp-connect-php.
from gulp-connect-php.
This ticket will close on or near 17 May 2017 unless updated.
from gulp-connect-php.
I am also seeing the behavior where the server does not stop when the gulp process is ended (MacOS). My gulp task looks like this:
gulp.task('connect', ['browsersync'], function () {
connect.server({ base: config.wordpress.dest, port: 8001, debug: true, open: false});
});
from gulp-connect-php.
So, Gulp 3 uses orchestrator. Presently our library doesn't implement any binding to Gulp's events. That would be why its not 'automatically' stopping, there is a closeServer
call.
For now i would suggest adding a handler yourself... Should be something much like this (based on @dylanspurgin's code in his comment):
gulp.task('connect', ['browsersync'], function () {
connect.server({ base: config.wordpress.dest, port: 8001, debug: true, open: false}, function() {
gulp.on('stop', function _gulp_php_stopper() {
connect.closeServer();
});
});
});
I will however add this to my TODO
list.
from gulp-connect-php.
@micahblu, I can add this but I'd like to make it so it can be opted out from via a configure parameter... any issues with that conceptually?
from gulp-connect-php.
So, Gulp 3 uses orchestrator. Presently our library doesn't implement any binding to Gulp's events. That would be why its not 'automatically' stopping, there is a closeServer call.
For now i would suggest adding a handler yourself... Should be something much like this (based on @dylanspurgin's code in his comment):
gulp.task('connect', ['browsersync'], function () { connect.server({ base: config.wordpress.dest, port: 8001, debug: true, open: false}, function() { gulp.on('stop', function _gulp_php_stopper() { connect.closeServer(); }); }); });
I will however add this to my TODO list.
Not sure why, but for me the gulp stop event gets fired way to early. I replaced it with following code and seems to work, even if it also feels hacky.
process.on('exit', () => {
console.log('Shutting down php server');
gulpConnectPhp.closeServer()
});
from gulp-connect-php.
Related Issues (20)
- Port 8088 is already taken and the system does not start. HOT 1
- Is this project still maintained? HOT 1
- Crash calling a batch under Windows HOT 4
- Crash when running version 1.0.0 HOT 11
- Doesn't Work In Gulp 4 HOT 9
- Cache with gulp-connect-php HOT 8
- Integration with Google Web Starter Kit
- Directory ../ does not exist. HOT 2
- Can't run server from custom bin directory HOT 4
- Is there a way to automatically add URL extensions? HOT 2
- Opening/Closing a Gulp PHP session in an Electron build HOT 1
- Suggest: options-open an URL
- Allow more than one string for the base path HOT 1
- TypeError: connect.server is not a function HOT 11
- when opening php file chrome downloads it HOT 1
- Add functionality to pass command line args to PHP HOT 3
- Odd issue with server occasionally stopping completely HOT 3
- Limiting logs to errors only HOT 1
- Electron | Blank window after build HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gulp-connect-php.