• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Getting Resin to ignore PHP script so that webserver deals with request

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I'm developing a Struts app and I need to upload images and have them automatically resized. My hosts lunarpages don't allow image manipulation in Java. The version of resin is 2.1. So what I've been trying to do is call a php script using a file upload inside a jsp which would upload then automatically resize etc. I've done php before and used the same script successfully before so its definately not a problem with the php.

At the moment all I get is the php code printing to the screen. THis made me think that resin is handling the request so I tried calling a simple php script with a print statement from a JSP where the php file is located underneath the struts app directory (which is underneath the webapps folder i.e. its not a root app) and that didn't work (prints the PHP code to screen as well), BUT calling the same script but this time located outside of my struts app and outside of the webapps folder (i.e. on the root level of my public_html) DID WORK.

I've done some digging around and found out that if you stick "plugin_ignore" for a directory in the web.xml then resin should ignore the file (php in this situation). So I tried it and it doesn't work.

Am I barking up the wrong tree?


These are the web-xml entries I tried (where the php files are located in a folder called PHP):


<servlet-mapping url-pattern="/home/*myusername*/public_html/webapps/tcms/php/*" servlet-name='plugin_ignore'/>
<servlet-mapping url-pattern="*.php" servlet-name='plugin_ignore'/>
<servlet-mapping url-pattern="/php/*" servlet-name='plugin_ignore'/>
<servlet-mapping url-pattern="*.php" servlet-name='plugin_ignore'/>



Should one of these entries not sort out my problem?

I guess the short term solution is to move the php scripts away from the webapps folder or make the app at root level but there must be a better way......

Can anyone help me?


Thanks

Lloyd
[ August 13, 2005: Message edited by: Lloyd Lane ]
 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Lloyd, I'd suggest having a look of the following pages:

[1] <http://www.caucho.com/resin-3.0/features/resin-3.0.8.xtp#PHP>;

[2] <http://www.caucho.com/resin-3.0/thirdparty/php.xtp>;

I guess FastCGIServlet would solve your problem even you're using an old version of Resin.

Best regards, Tero
reply
    Bookmark Topic Watch Topic
  • New Topic