Cannot get Apache httpd mod_dbd to work

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Cannot get Apache httpd mod_dbd to work

Postby someoneelse » 27. December 2017 23:56

I am trying to setup a mysql authorization function in my XAMPP php5.6 developer server. However, I can't get the server to start up. I have tried numerous variations to the code, including commenting out the lines beginning with DB. #ing them out makes the server start up, but gives a HTTP500 error when I try to view the pages requiring authentication, because it doesn't know what database to look in.

Code: Select all
Apache/2.4.26 (Win32) OpenSSL/1.0.2l PHP/5.6.31

httpd.conf:
Code: Select all
...
DBDriver mysql
DBDParams host
=localhost,dbname=aDatabase,user=aUser,pass=ThisIsNotReallyMyPassword
<Directory "E:\xampp\htdocs\shouldnotbesecure\shouldbesecure">
    
Options -Indexes
    AuthType Basic
    AuthName 
"Please Login"
    
AuthBasicProvider dbd
    
# mod_authz_core configuration
    
Require valid-user
    AuthDBDUserPWQuery 
"SELECT password FROM users WHERE username = %s"
</Directory>  


loaded in httpd.config (coming from phpinfo() command):

Code: Select all
Loaded Modules
    core mod_win32 mpm_winnt http_core mod_so mod_access_compat mod_actions mod_alias mod_allowmethods mod_asis mod_auth_basic mod_authn_core mod_authn_dbd mod_authn_dbm mod_authn_file mod_authn_socache mod_authnz_fcgi mod_authz_core mod_authz_dbd mod_authz_dbm mod_authz_groupfile mod_authz_host mod_authz_user mod_autoindex mod_cgi mod_dav_lock mod_dbd mod_dir mod_env mod_headers mod_include mod_info mod_isapi mod_logio mod_log_config mod_log_debug mod_log_forensic mod_cache_disk mod_mime mod_negotiation mod_proxy mod_proxy_ajp mod_rewrite mod_session_dbd mod_setenvif mod_socache_dbm mod_socache_shmcb mod_ssl mod_status mod_php5


Nothing shows up in the error log when I try to start things with these configs, displayed in the system output is the following generic message:

Code: Select all
5:38:11 PM  [Apache]    Checking default ports...
5:38:11 PM  [Apache]    Attempting to start Apache app...
5:38:11 PM  [Apache]    Executing "e:\xampp5.6\apache\bin\httpd.exe"
5:38:11 PM  [Apache]    Return code0
5
:38:12 PM  [Apache]    Status change detectedrunning
5
:38:12 PM  [Apache]    Status change detectedstopped
5
:38:12 PM  [Apache]    ErrorApache shutdown unexpectedly.
5:38:12 PM  [Apache]    This may be due to a blocked portmissing dependencies
5:38:12 PM  [Apache]    improper privilegesa crash, or a shutdown by another method.
5:38:12 PM  [Apache]    Press the Logs button to view error logs and check
5
:38:12 PM  [Apache]    the Windows Event Viewer for more clues
5
:38:12 PM  [Apache]    If you need more helpcopy and post this
5
:38:12 PM  [Apache]    entire log window on the forums

someoneelse
 
Posts: 1
Joined: 27. December 2017 23:38
XAMPP version: 5.6.31
Operating System: Windows 10 Enterprise

Re: Cannot get Apache httpd mod_dbd to work

Postby gsmith » 05. January 2018 19:39

The problem is your missing apr_dbd_mysql.dll as well as libmysql.dll, both of which xampp doesn't supply.
gsmith
 
Posts: 278
Joined: 29. November 2013 18:04
Location: San Diego
XAMPP version: 0.0.0
Operating System: Win 10/2012R VS 14,15,16


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 130 guests