Re: [gentoo-user] trying to find the cause of an http 500 error

2017-05-05 Thread Rasmus Thomsen
Hi,

wrong permissions usually caused 500 errors for me, but I'm using 
nginx+php-fpm. I don't changing php's time limit would change something about 
your situation (especially considering that the first time setup always loaded 
pretty much instantly for me, even on a raspberry pi 2), unless you import 
massive amounts of new data (but I don't think you'd import that much (if any) 
data on your first setup ;)

Regards,
Rasmus

 Original Message 
On 5 May 2017, 16:37, John Covici wrote:

On Fri, 05 May 2017 10:25:21 -0400,
Rasmus Thomsen wrote:
>
> [1 ]
> [2 ]
> Hi,
>
> Nextcloud/Owncloud both provide a script to set the correct permissions:
>
> https://docs.nextcloud.com/server/9/admin_manual/installation/installation_wizard.html#strong-perms-label
>
> Just set the correct user (most likely apache)/path
>
> Regards,
> Rasmus
>
>  Original Message 
> On 5 May 2017, 16:16, Mick < michaelkintz...@gmail.com> wrote:
>
> On Friday 05 May 2017 08:31:56 John Covici wrote:
> > On Fri, 05 May 2017 07:24:02 -0400,
> >
> > Michael Orlitzky wrote:
> > > On 05/05/2017 07:13 AM, John Covici wrote:
> > > > The php log is not mentioned in the .htaccess file of owncloud. But
> > > > regardless of owncloud, php fatal errors are not logged anywhere under
> > > > apache, even though I have log_errors and a log file name.
> > >
> > > Apache doesn't know anything about what happens in the PHP code, so the
> > > errors should be logged in that separate PHP error log, if anywhere.
> > >
> > > As a temporary measure, you can try enabling "display_errors" and
> > > "display_startup_errors" in your (Apache) php.ini. That should convince
> > > PHP to spit out the error into your browser when you visit the page,
> > > rather than (or in addition to) logging it.
> >
> > If I put those on, I don't even get the 500, I get nothing at all
> > instead! Very odd, indeed. I just get a blank window when I use my
> > php fatal error creator.
> > But if I change it to http, I get the fatal error.
> >
> >
> > For owncloud, changing to http yields the same result. However, when
> > I finally changed the display_startup_errors to On, I get the
> > following fatal error:
> > [05-May-2017 11:44:21 UTC] PHP Fatal error: Maximum execution time of
> > 30 seconds exceeded in
> > /var/www/covici.com/htdocs-secure/owncloud/lib/base.php on line 542
> > [05-May-2017 11:44:21 UTC] PHP Stack trace:
> > [05-May-2017 11:44:21 UTC] PHP 1. {main}()
> > /var/www/covici.com/htdocs-secure/owncloud/index.php:0
> > [05-May-2017 11:44:21 UTC] PHP 2. require_once()
> > /var/www/covici.com/htdocs-secure/owncloud/index.php:37
> > [05-May-2017 11:44:21 UTC] PHP 3. OC::init()
> > /var/www/covici.com/htdocs-secure/owncloud/lib/base.php:967
> > [05-May-2017 11:44:21 UTC] PHP 4. set_time_limit()
> > /var/www/covici.com/htdocs-secure/owncloud/lib/base.php:542
> >
> >
> > Any insights would be appreciated.
>
> Have you looked at the lines mentioned above in base.php and index.php?
>
> It may be an issue of correct owneship/access rights and the lines in those
> files may give you a hint. Some files may need to be owned by the owncloud
> user or the webserver user accounts.
> --
> Regards,
> Mick
>

I have the script mentioned above. I would think if the permissions
were wrong, it would not get into the file at all.

--
Your life is like a penny. You're going to lose it. The question is:
How do
you spend it?

John Covici
cov...@ccs.covici.com

Re: [gentoo-user] trying to find the cause of an http 500 error

2017-05-05 Thread John Covici

