Flex and php file uploader cross browser problems
Hi, I have a problem in flex and php file uploader. It was
working fine in Internet Explorer, but nothing would work in
Firefox and in other browsers. Firefox and other browsers was not
sending the session with the file upload and was producing a login
error. On IE the session cookie is picked up and the upload request
uses the authenticated session, no login error. I'm newbie in flex.
Please help me. Thanks in advance!
Here's my code:
bgupload.mxml
Hello, I am Gamaliel Arredondo, i have solved this problem, the error is in the code, you have a mistake in your code, check it out.
The way to run the flex applications, in my case, i installed xampp, in the htdoc directory i put the folder with the files of the application and all is working very well, only when the apache is running because if it is stoped the application show error, please review your code and if you have problems you can contact me by e-mail ([email protected]) i also fought with that problem but i could find the solution, i hope to help you.
Similar Messages
-
Firefox is automatically downloading ".php" files when I browse certain websites.
Without permission, it just simply downloads the files and prompts me to indicate the program I would like to open the file with.
I work for a school district and Firefox 4 was installed in 4 other computers and it did the same thing with all of them.
I then reverted to the previous version of Firefox and continued to have the same problem.
Please adviseHold down the shift key when you launch an app in Lion to "discard previous windows".
-
Hi I have been working with javascript and php to upload files. I am having problems with
the backend of the file upload.
So when the file is recieved in the backend.php . It comes like:
$fileupload=$_POST['upload_file'];
The above $fileupload is the url of the file:
I am trying to extract name , type and size using:
$name=$_FILE['$fileupload']['name'];
$tmp_name=$_FILE['$fileupload']['tmp_name'];
$size=$_FILE['$fileupload']['size'];
But this seems not to work.
echo $fileupload; //gives me the file url.
but:
echo $name or $tmp_name or $size
does not work.
Can any one help.Hi Rob
Thanks so much for the replay. $name=$_FILES['photofield']['name'];
does not work in this circumstance because I am recieving the file through the ajax code below:
<script type="text/javascript">
// JavaScript Document
var phototitle;
var photogenre;
var photodesc;
var photofield;
function AjaxStuff(){
phototitle = jQuery("#phototitle").attr("value");
photogenre = jQuery("#photogenre").attr("value");
photodesc = jQuery("#photodesc").attr("value");
photofield = jQuery("#photofield").attr("value");
jQuery.ajax({
type: "POST",
url: "Uploadfix.php",
cache: false,
dataType: "html",
data: "phototitle=" + phototitle + "&photogenre=" + photogenre + "&photodesc=" + photodesc + "&photofield=" + photofield,
success: function(response){
// if sucessful; response will contain some stuff echo-ed from .php
// alert("Here is your response: " + response);
// Append this response to some <div> => let's append it to div with id "serverMsg"
jQuery("#allresult").append(response);
jQuery("#contentgrid").trigger("reloadGrid");});
} // END OF FormAjaxStuff()
</script>
photofield is the file. Uploadfix.php is where the data is posted:
Uploadfix.php
$phototitle=$_POST['photofield];
the for file:
$photo=$_FILES['photofield']['name'];
echo $photo; //Nothing comes out.
echo $photofield; //The url for the file appears. -
Flex based Offline File Upload Application
Hi,
I am developing a flex based desktop client application,
which provides capability for offline and online file upload.
I want to achieve following functionality.
It detects whether user is online or not, If not online then
it saves data to somewhere on local file system folder
and as soon as it detects that user is online, it uploads
data from local file systm folder to HTTP based server.
I explored FileReference object in flash.net API, Apparently
it does not provide any capability to store content to local file
system.
Is above mentioned offline file upload possible using action
script ?
Pls. help.
Regards
Tarunhi,
for all offline working applications you need an offline swf
to exe maker. i use mdm zinc. it is fantastic for the type of
problem you mentioned. visit www.multidmedia.com and download a
trial version. it will provide you with the necessary tool.
gaurav -
Need help with Rollover Image cross browser problem
Hello,
I am having a cross browser problem with my websites rollover nav links. The trouble is, while they work perfectly fine in IE8 and IE9, I’ve also attempted to use them through Opera, and they simply don’t work. They don’t link nor do they do their rollover effect. And I was trying to figure out what I have done wrong. Currently the site is not completed, but the first two pages are, the “news” and “about me” pages are currently (as of right now) working. The address to the site is below.
http://maxmetal.xsustudios.com/index.html
I hope that someone can help me with this, if needs be I can put the code for the CSS and HTML into this part if it will save some time for everyone. Sorry too about the PNG images, I have to change those over to semi-transparent GIF’s yet so the site does take a while to load…
Hope someone can help me with this!
PALADINWhen I disable CSS in my browser, the rollover buttons work just fine. This tells me your CSS is messed up and you've layered something over your menus which is making them inaccessible to users.
I noticed you've applied relative positioning to just about everything on your page. Why? Default CSS positioning (unspecified or static) is all you need for 98% of layouts.
Learn CSS positioning in 10 Steps
http://www.barelyfitz.com/screencast/html-training/css/positioning/
My advice would be to start over using a pre-built CSS Template with all the divisions and columns you're likely to need for this project. Below are some good links to get you on the right track.
For professional CSS Templates that are rock solid & perform well in all browsers, visit Project Seven:
http://www.projectseven.com/products/index.htm
Ultimate Multi-Column Layouts
http://matthewjamestaylor.com/blog/ultimate-multi-column-liquid-layouts-em-and-pixel-width s
Not Just a Grid CSS Framework
http://www.notjustagrid.com/demo.asp
EZ-CSS Templates (watch the screencast to see how it works)
http://www.ez-css.org/css_templates
Dreamweaver CSS Templates for beginners
http://www.adobe.com/devnet/dreamweaver/articles/dreamweaver_custom_templates.html
New DW Starter Pages
http://www.adobe.com/devnet/dreamweaver/articles/introducing_new_css_layouts.html
Good luck with your project!
Nancy O.
Alt-Web Design & Publishing
Web | Graphics | Print | Media Specialists
http://alt-web.com/
http://twitter.com/altweb -
File upload in Mozilla problem
Hi,
I am using Flex with server side php script to upload a file
from Flex to server and everything works fine when i use Internet
Explorer but in Firefox i get the following "Error #2038: File I/O
Error".
I googled around and found out that there is a problem with
Firefox handling sessions but couldn't find solution to this
problem. Has anyone else came across this problem, what would be
the solution to it?
Here is my mxml code:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml"
creationComplete="init();">
<mx:Script>
<![CDATA[
private var urlRequest:URLRequest;
private var fileReferenceList:FileReferenceList;
private var serverSideScript:String = "
http://localhost/uploadFile.php";
private function init():void {
urlRequest = new URLRequest(serverSideScript);
fileReferenceList = new FileReferenceList();
fileReferenceList.addEventListener(Event.SELECT,
fileSelectedHandler);
private function uploadFile():void {
fileReferenceList.browse();
private function fileSelectedHandler(event:Event):void {
var fileReference:FileReference;
var fileReferenceList:FileReferenceList =
FileReferenceList(event.target);
var fileList:Array = fileReferenceList.fileList;
// get the first file that the user chose
fileReference = FileReference(fileList[0]);
// upload the file to the server side script
fileReference.addEventListener(Event.COMPLETE,
uploadCompleteHandler);
fileReference.upload(urlRequest);
// update the status text
statusText.text = "Uploading...";
private function uploadCompleteHandler(event:Event):void {
statusText.text = "File Uploaded: " + event.target.name;
]]>
</mx:Script>
<mx:Label text="Upload File From Flex to PHP"
fontWeight="bold"/>
<mx:Label text="Choose a file..." id="statusText"/>
<mx:Button click="uploadFile();" label="Upload File"/>
</mx:Application>
And my php script:
<?php
$tempFile = $_FILES['Filedata']['tmp_name'];
$fileName = $_FILES['Filedata']['name'];
$fileSize = $_FILES['Filedata']['size'];
move_uploaded_file($tempFile, "./" . $fileName);
?>Hi,
I am using Flex with server side php script to upload a file
from Flex to server and everything works fine when i use Internet
Explorer but in Firefox i get the following "Error #2038: File I/O
Error".
I googled around and found out that there is a problem with
Firefox handling sessions but couldn't find solution to this
problem. Has anyone else came across this problem, what would be
the solution to it?
Here is my mxml code:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml"
creationComplete="init();">
<mx:Script>
<![CDATA[
private var urlRequest:URLRequest;
private var fileReferenceList:FileReferenceList;
private var serverSideScript:String = "
http://localhost/uploadFile.php";
private function init():void {
urlRequest = new URLRequest(serverSideScript);
fileReferenceList = new FileReferenceList();
fileReferenceList.addEventListener(Event.SELECT,
fileSelectedHandler);
private function uploadFile():void {
fileReferenceList.browse();
private function fileSelectedHandler(event:Event):void {
var fileReference:FileReference;
var fileReferenceList:FileReferenceList =
FileReferenceList(event.target);
var fileList:Array = fileReferenceList.fileList;
// get the first file that the user chose
fileReference = FileReference(fileList[0]);
// upload the file to the server side script
fileReference.addEventListener(Event.COMPLETE,
uploadCompleteHandler);
fileReference.upload(urlRequest);
// update the status text
statusText.text = "Uploading...";
private function uploadCompleteHandler(event:Event):void {
statusText.text = "File Uploaded: " + event.target.name;
]]>
</mx:Script>
<mx:Label text="Upload File From Flex to PHP"
fontWeight="bold"/>
<mx:Label text="Choose a file..." id="statusText"/>
<mx:Button click="uploadFile();" label="Upload File"/>
</mx:Application>
And my php script:
<?php
$tempFile = $_FILES['Filedata']['tmp_name'];
$fileName = $_FILES['Filedata']['name'];
$fileSize = $_FILES['Filedata']['size'];
move_uploaded_file($tempFile, "./" . $fileName);
?> -
FLEX CODE
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml"
layout="absolute" applicationComplete="http.send()">
<mx:Button x="197" y="198" label="Button" click =
"testing()"/>
<mx:Script>
<![CDATA[
public function testing():void
mx.controls.Alert.show("this is the output " +
http.lastResult.happy);
]]>
</mx:Script>
<mx:HTTPService id = "http" method="POST" url =
"PHPDocument1.php" useProxy ="false">
</mx:HTTPService>
<mx:TextInput x="260" y="111" id="n"/>
<mx:TextInput x="182" y="45" id="last"/>
</mx:Application>
PHP CODE
<?php
$happy = "<happy>cheesey</happy>";
echo $happy;
?>
The problem I having is for some reason.. it won't even load
anything! it works with loading XML and TXT files but it doesn' t
work with Php or my Python scripts.. basically its unable to
communicate with server-side scripts. What could be the
problem?Your testing function is not being called. You need to set
the result event like this:
<mx:HTTPService
id = "http"
method="POST"
result="testing(event)"
url = "
http://localhost/PHPDocument1.php"
useProxy ="false"/>
You can then get the result in two differnt ways:
public function testing(evt:ResultEvent):void
mx.controls.Alert.show("this is the output " +
http.lastResult.happy);
trace(evt.result.happy);
Using evt.result is often more flexible than http.lastResult
for me since you are able to decouple the result from the call. It
also is helpful for debugging if there is a problem.
Vygo -
Difficulty opening a php file in a browser
Hi thanks for your ideas in advance.
I am creating a new opening page (using html) for a php site.
I can't do it in php since i don't know a lick of it. The client
wants their current php site to remain intact while I add a new
html landing page to the site. They want to link from this new
opening page to the current site they have.
There is not the usual index.html file in the current root
folder. There is a file called index.php. When I open this with
Firefox it displays only code. So this is one problem - I don't
know how to link to a php page so it displays correctly.
Second question is how can I create an html page to stand as
an opener to this php site, without recoding the index.php? If I
must recode it - is that easy enough to do?
Thank you kindly!You could rename the index.php file to something else like
index2.php,
search and hope you found all links to that file and changed
them, then
upload your new index.html file. But i don't have high hopes.
Make backup
copies of the site folder so the client isn't worse off.
Alan
Adobe Community Expert, dreamweaver
http://www.adobe.com/communities/experts/ -
Adobe Acrobat 6 and Adobe Reader 9 Web browser problem
Good Day,
I have a user that has Acrobat 6 and Reader 9 installed on the same computer. Acrobat 6 is used to edit (via open with -> Adobe Acrobat) while for normal reading, they use Adobe Reader 9 (since some files that were created in Acrobat 9 cannot be opened with Acrobat 6).
From the desktop, everything works as it should. However, the problem is that when the user is trying to open a document on the web (from Internet Explorer 7) then instead of using Reader 9, it uses Acrobat 6 (and because is unable to open Acrobat 9 files) it gives an error saying that you need to have Adobe Reader 8 or 9 installed.
So far I have tried the following:
1) Reparing Reader 9
2) Uninstalling Acrobat 6 running a repair on Reader 9 (which fixes the problem, until I reinstall Acrobat 6 again. I make sure I do not put a check mark on Read files on Internet Explorer)
3) Went to Preferences on Acrobat 6 and unchecked Display PDF in browser.
4) Checked on Manage Add-ins and tried disable any combination of Adobe PDF addin to make it work only with 9.
Note: Reader version is the latest 9.4.1
Any thoughts?
Thanks
MaxOk, so after I wrote the last post, I read through the related posts, and found the answer to
what i was looking for.
I guess it is unofficial, but I tested it today and works great:
Registry that needs to be changed is:
HKEY_CLASSES_ROOT\Software\Adobe\Acrobat\Exe
Change the path (Acrobat 6) from "c:\Program Files\Adobe\Acrobat6\Acrobat.exe"
to the path of Reader 9 which would be something like "c:\Program Files\Adobe\Reader 9.0\Reader\AcroRd32.exe"
That fixed the problem.
Thanks
Max -
File upload example - browser freezing
We implemented the web file upload example in Forms 6i a while ago. It seemed to work however if we load several files in one session the browser freezes - has anyone else experienced this problem? Can anyone help?
Many Thanks
SteveWe implemented the web file upload example in Forms 6i a while ago. It seemed to work however if we load several files in one session the browser freezes - has anyone else experienced this problem? Can anyone help?
Many Thanks
Steve -
.xls and .xlsx file upload in webdynpro
Hi All,
Its very urgent.Tried for many options, Searched the scn. But no result. None of them are consistent while uploading xls and xlsx file.
Sometimes the same file is working garbage value and sometime is working fine.
Even I tried using CL_FDT_XL_SPREADSHEET , but its always been caught by cx_fdt_excel_core.
Could anyone suggest me what to do in this case, as my client is not agreeing to any other kind of file .Hi Prabhati,
i had a similar requirement but i was able to persuade my clients to use tab delimeted file(saved as xls).
XLS and XLSX excel upload in WDA - webdynpro
Thanks & Regards,
Tashi -
File Upload in UNIX Problem in using fileaccess.HttpUploadBean
Hi,
Some one please help me on File uploading in UNIX using fileaccess.HttpUploadBean.
My program is working fine for windows , but when i am running same profram to upload the file in Unix Environment it is giving exception.
fileaccess.properties for UNIX.
fileaccess.basedir = /usr
Under /usr i have tmp directory, and in my beanUploadExample.jsp i have defined userdir = "tmp"; but while uploading it throws "IOException = tmp is not a directory". tmp is a existing directory under /usr and i am having write permission into it.
Please help me on this.
Thanks in advanceAvoid Multipost
http://forum.java.sun.com/thread.jspa?threadID=5216365 -
Online pdf and php files with google chromebook?
chromebook keeps try to open Adobe php file and instead of opening them it saves them
I have Abobe Flash Player Verision 11.6.602.180
I need the Adobe reader to open php fileAdobe Reader can't open php files.
-
i have uploaded a excel file into the dms server
i dont want others to save the doc , while viewing in the sap viewer.( made necessary setting)
any setting required for me to do this???
i am able to view the office files in sap viewer, can i have the same option for PDF also??? and the same to CAD files also?
Regards
suryaDear Surya,
of course you can have the same behavior for PDF and CAD files. You just have to create a new workstation application for these filetypes in transaction DC30 and maintain the correct parameter so that these files are also viewed by the integrated ECL Viewer.
For further information please see the following link:
https://www.sdn.sap.com/irj/scn/wiki?path=/display/plm/2.Customizing%2528CA-DMS-EAI%2529
Best regards,
Christoph -
Problems with flex and php.
Hello, my name is Gamaliel Arredondo, i have to develope a project in flash builder 4 using the data service to connect with php, the application has installed the zend framework automatically just like the tutorials said, I use xampp and i have the files in the htdoc location, all the path are correct but when i want to connect to my php classes i receive this message:
Make sure that Zend Framework is installed correctly and the parameter "amf.production" is not set to true in the amf_config.ini file located in the project output folder. /0/onResultÿÿÿÿ � Uflex.messaging.messages.AcknowledgeMessage correlationId clientId destination messageId timestamp timeToLive headers body I797BFBCC-250A-A100-9954-68CD2AC82DF5 I2570DA6E-2F76-55E9-2249-000075B2C293 I590AA123-C3CE-5F48-6A94-00002F9B370A 126571301000 ‡G
I have searched on internet in order to find a solution but i haven't found anything that can help me, so i would like to receive some of help, my email is [email protected], if you can help me i will thank you so much, have a nice day.Hello, I am Gamaliel Arredondo, i have solved this problem, the error is in the code, you have a mistake in your code, check it out.
The way to run the flex applications, in my case, i installed xampp, in the htdoc directory i put the folder with the files of the application and all is working very well, only when the apache is running because if it is stoped the application show error, please review your code and if you have problems you can contact me by e-mail ([email protected]) i also fought with that problem but i could find the solution, i hope to help you.
Maybe you are looking for
-
Re: iMac suddenly very slow only on start up
OSX 10.9.5 on my imac takes over 2 minutes to boot!?!?!? What I notice in the below, is that flipvideo is no longer on my system and skype has been uninstalled. I have searched for com.skype.c2c_service.plist but it is not on my system. How do I g
-
How to store japanese values in cookies
Hi, How to store japanese character stored/reterive in cookies.. I am using Windows XP.. Kindly help me if you know.. When i run the progrem the following exception will coming... javax.servlet.ServletException: P�e���r���c�V�X�e�� org.apache.st
-
ProcessControlExceptions in Asynchronous Services
I have built an asynchronous web service (jws) that invokes a synchronous process (jpd) via a process control (jcx). I'm having trouble with my exception handling. My JPD has a global exception handler, which throws a SoapFaultException wrapping the
-
Db_link related question
Hi Folks, Environment: Oracle 10g (Rel 2) 1, created a new schema (with GRANT ALL PRIVILEGES) 2, created a db link to a remote database (off this new schema) Verification Steps: I can see the new db link entry in "ALL_DB_LINKS" table I can also acces
-
I'm trying to install adobe reader X 10.1.3 on my mac running os X 10.7.4. Half way through the install this error pops up and stops the install: "Found a higher version adobe reader in the installation location. Installation will terminate." My gues