REVIEW: Improving the FTP and Web Server Connection check

As you know Wappler is very dependent on good connectivity with your web server, like of locally.
Next to making sure all the right files get uploaded, the whole database connector is build around connection with your web server,

Wrong Connection Settings…

Recently we had many users with incorrect: ftp settings, web root settings, ports or just wrong server models… that caused a lot of long discussion topics here in the forum, while the problem was really a bad setting.

The improvements

So to make sure this never happens again, we have now improved greatly our “Test Connection” when defining Targets in the Project Options.

Extended Connection Testing, for Remote Targets with FTP

We are now checking much more than simply if the FTP works, now we check:

  1. A successful FTP connection - establishing the connection
  2. Do a test file upload - checks if files can be upload and if the user has enough permissions
  3. Try to access the uploaded file through the web site by using the supplied Web Site URL. To make sure the web root url matches the ftp root!
  4. Execute server side code - if a server model is specified, try to execute a file with it, to make sure it works

The Target settings dialog:

Testing the connection now opens a whole terminal with all the FTP communication, so you can see exactly what is going on.

In case of errors, you can simply copy the output and paste it in the forum - all security sensitive information is automatically anonymized:

All the FTP communication is clearly visible. Maybe a bit too much :slight_smile:

Wrong Web Site URL

If you have the wrong web site url, you will get:

image

Wrong Web Site Root URL

If you have the wrong web root that is different than your ftp root, you will get:
_wrong_www_root

Wrong Server Model

If you have selected the wrong server model, you will get:

image

Extended Connection Testing, for Local Targets

  1. Do a test file copy - checks if files can be upload and if the user has enough permissions
  2. Try to access the uploaded file through the web site by using the supplied Web Site URL. To make sure the web root url matches the ftp root!
  3. Execute server side code - if a server model is specified, try to execute a file with it, to make sure it works

For local servers, you have the target settings and also “Test Connection”

Web Server down or bad url

If you local web server is down or you have entered the wrong url, you will see:

Wrong Web Server Root URL

If you have entered wrong web root that is different than your root local folder, you will get:

Wrong Server Model

If you have selected the wrong server model, you will see:

Conclusion

So with all this extra checks, we hope that users won’t make basic mistakes any more and we don’t get thousands of posts like - can’t connect to my database, that eventually turn out to bad settings.

We will be making those checks mandatory when you define a new target in the project options, so we can make sure we get everything right.

Your feedback

So what do you think about those improvements? Is the workflow right? Should we make the error messages more clear? Let us know by replying to this topic.

4 Likes

Love it @George I think it will make it so much easier for users to see what is going on, no such thing as too much information in my opinion.
I love that you have made all the passwords and usernames anonymised going to help greatly when making video too. I would love if the password for database connections was also anonymised for the same reason.

2 Likes

A post was split to a new topic: Local target configuration