-
Notifications
You must be signed in to change notification settings - Fork 7.3k
When running node on windows with php's proc_open() it crashes with Unknown system errno 10106 #1943
Comments
Closing this for now, we don't support third-party modules. Can you strace or dtrace it? If this is a bug in Node itself, I'll be happy to fix it. |
Unfortunatly this has nothing to do with faye. var http = require('http');
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end('Hello World\n');
}).listen(1337, "127.0.0.1");
console.log('Server running at http://127.0.0.1:1337/'); How can I provide more debug information on windows? |
Reopening. @igorzi and @piscisaureus, can you look into this? |
@Shyru most likely this is due PHP's proc_open() not setting node's systemroot and systemdrive env variables (which are needed to initialize winsock). See this commit in libuv: joyent/libuv@3409c9b. We make sure to set those variables for spawn to fix this issue. |
Do this in the C++ code: We should have a windows specific test which spawns a child and checks that systemroot and systemdrive are set |
I can confirm that setting up the environment correctly solves the problem. In my particular case php's option variables_order was not set to initialize $_ENV. So I passed an empty array of env variables to proc_open. After fixing this it works like intended. |
Closing this for now as there does not appear to be anything to do at this point. Can reopen later if new information is received. |
We have a small wrapper script (written in php) that starts node with a given javascript file.
To read and write to nodes stdin/stdout we use proc_open() of php. When doing this, node crashes with this exception:
Our node server uses faye () to listen on port 8000 for incoming requests.
Fore reference this is the script we are trying to execute:
Note: I dont get the output 'startup' or 'running' from inside php.
Important: When running node from commandline with this script, everything works perfectly! Its just that starting it from php with proc_open() makes it go crazy!
Any idea what could be the cause of this?
Edit: I forgot to say this is using current node 0.5.10, but the error existed already in previous node versions, but the crashes where all different, but it never worked. :-)
The text was updated successfully, but these errors were encountered: