
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
This is a Node.js module available through the
npm registry. Installation is done using the
npm install command:
$ npm install php-fpm
httpconst http = require('http')
const phpFpm = require('php-fpm')
const serveStatic = require('serve-static')
const php = phpFpm() // Optional: parameters for fastcgi-client
const serve = serveStatic(__dirname)
const server = http.createServer(function (req, res) {
if (req.url.match(/\.php(\?.*)?$/)) {
php(req, res)
} else {
serve(req, res)
}
})
server.listen(8080)
expressconst express = require('express')
const phpFpm = require('php-fpm')
const app = express()
app.use(phpFpm())
app.listen(8080)
The available parameters for php-fpm are:
phpFpm(
userOptions = {
// Parameters for fastcgi-client
host: '127.0.0.1',
port: 9000,
documentRoot: __dirname,
skipCheckServer: true
},
customParams = {
// Headers for php-fpm (automatically set)
uri, // REQUEST_URI
document, // DOCUMENT_URI
query, // QUERY_STRING
script // SCRIPT_FILENAME
}
)
Parameters for fastcgi-client are available here.
rewrite optionThere is an implementation of the rewrite module to handle routes the traditional nginx/Apache way.
const phpFpm = require('php-fpm')
// Route rewrite for Phalcon framework
const php = phpFpm({
rewrite: [
{
rule: /.*/, // Default rule, can be omitted
replace: '/index.php?_url=$0'
}
]
})
FAQs
Simple, middleware-style PHP binding
We found that php-fpm demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.