PHP Disable Functions Override

Apr 23, 2009

In the php.ini ive disabled several functions for security reasons but i need to enable exec() and shell_exec() for WHMCS Status, but i dont want it enabled for anything or anyone else. I know you can over ride global php.ini but i preferably dont want that on and also i forgot where that option is but i was wondering if there was any work arounds or would i have to enable exec() and shell_exec() globally or enable php.ini override.

View 3 Replies


ADVERTISEMENT

Disable Php Functions

Sep 15, 2007

Does the below look good for a private server (linux, cpanel, phpsuexec disabled)?

disable_functions = show_source, system, shell_exec, passthru, phpinfo, popen, proc_open

What about a shared hosting server (linux, cpanel, phpsuexec *enabled*)?

disable_functions = show_source, system, shell_exec, passthru, phpinfo, popen, proc_open

View 2 Replies View Related

Disable Functions In .htaccess

Jun 10, 2009

Is it possible to disable mod_security and open_basedir thru .htaccess if both are enabled in server configuration?

View 3 Replies View Related

How-to Disable Php Functions Per Domain

Jul 29, 2007

When dealing with the security of your server you will eventually get to the part were you will want to disable some php functions. The only problem on shared hosting is that you cannot disable exec for a domain and enable that function for an other that needs it because of some lame script. Eventually you will get to the part were you will need to enable exec on the entire server because of one site.

There is a solution to this and it’s called suhosin.

Suhosin has a configuration variable called ”suhosin.executor.func.blacklist” which can be used to disable some php functions. The difference between this variable and disable_functions in php.ini is that it can be set for all the sites and then it can be modified for a domain only (it can be overwritten) so you will be able to disable exec on the entire server and enable that function for a single domain.

I will not write here how to install suhosin.

Also, you only need the extension for this so you do not need to patch php and recompile.

IMPORTANT: I have noticed that the suhosin extension 0.9.20 will not work anymore as there are some problems with it. It’s ok as long as we have 0.9.18. Probably the next version of the extension will be fixed to work ok again so remember to use version 0.9.18 for this until the problem is fixed.

Ok, so to use suhosin as the php function blocker we need to comment out disable_functions in php ini (yes, enable all the functions) and then set in php.ini
suhosin.executor.func.blacklist to something like this:

suhosin.executor.func.blacklist = exec, passthru, shell_exec, system, pcntl_exec, proc_open, proc_nice, proc_terminate, proc_get_status, proc_close, leak, apache_child_terminate, posix_kill, posix_mkfifo, posix_setpgid, posix_setsid, posix_setuid, escapeshellcmd, escapeshellarg

You can add as many functions as you like.

After that, all the functions added in suhosin.executor.func.blacklist will not work anymore in php scripts. If you need to enable a function for a domain, let’s say
exec, you will have to edit apache configuration file and add suhosin.executor.func.blacklist without the exec function:

<VirtualHost 127.0.0.1>
ServerAlias www.test.com
ServerAdmin webmaster@test.com
DocumentRoot /home/test/public_html

php_admin_value suhosin.executor.func.blacklist "passthru, show_source, shell_exec, system, pcntl_exec, popen, pclose, proc_open, proc_nice, proc_terminate, proc_get_status, proc_close, leak, apache_child_terminate, posix_kill, posix_mkfifo, posix_setpgid, posix_setsid, posix_setuid, escapeshellcmd, escapeshellarg"

</VirtualHost>

Now exec is disable on the server but it’s enabled on the test domain.

View 0 Replies View Related

Disable Functions :: Show_source, System, Shell_exec, Passthru, Exec ...

Jun 13, 2008

How to disable those functions on VPS with Lxadmin and CentOS 5
show_source, system, shell_exec, passthru, exec,
phpinfo, popen, proc_open, base64_decode, base64_encodem, proc_terminate

View 9 Replies View Related

PHP.ini Override

Jul 30, 2009

i use Cpanel/WHM , how can override php settings when php run az CGI ,when i put php.ini in root of any website the setting didn't override main php.ini settings.

View 10 Replies View Related

CPanel Php.ini Override

Apr 12, 2008

I am setting a dedicated server for a mate with cPanel/WHM 11. He says he wants a custom php.ini file such that you can override the settings when you upload a php.ini file in /home/site/public_html/

how to allow this in the global settings?

View 1 Replies View Related

Why Doesn't .html Override .php

Feb 20, 2009

I have a curious problem, and have scoured the net for a solution.
Basically, while developing a Joomla site, I have had a standard .html holding page in place.

