Highlighted

HELP Needed to setup Database Connection in DW 19.2.1.

New Here ,
Apr 09, 2020

Copy link to clipboard

Copied

I have setup a MySQL Database called 'knights' using the XAMPP product. The Apache and MYSQL modules are running. Using phpMyAdmin product the knights database was built. In DW I tried to use the Datbase connection tool but have been unable to connect to the database.The following are the field entries entered.

Document type: PHP

MySQL Connection

Connection name: data_connection

MySQL: loaclhost:80/knights

User Name: user1

Password: ****

 

When clicking on the Select button another window opens indicating that the databases are loading. Within seconds I receive the following error window.

 

Http Error Code 404 file not found. Here are some possible resons for the problem.

 

1) Their is not testing server running on the server machine.

2) The testing server specified for this site does not map to the http://localhost:80/_mmServerScrpits/MMHTTPDB.php URL. Vefify that the URL Prefix maps to the root of the site.

 

Any help would be greatly appreciated.

 

Views

677

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

HELP Needed to setup Database Connection in DW 19.2.1.

New Here ,
Apr 09, 2020

Copy link to clipboard

Copied

I have setup a MySQL Database called 'knights' using the XAMPP product. The Apache and MYSQL modules are running. Using phpMyAdmin product the knights database was built. In DW I tried to use the Datbase connection tool but have been unable to connect to the database.The following are the field entries entered.

Document type: PHP

MySQL Connection

Connection name: data_connection

MySQL: loaclhost:80/knights

User Name: user1

Password: ****

 

When clicking on the Select button another window opens indicating that the databases are loading. Within seconds I receive the following error window.

 

Http Error Code 404 file not found. Here are some possible resons for the problem.

 

1) Their is not testing server running on the server machine.

2) The testing server specified for this site does not map to the http://localhost:80/_mmServerScrpits/MMHTTPDB.php URL. Vefify that the URL Prefix maps to the root of the site.

 

Any help would be greatly appreciated.

 

Views

678

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Adobe Community Professional ,
Apr 09, 2020

Copy link to clipboard

Copied

1) Assuming you have setup a local testing server in the site definition?

 

2) Check the location  and URL you have entered are correct for the testing server in the Dreamweaver site definition

 

3) Ensure the folder is inside your web root

 

4) If you have a htaccess files rename it or comment out the rules to discount that


Paul-M, ACP - www.webspectrum.co.uk

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Adobe Community Professional ,
Apr 09, 2020

Copy link to clipboard

Copied

See screeenshots for setting up a local testing server in DW. 

 

In my example, I'm using Wamp server.  And my default web folder is www.  On Xampp or Mamp Pro, you will use htdocs instead.

 

Local Site in Local Testing ServerLocal Site in Local Testing Server

 

Add testing serverAdd testing server

 

Path to localhostPath to localhost

 

Server modelServer model

 

Final screenFinal screen

 

Keep in mind that the old MySQL connection scripts (mmServerScript) will not work on servers running PHP 7 or higher.  For these and other reasons, you would do well to replace deprecated server behaviors with a commercial extension from WebAssist or DMX Zone.  Or write your own code in PDO or MySQLi (improved).

 

Nancy O'Shea, ACP
Alt-Web.com

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
New Here ,
Apr 10, 2020

Copy link to clipboard

Copied

Let me try to give you my setup. My localhost is knights. My site name is also knights, The default web folder is in c:\inetpub\wwwroot\knights.  

 

So looking at the Site Setup folder

 

 
 

connect1.jpgconnect3.jpg

 

 

After clicking the Select button the error occurs.

 

I have also installed the DMXZone Extension Manager and have installed the Server Connect Version 1.8.6. After opening the DW product I do not see the product installed. I wen under Window- Extension and see no product installed. Should I see the product there?

 

Any help you can provide would certainly be appreciated.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
New Here ,
Apr 10, 2020

Copy link to clipboard

Copied

soory lost the first picture

 

connect1.jpg

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Adobe Community Professional ,
Apr 10, 2020

Copy link to clipboard

Copied

The MySQL server is localhost, no more, The Database field should contain the name of the database.

 

