Uploading a file using a php script while running application with LCDS

Hi! I developping an application under Flex 2 / Java -
running on LCDS / JRun server.
I'm trying to add uploading capabilities. I'm using a php
script for the upload part.
First, I just try to put script on the app directory. Doesn't
work.
After that I set up an apache server from where I put a small
web site with my script. It's telling me that my file is
succesfully uploaded, but I can't find the file. The apache log
give me no error.
Someone can help me?

Originally, I had problems w/ the file being placed in
C:/whatever.ext b/c I wasn't using relative paths.
This is the code I use:
$MAXIMUM_FILESIZE = 1024 * 1024 * 2; // 2MB
$newFileLoc = "./wherever/file.jpg"
if ($_FILES['Filedata']['size'] <= $MAXIMUM_FILESIZE) {
move_uploaded_file($_FILES['Filedata']['tmp_name'],
"./temporary/".$_FILES['Filedata']['name']);
rename( "./temporary/".$_FILES['Filedata']['name'],
$newFileLoc );
chmod( $newFileLoc, 0777 );
Modified from this article by Adobe:
http://livedocs.adobe.com/flex/201/html/wwhelp/wwhimpl/common/html/wwhelp.htm?context=Live Docs_Book_Parts&file=17_Networking_and_communications_173_6.html

Similar Messages

  • How to Upload a File using FileReference + PHP??

    How to Upload a File using FileReference + PHP??
    If you could help me with a two code examples the AS code and
    the PHP code of a working example.
    Thanks
    Jorge

    http://www.flash-db.com/Tutorials/upload/upFiles.php?page=1

  • Error while running application with Tomcat 5.0

    Hi,
    I am trying to run my application on Tomcat 5.0. I have java environment version 1.4
    I am getting the following error during the server start up :
    Mar 30, 2007 3:51:03 PM org.apache.coyote.http11.Http11Protocol init
    INFO: Initializing Coyote HTTP/1.1 on http-8080
    Mar 30, 2007 3:51:03 PM org.apache.catalina.startup.Catalina load
    INFO: Initialization processed in 1047 ms
    Mar 30, 2007 3:51:03 PM org.apache.catalina.core.StandardService start
    INFO: Starting service Catalina
    Mar 30, 2007 3:51:03 PM org.apache.catalina.core.StandardEngine start
    INFO: Starting Servlet Engine: Apache Tomcat/5.0.28
    Mar 30, 2007 3:51:03 PM org.apache.catalina.core.StandardHost start
    INFO: XML validation disabled
    Mar 30, 2007 3:51:03 PM org.apache.catalina.core.StandardHost
    getDeployer
    INFO: Create Host deployer for direct deployment ( non-jmx )
    Mar 30, 2007 3:51:03 PM org.apache.catalina.core.StandardHostDeployer
    install
    INFO: Processing Context configuration file URL file:C:\Program
    Files\Apache Sof
    tware Foundation\Tomcat 5.0\conf\Catalina\localhost\admin.xml
    Mar 30, 2007 3:51:04 PM org.apache.struts.util.PropertyMessageResources
    <init>
    INFO: Initializing, config='org.apache.struts.util.LocalStrings',
    returnNull=tru
    e
    Mar 30, 2007 3:51:04 PM org.apache.struts.util.PropertyMessageResources
    <init>
    INFO: Initializing, config='org.apache.struts.action.ActionResources',
    returnNul
    l=true
    Mar 30, 2007 3:51:05 PM org.apache.struts.util.PropertyMessageResources
    <init>
    INFO: Initializing,
    config='org.apache.webapp.admin.ApplicationResources', retur
    nNull=true
    Mar 30, 2007 3:51:06 PM org.apache.catalina.core.StandardHostDeployer
    install
    INFO: Processing Context configuration file URL file:C:\Program
    Files\Apache Sof
    tware Foundation\Tomcat 5.0\conf\Catalina\localhost\balancer.xml
    Mar 30, 2007 3:51:07 PM org.apache.catalina.core.StandardHostDeployer
    install
    INFO: Processing Context configuration file URL file:C:\Program
    Files\Apache Sof
    tware Foundation\Tomcat 5.0\conf\Catalina\localhost\manager.xml
    Mar 30, 2007 3:51:07 PM org.apache.catalina.core.StandardHostDeployer
    install
    INFO: Installing web application at context path /jsp-examples from URL
    file:C:\
    Program Files\Apache Software Foundation\Tomcat 5.0\webapps\jsp-examples
    Mar 30, 2007 3:51:07 PM org.apache.catalina.core.StandardHostDeployer
    install
    INFO: Installing web application at context path from URL
    file:C:\Program Files
    \Apache Software Foundation\Tomcat 5.0\webapps\ROOT
    Mar 30, 2007 3:51:07 PM org.apache.catalina.core.StandardHostDeployer
    install
    INFO: Installing web application at context path /servlets-examples from
    URL fil
    e:C:\Program Files\Apache Software Foundation\Tomcat
    5.0\webapps\servlets-exampl
    es
    Mar 30, 2007 3:51:07 PM org.apache.catalina.core.StandardHostDeployer
    install
    INFO: Installing web application at context path /tomcat-docs from URL
    file:C:\P
    rogram Files\Apache Software Foundation\Tomcat 5.0\webapps\tomcat-docs
    Mar 30, 2007 3:51:07 PM org.apache.catalina.core.StandardHostDeployer
    install
    INFO: Installing web application at context path /webdav from URL
    file:C:\Progra
    m Files\Apache Software Foundation\Tomcat 5.0\webapps\webdav
    Mar 30, 2007 3:51:07 PM org.apache.coyote.http11.Http11Protocol start
    INFO: Starting Coyote HTTP/1.1 on http-8080
    Mar 30, 2007 3:51:07 PM org.apache.jk.common.ChannelSocket init
    INFO: JK2: ajp13 listening on /0.0.0.0:8009
    Mar 30, 2007 3:51:07 PM org.apache.jk.server.JkMain start
    INFO: Jk running ID=0 time=0/31 config=C:\Program Files\Apache Software
    Foundat
    ion\Tomcat 5.0\conf\jk2.properties
    Mar 30, 2007 3:51:08 PM org.apache.catalina.startup.Catalina start
    INFO: Server startup in 4266 ms
    Mar 30, 2007 3:53:07 PM org.apache.catalina.core.StandardHostDeployer
    install
    INFO: Installing web application at context path /Hyperceller from URL
    file:C:\P
    rogram Files\Apache Software Foundation\Tomcat 5.0\webapps\Hyperceller
    Mar 30, 2007 3:53:08 PM org.apache.struts.util.PropertyMessageResources
    <init>
    INFO: Initializing, config='org.apache.struts.util.LocalStrings',
    returnNull=tru
    e
    Mar 30, 2007 3:53:08 PM org.apache.struts.util.PropertyMessageResources
    <init>
    INFO: Initializing, config='org.apache.struts.action.ActionResources',
    returnNul
    l=true
    Mar 30, 2007 3:53:09 PM org.apache.commons.digester.Digester
    startElement
    SEVERE: Begin event threw exception
    java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39)
    at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at
    org.apache.commons.beanutils.PropertyUtils.setSimpleProperty(Property
    Utils.java:1656)
    at
    org.apache.commons.beanutils.PropertyUtils.setNestedProperty(Property
    Utils.java:1551)
    at
    org.apache.commons.beanutils.PropertyUtils.setProperty(PropertyUtils.
    java:1580)
    at
    org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:919
    at
    org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:726)
    at
    org.apache.commons.digester.SetPropertiesRule.begin(SetPropertiesRule
    .java:251)
    at org.apache.commons.digester.Rule.begin(Rule.java:152)
    at
    org.apache.commons.digester.Digester.startElement(Digester.java:1361)
    at
    org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Sour
    ce)
    at
    org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unkn
    own Source)
    at
    org.apache.xerces.impl.dtd.XMLDTDValidator.emptyElement(Unknown Sourc
    e)
    at
    org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unkn
    own Source)
    at
    org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContent
    Dispatcher.dispatch(Unknown Source)
    at
    org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Un
    known Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
    Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
    Source)
    at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
    at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown
    Source)
    at
    org.apache.commons.digester.Digester.parse(Digester.java:1647)
    at
    org.apache.struts.action.ActionServlet.parseModuleConfigFile(ActionSe
    rvlet.java:1006)
    at
    org.apache.struts.action.ActionServlet.initModuleConfig(ActionServlet
    .java:955)
    at
    org.apache.struts.action.ActionServlet.init(ActionServlet.java:470)
    at javax.servlet.GenericServlet.init(GenericServlet.java:211)
    at
    org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.
    java:1029)
    at
    org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:86
    2)
    at
    org.apache.catalina.core.StandardContext.loadOnStartup(StandardContex
    t.java:4013)
    at
    org.apache.catalina.core.StandardContext.start(StandardContext.java:4
    357)
    at
    org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase
    .java:823)
    at
    org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:80
    7)
    at
    org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595)
    at
    org.apache.catalina.core.StandardHostDeployer.install(StandardHostDep
    loyer.java:277)
    at
    org.apache.catalina.core.StandardHost.install(StandardHost.java:832)
    at
    org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.j
    ava:701)
    at
    org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:432
    at
    org.apache.catalina.startup.HostConfig.check(HostConfig.java:1083)
    at
    org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java
    :327)
    at
    org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl
    eSupport.java:119)
    at
    org.apache.catalina.core.StandardHost.backgroundProcess(StandardHost.
    java:800)
    at
    org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.p
    rocessChildren(ContainerBase.java:1619)
    at
    org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.p
    rocessChildren(ContainerBase.java:1628)
    at
    org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.r
    un(ContainerBase.java:1608)
    at java.lang.Thread.run(Thread.java:534)
    Caused by: java.lang.UnsupportedClassVersionError:
    com/hyperceller/form/LoginFor
    m (Unsupported major.minor version 49.0)
    at java.lang.ClassLoader.defineClass0(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
    at
    java.security.SecureClassLoader.defineClass(SecureClassLoader.java:12
    3)
    at
    org.apache.catalina.loader.WebappClassLoader.findClassInternal(Webapp
    ClassLoader.java:1634)
    at
    org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoa
    der.java:860)
    at
    org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoa
    der.java:1307)
    at
    org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoa
    der.java:1189)
    at
    org.apache.struts.config.FormBeanConfig.formBeanClass(FormBeanConfig.
    java:320)
    at
    org.apache.struts.config.FormBeanConfig.setType(FormBeanConfig.java:1
    91)
    ... 46 more
    Mar 30, 2007 3:53:09 PM org.apache.struts.action.ActionServlet
    handleConfigExcep
    tion
    SEVERE: Parsing error processing resource path
    java.lang.reflect.InvocationTargetException
    at
    org.apache.commons.digester.Digester.createSAXException(Digester.java
    :2919)
    at
    org.apache.commons.digester.Digester.createSAXException(Digester.java
    :2945)
    at
    org.apache.commons.digester.Digester.startElement(Digester.java:1364)
    at
    org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Sour
    ce)
    at
    org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unkn
    own Source)
    at
    org.apache.xerces.impl.dtd.XMLDTDValidator.emptyElement(Unknown Sourc
    e)
    at
    org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unkn
    own Source)
    at
    org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContent
    Dispatcher.dispatch(Unknown Source)
    at
    org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Un
    known Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
    Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
    Source)
    at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
    at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown
    Source)
    at
    org.apache.commons.digester.Digester.parse(Digester.java:1647)
    at
    org.apache.struts.action.ActionServlet.parseModuleConfigFile(ActionSe
    rvlet.java:1006)
    at
    org.apache.struts.action.ActionServlet.initModuleConfig(ActionServlet
    .java:955)
    at
    org.apache.struts.action.ActionServlet.init(ActionServlet.java:470)
    at javax.servlet.GenericServlet.init(GenericServlet.java:211)
    at
    org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.
    java:1029)
    at
    org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:86
    2)
    at
    org.apache.catalina.core.StandardContext.loadOnStartup(StandardContex
    t.java:4013)
    at
    org.apache.catalina.core.StandardContext.start(StandardContext.java:4
    357)
    at
    org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase
    .java:823)
    at
    org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:80
    7)
    at
    org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595)
    at
    org.apache.catalina.core.StandardHostDeployer.install(StandardHostDep
    loyer.java:277)
    at
    org.apache.catalina.core.StandardHost.install(StandardHost.java:832)
    at
    org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.j
    ava:701)
    at
    org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:432
    at
    org.apache.catalina.startup.HostConfig.check(HostConfig.java:1083)
    at
    org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java
    :327)
    at
    org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl
    eSupport.java:119)
    at
    org.apache.catalina.core.StandardHost.backgroundProcess(StandardHost.
    java:800)
    at
    org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.p
    rocessChildren(ContainerBase.java:1619)
    at
    org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.p
    rocessChildren(ContainerBase.java:1628)
    at
    org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.r
    un(ContainerBase.java:1608)
    at java.lang.Thread.run(Thread.java:534)
    Mar 30, 2007 3:53:44 PM org.apache.struts.util.PropertyMessageResources
    <init>
    INFO: Initializing, config='org.apache.struts.taglib.html.LocalStrings',
    returnN
    ull=true
    Mar 30, 2007 3:53:44 PM org.apache.struts.util.PropertyMessageResources
    <init>
    INFO: Initializing, config='org.apache.struts.util.LocalStrings',
    returnNull=tru
    e
    Mar 30, 2007 3:53:44 PM org.apache.struts.util.PropertyMessageResources
    <init>
    INFO: Initializing, config='org.apache.struts.taglib.html.LocalStrings',
    returnN
    ull=true
    could anyone tell me what the problem may be???
    Note: When I configure my application on the Tomcat 5.5 and java 1.5 then it runs fine. But the problem arises when I compile my code on the java 1.4 and run on the Tomcat 5.0
    Thanks in advance!!

    I am sorry that I forgot to tell you that I am running a struts application. Struts 1.1

  • Uploading image file using tcode se78  occuring some   Error

    Hai Gurus
          I am uploading image file using tcode se78 but while Uploading it giving some error i cant resolve the problem so any one help me plz
    Error    "Graphic LOGO could not be saved (2LOGO)"
    Regards
    Selvendran

    Hai
    Thanks
    I had done in all method but i can't save it 
    error is coming ..so plz help me to upload the image
    Error "Graphic LOGO could not be saved (2LOGO)"
    Regards
    Selvendran

  • Calling Apex Application using a php script

    Hi guys,how can i directly call my Apex Application using a php script.i have apex 2.1 intalled on my system.i created an application and i want my application users to connect directly to the applications login page.I mean somthing like this
    (http://127.0.0.1:8080/apex/f?p=103)
    and i want users to connect using somthing like this
    (http://my system/index.php) or localhost/index.php?
    i can run a script query and access my data stored on the database,but what i really want is to connect directly to the login page of my application,so that the staffs in HR can connect direstly to there HR application while those in Sales Will connect direcly to there applications page so it will look like this
    http://my system/hr.php
    http://mysystem/sales.php

    Originally, I had problems w/ the file being placed in
    C:/whatever.ext b/c I wasn't using relative paths.
    This is the code I use:
    $MAXIMUM_FILESIZE = 1024 * 1024 * 2; // 2MB
    $newFileLoc = "./wherever/file.jpg"
    if ($_FILES['Filedata']['size'] <= $MAXIMUM_FILESIZE) {
    move_uploaded_file($_FILES['Filedata']['tmp_name'],
    "./temporary/".$_FILES['Filedata']['name']);
    rename( "./temporary/".$_FILES['Filedata']['name'],
    $newFileLoc );
    chmod( $newFileLoc, 0777 );
    Modified from this article by Adobe:
    http://livedocs.adobe.com/flex/201/html/wwhelp/wwhimpl/common/html/wwhelp.htm?context=Live Docs_Book_Parts&file=17_Networking_and_communications_173_6.html

  • Upload failed your changes were saved but could not be uploaded because of an error. you may be able to upload this file using server web page. save a copy

    Hi All,
    upload failed your changes were saved but could not be uploaded because of an error. you may be able to upload this file using server web page. save a copy button.
    This is the issue which I am facing while working with SharePoint 2010. In a sharePoint 2010 document library I am having an excel file and I am trying to open it from Windows 7 and is office 2010.
    I cam e across few suggestion as mentined below but unable to find the location where to do
    Go to Resource Policies > Web >
    Rewriting > Custom Headers > (if 'Custom Headers' is not visible, click
    Customize on the right top to enable the view).
    Create a new policy with the Resource as <fully qualified domain name of the SharePoint server:*/*> (for example https://sharepoint.juniper.net:*/* ).
    Create the action as Allow Custom Headers.
    Apply the settings to the required roles.
    Please suggest.

    Hi rkarteek
    All things you have to do is as follows:
    1. Open regedit.exe
    2. Naviagate to following key:
    [HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\14.0\Common\Internet]
    3. Click Edit Menu -> New -> DWORD with name of "FSSHTTPOff"
    (without quotes)
    4. Click on "FSSHTTPOff" and enter value of 1
    5.
    Close any Office Applications and browser sessions
    6. Try to reopen your document (no more read only or failure to upload)
    have a nice day!

  • URGENT: Is it possible to upload multiple files using STRUTS

    Hi,
    Is it possible to upload multiple files using STRUTS.
    I am able to upload a single file. But how do i upload multiple files ??
    upload.jsp
    <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
    <%@ taglib uri="/WEB-INF/struts-template.tld" prefix="template" %>
    <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
    <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
    <html:html>
    <head>
    <title>New Page 1</title>
    </head>
    <body>
    <html:form action="/secure/uploadFile.do" enctype="multipart/form-data" method="POST" type="com.smartstream.webconnect.user.actions.UploadActionForm">
    <p>File to upload
    <html:file property="fileUpload" size="20"/></p>
    <p><html:submit/></p>
    </html:form>
    </body>
    </html:html>
    UploadAction.java
    public class UploadAction extends BaseAction {
        Logger log = Logger.getLogger(AttachMessageAction.class);
        public ActionForward executeAction(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws ActionException {
            System.out.println("executeAction of UploadAction");
            UploadActionForm uploadActionForm = (UploadActionForm) form;
            int fileSize = uploadActionForm.getFileUpload().getFileSize();
            System.out.println("uploadActionForm.getFileUpload().getFileSize() = " + uploadActionForm.getFileUpload().getFileSize());
            byte buffer[] = new byte[1024];
            try {
                BufferedInputStream bufferedInputStream = new BufferedInputStream(uploadActionForm.getFileUpload().getInputStream());
                FileOutputStream fos = new FileOutputStream("s:\\uploaded\\" + uploadActionForm.getFileUpload().getFileName());
                int read;
                while ( (read = bufferedInputStream.read(buffer,0,buffer.length)) != -1) {
                    fos.write(buffer, 0, read);
                fos.flush();
                fos.close();
                bufferedInputStream.close();
                return mapping.findForward("success");
            } catch (IOException e) {
                e.printStackTrace();
                return mapping.findForward("error");
            }catch(OutOfMemoryError o){
                o.printStackTrace();
                System.out.println("o.getMessage() " + o.getMessage());
                return mapping.findForward("error");
    UploadActionForm.java
    public class UploadActionForm extends ActionForm{
        private FormFile fileUpload;
        private byte[] fileContent;
        public FormFile getFileUpload() {
            org.apache.struts.taglib.html.FormTag _jspx_th_html_form_0;
            return fileUpload;
        public byte[] getFileContent() {
            return fileContent;
        public void setFileUpload(FormFile fileUpload) {
            this.fileUpload = fileUpload;
        public void setFileContent(byte[] fileContent) {
            this.fileContent = fileContent;
    }--Bhupendra Mahajan

    Yes, you could try using the multipart handler...
    But I have a better idea...
    Determine the maximum number of file uploads that the
    user can do at one time. I mean, you can't
    realistically have the user upload a million files at
    one time. So say the max is 20. So you create your
    action form class with 20 FormFile fields called file1
    to file20.
    Then when you dynamically create your page, you
    dynamically create the specified number of file fields
    and 1 hidden field called "totalFiles" which contains
    the number of file fields you created. This should be
    an int field in the form bean.
    Then when you do your action processing, you just loop
    thru the totalFiles... Or well, actually, you may not
    need that at all. You could just check all the
    FormFile fields and whatever ones aren't null contain
    files.But what about UploadActionForm.java[b]
    How do i have exact mapping of the HTML form in this file ??
    --[b]Bhupendra Mahajan

  • Can you create a form not using a php script?

    I need to create a contact us form on my website using DW and have researched how and understand the easiest way is using a php script.  Unfortuntately, my webhost server does not support this and will charge me an arm and a leg in order to to do it.  Is there another way to have a functioning contact form not using a php script?

    Yes and no.
    You could use a mailto link for your form action instead of a PHP script.
    There are several problems with this method though. First, when you do that, you are at the mercy of the viewer's computer set-up. Mailto links use whatever email client is installed on the machine in order to send the message. Public computers (libraries, colleges, etc) almost never have an email client installed, so when a viewer on one of those machines clicks the link, nothing happens. Secondly, your email address is open for spam harvesters, so you may end up with enlargement and nigerian scam emails flooding your inbox.
    Since your provider doesn't give you a way to do it the right way on your server, you may want to look into email form services online and see if they are less expensive than your current alternative.

  • Uploading a file using PRC

    I am trying to upload a file using PRC, I am using .Net 2.0. Here is my code
                IRemoteSession rSession = base.portletContext.GetRemotePortalSession();
                IDocumentManager dManager = rSession.GetDocumentManager();
                IRemoteDocument rDocument = dManager.CreateRemoteDocument(4079, 217, Server.MapPath("temp.txt"));
                rDocument.SetType("http://www.plumtree.com/dtm/mime", "text/plain");
                rDocument.SetOverrideName("Trying to upload");
                rDocument.SetOverrideDescription("No Description");
                int docID = -1;
                try
                    docID = rDocument.Save();
                catch (Exception ex)
                    Response.Write(ex);
                Response.Write("<BR><BR>" + docID);
    The code always falis with following errorPlumtree.Remote.PRC.PortalException: Exception of type 'Plumtree.Remote.PRC.PortalException' was thrown. ---> System.Web.Services.Protocols.SoapException: java.rmi.RemoteException: Error in function PTDataSource.ImportDocument (vDocumentLocationBagAsXML == '1001text/plainD:\Plumtree\RemotePortlets\FileContainer\temp.txt', lDocumentTypeID == 104, pCard == com.plumtree.server.impl.directory.PTCard@65e83f, bSummarize == false, pProvider == null): Error in function PTDataSource.ImportDocument (vDocumentLocationBagAsXML == text/plain1001D:\Plumtree\RemotePortlets\FileContainer\temp.txt, lDocumentTypeID == 104, pCard == com.plumtree.server.impl.directory.PTCard@65e83f, bSummarize == false, pProvider == null): Error in function SOAPEnvelope.Restore (arrayText == [B@7aa6f0): SOAP fault: faultcode='soapenv:Server.userException' faultstring='java.lang.NullPointerException' at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) at com.plumtree.remote.prc.soap.DirectoryAPIService.submitRemoteDocumentMerge(String sLoginToken, Int32 nDataSourceID, Int32[] nFolderIDs, String sLocation, String sTypeID, String sTypeNameSpace, String sOverrideName, String sOverrideDesc, String sLanguage, Boolean bMergeACLs) at com.plumtree.remote.prc.soap.DirectoryProcedures.SubmitRemoteDocument(String sLoginToken, Int32 nDataSourceID, Int32[] nFolderIDs, String sLocation, String sTypeID, String sTypeNameSpace, String sOverrideName, String sOverrideDesc, String sLanguage, Boolean bMergeACLs) --- End of inner exception stack trace --- at Plumtree.Remote.PRC.DocumentWrapper.Save() at Gov.NSW.CCSU.Portal.FileContainer.FileBrowser.cmdUpload_Click(Object sender, EventArgs e) in D:\MyWorks\CCSU\Portal\ALUI\Portlets\FileContainer\FileContainer\FileBrowser.aspx.cs:line 48
    I thought that there might be some problem in getting the file from the client,
    so i used my own uploading routines for copying the
    file in current App's directory,
    even then i get the same error.
    Any help is greatly appreciated!!!
    Thanks,
    Avi
    [pre]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    Hello Dmitry,
    Thanks a ton for your patience!
    I have already tried step 1, still same error.
    I have already tried step 2 and it works using Portal UI
    Knowledge Directory-> Going to that specific folder - having ID 4079 -> selecting same file from same network share
    Followed Step 3 and the result confirmed that I am using the correct DataSourceID
    Here is the small piece of code
    <Code>
    IRemoteSession rSession = this.portletContext.GetRemotePortalSession();
    IObjectManager oManager = rSession.GetObjectManager(ObjectClass.DataSource);
    IObjectQuery oQuery = oManager.QueryObjects();
    for (int i = 0; i < oQuery.GetRowCount(); i++)
    Response.Write(oQuery.GetRow(i).GetName() + "-" + oQuery.GetRow(i).GetID() + "<BR>");
    </Code>
    Step 4 - We are not using ALI Content Service Windows File. Do you reckon I require this for Upload?
    Step 5 – I ran PT Spy, reproduced the problem but couldn’t find any exception(On the portal server).
    Let me give you a little insight of our dev environment here. Portal Server along with Remote Apps are installed on ServerX and Studio, Content Upload, Collaboration, Publisher are installed on ServerY. To neglect any permission issue I created the network share on ServerY as the Content Upload Service runs on Server Y.
    Running PT Spy on other server (running Content Upload Service) showed few errors but I can not make much sense out of those.
    What I can understand is
    1.     It makes the call to [submitRemoteDocumentMerge] with correct parameters.
    <Parameter List>
    nDataSourceID = 217
    nFolderIDs = (1) { 4079 }
    sLocation = \\ccsu-gmt-952.gnet.ccsu.nsw.gov.au\TempShare\temp.txt
    sTypeID = text/plain
    sTypeNameSpace = http://www.plumtree.com/dtm/mime
    sOverrideName = Trying to upload
    sOverrideDesc = No Description
    sLanguage = (null)
    bMergeACLs = false <ptLogMsgEnd>
    </Parameter List>
    2.     But the call fails with following stack trace (copied partially)
    <Stack Trace>
    com.plumtree.server.impl.webservice.PTWebService     SOAP call failed, an internal error occured on the remote server. Attempting to parse the SOAP fault for detailed error info. Web Service='File Upload Web Service', SOAP Action='urn:plumtree-com:DocumentProvider.AttachToDocument', URL='http://ServerY:11910/ptupload/services/DocumentProvider'
    </Stack Trace>
    3.     Next line shows following Stack Trace
    <Stack Trace>
    com.plumtree.server.impl.soap.SOAPEnvelope     Error in function SOAPEnvelope.Restore (arrayText == [B@7bd8a5): SOAP fault: faultcode='soapenv:Server.userException' faultstring='java.lang.NullPointerException'
    com.plumtree.server.impl.soap.OpenSoapException: SOAP fault: faultcode='soapenv:Server.userException' faultstring='java.lang.NullPointerException'
    </Stack Trace>
    4.     Then it starts giving the same error again.
    5.     I thought it might be expecting a value in Language Parameter, so I Passed US-en but still it screams.
    I can send you the entire trace file if that helps.
    Thanks a lot for helping so far, Plumtree is pretty new to me and I am finding it difficult to get my steps going.
    Thanks,
    Avi
    Edited by asolvent at 03/24/2008 10:05 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • How to upload multiple files using af:inputfile

    Hi,
    I am using J dev 11.1.1.3. I have a requirement wherein i need to upload multiple files using af:inputfile. Can we do in it ADF ? Is there any other work around to implement the same. I have checked previous questions but not able to find proper solution for this.
    Any pointer in this regard is highly helpful.
    Regards,
    Kalyan

    You have to do this your self by either (as vinod said) using a different component (not present in adf) or implementing this:
    1) allow the user to select multiple filenames (somehow)
    2) zip them together
    3) upload the zip
    4) unpack the zip on the server
    5) work with the files
    Timo

  • How to upload multiple files using wicket

    Hai,
    how to upload multiple files using wicket at a single browse.
    any suggestion?
    Thanks in advance

    You have to do this your self by either (as vinod said) using a different component (not present in adf) or implementing this:
    1) allow the user to select multiple filenames (somehow)
    2) zip them together
    3) upload the zip
    4) unpack the zip on the server
    5) work with the files
    Timo

  • Problem in Uploading excel file using WebDynpro for Java

    Hi  All
    I have followed for Uploading excel file using WebDynpro for Java added by  Tulasi Palnati
    I done all, but I'm getting 500 Exception please contact u r system admin meag  at run time also  Jxl/Workbook class not found msag  but i downloaded Jxl.jar file and  there is no error signals  in coding part. How can I solve the Problem.
    Thanks
    Polaka

    Please ask the people in the Web Dynpro Java forum for a solution.

  • How do one can upload a file (a PDF, doc etc) while filling a web form through chrome or safari? It is possible to upload a photo from the camera role, but other file types can not be uploaded.

    How do one can upload a file (a PDF, doc etc) while filling a web form through chrome or safari? It is possible to upload a photo from the camera role, but other file types can not be uploaded.

    For a variety of reasons, mostly related to security, the iOS operating system limits what can be done with respect to file uploading and downloading. But whenever you encounter a limitation like this always think, "There must be an app for this."
    Check the apps James Ward suggests.

  • How to upload html files using Weblogic Bulkloader

    I hav uploaded image files using bulkloader.
    however with html files am facing a prob.
    only the file structure gets created but there is no html file present inside.
    in
    Filename.html.md.properties i agv the followin
    nodeType=html
    lifecyclestatus=2
    File=C:\ContentRepository\a.html
    encoding=UTF-8
    charset=us-ascii
    mimeType = text/html
    shud i add some more properties...

    You have to do this your self by either (as vinod said) using a different component (not present in adf) or implementing this:
    1) allow the user to select multiple filenames (somehow)
    2) zip them together
    3) upload the zip
    4) unpack the zip on the server
    5) work with the files
    Timo

  • Uploading xml file using ADF UIX and storing in ordsys.orddoc field

    I am using ADF UIX and I am using the messageFileUpload tag to upload an XML file into the database (the file contains special characters like hyphens, apostrophes, $, etc). Once in the database I have a procedure which puts it into a clob field using the dbms_lob package. However, what exactly does ordsys.orddoc do with special characters? If I debug my procedure I see that 1 of 4 hyphens and 3 apostrophes have been turned into a character that looks like a square. Anyone know what is going on?

    It should pass binary information only, no conversion at all.
    The conversion is likely in messageFileUpload or the dbms_lob package you are using. Or you may need to tell DBMS_LOB the character set the XML file is in?
    You may want to upload the file using the interMedia tag library... Using uploadFormData?
    http://www.oracle.com/technology/software/products/intermedia/htdocs/descriptions/tag_library.html
    http://www.oracle.com/technology/products/intermedia/htdocs/jsptaglib/html/toc.htm
    Larry

