Page 1 of 1

htpasswd and htaccess problems

PostPosted: 16. March 2004 06:32
by tHatDudeUK
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

Re: htpasswd and htaccess problems

PostPosted: 16. March 2004 06:39
by Kristian Marcroft
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

PostPosted: 16. March 2004 06:47
by tHatDudeUK
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...

PostPosted: 16. March 2004 12:57
by Kristian Marcroft
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

PostPosted: 16. March 2004 17:53
by Oswald
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