Skip to content

Instantly share code, notes, and snippets.

@dewomser
Last active June 26, 2025 16:27
Show Gist options
  • Select an option

  • Save dewomser/c6719f0c0ad2bcbc1a97c8490398ee27 to your computer and use it in GitHub Desktop.

Select an option

Save dewomser/c6719f0c0ad2bcbc1a97c8490398ee27 to your computer and use it in GitHub Desktop.
Information über die PHP-Einstellung

phpinfo mit Bash und PHP

Information über die PHP-Einstellung bekommt man, wenn man die 3 Zeilen in eine Datei schreibt und dann mit dem Browser anguckt.

<?php
phpinfo();
 ?>

Oder einfach dieses Kommando für #Bash

php -r 'phpinfo();'

oder noch einfacher

php -i

Vorteil beim Shellkommando. Man kann greppen

php -i | grep opcache

Wenn's nicht funktioniert "php" durch "sudo -u www-data php" ersetzen (… oder wie der -u www-User eben heißt)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment