close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Upload Testing Working Local on Mamp but not Mamp Pro?

Thread began 9/30/2010 4:39 pm by swbgraphix | Last modified 9/30/2010 8:20 pm by Jason Byrnes | 3983 views | 9 replies |

swbgraphix

Upload Testing Working Local on Mamp but not Mamp Pro?

Is there any reason you can think of that when testing our sites upload feature on the machine with MAMP it works fine, but when testing on the machine with MAMP PRO it is not working???

When our current page would not upload when testing locally on my machine with MAMP PRO, I tried rebuilding a simple upload php page to test over and over again, it would attach the file but never upload, and never show the progress bar.

Any ideas?
Do you need to see some code?

Thanks guys!

Sign in to reply to this post

Jason ByrnesWebAssist

using a simple page that only includes the file upload function and nothing else, add this code to turn error reporting on:

php:
<?php

error_reporting
(E_ALL);
ini_set('display_errors','on');
?>



also go to the bindings panel and expand the Uploaded Files Global Status group and add the debug info binding to the page, what happens testing this page?

Sign in to reply to this post

swbgraphix

Here is the script generated:

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /Volumes/SWB Graphix/04 SWBG Websites/GLtest/uploadtest.php:22) in /Volumes/SWB Graphix/04 SWBG Websites/GLtest/webassist/file_manipulation/helperphp.php on line 70

Status object: WA_UploadResult1
statusCode : 0
errorMessage : No file uploaded
clientFileName :
fileExtension :
serverFileName :
serverSimpleFileName :
serverDirectory :
contentType :
fileWasOverwritten :
fileWasSkipped :
fileWasRenamed :
fileSize : -1
isImage :
imageWidth : -1
imageHeight : -1
WA_UploadResult1_1:
clientFileName :
fileExtension :
serverFileName :
serverSimpleFileName :
serverDirectory :
contentType :
fileSize : -1
imageWidth : -1
imageHeight : -1
statusCode : 0
errorMessage : No file uploaded

Sign in to reply to this post

swbgraphix

Jason I got rid of the top warning session message by deleting a blank line on 21. But the file still doesn't upload.

Status object: WA_UploadResult1
statusCode : 0
errorMessage : No file uploaded
clientFileName :
fileExtension :
serverFileName :
serverSimpleFileName :
serverDirectory :
contentType :
fileWasOverwritten :
fileWasSkipped :
fileWasRenamed :
fileSize : -1
isImage :
imageWidth : -1
imageHeight : -1
WA_UploadResult1_1:
clientFileName :
fileExtension :
serverFileName :
serverSimpleFileName :
serverDirectory :
contentType :
fileSize : -1
imageWidth : -1
imageHeight : -1
statusCode : 0
errorMessage : No file uploaded

Sign in to reply to this post

swbgraphix

My code for simple page:

<?php
error_reporting(E_ALL);
ini_set('display_errors','on');
?>
<?php require_once("webassist/file_manipulation/helperphp.php"); ?>
<?php
// WA_UploadResult1 Params Start
$WA_UploadResult1_Params = array();
// WA_UploadResult1_1 Start
$WA_UploadResult1_Params["WA_UploadResult1_1"] = array(
'UploadFolder' => "uploadedfiles/",
'FileName' => "[FileName]",
'DefaultFileName' => "",
'ResizeType' => "0",
'ResizeWidth' => "0",
'ResizeHeight' => "0",
'ResizeFillColor' => "" );
// WA_UploadResult1_1 End
// WA_UploadResult1 Params End
?>
<?php
WA_DFP_SetupUploadStatusStruct("WA_UploadResult1");
if(isset($_POST["submit"])){
WA_DFP_UploadFiles("WA_UploadResult1", "upload", "2", "[NewFileName]_[Increment]", "false", $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>
<script src="webassist/progress_bar/jquery-blockui-formprocessing.js" type="text/javascript"></script>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Untitled Document</title>
</head>

<body>

<div id="testform1_ProgressWrapper">
<form action="uploadtest.php" method="post" name="testform" id="testform1">
<input name="upload" type="file" />
<input name="submit" type="submit" value="submit" />

</form>
</div>

<div id="testform1_ProgressMessageWrapper" class="blockUIOverlay" style="display:none;">
<script type="text/javascript">
WADFP_SetProgressToForm('testform1', 'testform1_ProgressMessageWrapper', WADFP_Theme_Options['Bar:Slate']);
</script>
<div id="testform1_ProgressMessage" >

<p style="margin:10px; padding:5px;" ><img src="webassist/progress_bar/images/slate-bar.gif" alt="" title="" style="vertical-align:middle;" />&nbsp;&nbsp;Please wait</p>

</div>
</div>
</body>
<?php echo WA_DFP_AllUploadsDebug(); ?>
</html>

Sign in to reply to this post

Jason ByrnesWebAssist

for a file to upload, the forms encoding type must be set to multipart/form-data.


change the form tag:

<form action="uploadtest.php" method="post" name="testform" id="testform1">




to;

<form action="uploadtest.php" method="post" name="testform" id="testform1" enctype="multipart/form-data">
Sign in to reply to this post

swbgraphix

I had tried that before and it didn't work. Now that error reporting is on here is what it says with that multipart/form-data added:

Warning: move_uploaded_file(/Volumes/SWB Graphix/04 SWBG Websites/GLtest/uploadedfiles/c0a53ce02993ecf3f48b6822794ecc0a_tmp.pdf) [function.move-uploaded-file]: failed to open stream: Permission denied in /Volumes/SWB Graphix/04 SWBG Websites/GLtest/webassist/file_manipulation/helperphp.php on line 96

Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/Applications/MAMP/tmp/php/phpxavOGB' to '/Volumes/SWB Graphix/04 SWBG Websites/GLtest/uploadedfiles/c0a53ce02993ecf3f48b6822794ecc0a_tmp.pdf' in /Volumes/SWB Graphix/04 SWBG Websites/GLtest/webassist/file_manipulation/helperphp.php on line 96

Warning: copy(/Volumes/SWB Graphix/04 SWBG Websites/GLtest/uploadedfiles/c0a53ce02993ecf3f48b6822794ecc0a_tmp.pdf) [function.copy]: failed to open stream: No such file or directory in /Volumes/SWB Graphix/04 SWBG Websites/GLtest/webassist/file_manipulation/helperphp.php on line 98

Status object: WA_UploadResult1
statusCode : -1
errorMessage :
clientFileName :
fileExtension :
serverFileName :
serverSimpleFileName :
serverDirectory :
contentType :
fileWasOverwritten :
fileWasSkipped :
fileWasRenamed :
fileSize : -1
isImage :
imageWidth : -1
imageHeight : -1
WA_UploadResult1_1:
clientFileName :
fileExtension :
serverFileName :
serverSimpleFileName :
serverDirectory :
contentType :
fileSize : -1
imageWidth : -1
imageHeight : -1

Sign in to reply to this post

Jason ByrnesWebAssist

that error means that you do not have the correct permissions on the upload directory.

make sure that the upload directory has sufficient privileges for the file to be created.

Sign in to reply to this post

swbgraphix

Well Jason, my whole being is to be here to entertain you or as you may think "waste your time". Permissions of the file folder was the issue. Thanks for your time and patience and in the immortal words of Homer Simpsom . . . " d'oh "

Sign in to reply to this post

Jason ByrnesWebAssist

no worries, it always helps to turn error reporting on when there is an issue, the errors tell the story.

Sign in to reply to this post
loading

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...