Bravo List
Register
Go Back   > Bravo List > Source Code > Archived Trackers > Template Shares
Reply
  #81  
Old 10th April 2013, 06:28
Krypto Krypto is offline
Retired from BVList
 
Join Date: Jan 2008
P2P
Posts: 510
Default
LAMP Install Guide attached, read carefully for the parts that you'll need to change for your own requirements.
Attached Files
File Type: txt Correct Server Setup.txt (5.0 KB, 81 views)
Reply With Quote
The Following User Says Thank You to Krypto For This Useful Post:
majio (10th April 2013)
  #82  
Old 10th April 2013, 15:23
majio majio is offline
Senior Member
 
Join Date: Jun 2009
P2P
Posts: 20
Thumbs up
Thank you so much for the help! Appreciate it!! :D

Installed Linux Mint last night and continued the install of "LAMP" stuff this morning, (Thanks for the perfect guide btw!)

Installed the source and database just like i have done so many times!

Created a admin and startet right away to the upload torrent!

Created one torrent! download torrent from site and the Tracker Announce says WORKING in my uTorrent!!

Again! thank you so much Krypto!! for this!

You really made my day!!!

Thank you Krypto thousands times!

--------------------------------------------------------------------------------------------------------------------------

Bump: a small Error that i have seen for some days, still popping up on my topten.php

while looking at "Peers" i get this error
Quote:
SQL Error

BIGINT UNSIGNED value is out of range in '('0' - unix_timestamp('2013-04-10 14:11:11'))'
?

Bump: There are some issues with the date with the MySQL ..

some pages states: "This page last updated 2025-06-24 14:10:52"



Bump: I think the issue is in the tablet "Peers" Oo

Quote:
BIGINT UNSIGNED value is out of range in '(`tracker`.`peers`.`finishedat` - unix_timestamp(`tracker`.`peers`.`started`))'
Anyone encountered errors like this? must be the date differences...

Dont understand what i can do with the tablet or is it the code not doing it right? hmm..

Bump: A little update! i fixed it by changing the "Finnishedat" Field from INT to DATETIME in MySQL and it works.. :)
That fixed the Topten.php issue with "peers"

Now it works, but some pages still say "This page last updated 2025-06-24 14:10:52" i dont know where this is coming from?

Fixed the my.cnf php.ini Datetime zones etc are all correct, so where is this "typo" or bug coming from?? :P

Fixed it by deleting the files in the "Cache" folder :) so now thats gone! and no errors or issues for me to see :D

Thanks

Bump: Have this ERROR!
Quote:
Fatal error: Call to undefined function stderr() in /var/www/include/functions.php on line 2132
Actually its white page error thing .. i just turned On the show errors in php.ini

I found this 2132 line but it only contains a } and thats it.

Bump: Fixed the White screen that always appears when i install this on a new system..!

The files in the CONFIG directory from my old script..was the reason..

I changed those with new fresh ones and typed in the the information like MySQL info and such and it works now.. i talk about the files "MAIN" "DATABASE" "SECURITY" "TWEAK" and "SMTP"

Bump: Hey i have tried to change the "locale" language on the server and on the SQL database UTF8 and such... to utf8 danish .. close to Norwegian so i can use Æ Ø Å chars but nothing works....

Everytime i use those norwegian characters its making the text Vanish!

Bump: B U M P ! tried everything..feels like it .. oO the norwegian charset are making the txt vanish! ..


Where are all the place i should look for the correct charset ...

btw i have a crap server with the same script.. and there it works! the ÆØÅ chars... but no on my online server... its a Raspberry Pi ... Seeding and Downloading is working!

But not the Unicoding ... Norwegian characters are making the txt vanish..

it just doesn't show up ... :-/

Last edited by majio; 11th April 2013 at 12:43. Reason: oØ
Reply With Quote
  #83  
Old 6th March 2014, 06:48
naotem's Avatar
naotem naotem is offline
Member
 
Join Date: Feb 2009
Brazil
Posts: 11
Default Help bitbucket
Please help me.
I use xam 1.3.9, but bitbucket is not working with "gif".

Does anyone have idea how to solve?
The error appears.
Image processing failed:
Sorry, the uploaded gif processing failed. Try resaving the image in a graphic editor. Thanx.
I tried several gif files and always shows this error.

Sorry for the bad english
Reply With Quote
  #84  
Old 6th March 2014, 10:29
wdq's Avatar
wdq wdq is offline
Senior Member
 
Join Date: Mar 2010
P2P
Posts: 45
Default Hey
Quote:
Originally Posted by naotem View Post
Please help me.
I use xam 1.3.9, but bitbucket is not working with "gif".

Does anyone have idea how to solve?
The error appears.
Image processing failed:
Sorry, the uploaded gif processing failed. Try resaving the image in a graphic editor. Thanx.
I tried several gif files and always shows this error.

Sorry for the bad english
in root folder you have bitbucket-upload.php open it and the first lines will tell you that is accepting gif pictures you just need to upload them in a specific size
PHP Code:
$maxfilesize 256 1024;
$imgtypes = array (null,'gif','jpg','png');
$scaleh 150// set our height size desired
$scalew 150// set our width size desired 
how you can see the height of the picture needs to be 150px
and the width is set the same the max file size is 256px x 1024px
modify those lines to fit your needs or just upload a picture that is 150 x 150 .
hope thius helps.
Reply With Quote
The Following User Says Thank You to wdq For This Useful Post:
naotem (7th March 2014)
  #85  
Old 7th March 2014, 05:38
naotem's Avatar
naotem naotem is offline
Member
 
Join Date: Feb 2009
Brazil
Posts: 11
Default
Thanks for the help but it did not work.
The images in jpg and png work but are not supported in gif, tried several gif of various sizes and always shows the error:
Image processing failed
Sorry, the uploaded gif failed processing. Try resaving the image in a graphic editor. Thanx

This is my bitbucket-upload.php
PHP Code:
<?php
require "include/bittorrent.php";
dbconn();
loggedinorreturn();
maxsysop ();
parked();
$maxfilesize 256 1024;
$imgtypes = array (null,'gif','jpg','png');
$scaleh 150// set our height size desired
$scalew 150// set our width size desired

if ($_SERVER["REQUEST_METHOD"] == "POST")
{
$file $_FILES["file"];
if (!isset(
$file) || $file["size"] < 1)
stderr("Upload failed""Nothing received!");
if (
$file["size"] > $maxfilesize)
stderr("Upload failed""Sorry, that file is too large for the bit-bucket.");
$pp=pathinfo($filename $file["name"]);
if(
$pp['basename'] != $filename)
stderr("Upload failed""Bad file name.");
$tgtfile "$bitbucket/$filename";
if (
file_exists($tgtfile))
stderr("Upload failed""Sorry, a file with the name <b>" htmlspecialchars($filename) . "</b> already exists in the bit-bucket.",false);

$size getimagesize($file["tmp_name"]);
$height $size[1];
$width $size[0];
$it $size[2];
if(
$imgtypes[$it] == null || $imgtypes[$it] != $pp['extension'])
stderr("Error""Invalid extension: <b>GIF, JPG ou PNG apenas!</b>",false);

// Scale image to appropriate avatar dimensions
$hscale=$height/$scaleh;
$wscale=$width/$scalew;
$scale=($hscale && $wscale 1) ? : ( $hscale $wscale) ? $hscale $wscale;
$newwidth=floor($width/$scale);
$newheight=floor($height/$scale);
$orig=($it==1)?@imagecreatefromgif($file["tmp_name"]): ($it==2)?@imagecreatefromjpeg($file["tmp_name"]):@imagecreatefrompng($file["tmp_name"]);
if(!
$orig)
stderr("Image processing failed","Sorry, the uploaded $imgtypes[$it] failed processing. Try resaving the image in a graphic editor. Thanx");
$thumb imagecreatetruecolor($newwidth$newheight);
imagecopyresized($thumb$orig0000$newwidth$newheight$width$height);
$ret=($it==1)?imagegif($thumb$tgtfile): ($it==2)?imagejpeg($thumb$tgtfile):imagepng($thumb$tgtfile);

$url str_replace(" ""%20"htmlspecialchars("$BASEURL/bitbucket/$filename"));
$name sqlesc($filename);
$added sqlesc(get_date_time());
if (
$_POST['public'] != 'yes' 
    
$public='"0"';
else 
    
$public='"1"';
sql_query("INSERT INTO bitbucket (owner, name, added, public) VALUES ($CURUSER[id]$name$added$public)") or sqlerr(__FILE____LINE__);
sql_query("UPDATE users SET avatar = ".sqlesc($url)." WHERE id = $CURUSER[id]") or sqlerr(__FILE____LINE__);
stderr("Success""Use the following URL to access the file: <br><b><a href=\"$url\">$url</a></b><p><a href=bitbucket-upload.php>Upload another file</a>.<br><br><img src=\"$url\" border=0><br><br>Image ". ($width=$newwidth && $height==$newheight "doesn't require rescaling":"Image rescaled from $height x $width to $newheight x $newwidth") .'.<br>Note: Your profile has been updated!',false);
}

stdhead("AVATAR Upload");
?>
<h1>AVATAR Upload</h1>
<form method="post" action="<?=$_SERVER[SCRIPT_NAME];?>" enctype="multipart/form-data">
<table border=1 cellspacing=0 cellpadding=5>
<?
$disclaimer 
"
<tr><td colspan=2 align=center><div class=alert align=justify>Disclaimer:
Do not upload unauthorized or illegal pictures. Uploaded pictures should be considered \"public domain\"; do not upload pictures you wouldn't want a stranger to have access to. Uploaded images will be scaled to 
$scaleh x $scalew
<br><br>Maximum file size: "
.number_format($maxfilesize)." bytes.</div>
"
;
if(!
is_writable("$bitbucket"))
    print(
"<tr><td class=rowhead colspan=2><div class=alert>ATTENTION: Upload directory isn't writable. Please contact the administrator about this problem!</div></tr></td>");
print(
"$disclaimer");
?>
<tr><td class=rowhead>File</td><td><input type="file" name="file" size="60"></td></tr>
<tr><td colspan=2 align=center><input type=checkbox name=public value=yes>Other users can use my avatar (It's choosable in the profile). <input type="submit" value="Upload"></td></tr>
</table>
</form>
<?
stdfoot
();
?>
Any other solution?
Reply With Quote
  #86  
Old 8th March 2014, 03:12
hunt3r1989 hunt3r1989 is offline
Member
 
Join Date: Jan 2010
P2P
Posts: 4
Default Upload error
Hi! when i try to upload a torrent after i push the button upload he show me this error Upload failed!
dictionary is missing key(s)
Reply With Quote
  #87  
Old 16th March 2014, 09:39
RexJoker123 RexJoker123 is offline
Member
 
Join Date: Mar 2014
P2P
Posts: 3
Default FAILED LOGIN!
Error: Username or password incorrect!

Don't remember your password? Recover your password!

I WRITE MY PASSWORD :@
Reply With Quote
  #88  
Old 18th April 2014, 21:29
naotem's Avatar
naotem naotem is offline
Member
 
Join Date: Feb 2009
Brazil
Posts: 11
Default
How to donate restart?
The month started and donations not resumed, it was the same amount donated in the previous month.
I want to know how do I go back to zero donations and donations to redial the current month.

Sorry for the bad English.

Quote:
Originally Posted by wdq View Post
in root folder you have bitbucket-upload.php open it and the first lines will tell you that is accepting gif pictures you just need to upload them in a specific size
PHP Code:
$maxfilesize 256 1024;
$imgtypes = array (null,'gif','jpg','png');
$scaleh 150// set our height size desired
$scalew 150// set our width size desired 
how you can see the height of the picture needs to be 150px
and the width is set the same the max file size is 256px x 1024px
modify those lines to fit your needs or just upload a picture that is 150 x 150 .
hope thius helps.

Ok I'm a noob, but I found a way to make the script work, it seems the imagecreatefromgif () does not give much right with the imagecreatetruecolor () and imagecopyresized ().
I made a change in the part of "$ orig = ($ it =" replace the code for a part of tbsource.
I made several tests and it worked well.
Just got the new bitbucket:

PHP Code:
<?php
require "include/bittorrent.php";
dbconn();
loggedinorreturn();

parked();
$maxfilesize 256 1024;
$imgtypes = array (null,'gif','jpg','png');
$scaleh 150// set our height size desired
$scalew 150// set our width size desired

if ($_SERVER["REQUEST_METHOD"] == "POST")
{
$file $_FILES["file"];
if (!isset(
$file) || $file["size"] < 1)
stderr("Upload failed""Nothing received!");
if (
$file["size"] > $maxfilesize)
stderr("Upload failed""Sorry, that file is too large for the bit-bucket.");
$pp=pathinfo($filename $file["name"]);
if(
$pp['basename'] != $filename)
stderr("Upload failed""Bad file name.");
$tgtfile "$bitbucket/$filename";
if (
file_exists($tgtfile))
stderr("Upload failed""Sorry, a file with the name <b>" htmlspecialchars($filename) . "</b> already exists in the bit-bucket.",false);

$size getimagesize($file["tmp_name"]);
$height $size[1];
$width $size[0];
$it $size[2];
if(
$imgtypes[$it] == null || $imgtypes[$it] != $pp['extension'])
stderr("Error""Invalid extension: <b>GIF, JPG or PNG only!</b>",false);

// Scale image to appropriate avatar dimensions
$hscale=$height/$scaleh;
$wscale=$width/$scalew;
$scale=($hscale && $wscale 1) ? : ( $hscale $wscale) ? $hscale $wscale;
$newwidth=floor($width/$scale);
$newheight=floor($height/$scale);


    
$it = @exif_imagetype($file["tmp_name"]);
    if (
$it != IMAGETYPE_GIF && $it != IMAGETYPE_JPEG && $it != IMAGETYPE_PNG)
        
stderr("Image not recognized");

    
$i strrpos($filename".");
    if (
$i !== false)
    {
        
$ext strtolower(substr($filename$i));
        if ((
$it == IMAGETYPE_GIF && $ext != ".gif") || ($it == IMAGETYPE_JPEG && $ext != ".jpg") || ($it == IMAGETYPE_PNG && $ext != ".png"))
            
stderr("invalid extension");
    }
    else
        
stderr("Image processing failed","Sorry, the uploaded $imgtypes[$it] failed processing. Try resaving the image in a graphic editor. Thanx");
    
move_uploaded_file($file["tmp_name"], $tgtfile) or stderr("Image processing failed","Sorry, the uploaded $imgtypes[$it] failed processing. Try resaving the image in a graphic editor. Thanx");
    

$url str_replace(" ""%20"htmlspecialchars("$BASEURL/bitbucket/$filename"));
$name sqlesc($filename);
$added sqlesc(get_date_time());
if (
$_POST['public'] != 'yes' )
    
$public='"0"';
else
    
$public='"1"';
sql_query("INSERT INTO bitbucket (owner, name, added, public) VALUES ($CURUSER[id]$name$added$public)") or sqlerr(__FILE____LINE__);
sql_query("UPDATE users SET avatar = ".sqlesc($url)." WHERE id = $CURUSER[id]") or sqlerr(__FILE____LINE__);
stderr("Success""Use the following URL to access the file: <br><b><a href=\"$url\">$url</a></b><p><a href=bitbucket-upload.php>Upload another file</a>.<br><br><img src=\"$url\" border=0><br><br>Image ". ($width=$newwidth && $height==$newheight "doesn't require rescaling":"Image rescaled from $height x $width to $newheight x $newwidth") .'.<br>Note: Your profile has been updated!',false);
}

stdhead("AVATAR Upload");
?>
<h1>AVATAR Upload</h1>
<form method="post" action="<?=$_SERVER[SCRIPT_NAME];?>" enctype="multipart/form-data">
<table border=1 cellspacing=0 cellpadding=5>
<?
$disclaimer 
"
<tr><td colspan=2 align=center><div class=alert align=justify>Disclaimer:
Do not upload unauthorized or illegal pictures. Uploaded pictures should be considered \"public domain\"; do not upload pictures you wouldn't want a stranger to have access to. Uploaded images will be scaled to 
$scaleh x $scalew
<br><br>Maximum file size: "
.number_format($maxfilesize)." bytes.</div>
"
;
if(!
is_writable("$bitbucket"))
    print(
"<tr><td class=rowhead colspan=2><div class=alert>ATTENTION: Upload directory isn't writable. Please contact the administrator about this problem!</div></tr></td>");
print(
"$disclaimer");
?>
<tr><td class=rowhead>File</td><td><input type="file" name="file" size="60"></td></tr>
<tr><td colspan=2 align=center><input type=checkbox name=public value=yes>Other users can use my avatar (It's choosable in the profile). <input type="submit" value="Upload"></td></tr>
</table>
</form>
<?
stdfoot
();
?>
Bump: This missing part of the function code from here ...
The missing part that checks if the user is the same owner of the site, or sysop...
in include/functions.php after "include($rootpath . 'include/globalfunctions.php');"
added:
PHP Code:
//---------------------------------
//---- Max. Sysops v0.2 by xam
//---------------------------------
function maxsysop () {
global 
$CURUSER;
// Check Staff Names
$lmaxclass  7;
$lsysopnames = array("Beto""Beto|lol"); // Case sensitive. Change this (YOUR SYSOP-ADMIN NAMES GOES HERE) (example: array("adminname1","adminname2","adminname3","adminname4","so far")
    
if ($CURUSER["class"] >= $lmaxclass)
        if (!
in_array($CURUSER["username"], $lsysopnamestrue)) { // true for strict comparison
            
$msg "Fake Account Detected: Username: ".$CURUSER["username"]." - UserID: ".$CURUSER["id"]." - UserIP : ".getip();
            
write_log($msg);
            
stderr("Access Denied!","We come to believe you are using a fake account, therefore we've logged this action!");
        }
// Check Staff IDS            
define ('UC_STAFF'7); // Minumum Staff Level (4= UC_MODERATOR)
if ($CURUSER['class'] >= UC_STAFF) {
    
$allowed_ID = array(1,6); // Change this (YOUR SYSOP-ADMIN IDS GOES HERE) (example: array(1,2,3,4,5))
        
if (!in_array((int)$CURUSER['id'], $allowed_IDtrue)) { // true for strict comparison
            
$msg "Fake Account Detected: Username: ".$CURUSER["username"]." - UserID: ".$CURUSER["id"]." - UserIP : ".getip();
            
write_log($msg);
            
stderr("Access Denied!","We come to believe you are using a fake account, therefore we've logged this action!");            
        }        
    }

Reply With Quote
  #89  
Old 4th December 2017, 18:24
DjBlack DjBlack is offline
Senior Member
 
Join Date: May 2013
Slovenia
Posts: 20
Unhappy TSSE 1.3.9
Hi when install this script show me this



Processing file: torrent.sql
Starting at the line: 1
Error at the line 17: ) TYPE=MyISAM;
Query: CREATE TABLE `addedrequests` ( `id` int(10) unsigned NOT NULL auto_increment, `requestid` int(10) unsigned NOT NULL default '0', `userid` int(10) unsigned NOT NULL default '0', PRIMARY KEY (`id`), KEY `pollid` (`id`), KEY `userid` (`userid`), KEY `requestid_userid` (`requestid`,`userid`) ) TYPE=MyISAM;
MySQL: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'TYPE=MyISAM' at line 9
Stopped on error






whats is wrong how to fix
Reply With Quote
  #90  
Old 18th January 2018, 11:19
szaby szaby is offline
Senior Member
 
Join Date: Jul 2008
Posts: 34
Default
Quote:
Originally Posted by DjBlack View Post
Hi when install this script show me this



Processing file: torrent.sql
Starting at the line: 1
Error at the line 17: ) TYPE=MyISAM;
Query: CREATE TABLE `addedrequests` ( `id` int(10) unsigned NOT NULL auto_increment, `requestid` int(10) unsigned NOT NULL default '0', `userid` int(10) unsigned NOT NULL default '0', PRIMARY KEY (`id`), KEY `pollid` (`id`), KEY `userid` (`userid`), KEY `requestid_userid` (`requestid`,`userid`) ) TYPE=MyISAM;
MySQL: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'TYPE=MyISAM' at line 9
Stopped on error






whats is wrong how to fix
TYPE is depracated. Use ENGINE=MyISAM everywhere
Reply With Quote
Reply

Tags
tsse

Thread Tools

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

Forum Jump



All times are GMT +2. The time now is 02:50. vBulletin skin by ForumMonkeys. Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.