Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/postgresql/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/joomla/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用Postgresql 9.3安装Joomla 3.1_Postgresql_Joomla - Fatal编程技术网

使用Postgresql 9.3安装Joomla 3.1

使用Postgresql 9.3安装Joomla 3.1,postgresql,joomla,Postgresql,Joomla,我就是不能让它工作,我总是得到:错误连接到PGSQL数据库 我已经安装并运行了PGSQL数据库,并且安装了通过PostgreSQL安装的php服务器。非常感谢您的帮助。我在同一问题上寻找帮助时遇到了这个答案,我得到的最多的帮助就是这个答案。此后,我打开Joomla core并确定他们的postgresql驱动程序中没有主机:端口拆分 因此,hacking INSTALL_PATH/libraries/joomla/database/driver/postgresql.php第126行,并通过将i

我就是不能让它工作,我总是得到:错误连接到PGSQL数据库


我已经安装并运行了PGSQL数据库,并且安装了通过PostgreSQL安装的php服务器。非常感谢您的帮助。

我在同一问题上寻找帮助时遇到了这个答案,我得到的最多的帮助就是这个答案。此后,我打开Joomla core并确定他们的postgresql驱动程序中没有主机:端口拆分

因此,hacking INSTALL_PATH/libraries/joomla/database/driver/postgresql.php第126行,并通过将if子句更改为下面粘贴的内容来适应端口信息,help me connect

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 




您是否在configuration.php中输入了正确的数据库详细信息?特雷读到:我非常确定我输入的所有信息都是正确的。我甚至没有进入配置,因为这个错误显示在安装阶段。我在网上搜索了很多,没有任何建议是有帮助的,我做了你提供的链接中所述的所有事情。这是本地服务器吗?只有本地主机,我尝试了使用带有正确端口的localhost,127.0.0.1。我100%确信postgresql server已启动并正在运行,用户名和密码正确无误。这可能是客户端身份验证的问题。您的数据库主机名是“localhost”吗?在pg_hba.conf中将本地用户的身份验证方法更改为“信任”,重新启动pgsql服务并检查连接是否成功。。。