Jump to content

davegfx

New Members
  • Posts

    7
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

davegfx's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi guys Just an update and thanks for all the help. I managed to fix the error by uploading a php.ini file to my root - which in turn overwrote the factory settings.
  2. Sorry thorpe, when i click the link i go to this. Can you confirm thats what you meant?
  3. Do you have shell access to your server or are you on shared hosting? It's shared so does that mean I don't have access? In cpanel, there is a setting called PHP CONFIGURATION but it says "only the server administrator can change these settings"
  4. Hi First off - apologies - i'm not a coder so this may sound very amateur. I'm having an issue with files being uploaded via a submission form. Files under 2mb are fine. Files over 2mb are not. I've deduced that this is being caused by a setting (upload_max_filesize) in php.ini. I ran php.info and the information from there seems to corroborate this: upload_max_filesize 2M (local) 2M (master) post_max_size 8M 8M I assume if i want to allow files of up to 50MB to load that i need to change these settings. Now - the problem - where do i find this ini file? The php.info says its located: Configuration File (php.ini) Path /usr/lib Loaded Configuration File /usr/local/lib/php.ini So, how exactly do i access this? And if i change those settings, do i need to modify anything else? Is max_input_time or max_execution_time going to affect large files as well?? Thanks!
  5. Hi Thank you very much for your reply! I did some more investigating and it seems to be definitely be a file size setting. If i upload a movie under 2MB then everything is fine. If i try anything above 2mb then it doesn't work. Coincidentally, the document and image uploads are limited to files below 2mb, although I am unsure of where this is located in the code. Any idea?
  6. Hi First post here and am not a programmer so be gentle. I'm not quite sure whether this is a flash problem, a server issue, or a php coding thing. My site is flash based, but utilizes several php files. The problem i'm having is with a submission form in which the user uploads several files - an image(x2), a document(x2), and a movie. When the user uploads them, these files are places in an automatically generated tracking folder on the server. Now, the images and documents all upload and get places in the folder perfectly. The movie file seems to upload normally - however, when i check the folder, the movie is not in there. One interesting thing though is that when i tested with a very small avi (like 150 bytes or something) it was fine. Does anyone have any ideas? This is the php script: <?php $subdir=$HTTP_GET_VARS['fid']; if(!is_dir("uploadx/".$subdir)){ mkdir("uploadx/".$subdir, 0777); } if (is_uploaded_file($_FILES['Filedata']['tmp_name'])) { $uploadDirectory = "uploadx/".$subdir."/"; $uploadFile = $uploadDirectory. basename($_FILES['Filedata']['name']); copy($_FILES['Filedata']['tmp_name'], $uploadFile); } ?> And this is the flash script for the upload: fileStatus = 0; bar._xscale = 0; status_txt.text = "Select a file"; //import the FileReference Object import flash.net.FileReference; //create a new FileReference object var fileRef:FileReference = new FileReference(); //create a listener object for FileReference events var fileRefListener:Object = new Object(); //apply object listener to the file reference object // setting files to be browsed if (paramType == 1) { fileDescription = "Photographs - Jpg & Png only"; fileExtension = "*.jpg; *.jpeg; *.png"; } else if (paramType == 2) { fileDescription = "Videos - Mov & Avi only"; fileExtension = "*.avi; *.mov"; } else if (paramType == 3) { fileDescription = "Documents - Word & Pdf only"; fileExtension = "*.doc; *.docx; *.pdf"; } //===================== FILEREFERENCE EVENT HANDLER =====================// //When user selects a file from the file-browsing dialog box, //the onSelect() method is called, and passed a reference to the FileReference object fileRefListener.onSelect = function(fileRef:FileReference):Void { status_txt.text = "File Size: "+fileRef.size+" bytes"+'\n'; status_txt.text = "File Type: "+fileRef.type+'\n'; status_txt.text = "File Name: "+fileRef.name+'\n'; status_txt.text = fileRef.name; file_mem = ""+fileRef.name+""; fileStatus = 1; }; //When user dismiss the file-browsing dialog box, //the onCancel() method is called, and passed a reference to the FileReference object fileRefListener.onCancel = function(fileRef:FileReference):Void { status_txt.text = "Cancelled"; fileStatus = 0; }; //When the file upload/download process started, //the onOpen() method is called, and passed a reference to the FileReference object fileRefListener.onOpen = function(fileRef:FileReference):Void { // status_txt.text = "Uploading "+fileRef.name; bar._xscale = 100; }; //The onProgress() method is called periodically during the file upload operation fileRefListener.onProgress = function(fileRef:FileReference, bytesLoaded:Number, bytesTotal:Number):Void { //setting the status bar function // status_txt.text = "Uploaded "+int(100*bytesLoaded/bytesTotal)+"%"; status_txt.text = fileRef.name; for (n=0; n<rand; n++) { rand = random(4); status_txt.text += "."; } bar._xscale = 100-(100*bytesLoaded/bytesTotal); }; //When the file upload/download operation is successfully complete, //the onComplete() method is called, and passed a reference to the FileReference object fileRefListener.onComplete = function(fileRef:FileReference):Void { status_txt.text = fileRef.name; gotoAndStop(3); if (paramType == 1) { imagePane.contentPath = "./uploadx/"+_root.postman.fid+"/"+fileRef.name; } bar._xscale = 0; fileStatus = 3; _parent.proceed(); }; //********************************* ERROR EVENT HANDLING *********************************// //This method will be called if and only if an upload fails because of an HTTP error fileRefListener.onHTTPError = function(fileRef:FileReference, error:Number) { status_txt.text = "Upload failed"; fileStatus = 2; bar._xscale = 0; _parent.proceed; }; //This method will be called if and only if a file input/output error occur fileRefListener.onIOError = function(fileRef:FileReference) { status_txt.text = "Upload failed"; fileStatus = 2; bar._xscale = 0; _parent.proceed; }; //This method will be called if and only if an upload fails because of a security error //9 out of 10 time this error occus is because of the user Flash8 player security settings fileRefListener.onSecurityError = function(fileRef:FileReference, errorString:String) { status_txt.text = "Upload failed"; fileStatus = 2; bar._xscale = 0; _parent.proceed; }; //****************************************************************************************// //attach Listener to the FileReference Object fileRef.addListener(fileRefListener); //button event for the browse button browseButn.onRelease = function() { //The browse function is the key, coz it displays a file-browsing dialog box //in which the user can select a local file to upload fileRef.browse([{description:fileDescription, extension:fileExtension}]); }; //event for the upload function startUpload() { if (fileStatus == 3) { _parent.proceed(); } else if (fileStatus == 1) { fileRef.upload("newload.php?&fid="+_root.postman.fid+"&"); } else { status_txt.text = "Not selected"; _parent.proceed(); } }
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.