Desabilitar o PHP em um site individual usando o gerenciador de PHP

1

Eu instalei o "PHP Manager" do link , que funcionou muito bem. No entanto, apenas um dos sites da minha máquina usa PHP e gostaria de desativá-lo para os outros. Existe uma maneira que eu possa escolher quais sites obter PHP e quais não?

    
por Colen 19.08.2011 / 19:18

1 resposta

1

se você pode definir flags do php com o gerenciador de php, você pode desabilitar o php assim:

php_admin_flag  engine 0

no apache você tem a opção de definir flags do php dentro do virtualhost ou no htaccess.

exemplo do apache:

<virtualhost host1...>
php_admin_flag  engine 1
php_value error_reporting 8191
php_flag apc.enabled 1
</virtualhost>

<virtualhost host2...>
php_admin_flag  engine 0
php_value error_reporting 8191
php_flag apc.enabled 0
</virtualhost>

com o iis não tenho experiência direta, mas achei o seguinte link: link

levando a: link

Last week I wrote about the different location in Windows where php.ini is loaded from. The values set in your php.ini configuration file are global and will be set for every PHP environment on your server. What happens though if you want to configure different PHP environment settings for each site on your server, or even different PHP settings for directories within a site? This can be done with the ini_set() function, but as not all of us are coders or have the time to work code modifications in there is another option; the registry, which is the method which we'll be looking at in this article.

Back in the PHP4 days there was no way in which to configure anything but global PHP directives when using IIS. These days with PHP5 this is possible by configuring the HKLM\SOFTWARE\PHP\Per Directory Values registry value which is a really quick and easy way to configure your PHP_INI_USER values. With this registry setting you are able to specify different PHP directives for any and all directories within your websites.

To do this simple create a key in your registry using regedit under HKLM\SOFTWARE\PHP\Per Directory Values using the structure of your directory path and then create a string value using the name of the PHP directive you wish to alter. For example, if you wish to set the memory_limit PHP directive to a value of 24M in a directory located in X:\path\to\php you'd do the following;

   Create a key with the path of HKLM\SOFTWARE\PHP\Per Directory Values\x\path\to\php
   Create a string value with the name memory_limit

   Set the string name value to 24M 
    
por 10.09.2011 / 05:36

Tags