[How-To] ownCloud using NGINX, PHP-FPM, and MySQL

Maturola

Explorer
Joined
Jun 26, 2014
Messages
85
Hi Guys, I need some guidance.

I followed Johs's Guide couple of years ago and my owncloud server been running pretty well, I would like to upgrade to the current version (or maybe even moving to nextcloud 12) but there is so much information in this thread that it is really hard to follow. I tried many things and I cannot still get it working.

* I tried following the guide again and installing Nextcloud but all i get the the browser trying to download index.php.
* tried just upgrading Owncloud 10 and i get a millions error the moment I click "finish" on the webui, most of them related to "app" and something about mayor upgrades/downgrades
* tried installing nextcloud on a FreeNAS 11 VM (Ubuntu server) and that seems to work, but I haven;t still figure out how to give the VM "clean" access to the data files from the old Owncloud installation.

Putting aside all the efforts I had done, starting with my current instance {8.2.0 (stable) } ...

What's the most effective way to upgrade my current owncloud installation? (Installed using Josh's guide, which uses nginx).

Thanks
 
Last edited by a moderator:

Michael Sparks

Explorer
Joined
Apr 23, 2014
Messages
56
Built a fresh install of nextcloud 12 using this guide, ran SSLlabs report and found this "This server is vulnerable to the OpenSSL Padding Oracle vulnerability (CVE-2016-2107) and insecure. Grade set to F."

Any idea how to patch that, I've searched for 2 hours with a couple of failed attempts :(
 

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,977
Install openssl from ports.
 

ArgaWoW

Patron
Joined
Jul 4, 2015
Messages
444
Hello,

I have run nextcloud for month with ssl securty and I followed this how-to for the setup. Now i have setup a reverse proxy according to this tread
https://forums.freenas.org/index.ph...your-jails-w-certbot.49876/page-3#post-394188

and i am able to connect to nextcloud without problems. But with the desktop sync client i have some strange issues. On yesterday i got this error:

https://mydomain.eu/nextcloud/remote.php/dav/uploads/klimaflex/986169483/00000000 - server replied: Request Entity Too Large

I have solved it by deleting the complete synchronisation and start from begin. No more errors like this.

Since today I get the following error:

Das Element ist aufgrund vorheriger Fehler nicht synchronisiert: Error transferring https://mydomain.eu/nextcloud/remot...38_muellerGlas_205368_Bauer_Stirni(KF25E).dwg - server replied: Internal Server Error (An exception occurred while executing 'INSERT INTO `oc_filecache` (`mimepart`,`mimetype`,`mtime`,`size`,`etag`,`storage_mtime`,`permissions`,`parent`,`checksum`,`path_hash`,`path`,`name`,`storage`) SELECT ?,?,?,?,?,?,?,?,?,?,?,?,? FROM `oc_filecache` WHERE `storage` = ? AND `path_hash` = ? HAVING COUNT(*) = 0' with params ["3", "8", 1500355962, 314920, "defb189c0c419302031729edfb962fbc", 1500355962, 27, 857197, "", "c07d0e19ba178eb6b426f9290dbf0a8b", "files\/Daten\/CAD-Daten\/Auftr\u00e4ge\/OBJEKTE-2017\/123038_mobileGlas_205368_Br\u00e4ndli_Stirnimann(KF25E).dwg", "123038_muellerGlas_205368_Br\u00e4ndli_Stirni(KF25E).dwg", 20, 20, "c07d0e19ba178eb6b426f9290dbf0a8b"]:
SQLSTATE[HY000]: General error: 2006 MySQL server has gone away)

I really hope someone can help to solve this. I like the new setup including the proxy and would stay this way.

Thanks a lot for you help :)
 

ArgaWoW

Patron
Joined
Jul 4, 2015
Messages
444
Hello,

I have run nextcloud for month with ssl securty and I followed this how-to for the setup. Now i have setup a reverse proxy according to this tread
https://forums.freenas.org/index.ph...your-jails-w-certbot.49876/page-3#post-394188

and i am able to connect to nextcloud without problems. But with the desktop sync client i have some strange issues. On yesterday i got this error:

