Hot to check if my webhost is using HardenedPHP ?
Forum
  1. Forums
  2. General
  3. General Discussion
  1. Marco Usai
  2. Tuesday, 14 June 2016
  3.  Subscribe via email
I\'m with a webhost that uses CloudLinux and a cPanel php tool that is identical to Php selector:

what can I do to verify if they are using HardenedPHP ?

Phpinfo functions only shows php version 5.4.45 and a build date of May 10 2016 14:45:55
Rate this post:
Accepted Answer
  1. 15.06.2016 14:06:55
  2. # Permalink
Igor Ghertesco Accepted Answer
Posts: 153
Joined: 07.08.2015
0
Votes
Undo
a bit more information about how to find out, do you use hardened PHP or not: 

phpinfo contains the "Configure Command" and the "extension_dir". The contents of the mentioned fields can answer the question whether it's our build or not.

For example:


phpinfo()
PHP Version => 5.2.17

System => Linux localhost.localdomain 3.10.0-427.10.1.lve1.4.7.el7.x86_64 #1 SMP Sat Apr 2 12:09:46 EDT 2016 x86_64
Build Date => May 31 2016 02:20:24
Configure Command => './configure' '--build=x86_64-redhat-linux-gnu' '--host=x86_64-redhat-linux-gnu' '--target=x86_64-redhat-linux-gnu' '--program-prefix=' '--prefix=/opt/alt/php52'

if you see /opt/alt under 'Configure Command' - this means that you are using hardened PHP
  1. 15.06.2016 14:06:36
  2. # 1
Igor Ghertesco Accepted Answer
Posts: 153
Joined: 07.08.2015
0
Votes
Undo
Hello,

If you have alt-php group installed, it means that your PHP is hardened: http://docs.cloudlinux.com/installation.html

cPanel php tool does not provide hardened PHP.
  1. 16.06.2016 12:06:33
  2. # 2
Marco Usai Accepted Answer
Posts: 2
Joined: 14.06.2016
0
Votes
Undo
Hello and thank you for your answer.

Checking if alt-php group is installed probably require yum, that I can\'t use because I\'m on a shared hosting with no root access.

There is not /opt/alt path under phpinfo() Configure Command. Prefix is /usr/local

Inside /opt/alt/ directory there is a folder called alt-php-config and this list of directories:

php52 php53 php54 php55 php56
  1. 22.06.2016 12:06:25
  2. # 3
Marco Usai Accepted Answer
Posts: 2
Joined: 14.06.2016
0
Votes
Undo
Hello Bogdan, based on your suggestion, I may have an answer.
Php selector on cPanel shows two different php versions: \"native (5.4)\" and \"5.4\".
They may appear the same version, but this is not really true.
My tests above were done with \"native (5.4)\" that was the host default choice.
If I switch to version \"5.4\" , phpinfo.php shows a completely different set of information:
under \"Configure Command\" the path is always /opt/alt/
Also the build date is different: Mar 9 2016 02:29:25 that correspond to the HardenedPHP version that was announced the very same date on CloudLinux blog post below
https://cloudlinux.com/cloudlinux-os-blog/entry/beta-hardenedphp-updated-1
It\'s not the latest version, but maybe the host choice is to update HardenedPhp when they think there is a bug with a severity rating considered high.
  • Page :
  • 1


There are no replies made for this post yet.
Be one of the first to reply to this post!
Guest
Submit Your Response
Upload files or images for this discussion by clicking on the upload button below. Supports gif,jpg,png,zip,rar,pdf
• Insert • Remove Upload Files (Maximum File Size: 2 MB)
Captcha
To protect the site from bots and unauthorized scripts, we require that you enter the captcha codes below before posting your question.