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
SQL Error on torrent Upload
Controls ·  Search New posts · Mark unread

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

2020-05-16 20:41:48
Hi @ll
Hope you can see the mistake I take a look all over but doesn't find it or I`m blind .
Is there a possibility that the mysql version is too high ?
Using PHP 7.2.20 Mysql 5.6.40

Database Error in torrents-upload.php on line 204: Incorrect integer value: '' for column 'numfiles' at row 1. Query was: INSERT INTO torrents (filename, owner, name, descr, image1, image2, category, added, info_hash, size, numfiles, save_as, announce, external, nfo, torrentlang, anon, last_action, imdb) VALUES ('Straika_D-Personne-SINGLE-WEB-FR-2020-H5N1.torrent', '1', 'Straika D-Personne-SINGLE-WEB-FR-2020-H5N1', 'Test', '10.jpg', '', '217', '2020-05-15 13:43:01', 'f518966c112a27dce10f545de4b034c285a45277', '10147983', '', 'Straika_D-Personne-SINGLE-WEB-FR-2020-H5N1.torrent', 'http://test.info/announce.php', 'no', 'yes', '1','yes', '2020-05-15 13:43:01', '').

 
Here is the Line 204

$ret = SQL_Query_exec("INSERT INTO torrents (filename, owner, name, descr, image1, image2, category, added, info_hash, size, numfiles, save_as, announce, external, nfo, torrentlang, anon, last_action, imdb) VALUES (".sqlesc($fname).", '".$CURUSER['id']."', ".sqlesc($name).", ".sqlesc($descr).", '".$inames[0]."', '".$inames[1]."', '".$catid."', '" . get_date_time() . "', '".$infohash."', '".$torrentsize."', '".$filecount."', ".sqlesc($fname).", '".$announce."', '".$external."', '".$nfo."', '".$langid."','$anon', '".get_date_time()."', '".$imdb."')");


Error occurs with both versions : TTv3 and TTv3modded

Thanks for Your answer
2020-05-16 21:32:49
try before your query

var_dump($filecount);


$filecount is not returning a correct int value to SQL query.
2020-05-17 17:57:55
Hi
I had all tested can“t find the mistake .
The $filecount value is empty , I check the parse both Version equal .
This is kind of weird.
I will test with younger Version of Mysql
2020-05-18 07:21:47
check to see if your mysql is running in strict mode
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)
2020-05-19 09:20:20
You can insert a dummy INT into it, as its only determining file count (not a big deal for debugging query). These can be changed all the time in torrents table, its just the upload step.
2020-05-23 12:27:23
Hi STorrents2020
Sorry for the late replay but a lot of work at the moment .
This might be a stupid question for some people but where exactly should the dummy INT be installed ?


Thanks for answers KD
2020-05-23 12:59:58
Try
$filecounts = (int)$filecount;
$ret = SQL_Query_exec("INSERT INTO torrents (filename, owner, name, descr, image1, image2, category, added, info_hash, size, numfiles, save_as, announce, external, nfo, torrentlang, anon, last_action, imdb) VALUES (".sqlesc($fname).", '".$CURUSER['id']."', ".sqlesc($name).", ".sqlesc($descr).", '".$inames[0]."', '".$inames[1]."', '".$catid."', '" . get_date_time() . "', '".$infohash."', '".$torrentsize."', '".$filecounts."', ".sqlesc($fname).", '".$announce."', '".$external."', '".$nfo."', '".$langid."','$anon', '".get_date_time()."', '".$imdb."')");

Your query may be different just change filecount to filecounts
2020-05-27 09:23:46
Thanks for answer m-jay
I had change it and make a test , no errors , torrent will be copied to the right folder .
After uploading there is a white page and the torrent is not visible. I checked the DB again but there was no entry . Torrent display is zero . It seems to be the same as with the MVC/PDO version of you, which propaganda tested. No errors, everything seems to be OK, only nothing was uploaded. DB connectivity is present and tested.
Only it doesn't write anything into the table, therefore no torrent display. Maybe you still have an idea.

Thanks KD
2020-05-27 09:47:34
A white page could help, put this in functions.php at top under <?php

ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);

This is for testing and should be removed after or changed to

ini_set('display_errors', 0);
ini_set('display_startup_errors', 0);
// error_reporting(E_ALL);

This should make the error show on white page

You can also try look at cpanel
You host control panel where you edit files on server it should have a search bar type in error and see if anything comes up
2020-05-27 13:29:30
Let's try this updater code I'm posting later, and see what comes of it. A HTML page will need to be made with a form to send to it (takes a few minutes), otherwise its great. Tested on several public linux torrents from public trackers respectfully, and brings up all data quickly. Images should fly too, no messing around really
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: 1
  • Members: 0
  • Guests online: 1
  • Comments: 3
  • Messages: 1,728