https://mydomain.eu/nextcloud/remote.php/dav/uploads/klimaflex/986169483/00000000 - server replied: Request Entity Too Large

I have solved it by deleting the complete synchronisation and start from begin. No more errors like this.

Since today I get the following error:

Das Element ist aufgrund vorheriger Fehler nicht synchronisiert: Error transferring https://mydomain.eu/nextcloud/remot...38_muellerGlas_205368_Bauer_Stirni(KF25E).dwg - server replied: Internal Server Error (An exception occurred while executing 'INSERT INTO `oc_filecache` (`mimepart`,`mimetype`,`mtime`,`size`,`etag`,`storage_mtime`,`permissions`,`parent`,`checksum`,`path_hash`,`path`,`name`,`storage`) SELECT ?,?,?,?,?,?,?,?,?,?,?,?,? FROM `oc_filecache` WHERE `storage` = ? AND `path_hash` = ? HAVING COUNT(*) = 0' with params ["3", "8", 1500355962, 314920, "defb189c0c419302031729edfb962fbc", 1500355962, 27, 857197, "", "c07d0e19ba178eb6b426f9290dbf0a8b", "files\/Daten\/CAD-Daten\/Auftr\u00e4ge\/OBJEKTE-2017\/123038_mobileGlas_205368_Br\u00e4ndli_Stirnimann(KF25E).dwg", "123038_muellerGlas_205368_Br\u00e4ndli_Stirni(KF25E).dwg", 20, 20, "c07d0e19ba178eb6b426f9290dbf0a8b"]:
SQLSTATE[HY000]: General error: 2006 MySQL server has gone away)

I really hope someone can help to solve this. I like the new setup including the proxy and would stay this way.

Thanks a lot for you help :)
Can no one help me with this issue?

Come on guys

Update:

found the solution by adding

client_body_in_file_only clean;
client_body_buffer_size 32K;

# set max upload size
client_max_body_size 4000M;

into the nginx.conf of the proxy and nextcloud. Do someone know how to solve this error on the admin page (sorry for postion in german)

Code:
  • Der „X-XSS-Protection“-HTTP-Header ist nicht so konfiguriert, dass er „1; mode=block“ entspricht. Dies ist ein potentielles Sicherheitsrisiko und es wird empfohlen, diese Einstellung zu ändern.
  • Der „X-Content-Type-Options“-HTTP-Header ist nicht so konfiguriert, dass er „nosniff“ entspricht. Dies ist ein potentielles Sicherheitsrisiko und es wird empfohlen, diese Einstellung zu ändern.
  • Der „X-Robots-Tag“-HTTP-Header ist nicht so konfiguriert, dass er „none“ entspricht. Dies ist ein potentielles Sicherheitsrisiko und es wird empfohlen, diese Einstellung zu ändern.
  • Der „X-Frame-Options“-HTTP-Header ist nicht so konfiguriert, dass er „SAMEORIGIN“ entspricht. Dies ist ein potentielles Sicherheitsrisiko und es wird empfohlen, diese Einstellung zu ändern.
  • Der „X-Download-Options“-HTTP-Header ist nicht so konfiguriert, dass er „noopen“ entspricht. Dies ist ein potentielles Sicherheitsrisiko und es wird empfohlen, diese Einstellung zu ändern.
  • Der „X-Permitted-Cross-Domain-Policies“-HTTP-Header ist nicht so konfiguriert, dass er „none“ entspricht. Dies ist ein potentielles Sicherheitsrisiko und es wird empfohlen, diese Einstellung zu ändern.

in my nginx.conf of the proxy and nextcloud I have the following:

Code:
	   add_header X-Xss-Protection "1; mode=block" always;
	   add_header X-Content-Type-Options "nosniff" always;
	   add_header Strict-Transport-Security "max-age=2592000; includeSubdomains" always;
	   add_header X-Frame-Options "SAMEORIGIN" always;
	   proxy_hide_header X-Powered-By;
	   add_header 'Referrer-Policy' 'no-referrer';
	   add_header Content-Security-Policy "frame-ancestors mydomain.eu;";



