Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Dev Section Modification & Patches
  • Search

if add a database server or postgresql database

Section with modification and patches for Vesta
Locked
  • Print view
Advanced search
3 posts • Page 1 of 1
Omar
Posts: 24
Joined: Sun Dec 16, 2012 9:59 pm

if add a database server or postgresql database

Post by Omar » Sat Jan 26, 2013 12:39 am

Vesta support add remote database server, but in the panel if I use the "open phpMyAdmin" or "open phpPgAdmin" button, always redirect to localhost server.
To fix this, add $data[$key]['HOST'] value to $httpd var in php code (embedded in the html list_db.html), which gets the correct host database:

Code: Select all

<?php
          list($http_host, $port) = explode(':', $_SERVER["HTTP_HOST"]);
          foreach ($data as $key => $value) {
          ++$i;
          if ($data[$key]['SUSPENDED'] == 'yes') {
                $status = 'suspended';
                $spnd_action = 'unsuspend' ;
          } else {
                $status = 'active';
                $spnd_action = 'suspend' ;
          }
          $http_host=$data[$key]['HOST'];              <=== THIS
          if ($data[$key]['TYPE'] == 'mysql') $db_admin = "phpMyAdmin";
          if ($data[$key]['TYPE'] == 'mysql') $db_admin_link = "http://".$http_host."/phpMyAdmin/";
          if ($data[$key]['TYPE'] == 'pgsql') $db_admin = "phpPgAdmin";
          if ($data[$key]['TYPE'] == 'pgsql') $db_admin_link = "http://".$http_host."/phpPgAdmin/";
?>
The other issue is referring to postgresql database, cant no add this type, this is because in vesta.conf only is added mysql type (DB_SYSTEM='mysql') this changes to DB_SYSTEM='mysql,pgsql' and the problem is solved.

regards
Top

skid
VestaCP Team
Posts: 1476
Joined: Wed Apr 06, 2011 11:12 pm

Re: if add a database server or postgresql database

Post by skid » Sat Jan 26, 2013 1:07 pm

Good point, Omar. I will add this in feature release. Thank you
Top

skid
VestaCP Team
Posts: 1476
Joined: Wed Apr 06, 2011 11:12 pm

Re: if add a database server or postgresql database

Post by skid » Fri Feb 08, 2013 9:09 am

Feature is implemented and will be available in the next update.
Top


Locked
  • Print view

3 posts • Page 1 of 1

Return to “Modification & Patches”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password