Skip to main content
Leon aka Kjetil Grimsrud
Known Participant
March 10, 2022
Answered

Can any one please tell me how to set up testing server working with Laragon

  • March 10, 2022
  • 4 replies
  • 1787 views

I got a problem With Laragon Full 5.0.0. I can't make it work together with the testing server in DW.

I got a PHP/MySQL site that I have to use the browser to check my site in. IT seems like there is no connection between PHP/MySQL and W/testing server. Is it important the www root folder is the default directory in Laragon or install PHP and MySQL separately/outside of Laragon so the PHP directories are in  C:\php and MySQL installation, and MySQL installation is in C:\Program Files\MySQL\MySQL Server 8.0\data

I am running Win11

DreamWeaver 21.2

Laragon Full 5.0.0 (Webserver)

PHP 8.1.2 (incl. with Laragon)

MySQL 5.7.33 (incl. with Laragon)

My www root folder is NOT the default root folder in Laragon. And i can open the sites in the browser with the address localhost/mysite

    This topic has been closed for replies.
    Correct answer B i r n o u
    quote

    Under "Basic tab", what is the right path to indicate as "SERVER FOLDER"? Is the WWW root folder or the path to "php.exe?


    By @Leon aka Kjetil Grimsrud

     

    it is about your root folder, the one where the files will be accessible by the DNS

    4 replies

    B i r n o u
    Legend
    March 11, 2022

    this link should be important for you to understang how Laragon structure its files

    https://laragon.org/docs/directory-structure.html

     

    Leon aka Kjetil Grimsrud
    Known Participant
    June 3, 2022

    Thanks for the link Birnou

    Nancy OShea
    Community Expert
    Community Expert
    March 10, 2022

    STEP 1:  Install local testing server and create a local MySQL database with phpMyAdmin or HeidiSQL.

    http://webvaultwiki.com.au/Default.aspx

    https://localwp.com/help-docs/advanced/how-to-use-heidisql-with-local/

     

    STEP 1: Define local testing server in DW under Site > Manage Sites.   See screenshots below. 

     

     

    New Server:

     

     

    Testing Server Basic tab:

     

     

    Testing Server Advanced tab:

     

     

    Final screen:

     

     

    Paste this code into a new php document and save as TEST.php. 

    Right-click on document tab and select Open in Browser (localhost).

    <?php
    $con = mysqli_connect("localhost","your_username","your_password","database_name");
    
    // Check connection
    if (mysqli_connect_errno())
      {
      echo "Failed to connect to MySQL: " . mysqli_connect_error();
    		}
    		else echo "Successfully connected, happy coding!"
    ?> 

     

    Hope that helps.

     

    Nancy O'Shea— Product User & Community Expert
    B i r n o u
    Legend
    March 11, 2022
    quote

    STEP 1:  Install local testing server and create a local MySQL database with phpMyAdmin or HeidiSQL.

    http://webvaultwiki.com.au/Default.aspx

    https://localwp.com/help-docs/advanced/how-to-use-heidisql-with-local/

    Hope that helps.

    By @Nancy OShea

     

    Hello @Nancy OShea ... I probably missed a step, but the OP use Laragon... why should he install this ?

    Nancy OShea
    Community Expert
    Community Expert
    March 11, 2022

    @B i r n o u,

    Laragon is a server.  But a database app is required to create & manage SQL data.

    • By default, Laragon comes with HeidiSQL.
    • Some people prefer phpMyAdmin because that's what their hosting server has.

    Laragon will work with either one.

     

    For compatibility with one's hosting server, download phpMyAdmin and add it to Laragon.

    C:/laragon/etc/apps/phpMyAdmin

     

    Nancy O'Shea— Product User & Community Expert
    Legend
    March 10, 2022

    Dreamweaver doesn't support any database connection these days unless you are using php version 5.6 or less and have the old redundant server  behaviours installed.

    Leon aka Kjetil Grimsrud
    Known Participant
    March 10, 2022

    I am not sure I understand what you mean 🤔 🤔

    Community Expert
    March 10, 2022

     


    @Leon aka Kjetil Grimsrud wrote:

    Under "Basic tab", what is the right path to indicate as "SERVER FOLDER"? Is the WWW root folder or the path to "php.exe

    There's nothing in DW to point to a PHP installation or mySQL. The server extensions that used to connect to a mySQL instance are deprecated and only work with very old, and insecure versions of those pieces of software.

     

    When you are on the basic tab, you should be connect using Local/Network unless the server is not on your machine. From the sounds of it, as the server is on your C:\ this should be true. The server folder would then be the path to your site's root directory, not necessarily the server. Then the Web URL would be something like localhost/directory or your local IP address/directory.  Under advanced you can select PHP MySQL as the server technology, but this really only works for some code hinting and doesn't have the mySQL connections as previously eluded to.

     

    If this isn't working we may need to know more about your setup, or you may want to consider reaching out to the Laragon community as this is one of many possible local hosting solutions that may have its own nuances. Personally speaking I've only been hands on with MAMP/WAMP/XAMPP.

    B i r n o u
    Legend
    March 10, 2022

    what information did you indicate in the site setup concerning the testing server ?

    Leon aka Kjetil Grimsrud
    Known Participant
    March 10, 2022

    Like i remember from the old days and to be sure I was doing it right, I also checked it up and did it as described in the Adobe tutorial. But there is one thing I wonder. In the setup for "TESTING SERVER". Under "Basic tab", what is the right path to indicate as "SERVER FOLDER"? Is the WWW root folder or the path to "php.exe?

    B i r n o u
    B i r n o uCorrect answer
    Legend
    March 11, 2022
    quote

    Under "Basic tab", what is the right path to indicate as "SERVER FOLDER"? Is the WWW root folder or the path to "php.exe?


    By @Leon aka Kjetil Grimsrud

     

    it is about your root folder, the one where the files will be accessible by the DNS