thanks for reply
 
Last edited:

DigitalShadow

Dabbler
Joined
Apr 13, 2017
Messages
24
Can anyone help...

I ran a pkg update, that must be the cause...

NextCloud 12, FreeNAS-9.10.2-U5

Code:
Internal Server Error

The server encountered an internal error and was unable to complete your request.
Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report.
More details can be found in the server log.


Code:
2017/07/22 23:47:34 [error] 4504#102678: *15509 upstream timed out (60: Operation timed out) while reading response header from ups$
2017/07/23 00:21:32 [error] 4503#102690: *20103 upstream timed out (60: Operation timed out) while sending request to upstream, cli$
2017/07/23 00:22:41 [error] 4503#102690: *20150 upstream timed out (60: Operation timed out) while sending request to upstream, cli$
2017/07/23 00:40:52 [error] 4504#102678: *19379 connect() to unix:/var/run/php-fpm.sock failed (61: Connection refused) while conne$
2017/07/23 00:40:52 [error] 4504#102678: *19379 connect() to unix:/var/run/php-fpm.sock failed (61: Connection refused) while conne$
2017/07/23 00:40:56 [error] 4504#102678: *19379 connect() to unix:/var/run/php-fpm.sock failed (61: Connection refused) while conne$
2017/07/23 00:40:56 [error] 4504#102678: *19379 connect() to unix:/var/run/php-fpm.sock failed (61: Connection refused) while conne$
2017/07/23 00:40:56 [error] 4504#102678: *20926 connect() to unix:/var/run/php-fpm.sock failed (61: Connection refused) while conne$
2017/07/23 00:40:58 [error] 4504#102678: *21514 connect() to unix:/var/run/php-fpm.sock failed (61: Connection refused) while conne$
2017/07/23 00:41:00 [error] 4504#102678: *19379 connect() to unix:/var/run/php-fpm.sock failed (61: Connection refused) while conne$
2017/07/23 00:41:00 [error] 4504#102678: *19379 connect() to unix:/var/run/php-fpm.sock failed (61: Connection refused) while conne$
2017/07/23 00:41:00 [error] 4504#102678: *19379 connect() to unix:/var/run/php-fpm.sock failed (61: Connection refused) while conne$
2017/07/23 00:41:00 [error] 4504#102678: *19379 connect() to unix:/var/run/php-fpm.sock failed (61: Connection refused) while conne$
2017/07/23 00:41:06 [error] 4504#102678: *19379 connect() to unix:/var/run/php-fpm.sock failed (61: Connection refused) while conne$
2017/07/23 00:41:06 [error] 4504#102678: *20926 connect() to unix:/var/run/php-fpm.sock failed (61: Connection refused) while conne$
2017/07/23 00:41:06 [error] 4504#102678: *20926 connect() to unix:/var/run/php-fpm.sock failed (61: Connection refused) while conne$
2017/07/23 00:41:07 [error] 4504#102678: *19379 connect() to unix:/var/run/php-fpm.sock failed (61: Connection refused) while conne$
2017/07/23 00:41:07 [error] 4504#102678: *19379 connect() to unix:/var/run/php-fpm.sock failed (61: Connection refused) while conne$
2017/07/23 00:41:11 [error] 4504#102678: *19379 connect() to unix:/var/run/php-fpm.sock failed (61: Connection refused) while conne$
2017/07/23 00:41:11 [error] 4504#102678: *19379 connect() to unix:/var/run/php-fpm.sock failed (61: Connection refused) while conne$
2017/07/23 00:41:12 [error] 4504#102678: *19379 connect() to unix:/var/run/php-fpm.sock failed (61: Connection refused) while conne$
2017/07/23 00:41:12 [error] 4504#102678: *19379 connect() to unix:/var/run/php-fpm.sock failed (61: Connection refused) while conne$
2017/07/23 00:41:15 [error] 4504#102678: *21529 connect() to unix:/var/run/php-fpm.sock failed (61: Connection refused) while conne$
2017/07/23 00:41:17 [error] 4504#102678: *20926 connect() to unix:/var/run/php-fpm.sock failed (61: Connection refused) while conne$
2017/07/23 00:41:17 [error] 4504#102678: *20926 connect() to unix:/var/run/php-fpm.sock failed (61: Connection refused) while conne$
2017/07/23 00:41:17 [error] 4504#102678: *20926 connect() to unix:/var/run/php-fpm.sock failed (61: Connection refused) while conne$
2017/07/23 00:41:18 [error] 4504#102678: *19379 connect() to unix:/var/run/php-fpm.sock failed (61: Connection refused) while conne$
2017/07/23 00:41:18 [error] 4504#102678: *19379 connect() to unix:/var/run/php-fpm.sock failed (61: Connection refused) while conne$
2017/07/23 00:41:18 [error] 4504#102678: *19379 connect() to unix:/var/run/php-fpm.sock failed (61: Connection refused) while conne$
2017/07/23 00:41:18 [error] 4504#102678: *19379 connect() to unix:/var/run/php-fpm.sock failed (61: Connection refused) while conne$
2017/07/23 00:41:18 [error] 4504#102678: *19379 connect() to unix:/var/run/php-fpm.sock failed (61: Connection refused) while conne$
2017/07/23 00:41:18 [error] 4504#102678: *19379 connect() to unix:/var/run/php-fpm.sock failed (61: Connection refused) while conne$
2017/07/23 00:41:22 [error] 4504#102678: *19379 connect() to unix:/var/run/php-fpm.sock failed (61: Connection refused) while conne$
2017/07/23 00:41:22 [error] 4504#102678: *19379 connect() to unix:/var/run/php-fpm.sock failed (61: Connection refused) while conne$






