close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Problem uploading images

Thread began 9/23/2010 3:28 pm by mick106153 | Last modified 10/04/2010 12:09 pm by Jason Byrnes | 4311 views | 21 replies |

mick106153

Problem uploading images

I'm having difficulty uploading images - actually not. The images upload but PowerStore will not recognize them.
Checking assigned permissions shows that the latest images I've uploaded have
rw- r-- --- or 0640
previous images are all
rw- rw- r-- or 0664
or
rw- r-- r-- or 0644

Is it PowerStore,
or is it NetworkSolutions?

Mick

Sign in to reply to this post

mick106153

I'm thinking it's because I'm grabbing them off a network drive. Am now attempting to access those permissions.

Also. Is there a way when linking to images in PowerStore that we can link to files that already exist in the "imagesupload" folder that PowerStore creates?
Seems to me that that could save a lot of time and frustration.
Looking in there I see iteration after iteration of the same file appended with -1, -2, -3 etc. because of my repeated attempts to upload the same image.

Barring that, a folder at that same level I can put the images in than allow PowerStore to work its magic before putting the images in its proprietary folder.

Mick

Sign in to reply to this post

mick106153

Further investigation reveals that placing the images on my local hard drive prior to upload eliminates the problem.
I would prefer that not be the case.
Another day perhaps.

Mick

Sign in to reply to this post

Jason ByrnesWebAssist

on the product insert page, the code to upload the image is:

php:
<?php
WA_DFP_SetupUploadStatusStruct
("WA_UploadResult1");
if(
$_SERVER["REQUEST_METHOD"] == "POST"){
    
WA_DFP_UploadFiles("WA_UploadResult1""ProductImage""2""[NewFileName]_[Increment]""true"$WA_UploadResult1_Params);
}
?>
<?php
WA_DFP_SetupUploadStatusStruct
("WA_UploadResult2");
if(
$_SERVER["REQUEST_METHOD"] == "POST"){
    
WA_DFP_UploadFiles("WA_UploadResult2""ProductThumb""2""[NewFileName]_[Increment]""true"$WA_UploadResult2_Params);
}
?>





you could add the chmod function to change the files permisions after it is uploaded:

php:
<?php
WA_DFP_SetupUploadStatusStruct
("WA_UploadResult1");
if(
$_SERVER["REQUEST_METHOD"] == "POST"){
    
WA_DFP_UploadFiles("WA_UploadResult1""ProductImage""2""[NewFileName]_[Increment]""true"$WA_UploadResult1_Params);
    
chmod($WA_DFP_UploadStatus["WA_UploadResult1"]["serverDirectory"]."".$WA_DFP_UploadStatus["WA_UploadResult1"]["serverFileName"], 0644);
}
?>
<?php
WA_DFP_SetupUploadStatusStruct
("WA_UploadResult2");
if(
$_SERVER["REQUEST_METHOD"] == "POST"){
    
WA_DFP_UploadFiles("WA_UploadResult2""ProductThumb""2""[NewFileName]_[Increment]""true"$WA_UploadResult2_Params);
    
chmod($WA_DFP_UploadStatus["WA_UploadResult2"]["serverDirectory"]."".$WA_DFP_UploadStatus["WA_UploadResult2"]["serverFileName"], 0644);
}
?>
Sign in to reply to this post

mick106153

Jason thanks and another question.

Thanks Jason

That looks like it should work.
But I have another question you may want to move to a new thread.

Moving PowerStore to a different server.
I talked to my hosting service about the slowness of the performance of the PowerStore admin - uploading and updating products etc. - and was told that because I'm on a shared server and only allocated 32meg ram I will have problems.
I recently secured a VPS with 512meg which should address that problem but I don't know what I need to do to safely port everything there and get it functional.
Addresses will change and the connection to the server will be different. And I'm guessing that I need to do the install procedure to get PowerStore running.

Can you tell me what I need to do to make this happen without having to build everything over again?

