The use
keyword assigns a namespace to the current script.
You really need to figure out how to get at the real error message. All server-side issues are 500-class errors.
If you have access to the logfiles on the server, try to find out what's going on there. You'd be looking for something like:
[05-Jul-2019 12:24:03 America/Chicago] PHP Fatal error: Uncaught Error: Call to a member function query() on null in /www/data/fake.com/some_script:18
Now, the error isn't "Call to a member function" in your case, mostly likely ... but whatever it is gives you the clue you need to solve the issue. Not only do you see the cause of the error, but also the file ("some_script") and the line number (18) that the parser encountered the error on.
I still kind of lean towards some kind of scope resolution problem in your case ...
If you have absolutely no access to the server's log files .. try putting this at the top of your script:
ini_set("display_errors", TRUE);
And see if you get the error message shown in your browser or the "view source" from your browser when the page is loaded.
Just be sure and take this line OUT once you get it fixed ... you don't want every Tom, Dick & Harry on the WWW to know what your site's like .... they aren't all as nice as us folks on PHPBuilder. π