Maybe you are looking for

  • New itunes 12.1.0.71 installed, and won't open. It gives me two errors.

    I use a Microsoft Vista. When the Apple Software Update, ask me to download the new itunes version, i did it. After installing the new Itunes 12.1.0.71, i try to open the programm (itunes) and it gives me this two windows, one that says, "This app ha

  • Help about c7 gallery.

    pls. Help me guys, my videos not showing in gallery, at first its working fine but now when i add new videos it doesnt appear anymore, i need to go to file manager first to view each video, by the way i put it at e:/videos , my firmware version is 14

  • Customised item separation ( same item ) at invoice level

    hello gurus, plz go through my requirement......... material (say X) is maintained in PC unit of measure. it can be packed in the denomination of 1,4 and 2 only. pack of 1 unit is refered as A pack of 2 unit is referred as B pack of 4 unit is referre

  • Validate Menu List in form.

    I was wondering if there is a way to validate a menu or list in a form. ie. at http://www.metrobham.org/register.html I would like to at least make the "Choose One" menu/list a required field as well as the "Age" and "Gender" fields. Thanks

  • What's with the CLICKING noise after every edit?

    In the latest version of GB, whenever I make a simple splice to a voice track, there's a CLICK artifact at the tail of every edit. In order to remove it, I have to zoom in and really play with the length of the clip to get rid of the click. This is R