As an aside, I have purposely stayed out of this discussion till now. I am still fuming at the fact that Dreameaver removed the server behaviours, this was one of the reasons that I turned to Dreamweaver in the first place. 

 

Nancy has mentioned Webassist and DMXzone, both of with fill the void left by Adobe. Webassist comes closest to the deprecated server behaviours panels and shows an up front cost. DMXzone shows a gratis db-connection, but then asks for payments for each of the required add-ons. Despite this, in my opinion, DMXzone is the more advanced, no malice meant towards the Webassist.

 

Are you fair dinkum regarding web development? Try Wappler


Ben

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
LEGEND ,
Apr 11, 2020

Copy link to clipboard

Copied

If you are using a recent installation of the XAMPP server I doubt you will be able to connect to your database using Dreamweaver as it uses the out-dated mysql connection workflow. Your XAMPP server would need to be running a version of php which is equal or less than 5.6 to be compatible with Dreamweaver - anything above will not work.

 

If this is new project I would not recomend using the old mysql workflow in Dreamweaver as its now out-dated/insecure. You have a few options:

 

1) Write your own database connections and queries, which I highly recomend. Take a day to go through a few youtube videos on Mysqli (improved) or PDO, these are the 2 up-to-date workflows which you should be using in conjunction with php.

 

2) There are a couple of 3rd party database connectivity/query extensions for DW which offer a limited amount of options, but enough probably to get you to where you want to be if you are a new developer.

 

3) If you are an infrequent user, have little to zero interest in web-development beyond producing a couple of websites/apps then maybe a program such as Webflow, Squarespace, Wappler etc would be the correct fit for you, although all 3 have steep learning curves, whereas writing your own database connection/queries can be learnt in a few hours using a few lines of code and you can still use Dreamweaver as your main editor, its a perfectly good web-editor, you just need to know a bit about coding if you want to produce some more advanced solutions. You're already half way there as you have your local server and database set up - the easy bit is connecting to it with literally a couple of lines of code.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Adobe Community Professional ,
Apr 12, 2020

Copy link to clipboard

Copied

I tend to agree in principal with what osgood_ has written. But, with the advantage of being a current user of both Dreamweaver (with Webassist and DMXzone extensions active) and Wappler, I want to set a few of the details straight.

 

1) Writing your own SCRUD (Search, Create, Read, Update and Delete) operations for either MySQLi or PDO is a great solution if you have plenty of time on hand. As an alternative, I am a great believer in outsourcing specialised activities to those that have better credentials than I. That is why I will use extensions for my Dreamweaver projects. That way I am assured that there are no security holes and that there is no need for extensive testing.

 

2) As a fervent user of extensions, I can assure you that there are no limitations when using either the Webassist or DMXzone products. Their SCRUD products even include login/logout processes that secure parts of the website from outside influence.

 

3) Bundling Wappler in the same group as Webflow and Squarespace shows a kind of ignorance from someone that has used none of these products. Wappler was created out of frustration with the course that Dreamweaver was taking. It started out as a more modern version of Dreamweaver with all of the DMXzone extensions already included. This meant that server behaviours was back. It is a furphie to say that Wappler is only for the infrequent user, Have a look at https://community.wappler.io/c/showcase or the Swiss Web Factory that uses Wappler exlusively for its 100+ projects.


Ben

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
LEGEND ,
Apr 12, 2020

Copy link to clipboard

Copied

I disagree with Ben obviously.

 

1)You dont need plenty of time on your hands to learn the basic workflow which will allow you to insert/delete/update etc in reference to working with a databases. You can even produce a set of snippets, which means they are reusable - you only need to change the database connection details/table details etc. You can learn that in a day.

 

2) All extensions are limited in what they can do, that's a fact. Beyond what they offer as default you have to resort to coding.

 

