« Previous Next »

Thread: Problem to pass arguments to the php-cgi.exe

Last post 06-11-2009 4:14 PM by JulienTLD. 5 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (6 items)

Sort Posts:

  • 05-11-2009, 1:50 PM

    • JulienTLD
    • Top 150 Contributor
    • Joined on 12-16-2008, 12:50 PM
    • Marseille
    • Posts 33

    Problem to pass arguments to the php-cgi.exe

    Hello,

    On an IIS 6.0 server + FastCGI 1.0 Handler + PHP 5.2.9, I would like to define the PHP open_basedir directive for each web site (without using different php.ini files).

    I do that in the fcgiext.ini file and it's run fine with the following config :

    ExePath=C:\php\php-cgi.exe
    Arguments=-d open_basedir="D:\www1\"

    The problem is that I want in fact to define two directories in the open_basedir directive. I tried the four following configs of quotes without success :

    Arguments=-d open_basedir=D:\www1\;D:\www2\

    Arguments=-d open_basedir="D:\www1\;D:\www2\"

    Arguments="-d open_basedir=D:\www1\;D:\www2\"

    Arguments="-d open_basedir=\"D:\www1\;D:\www2\\""

    If I use the directive open_basedir="D:\www1\;D:\www2\" in my php.ini file, there is no problem. So I think that it is only a syntax problem in my Arguments line or a fcgiext.ini parsing problem.

    Could you say me what is wrong in my Arguments line?

     An other question, How can I do if I have a space in the paths. Is there an escape character to escape quotes?

    Thanks

  • 06-02-2009, 12:58 PM In reply to

    • JulienTLD
    • Top 150 Contributor
    • Joined on 12-16-2008, 12:50 PM
    • Marseille
    • Posts 33

    Re: Problem to pass arguments to the php-cgi.exe

    Hello,

     Just a little UP ;)

    Nobody knows How to set multiple open_basedir directories on the Arguments line of fcgiext.ini ?

  • 06-02-2009, 1:06 PM In reply to

    • ruslany
    • Top 25 Contributor
    • Joined on 07-01-2007, 7:38 PM
    • Redmond, WA
    • Posts 661

    Re: Problem to pass arguments to the php-cgi.exe

    This is a bug in the fastcgi extension logic for parsing the arguments string. This will be fixed in the upcoming RC release of FastCGI Extension 1.5 (this summer).

    http://ruslany.net
  • 06-02-2009, 1:18 PM In reply to

    • JulienTLD
    • Top 150 Contributor
    • Joined on 12-16-2008, 12:50 PM
    • Marseille
    • Posts 33

    Re: Problem to pass arguments to the php-cgi.exe

    Thanks for your answer ruslany. I will so wait for the RC release.

    Could you just say me which of my quotes exemples will be the good choice in the RC release ? A pair of quotes for each directory? A global pair of quotes? etc...

    Thanks for your job in PHP improvement under Windows !

  • 06-11-2009, 3:03 PM In reply to

    • ruslany
    • Top 25 Contributor
    • Joined on 07-01-2007, 7:38 PM
    • Redmond, WA
    • Posts 661

    Re: Problem to pass arguments to the php-cgi.exe

    For the RC release you will need to escape the ";" symbol with forward slash, e.g.:

    Arguments=-d open_basedir=D:\www1\/;D:\www2\

    http://ruslany.net
  • 06-11-2009, 4:14 PM In reply to

    • JulienTLD
    • Top 150 Contributor
    • Joined on 12-16-2008, 12:50 PM
    • Marseille
    • Posts 33

    Re: Problem to pass arguments to the php-cgi.exe

    Ok, good for the / escaping ;)

     Just a last question. How will I have to do if one or both of these paths contain a space character ? I have tu use quotes I think but where to put them exactly? Do you consider this possibility in the RC release parser ?

Page 1 of 1 (6 items)
Microsoft Communities