Solved

How to disable php version .htaccess

Posted on 2010-08-19
9
882 Views
Last Modified: 2013-11-08
Hi,

I cannot change the php.ini on the (plesk) shared hosting server and I would like to disable the PHP Version Check.
Can I do that with the .htaccess?

Or is there a beter solution?

Thanks
0
Comment
Question by:HPvH
9 Comments
 
LVL 9

Expert Comment

by:jeremycrussell
ID: 33480070
You might be able to use these directives to hide that, however, it will hide a lot of other webserver fingerprinting information as well.

ServerTokens Prod
ServerSignature Off
0
 

Expert Comment

by:ruthannbasnillo
ID: 33480098
If you have a directory which users can upload files into it's a good idea for security reasons to disable server-side parsing of scripts such as PHP. This post shows a couple of options using Apache's .htaccess files.

http://www.electrictoolbox.com/disable-php-apache-htaccess/
0
 
LVL 25

Expert Comment

by:madunix
ID: 33480205
you should  turn "Off" the "ServerSignature" parameter in httpd.conf which is "On" by default:
ServerSignature On|Off
0
Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

 

Author Comment

by:HPvH
ID: 33480244
I cant change that, it is a shared hosting website
0
 
LVL 9

Expert Comment

by:jeremycrussell
ID: 33480340
Ok, you can set expose_php in you're php scripts/pages

ini_set('expose_php', 'Off');

You would just have to add to each php script/page...
0
 
LVL 11

Expert Comment

by:mattibutt
ID: 33482941
Why do you want to hide that information
0
 

Author Comment

by:HPvH
ID: 33483376
My McAfee security check came with it as a prio 2 for McAfee and a prio 5 for credit card companies.
0
 
LVL 9

Accepted Solution

by:
jeremycrussell earned 250 total points
ID: 33485402
If you're doing this for PCI compliance, you might bug your hosting company to upgrade to latest stable releases on things, or find a new hosting company.. and you might look into dedicated server or vm hosting so you can have more control.

Additionally... the ServerSignatures directive can be place inside a VH, if you have any control over your VH config, you can apply that there.
0
 
LVL 9

Assisted Solution

by:jeremycrussell
jeremycrussell earned 250 total points
ID: 33485413
Dote.. ServerSignatures directive can also be placed in .htacces.. forgot to mention that.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Samba Question 11 75
Log in through ID 5 17
Use Select Query to Return Results as a Form 9 23
Running linux commands into linux system remotely using powershell 6 42
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
Lease-to-own eliminates the expenditure of hardware replacement and allows you to pay off the server over time. Usually, this is much cheaper than leasing servers. Think of lease-to-own as credit without interest.
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

860 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question