Best practice for embedding Adminer within a custom UI/template? #1120
Unanswered
DesignThinkerer
asked this question in
Q&A
Replies: 1 comment
-
Requiring a single PHP file is silly. I would start by removing this requirement. There's no plugin bundler but you can try to create one. Phar could be another option. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all,
I'm hoping to get some advice on the best way to integrate Adminer into a client's custom ERP.
The Goal:
My goal is to display the Adminer UI inside the existing admin panel of the ERP. The panel already has its own persistent UI elements like a sidebar and a top navigation bar, and I want Adminer to render inside the main content area.
The Challenge:
When I
include 'adminer.php';
within my page template, Adminer takes control of the entire HTTP response. It seems toecho
its HTML directly and usesheader()
calls andexit()
statements, which bypasses my application's templating system and erases the surrounding UI.What I've Tried:
ob_start
): I attempted to capture Adminer's output into a variable ($output = ob_get_clean();
) to inject it into my layout. This fails during operations like login or switching databases, likely because of the aforementionedheader()
redirects.<iframe>
: This was my next thought, but Adminer's built-in security (X-Frame-Options
) correctly prevents it from being embedded in an iframe.iframe
Plugin: I am aware of the officialplugin-iframe.php
which is designed for this exact purpose. However, I have a strict client requirement: the entire database management tool must remain as a single PHP file. This prevents me from using the standard plugin loader which requires a separate file for the plugin.My Questions:
echo
ing directly?I would be very grateful for any pointers or advice you could offer. Thank you!
Beta Was this translation helpful? Give feedback.
All reactions