Welcome! Log In Create A New Profile

Advanced

Re: Custom settings with PHP

António P. P. Almeida
July 12, 2011 11:02AM
On 12 Jul 2011 15h40 WEST, nginx-forum@nginx.us wrote:

>> Hmm, never tried that, using a variable. Don't
>> know if the $ needs to
>> be escaped.
>>
>> You'll have to try it.
>
> Of course I tried both:
>
> fastcgi_param PHP_VALUE
> "include_path=${include_path}:/my/other/path";
>
> and
>
> fastcgi_param PHP_VALUE
> "include_path=\${include_path}:/my/other/path";

> and neither works, hence I wrote here.

>From here https://bugs.php.net/bug.php?id=51595 it's implied that you
cannot use variables in the headers. PHP variables that is. You can
use Nginx variables.

Best solution I think is to create a new parameter $my_include_path.
Set it on fastcgi_params and then do a:

fastcgi_param PHP_VALUE my_include_path=/my/include/path;

ini_set('include_path', ini_get('include_path') . ':' . $my_include_path);

on your script.

--- appa


_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

Custom settings with PHP

Life Hunter November 13, 2009 08:26AM

Re: Custom settings with PHP

Micha Glave November 13, 2009 09:06AM

Re: Custom settings with PHP

kyleb November 14, 2009 11:59AM

Re: Custom settings with PHP

mike November 14, 2009 12:36PM

Re: Custom settings with PHP

jbruni June 18, 2010 08:23AM

Re: Custom settings with PHP

Igor Sysoev June 18, 2010 08:36AM

Re: Custom settings with PHP

Jérôme Loyet June 18, 2010 09:06AM

Re: Custom settings with PHP

mike June 18, 2010 12:22PM

Re: Custom settings with PHP

Igor Sysoev June 18, 2010 12:26PM

Re: Custom settings with PHP

mike June 18, 2010 12:42PM

Re: Custom settings with PHP

Jérôme Loyet June 18, 2010 01:08PM

Re: Custom settings with PHP

mike June 18, 2010 02:00PM

Re: Custom settings with PHP

Jérôme Loyet June 18, 2010 02:18PM

Re: Custom settings with PHP

mike June 18, 2010 02:22PM

Re: Custom settings with PHP

locojohn July 09, 2011 06:59PM

Re: Custom settings with PHP

hobson42 July 12, 2011 09:42AM

Re: Custom settings with PHP

locojohn July 12, 2011 09:54AM

Re: Custom settings with PHP

António P. P. Almeida July 12, 2011 10:26AM

Re: Custom settings with PHP

António P. P. Almeida July 12, 2011 10:38AM

Re: Custom settings with PHP

locojohn July 12, 2011 10:40AM

Re: Custom settings with PHP

António P. P. Almeida July 12, 2011 11:02AM

Re: Custom settings with PHP

Maxim Dounin July 12, 2011 12:38PM

Re: Custom settings with PHP

locojohn July 12, 2011 09:47PM

Re: Custom settings with PHP

locojohn January 20, 2015 08:54AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 269
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready