PDA

View Full Version : vb3 uploading service


shukoor
02-19-2004, 02:37 PM
i had my Uploading service Center working in VB2...

but now after i upgraded its not workin at all :dead:

its intregation is depending on a file called "authvb.php" where it query the database

im sure u guys understand what im saying and now its totaly not workin after i upgraded my forum to vb3

i just need help around and someone to modify the code for me so that i use it again coz i need it in my site alot

look here

<?php
$auth = "false";
if (isset( $PHP_AUTH_USER ) && isset( $PHP_AUTH_PW )) {
mysql_connect( $checkservername, $dbcheckusername, $dbcheckpassword )
or die ( 'Unable to connect to server.' );
mysql_select_db( $dbcheckbase )
or die ( 'Unable to select database.' );
if ($encryptedpw) {
$chkpw = md5($PHP_AUTH_PW);
} else {
$chkpw = $PHP_AUTH_PW;
}
$sql = "SELECT * FROM user WHERE
username = '$PHP_AUTH_USER' AND
password = '$chkpw' AND
(usergroupid = '2' or usergroupid = '5' or usergroupid = '6' or usergroupid = '7' or usergroupid = '8' or usergroupid = '668' or usergroupid = '669')";
$result = mysql_query( $sql )
or die ( 'Unable to execute query.' );
$num = mysql_numrows( $result );
if ( $num != 0 ) {
$auth = "true";
}
}
?>

Dark_Wizard
02-19-2004, 02:47 PM
Change this:

$sql = "SELECT * FROM user WHERE


To this:

$sql = "SELECT * FROM " . TABLE_PREFIX . "user WHERE


If that doesn't work then the issue lies elsewhere...I would need to see the full script. Also the change I made needs to stay there as vb now uses table prefixes...

shukoor
02-19-2004, 03:49 PM
here is the hack it was released for vb2 :disappointed:
but when i installed vb3 it stoped working
i really hope some one give me the right answer coz i tried the
the above one and didn't work out :disappointed:

i tried to upload the zip file but it was not gettin uploaded anyway heres is all the hack files

Dark_Wizard
02-19-2004, 03:54 PM
Hacks for vb2 WILL NOT work for vb3....plain and simple. It would have to be rewritten...

shukoor
02-19-2004, 04:02 PM
i guess not coz the only problem is with the authvb.php file and the way it tries to request the password from the database coz there is a some new things they added to the md5 called salt and im not into that much i wish i get some help guys

Andreas
02-19-2004, 05:06 PM
Change

if ($encryptedpw) {
$chkpw = md5($PHP_AUTH_PW);
} else {
$chkpw = $PHP_AUTH_PW;
}

To

if ($encryptedpw) {
$chkpw = "MD5(CONCAT('" . addslashes($PHP_AUTH_PW) . "', salt))";
} else {
$chkpw = "MD5(CONCAT(MD5('" . addslashes($PHP_AUTH_PW) . "'), salt))";
}

Change

password = '$chkpw' AND


To

password = $chkpw AND


This might work.

Dark_Wizard
02-19-2004, 05:20 PM
LOL...I just PM'ed him a fix...

toadyd
03-21-2004, 09:22 AM
Are you willing to share your fix here?