PHP

Updated: 02 January 2025

PHP Local Security Checker
https://github.com/fabpot/local-php-security-checker


Check all extensions

php -m

Disable the xdebug module for the fpm sapi and php version 5.6

sudo phpdismod -v 5.6 -s fpm -m xdebug

Enable the xdebug module for the fpm sapi and php version 7.0

sudo phpenmod -v 7.0 -s fpm -m xdebug

Check the status of the xdebug module for the fpm sapi and php 7.4

phpquery -v 7.4 -s fpm -m xdebug

Restart the PHP 5.6 Fast Process Manager

sudo systemctl restart php5.6-fpm

Enable strict mode on a per-file basis

<?php declare(strict_types=1);

Leave a comment