2017/07/23 00:41:38 [error] 4504#102678: *20926 connect() to unix:/var/run/php-fpm.sock failed (61: Connection refused) while conne$
2017/07/23 00:41:38 [error] 4504#102678: *19379 connect() to unix:/var/run/php-fpm.sock failed (61: Connection refused) while conne$
2017/07/23 00:41:38 [error] 4504#102678: *19379 connect() to unix:/var/run/php-fpm.sock failed (61: Connection refused) while conne$
2017/07/23 00:41:38 [error] 4504#102678: *19379 connect() to unix:/var/run/php-fpm.sock failed (61: Connection refused) while conne$
2017/07/23 00:41:38 [error] 4504#102678: *19379 connect() to unix:/var/run/php-fpm.sock failed (61: Connection refused) while conne$
2017/07/23 00:41:38 [error] 4504#102678: *19379 connect() to unix:/var/run/php-fpm.sock failed (61: Connection refused) while conne$
2017/07/23 00:41:38 [error] 4504#102678: *19379 connect() to unix:/var/run/php-fpm.sock failed (61: Connection refused) while conne$
2017/07/23 00:41:38 [error] 4504#102678: *19379 connect() to unix:/var/run/php-fpm.sock failed (61: Connection refused) while conne$
2017/07/23 00:41:39 [error] 4504#102678: *19379 connect() to unix:/var/run/php-fpm.sock failed (61: Connection refused) while conne$
2017/07/23 00:41:39 [error] 4504#102678: *19379 connect() to unix:/var/run/php-fpm.sock failed (61: Connection refused) while conne$
2017/07/23 00:41:39 [error] 4504#102678: *19379 connect() to unix:/var/run/php-fpm.sock failed (61: Connection refused) while conne$
2017/07/23 00:42:48 [error] 4504#102678: *20926 upstream timed out (60: Operation timed out) while sending request to upstream, cli$
2017/07/23 00:44:00 [error] 30798#102655: *1 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught Doctrine\DBAL\DBALExc$
Stack trace:																														
#0 /usr/local/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(429): OC\DB\Connection->connect()			
#1 /usr/local/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(389): Doctrine\DBAL\Connection->getDatabasePlat$
#2 /usr/local/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(328): Doctrine\DBAL\Connection->detectDatabaseP$
#3 /usr/local/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(623): Doctrine\DBAL\Connection->getDatabasePlat$
#4 /usr/local/www/nextcloud/lib/private/DB/Connection.php(148): Doctrine\DBAL\Connection->setTransactionIsolation(2)				
#5 /usr/local/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DriverManager.php(172): OC\DB\Con...						
PHP message: PHP Fatal error:  Uncaught Doctrine\DBAL\DBALException: Failed to connect to the database: An exception occured in dri$
Stack trace:																														
#0 /usr/local/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(429): OC\DB\Connection->connect()			
#1 /usr/local/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(389): Doctrine\DBAL\Connection->getDatabasePlat$
#2 /usr/local/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(328): Doctrine\DBAL\Connection->detectDatabaseP$
#3 /usr/local/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(623): Doctrine\DBAL\Connection->getDatabasePlat$
#4 /usr/local/www/nextcloud/lib/private/DB/Connection.php(148): Doctrine\DBAL\Connection->setTransactionIsolation(2)				
#5 /usr/local/www/nextcloud/3rdpart																								
2017/07/23 00:44:53 [error] 30798#102655: *1 upstream timed out (60: Operation timed out) while sending request to upstream, client$
2017/07/23 00:44:53 [error] 30798#102655: *1 upstream timed out (60: Operation timed out) while sending request to upstream, client$
2017/07/23 00:46:17 [error] 33188#102781: *12 upstream timed out (60: Operation timed out) while sending request to upstream, clien$
2017/07/23 00:46:31 [error] 33188#102781: *59 upstream timed out (60: Operation timed out) while reading response header from upstr$
2017/07/23 00:51:25 [error] 4505#102716: *26 upstream timed out (60: Operation timed out) while reading response header from upstre$
2017/07/23 00:52:25 [error] 4505#102716: *26 upstream timed out (60: Operation timed out) while reading response header from upstre$
2017/07/23 00:54:07 [error] 4505#102716: *4 upstream prematurely closed connection while reading response header from upstream, cli$
2017/07/23 00:54:07 [error] 4505#102716: *4 upstream prematurely closed connection while reading response header from upstream, cli$
2017/07/23 00:54:07 [error] 4505#102716: *4 upstream prematurely closed connection while reading response header from upstream, cli$
2017/07/23 00:54:07 [error] 4505#102716: *4 upstream prematurely closed connection while reading response header from upstream, cli$
2017/07/23 00:54:07 [alert] 4505#102716: *40 kevent() reported about an closed connection (53: Software caused connection abort) wh$
2017/07/23 00:54:07 [alert] 4506#102686: *112 kevent() reported about an closed connection (53: Software caused connection abort) w$
2017/07/23 00:54:07 [alert] 4505#102716: *40 kevent() reported about an closed connection (53: Software caused connection abort) wh$
2017/07/23 00:54:07 [alert] 4505#102716: *40 kevent() reported about an closed connection (53: Software caused connection abort) wh$
2017/07/23 00:54:07 [alert] 4505#102716: *40 kevent() reported about an closed connection (53: Software caused connection abort) wh$
2017/07/23 00:54:07 [alert] 4505#102716: *4 kevent() reported about an closed connection (53: Software caused connection abort) whi$
2017/07/23 00:54:07 [alert] 4505#102716: *4 kevent() reported about an closed connection (53: Software caused connection abort) whi$