On Fri, 05 May 2017 10:25:21 -0400,
Rasmus Thomsen wrote:
> 
> [1  ]
> [2  ]
> Hi,
> 
> Nextcloud/Owncloud both provide a script to set the correct permissions:
> 
> https://docs.nextcloud.com/server/9/admin_manual/installation/installation_wizard.html#strong-perms-label
> 
> Just set the correct user (most likely apache)/path
> 
> Regards,
> Rasmus
> 
>  Original Message 
> On 5 May 2017, 16:16, Mick < michaelkintz...@gmail.com> wrote:
> 
>  On Friday 05 May 2017 08:31:56 John Covici wrote: 
>  > On Fri, 05 May 2017 07:24:02 -0400, 
>  > 
>  > Michael Orlitzky wrote: 
>  > > On 05/05/2017 07:13 AM, John Covici wrote: 
>  > > > The php log is not mentioned in the .htaccess file of owncloud. But 
>  > > > regardless of owncloud, php fatal errors are not logged anywhere under 
>  > > > apache, even though I have log_errors and a log file name. 
>  > > 
>  > > Apache doesn't know anything about what happens in the PHP code, so the 
>  > > errors should be logged in that separate PHP error log, if anywhere. 
>  > > 
>  > > As a temporary measure, you can try enabling "display_errors" and 
>  > > "display_startup_errors" in your (Apache) php.ini. That should convince 
>  > > PHP to spit out the error into your browser when you visit the page, 
>  > > rather than (or in addition to) logging it. 
>  > 
>  > If I put those on, I don't even get the 500, I get nothing at all 
>  > instead! Very odd, indeed. I just get a blank window when I use my 
>  > php fatal error creator. 
>  > But if I change it to http, I get the fatal error. 
>  > 
>  > 
>  > For owncloud, changing to http yields the same result. However, when 
>  > I finally changed the display_startup_errors to On, I get the 
>  > following fatal error: 
>  > [05-May-2017 11:44:21 UTC] PHP Fatal error: Maximum execution time of 
>  > 30 seconds exceeded in 
>  > /var/www/covici.com/htdocs-secure/owncloud/lib/base.php on line 542 
>  > [05-May-2017 11:44:21 UTC] PHP Stack trace: 
>  > [05-May-2017 11:44:21 UTC] PHP 1. {main}() 
>  > /var/www/covici.com/htdocs-secure/owncloud/index.php:0 
>  > [05-May-2017 11:44:21 UTC] PHP 2. require_once() 
>  > /var/www/covici.com/htdocs-secure/owncloud/index.php:37 
>  > [05-May-2017 11:44:21 UTC] PHP 3. OC::init() 
>  > /var/www/covici.com/htdocs-secure/owncloud/lib/base.php:967 
>  > [05-May-2017 11:44:21 UTC] PHP 4. set_time_limit() 
>  > /var/www/covici.com/htdocs-secure/owncloud/lib/base.php:542 
>  > 
>  > 
>  > Any insights would be appreciated. 
> 
>  Have you looked at the lines mentioned above in base.php and index.php? 
> 
>  It may be an issue of correct owneship/access rights and the lines in those 
>  files may give you a hint. Some files may need to be owned by the owncloud 
>  user or the webserver user accounts. 
>  -- 
>  Regards, 
>  Mick 
> 


I have the script mentioned above.  I would think if the permissions
were wrong, it would not get into the file at all.

-- 
Your life is like a penny.  You're going to lose it.  The question is:
How do
you spend it?

 John Covici
 cov...@ccs.covici.com



Re: [gentoo-user] trying to find the cause of an http 500 error

