close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Digital file upload not working (Folder can be created but no upload)

Thread began 5/21/2013 3:32 pm by FPhu61701534 | Last modified 5/28/2013 10:48 am by Jason Byrnes | 1234 views | 7 replies |

FPhu61701534

Digital file upload not working (Folder can be created but no upload)

I followed the file manipulation (Upload) instructions at WebAssist to set up my image file upload. The folder was created by no image was uploaded.

I saw this forum at http://www.webassist.com/forums/posts.php?id=26520 from where I obtained the troubleshooting php codes and pasted in my page. I got the debug message below. What is the solution to this problem?

POST:

array(1) {
["submit"]=>
string(6) "Submit"
}

FILES:

array(1) {
["upload"]=>
array(5) {
["name"]=>
string(21) "19FebMarinaNight5.jpg"
["type"]=>
string(10) "image/jpeg"
["tmp_name"]=>
string(29) "C:\php\uploadtemp\php7B82.tmp"
["error"]=>
int(0)
["size"]=>
int(784655)
}
}

Status object: WA_UploadResult1
statusCode : 1
errorMessage :
clientFileName : 19FebMarinaNight5.jpg
fileExtension : jpg
serverFileName : 19FebMarinaNight5_2.jpg
serverSimpleFileName : 19FebMarinaNight5_2
serverDirectory : \uploads\
contentType : image/jpeg
fileWasOverwritten :
fileWasSkipped :
fileWasRenamed : 1
fileSize : 39264
isImage : 1
imageWidth : 600
imageHeight : 400
WA_UploadResult1_1:
clientFileName : 19FebMarinaNight5.jpg
fileExtension : jpg
serverFileName : 19FebMarinaNight5_2.jpg
serverSimpleFileName : 19FebMarinaNight5_2
serverDirectory : \uploads\
contentType : image/jpeg
fileSize : 39264
imageWidth : 600
imageHeight : 400
isImage : 1
fileWasOverwritten :
fileWasSkipped :
fileWasRenamed : 1
statusCode : 1
}
}

Sign in to reply to this post

Jason ByrnesWebAssist

how are you determining that the file was not uploaded?

this portion of the debug code:

Status object: WA_UploadResult1
statusCode : 1
errorMessage :
clientFileName : 19FebMarinaNight5.jpg
fileExtension : jpg
serverFileName : 19FebMarinaNight5_2.jpg
serverSimpleFileName : 19FebMarinaNight5_2
serverDirectory : \uploads\
contentType : image/jpeg
fileWasOverwritten :


is saying the file was uploaded:
statusCode : 1

it was uploaded to the uploads folder:
serverDirectory : \uploads\

and is named 19FebMarinaNight5_2.jpg:
serverFileName : 19FebMarinaNight5_2.jpg

Sign in to reply to this post

FPhu61701534

There is nothing found in the folder. Thus I conclude that the file upload has failed.

Sign in to reply to this post

Jason ByrnesWebAssist

I'll need to troubleshoot directly, see the private message section.

The debugging info is saying that the file is being saved to that location.

Sign in to reply to this post

FPhu61701534

See private message for the details you requested.

Sign in to reply to this post

Jason ByrnesWebAssist

This looks to be a server configuration issue, the server is not working with paths correctly and is alo being onconsistant.

I added code to the webassist/file_manipulation/helperphp.php file to see what path the files is being uploaded to

in some instances it reports uploading to C:\php\uploads\ and in others to C:\uploads\:

move: C:\php\uploadtemp\phpA973.tmp
C:\php\uploads\5bc4373f81830f048f540d8af17eb637_tmp.gif
1
C:\php\uploads\5bc4373f81830f048f540d8af17eb637_tmp.gif

it should be uploading to the site root, but some reason, the server is not returning that path.

even using the getcwd() command, which should return the path for the file being executed is returning the c:\php path. You will need to work with the host to determine why paths are not working correctly.

Sign in to reply to this post

FPhu61701534

The best way to fix the issue, I think, is for the engineers at Webassist and Exabyte (the hosting provider) to work directly on the problem. I can't do much about it. Please help. Thanks!

Sign in to reply to this post

Jason ByrnesWebAssist

The DFP Script is able to work with Windows servers, and is compatible with PHP 5.2.

The script determines the upload path using the PHP realpath() command.

it first uses:
$scriptName = $_SERVER['SCRIPT_NAME'];

to get the name of the current script

then uses:
$currentFilePath = realpath(basename($scriptName));

to return the path. that code should return the path the your site:
C:\Domains\appmobil\vid.appmobile.mobi\wwwroot\

but instead returns blank. I added the following code to the bottom of the uploader script:

php:
<?php

$scriptName 
$_SERVER['SCRIPT_NAME'];
$currentFilePath realpath(basename($scriptName));
echo(
"SCRIPT_NAME: ".$scriptName."<br />");
echo(
"Path: ".$currentFilePath."<br />");
?>



which shows the problem:
SCRIPT_NAME: /uploader.php
Path:

the realpath function is failing on the server.

the host will need to determine why the realpath function is not able to return the path to the script, that is the heart of the problem.

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