{"id":8629,"date":"2015-01-09T22:08:05","date_gmt":"2015-01-09T22:08:05","guid":{"rendered":"https:\/\/wp.okra.host\/article\/troubleshooting-php\/"},"modified":"2021-03-07T14:37:15","modified_gmt":"2021-03-07T13:37:15","slug":"troubleshooting-php","status":"publish","type":"ht_kb","link":"https:\/\/kb.okra.host\/de\/article\/troubleshooting-php\/","title":{"rendered":"Fehlersuche in PHP"},"content":{"rendered":"<h2 id=\"overview\" >\u00dcbersicht<\/h2>\n<p>PHP can fail for a variety of reasons. This is a growing list of reasons for which a PHP script may fail or behave inconsistently:<\/p>\n<h2 id=\"output\" >Output<\/h2>\n<h3 id=\"empty-pages\" >Empty pages<\/h3>\n<h4 id=\"compiler-error\" >Compiler error<\/h4>\n<p>By default, PHP will not display compile-time errors or any notice\/error message. These are instead <a title=\"Zugriff auf Webseitenansichten und Fehlermeldungen\" href=\"https:\/\/kb.okra.host\/de\/web-content\/accessing-page-views-and-error-messages\/\">logged<\/a> to improve security against malicious hackers. You can change this through a <a title=\".htaccess-Leitfaden\" href=\"https:\/\/kb.okra.host\/de\/guides\/htaccess-guide\/\">.htaccess<\/a> directive: <code>php_flag display_errors on<\/code> located within the <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>.<\/p>\n<p><span style=\"color: #0000ff\"><strong>To resolve:<\/strong><\/span> Depending upon the nature, there are a few solutions:<\/p>\n<ul>\n<li><strong>Syntax error<\/strong>: correct the syntax mistake, use a suitable IDE to edit PHP files to avoid typos like <a href=\"https:\/\/eclipse.org\/pdt\/\">PDT<\/a>\u00a0(free)\u00a0or\u00a0<a href=\"https:\/\/www.jetbrains.com\/phpstorm\/\">PhpStorm<\/a>\u00a0(mixed cost)<\/li>\n<li><strong>Miscellaneous compiler errors<\/strong>: ensure the PHP script has been uploaded properly to the FTP server. Sometimes, a bad FTP client will inappropriately try to resume a text file resulting in code spliced into itself by file offsets\n<ul>\n<li>Open a ticket in the <a title=\"Anmeldung am Bedienfeld\" href=\"https:\/\/kb.okra.host\/de\/control-panel\/logging-into-the-control-panel\/\">Bedienfeld<\/a> and we&#8217;ll direct you on this! happens more often than you&#8217;d expect<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h4 id=\"bad-cache-retrieval\" >Bad cache retrieval<\/h4>\n<p>PHP utilizes an intermediate cache that takes compiled bytecode and saves it in memory to avoid \u00a0compilation every time a page is requested. In certain circumstances, bytecode compilation gets\u00a0jumbled resulting in an empty page.<\/p>\n<p><strong><span style=\"color: #0000ff\">To resolve<\/span><\/strong>: Disable PHP caching. Depending on platform version, the following directive should be added to a <a title=\".htaccess-Leitfaden\" href=\"https:\/\/kb.okra.host\/de\/guides\/htaccess-guide\/\">.htaccess<\/a> file within the <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> of the affected web site:<\/p>\n<ul>\n<li><a href=\"https:\/\/kb.okra.host\/de\/platform\/determining-platform-version\/\">v6<\/a>\u00a0and newer platforms, which use OPcache:<br \/>\n<code>php_flag opcache.enable off<\/code><\/li>\n<li><a href=\"https:\/\/kb.okra.host\/de\/platform\/determining-platform-version\/\">v5<\/a> and older platforms, which use APC:<br \/>\n<code>php_flag apc.cache_by_default off<\/code><\/li>\n<\/ul>\n<h2 id=\"interaction\" >Interaction<\/h2>\n<h3 id=\"undefined-behavior\" >Undefined behavior<\/h3>\n<p>Behavior that exists beyond the expectations (ie. upload file stores a file) can result from deprecation or outright disuse of old constructs, like <a href=\"http:\/\/php.net\/manual\/en\/security.globals.php\">register_globals<\/a>.<\/p>\n<p><span style=\"color: #0000ff\"><strong>To resolve:\u00a0<\/strong><span style=\"color: #000000\">purely situational, but there is an order of resolution:<\/span><\/span><\/p>\n<ol>\n<li>Ensure that you are operating the latest version of the application<\/li>\n<li>Look for errors in the <a title=\"Zugriff auf Webseitenansichten und Fehlermeldungen\" href=\"https:\/\/kb.okra.host\/de\/web-content\/accessing-page-views-and-error-messages\/\">web server log files<\/a>\n<ul>\n<li>Open a ticket for assistance for any issues present<\/li>\n<\/ul>\n<\/li>\n<li>Add <code>php_flag display_errors on<\/code> und <code>php_value error_reporting 99999<\/code> zu einer <a title=\".htaccess-Leitfaden\" href=\"https:\/\/kb.okra.host\/de\/guides\/htaccess-guide\/\">.htaccess<\/a> file in the <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> of the application. Try to reproduce the issues looking for any additional output prefixed with &#8220;<em>PHP Error<\/em>&#8221; or &#8220;<em>PHP Notice<\/em>&#8221;\n<ul>\n<li>Can&#8217;t resolve the issue based upon error\/warning\/notice context? Open a ticket and let us know how to reproduce it<\/li>\n<\/ul>\n<\/li>\n<li>In certain cases, there can be intricate complications between PHP, software, and even microcode\n<ul>\n<li>Open a ticket with steps to reproduce the issue, and we&#8217;ll look into it\n<ul>\n<li>In the past, issues have ranged from unexpected Zend Engine interaction to\u00a0CPU abnormalities<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ol>","protected":false},"excerpt":{"rendered":"<p>Overview PHP can fail for a variety of reasons. This is a growing list of reasons for which a PHP script may fail or behave inconsistently: Output Empty pages Compiler error By default, PHP will not display compile-time errors or any notice\/error message. These are instead logged to improve security&#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-8629","ht_kb","type-ht_kb","status-publish","format-standard","hentry","ht_kb_category-php"],"_links":{"self":[{"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/ht-kb\/8629","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=8629"}],"version-history":[{"count":1,"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/ht-kb\/8629\/revisions"}],"predecessor-version":[{"id":8630,"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/ht-kb\/8629\/revisions\/8630"}],"wp:attachment":[{"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/media?parent=8629"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/ht-kb-category?post=8629"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/ht-kb-tag?post=8629"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}