close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Can't get file to upload

Thread began 8/12/2009 4:24 pm by jeff_theiler382828 | Last modified 8/14/2009 9:47 am by Jason Byrnes | 2589 views | 7 replies |

jeff_theiler382828

Can't get file to upload

Having trouble with file upload on DFP. It was working before, but isn't now. I made a bare-bones page to try and isolate error, but still can't figure it out. When I go to the folder where the file "should" be, there is no file there.

Any ideas?

Thanks.

Code is:

<?php require_once("WA_DigitalFilePro/HelperPHP.php"); ?>
<?php
// WA_UploadResult1 Params Start
$WA_UploadResult1_Params = array();
// WA_UploadResult1_1 Start
$WA_UploadResult1_Params["WA_UploadResult1_1"] = array(
'UploadFolder' => "Image1/",
'FileName' => "pepper",
'DefaultFileName' => "",
'ResizeType' => "0",
'ResizeWidth' => "0",
'ResizeHeight' => "0",
'ResizeFillColor' => "" );
// WA_UploadResult1_1 End
// WA_UploadResult1 Params End
?>
<?php
WA_DFP_SetupUploadStatusStruct("WA_UploadResult1");
if($_SERVER["REQUEST_METHOD"] == "POST"){
WA_DFP_UploadFiles("WA_UploadResult1", "pic load", "2", "[NewFileName]_[Increment]", "JPG:30", $WA_UploadResult1_Params);
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
<form id="form1" name="form1" enctype="multipart/form-data" method="post" action="">
<p>
<input type="file" name="pic load" id="pic load" />
</p>
<p>&nbsp;</p>
<p>
<input type="submit" name="submit" id="submit" value="Submit" />
</p>
</form>
</body>
</html>

Sign in to reply to this post

Jason ByrnesWebAssist

one problem I can see is that the file field has a space in the name:
name="pic load"

Form elements cannot have spaces in the name, change that to:
name="pic_load"

then edit the Upload server behavior and reselect the file field.

Sign in to reply to this post

jeff_theiler382828

I saw that too. I changed that as suggested but still no upload. The debugging info tells me no file uploaded as well. I'm perplexed.

Sign in to reply to this post

jeff_theiler382828

Wait a minute, thanks the upload works! However, when I reassociated, I now get this error message:

Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 14592 bytes) in C:\xampp\htdocs\rent_monkey\WA_DigitalFilePro\HelperPHP.php on line 849

I'm trying to resize jpg's.

Sign in to reply to this post

Jason ByrnesWebAssist

try changing the memory_limit setting in the php.ini file.

You may need to increase it to as much as 256M.

Sign in to reply to this post

jeff_theiler382828

hmmm. spent a couple of hours trying to do this, using other web info. I tried to adjust the php.ini-dist file (all of this stuff is on an Apache internal sever I did with the standard set up to test the webpages before publishing them). I can't find just a php.ini file. It appears from the commentary I read, that it would just be a matter of opening with notepad and replacing the text in the memory_limit line, but it is really unclear to me where this file is?

The php.ini-dist adjustment didn't do anything.

Any ideas?

Sign in to reply to this post

jeff_theiler382828

Resolved problem. If anyone is curious, need to go to localhost/xampp/[/url] and go to phpinfo() to find the right php.ini file. Adjust as stated above. Restart apache and double check that the change took place [also found in phpinfo() ]. Then the file uploads will work as they should.

Sign in to reply to this post

Jason ByrnesWebAssist

Excellent, glad to hear it is sorted.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...