close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Database change, now insert/uploads don't work

Thread began 6/08/2010 2:15 am by jeffmg279672 | Last modified 6/15/2010 12:14 pm by Jason Byrnes | 3960 views | 23 replies |

jeffmg279672

Database change, now insert/uploads don't work

For reasons too tedious to go into, I had to change the db set up for a client's site at final testing stage. I'd originally had two databases, but his hosting plan only allowed for one, so I've had to add the 3 tables from db no. 2 to no. 1. So far so good - most of the functions are unaffected as all that was involved was a change of database name here and there.
However - the insert/upload behaviors on the admin pages that I created for him no longer work, and I can't figure out why. Basically I want to avoid having to re-create these all over again tied to the new database if I can avoid it. I assume that there must be something that WA DFP does in terms of coding which I ought to be able to change (in one of the helper pages for example), but I can't see where this would be. Does that make sense? The old database name was srs_clients, the new one is wealthadvi1, but I can't see anywhere in anything that was generated by the DFP upload process that I change the old name to the new.

Sign in to reply to this post

Ian

Hi,

It might be more efficient, in terms of time, to remove the behaviors and recreate them?

Have you given that a go?

Cheers
Ian

Sign in to reply to this post

jeffmg279672

Hi - just out of sheer bloody-mindedness I'm trying to avoid doing that; partly I feel that there ought to be something somewhere that DFP has generated which tells those pages that they're looking for a database that doesn't exist anymore, and which I can adjust so that it starts to find the right one.
If push comes to shove then obviously I'm going to have to re-do the behaviors but if there's an easier work-round I'd like to know about it.

Sign in to reply to this post

Jason ByrnesWebAssist

The Digital File pro Upload code does not have any ties to the database.

That is in the Insert, Update and Delete record server behaviors.

The database used by these server behaviors is determined by the connection file selected.

On the Admin pages, double click the Insert, Update and Delete record server behaviors and change the connection that is used. Double check that changing the connection does not remove any of the bindings, if it does, you will need to add the bindings back.

Sign in to reply to this post

jeffmg279672

I tried your suggestion, tested everything locally on my testing server (MAMP) and all is working fine. I upload the files to the live server and I have the insert/update behaviors working, but none of the file names for the new uploads are showing up.
So... I decided to scrap all the admin pages, and create a new set. Once again, created the 6 pages, went through adding DFP to the insert and upload pages, and tested them out fine in my testing server. Upload them to the live server, and the same problem - I insert a new record, browse to the document, hit the button and the results page shows that another item has been added, but there's a blank where the name should be.
Am I missing something basic here? Why does it work and show the name of the inserted item on my testing server but not on the live site?

Sign in to reply to this post

Jason ByrnesWebAssist

something on the live server is peventing the file upload from working.

To troubleshoot, use the insert page. edit the insert record behavior and remove the redirect to the results page. Set it so it will not redirect after inserting a record.

then add the following code at line 1:

php:
<?php

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





also on the bindings panel, expand the Uploaded Files Global status binding group and add the debug info binding to the page.

post back the debug info, any php errors and a copy of the page after running a test.

Sign in to reply to this post

jeffmg279672

OK, did that. error messages on-screen as follows:

Warning: move_uploaded_file(/var/www/vhosts/wealthadvisoryservices.co.uk/httpdocs/mktrev/lorem_ipsum copy 2.txt) [function.move-uploaded-file]: failed to open stream: Permission denied in /var/www/vhosts/wealthadvisoryservices.co.uk/httpdocs/WA_DigitalFilePro/HelperPHP.php on line 145

Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/tmp/phpYPbKJS' to '/var/www/vhosts/wealthadvisoryservices.co.uk/httpdocs/mktrev/lorem_ipsum copy 2.txt' in /var/www/vhosts/wealthadvisoryservices.co.uk/httpdocs/WA_DigitalFilePro/HelperPHP.php on line 145

I added a binding to the debug info on this page and this was what appeared on screen:

Status object: WA_UploadResult1
statusCode : -1
errorMessage :
clientFileName : lorem_ipsum copy 2.txt
fileExtension : txt
serverFileName :
serverDirectory : /var/www/vhosts/wealthadvisoryservices.co.uk/httpdocs/mktrev/
contentType : text/plain
fileWasOverwritten :
fileWasSkipped :
fileWasRenamed :
fileSize : 2744
isImage :
imageWidth : -1
imageHeight : -1
uploadFolder : /var/www/vhosts/wealthadvisoryservices.co.uk/httpdocs/client_admin/../mktrev

Sign in to reply to this post

Jason ByrnesWebAssist

ok, so the error is saying the permissions on the mktrev directory are not allowing the file to be uploaded.

you may be able to modify the permissions on that directory in Dreamweaver.

In the Files panel, change the View DropDown to Remote View.


Select the mktrev directory and right click it. From the menu select Set Permissions. make sure all three users have read and write privileges, then click OK.

To make sure the changes take effect, right click the directory again and select set permissions, the changes you made should still be checked, if not, you will need to find another way to change the permissions like an FTP program

Sign in to reply to this post

jeffmg279672

Thanks Jason, that's fixed it. Appreciate the assistance and the quick response, as always.

Sign in to reply to this post

Jason ByrnesWebAssist

excellent, glad to hear it's working.

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