|
ru en
|
|||
PHP — module setting, diagnostics and troubleshooting in scripts runningContents
1. General informationToday PHP is one of the popular programming languages used for websites creation. On R01 hosting code of PHP scripts is processed by Apache web server module. Correct operation of website predetermines, in the first place, optimal and reliable operation of the website. R01 hosting administrator has an opportunity of flexible configuration of PHP module, including selection of module version, connection of extensions, change of directives php.ini. Presently, the following versions of PHP interpreter are available on R01 hosting:
Switching between versions is made in section "Web server" — "Modules management" of the hosting control panel (https://www.r01.ru, "Account manager" section). More information about this process is available in the following section. Before starting PHP module configuration, it is first required to study specifications to hosting server and PHP settings referring to website script developers or CMS manuals. 2. Overview of management and configuration interfacesPHP module management is carried out in section "Web server" — "Modules management" of the hosting control panel (https://hosting.r01.ru). 2.1. Selecting PHP module versionReady-to-connect PHP modules are available in section "Web server" — "Modules management" of the hosting control panel (https://www.r01.ruhttps://www.r01.ru, "Account manager" section). To connect the version that suits your website needs, it should be checked and click on "Enable" in the low part of the page. After connection of the required version of PHP module you may start its setup process. To do it, follow link "configure module". PHP version is selected for all websites placed under this hosting service. Using separate versions for each website is impossible. 2.2. PHP Module Extensions ManagementIn the top part of the page with PHP module settings there is "PHP module extensions" block, where you can see the extensions which are activated at present moment. To activate lacking extension:
2.3. Changing PHP module settings (php.ini directives)In the bottom part of the page with PHP module settings there is a table with variables. Set the required values in accordance with website script requirements and save changes.
2.4. Obtaining detailed information about PHP module settingsThe control panel displays only extensions to be disabled. You can obtain full list of extensions and settings using phpinfo() function:
Description of php.ini settings is available in official documentation at website http://php.net. 3. Diagnostics and debugging of website scriptsThis section outlines typical errors occurred at website placement on hosting. In the event of an error which is not considered here we recommend that you first consult website developers. 3.1. A blank page is displayed instead of website contentsYou will see a blank page, if an error encountered in process of scripts running. For the security reasons errors are not displayed on R01 hosting by default. For the debugging purposes we recommend to enable errors display in PHP module settings. In this case a message will appear which bugs occurred at scripts running. Typical errors and debugging methods are given in the following sections of this instruction. To enable errors display, in PHP module settings (as indicated in item 2 of this instruction) just opposite "All warnings and errors E_ALL" select "Yes" and save changes. If the error is still not displayed, it means errors display option is disabled in configuration files or website scripts. To enable them we recommend consulting with website developers or refer to appropriate CMS documentation. 3.2. "Fatal error: Сall to undefined function…"Similar errors occur, if PHP extensions required for website function are not available in web server configuration. Error message contains function name, by which the extension can be identified:
Using website search http://www.php.net you can determine, which PHP extension the function is attributed to, if function name does not allow to explicitly identify the extension. You may enable the appropriate extension as per item 2 of this instruction. 3.3. "Fatal error: Allowed memory size of XXX bytes exhausted…"This error occurs, if the memory allocated for script running is exhausted. The amount expressed in bytes indicates current memory limit. This limit is set by memory_limit setting. You may change "Maximum memory capacity for script operation (memory_limit)" setting as per item 2 of this instruction. If the error persists, it means this setting is reconfigured in configuration files or website scripts. If there is not enough memory for script running at a maximum value memory_limit allocated for the plan, it may indicate that there is a bug in it. In this case we recommend consulting script developer. 3.4. Error "Headers already sent…"In most cases this error is caused by a so called BOM-signature in website files. In the first place check configuration files of the website, in which you could introduce changes. To solve this problem you should download these files to your computer, open and save them in UTF-8 code without BOM-signature. For this purpose, you should use any specialized text editor, for example notepad++, supporting files saving in UTF-8 code without BOM-signature. Standard Windows "Notepad" is a poor alternative in this case. For editing purposes you may also use section "File manager" of the hosting control panel. At the very beginning of file, before opening PHP tag you will see three illegible characters. Delete them and save changes. 3.5. RAM shortageIf you see slow operation of website, unstable operation of a part of functions, for example mail dispatch mail(), check statistics of using resources provided in section "Web server" — "Resources usage" of the hosting control panel. If memory graph reaches limitations of the RAM allocated for this plan, there may be unstable operation, partial or full unavailability of websites, whereas the server does not have enough resources to process incoming requests and run scripts. A complex solution that will help reduce consumption of resources:
|
||||
Copyright © 2000-2024 Registrar R01 |
Information: info@r01.ru
Support: support@r01.ru Office: 1 Bolshoy Gnezdnikovsky Lane, building 2, Moscow (Tverskaya metro station, entrance No. 9, Voznesensky business center) |