Create a phpinfo() file to access your php supporting web server configuration and information.
Domain Hostmaster for domain names, websites, hosting, dedicated servers, e-commerce software and webmaster tools. Dedicated tech support team available 24 hours per day, 7 days a week.

phpinfo() File

How to make a phpinfo file in order to view your server configuration information.

Often times you need to find out specific server configuration information in order to install and run a specific web application or script, or just to troubleshoot your server. If your server has php installed, you can get a great deal of this info by making and running a phpinfo file from your server. You can easily create a phpinfo file to access this information.

Modern open source web applications and scripts, as well as many commercial web applications, are often programmed in the php language with database support (most often supporting MySQL and sometimes also offering additional database languages support). In order for certain applications to work correctly, they usually require a mininum version requirement for the php installation, specific php extensions, certain Apache or IIS modules activated, or have mininum server memory requirements for php applications. A phpinfo file also offers a description of many other important settings, which you can use to analyze what might be causing any possible conflicts with your web server.

EditPad Text/Code Editor IconUse a text editor, such as Notepad, Note Tab, or EditPad. Be sure that no matter what platform you are on, you use a text based editor (not a word processor) and save the text file as an ascii text document (a regular text file). Your web hosting control panel may also provide a text editor.

Notepad comes with Windows®, but is senselessly featureless for text editing or any type of coding. Note Tab Light and EditPad Light are both great free code aware text editor products. I prefer to use Note Tab Pro, while many others prefer EditPad Pro for full-featured code editing.

In your text editor, start a new text document. Highlight, copy and paste (or type) the following code into this document:

code:


<?php phpinfo(); ?>


That's all there is to it. The code initializes php (the "<?php" part) and then executes the "phpinfo()" instruction. The phpinfo() command does have a bunch of optional arguments, but by default it gives us what we really want, everything except the credits. The ";" (semicolon) is an end of line instruction delimiter (eol) and the "?>" denotes the end of the file (eof).

Save this document as a text file and name it "phpinfo.php" or something suitable. You will want to keep the .php extension so that the server will interpret this document as php code.

You should consider the phpinfo file a temporary file, as malicious hackers (aka: "crackers") could use this file to gather enough information for them to compromise your web hosting account. This is why you might want to name the phpinfo something else, and/or upload it into a subdirectory of your site, instead of the root.

Upload the phpinfo file to your server using the FTP client of your choice if you didn't create it on the server itself.

Call the phpinfo() file from your browser according to its web address (url).

The phpinfo file won't show you the current version of your database scheme, but it does provide a great deal of other useful information about php, active php extensions, and your Apache or IIS server install. If an empty page or the same code "<?php phpinfo(); ?>" is displayed at the phpinfo file url, your web server does not support the php scripting language and you cannot install php based programs.

In order to find out your database scheme installation version and specifics, I recommend using the phpMyAdmin database management utility for MySQL databases, or your web server's provided database management application for other database installations.

Remember to delete the phpinfo file from your server when you have the information you need, or when you are done troubleshooting your server, for security purposes. You can recreate or re-upload the file the next time you need it, as quality web hosts (such as Domain Hostmaster) are in a constant state of perpetual upgrade.

Add URL Engine Logo - Add Your URL to a Receptive Network of Multiple Search Engines and Web Directories Simultaneously, for Free    

Submit Your Site To The Web's Top 50 Search Engines for Free     Submit Express Inc.SEO & Search Engine Placement Services     Search Engine Optimization SEO     Annox Search and Community Portal     Active Search Results    

Domain Hostmaster for domain names, websites, hosting, dedicated servers, e-commerce software and webmaster tools. Dedicated tech support team available 24 hours per day, 7 days a week.