In my case, it was only happening in HTTP (HTTPS was ok), but I was needing HTTP for local use (without my domain https name). My config.php was like this:
‘trusted_domains’ =>
array (
0 => ‘192.168.1.170:8000’,
1 => ‘192.168.1.170:8443’,
2 => ‘mydomain.com:443’
And I solved it by removing repeated domain (with different port):
‘trusted_domains’ =>
array (
0 => ‘192.168.1.170’,
1 => ‘mydomain.com’
In fact, it seems that putting more than one domain with different port causes unexpected troubles, so it’s better to authorize the full domain without ports.
thanks for posting this additional information / workaround.
The configuration setting is called “trusted_domains” and to my knowledge a port isn’t part of a domain so it might be expected that you don’t need to add a port there.
I received this ‘error’ today after having upgraded OC yesterday to latest version. I am running on VPS with Apache 2.4.x and php 7.2. In my case it was the cookie setting in Apache(!) which was causing this behaviour. My OC install is accessed using HTTP and I had just edited my Apache global config to always set secure cookies. And boom I couldn’t log into my OC with this message of taking too long. When I removed the ‘secure’ option in my Apache cookie setting it worked again.
nice that you have found this mis-configuration in your webserver.
From what i know the “secure” cookie disallows the transmission of this cookie over insecure HTTP connections. I’m not sure if a developer of ownCloud can do much about this.
For what it’s worth for future reference, my situation:
Intention: Upgrade from PHP 7.0 to PHP 7.2 with no other changes (no owncloud upgrades at the same time, to help ensure that any faults are isolated only to the PHP update)
Solution: My server logs gave me the following gripe: “message”:"Unknown: POST Content-Length of 127 bytes exceeds the limit of 2 bytes at Unknown#0
Which led me to update my php.ini file with huge limits on max_execution_time, max_input_time, memory_limit, post_max_size and one other.
This didn’t work.
I then create a quick php info file
<?php
phpinfo();
?>
and find there’s an owncloud config file that I didn’t know about (didn’t remember): /etc/php.d/owncloud.ini
I update the two values in here to a suitable format (I had GB instead of just G after the numbers, must have been OK in old PHP version) and that fixes my issue. Restart httpd service each change of course.
Probably an old post but, In my case was that there was no space left on server so PHP could not create the session file (sort of the same with the session files broken or read only)