PHP

Curl PHP Version without Server Access

Curl is a very useful tool. A lot of times in troubleshooting, you will be trying to solve an issue with very little information. Let us say, hypothetically, that someone had an issue with their site, possible because of the version of PHP they are running on the server. They might not know their PHP version. What can you do?

Magic PHP Getting

You can use this site here:
Or even easier maybe.

curl -I "the URL of the site in question, no quotes"

Example

curl -I https://ganstapenguin.com/blog/index.php
HTTP/1.1 301 Moved Permanently
Date: Mon, 08 Apr 2019 10:43:05 GMT
Server: Apache/2.4.37 () OpenSSL/1.0.2k-fips
X-Powered-By: PHP/7.2.14
X-Redirect-By: WordPress
Upgrade: h2,h2c
Connection: Upgrade
Location: https://ganstapenguin.com/blog/
Content-Type: text/html; charset=UTF-8

The first line is my Command line input, the 5th line down is the PHP version this server is running.

Here is another session of troubleshooting a different WordPress problem on their support forums,

Leave a Reply