2017-05-05 Thread John Covici
On Fri, 05 May 2017 10:16:08 -0400,
Mick wrote:
> 
> To: gentoo-user@lists.gentoo.org
> Subject: Re: [gentoo-user] trying to find the cause of an http 500 error
> From: Mick 
> Date: Fri, 05 May 2017 15:16:08 +0100
> Reply-to: gentoo-user@lists.gentoo.org
> 
> [1  ]
> On Friday 05 May 2017 08:31:56 John Covici wrote:
> > On Fri, 05 May 2017 07:24:02 -0400,
> > 
> > Michael Orlitzky wrote:
> > > On 05/05/2017 07:13 AM, John Covici wrote:
> > > > The php log is not mentioned in the .htaccess file of owncloud.  But
> > > > regardless of owncloud, php fatal errors are not logged anywhere under
> > > > apache, even though I have log_errors and a log file name.
> > > 
> > > Apache doesn't know anything about what happens in the PHP code, so the
> > > errors should be logged in that separate PHP error log, if anywhere.
> > > 
> > > As a temporary measure, you can try enabling "display_errors" and
> > > "display_startup_errors" in your (Apache) php.ini. That should convince
> > > PHP to spit out the error into your browser when you visit the page,
> > > rather than (or in addition to) logging it.
> > 
> > If I put those on, I don't even get the 500, I get nothing at all
> > instead!  Very odd, indeed.  I just get a blank window when I use my
> > php fatal error creator.
> > But if I change it to http, I get the fatal error.
> > 
> > 
> > For owncloud, changing to http yields the same result.  However, when
> > I finally changed the display_startup_errors to On, I get the
> > following fatal error:
> > [05-May-2017 11:44:21 UTC] PHP Fatal error:  Maximum execution time of
> > 30 seconds exceeded in
> > /var/www/covici.com/htdocs-secure/owncloud/lib/base.php on line 542
> > [05-May-2017 11:44:21 UTC] PHP Stack trace:
> > [05-May-2017 11:44:21 UTC] PHP   1. {main}()
> > /var/www/covici.com/htdocs-secure/owncloud/index.php:0
> > [05-May-2017 11:44:21 UTC] PHP   2. require_once()
> > /var/www/covici.com/htdocs-secure/owncloud/index.php:37
> > [05-May-2017 11:44:21 UTC] PHP   3. OC::init()
> > /var/www/covici.com/htdocs-secure/owncloud/lib/base.php:967
> > [05-May-2017 11:44:21 UTC] PHP   4. set_time_limit()
> > /var/www/covici.com/htdocs-secure/owncloud/lib/base.php:542
> > 
> > 
> > Any insights would be appreciated.
> 
> Have you looked at the lines mentioned above in base.php and index.php?
> 
> It may be an issue of correct owneship/access rights and the lines in those 
> files may give you a hint.  Some files may need to be owned by the owncloud 
> user or the webserver user accounts.

Seems good, everything is owned correctly.  I wonder if its something
more basic on my system, what is set_time_limit actually doing?

-- 
Your life is like a penny.  You're going to lose it.  The question is:
How do
you spend it?

 John Covici
 cov...@ccs.covici.com



Re: [gentoo-user] trying to find the cause of an http 500 error

2017-05-05 Thread Rasmus Thomsen
Hi,

Nextcloud/Owncloud both provide a script to set the correct permissions:

https://docs.nextcloud.com/server/9/admin_manual/installation/installation_wizard.html#strong-perms-label

Just set the correct user (most likely apache)/path

Regards,
Rasmus

 Original Message 
On 5 May 2017, 16:16, Mick wrote:
On Friday 05 May 2017 08:31:56 John Covici wrote:
> On Fri, 05 May 2017 07:24:02 -0400,
>
> Michael Orlitzky wrote:
> > On 05/05/2017 07:13 AM, John Covici wrote:
> > > The php log is not mentioned in the .htaccess file of owncloud. But
> > > regardless of owncloud, php fatal errors are not logged anywhere under
> > > apache, even though I have log_errors and a log file name.
> >
> > Apache doesn't know anything about what happens in the PHP code, so the
> > errors should be logged in that separate PHP error log, if anywhere.
> >
> > As a temporary measure, you can try enabling "display_errors" and
> > "display_startup_errors" in your (Apache) php.ini. That should convince
> > PHP to spit out the error into your browser when you visit the page,
> > rather than (or in addition to) logging it.
>
> If I put those on, I don't even get the 500, I get nothing at all
> instead! Very odd, indeed. I just get a blank window when I use my
> php fatal error creator.
> But if I change it to http, I get the fatal error.
>
>
> For owncloud, changing to http yields the same result. However, when
> I finally changed the display_startup_errors to On, I get the
> following fatal error:
> [05-May-2017 11:44:21 UTC] PHP Fatal error: Maximum execution time of
> 30 seconds exceeded in
> /var/www/covici.com/htdocs-secure/owncloud/lib/base.php on line 542
> [05-May-2017 11:44:21 UTC] PHP Stack trace:
> [05-May-2017 11:44:21 UTC] PHP 1. {main}()
> /var/www/covici.com/htdocs-secure/owncloud/index.php:0
> [05-May-2017 11:44:21 UTC] PHP 2. require_once()
> /var/www/covici.com/htdocs-secure/owncloud/index.php:37
> [05-May-2017 11:44:21 UTC] PHP 3. OC::init()
> /var/www/covici.com/htdocs-secure/owncloud/lib/base.php:967
> [05-May-2017 11:44:21 UTC] PHP 4. set_time_limit()
> /var/www/covici.com/htdocs-secure/owncloud/lib/base.php:542
>
>
> Any insights would be appreciated.

Have you looked at the lines mentioned above in base.php and index.php?

It may be an issue of correct owneship/access rights and the lines in those
files may give you a hint. Some files may need to be owned by the owncloud
user or the webserver user accounts.
--
Regards,
Mick

Re: [gentoo-user] trying to find the cause of an http 500 error

2017-05-05 Thread Mick
On Friday 05 May 2017 08:31:56 John Covici wrote:
> On Fri, 05 May 2017 07:24:02 -0400,
> 
> Michael Orlitzky wrote:
> > On 05/05/2017 07:13 AM, John Covici wrote:
> > > The php log is not mentioned in the .htaccess file of owncloud.  But
> > > regardless of owncloud, php fatal errors are not logged anywhere under
> > > apache, even though I have log_errors and a log file name.
> > 
> > Apache doesn't know anything about what happens in the PHP code, so the
> > errors should be logged in that separate PHP error log, if anywhere.
> > 
> > As a temporary measure, you can try enabling "display_errors" and
> > "display_startup_errors" in your (Apache) php.ini. That should convince
> > PHP to spit out the error into your browser when you visit the page,
> > rather than (or in addition to) logging it.
> 
> If I put those on, I don't even get the 500, I get nothing at all
> instead!  Very odd, indeed.  I just get a blank window when I use my
> php fatal error creator.
> But if I change it to http, I get the fatal error.
> 
> 
> For owncloud, changing to http yields the same result.  However, when
> I finally changed the display_startup_errors to On, I get the
> following fatal error:
> [05-May-2017 11:44:21 UTC] PHP Fatal error:  Maximum execution time of
> 30 seconds exceeded in
> /var/www/covici.com/htdocs-secure/owncloud/lib/base.php on line 542
> [05-May-2017 11:44:21 UTC] PHP Stack trace:
> [05-May-2017 11:44:21 UTC] PHP   1. {main}()
> /var/www/covici.com/htdocs-secure/owncloud/index.php:0
> [05-May-2017 11:44:21 UTC] PHP   2. require_once()
> /var/www/covici.com/htdocs-secure/owncloud/index.php:37
> [05-May-2017 11:44:21 UTC] PHP   3. OC::init()
> /var/www/covici.com/htdocs-secure/owncloud/lib/base.php:967
> [05-May-2017 11:44:21 UTC] PHP   4. set_time_limit()
> /var/www/covici.com/htdocs-secure/owncloud/lib/base.php:542
> 
> 
> Any insights would be appreciated.

Have you looked at the lines mentioned above in base.php and index.php?

It may be an issue of correct owneship/access rights and the lines in those 
files may give you a hint.  Some files may need to be owned by the owncloud 
user or the webserver user accounts.
-- 
Regards,
Mick

signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-user] trying to find the cause of an http 500 error

2017-05-05 Thread Michael Orlitzky
On 05/05/2017 08:31 AM, John Covici wrote:
> 
> For owncloud, changing to http yields the same result.  However, when
> I finally changed the display_startup_errors to On, I get the
> following fatal error:
> [05-May-2017 11:44:21 UTC] PHP Fatal error:  Maximum execution time of
> 30 seconds exceeded in
> /var/www/covici.com/htdocs-secure/owncloud/lib/base.php on line 542

First I would try the easy thing: increase the maximum execution time in
php.ini to something like 5 minutes and try again. It's possible that
the Owncloud initialization takes a long time, the first time around.





Re: [gentoo-user] trying to find the cause of an http 500 error

2017-05-05 Thread Bill Kenworthy
On 05/05/17 20:31, John Covici wrote:
> On Fri, 05 May 2017 07:24:02 -0400,
> Michael Orlitzky wrote:
>>
>> On 05/05/2017 07:13 AM, John Covici wrote:
>>>
>>> The php log is not mentioned in the .htaccess file of owncloud.  But
>>> regardless of owncloud, php fatal errors are not logged anywhere under
>>> apache, even though I have log_errors and a log file name.
>>>
...
> 
> Any insights would be appreciated.
> 

Does phpinfo give a clue?

https://www.garron.me/en/bits/phpinfo-script-test-php-apache.html

BillK





Re: [gentoo-user] trying to find the cause of an http 500 error

