Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Coding Forum


You are currently viewing our Coding Forum as a guest. Please register to participate.
Login



Reply
.htaccess, basix http authorization and windows xp
Old 12-08-2002, 03:34 AM .htaccess, basix http authorization and windows xp
Digital-SyntaX's Avatar
Average Talker

Posts: 15
Location: Perth, Australia
Trades: 0
k, i've got the home server set up , but for my site i want to use either .htaccess or basic http authorization. i've tried to get .htaccess to work but it..well...doesnt.

i've attached the two files, if someone could suggest something to do i'd be really greatful.

also does anyone know basic http authirization? i saw one on the internet but it didn't work

<?php
$auth = 0;
if (($PHP_AUTH_USER == "foo" ) && ($PHP_AUTH_PW == "bar" )) $auth = 1;
if ( $auth != 1 ) {
header( "WWW-Authenticate: Basic realm="Authorization Required!"" );
header( "HTTP/1.0 401 Unauthorized" );
echo 'Authorization Required!';
exit;
}
?>

what do i do?
Attached Files
File Type: zip htaccess.zip (346 Bytes, 21 views)
Digital-SyntaX is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 12-08-2002, 05:14 AM
dk01's Avatar
Ultra Talker

Posts: 373
Location: Ames, IA
Trades: 0
I don't think .htaccess works on Windows XP. You may want to confirm this with someone else who is running a server on it. Anyways which webserver are you running? Apache? ISS?
-dk
__________________
Did I help you? If so, be nice and throw me some
Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
dk01 is offline
Reply With Quote
View Public Profile
 
Old 12-08-2002, 11:16 AM
Digital-SyntaX's Avatar
Average Talker

Posts: 15
Location: Perth, Australia
Trades: 0
apache. so if i can't use .htaccess, then it looks as if basic http authorization is the way to go. anyone know what was wrong with my script above?

Digital-SyntaX is offline
Reply With Quote
View Public Profile
 
Old 12-08-2002, 06:09 PM
dk01's Avatar
Ultra Talker

Posts: 373
Location: Ames, IA
Trades: 0
Http authorization uses .htpasswd (like .htaccess) so it won't work either. I know! it is such a pain in the *** but apache windows is not designed for security

My advice. Get a cheap linux host.
I am using: http://www.sbyweb.net
and have had no problems. I only suggest them because they give you all the security access to htaccess, htpasswd, and any other security you might need.
-dk
-dk
__________________
Did I help you? If so, be nice and throw me some
Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
dk01 is offline
Reply With Quote
View Public Profile
 
Old 12-09-2002, 12:01 AM Php login script
Digital-SyntaX's Avatar
Average Talker

Posts: 15
Location: Perth, Australia
Trades: 0
i don't know the first thing about php coding. can someone take a bit of time just to write this code for me -

$user = admin
$password = syntax

once form is sent -

if $user = admin
and
$password = syntax

go to admin-home.php

if $user does not = admin
or
$password does not = syntax

return message - "Sorry, the user does not exist"

this can just be a simple php script, or it can be a mysql driven script. however it would be better if the script was text based.

cheers
Digital-SyntaX is offline
Reply With Quote
View Public Profile
 
Old 12-09-2002, 05:13 PM
dk01's Avatar
Ultra Talker

Posts: 373
Location: Ames, IA
Trades: 0
Sorry exams are coming up. No time. Why not invest in a php book and be able to do it yourself? There are hundreds of good ones.
-dk
__________________
Did I help you? If so, be nice and throw me some
Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
dk01 is offline
Reply With Quote
View Public Profile
 
Old 12-09-2002, 08:58 PM Php and Mysql Book
Digital-SyntaX's Avatar
Average Talker

Posts: 15
Location: Perth, Australia
Trades: 0
can anyone recommend a good php book that might also cover some mysql? (written in english) - If so just post 'em below.

cheers
Digital-SyntaX is offline
Reply With Quote
View Public Profile
 
Old 12-14-2002, 11:49 AM
david's Avatar
King Spam Talker

Posts: 1,314
Location: Glasgow, UK
Trades: 0
Not a book.... but you could try:

http://www.freewebmasterhelp.com/tutorials/php/
http://www.freewebmasterhelp.com/tutorials/phpmysql/
__________________

Please login or register to view this content. Registration is FREE
- Everything a webmaster needs - for free

Please login or register to view this content. Registration is FREE
- Free web hosts reviewed and rated

Please login or register to view this content. Registration is FREE
- Impartial hosting directory - Add your host today for FREE
david is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to .htaccess, basix http authorization and windows xp
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.27074 seconds with 13 queries