2017/07/23 01:03:43 [error] 11778#102155: *237 upstream prematurely closed connection while reading response header from upstream, $
2017/07/23 01:03:43 [error] 11778#102155: *237 upstream prematurely closed connection while reading response header from upstream, $
2017/07/23 01:03:43 [error] 11778#102155: *237 upstream prematurely closed connection while reading response header from upstream, $
2017/07/23 01:03:43 [error] 11778#102155: *237 upstream prematurely closed connection while reading response header from upstream, $
2017/07/23 01:03:43 [alert] 11778#102155: *237 kevent() reported about an closed connection (53: Software caused connection abort) $
2017/07/23 01:03:43 [alert] 11777#100702: *14 kevent() reported about an closed connection (53: Software caused connection abort) w$
2017/07/23 01:03:43 [alert] 11778#102155: *237 kevent() reported about an closed connection (53: Software caused connection abort) $
2017/07/23 01:03:43 [alert] 11778#102155: *237 kevent() reported about an closed connection (53: Software caused connection abort) $
2017/07/23 01:03:43 [alert] 11777#100702: *14 kevent() reported about an closed connection (53: Software caused connection abort) w$
2017/07/23 01:03:43 [alert] 11777#100702: *14 kevent() reported about an closed connection (53: Software caused connection abort) w$
2017/07/23 01:03:43 [alert] 11778#102155: *237 kevent() reported about an closed connection (53: Software caused connection abort) $
2017/07/23 01:03:43 [alert] 11778#102155: *237 kevent() reported about an closed connection (53: Software caused connection abort) $
2017/07/23 01:03:43 [alert] 11778#102155: *237 kevent() reported about an closed connection (53: Software caused connection abort) $
2017/07/23 01:03:43 [alert] 11778#102155: *260 kevent() reported about an closed connection (53: Software caused connection abort) $
2017/07/23 01:03:43 [alert] 11778#102155: *265 kevent() reported about an closed connection (53: Software caused connection abort) $
2017/07/23 01:04:47 [error] 11778#102155: *277 upstream timed out (60: Operation timed out) while sending request to upstream, clie$
2017/07/23 01:04:47 [error] 11778#102155: *277 upstream timed out (60: Operation timed out) while sending request to upstream, clie$
2017/07/23 01:04:47 [error] 11778#102155: *277 upstream timed out (60: Operation timed out) while sending request to upstream, clie$
2017/07/23 01:11:05 [error] 11777#100702: *14 connect() to unix:/var/run/php-fpm.sock failed (61: Connection refused) while connect$
2017/07/23 01:12:17 [error] 11777#100702: *538 upstream timed out (60: Operation timed out) while reading response header from upst$
2017/07/23 01:13:17 [error] 11778#102155: *576 upstream timed out (60: Operation timed out) while sending request to upstream, clie$
2017/07/23 01:13:17 [error] 11778#102155: *576 upstream timed out (60: Operation timed out) while sending request to upstream, clie$
2017/07/23 01:17:44 [error] 11778#102155: *720 upstream timed out (60: Operation timed out) while reading response header from upst$
2017/07/23 01:18:44 [error] 11778#102155: *720 upstream timed out (60: Operation timed out) while reading response header from upst$
2017/07/23 01:25:23 [error] 17870#102178: *1 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught Doctrine\DBAL\DBALExc$
Stack trace:																														
#0 /usr/local/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(429): OC\DB\Connection->connect()			
#1 /usr/local/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(389): Doctrine\DBAL\Connection->getDatabasePlat$
#2 /usr/local/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(328): Doctrine\DBAL\Connection->detectDatabaseP$
#3 /usr/local/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(623): Doctrine\DBAL\Connection->getDatabasePlat$
#4 /usr/local/www/nextcloud/lib/private/DB/Connection.php(148): Doctrine\DBAL\Connection->setTransactionIsolation(2)				
#5 /usr/local/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DriverManager.php(172): OC\DB\Con...						
PHP message: PHP Fatal error:  Uncaught Doctrine\DBAL\DBALException: Failed to connect to the database: An exception occured in dri$
Stack trace:																														
#0 /usr/local/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(429): OC\DB\Connection->connect()			
#1 /usr/local/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(389): Doctrine\DBAL\Connection->getDatabasePlat$
#2 /usr/local/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(328): Doctrine\DBAL\Connection->detectDatabaseP$
#3 /usr/local/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(623): Doctrine\DBAL\Connection->getDatabasePlat$
#4 /usr/local/www/nextcloud/lib/private/DB/Connection.php(148): Doctrine\DBAL\Connection->setTransactionIsolation(2)				
#5 /usr/local/www/nextcloud/3rdpart																								
 
