 |
BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6  | This is the forum to discuss the Wrox book Beginning PHP, Apache, MySQLWeb Development by Michael K. Glass, Yann Le Scouarnec, Elizabeth Naramore, Gary Mailer, Jeremy Stolz, Jason Gerner; ISBN: 9780764557446 |
|
Welcome to the p2p.wrox.com Forums.
You are currently viewing the BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

June 8th, 2004, 09:52 PM
|
|
Registered User
|
|
Join Date: Jun 2004
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Chp 11 - Creating htaccess
This is found in Chp 11 p319. Creating htaccess and htpasswd files.
In DOS prompt, I typed C:\Program Files\Apache Group\Apache2\bin>
htpasswd users james
The message returned: Automatically using MD5 format.
htpasswd: cannot modify file users; use '-c' to create it
Does anyone encounter this problem and how to solve it?
Thanks ;)
|
|

June 9th, 2004, 11:55 AM
|
|
Authorized User
|
|
Join Date: Jun 2004
Posts: 37
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Try using the -c command line switch, like so:
htpasswd -c users james
|
|

June 11th, 2004, 12:50 PM
|
|
Registered User
|
|
Join Date: Jun 2004
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Thanks! It works.
However, my attempt to use htaccess does not work as intended.
I created a htaccess file, labeled it as "a.htaccess" (It has to have a name, right?)
The content of the file is as follows:
AuthType Basic
AuthUserFile c:\website\test
AuthName "Restricted"
<LIMIT GET POST>
require valid-user
</LIMIT>
So where does it go wrong? Please help! Thanks ;)
|
|

June 12th, 2004, 12:36 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2004
Posts: 101
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I had the same problem. Windows does not seem to allow you to create a file called ".htaccess". I still don not know how to work around it.
|
|

June 14th, 2004, 09:17 AM
|
|
Authorized User
|
|
Join Date: Jun 2004
Posts: 37
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I can't remember off the top of my head the limitations Windows places on file names on creation... but you *can* rename that file to .htaccess... as follows:
Open a Command Prompt/DOS Window
Go to the directory with your a.htaccess (or whatever) file
issue the following command: ren a.htaccess ".htaccess"
The file should then be renamed properly. (Worked on XP, should work in 2k, unsure about anything previous)
|
|

June 14th, 2004, 10:05 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2004
Posts: 101
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Yap, it worked.
Thanks
Christian
Note: Can't overstimate the power of DOS
|
|

June 15th, 2004, 08:01 AM
|
|
Authorized User
|
|
Join Date: Jun 2004
Posts: 37
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
It should also be noted, using quotes works in windows dialog boxes as well. When saving your file for the first time in your editor of choice, just put quotes around the filename ( ".htaccess" ) and it should work fine.
|
|
 |