Go Back   cPanel Forums > General Discussion > cPanel Newbies

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-19-2009, 02:18 PM
Registered User
 
Join Date: Jan 2007
Posts: 19
partsace is on a distinguished road
php.ini disable_functions request

In WHM -->
Service Configuration -->
PHP Configuration Editor -->
Switch to Advanced Mode -->

Under disable_functions, I would like to know if I can remove phpinfo from 1 domain on my server. I have tried to do this in .htaccess but I keep coming-up with a 500 error. I do not want to remove phpinfo for this setting, just the one website.

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

Thanks for your help,

Scott
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 06-19-2009, 05:12 PM
Registered User
 
Join Date: Jun 2009
Posts: 10
krizag is on a distinguished road
You can add this by creating a file named php.ini in the document root of the account.

The content of the file will be:

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

But this will work if the php is compiled as CGI, if not it will give 500 internal server error.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 06-20-2009, 10:27 AM
Registered User
 
Join Date: Jan 2007
Posts: 19
partsace is on a distinguished road
Yep, 500 Internal Server Error

It was NOT complied as CGI. Can I recompile it without causing any problems with my already existing accounts?

Scott

Last edited by partsace; 06-20-2009 at 10:30 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 06-20-2009, 03:39 PM
Registered User
 
Join Date: Apr 2006
Posts: 23
fineline is on a distinguished road
Read the PHP manual....

disable_functions string
This directive allows you to disable certain functions for security reasons. It takes on a comma-delimited list of function names. disable_functions is not affected by Safe Mode. This directive must be set in php.ini For example, you cannot set this in httpd.conf.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 06-20-2009, 03:54 PM
Registered User
 
Join Date: Sep 2008
Posts: 2
Ronniev is on a distinguished road
php with the CGI

Hello,
You can compile php with the CGI by using WHM -->
Service Configuration --> Configure PHP and SuExec -->Apache Configuration -->PHP and SuExec Configuration.
Some time some php script affect after that setting but you can easily solve that problem.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 06-20-2009, 04:01 PM
Registered User
 
Join Date: Apr 2006
Posts: 23
fineline is on a distinguished road
That will work. I would just be careful. When you do that A user can then override anthing with a custom php.ini I think the only thing they can't override is enabling the exec function.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 06-21-2009, 09:33 PM
Senior Member
 
Join Date: Jun 2005
Location: Area 51
Posts: 1,535
Spiral is on a distinguished road
Quote:
Originally Posted by krizag View Post
You can add this by creating a file named php.ini in the document root of the account.
Krizag, you can't say this without knowing how the poster's PHP is configured ...

What you describe is the method to set custom PHP settings for an account
if the PHP on the system is setup as the old phpSuExec.

Under DSO (Apache Module) based DSO, settings could be changed for
an individual site view the main httpd.conf (for restricted settings) or
from a .htaccess file in the users account (for general settings).

Under SuPHP, you would need to add a custom PHP directive to the
user's virtualhost configuration in httpd.conf that points to another PHP.INI
file that you have setup somewhere else on the system.
__________________
[b][color="Blue"]Server Support[/color]: [color="Red"]Server consulting, security, and management![/color][/b]
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
php.ini and override default php.ini areh cPanel and WHM Discussions 6 08-24-2009 06:45 PM
Question about PHP security, setting up multiple php.ini files? sirbrent cPanel and WHM Discussions 0 10-01-2008 11:58 AM
php safe mode on or disable_functions screwing up fantastico bsasninja cPanel and WHM Discussions 4 09-12-2006 12:16 PM
What is the right way for PHP disable_functions ? docenta cPanel and WHM Discussions 5 06-19-2006 04:04 PM
Disabling local php.ini while php still runs in SUExec mode gizmoh cPanel and WHM Discussions 0 06-10-2005 12:34 PM


All times are GMT -5. The time now is 07:43 AM.


Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
© cPanel Inc