Login
Username: Password:
Remember me

[Sign Up] / [Recover Password]

Theme / Language

Popular
New Torrents
new name
Size: 18.40 MB
Most active
new name
S: 74 L: 3
New Posters
How to fix "Database Error. Please report this to an administrator"
Controls ·  Search New posts · Mark unread

You are in: Forum / Forum / Torrent Trader / v3 Support

2022-02-01 09:14:14
How to fix "Database Error. Please report this to an administrator" ?
v TT v3.0
Database Error.png
File missing

www.allinonetorrent.com
2022-02-01 09:49:51
you need to post the database error from the ACP. Also, what were you trying to do. More details will help
TTv3 Micro Edition
Ubuntu 20.04.6 LTS Server
Mysql Version: 10.3.39-MariaDB-0ubuntu0.20.04.2
PHP Version: 7.4.3-4ubuntu2.20
Apache Version: Apache/2.4.59 (Ubuntu)
2022-02-01 10:41:00
I try Upload torrent then this problem
www.allinonetorrent.com
2022-02-01 12:26:21
faruk:
I try Upload torrent then this problem  


Do you make some changes in some part of script?
Sometimes problem is in the character like: ', *, ~, ; or similar if you have that in torrent name


www.exyusubs.com
TorrentTrader V3.8.3 (SE)
OS: AlmaLinux 9.9 (BC)
Apache version: 2.4.71
PHP version: 8.5.13 (PHP-FPM)
MySQL version: 10.11.18-MariaDB
2022-02-06 03:25:42
Modify the top of torrents-upload.php to look like this. This will let you know what's going on. They should of implemented a exception class for these purposes future-proofing the script itself. Anyway.. do this:

<?
error_reporting(E_ALL);

2022-02-06 03:44:13
you will need to tell you provider to activate global sql mod. if you are on your own server  vps for ex. add this
mysql -u root -p -e "SET GLOBAL sql_mode = 'NO_ENGINE_SUBSTITUTION';"
2022-02-06 03:51:58
@Botanicar - then you simply do this in torrents-upload.php around line 92-93 (TTv3):

Replace:

if (!empty($_POST["name"]))
  $name = $_POST["name"];


With this:


$name = (isset($_POST['name']) && !empty($_POST['name'])) ? preg_replace('/[^a-zA-Z0-9_ %\[\]\.\(\)%&-]/s', '', $_POST['name']) : 'Unknown Name';


That will filter special chars and provide a fallback if a name is not used at all. Enjoy
2022-02-06 03:58:12
ill try this but the only think that was working for was that code in server i will try this and come with feedback
2022-02-06 04:01:44
Quote:
$name = (isset($_POST['name']) && !empty($_POST['name'])) ? preg_replace('/[^a-zA-Z0-9_ %\[\]\.\(\)%&-]/s', '', $_POST['name']) : 'Unknown Name';


ok for me its not working this just the code above , or i think he should take a look at torrent table and  see if it is marked as A_I

I just say this because i have had this issue and it is because of server or because it is not A_I
Last edited by djlive on 2022-02-06 04:04:18
2022-02-06 04:11:53
$name = (isset($_POST['name']) && !empty($_POST['name'])) ? preg_replace('/[^a-zA-Z0-9_ %\[\]\.\(\)%&-]/s', '', $_POST['name']) : 'Unknown Name'


try the code  but i doubt it will work


try first think :
#1 put A_I in table torrents at ID
#2 put the code in server
mysql -u root -p -e "SET GLOBAL sql_mode = 'NO_ENGINE_SUBSTITUTION';"


i am not saing its not good the code that STorrents2020 told but i have managed the error and i think thats the problem with wath you said


Last edited by djlive on 2022-02-06 04:14:10
2022-02-06 04:37:56
Why on earth are you adding non-integer values as the primary key in your table? Is that even possible?

The code is perfect. Trust me, I would get out of your database before other things begin to go haywire, just a word of advice. This is why experienced never encourage others clearly in need of help to race over and start editing fields/types/Engines.

2022-02-06 04:42:02
STorrents2020:
Why on earth are you adding non-integer values as the primary key in your table? Is that even possible?The code is perfect. Trust me, I would get out of your database before other things begin to go haywire, just a word of advice. This is why experienced never encourage others clearly in need of help to race over and start editing fields/types/Engines.

i am not saying that is not the perfect code, for me it is noit good , and that code was working i dont undestnad why you are so angry??  ðŸ˜²
i just  hope it's not a threat
Last edited by djlive on 2022-02-06 04:43:58
2022-02-06 04:46:40
i just wanted ti help because your code didnt helpd me and i was just triyng to help Sry if i did something wrong
i didnt meant to offense you
Last edited by djlive on 2022-02-06 04:48:12
2022-02-06 04:58:11
Anyway, what is the error mesage?
2022-02-06 05:13:08
STorrents2020:
Anyway, what is the error mesage?


How to fix "Database Error. Please report this to an administrator" ?
thats what i have try to explain that i have had this error and i fixed with with the code that you said that its not good
and tha next thing was when i was put the backup it didnt take the A_I for table torrents i dont know why
if i am wrong with something i apologize again

I just wanted to say what i have done to this error
Users online

No users online

Search



Statistics

    Torrents

  • Tracking: 3
  • Todays torrents: 0
  • Seeders: 0
  • Leechers: 0
  • Peers: 0
  • Downloaded: 89.96 GB
  • Uploaded: 9.86 GB

  • Members

  • We have: 838
  • New today: 0
  • Guest today: 9

  • Online

  • Total online: 5
  • Members: 0
  • Guests online: 5
  • Comments: 3
  • Messages: 1,728