dev@grizzly.java.net

Re: deployer and php comments

From: Survivant 00 <survivant00_at_gmail.com>
Date: Mon, 29 Jun 2009 18:49:47 -0400

sorry.. didn't work

http://localhost:8080/wordpress/index.php


I had this to all SA
sa.setRootFolder(rootFolder);
sa.setResourcesContextPath(context);

it's the RealPath problem


[http8080-WorkerThread(2)] Mon Jun 29 18:47:28 EDT 2009 [LE PLUS FIN]
com.caucho.quercus.module.ModuleContext addClass:PHP loading class XMLWriter
with type com.caucho.quercus.lib.xml.XMLWriter

[http8080-WorkerThread(2)] Mon Jun 29 18:47:28 EDT 2009 [PLUS FIN]
com.caucho.quercus.servlet.QuercusServletImpl
service:java.io.FileNotFoundException: C:\Temp\demo\index.php (Le fichier
spécifié est introuvable)
java.io.FileNotFoundException: C:\Temp\demo\index.php (Le fichier spécifié
est introuvable)
    at java.io.FileInputStream.open(Native Method)
    at java.io.FileInputStream.<init>(FileInputStream.java:106)
    at com.caucho.vfs.FilePath.openReadImpl(FilePath.java:550)
    at com.caucho.vfs.Path.openRead(Path.java:1084)
    at com.caucho.quercus.parser.QuercusParser.parse(QuercusParser.java:310)
    at com.caucho.quercus.page.PageManager.parse(PageManager.java:256)
    at com.caucho.quercus.page.PageManager.parse(PageManager.java:213)
    at com.caucho.quercus.Quercus.parse(Quercus.java:1025)
    at
com.caucho.quercus.servlet.QuercusServletImpl.service(QuercusServletImpl.java:130)
    at
com.caucho.quercus.servlet.QuercusServlet.service(QuercusServlet.java:445)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at
com.sun.grizzly.http.servlet.FilterChainImpl.doFilter(FilterChainImpl.java:188)
    at
com.sun.grizzly.http.servlet.FilterChainImpl.invokeFilterChain(FilterChainImpl.java:137)
    at
com.sun.grizzly.http.servlet.ServletAdapter.service(ServletAdapter.java:350)
    at
com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:165)
    at
com.sun.grizzly.tcp.http11.GrizzlyAdapterChain.service(GrizzlyAdapterChain.java:185)
    at
com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:165)
    at
com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:749)
    at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:657)
    at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:908)
    at
com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:161)
    at
com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
    at
com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
    at
com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
    at
com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
    at
com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
    at
com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
    at com.sun.grizzly.NIOContext.execute(NIOContext.java:510)
    at
com.sun.grizzly.SelectorHandlerRunner.handleSelectedKey(SelectorHandlerRunner.java:357)
    at
com.sun.grizzly.SelectorHandlerRunner.handleSelectedKeys(SelectorHandlerRunner.java:257)
    at
com.sun.grizzly.SelectorHandlerRunner.doSelect(SelectorHandlerRunner.java:194)
    at
com.sun.grizzly.SelectorHandlerRunner.run(SelectorHandlerRunner.java:129)
    at
com.sun.grizzly.util.FixedThreadPool$BasicWorker.dowork(FixedThreadPool.java:379)
    at
com.sun.grizzly.util.FixedThreadPool$BasicWorker.run(FixedThreadPool.java:360)
    at java.lang.Thread.run(Thread.java:619)

[http8080-WorkerThread(2)] Mon Jun 29 18:47:28 EDT 2009 [LE PLUS FIN]
com.sun.gri


2009/6/29 Survivant 00 <survivant00_at_gmail.com>

> oh ya.. php sevlet where looking for servlet.getRealPath .. that why I
> needed to used rootfolder+context
>
> Will try and give the results.
>
>
>
> 2009/6/29 Survivant 00 <survivant00_at_gmail.com>
>
> will try that after kids bath :)
>>
>>
>>
>> 2009/6/29 Jeanfrancois Arcand <Jeanfrancois.Arcand_at_sun.com>
>>
>> Salut,
>>>
>>> Survivant 00 wrote:
>>>
>>>> to resume the problem :
>>>>
>>>> the problem with Deployer and PHP is simple (to reproduce). It's
>>>> related to the rootFolder.
>>>>
>>>> with PHP the rootfolder should be (rootfolder + context) instead of
>>>> using rootfolder like JSP and servlets.
>>>>
>>>> the problem could be fix easily if we could do that with servlets (maybe
>>>> we can.. that's why I asked JF to check that.. maybe
>>>>
>>>> http://localhost:8080/warfile/index.jsp
>>>> http://localhost:8080/hudson/
>>>>
>>>> actually JSP/servlets
>>>> setContextPath(context) // context = warfile
>>>> setServletPath(/)
>>>> setrootfolder(rootfolder)
>>>>
>>>> PHP
>>>> setContextPath(context) setServletPath(/)
>>>> setrootfolder(rootfolder+context)
>>>>
>>>
>>> I think I've replied to you on that :-). Use:
>>>
>>>
>>> https://grizzly.dev.java.net/nonav/apidocs/com/sun/grizzly/tcp/StaticResourcesAdapter.html#setResourcesContextPath(java.lang.String)<https://grizzly.dev.java.net/nonav/apidocs/com/sun/grizzly/tcp/StaticResourcesAdapter.html#setResourcesContextPath%28java.lang.String%29>
>>>
>>> E.g.
>>>
>>> setRootFolder(rootFolder);
>>> setResourceContextPath(context)
>>>
>>>
>>>
>>>> How can we change the JSP to reflect the syntax for PHP ? (maybe I did
>>>> something wrong... I starting Deployer few months ago, and we found some
>>>> bugs in http, so I did refactoring to get it to work..
>>>>
>>>
>>> And you are doing a GREAT JOB!
>>>
>>> but maybe because
>>>
>>>> the bugs found are fixed, I need to change a little the code.. that's
>>>> why I need your help :) someone other than me :)
>>>>
>>>> to test PHP to reproduce the problem.. use this (because I know that the
>>>> problem occurs)
>>>>
>>>> I created a zip file that contains the libraries for JSP and PHP with
>>>> applications to tests and xml file to add theses supports. (hudson,
>>>> twitter...wordpress (php)
>>>>
>>>> and use -a /demo where are the warfile and wordpress folder is.
>>>> the goal.. all theses applications must work in the sametime
>>>>
>>>>
>>>> http://www.mediafire.com/?sharekey=fc577931a2d88b4119747bd91027d4dd431eab634af4c054
>>>>
>>>
>>> I will take a look but if you can try the API above, maybe that will
>>> solve the issue.
>>>
>>> A+
>>>
>>> --jeanfrancois
>>>
>>>
>>>
>>>
>>>
>>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe_at_grizzly.dev.java.net
>>> For additional commands, e-mail: dev-help_at_grizzly.dev.java.net
>>>
>>>
>>
>