Skip to main content
Participating Frequently
April 9, 2020
Question

HELP Needed to setup Database Connection in DW 19.2.1.

  • April 9, 2020
  • 5 replies
  • 2129 views

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.

 

    This topic has been closed for replies.

    5 replies

    Jad4137Author
    Participating Frequently
    April 24, 2020

    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.

    BenPleysier
    Community Expert
    Community Expert
    April 24, 2020

    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/

     

     

    Wappler is the DMXzone-made Dreamweaver replacement and includes the best of their powerful extensions, as well as much more!
    Jad4137Author
    Participating Frequently
    April 18, 2020

    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

    Nancy OShea
    Community Expert
    Community Expert
    April 18, 2020

    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.

     

     

    Define your testing server.

     

    Nancy O'Shea— Product User & Community Expert
    Jad4137Author
    Participating Frequently
    April 10, 2020

    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

     

     
     

     

     

    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.

    Jad4137Author
    Participating Frequently
    April 10, 2020

    soory lost the first picture

     

    BenPleysier
    Community Expert
    Community Expert
    April 11, 2020

    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

    Wappler is the DMXzone-made Dreamweaver replacement and includes the best of their powerful extensions, as well as much more!
    Nancy OShea
    Community Expert
    Community Expert
    April 9, 2020

    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.

     

     

     

     

     

     

    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— Product User & Community Expert
    Legend
    April 9, 2020

    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 - Community Expert