And would upgrading to PowerStore 4 (I'm at 3) make this process any easier?

Mick

Sign in to reply to this post

Jason ByrnesWebAssist

Power Store 4 will not make this any simpler.

You will need to backup the power store database, then import it to the new server.

Then update the Website URL in the wa_settings table.

you may also need to edit the local root and remote root settings.

Then edit the connection file to use the new mySQL server.

Sign in to reply to this post

mick106153

Since my last response I've upgraded to PS4, moved all the images to my local drive, changed their permissions to 664 and the problem hasn't changed.
I spoke to my host and image uploads all come in as 664 according to their settings.
But, for me, they arrive there as 640 and changing them to 664 after the fact doesn't work.

The section of code you indicated previously has changed in PS4 so how about a revised update and am I the only person with this problem?

Is it possible that it has anything to do with case? My images are mixed case.

Mick

P.S. And why oh why can't I chose images that are already on the server as is done in the image gallery? That just makes no sense.

Sign in to reply to this post

mick106153

Jason

Just read this:
"The only folders we create and set permissions on are the imagesupload, webassist, and Connections folders. We specifically set them to 777 in order to allow the editor and file uploads to work properly when editing."

Here: showthread.php?t=16228

The "imagesupload" is the folder that's causing me grief.

Talked to NS and they set everything to 664 on upload and apparently can't or won't make a change.
So I'm guessing that that's the source of the problem.
He assured me that a script - like the one you devised earlier - would work.

Mick

Sign in to reply to this post

Jason ByrnesWebAssist

on the admin/products_insert.php page, change this code block to:

php:
<?php

WA_DFP_SetupUploadStatusStruct
("WA_UploadResult1");
if(
$_SERVER["REQUEST_METHOD"] == "POST"){
    
WA_DFP_UploadFiles("WA_UploadResult1""ProductThumb""2""[NewFileName]_[Increment]""true"$WA_UploadResult1_Params);
}
?>
<?php
WA_DFP_SetupUploadStatusStruct
("WA_UploadResult2");
if(
$_SERVER["REQUEST_METHOD"] == "POST"){
    
WA_DFP_UploadFiles("WA_UploadResult2""ProductDigitalFile""2""[NewFileName]_[Increment]""false"$WA_UploadResult2_Params);
}
?>




to:

php:
<?php

WA_DFP_SetupUploadStatusStruct
("WA_UploadResult1");
if(
$_SERVER["REQUEST_METHOD"] == "POST"){
    
chmod($WA_DFP_UploadStatus["WA_UploadResult1"]["serverDirectory"], 0644);
    
WA_DFP_UploadFiles("WA_UploadResult1""ProductThumb""2""[NewFileName]_[Increment]""true"$WA_UploadResult1_Params);
    
chmod($WA_DFP_UploadStatus["WA_UploadResult1"]["serverDirectory"]."".$WA_DFP_UploadStatus["WA_UploadResult1"]["serverFileName"], 0644);
}
?>
<?php
WA_DFP_SetupUploadStatusStruct
("WA_UploadResult2");
if(
$_SERVER["REQUEST_METHOD"] == "POST"){
    
chmod($WA_DFP_UploadStatus["WA_UploadResult2"]["serverDirectory"], 0644);
    
WA_DFP_UploadFiles("WA_UploadResult2""ProductDigitalFile""2""[NewFileName]_[Increment]""false"$WA_UploadResult2_Params);
    
chmod($WA_DFP_UploadStatus["WA_UploadResult2"]["serverDirectory"]."".$WA_DFP_UploadStatus["WA_UploadResult2"]["serverFileName"], 0644);
}
?>




and this code block"

php:
<?php

WA_DFP_SetupUploadStatusStruct
("WA_UploadResult3");
if(
$_SERVER["REQUEST_METHOD"] == "POST"){
    
WA_DFP_UploadFiles("WA_UploadResult3""ProductImage""2""[NewFileName]_[Increment]""true"$WA_UploadResult3_Params);
}
?>



to:

php:
<?php

WA_DFP_SetupUploadStatusStruct
("WA_UploadResult3");
if(
$_SERVER["REQUEST_METHOD"] == "POST"){
    
chmod($WA_DFP_UploadStatus["WA_UploadResult3"]["serverDirectory"], 0644);
    
WA_DFP_UploadFiles("WA_UploadResult3""ProductImage""2""[NewFileName]_[Increment]""true"$WA_UploadResult3_Params);
    
chmod($WA_DFP_UploadStatus["WA_UploadResult3"]["serverDirectory"]."".$WA_DFP_UploadStatus["WA_UploadResult3"]["serverFileName"], 0644);
}
?>
Sign in to reply to this post

mick106153

Jason thank you

Just made the change you recommended and it didn't work…
Not your fault though cause I've been using the product_update page not the product_insert page. Code looks similar but I'm not comfortable with attempting to make that change without some more input from you - please.
In the mean time I will upload a new product and give you feedback on whether the change to Product_insert.php works as expected.

Thanks

Mick

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