2010/8/27 Emil Ong <e...@caucho.com>:
> Hi Alexandre,
>
> Sorry, I still don't understand one point.  What are you expecting
> ${RESIN} to be?  Are you setting this as an environment variable or is
> that something you think the container should set?
>
> Aside from that point, relative include paths are interpreted relative
> to the root directory of the webapp, so that might help in this
> particular case.  For example, if your include path was:
>
> include_path=WEB-INF/php

I've tried this solution but it doesn't work. That would be perfect if
it worked out but this is not the case.

Actually, the case where you set a relative path (without a '.') is
not specified in the semantics of include_path [1]. After some tests,
the way it's implemented in Quercus is that such a path will be
concatenated with the getcwd() of the file invoking the require_once.

So there are only two solutions there:
* use an absolute path (which of course we don't want)
* have a way to specify a path related to where the application is
deployed. I'm searching for a solution like that and that's what I
meant by writing something like ${ABSOLUTE_PATH_WHERE_THE
WAR_IS_DEPLOYED}/webapps/WEB-INF/php.

Does it make sense or am I going to the wrong direction?

Alexandre Bertails, W3C Systems Team.

[1] http://www.php.net/manual/en/ini.core.php#ini.include-path

>
> This would pick up all the php files in your webapps WEB-INF/php
> directory.
>
> Hope that helps,
> Emil
>
> On Thu, Aug 26, 2010 at 07:29:11PM -0400, Alexandre Bertails wrote:
>> 2010/8/26 Emil Ong <e...@caucho.com>:
>> > Hi,
>> >
>> > I don't think we support the ${RESIN} variable in php.ini at the moment,
>> > but out of curiosity, why do you need the Resin root if you're using
>> > Jetty?
>>
>> I'm trying to write a Java/Scala wrapper for some existing code in PHP.
>>
>> The first step is to make everything to work without modification in
>> the existing code. There are plenty of require_once-like functions
>> spread all over the code and I need to modify include_path because of
>> them.
>>
>> I have found some examples on the web (basically in the forums) where
>> you can set variables directly in "web.xml" but none of them worked
>> for me, I don't know why. If you have an example using ${RESIN},
>> that's of course a perfect workaround.
>>
>> Alexandre Bertails, W3C Systems, Team.
>>
>> >
>> > Thanks,
>> > Emil
>> >
>> > On Wed, Aug 25, 2010 at 07:57:48PM -0400, Alexandre Bertails wrote:
>> >> Hi all,
>> >>
>> >> I have this worky partial web.xml:
>> >> [[
>> >>   <servlet>
>> >>     <servlet-name>Quercus Servlet</servlet-name>
>> >>     
>> >> <servlet-class>com.caucho.quercus.servlet.QuercusServlet</servlet-class>
>> >>     <init-param>
>> >>       <param-name>ini-file</param-name>
>> >>       <param-value>WEB-INF/php.ini</param-value>
>> >>     </init-param>
>> >>   </servlet>
>> >> ]]
>> >>
>> >> and this WEB-INF/php.ini:
>> >> [[
>> >> include_path = ".:${RESIN}/webapps/WEB-INF/php"
>> >> ]]
>> >>
>> >> The include_path value is set as expected.
>> >>
>> >> The question is: how can I make Quercus to interpret ${RESIN}?
>> >>
>> >> (I'm using Quercus 4.0.10 and Jetty.)
>> >>
>> >> Alexandre Bertails, W3C Systems Team.
>> >>
>> >>
>> >> _______________________________________________
>> >> resin-interest mailing list
>> >> resin-interest@caucho.com
>> >> http://maillist.caucho.com/mailman/listinfo/resin-interest
>> >
>> >
>> > _______________________________________________
>> > resin-interest mailing list
>> > resin-interest@caucho.com
>> > http://maillist.caucho.com/mailman/listinfo/resin-interest
>> >
>>
>>
>> _______________________________________________
>> resin-interest mailing list
>> resin-interest@caucho.com
>> http://maillist.caucho.com/mailman/listinfo/resin-interest
>
>
> _______________________________________________
> resin-interest mailing list
> resin-interest@caucho.com
> http://maillist.caucho.com/mailman/listinfo/resin-interest
>


_______________________________________________
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest

Reply via email to