1

tldr
I want to make an endpoint /tools/dbadmin to serve adminer file for database management. In slim 3

Question
During slim 2 era, I simply used to put_file_content adminer file to an endpoint and use it. Heck I was even able to load its plugins. I know it isn't secure, so I moved on and never needed to use it again for quite some time. But recently, I was asked to quickly make a tool for internal use, And using adminer is convenient, But in slim 3 PSR 7 way of sending page to browser, I can't figure out how to serve adminar on API endpoint. I have tried loading content as variable, and few other hacks, But I am out of ideas. I am really trying to avoid rewriting adminer as slim package. I am also avoiding iframes or handling it as separate server virtual host. Any ideas or guesses..

Abhinav Kulshreshtha
  • 2,147
  • 1
  • 23
  • 38
  • why not create `tools/dbadmin` directory inside your `public` and put all your adminer-related files there? – Zamrony P. Juhara Jan 03 '19 at 10:23
  • I am doing that at present temporarily via nginx virtual host alias for that path. but as I am making a Unified tool for internal purposes, I need to have direct connectivity. example, on project page, we have multiple projects, and then on every one of them, I add a button, ManageDB. And from that button, I link that project file's db to adminer to open. We use mysql, postgres and sqlite. And of course I need to add a return button. In short Boss needs it in his way, and his guidance is limited to "I pay you to figure it out." – Abhinav Kulshreshtha Jan 03 '19 at 10:49
  • and its not just adminer, I also have a few antique PHP scripts which was used till now for internal stuffs, which are needed to be linked into this as well as be available to as standalone script. So either I maintain separate forks or figure out how to connect them at end points. – Abhinav Kulshreshtha Jan 03 '19 at 10:53

0 Answers0