Problem with Target logic for FTP, local folder mysql, remote mysql, online mysql

I can’t figure out how to create Targets that contain all 4 definitions without Wappler rejecting one of them as invalid because it doesn’t match my remote FTP target.

I need 1 Target setting for my localhost development machine to connect to my Mamp mysql database. Done.

I need 2nd Target setting for my remote Server FTP connection for publishing. Done.

But when I want to create a database connection that I will use ONLINE Wappler insists on trying to connect from my development machine immediately. When it can’t OF COURSE connect with a connection string that only works online it gives me an error and I can’t save my Master setting.

Why doesn’t Wappler simply save database connections with out querying to decide whether it will save it or not?

When it comes time to upload I should be able to Select my FTP server as a Target & then Wappler reminds me to select the proper Database connection to load with those FTP files.

Right now I’ve been manually editing the Online Connection with FTP open & edit.

1 Like

Yes, yes, yes… I find this very annoying too… Please can you relax this checking?

I have several ways to get around this – but they’re HACKS, so to speak.

The cleanest way, since Targets is a an FTP-only function – is to set the Production Mode FTP so that BEFORE FTP Publish action happens
A Popup Double-Checks to see if the intended default Database Connection string –
“LocalHost”,
“OnlineDB3747773”,
“OnlineDB2ZZU367” (etc.)
should be uploaded in the Publish action

In fact, if you have a project with page files that connect to one database and some page files that connect to another database
Wappler would allow you to PAIR Named Localhost connections with Online Connections.

In other words, during setup or later

define that “Connection localhost-mytables” are Matched by “Connection Online-mytables”

When you have finished localhost testing
Selecting PUBLISH
with the proper FTP target already chosen: “Online MyWebsite”
will not start until you have Selected & Clicked the Default Matching
“Connection Online-mytables”

or another option – LINK the FTP Target definition with its own default database connection – optional for non-database sites.

so that when you PUBLISH to your online FTP hosting server
the already defined Online Database String is delivered, overwriting your localhost machine database connection/s.

I worked with a tool that allowed you to make multiple connection strings & it treated them completely separately than the FTP connections.

At FTP upload you were prompted to check if you had selected the appropriate connection string for that website database connection.