htpasswd and htaccess problems

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

htpasswd and htaccess problems

Postby tHatDudeUK » 16. March 2004 06:32

Using a pre-made php thingy and it gives the following results (I have also tried doing it manually at the command line.)

Creating default users
htpasswd -bc .htpasswd admin password 2>&1

$CommandStatus = 127
$CommandResult =
sh: line 1: htpasswd: command not found

Error occurred creating htpasswd file

Any ideas how to get this working?

Many thanks in advance

Regards

tHatDudeUK
tHatDudeUK
 
Posts: 6
Joined: 07. March 2004 00:17

Re: htpasswd and htaccess problems

Postby Kristian Marcroft » 16. March 2004 06:39

tHatDudeUK wrote:Using a pre-made php thingy and it gives the following results (I have also tried doing it manually at the command line.)

Creating default users
htpasswd -bc .htpasswd admin password 2>&1

$CommandStatus = 127
$CommandResult =
sh: line 1: htpasswd: command not found

Error occurred creating htpasswd file

Any ideas how to get this working?

Many thanks in advance

Regards

tHatDudeUK

Hi,

try changing the command from:
Code: Select all
htpasswd -bc .htpasswd admin password 2>&1

to:
Code: Select all
/opt/lampp/bin/htpasswd -bc .htpasswd admin password 2>&1


this should work...

So long
KriS
User avatar
Kristian Marcroft
AF Moderator
 
Posts: 2962
Joined: 03. January 2003 12:08
Location: Diedorf

Postby tHatDudeUK » 16. March 2004 06:47

Hi,

Many thanks for your prompt reply.

That command is created by the app I'm using off sourceforge called phpsurveyor..

Have you any idea what the 2>&1 does because I don't have a clue?

Is there a chance I have configured the paths in config.php in phpsurveyor wrong?

Many thanks

Regards

tHatDudeUK

EDIT: No idea how it works or what it does but it worked and password protected the directory nonetheless :) Many thanks...
tHatDudeUK
 
Posts: 6
Joined: 07. March 2004 00:17

Postby Kristian Marcroft » 16. March 2004 12:57

tHatDudeUK wrote:Hi,

Many thanks for your prompt reply.

That command is created by the app I'm using off sourceforge called phpsurveyor..

Have you any idea what the 2>&1 does because I don't have a clue?

Is there a chance I have configured the paths in config.php in phpsurveyor wrong?

Many thanks

Regards

tHatDudeUK

EDIT: No idea how it works or what it does but it worked and password protected the directory nonetheless :) Many thanks...


Hi,

just for the Archiv:
2>&1 means, do not output any errors I think....

So long
KriS
User avatar
Kristian Marcroft
AF Moderator
 
Posts: 2962
Joined: 03. January 2003 12:08
Location: Diedorf

Postby Oswald » 16. March 2004 17:53

Hi friends!

A single 2>&1 is in most cases senseless. It only says redirect output channel 2 to output channel 1.

Output channel 1 (aka STDOUT) is the normal way to output messages to the screen. Output channel 2 (aka STDERR) is the normal way to output errors to the screen.

Normally you will find a 2>&1 in conjunction with a > /dev/null. This will redirect normal messages (output channel 1) to the trash can /dev/null and error messages (output channel 2) to channel 1. So both normal and error messages will go into the virtual trash can /dev/null.

Greetings
Oswald
User avatar
Oswald
Apache Friends
 
Posts: 2718
Joined: 26. December 2002 19:51
Location: Berlin, Germany
Operating System: Linux


Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 29 guests