You can now use this information to carry out any necessary debugging or other tasks. You can locate the specific details you’re looking for by using the Find function (CTRL or CMD + F) on your computer: Find function example If you didn’t use any parameters and chose to return all of your PHP information, this page will likely be quite long. This means you (and anyone else) can view it in a browser by appending /phpinfo.php to the end of your site’s domain: How the phpinfo page looks like Once it’s uploaded to your server, your phpinfo page will become publicly available. Step 2: Access the phpinfo Page in Your Browser In order to view the page, however, you’ll need to know where to find it. You’ve now successfully added the phpinfo page to your site. Then, upload your new phpinfo.php file to the public_html folder: Adding the phpinfo.php file Next, open up FileZilla or another FTP client, and connect to your site’s server using your FTP credentials. If you prefer, you can use a different name (we’ll explain why you might want to do so in Step 3), but you must use the. If you wish to use one of the parameters mentioned above, you should insert it between the parentheses here. In a new document, add the following line of code: To start creating this page, open up your preferred text editor. Step 1: Create a phpinfo.php File and Upload It to Your Server In the following sections, we’ve broken it down into three short steps. If you have a basic understanding of File Transfer Protocol (FTP) and how to use an FTP client, creating a phpinfo page is really quite simple. How to Create a phpinfo Page (In 3 Steps) Suggested reading: How to Improve PHP Memory Limit in WordPress. The EGPCS data available via this function makes it particularly helpful in that regard. Rather than checking for these pieces of information, phpinfo() is more suited to assist you with debugging attempts. Simply navigate to Tools > Site Health > Info > Server to find this data: Site Health feature However, it’s important to note that you can find some of the information above without the extra trouble of using that function.įor example, the WordPress Site Health feature included in version 5.2 and above can share details about your web server, PHP version, memory limit, and more. One way to use the phpinfo() function is by creating a phpinfo page, as we’ll describe later in this post. INFO_ALL: Returns all available information (you can accomplish the same thing by using no parameters).INFO_LICENSE: Displays the PHP License.INFO_VARIABLES: Shows all predefined variables from Environment, GET, POST, Cookie, Server (EGPCS).INFO_ENVIRONMENT: Includes all environment variable information.INFO_MODULES: Shares all extensions and their settings.INFO_CONFIGURATION: Returns the current local and master directives.INFO_CREDITS: Shows a list of PHP developers, modules, etc.INFO_GENERAL: Displays the configuration line, web server, OS, and more.However, there are also a handful of parameters you can use, in order to access only the specific information you want to see. Using the function alone will return all available information. Modules and extensions currently in use.Master and local values for PHP configuration options.Paths, including the location of php.ini.Your Operating System (OS) version information.Your server information and environment.The current version of PHP your site is running.Running phpinfo() will display information regarding your site’s PHP configuration, including: Phpinfo() is a PHP function or a snippet of code that takes in one or more parameters and returns a value. An Introduction to the phpinfo() Function
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |