的Joomla 3.1安装在PostgreSQL 9.3

问题描述 投票:0回答:1

我不能得到这个工作,我总是得到:错误连接到PGSQL数据库。

我安装并运行PGSQL数据库,我安装了PostgreSQL的通过安装了PHP服务器。任何帮助表示赞赏。

postgresql joomla
1个回答
0
投票

我碰到这个答案对同一问题寻求帮助,我得到了最远的是这个答案Error connecting to PGSQL database in Joomla的帮助。此后,我打开的Joomla核心,并确定他们没有容纳主机:端口在他们的PostgreSQL驱动分裂。

因此,黑客INSTALL_PATH /库/的Joomla /数据库/驱动器/ postgresql.php线126,并通过改变如果子句,下面粘贴容纳端口信息,帮我联系。

if (!empty($this->options['host']))
        {
            if(strpos($this->options['host'] ,":" )!== false){
                $host_p = explode(':' , $this->options['host']);
                if(count($host_p) == 2){
                    $host = $host_p[0];
                    $port = $host_p[1];
                    $dsn .= "host={$host} port={$port} ";
                }else{
                $dsn .= "host={$this->options['host']} ";
            }               

            }
            else{
                $dsn .= "host={$this->options['host']} ";
            }           

        }
$dsn .= "dbname={$this->options['database']} user={$this->options['user']} password={$this->options['password']}";//left as is 



© www.soinside.com 2019 - 2024. All rights reserved.