I uploaded the Joomla site in the 'background' to continue developing the website while the holding page was in place. I always thought that .html would always display first in the browser, before index.php.

However the index.php file always displays first. I've tried changing the htaccess file etc but at this point nothing seems to be working.

View 4 Replies View Related

Prevent .htaccess Override Of Upload_max_filesize Only

Jul 20, 2008

I'm having issues with users setting their upload_max_filesize, and post_max_size values in .htaccess in excess of 500M 1000M

As a result their users are uploading and converting some huge files and pegging my cpu's.

Is there a way to allow .htaccess override for all values except upload_max_filesize & post_max_size

or perhaps there is another solution out there to limit .htaccess by user?

View 4 Replies View Related

DNS Functions

Jul 26, 2007

about DNS functions. I know what the DNS is, but some part of it I am confused.

Here is situation.
AAA.com - Master
BBB.com - Reseller

Now, BBB's clients point their DNS to ns1.BBB.com, ns2.BBB.com
However, when I check BBB's whois, it shows BBB has ns1.AAA.com, ns2.AAA.com

So, BBB's clients know BBB is reseller. How can I show ns1.BBB.com, ns2.BBB.com?

I believe it's DNS function, right?
so I tried to edit DNS following:

Domain TTL Recordtype
BBB.com 86400 NS ns1.BBB.com (default was ns1.AAA.com)
BBB.com 86400 NS ns1.BBB.com (default was ns2.AAA.com)

Is it correct?
however, I checked BBB's whois, but it's still showing up ns1.AAA.com, ns2.AAA.com

View 3 Replies View Related

Tsearch Functions

Nov 24, 2008

It seems that some tsearch2 functions are inaccessible such as a set of rank() funcs. The default definition for one of the functions is shown in the following snippet of

code:
CREATE OR REPLACE FUNCTION rank(real[], tsvector, tsquery)
RETURNS real AS
'$libdir/tsearch2', 'rank'
LANGUAGE 'c' IMMUTABLE STRICT;
I've tried to execute this script shown above and got the following error:
ERROR: permission denied for language c
rpm -qa | grep postgresql
postgresql-devel-8.3.5-1PGDG.rhel4
postgresql-server-8.3.5-1PGDG.rhel4
postgresql-8.3.5-1PGDG.rhel4
postgresql-libs-8.3.5-1PGDG.rhel4
postgresql-plpython-8.3.5-1PGDG.rhel4

View 2 Replies View Related

Some Functions Is Disabled.

Jun 29, 2007

My vps managed service has disabled this functions in php.ini :

Code:
exec, shell_exec, system, passthru,popen, virtual, show_source, pclose
I asked them why these disabled and the answer was "because of security reasons" .

So for example a Joomla installation with working RSS needs some of these functions and when I install vary php programs I face some strnge problems that I think it may be from these disabilities .

So my question is could these functions usually be disabled ? and may I delete them from disable_functions of php.ini

View 7 Replies View Related

How To Enable These Functions

Aug 26, 2007

My site is running with php scripts It's work fire at bluehost but get some error when i move to new VPS .

Quote:

Warning: fputs(): supplied argument is not a valid stream resource in /home/xxx/public_html/home/admin/update_categories.php on line 171

Warning: fclose(): supplied argument is not a valid stream resource in /home/xxx/public_html/home/admin/update_categories.php on line 173

Warning: fputs(): supplied argument is not a valid stream resource in /home/xxx/public_html/home/admin/update_categories.php on line 225

Warning: fclose(): supplied argument is not a valid stream resource in /home/xxx/public_html/home/admin/update_categories.php on line 227

I want to enable these functions fopen(),fputs(),fclose(),fputs(),fclose() but i don't know how to enable them .Could you tell me details

View 2 Replies View Related

Apache :: Setting Up A Local Domain With Working Override

Feb 25, 2014

I'm trying to accomplish two goals: First, get "Pretty Links" to work on my local Wordpress instance; second, to set up a local domain for the site.I have a fresh install of Apache 2.4.6 running, and I'll I've done is enable the rewrite and vhost_alias mods. Nevertheless, here's my apache2.conf: URL....

I need to have AllowOverride set to All. This, I gather, allows .htaccess files within the subsequent directories to alter the apache config. To try one thing at a time, I'm accessing the site from localhost/var/www/dhae/Wordpress (foregoing the domain). I tried altering the 000-default.conf to oblige this: [URL] .... -- all I added was the <Directory> section. This didn't work, and neither did changing the AllowOverride to All in the apache2.conf.