Last edited:

DigitalShadow

Dabbler
Joined
Apr 13, 2017
Messages
24
Code:
root@cloud:/ # php -m																											  
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20151012/redis.so' - /usr/local/lib/php/20151012/redis
.so: Undefined symbol "php_session_create_id" in Unknown on line 0																
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20151012/wddx.so' - /usr/local/lib/php/20151012/wddx.s
o: Undefined symbol "ps_globals" in Unknown on line 0  


Code:
root@cloud:/var/log/nginx # service php-fpm restart																				 
Performing sanity check on php-fpm configuration:																				   
[23-Jul-2017 02:08:39] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20151012/r
edis.so' - /usr/local/lib/php/20151012/redis.so: Undefined symbol "php_session_create_id" in Unknown on line 0			
[23-Jul-2017 02:08:39] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20151012/w
ddx.so' - /usr/local/lib/php/20151012/wddx.so: Undefined symbol "ps_globals" in Unknown on line 0						 
[23-Jul-2017 02:08:39] NOTICE: configuration file /usr/local/etc/php-fpm.conf test is successful									
																																	
Stopping php_fpm.																												   
Waiting for PIDS: 17860.																											
Performing sanity check on php-fpm configuration:																				   
[23-Jul-2017 02:08:39] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20151012/r
edis.so' - /usr/local/lib/php/20151012/redis.so: Undefined symbol "php_session_create_id" in Unknown on line 0			
[23-Jul-2017 02:08:39] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20151012/w
ddx.so' - /usr/local/lib/php/20151012/wddx.so: Undefined symbol "ps_globals" in Unknown on line 0						 
[23-Jul-2017 02:08:39] NOTICE: configuration file /usr/local/etc/php-fpm.conf test is successful									
																																	
