|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
 PatchesFix_insufficient_memory_allocation (last revision 2016-09-17 16:20 UTC by tvdijen at gmail dot com)Pull RequestsHistoryAllCommentsChangesGit/SVN commits              [2016-09-17 11:39 UTC] tvdijen at gmail dot com
  [2016-09-17 12:25 UTC] tvdijen at gmail dot com
  [2016-09-17 14:57 UTC] tvdijen at gmail dot com
  [2016-09-17 16:15 UTC] tvdijen at gmail dot com
  [2016-09-17 19:17 UTC] mbechler at eenterphace dot org
  [2016-09-18 10:54 UTC] tvdijen at gmail dot com
 
-Status: Open
+Status: Closed
  [2016-09-18 10:54 UTC] tvdijen at gmail dot com
  [2016-09-19 15:48 UTC] cmb@php.net
 
-Package:     *General Issues
+Package:     PECL
-Assigned To:
+Assigned To: cmb
  [2016-09-19 15:48 UTC] cmb@php.net
 | |||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 05:00:02 2025 UTC | 
Description: ------------ The doAuthentication-method sometimes fails to return anything (execution stops). It actually fails more often than it works. This behaviour started after updating the krb5-module to the latest release 1.1.0. I started debugging my php-code by adding debug-lines. It turned out that code-execution stops at doAuthentication for no obvious reason. No errors are being displayed or even logged. See example-code below. When I start IE and run the test-script, it will fail with a 'Page cannot be displayed'. Apache access log shows that the page request is received. I can see my own debug-lines in the logs up to doAuthentication() and then I run into a dead end. When I repeat the test (close IE completely, start it again en run the script again), let's say one in ten times it fails. A rollback to version 1.0.0 of the module fixed everything, so my guess is that the recent changes have something to do with this random behaviour. I've seen this behaviour on both RHEL6+PHP5.3 and CentOS7+PHP5.4 Test script: --------------- <?php if(!extension_loaded('krb5')) { die('KRB5 Extension not installed'); } if(!empty($_SERVER['HTTP_AUTHORIZATION'])) { list($mech, $data) = explode(' ', $_SERVER['HTTP_AUTHORIZATION']); if(strtolower($mech) == 'basic') { echo "Client sent basic"; die('Unsupported request'); } else if(strtolower($mech) != 'negotiate') { echo "Couldn't find negotiate"; die('Unsupported request'); } $auth = new KRB5NegotiateAuth('/path/to/keytab'); if($reply = $auth->doAuthentication()) { header('HTTP/1.1 200 Success'); echo 'Success - authenticated as ' . $auth->getAuthenticatedUser() . '<br>'; } else { echo 'Failed to authN.'; die(); } } else { header('HTTP/1.1 401 Unauthorized'); header('WWW-Authenticate: Negotiate',false); echo 'Not authenticated. No HTTP_AUTHORIZATION available.'; echo 'Check headers sent by the browser and verify that '; echo 'apache passes them to PHP'; } ?> Expected result: ---------------- I'd expect doAuthentication() to at either return true/false or throw an error. Actual result: -------------- Code execution stops for no apparent reason.