Mailing List Archive

change PHP ini vars per vserver
Hi.

I spend quite some time figuring this one out, so I like to share and maybe
someone can put this in the cookbook.

In your virtual server; extension php; fast-CGI
add the following custom environment variable:
name: PHP_ADMIN_VALUE
value: memory_limit=128M
this will set the memory limit for the virtual server only...
Any php ini var can be set here...

Greetz

Edwin
Re: change PHP ini vars per vserver [ In reply to ]
I have tried this and it doesn't work for me =[
Even after restarting cherokee and "sudo killall php-cgi" to make sure php
reloads.

I am trying to set a memory_limit=512M for one of my servers, but it always
just uses the 128M that is in the php.ini file.
What do I have to do to get this to work??
Re: change PHP ini vars per vserver [ In reply to ]
Switch to php-fpm if you're not using it already. Then you use ini sections
in your PHP config. For example:

[HOST=www.example.com]
memory_limit=512M

This would just apply to www.example.com; all other vservers would get the
defaults. See this URL for more details:
http://www.php.net/manual/en/ini.sections.php


On Thu, Jan 26, 2012 at 2:23 AM, Brade <bradezone@gmail.com> wrote:

> I have tried this and it doesn't work for me =[
> Even after restarting cherokee and "sudo killall php-cgi" to make sure php
> reloads.
>
> I am trying to set a memory_limit=512M for one of my servers, but it
> always just uses the 128M that is in the php.ini file.
> What do I have to do to get this to work??
>
> _______________________________________________
> Cherokee mailing list
> Cherokee@lists.octality.com
> http://lists.octality.com/listinfo/cherokee
>
>