php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #59283 Extension does not work under PHP as ApacheModule but in CLI
Submitted: 2010-06-25 11:33 UTC Modified: 2014-12-30 10:41 UTC
From: zokradonh at arctics dot net Assigned:
Status: No Feedback Package: sasl (PECL)
PHP Version: 5.3.2 OS: openSuse 11.0
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2010-06-25 11:33 UTC] zokradonh at arctics dot net
Description:
------------
I have setup a saslauthd which authenticates over PAM with a 
MySQL database.

This works nice with several applications (subversion, 
apache-
sasl-mod).

I have recently installed the pecl php extension to 
communicate 
locally with my saslauthd.

My config file is as follows(/etc/sasl2/phpgft.conf):

pwcheck_method: saslauthd
mech_list: PLAIN LOGIN
log_level: 9

Then I used the sasl_server_* functions in php to 
authenticate.

I have provided the source code in the reproduce-code field.

Authentication works when I run the code in CLI mode. But 
when I 
invoke this via browser with php as Apache-Module it fails. 
As 
one can see sasl_listmech already fails. It returns mechs 
that 
aren't supported.

The expected result field is filled with the output from CLI 
execution.

'../configure' '--prefix=/usr' '--datadir=/usr/share/php5' 
'--
mandir=/usr/share/man' '--bindir=/usr/bin' '--with-
libdir=lib64' 
'--includedir=/usr/include' '--sysconfdir=/etc/php5/apache2' 
'--
with-config-file-path=/etc/php5/apache2' '--with-config-
file-
scan-dir=/etc/php5/conf.d' '--enable-libxml' '--enable-
session' 
'--with-mm' '--with-pcre-regex=/usr' '--enable-xml' '--
enable-
simplexml' '--enable-filter' '--disable-debug' '--enable-
inline-
optimization' '--disable-rpath' '--disable-static' '--
enable-
shared' '--program-suffix=5' '--with-pic' '--with-gnu-ld' '-
-
with-system-tzdata=/usr/share/zoneinfo' '--with-
apxs2=/usr/sbin/apxs2' '--disable-all' '--disable-cli' '--
disable-apache2handler-activation'

Reproduce code:
---------------
http://cold.arctics.net/php/ssasl.txt

Expected result:
----------------
Initialized successfully. (1)
resource(4) of type (SASL Connection Context)
Supported Mechs: PLAIN LOGIN
sasl_server_start: string(9) "Username:"
sasl_server_step1: string(9) "Password:"
sasl_server_step2: string(0) ""
Authenticated successfully.

Actual result:
--------------
Initialized successfully. (1)
resource(2) of type (SASL Connection Context)
Supported Mechs: PLAIN ANONYMOUS CRAM-MD5 DIGEST-MD5 LOGIN
sasl_server_start: string(9) "Username:"
sasl_server_step1: string(9) "Password:"
Warning: sasl_server_step(): user not found in 
/srv/www/vhosts/cold.arctics.net/httpdocs/sasl.php on line 24
sasl_server_step2: string(0) ""
Authentication incomplete. (-20)

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-10-24 08:06 UTC] yohgaki@php.net
-Status: Open +Status: Feedback
 [2013-10-24 08:06 UTC] yohgaki@php.net
Please try using this snapshot:

  http://snaps.php.net/php5.4-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/


 [2014-12-30 10:41 UTC] pecl-dev at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sun Dec 05 17:03:53 2021 UTC