CloudInsidr

Cyber security, infotech

  • Subscribe!
  • Privacy Policy
  • Legal
  • Contact Us

Join us on Twitter: @CloudInsidr

  • news & alerts
    • events
    • industry analysis
    • industry gossip
    • people
  • cloud, edge & co.
    • AWS
    • administration & orchestration
      • web servers in the cloud
      • mail servers
      • databases
  • cybersec & warfare
    • encryption
  • blockchain
Home cybersecurity and cyber warfare How to Figure out Your PHP Configuration Parameters without info.php

Cloud Insidr 2015-09-09 Leave a Comment

How to Figure out Your PHP Configuration Parameters without info.php

One way to find out the details of your PHP configuration is by saving

<?php phpinfo(); ?>

in a text file with the extension .php in a web server directory. You can name this file whatever you want; its customary name is info.php. When you visit the corresponding URI in your web browser, it will show you all the relevant details of your configuration. This method, however, leaves you vulnerable: it discloses details to the public that should be nobody’s business but the administrator’s. It is certainly not a good policy to leave the file on the server and too much hassle to create it every time it’s needed. Luckily, there is a better way.

There is no need to create an info.php file. Instead, you can issue this command in the command line:

php-fpm -i | more

The output is pretty extensive. It will show you all the relevant parameters of your PHP build (Configure Command) and current configuration, for example the PHP install location on your system:

Configuration File (php.ini) Path => /etc

If all you need it a quick info on the relevant locations, try this instead:

php --ini

Configuration File (php.ini) Path: /etc
Loaded Configuration File: /etc/php.ini
Scan for additional .ini files in: /etc/php.d
Additional .ini files parsed: (none)

That’s all there is to it.

Filed Under: cybersecurity and cyber warfare, web servers in the cloud

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Subscribe

SSL/TLS Certificate Square (250 x 250)

Pearson Education (InformIT)

SSL/TLS Certificate Medium Rectangle (300 x 250)

©2022 CybrAnalytiqa OÜ

  • Content purchasing and syndication