PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Authentication » Auth_HTTP » Bug #4293

Cannot communicate to DB using valid $dsn

Details

Submitted2005-05-06 01:00 UTC
Fromkavinay at rocketmail dot com
StatusNo Feedback
PackageAuth_HTTP
PHP Version4.3.11
OSLinux/Apache 1.3
Roadmaps(Not assigned)

Comments

[2005-05-06 01:00 UTC] kavinay at rocketmail dot com

Description:
------------
Hello,

I've used Auth_PEAR with great success in the past. However, working on a different server, I've install PEAR and all the needed packages properly however when I use the exact same authentication script that I've used before, the script just continues to ask me for my user/pass even after I enter the proper combination.

I don't think Auth is writing a cookie or properly keeping the session--I'm using the same code as in Auth_HTTP tutorial. Meanwhile, a test script--which access the auth table--works using the exact same $DNS. So it shouldn't be a DB access issue. Yet the login loop makes me wonder if Auth really can't access the DB, eventhough it should.

I've uninstalled and reinstalled PEAR several times, yet I still have the same problem on this server. Yet, cookies and sessions seem to be functioning just fine on this machine. I don't know what else to try, besides blaming this on PEAR. I've spent all of today trying to

Reproduce code:
---------------
The login script user:ann, pass: ann
http://www.kishor.org/testdb.php
http://www.kishor.org/testdb.txt

Script that connects to auth DB using same $DSN (also shows my phpinfo and pearinfo)
http://www.kishor.org/connectdb.php
http://www.kishor.org/connectdb.txt

Expected result:
----------------
I expect to be logged in and see the login success string. This script worked fine on an older server running Apache 2 and php 4.2.2

Actual result:
--------------
Endless login loop

[2005-07-04 17:40 UTC] springub at northclick dot de

Hi,

perhaps do you have PHP as module in Apache in the one configuration and PHP as CGI in the other?

It works only with PHP as module, look at http://de3.php.net/manual/en/features.http-auth.php

Christian