sslug-teknik team mailing list archive
-
sslug-teknik team
-
Mailing list archive
-
Message #42240
.htaccess & PHP
Hejsa/Hello sslug-proc,
håber ikke jeg har skyder for meget ved siden mht. hvilken
maillinglist jeg skal skrive til!!!
svar venligst pr. email da jeg ikke får tilsendt fra sslug-prog
mailling liste
--
jeg har et lille sprøgsmål om apache/php..
hvordan definere man at en skal auto_prependes i sin .htaccess fil
med PHP4 ..
jeg har kigget på php.net dokumentation der står der at man skal
bruge php_value name value
og det har jeg gjort i min .htaccess står der:
php_value auto_prepend_file auth.php
og auth.php ligger i samme bib som .htaccess
men den vil ikke gøre det som jeg vil .. nemlig styre om man skal
have lov til at se biblioteket
min auth.php ser sådan ud:
$cid = mysql_connect("localhost","root","<password>");
mysql_select_db("unidb");
$num = mysql_num_rows(mysql_query("select * from user")) or die(mysql_error());
function verify($user, $pass) {
for ($i=0;$i<$num;$i++) {
$result = mysql_query("select * from user where id = '$i'");
$temp = mysql_fetch_object($result);
$tempo = mysql_fetch_array(mysql_query("select PASSWORD('$pass')"));
}
return "0" // dette er midlertidig skal rettes !!!
}
if (!verify($PHP_AUTH_USER, $PHP_AUTH_PW)) {
header ('WWW-authentication: Basic Realm="Password protected"');
header ("$SERVER_PROTOCOL 401 Unauthorized");
exit;
}
--
Hilsen/Best Regards,
Dennis mailto:sak@xxxxxxxxx
ICQ: 95538209
IRC: DALnet #startrek-central-denmark
WWW: http://privnet.dyndns.dk
--
The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material. Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipient is prohibited. If you received
this in error, please contact the sender and delete the material from any
computer.
Follow ups