# custom php.ini for few sites ?  possible?

**URL:** <https://forums.interworx.com/t/custom-php-ini-for-few-sites-possible/10554>\
**Category:** General Inquries\
**Created:** [February 16, 2006, 4:01am UTC](https://forums.interworx.com/t/custom-php-ini-for-few-sites-possible/10554 "2006-02-16T04:01:09Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://forums.interworx.com/uploads/default/original/2X/4/40ab17cc34b792a0172b48ad1333b9ba9299a9a1.png) [@system](https://forums.interworx.com/u/system)\
**Post date:** [February 16, 2006, 4:01am UTC](https://forums.interworx.com/t/custom-php-ini-for-few-sites-possible/10554/1 "2006-02-16T04:01:09Z")

</div>

disable\_functions = mail,exec,system,passthru

I want disable mail fucntion globally , for that i add that line in php.ini

Its possible enable mail function only for sites i decide and have dsiable for the rest?

How can configure php.ini per site,and make that php.ini configuration, override gloabl php.ini copnfiguration?

Some idea?

I apreciate help, please.

---

<div class="post-metadata">

**Author:** ![IWorx-Socheat](https://forums.interworx.com/letter_avatar_proxy/v4/letter/i/ed655f/32.png) [@IWorx-Socheat](https://forums.interworx.com/u/IWorx-Socheat)\
**Post date:** [February 16, 2006, 5:10am UTC](https://forums.interworx.com/t/custom-php-ini-for-few-sites-possible/10554/2 "2006-02-16T05:10:50Z")

</div>

Hi Dj-Grobe,

If you are using PHP as an Apache module (which is the default configuration), you will not be able to set per-site ini files. And, according to the PHP manual, disable\_functions can only be placed in the php.ini file.

Socheat

---

<div class="post-metadata">

**Author:** ![system](https://forums.interworx.com/uploads/default/original/2X/4/40ab17cc34b792a0172b48ad1333b9ba9299a9a1.png) [@system](https://forums.interworx.com/u/system)\
**Post date:** [February 16, 2006, 12:16pm UTC](https://forums.interworx.com/t/custom-php-ini-for-few-sites-possible/10554/3 "2006-02-16T12:16:48Z")

</div>

help !

I need some way to disable mail fucntion global server, but need some way to enable mail fucntion to few sites.

No way to make that?

---

<div class="post-metadata">

**Author:** ![IWorx-Chris](https://forums.interworx.com/letter_avatar_proxy/v4/letter/i/ba8739/32.png) [@IWorx-Chris](https://forums.interworx.com/u/IWorx-Chris)\
**Post date:** [February 18, 2006, 11:20pm UTC](https://forums.interworx.com/t/custom-php-ini-for-few-sites-possible/10554/4 "2006-02-18T23:20:23Z")

</div>

Based on what Socheat and the PHP docs say, no.

Chris

---

<div class="post-metadata">

**Author:** ![system](https://forums.interworx.com/uploads/default/original/2X/4/40ab17cc34b792a0172b48ad1333b9ba9299a9a1.png) [@system](https://forums.interworx.com/u/system)\
**Post date:** [February 20, 2006, 11:01pm UTC](https://forums.interworx.com/t/custom-php-ini-for-few-sites-possible/10554/5 "2006-02-20T23:01:52Z")

</div>

Anyone knwo what is the best way for stop mail inyection to bad formmails?

I already have mod\_security but no stop all issues…for now the oly way its disable mail() fucntion, and that is a nightmare!!

Some ideA?

---

<div class="post-metadata">

**Author:** ![zoom](https://forums.interworx.com/letter_avatar_proxy/v4/letter/z/ce73a5/32.png) [@zoom](https://forums.interworx.com/u/zoom)\
**Post date:** [March 7, 2006, 9:55am UTC](https://forums.interworx.com/t/custom-php-ini-for-few-sites-possible/10554/6 "2006-03-07T09:55:36Z")

</div>

The best method to allow users to have independant php.ini files for their sites is to run PHP using FastCGI.
