node-php
node-php copied to clipboard
No input file specified.
error exec php script:
No input file specified.
i have the same problem too, when i use app.use("/", php.cgi("/path/to/wordpress")); or app.use("/", php.cgi("tes.php"));
it will give something wrong in PATH_INFO, i don't know why
let's take a look this one works good app.get("/", php.cgi(__dirname));
and make sure, you have set up this, in node-modules/node-php/main.js SERVER_PORT: 9000, //The port of your PHP-FPM or PHP-CGI service
and here is my node-modules var fs = require('fs'); var express = require('express'); var apl = express(); var colors = require('colors'); var morgan = require('morgan'); var bodyParser = require('body-parser'); var methodOverride = require('method-override'); var mongoose = require("mongoose"); var php = require("node-php"); var path = require("path");
+1
Cool.This worked.
app.get("/", php.cgi(__dirname + '/phporwww'));