3) Wappler is in the same category as the other 2 workflows I mentioned, in my opinion best suited to those in the categories I also mentioned. The example url address you provided for Andre uses a combination of both Wappler and a lot of hand-coding/css, that's why his work is generally quite good because he knows how to manipulate code, long before he started using Wappler. Yes for sure you'll get a few professional developers using it as a 'piggy back' but they are going to be in the minority and mostly own their own company, sourcing their own work. You really think anyone that is viewing a long term career (a professional) in web-development is going to waste 18 months - 2 years learning Wappler proficiantly then struggle to be able to get a job at the end of it all, assuming they want to work within the industry of course for a serious web-development company? I use 'toast' and 'flows' plus a lot of other niche workflows - right, where's that mentioned in the official specs? Go sit in on their forum - the majority that are using Wappler generally have nothing to do with web-development, more they are people who have an idea for an app, the entrepreneur type, the get rich quick kiddies, many of whom will fail and they will just move on to something else. A lot of the components in Wappler are just re-hashed solutions from open-source projects - anyone who knows some limted coding or can follow some instructions on the projects website can implement them. 2 years in and personally I'm not seeing a great move in the professional web-devlopment world to want to gravitate towards Wappler. Search youtube, all you will find is the Wappler official channel and a few other channels from Paul, Brian and Yourself, no one else much, with any decent following or credibility, has been tempted. Wappler serves a purpose, fills a gap and has its relatively small circle of users, which come and go, like most of the other workflows and will be enough to keep it alive but I don't think it will be taken seriously as a replacement for learning web-development correctly.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
New Here ,
Apr 18, 2020

Copy link to clipboard

Copied

First, thank you to all who replied to my request. What I have done since is gone back to my Dreamweaver Site setup screens and tried to follow the suggestions provided below and still I have no luck with the database connection. I then went and purchased the DMXZone Connector 2 applications and it works to some degree. Meaning that within the extension I can establish a database connection. This connection works only with the externsion application. As soon as I try to implement anything within Dreamweaver itself (i.e. Bindings) it does not work. So what I have now is a fragmental usage of the Dreamweaver application. What I need to establish is some way to marry them up! The second thing I have a problem with is if I create a web page using the DMXZone connector portion of the application and preview in web browser it works but then go and view it directly using the http://localhost directly  in a seperate browser window I receive an error 404. This error is probably due to the fact the default web folder in XAMMP is setup to use /xampp/htdocs different from my website folder. As soon as I change the path variable in httpd.cong file, DocumentRoot, to my site root directory, I receive an error 403 does not have the permission to access. I have provided full rights to everything on  my website root, still the error occurs. Any help that can be provided I would certainly appreciate it as I seem to be going around and around getting nowhere setting this local server up. Thanks

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Adobe Community Professional ,
Apr 18, 2020

Copy link to clipboard

Copied

The deprecated server behaviors panels in DW should not be used.  For all work related to Database, use the DMX Zone extension exclusively.

 

For best results, move your local site folder to the XAMPP default web folder.  See screenshot below.

In my example, my server is WAMP and my default web folder is www.  Yours will be XAMPP/htdocs.  This faciliates auto updating files on local testing server each time you save the file.  So nothing to Push & one less thing to think about.

 

Site > Manage SitesSite > Manage Sites

 

Define your testing server.

Path to localhostPath to localhost

 

Nancy O'Shea, ACP
Alt-Web.com

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
New Here ,
Apr 23, 2020

Copy link to clipboard

Copied

My problems have been fixed. The solution was to download the XAMPP 5.6 version. This versoin as suggested below interfaces with Dreamweaver fine. Thank you for all you replied to this matter.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Adobe Community Professional ,
Apr 23, 2020

Copy link to clipboard

Copied

Unfortunately, if you intend to publish your site on a renowned remote server, your problems have now started; official security support for PHP 5.6 ended in December 2018 and no decent server will come within smelling distance of it. During the same period, December 2015 - December 2018, PHP 7.0 was available. This gave those still stuck with PHP 5.6 a chance to move all of their sites over to PHP 7.

 

PHP 7.1 ended December 2019

PHP 7.2 ends November 2020

PHP 7.3 ends December 2021

 

Please take the advice that osgood and or Nancy gave and either write your own scripts or use extensions.  For the former, have a look at

https://phpgurukul.com/php-crud-operation-using-pdo-extension/

 

 


Ben

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Adobe Community Professional ,
Apr 24, 2020

Copy link to clipboard

Copied

"The solution was to download the XAMPP 5.6 version."

Don't delude yourself.  That's no solution. This unholy house of cards will collapse the moment your web host upgrades your remote server.  Then it's back to square one.

 

Nancy O'Shea, ACP
Alt-Web.com

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...