Starting php_fpm.																												   
[23-Jul-2017 02:08:39] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20151012/r
edis.so' - /usr/local/lib/php/20151012/redis.so: Undefined symbol "php_session_create_id" in Unknown on line 0			
[23-Jul-2017 02:08:39] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20151012/w
ddx.so' - /usr/local/lib/php/20151012/wddx.so: Undefined symbol "ps_globals" in Unknown on line 0						 
root@cloud:/var/log/nginx #		 
 
Last edited:

DigitalShadow

Dabbler
Joined
Apr 13, 2017
Messages
24
Fixed it with

Code:
pkg install -f php70-bz2 php70-ctype php70-curl php70-dom php70-exif php70-fileinfo php70-filter php70-gd php70-hash php70-iconv php70-intl php70-json php70-mbstring php70-mcrypt php70-pdo_mysql php70-openssl php70-posix php70-session php70-simplexml php70-xml php70-xmlreader php70-xmlwriter php70-xsl php70-wddx php70-zip php70-zlib php70-opcache
portsnap fetch extract
make config-recursive install -C /usr/ports/databases/pecl-redis
make config-recursive install -C /usr/ports/devel/pecl-APCu
sysrc 'nginx_enable=YES' 'php_fpm_enable=YES' 'mysql_enable=YES' 'redis_enable=YES'
 

NasKar

Guru
Joined
Jan 8, 2016
Messages
739
I noticed that my nextcloud install was still at 11.3 and didn't say an upgrade was available so I manually upgraded to NC 12. After catching up on the thread I decided to fix the cache error in the adm panel by

portsnap fetch extract
make config-recursive install -C /usr/ports/databases/pecl-redis
make config-recursive install -C /usr/ports/devel/pecl-APCu
used all the default options
I added the
Code:
apc.enable_cli=1
to the php.ini and

su -m www -c 'php /usr/local/www/nextcloud/occ config:system:set memcache.local --value="\OC\Memcache\APCu"'
su -m www -c 'php /usr/local/www/nextcloud/occ config:system:set memcache.locking --value="\OC\Memcache\Redis"'
su -m www -c 'php /usr/local/www/nextcloud/occ config:system:set redis host --value="/tmp/redis.sock"'
su -m www -c 'php /usr/local/www/nextcloud/occ config:system:set redis port --value=0 --type=integer'

Now I get a 503 error when trying to access the https://IP/nextcloud
Not sure what to do to fix it.
 

NasKar

