Nothing being logged

21 views
Skip to first unread message

Dick Visser

unread,
Aug 10, 2016, 12:32:21 PM8/10/16
to simplesamlphp
I know this sounds like a beginner issue but I can't figure out what I'm doing wrong.

I'm trying to upgrade some of my SSP installs by moving them from an older Ubuntu VM to a new one, 16.04.
This new one has PHP7 and Apache 2.4.18, and SSP 1.14.6.

The problem I'm having is that something things don't work and I get a blank page.
But no matter what I try I can't get the actual error to log anywhere.

After some trying it looks like the try/catch blocks don't seem to be doing much.
Whatever fails in the try block doesn't get caught. At least no errors - just a blank page.
Manually doing SimpleSAML_Logger::info works so that's ok.
Any ideas?


--
Dick Visser
Sr. System & Network Engineer
GÉANT

Want to join us? We're hiring: http://www.geant.org/jobs

Jeffrey Krug

unread,
Aug 10, 2016, 1:07:55 PM8/10/16
to simple...@googlegroups.com
Lots of time php errors end up in the httpd error logs when the webpage is just a blank page. I would definitely recommend checking those error logs if you have not. 

--
You received this message because you are subscribed to the Google Groups "SimpleSAMLphp" group.
To unsubscribe from this group and stop receiving emails from it, send an email to simplesamlphp+unsubscribe@googlegroups.com.
To post to this group, send email to simple...@googlegroups.com.
Visit this group at https://groups.google.com/group/simplesamlphp.
For more options, visit https://groups.google.com/d/optout.

Dick Visser

unread,
Aug 10, 2016, 2:26:57 PM8/10/16
to simple...@googlegroups.com
Apache is already set to log at trace1 level but no sign of php errors there either.
--
Sent from Gmail Mobile

Dick Visser

unread,
Aug 11, 2016, 4:09:57 AM8/11/16
to simple...@googlegroups.com
​I did some more searching and came across this statement in www/_includes.php:

    if ($errno & SimpleSAML_Utilities::$logMask || !($errno & error_reporting())) {
        // masked error
        return false;
    }

​After removing this my error started appearing in the logs:

Aug 11 09:37:00 simplesamlphp.bridge ERROR [bef181fb68] SimpleSAML_Error_Exception: Error 0 - Class 'sspmod_oauth_Consumer' not found
Aug 11 09:37:00 simplesamlphp.bridge ERROR [bef181fb68] Backtrace:
Aug 11 09:37:00 simplesamlphp.bridge ERROR [bef181fb68] 2 /opt/simplesamlphp/bridge-1.14.6/www/_include.php:83 (SimpleSAML_error_handler)
Aug 11 09:37:00 simplesamlphp.bridge ERROR [bef181fb68] 1 /opt/simplesamlphp/bridge-1.14.6/www/_include.php:51 (SimpleSAML_exception_handler)
Aug 11 09:37:00 simplesamlphp.bridge ERROR [bef181fb68] 0 [builtin] (N/A)
As can be seen the 'errno' is 0 - which is why the error was masked by the statement (errno = 0 and ​SimpleSAML_Utilities::$logMask =0 as well).

I checked a load of old log files and the usual values for 'errno' that we encountered were 2 or 8.
If these are numbers that map to the ones on http://php.net/manual/en/errorfunc.constants.php, then I wonder what errno 0 means because that is not listed.
Maybe a bug in PHP?

In any case I will strip out that statement in www/_include.php so I can see what's happening.



DIck

Jaime Perez Crespo

unread,
Aug 11, 2016, 4:21:55 AM8/11/16
to simple...@googlegroups.com
Hi Dick!

That sounds like a bug indeed.

As far as I can see, the OAuth module does not use error masking (at least, not the version I have here), so I’d assume this is probably PHP configuration. If you go to your php.ini, what do you have in the “error_reporting” configuration directive?

On 11 Aug 2016, at 10:09 AM, Dick Visser <dick....@geant.org> wrote:
> ​I did some more searching and came across this statement in www/_includes.php:
>
> if ($errno & SimpleSAML_Utilities::$logMask || !($errno & error_reporting())) {
> // masked error
> return false;
> }
>
> ​After removing this my error started appearing in the logs:
>
> Aug 11 09:37:00 simplesamlphp.bridge ERROR [bef181fb68] SimpleSAML_Error_Exception: Error 0 - Class 'sspmod_oauth_Consumer' not found
> Aug 11 09:37:00 simplesamlphp.bridge ERROR [bef181fb68] Backtrace:
> Aug 11 09:37:00 simplesamlphp.bridge ERROR [bef181fb68] 2 /opt/simplesamlphp/bridge-1.14.6/www/_include.php:83 (SimpleSAML_error_handler)
> Aug 11 09:37:00 simplesamlphp.bridge ERROR [bef181fb68] 1 /opt/simplesamlphp/bridge-1.14.6/www/_include.php:51 (SimpleSAML_exception_handler)
> Aug 11 09:37:00 simplesamlphp.bridge ERROR [bef181fb68] 0 [builtin] (N/A)
> ​
> As can be seen the 'errno' is 0 - which is why the error was masked by the statement (errno = 0 and ​SimpleSAML_Utilities::$logMask =0 as well).
>
> I checked a load of old log files and the usual values for 'errno' that we encountered were 2 or 8.
> If these are numbers that map to the ones on http://php.net/manual/en/errorfunc.constants.php, then I wonder what errno 0 means because that is not listed.
> Maybe a bug in PHP?
>
> In any case I will strip out that statement in www/_include.php so I can see what's happening.

--
Jaime Pérez
UNINETT / Feide
mail: jaime...@uninett.no
PGP: 9A08 EA20 E062 70B4 616B 43E3 562A FE3A 6293 62C2

"Two roads diverged in a wood, and I, I took the one less traveled by, and that has made all the difference."
- Robert Frost

Dick Visser

unread,
Aug 11, 2016, 6:50:55 AM8/11/16
to simplesamlphp
On Thu, Aug 11, 2016 at 10:21 AM, Jaime Perez Crespo
<jaime...@uninett.no> wrote:
> Hi Dick!
>
> That sounds like a bug indeed.
>
> As far as I can see, the OAuth module does not use error masking (at least, not the version I have here), so I’d assume this is probably PHP configuration. If you go to your php.ini, what do you have in the “error_reporting” configuration directive?

It's set to E_ALL.
phpinfo():

error_reporting 32767 32767

Could it be that it's not limited to the OAuth module? I remember
having trouble seeing errors with another instance as well.

Dick

Jaime Perez Crespo

unread,
Aug 11, 2016, 7:33:52 AM8/11/16
to simple...@googlegroups.com
Hi!

On 11 Aug 2016, at 12:50 PM, Dick Visser <dick....@geant.org> wrote:
> It's set to E_ALL.
> phpinfo():
>
> error_reporting 32767 32767

Can you try E_ALL & E_STRICT?

Dick Visser

unread,
Aug 11, 2016, 8:27:49 AM8/11/16
to simplesamlphp
On Thu, Aug 11, 2016 at 1:33 PM, Jaime Perez Crespo
<jaime...@uninett.no> wrote:
> Hi!
>
> On 11 Aug 2016, at 12:50 PM, Dick Visser <dick....@geant.org> wrote:
>> It's set to E_ALL.
>> phpinfo():
>>
>> error_reporting 32767 32767
>
> Can you try E_ALL & E_STRICT?

Yes, same results.
Which is expected, as per php.ini comment (and I'm on 7.0.9):

; Error Level Constants:
; E_ALL - All errors and warnings (includes E_STRICT as of
PHP 5.4.0)

Jaime Perez Crespo

unread,
Aug 11, 2016, 8:29:37 AM8/11/16
to simple...@googlegroups.com
Oh, that’s true, I must have been looking at an older version of the documentation.

In that case, I honestly have no idea why you were getting such errno. I’m tempted to think you are right and that was a bug in PHP...

On 11 Aug 2016, at 14:26 PM, Dick Visser <dick....@geant.org> wrote:
> On Thu, Aug 11, 2016 at 1:33 PM, Jaime Perez Crespo
>>
>> Can you try E_ALL & E_STRICT?
>
> Yes, same results.
> Which is expected, as per php.ini comment (and I'm on 7.0.9):
>
> ; Error Level Constants:
> ; E_ALL - All errors and warnings (includes E_STRICT as of
> PHP 5.4.0)

--
Reply all
Reply to author
Forward
0 new messages