I wondered if perhaps I needed something more specific to the directory, so I tried using my second goal to accomplish this. I wrote the dhae.conf: URL....

I've also added the following line to my HOSTS file:127.0.0.1 dhae.dev

This hasn't worked either. I've tried virtual host config stuff as much as I could find, and I'm just not having any luck. What I have even came from this site (URL....).

View 7 Replies View Related

Unlimited Emailing Functions On VPS

Jun 24, 2009

Are there companies out there that allow unlimited emailing capabilities on a VPS server? What kind of budget would be best to get this capability? Am I better of going with a dedicated server?

View 1 Replies View Related

Using Vhost.conf To Override Suexec Directive In Httpd.include

Oct 20, 2009

I need to change the server configuration on Plesk such that the SuexecUserGroup directive is removed, so the user's cgi scripts run as the apache user (www-data), rather than as the user specified in that directive (the domain user), as on an unshared (non-VPS) server. I don't care about security from other domains because only one domain runs on it anyway, so making the user domain-specific is irrelevant from a security point of view and stops some of the user's code working.

This directive is found in
/var/www/vhosts/domainname.com/conf/httpd.include
and is:
SuexecUserGroup user psacln
(this line appears twice, for ports 443 and 80)

I understand that this file can't be modified, as it may be overwritten by Plesk. Therefore additional directives must go in the vhost.conf file.

Will the following vhost.conf file do the trick and override the directives in httpd.include?

<VirtualHost domainIP:443>
SuexecUserGroup www-data www-data
</VirtualHost>
<VirtualHost domainIP:80>
SuexecUserGroup www-data www-data
</VirtualHost>

View 1 Replies View Related

How To Make MySQL Functions In PHP In Server

Mar 16, 2008

how to make MySQL functions in PHP in server,bcz when i intall VB in my dedicated server it comeing is there is any option in WHM to chnage these funtion!

View 14 Replies View Related

Enable The Disabled Functions For An Account

Jul 4, 2008

i have disbaled many functions in php.ini settings ! for security!

but i need to use some of the functions for my billing System!

how can i enable all the functions just for an account? or a directory!

View 0 Replies View Related

PHP Disabled Functions (HTTPD.conf)

Aug 7, 2007

is it possible to set the disabled functions list for PHP in apache's HTTPD.conf per virtual host? i want a bunch of functions disabled for everyone except the default host (me).

I tried the php_admin_value way and when i look at phpinfo() it shows that the master is disabled and the local is not disabled (exactly what i want) but they arnt actually enabled for me

View 14 Replies View Related

Plesk 12.x / Linux :: Session Expires When Client Uses Mysql Functions?

Aug 17, 2014

I'm using Parallels Plesk 12.0 and a mysql-Server.

I'm logged in with a customer's account into his phpmyadmin. Whenever a client connects to his website (which uses the database of his account) I get logged out and receive a "session expired" error. When I log in again I get "there's already a user with your username logged in".

View 4 Replies View Related

What Is "Override .htaccess Support"

Feb 15, 2008

what is Override .htaccess Support?

and

how can i enable this feature in Dedicated Serevr?

View 1 Replies View Related

How To: Disable SSL 2.0 And Use SSL 3.0

Oct 20, 2008

Our security comlience test got failed due to following reason

Synopsis:
The remote service encrypts traffic using a protocol with known weaknesses.

Description:
The remote service accepts connections encrypted using SSL 2.0, which reportedly suffers from several cryptographic flaws and has been deprecated for several years. An attacker may be able to exploit these issues to conduct man-in-the-middle attacks or decrypt communications between the affected service and clients.

Solution:
Consult the application's documentation to disable SSL 2.0 and use SSL 3.0 or TLS 1.0 instead. See for Apache.

We have Cpanel RHEL server. Please advise how to:

'disable SSL 2.0 and use SSL 3.0 or TLS 1.0 instead. See for Apache.'

View 12 Replies View Related

How To Disable RBL

Feb 20, 2008

RBL is blocking every incoming email. While waiting for the admin. How to disable it?

View 3 Replies View Related

Dr Web - How To Disable It

May 11, 2008

I can stop Dr Web from within Plesk Control panel, but every time server restarts - Dr Web is automatically started again.

Any possible way to disable it from running?

Also the same with Spam Assassin.

I am running CentOS

View 0 Replies View Related

Disable SSL 2.0 And Use SSL 3.0

Nov 6, 2007

I would like to disable SSL 2.0 and use SSL 3.0, my question how i can do this and which file i have to modify or i have to upgrade from SSL 2.0 to SSL 3.0 ?

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved