Okay all I have tried to follow the instructions online for getting Postgresql to work with OwnCloud install but it still gives me the dreaded "PostgreSQL username and/or password not valid You need to enter either an existing account or the administrator."
I have installed:
Ubuntu 12.04LTS
Apache 2.2
PHP 5.3
PostgreSql 9.3
OwnCloud 6.0.3
My web server is hosted on an internal server at 192.168.1.11 and I have Postgresql running on port 3145.
Any tips on getting this to work with Postgresql... Here is my config.php file:
$CONFIG = array (
'instanceid' => 'oc57c67b8ac3',
'passwordsalt' => '07b04cab4ff3d074dc59fc3ef82650',
'trusted_domains' =>
array (
0 => 'www.example.com',
),
'datadirectory' => '/Cloud/owncloud/data',
'dbtype' => 'pgsql',
'version' => '6.0.3.1',
'dbname' => 'owncloud',
'dbuser' => 'cloudadm',
'dbpassword' => 'mypassword',
'dbhost' => '192.168.1.11:3145',
'dbtableprefix' => 'oc_',
);
Per #RandolphCarter -- when I upgraded to OwnCloud7.0 I was able to use the wizard, select the PostgreSQL option and enter [serverip]:[Postgresql port number] - e.g. -- 192.1.1.1:1118 and it worked with no problems. This is closed.
For some reason setup wizard searching localhost and found no IPv6 record in my pg_hba.conf After add this record it works.
host all all ::1/128 md5
or remove ::1 from /etc/hosts should be the same.
::1 localhost
Related
On a Nextcloud install I am receiving the error
No memory cache has been configured. To enhance performance, please configure a memcache, if available. Further information can be found in the documentation.
So I have installed APCu, Redis, redis-php and made the required settings in NCs config.php
'memcache.local' => '\OC\Memcache\APCu',
'memcache.locking' => '\OC\Memcache\Redis',
'memcache.distributed' => '\OC\Memcache\Redis',
'filelocking.enabled' => 'true',
'redis' =>
array (
'host' => '127.0.0.1',
'port' => '6379',
When I test the redis connection
redis-cli ping
I get a
PONG
(This works both w/ localhost and unix socket)
But Nextcloud obviously does not connect to Redis.
The http user is a member of the redis group.
php-redis module is activated.
Solved. The issue was with the location of the above code inside Nextcloud's config.php.
Now it is working as expected.
I'm running mariadb 10.2 in ubuntu 16.04. The mariadb will perform external authentication using freeipa (ldap+kerberos). I can connect mariadb server with mariadb client, using freeipa credential. Everything work as usual. The /etc/pam.d/mariadb as below:
auth required pam_unix.so
account required pam_unix.so
auth required pam_user_map.so
However, when I'm connect using php7 mysqli (command line or web), it return:
(
[affected_rows] =>
[client_info] =>
[client_version] => 50012
[connect_errno] => 2054
[connect_error] => The server requested authentication method unknown to the client
[errno] =>
[error] =>
[error_list] =>
[field_count] =>
[host_info] =>
[info] =>
[insert_id] =>
[server_info] =>
[server_version] =>
[stat] =>
[sqlstate] =>
[protocol_version] =>
[thread_id] =>
[warning_count] =>
)
From lot of research I'm notice that php mysql driver doesn't support PAM authentication well. There is online resources http://www.sheeri.org/ldap-with-auth_pam-and-php/ tell me that there is a way to overcome it, but it too rough. Can somebody tell me how to rebuild for ubuntu with libmariadbclient? I can't find /usr/bin/mysql_config anyway.
Thanks
I'd greatly simplified the solution, I'd create basic bash script for ubuntu. It will use default apache2/php/percona server/client by only override mysqli.so, pdo_mysql.so.
https://gist.github.com/kstan79/367ef928e44523904fb36b67a92decdd
i have a problem with yii and storing data in memcache. For my application i use system.caching.CMemCache and the following config:
'servers' => array(
'server1' => array('host' => 'localhost', 'port' => 11211, 'weight' => 50),
'server2' => array('host' => '192.168.0.2', 'port' => 11211, 'weight' => 50)
),
if memcache on both systems is running, everything is ok and the values get spread up on the servers. but if one server fails (or if i stop the memcache manually) the application throw errors like
MemcachePool::get(): Server 192.168.0.2 (tcp 11211, udp 0) failed with: Connection refused (111)
this isn't really nice, i thought if one server failed yii would choose another server for reading and writing or at least produce some cache misses and do not throw an exeption :(
is this normal or are there some configuration issues?
I think its normal you are seeing those messages as discussed here, given you are using memcache extension
And also read this SO.
There are two version of extension for php one is memcache while the other is memcached. You can install each of them on ubuntu box like :
sudo apt-get install php5-memcache
and
sudo apt-get install php5-memcached
Memecached extension handles failover situations ,as I read from the above links and confirm by testing following settings in yii
'cache'=>array(
'class'=>'CMemCache',
'useMemcached'=>true,
'servers'=>array(
array(
'host'=>'localhost',
'port'=>11211,
'weight'=>60,
),
array(
'host'=>'192.168.33.31',
'port'=>11211,
'weight'=>30,
),
),
),
Install the memcached extension for php as described above and add 'useMemcached'=>true, setting to cache configs.As I test on my localhost, it handles the failover situation, but the page response time drops significantly.
Hope this will be helpful.
Is this variable true?
http://www.php.net/manual/en/memcache.ini.php#ini.memcache.allow-failover
Otherwise this link can also be useful:
Memcache : Confusions
(Probably this is only a notice.)
I'm trying to connect to pgsql via laravel and finally got everything setup (pgsql server running, pdo installed, all libs installed). I'm running on a VPS (CentOS) managed via CPanel/WHM.
Here's what I'm doing:
I'm trying to create a user database via artisan (Laravel's command line) using migrate:install.
For those that don't use Laravel, artisan uses php's PDO for pgsql to connect. Here are my settings:
'pgsql' => array(
'driver' => 'pgsql',
'host' => 'localhost',
'database' => 'dbname',
'username' => 'username',
'password' => 'password',
'charset' => 'utf8',
'prefix' => '',
),
I've also setup a test.php file:
$dbconn = pg_connect("host=localhost port=5432 dbname=dbname user=username password=password");
which also fails. I used phpPgAdmin to see what's up and all of the permissions are set correctly, the database shows up, the username is correct, same with password. I checked where postgre (version 8.4.12 btw) was running and phpPgAdmin tells me "localhost:5432".
The error I get via the command line is the following:
SQLSTATE[08006] [7] FATAL: no pg_hba.conf entry for host "::1", user "myusername", database "my_database", SSL OFF
Now, I tried to find the pg_hba.conf file but I'm not entirely sure where to look for it. Same goes for the error/access logs for pg and google hasn't been any help as far as this goes.
Any idea on what I can do?
localhost points to IPV6 ::1 address on your system. Postgresql makes the difference between ipv6 and ipv4 addresses when dealing with access list.
I was able to install/configure everything correctly. I changed the "host" to 127.0.0.1, not sure why that made a difference but it did :)
we already have a Moodle installation working in this scenario: linux + php5 + freetds + sql server.
but we just can't figure out how to link drupal 7 to sql server in the same manner.
what configs should we use? anyone ever tried this?
drupal simply does not show up in the available databases list.
note: we are already able to connect php to sql server using freetds, but just can't figure out how to do this on Drupal 7.
You can't use sqlsrv module on Linux because it requires PDO_SQLSRV driver that works only on Windows (see this comment)
To use FreeTDS you will need to write a Drupal Database Driver by yourself (similar with sqlsrv). Or don't use the database abstraction layer at all and do the call by yourself inside your module (if you only need MS SQL for parts of you project.
The good news (I hope) is that you can install dblib driver (in Ubuntu: sudo apt-get install php5-mssql) and use the sandbox project. A little info regarding this sandbox projects you can find in author's comment here. How to use it in you settings.php file can be seen here.
dblib database support in Drupal is still experimental, so test it before using it.
No you can't, but you can use drupal odbc driver which works the same way but connect through odbc (https://www.drupal.org/sandbox/pstewart/2010758), all you have to do is to install it (including its server requirement) and change your configuration to something like this (tested on Drupal 7 on Ubuntu Server) :
'external' =>
array (
'default' =>
array (
'odbc_driver' => 'FreeTDS',
'database' => '',
'username' => '',
'password' => '',
'host' => '',
'port' => '1433',
'driver' => 'odbc',
'prefix' => ''
),
),