{"id":197,"date":"2015-09-09T17:10:08","date_gmt":"2015-09-10T01:10:08","guid":{"rendered":"https:\/\/cloudinsidr.com\/content\/?p=197"},"modified":"2015-12-22T19:28:34","modified_gmt":"2015-12-23T03:28:34","slug":"how-to-figure-out-your-php-configuration-parameters-without-info-php","status":"publish","type":"post","link":"https:\/\/www.cloudinsidr.com\/content\/how-to-figure-out-your-php-configuration-parameters-without-info-php\/","title":{"rendered":"How to Figure out Your PHP Configuration Parameters without info.php"},"content":{"rendered":"<p>One way to\u00a0find out the details of\u00a0your PHP configuration is by saving<\/p>\n<pre class=\"lang:php decode:true \" title=\"info.php\">&lt;?php phpinfo(); ?&gt;<\/pre>\n<p>in a text file with the extension .php\u00a0in a web server directory.\u00a0You can name this file\u00a0whatever you want; its\u00a0customary 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,\u00a0leaves you vulnerable: it discloses\u00a0details to the public that should be\u00a0nobody&#8217;s business but the administrator&#8217;s. It is certainly not a good policy to leave the file\u00a0on the server and too much hassle to create it every time it&#8217;s needed.\u00a0Luckily, there is a better way.<\/p>\n<p><!--more--><\/p>\n<p>There is no need to create an info.php file. Instead, you can issue this command in the command line:<\/p>\n<pre class=\"lang:sh decode:true \">php-fpm -i | more<\/pre>\n<p>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:<\/p>\n<pre class=\"lang:php decode:true \">Configuration File (php.ini) Path =&gt; \/etc<\/pre>\n<p>If\u00a0all you need it a quick info on the relevant locations, try this instead:<\/p>\n<pre class=\"\">php --ini\r\n\r\nConfiguration File (php.ini) Path: \/etc\r\nLoaded Configuration File: \/etc\/php.ini\r\nScan for additional .ini files in: \/etc\/php.d\r\nAdditional .ini files parsed: (none)\r\n<\/pre>\n<p class=\"\">That&#8217;s all there is to it.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>One way to\u00a0find out the details of\u00a0your PHP configuration is by saving &lt;?php phpinfo(); ?&gt; in a text file with the extension .php\u00a0in a web server directory.\u00a0You can name this file\u00a0whatever you want; its\u00a0customary name is info.php. When you visit the corresponding URI in your web browser, it will show you all the relevant details [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_genesis_hide_title":false,"_genesis_hide_breadcrumbs":false,"_genesis_hide_singular_image":false,"_genesis_hide_footer_widgets":false,"_genesis_custom_body_class":"","_genesis_custom_post_class":"","_genesis_layout":"","footnotes":""},"categories":[33,6],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v14.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Figure out Your PHP Configuration Parameters without info.php - CloudInsidr<\/title>\n<meta name=\"robots\" content=\"index, follow\" \/>\n<meta name=\"googlebot\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<meta name=\"bingbot\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.cloudinsidr.com\/content\/how-to-figure-out-your-php-configuration-parameters-without-info-php\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Figure out Your PHP Configuration Parameters without info.php - CloudInsidr\" \/>\n<meta property=\"og:description\" content=\"One way to\u00a0find out the details of\u00a0your PHP configuration is by saving &lt;?php phpinfo(); ?&gt; in a text file with the extension .php\u00a0in a web server directory.\u00a0You can name this file\u00a0whatever you want; its\u00a0customary name is info.php. When you visit the corresponding URI in your web browser, it will show you all the relevant details [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.cloudinsidr.com\/content\/how-to-figure-out-your-php-configuration-parameters-without-info-php\/\" \/>\n<meta property=\"og:site_name\" content=\"CloudInsidr\" \/>\n<meta property=\"article:published_time\" content=\"2015-09-10T01:10:08+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2015-12-23T03:28:34+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.cloudinsidr.com\/content\/#website\",\"url\":\"https:\/\/www.cloudinsidr.com\/content\/\",\"name\":\"CloudInsidr\",\"description\":\"Cyber security, infotech\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":\"https:\/\/www.cloudinsidr.com\/content\/?s={search_term_string}\",\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.cloudinsidr.com\/content\/how-to-figure-out-your-php-configuration-parameters-without-info-php\/#webpage\",\"url\":\"https:\/\/www.cloudinsidr.com\/content\/how-to-figure-out-your-php-configuration-parameters-without-info-php\/\",\"name\":\"How to Figure out Your PHP Configuration Parameters without info.php - CloudInsidr\",\"isPartOf\":{\"@id\":\"https:\/\/www.cloudinsidr.com\/content\/#website\"},\"datePublished\":\"2015-09-10T01:10:08+00:00\",\"dateModified\":\"2015-12-23T03:28:34+00:00\",\"author\":{\"@id\":\"https:\/\/www.cloudinsidr.com\/content\/#\/schema\/person\/dd6ee9cb21cf05763fd7cff3d6f11b2b\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.cloudinsidr.com\/content\/how-to-figure-out-your-php-configuration-parameters-without-info-php\/\"]}]},{\"@type\":[\"Person\"],\"@id\":\"https:\/\/www.cloudinsidr.com\/content\/#\/schema\/person\/dd6ee9cb21cf05763fd7cff3d6f11b2b\",\"name\":\"Cloud Insidr\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/www.cloudinsidr.com\/content\/#personlogo\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/8b2fa1415b3d573b97d818b8f8f83b7c?s=96&d=mm&r=g\",\"caption\":\"Cloud Insidr\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","_links":{"self":[{"href":"https:\/\/www.cloudinsidr.com\/content\/wp-json\/wp\/v2\/posts\/197"}],"collection":[{"href":"https:\/\/www.cloudinsidr.com\/content\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.cloudinsidr.com\/content\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.cloudinsidr.com\/content\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.cloudinsidr.com\/content\/wp-json\/wp\/v2\/comments?post=197"}],"version-history":[{"count":8,"href":"https:\/\/www.cloudinsidr.com\/content\/wp-json\/wp\/v2\/posts\/197\/revisions"}],"predecessor-version":[{"id":205,"href":"https:\/\/www.cloudinsidr.com\/content\/wp-json\/wp\/v2\/posts\/197\/revisions\/205"}],"wp:attachment":[{"href":"https:\/\/www.cloudinsidr.com\/content\/wp-json\/wp\/v2\/media?parent=197"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.cloudinsidr.com\/content\/wp-json\/wp\/v2\/categories?post=197"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.cloudinsidr.com\/content\/wp-json\/wp\/v2\/tags?post=197"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}