I have tried putting a breakpoint before the attempt to connect to the database. I have tried passing link1 (the result of the connection) as a parameter back into the page & only attempt the connection if the parameter is not set.
Are you sure it’s a Komodo bug?
If yes, can you say PHP version you use, Komodo IDE version and example of code?
P.S., I’m reccomend you move to mysqli or PDO mysql, because in PHP >= 5.6 mysql was deprecated and will be removed soon (at now when you try to use mysql_* in PHP5.6, you’ll get critical error: mysql deprecated and will be removed, use mysqli or PDO mysql).
How are you triggering debugging? Are you starting the debug session from withing Komodo using F5 or Debug menu > Go or are you using PHP remote debugging to start your session?
The latter is how you should be doing it when debugging a website.
Another question to ask is where is the database? Are you running it locally? or does it have to make a remote call? Is the DB accessible in the first place? You should reproduce the ability to connect to the database in your dev environment, but outside of Komodo to eliminate interference from Komodo.