I often have clients who do not know if their server supports PHP (their website is HTML web site). At the moment, I send them hello.php file, they upload it and then I check it remotely if their server supports PHP. As you see this takes day or two and it's just a waste of time.
Can I myself any how check if their server supports PHP (via web browser or console tool)? If the domain is for example www.my-client.com, what would be the syntax?
Thanks
PS. I have an access to Linux console so I could use it as well
[yoursite].com/test. php. If you see the code as you entered it, then your website cannot run PHP with the current host. If your server supports PHP, you will see a list of all the PHP/SQL properties that are supported by the host.
"Remote Control" is a PHP class library that allows you to programically control a remote device via its CLI interface (usually via SSH or Telnet) or any other command via STDIN and STDOUT using Expect in an easy to use object oriented manner.
As Darin Dimitrov says some Servers promote the versions of the uses software. You can use curl to view the HTTP Header of a response.
> curl -I http://example.com
HTTP/1.1 200 OK
Date: Tue, 17 May 2011 10:04:01 GMT
Server: Apache/2.2.8 (Ubuntu) PHP/5.2.4-2ubuntu5.10 with Suhosin-Patch
X-Powered-By: PHP/5.2.4-2ubuntu5.10
Vary: Accept-Encoding
Content-Type: text/html; charset=UTF-8
Can also try with
http://www.example.com/?=PHPE9568F36-D428-11d2-A769-00AA001ACF42
Some servers will respond with a PHP image then. If you have shell access, it is more reliable to test whether php in installed directly on the system though. Whether PHP exposes if it is installed via this Easter Egg or via the Response Headers can be disabled in the PHP.ini.
php_logo_guid
— Gets the logo guid andexpose_php
ini settingDecides whether PHP may expose the fact that it is installed on the server (e.g. by adding its signature to the Web server header). It is no security threat in any way, but it makes it possible to determine whether you use PHP on your server or not.
The best you could do is send an HTTP request to this server http://www.my-client.com
and inspect response HTTP headers. In some cases depending on the server there might be clues. For example here's how the response HTTP headers look like in FireBug for http://joomla.org:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With