{"id":8631,"date":"2015-01-04T18:35:16","date_gmt":"2015-01-04T18:35:16","guid":{"rendered":"https:\/\/wp.okra.host\/article\/viewing-php-settings\/"},"modified":"2021-03-07T14:37:16","modified_gmt":"2021-03-07T13:37:16","slug":"viewing-php-settings","status":"publish","type":"ht_kb","link":"https:\/\/kb.okra.host\/de\/article\/viewing-php-settings\/","title":{"rendered":"Anzeigen der PHP-Einstellungen"},"content":{"rendered":"<h2 id=\"overview\" >\u00dcbersicht<\/h2>\n<p>Default PHP settings may be viewed either as a standalone page or within an application using <a href=\"http:\/\/php.net\/phpinfo\">phpinfo()<\/a> oder <a href=\"http:\/\/php.net\/ini_get\">ini_get()<\/a>.<\/p>\n<h2 id=\"default-environment-settings\" >Default Environment Settings<\/h2>\n<p>To view your default environment settings, create a file named <code>phpinfo.php<\/code> inside your <a title=\"Von wo aus werden die Inhalte der Website bereitgestellt?\" href=\"https:\/\/kb.okra.host\/de\/web-content\/where-is-site-content-served-from\/\">Dokumentenstamm<\/a>. Inside this file, include the following line:<\/p>\n<pre data-language=\"php\"><code>&lt;?php phpinfo(); ?&gt;<\/code><\/pre>\n<p>Access the URL phpinfo.php from your web browser, e.g. http:\/\/example.com\/phpinfo.php if your domain were example.com, to view the settings.<\/p>\n<div id=\"attachment_391\" style=\"width: 310px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/kb.okra.host\/wp-content\/uploads\/2015\/01\/phpinfo-example.png\" rel=\"lightbox-0\" data-lbwps-width=\"937\" data-lbwps-height=\"902\" data-lbwps-srcsmall=\"https:\/\/kb.okra.host\/wp-content\/uploads\/2015\/01\/phpinfo-example.png\"><img decoding=\"async\" aria-describedby=\"caption-attachment-391\" loading=\"lazy\" class=\"size-medium wp-image-391\" src=\"https:\/\/kb.okra.host\/wp-content\/uploads\/2015\/01\/phpinfo-example-300x288.png\" alt=\"Example phpinfo() response\" width=\"300\" height=\"288\" \/><\/a><\/p>\n<p id=\"caption-attachment-391\" class=\"wp-caption-text\">Example phpinfo() response<\/p>\n<\/div>\n<h2 id=\"application-settings\" >Application Settings<\/h2>\n<p>phpinfo() in a standalone script will show you the default settings for your hosting environment. Web applications like WordPress, Drupal, and Joomla! will automatically adjust settings on-the-fly with recommended settings as necessary (<a href=\"http:\/\/php.net\/manual\/en\/errorfunc.configuration.php#ini.error-reporting\">error_reporting<\/a>, <a href=\"http:\/\/php.net\/manual\/en\/errorfunc.configuration.php#ini.display-errors\">display_errors<\/a>, <a href=\"http:\/\/php.net\/manual\/en\/ini.core.php#ini.upload-max-filesize\">upload_max_filesize<\/a>, etc.). It&#8217;s recommended to refer either to the settings panel in the web application (<em>see vendor&#8217;s instructions<\/em>) or if it is unavailable and absolutely necessary, use ini_get() or phpinfo() at the bottom of the script, usually index.php:<\/p>\n<pre data-language=\"php\"><code>\/** some application code ... *\/\r\n$page-&gt;init();\r\n?&gt;\r\n\r\n&lt;?php print \"memory_limit setting: \"; ini_get('memory_limit'); ?&gt;\r\n\r\n&lt;?php phpinfo(); ?&gt;<\/code><\/pre>\n<p><strong>Explanation:<\/strong> In the above example, 2 methods of accessing PHP settings are used: ini_get() to get a specific single value (<a href=\"http:\/\/php.net\/manual\/en\/ini.core.php#ini.memory-limit\">speicher_limit<\/a> in this case &#8211; <em>note<\/em> this can&#8217;t be changed except by support ticket in the <a title=\"Anmeldung am Bedienfeld\" href=\"https:\/\/kb.okra.host\/de\/control-panel\/logging-into-the-control-panel\/\">Bedienfeld<\/a>) and phpinfo() once again to dump the entire PHP environment. These scriptlets are inserted at the\u00a0<em>end of the file<\/em> after the closing PHP delimiter, <code>?&gt;<\/code>.<\/p>\n<p>Sometimes there is no PHP at the end of a script, but rather HTML. In those cases, ini_get() or phpinfo() should be injected before the closing <code>&lt;\/body&gt;<\/code> tag:<\/p>\n<pre data-language=\"html\"><code>&lt;!--- some html ... --&gt;\r\n&lt;span&gt;Thanks for coming!&lt;\/span&gt;\r\n&lt;?php print &quot;memory_limit setting: &quot;; ini_get('memory_limit'); ?&gt;\r\n&lt;?php phpinfo(); ?&gt;\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n\r\n<\/code><\/pre>\n<h2 id=\"see-also\" >Siehe auch<\/h2>\n<ul>\n<li><a title=\"\u00c4ndern der PHP-Einstellungen\" href=\"https:\/\/kb.okra.host\/de\/php\/changing-php-settings\/\">\u00c4ndern der PHP-Einstellungen<\/a><\/li>\n<\/ul>","protected":false},"excerpt":{"rendered":"<p>Overview Default PHP settings may be viewed either as a standalone page or within an application using phpinfo() or ini_get(). Default Environment Settings To view your default environment settings, create a file named phpinfo.php inside your document root. Inside this file, include the following line: &lt;?php phpinfo(); ?&gt; Access the&#8230;<\/p>","protected":false},"author":1,"comment_status":"open","ping_status":"closed","template":"","format":"standard","meta":{"footnotes":""},"ht-kb-category":[63],"ht-kb-tag":[],"class_list":["post-8631","ht_kb","type-ht_kb","status-publish","format-standard","has-post-thumbnail","hentry","ht_kb_category-php"],"_links":{"self":[{"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/ht-kb\/8631","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/comments?post=8631"}],"version-history":[{"count":1,"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/ht-kb\/8631\/revisions"}],"predecessor-version":[{"id":8632,"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/ht-kb\/8631\/revisions\/8632"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/media\/8633"}],"wp:attachment":[{"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/media?parent=8631"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/ht-kb-category?post=8631"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/ht-kb-tag?post=8631"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}