Forum Replies Created

Viewing 1 replies (of 1 total)
  • I have no problem running the latest code on Linux with Apache. I seem to have a problem with the latest code on Windows with Apache.

    After I active the plugin and attempt to use it if fails all test. In looking at my Apache error logs I see the following error:

    “AuthUserFile takes 1-2 arguments, text file containing user IDs and passwords”

    I searched the web and found out that this usually means that there is no argument or file not find after AuthUserFile. Of course there was one…C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/wp-admin/.htaccess

    What I found was that Apache did not apparently like the spaces in the file location string. I changed this line of code

    "AuthUserFile $TRp".DIRECTORY_SEPARATOR.".htpasswda1",

    to

    'AuthUserFile "'.$TRp.DIRECTORY_SEPARATOR.'.htpasswda1"',

    and it passed the tests the script does.

    I verified this ‘spaces in the file name’ problem by moving Apache to a directory structure will no space and reran using the original code. It passed. Put a space back in and it failed.

    Thinking that little fix was easy to live with I was ready to go. However, I ran into another problem immediately. Every time I open the plugin is puts in extra DIRECTORY_SEPARATOR symbols in the .htaccess file.

    .htpasswd location: C:\Apache2.2\htdocs/.htpasswda1

    becomes

    .htpasswd location: C:\\Apache2.2\\htdocs/.htpasswda1

    then

    .htpasswd location: C:\\\Apache2.2\\\htdocs/.htpasswda1

    for each subsequent access to the configuration page. Clicking on Modify .htaccess actually writes the extra directory separators. (This happens if the directory structure contains spaces)

    Since I am no code jockey and I hoping you can address and make this plugin work in both environments.

    Running test site on:
    Windows XP SP2
    Apache for Windows 2.2.8
    PHP for Windows 5.2.5
    MySQL for Windows 5.0.r12

Viewing 1 replies (of 1 total)