You are not logged in.

#1 2016-08-02 15:33:09

mouseman
Member
From: Outta nowhere
Registered: 2014-04-04
Posts: 291

[solved] Problem with ownCloud

I followed the wiki for all the requirements and double checked all settings, but when I access the page at http://localhost/owncloud, it throws me a HTTP ERROR 500:

The localhost page isn’t working

localhost is currently unable to handle this request.
HTTP ERROR 500

I traced the problem to the step adding the line:

Include conf/extra/owncloud.conf

to httpd.conf. When I remove it, apache serves pages from /srv/http again.

The contents of owncloud.conf:

$ cat extra/owncloud.conf 
<IfModule mod_alias.c>
    Alias /owncloud /usr/share/webapps/owncloud/
</IfModule>

<Directory /usr/share/webapps/owncloud/>
    Options FollowSymlinks
    AllowOverride all
    Require all granted
    php_admin_value open_basedir "/srv/http/:/dev/urandom:/tmp/:/usr/share/pear/:/usr/share/webapps/owncloud/:/etc/webapps/owncloud"
</Directory>

<VirtualHost *:80>
    ServerAdmin foo@foofarm.com
    DocumentRoot /usr/share/webapps/owncloud
    ServerName owncloud.foo.com
    ErrorLog /var/log/httpd/owncloud.foo.info-error_log
    CustomLog /var/log/httpd/owncloud.foo.info-access_log common
</VirtualHost>

The contents of /var/log/httpd/owncloud.foo.info-error_log:

[Tue Aug 02 11:58:15.216774 2016] [:error] [pid 20883] [client ::1:60684] PHP Fatal error:  Uncaught Error: Call to a me
mber function getLogger() on null in /usr/share/webapps/owncloud/index.php:57\nStack trace:\n#0 {main}\n  thrown in /usr
/share/webapps/owncloud/index.php on line 57
[Tue Aug 02 12:02:43.491771 2016] [:error] [pid 20884] [client ::1:33150] PHP Fatal error:  Uncaught Error: Call to a me
mber function getLogger() on null in /usr/share/webapps/owncloud/index.php:57\nStack trace:\n#0 {main}\n  thrown in /usr
/share/webapps/owncloud/index.php on line 57
[Tue Aug 02 12:03:28.024268 2016] [:error] [pid 20885] [client 192.168.2.26:40784] PHP Fatal error:  Uncaught Error: Cal
l to a member function getLogger() on null in /usr/share/webapps/owncloud/index.php:57\nStack trace:\n#0 {main}\n  throw
n in /usr/share/webapps/owncloud/index.php on line 57
[Tue Aug 02 16:43:51.732017 2016] [:error] [pid 1284] [client ::1:59954] PHP Fatal error:  Uncaught Error: Call to a mem
ber function getLogger() on null in /usr/share/webapps/owncloud/index.php:57\nStack trace:\n#0 {main}\n  thrown in /usr/
share/webapps/owncloud/index.php on line 57
[Tue Aug 02 16:43:59.191150 2016] [:error] [pid 1285] [client ::1:60114] PHP Fatal error:  Uncaught Error: Call to a mem
ber function getLogger() on null in /usr/share/webapps/owncloud/index.php:57\nStack trace:\n#0 {main}\n  thrown in /usr/
share/webapps/owncloud/index.php on line 57
[Tue Aug 02 16:44:03.897170 2016] [:error] [pid 1286] [client ::1:60118] PHP Fatal error:  Uncaught Error: Call to a mem
ber function getLogger() on null in /usr/share/webapps/owncloud/index.php:57\nStack trace:\n#0 {main}\n  thrown in /usr/
share/webapps/owncloud/index.php on line 57
[Tue Aug 02 16:44:28.773675 2016] [:error] [pid 1287] [client ::1:60198] script '/usr/share/webapps/owncloud/test.php' n
ot found or unable to stat
[Tue Aug 02 17:25:53.777864 2016] [:error] [pid 15224] [client ::1:37664] PHP Fatal error:  Uncaught Error: Call to a me
mber function getLogger() on null in /usr/share/webapps/owncloud/index.php:57\nStack trace:\n#0 {main}\n  thrown in /usr
/share/webapps/owncloud/index.php on line 57
[Tue Aug 02 17:26:16.980207 2016] [:error] [pid 15225] [client ::1:37714] PHP Fatal error:  Uncaught Error: Call to a me
mber function getLogger() on null in /usr/share/webapps/owncloud/index.php:57\nStack trace:\n#0 {main}\n  thrown in /usr
/share/webapps/owncloud/index.php on line 57
[Tue Aug 02 17:26:17.172216 2016] [:error] [pid 15226] [client ::1:37716] PHP Fatal error:  Uncaught Error: Call to a me
mber function getLogger() on null in /usr/share/webapps/owncloud/index.php:57\nStack trace:\n#0 {main}\n  thrown in /usr
/share/webapps/owncloud/index.php on line 57
[Tue Aug 02 17:26:17.340545 2016] [:error] [pid 15227] [client ::1:37718] PHP Fatal error:  Uncaught Error: Call to a me
mber function getLogger() on null in /usr/share/webapps/owncloud/index.php:57\nStack trace:\n#0 {main}\n  thrown in /usr
/share/webapps/owncloud/index.php on line 57
[Tue Aug 02 17:26:17.493423 2016] [:error] [pid 15228] [client ::1:37720] PHP Fatal error:  Uncaught Error: Call to a me
mber function getLogger() on null in /usr/share/webapps/owncloud/index.php:57\nStack trace:\n#0 {main}\n  thrown in /usr
/share/webapps/owncloud/index.php on line 57
[Tue Aug 02 17:26:17.652661 2016] [:error] [pid 15224] [client ::1:37722] PHP Fatal error:  Uncaught Error: Call to a me
mber function getLogger() on null in /usr/share/webapps/owncloud/index.php:57\nStack trace:\n#0 {main}\n  thrown in /usr
/share/webapps/owncloud/index.php on line 57

