Skip to content

Commit

Permalink
update env
Browse files Browse the repository at this point in the history
  • Loading branch information
ssddi456 committed Jan 23, 2015
1 parent ed690b1 commit 3bfabb2
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function runPHP(req, response, next, phpdir){
});

function create_request () {
var env = {
var env = {
SERVER_SIGNATURE: "NodeJS server at localhost",
//The extra path information,
//as given in the requested URL.
Expand Down Expand Up @@ -161,8 +161,12 @@ function runPHP(req, response, next, phpdir){

var res = [], err = [];

var util = require('util');
var _env = util._extend({},process.env);
util._extend(_env,env);

var php = child.spawn("php-cgi", [], {
env: env
env: _env
});

php.stdin.on("error", function(){});
Expand Down

0 comments on commit 3bfabb2

Please sign in to comment.