Problem with php files and mysql_connect when mod_auth_mysql is used

Recently, I downloaded mod_auth_mysql 3.0, compiled it and added the module into apache configuration file as

LoadModule mysql_auth_module modules/mod_auth_mysql.so

I added the .htaccess file in to one of my web directories as follows,

AuthName "Authorization Required"
AuthType Basic

AuthMySQLEnable On
AuthMySQLHost localhost
AuthMySQLPort 3306
AuthMySQLSocket /var/lib/mysql/mysql.sock
AuthMySQLUser <myusername>
AuthMySQLPassword <mypassword>
AuthMySQLDB intranet
AuthMySQLUserTable userinfo
AuthMySQLNameField username
AuthMySQLPasswordField password
AuthMySQLPwEncryption none

require valid-user

Now,

The authentication against the database is happening properly, but, the problem is,

all php pages where there is a mysql_connect function, are not executing, but come up for file download. If I remove the mod_auth_mysql.so from apache configuration and restart the server, all php files run smoothly.

The apache version is httpd-2.0.46-25.ent (rpm)
PHP Version is php-4.3.2-8.ent (rpm)
MySQL version is 5 (Downloaded .tar.gz and compiled)

What could be the problem ? Any guidance will be appreciated
LVL 3
mganeshAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

star_trekCommented:
try taking out
AuthMySQLSocket /var/lib/mysql/mysql.sock
in .htaccess file.
0
mganeshAuthor Commented:
OK,
I solved it, it was a version problem. The original version of mod_auth_mysql installed on the system was mod_auth_mysql-20030510-1.ent on which I downloaded and installed mod_auth_mysql 3.0.

I removed the newer version and installed back the older mod_auth_mysql-20030510-1.ent.

Everything is alright now.
0
GranModCommented:
Closed, 500 points refunded.
GranMod
The Experts Exchange
Community Support Moderator of all Ages
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
PHP

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.