Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.


In iframe malfunctions

  • LazyGatto

    Good day.
    And big thaks for your product. It's great =)
    I trying integrate Adminer into vbulletin admincp.
    And have some troubles.
    Im using this code to initialize Adminer.

    $_GET['username'] = 'eg_developer';
    function adminer_object() {
            global $vbulletin;
            class AdminerSoftware extends Adminer {
                var $registry = null;
                var $sameOrigin;
                function AdminerSoftware(&$registry, $sameOrigin = false)
                    $this->sameOrigin = $sameOrigin;
                    if (is_object($registry))
                        $this->registry =& $registry;
                        if (!is_object($registry->db))
                            trigger_error('Database object is not an object', E_USER_ERROR);
                        trigger_error('Registry object is not an object', E_USER_ERROR);
                function headers() {
                    if ($this->sameOrigin) {
                        header("X-Frame-Options: SameOrigin");
                    header("X-XSS-Protection: 0");
                    return false;
                function permanentLogin() {
                    return "";
                function credentials() {
                    return array(
                function database() {
                    return $this->registry->config['Database']['dbname'];
                function login($login, $password) {
                    return ($login == 'eg_developer' && $password == '');
            return new AdminerSoftware($vbulletin);
    require_once "./includes/";

    But i always got CSRF error. i suppose, that some of _POST variables sanitaize while in global.php of vbulletin. Because it included further.
    And one more trouble. I cannot alter table. I always got error Incorrect table name '' SQL command

  • Jakub Vrána
    Jakub Vrána

    The code looks good. You are probably right that vBulletin alters some variables. Can you try it diagnose it yourself?