I'm afraid my skills with apache/php is kinda low and I'm at a loss. I tried googling (parts of) the error messages from that log but it's getting me nowhere.

If anyone can help me out here I'd appreciate it!
Thanks!

Last edited by mouseman (2016-08-03 06:56:03)

Offline

#2 2016-08-02 16:28:22

damjan
Member
Registered: 2006-05-30
Posts: 452

Re: [solved] Problem with ownCloud

do you have the /usr/share/webapps/owncloud/lib/base.php file? correct permissions?
check pacman -Qkk owncloud

Offline

#3 2016-08-02 16:36:50

mouseman
Member
From: Outta nowhere
Registered: 2014-04-04
Posts: 291

Re: [solved] Problem with ownCloud

Thanks.

No, they are not. That might have to do with the permissions script from the wiki?

ps. I removed/reinstalled and checked the permissions with pacman -Qkk owncloud, and permissions are now default.

It is still giving the error.

Last edited by mouseman (2016-08-02 16:39:08)

Offline

#4 2016-08-02 17:56:31

mouseman
Member
From: Outta nowhere
Registered: 2014-04-04
Posts: 291

Re: [solved] Problem with ownCloud

Well I don't know ... when I ran the upgrade command:

sudo -u http /usr/share/webapps/owncloud/occ upgrade

It complained about memcached. I installed it, enabled it via systemctl enable & start and enabled the php module.

Next the command complained about paths not existing, all referring to /var/www/owncloud, while default it installs in /usr/share/webapps/owncloud.

I searched for and replaced all references to /var/www/owncloud in and /usr/share/webapps/owncloud/config with /usr/share/webapps/owncloud and restarted httpd.

Now I am getting a webpage at localhost/owncloud, but it says :

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.

Technical details
Remote Address: ::1
Request ID: Rds/uXmwjxxNe+n+tkk7

Offline

#5 2016-08-03 06:55:37

mouseman
Member
From: Outta nowhere
Registered: 2014-04-04
Posts: 291

Re: [solved] Problem with ownCloud

I reverted a snapshot (root is on zfs)  and tried again. This time I skipped the optionals, such as the security script. It is working now, so I can look at the security and caching.

I see I made several mistakes the first time around, so consider it fixed.

Offline

#6 2016-09-23 16:21:31

nicktheradiovosht
Member
Registered: 2016-09-23
Posts: 1

Re: [solved] Problem with ownCloud

I am having the same problem (as yet still unsolved!) but I have traced it down in my case to an issue with PHP, Apache. Whenever, I add any string containing '/etc' to the PHP open_basdir variable in php.ini or httpd.conf or its Included files I get the Server error 500. This in turn causes the standard Arch owncloud setup to fail as it relies on moving the config to /etc using a sym-link via apache which seems to be broken. I've notes that sym-links in apache work in some circumstances. I realise that giving a web server access to /etc is not a sensible thing from a security point of view. But in Linux, putting config in /etc is natural.
I tried moving the config directory and content to the /usr/share/webapps/owncloud location but that also seemed to fail but I'll test it again having deepened my understanding of what seems wrong in open_basedir. My first guess is that owncloud uses both locations somewhere which might explain why it fails to work when the symlink is replaced.
By the way, to change the ownership of the symlink to http using chown, the security strengthening script is wrong. You need a -h parameter to prevent dereferencing of the symlink so it itself is changed. Otherwise it is left as root:http instead of http:http.

Does anybody have a working clean solution or think they fully understand this rather than just having hacked a way around?

Thanks in advance...

Offline

Board footer

Powered by FluxBB