Guru
Joined
Jan 8, 2016
Messages
739
I decided to reinstall in a fresh jail and everything works. To get the original jail working I followed all the install directions except nginx and mariadb as they were already setup and now it works. Not sure what broke but I'm happy it works. Thanks for the great instructions Josh.
 

wxlsxn

Dabbler
Joined
May 19, 2017
Messages
29
I was able to work through the setup, twice actually for troubleshooting reasons, and cannot figure out what's going wrong.

My NextCloud is working but it keeps trying to authenticate me for changes e.g. adding an App or User. I noticed the time stamps are off by 3 hours and found another forum where users were having the same issue but corrected their NTP server. I've checked the jail and the FreeNAS box and both show the correct date/time, yet my file time stamps are also off by 3 hours on the jail...any ideas?? TIA

Additional info:
I used Putty to SSH into FreeNAS and then jexec JID csh into the jails userland.
I used FileZilla to download .conf/.ini files and re-upload them when done.
Used the version 12 installer for NextCloud.
 
Last edited:

Apollo

Wizard
Joined
Jun 13, 2013
Messages
1,458
Hi Wxlsxn,

It seems your php.ini file has the wrong time zone setup. Just a guess though.

date.timezone = America/Los_Angeles

Update based on your location.
 

wxlsxn

Dabbler
Joined
May 19, 2017
Messages
29
Hi Wxlsxn,

It seems your php.ini file has the wrong time zone setup. Just a guess though.

date.timezone = America/Los_Angeles

Update based on your location.
I've quadruple checked that option, I have mine set to "date.timezone = America/Detroit" and still no luck...This was happening on my first installation and figured I FUBAR'd something so I just scrapped the whole jail and restarted. Obviously that wasn't it.
 

Apollo

Wizard
Joined
Jun 13, 2013
Messages
1,458
Have you restarted the services for php.ini to be read?
 

Apollo

Wizard
Joined
Jun 13, 2013
Messages
1,458
Reading through "man date", jail time is based on Kernel time which means, I think, that the time in the jail will be the same as the time in Freenas and the rest of the system.
If you php.ini has the proper timezone, but the wrong time, I would suggest to look at your Freenas time zone.Maybe you don't have it setup correctly.
 

wxlsxn

Dabbler
Joined
May 19, 2017
Messages
29
Reading through "man date", jail time is based on Kernel time which means, I think, that the time in the jail will be the same as the time in Freenas and the rest of the system.
If you php.ini has the proper timezone, but the wrong time, I would suggest to look at your Freenas time zone.Maybe you don't have it setup correctly.
I've checked the jail and the FreeNAS box and both show the correct date/time. If I can't get it to work, I may just try a third time and go slower but I've meticulously gone through each step multiple times at this point. Can I ask, what link you referred to when grabbing the NextCloud release package?
 

Apollo

Wizard
Joined
Jun 13, 2013
Messages
1,458
I've checked the jail and the FreeNAS box and both show the correct date/time. If I can't get it to work, I may just try a third time and go slower but I've meticulously gone through each step multiple times at this point. Can I ask, what link you referred to when grabbing the NextCloud release package?
The link doesn't have any incidence on the time or date.
However, to get the proper link to the package, I usually go on the web at www.nextcloud.com and download the package there.
When the download is in progress or has been competed, you should be able to extract the address location of the file.
I use Firefox with DownThemall, and under "Download Information" the address with the entire link would be shown.
You just need to copy the link and use it to download from the jail.
 

wxlsxn

Dabbler
Joined
May 19, 2017
Messages
29
The link doesn't have any incidence on the time or date.
However, to get the proper link to the package, I usually go on the web at www.nextcloud.com and download the package there.
When the download is in progress or has been competed, you should be able to extract the address location of the file.
I use Firefox with DownThemall, and under "Download Information" the address with the entire link would be shown.
You just need to copy the link and use it to download from the jail.
I know it doesn't have anything to do with the time or date, but I wanted to be sure I didn't get a bum build or nightly etc.
Here's what I used as my source installation package for NextCloud 12:
Code:
fetch "https://download.nextcloud.com/server/releases/nextcloud-12.0.0.tar.bz2"
 
Top