Find information on PHP in only 4 steps

There are times when you need to know basic information about the version of PHP that your web host is running. Some of the most common things you may need to know are the memory limit, maximum file size for uploads, the status of magic quotes, and the version of PHP. You can ask your host, but there is often a much faster way to find out.

Using a built in PHP function called phpinfo, you can discover a wealth of information about your PHP installation. To do this, follow the steps below.

Step 1

Create a file in your public_html directory called info.php .

Step 2

Open this file to edit. If you’re using CPanel’s file manager, right click on the file and choose Code Edit. Open using UTF-8.

Step 3

Since this is a brand new file, it is empty. Type the following into the file:

<?php phpinfo();

Save the file and close the window/tab.

Step 4

Load the page in your browser by going to . Your see a tremendous amount of information about PHP. Most of this you will likely never need to look at or ever know, but some of these setting can be helpful. When you are finished with this file, delete it. You won’t want just anyone to be able to pull this file.

You’ve now learned how to quickly and easily load a list of PHP settings and information. For more tutorials on CPanel, WordPress, and other tools used by webmasters, visit us at and subscribe to our channel on Youtube.

Deny Access to Your .htaccess File

There is a file inside your hosting account known as a .htaccess file. This file, which is named as an extension only (notice the dot before the name), can affect the way the web server handles your website. It can power webpage redirects and rewrites, password protected directories, IP address blocking, and much more.

Some commands that are run in your .htaccess file use the absolute path to the file system of your account. That means that instead of using the relative path (your URL), it uses something like this:


That is the path on the server, to your account and files.

Some web server configurations will not deny access to this file. This can be a problem. If your .htaccess file is accessible to a browser, anyone can viewit. Depending on what you have in the file, you could be showing the world your control panel username, as well as paths leading to hidden files and directories. So how do you stop that from happening?

Protect Your .htaccess file

Open your .htaccess file. At the top of the file, add this code:

[box]<files .htaccess>
order allow,deny
deny from all

Save the file and you’re done.

The code you’ve added will prevent access to your .htaccess from anyone trying to view it. The server can still interpret the file as it normally would, but now the outside world is unable to view it. This is a good thing, as there is no reason for someone to need to view your .htaccess file.

If the file exists. Try loading it in your browser. If you can’t load it, you’re good to go. If you can load it, add the code above to stop access. You can also change the permissions of the file to 0644 to prevent anyone from writing over the file.