2017-05-05 Thread John Covici
On Fri, 05 May 2017 07:24:02 -0400,
Michael Orlitzky wrote:
> 
> On 05/05/2017 07:13 AM, John Covici wrote:
> > 
> > The php log is not mentioned in the .htaccess file of owncloud.  But
> > regardless of owncloud, php fatal errors are not logged anywhere under
> > apache, even though I have log_errors and a log file name.
> > 
> 
> Apache doesn't know anything about what happens in the PHP code, so the
> errors should be logged in that separate PHP error log, if anywhere.
> 
> As a temporary measure, you can try enabling "display_errors" and
> "display_startup_errors" in your (Apache) php.ini. That should convince
> PHP to spit out the error into your browser when you visit the page,
> rather than (or in addition to) logging it.

If I put those on, I don't even get the 500, I get nothing at all
instead!  Very odd, indeed.  I just get a blank window when I use my
php fatal error creator.
But if I change it to http, I get the fatal error.


For owncloud, changing to http yields the same result.  However, when
I finally changed the display_startup_errors to On, I get the
following fatal error:
[05-May-2017 11:44:21 UTC] PHP Fatal error:  Maximum execution time of
30 seconds exceeded in
/var/www/covici.com/htdocs-secure/owncloud/lib/base.php on line 542
[05-May-2017 11:44:21 UTC] PHP Stack trace:
[05-May-2017 11:44:21 UTC] PHP   1. {main}()
/var/www/covici.com/htdocs-secure/owncloud/index.php:0
[05-May-2017 11:44:21 UTC] PHP   2. require_once()
/var/www/covici.com/htdocs-secure/owncloud/index.php:37
[05-May-2017 11:44:21 UTC] PHP   3. OC::init()
/var/www/covici.com/htdocs-secure/owncloud/lib/base.php:967
[05-May-2017 11:44:21 UTC] PHP   4. set_time_limit()
/var/www/covici.com/htdocs-secure/owncloud/lib/base.php:542


Any insights would be appreciated.

-- 
Your life is like a penny.  You're going to lose it.  The question is:
How do
you spend it?

 John Covici
 cov...@ccs.covici.com



Re: [gentoo-user] trying to find the cause of an http 500 error

2017-05-05 Thread Michael Orlitzky
On 05/05/2017 07:13 AM, John Covici wrote:
> 
> The php log is not mentioned in the .htaccess file of owncloud.  But
> regardless of owncloud, php fatal errors are not logged anywhere under
> apache, even though I have log_errors and a log file name.
> 

Apache doesn't know anything about what happens in the PHP code, so the
errors should be logged in that separate PHP error log, if anywhere.

As a temporary measure, you can try enabling "display_errors" and
"display_startup_errors" in your (Apache) php.ini. That should convince
PHP to spit out the error into your browser when you visit the page,
rather than (or in addition to) logging it.




Re: [gentoo-user] trying to find the cause of an http 500 error

2017-05-05 Thread John Covici
On Fri, 05 May 2017 06:37:00 -0400,
Michael Orlitzky wrote:
> 
> On 05/05/2017 02:30 AM, John Covici wrote:
> > 
> > In case of some crazy thing in owncloud turning off logging or
> > something, I wrote a program which triggers a fatal error  (I know
> > it does using the cli) and ran it under apache and nothing is being
> > logged.
> > 
> > So, the question is how to get it so I can see the fatal error, so I
> > can get my owncloud working again?
> 
> Check for an .htaccess file that ships with owncloud and relocates the
> PHP log.

The php log is not mentioned in the .htaccess file of owncloud.  But
regardless of owncloud, php fatal errors are not logged anywhere under
apache, even though I have log_errors and a log file name.

-- 
Your life is like a penny.  You're going to lose it.  The question is:
How do
you spend it?

 John Covici
 cov...@ccs.covici.com



Re: [gentoo-user] trying to find the cause of an http 500 error

2017-05-05 Thread Michael Orlitzky
On 05/05/2017 02:30 AM, John Covici wrote:
> 
> In case of some crazy thing in owncloud turning off logging or
> something, I wrote a program which triggers a fatal error  (I know
> it does using the cli) and ran it under apache and nothing is being
> logged.
> 
> So, the question is how to get it so I can see the fatal error, so I
> can get my owncloud working again?

Check for an .htaccess file that ships with owncloud and relocates the
PHP log.