{"id":104,"date":"2017-02-21T14:21:47","date_gmt":"2017-02-21T03:21:47","guid":{"rendered":"https:\/\/www.aspireweb.com.au\/blog\/?p=104"},"modified":"2017-02-21T14:59:45","modified_gmt":"2017-02-21T03:59:45","slug":"how-do-i-create-a-phpinfo-page","status":"publish","type":"post","link":"https:\/\/aspireweb.com.au\/blog\/how-do-i-create-a-phpinfo-page\/","title":{"rendered":"How do I create a PHPinfo page?"},"content":{"rendered":"<p>A great way to test PHP is by creating a PHPInfo page.<br \/>\nThis is a simple page that displays PHP settings and easily proves if PHP is working or if a specific feature is install or should be working on PHP.<\/p>\n<p>We&#8217;ve made a simple tutorial with images to make it easy to get started using this nifty file.<\/p>\n<p><!--more--><\/p>\n<ol>\n<li>Create a new empty phpinfo.php file<br \/>\nIn Windows you can do this by\u00a0opening notepad and going to &#8220;Save As&#8221;<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-105\" src=\"https:\/\/www.aspireweb.com.au\/blog\/wp-content\/uploads\/2017\/02\/notepad_saveas_022117_125952_PM.jpg\" alt=\"\" width=\"336\" height=\"272\" srcset=\"https:\/\/aspireweb.com.au\/blog\/wp-content\/uploads\/2017\/02\/notepad_saveas_022117_125952_PM.jpg 336w, https:\/\/aspireweb.com.au\/blog\/wp-content\/uploads\/2017\/02\/notepad_saveas_022117_125952_PM-300x243.jpg 300w, https:\/\/aspireweb.com.au\/blog\/wp-content\/uploads\/2017\/02\/notepad_saveas_022117_125952_PM-128x104.jpg 128w\" sizes=\"auto, (max-width: 336px) 100vw, 336px\" \/><br \/>\nBrowse to a folder of your choice or the desktop, select &#8220;All Files (*.*)&#8221; in the Save as type drop down and enter the filename as &#8220;phpinfo.php&#8221;, and click save:<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-107\" src=\"https:\/\/www.aspireweb.com.au\/blog\/wp-content\/uploads\/2017\/02\/Screenshot_022117_011141_PM.jpg\" alt=\"\" width=\"769\" height=\"490\" srcset=\"https:\/\/aspireweb.com.au\/blog\/wp-content\/uploads\/2017\/02\/Screenshot_022117_011141_PM.jpg 769w, https:\/\/aspireweb.com.au\/blog\/wp-content\/uploads\/2017\/02\/Screenshot_022117_011141_PM-300x191.jpg 300w, https:\/\/aspireweb.com.au\/blog\/wp-content\/uploads\/2017\/02\/Screenshot_022117_011141_PM-768x489.jpg 768w, https:\/\/aspireweb.com.au\/blog\/wp-content\/uploads\/2017\/02\/Screenshot_022117_011141_PM-128x82.jpg 128w\" sizes=\"auto, (max-width: 769px) 100vw, 769px\" \/><\/li>\n<li>In the file enter the following:\n<pre>&lt;?php\r\nphpinfo();<\/pre>\n<\/li>\n<li>Save the file<\/li>\n<li>Now we need to load the file to your website, you can normally do this by using an FTP client like FileZilla or if your working locally just copy the file to the website folder.<\/li>\n<li>Go to your browser and navigate to the file. EG http:\/\/myfancynewsite.com\/phpinfo.php<\/li>\n<li>Confirm that a page like below shows up.<\/li>\n<\/ol>\n<p style=\"padding-left: 30px;\">\u00a0<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-109\" src=\"https:\/\/www.aspireweb.com.au\/blog\/wp-content\/uploads\/2017\/02\/Screenshot_022117_021637_PM.jpg\" alt=\"\" width=\"944\" height=\"459\" srcset=\"https:\/\/aspireweb.com.au\/blog\/wp-content\/uploads\/2017\/02\/Screenshot_022117_021637_PM.jpg 944w, https:\/\/aspireweb.com.au\/blog\/wp-content\/uploads\/2017\/02\/Screenshot_022117_021637_PM-300x146.jpg 300w, https:\/\/aspireweb.com.au\/blog\/wp-content\/uploads\/2017\/02\/Screenshot_022117_021637_PM-768x373.jpg 768w, https:\/\/aspireweb.com.au\/blog\/wp-content\/uploads\/2017\/02\/Screenshot_022117_021637_PM-128x62.jpg 128w\" sizes=\"auto, (max-width: 944px) 100vw, 944px\" \/><\/p>\n<p style=\"padding-left: 30px;\">Hopefully at this point you&#8217;ve got PHPInfo working, scroll through the page and you will see a lot of different details regarding your PHP installation.<\/p>\n<p style=\"padding-left: 30px;\">If your using a special module\/extension or need to confirm it is installed on your server this is a great way to do so.<\/p>\n<p style=\"padding-left: 30px;\">\n<p style=\"padding-left: 30px;\"><strong><span style=\"color: #ff0000;\">Warning:<\/span>\u00a0<\/strong>It&#8217;s not recommended to leave this file around on the website, this will provide a potential attacker with a lot of information regarding your server and host. After confirming the details we recommend deleting the file.<\/p>\n<p style=\"padding-left: 30px;\">\n<p style=\"padding-left: 30px;\"><strong>What do I do if it doesn&#8217;t work?<\/strong><br \/>\nFirst this will depend on the type of error you are getting:<\/p>\n<p style=\"padding-left: 60px;\">404: This means that the file is missing, confirm that the file is in the correct directory and uploaded.<\/p>\n<p style=\"padding-left: 60px;\">500 or other error:<br \/>\nThis\u00a0file should work without issues on a website host so I would contact your host if there are issues with the file.<br \/>\nIf you are running this on a local machine for development you&#8217;ll want to go through standard diagnostics for your setup. I would start Googling the error you received as this is be different based on your operating system and web server.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A great way to test PHP is by creating a PHPInfo page. This is a simple page that displays PHP settings and easily proves if PHP is working or if a specific feature is install or should be working on PHP. We&#8217;ve made a simple tutorial with images to make it easy to get started [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-104","post","type-post","status-publish","format-standard","hentry","category-php"],"_links":{"self":[{"href":"https:\/\/aspireweb.com.au\/blog\/wp-json\/wp\/v2\/posts\/104","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/aspireweb.com.au\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/aspireweb.com.au\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/aspireweb.com.au\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/aspireweb.com.au\/blog\/wp-json\/wp\/v2\/comments?post=104"}],"version-history":[{"count":4,"href":"https:\/\/aspireweb.com.au\/blog\/wp-json\/wp\/v2\/posts\/104\/revisions"}],"predecessor-version":[{"id":124,"href":"https:\/\/aspireweb.com.au\/blog\/wp-json\/wp\/v2\/posts\/104\/revisions\/124"}],"wp:attachment":[{"href":"https:\/\/aspireweb.com.au\/blog\/wp-json\/wp\/v2\/media?parent=104"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/aspireweb.com.au\/blog\/wp-json\/wp\/v2\/categories?post=104"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/aspireweb.com.au\/blog\/wp-json\/wp\/v2\/tags?post=104"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}