Welcome Guest, Not a member yet? Register   Sign In
Make phpMyAdmin accessible from CI website
#1

[eluser]novice32[/eluser]
Hi,

Is there a novel way to install and configure phpMyAdmin under a CI directory so it's accessible via a CI website, such as domain.com/admin/phpMyAdmin?

Thanks,
Novice32
#2

[eluser]wehappyfew[/eluser]
smart idea...but a little dangerous i think.
anyway...i would like to hear anyone using such thing.
#3

[eluser]davidbehler[/eluser]
What about putting it in an iframe? Never tried this though.
#4

[eluser]novice32[/eluser]
Yeah, I know working with phpMyAdmin can be dicey. Currently I implement 4 layers of security: 1) SSL self signed cert 2) under an obscure directory name 3) apache authentication 4) need less to say, a valid phpMyAdmin login.

Anyhow, I would be curious if anyone has done it under a current CI website. I would still implement those security measures.
#5

[eluser]theshiftexchange[/eluser]
well - I'm guessing you'd just modify your htaccess file, and not redirect to index.php when you do www.yoursite.com/secretphpmyadmin - and put phpmyadmin there?

#6

[eluser]kr1pt[/eluser]
ciMyAdmin http://cimyadmin.net/
#7

[eluser]novice32[/eluser]
@theshiftexchange, thanks for the great idea! I'm nervous about touching the htaccess file, but that should work.

Also, as I think about it, another option would be to get a wildcard cert for the domain and make phpMyAdmin accessible via a subdomain, such as "admin". Example, https://admin.CIdomain.com/blahblah/phpMyAdmin"
#8

[eluser]novice32[/eluser]
@kr1pt - I'm not sold on ciMyAdmin yet. I think it has a long way to go.
#9

[eluser]novice32[/eluser]
Ok, wildcard certs are expensive as hell - forget that option.

How would do this in htaccess? phpMyAdmin is located under a different folder than my CI website. For example purposes, phpMyAdmin is located under /var/www/html and my htaccess is in the root of my CI website.
#10

[eluser]kr1pt[/eluser]
Code:
<?php if (! defined('BASEPATH')) exit('No direct script access allowed');

class Admin extends CI_Controller
{
    public function __construct()
    {
        parent::__construct();
    }
    
    public function phpMyAdmin()
    {
        // some access checkings
        if (has_access())
        {
            $this->load->helper('url');
            
            redirect('http://location.to.your.phpmyadmin.com');
        }
    }
}

Or better yet, cURL CI library.




Theme © iAndrew 2016 - Forum software by © MyBB