TinyPortal

Started by lurkalot, February 12, 2005, 04:43:00 AM

Previous topic - Next topic

tinoest

The changes made to 2.0.19 are actually fairly minimal now. You can see them in manual installation instructions on the Mod Site.

Empty files suggests something wrong with SMF rather than TinyPortal itself.

ssduser

#3061
Quote from: @rjen on January 21, 2022, 10:03:34 AMYou cannot exchange TP1.3 files with a TP2.1 install, can you Uninstall TP2.1? Or does it not show installed?

It shows that it is installed. When I try to uninstall, there are some errors in the following files:

./index.php
./Sources/Load.php
./Sources/Subs.php
./Sources/QueryString.php
./Sources/Subs-Editor.php

Edit: When I pull the files down that are in question when uninstalling however, the code that I need to replace is not in the file that I'm expecting it to be. For instance, the package manager asks me to replace a section of code in Load.php, but when I pull that file down, I'm seeing that the code that needs to be replaced is not there. Maybe there is an issue with my directories. Should I remove all other themes in my Themes folder other than the one I'm using?

Edit 2: Sorry, last edit for this post. I went through my sources folders and found those files and files of the same name with a ~ appended on the end, like Load.php~. So I removed them, uninstalled TP2.1, and reinstalled, only to find that those files reappear back in my sources folder. Is this strange behavior?

ssduser

I've gone ahead and uploaded all the files from TP2.1 package in their respective directories, and ran the do_hooks file in my forums main directory, and still can't see the TP admin page or anything related to TP (other than the TinyPortal signature in the footer). At least when I try to go to Admin.php in the TinyPortal directory, I'll get "Hacking attempt" which indicates that the files are there at least.

Not entirely sure what the issue is. I checked all the SMF core files and everythings up to date. We were using TinyPortal for moderator Shoutbox and Recent Posts displayed in the sidebar, but I may just give up trying to install TP and find an alternative at this point.

tinoest

Hacking Attempt will only appear if SMF hasn't loaded properly. The fact that the install process also wasn't run correctly sounds like you have a more fundemental issue with the SMF installation. As install.php won't run if it doesn't detect the same things that TPAdmin is complaining about.

Can you export the structure of the tables within your database starting tp_* , I'm curious as to if they are the latest or stuck on an older version.

Mike66

Quote from: tinoest on December 20, 2021, 08:19:54 PMIt might be that it doesn't work.

What version of SMF are you using and what do you want the page to show? As in what option would you choose if you hadn't chosen forum as front page.

This one in this post might also work for you https://www.tinyportal.net/index.php?topic=36058.msg299089#msg299089

The settings line needs changing.
 

Gave it another go with a fresh set of eyes - success, got the standalone working now thanks  8)

I used the version in that post that didn't need any edits.

Cheers
Mike

ssduser

Quote from: tinoest on January 21, 2022, 05:18:57 PMCan you export the structure of the tables within your database starting tp_* , I'm curious as to if they are the latest or stuck on an older version.

So now this got me thinking. I can export the table structure, but before I do that, I should mention that this forum has had an ongoing issue. User's cannot copy and paste certain content from a website, document, what have you into a post or message (things that include ", --, or other characters).

That sounded like an encoding issue to me, so when I went to check the database, I saw that the original DB was using utf8mb3 collation, which I knew was outdated. I tried manually updating from uft8mb3 to utf8mb4 but that issue still persists. Currently, all tp_* data tables are using utf8mb3. Should I try to update those to utf8mb4? Running the database UTF update will throw some errors about content being too long for column x


Below is UTF related information found on my db home page
Server charset: UTF-8 Unicode (utf8mb3)
Server connection collation: utf8mb4_unicode_ci

vbgamer45

I would try doing that. You may have to change individual fields as well as they might have the old encoding in the table set.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

tinoest

Quote from: ssduser on January 24, 2022, 02:06:11 PMCurrently, all tp_* data tables are using utf8mb3. Should I try to update those to utf8mb4?

I think you need to resolve the issue with TinyPortal thinking that SMF isn't installed first. This will only cause more issues.

ssduser

Quote from: tinoest on January 24, 2022, 02:50:28 PMI think you need to resolve the issue with TinyPortal thinking that SMF isn't installed first.

Could you elaborate on why TinyPortal would think that SMF isn't installed? I'm sure the amount of issues that could cause this are vast, but do you have any suggestions on what to check first? You had mentioned that the tp_ related data tables could be stuck on an older version. How would I be able to diagnose if a table's version is outdated?

Below is an export of the structure of all _tp_ related tables in my database:

-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Generation Time: Jan 24, 2022 at 06:59 PM
-- Server version: 10.6.4-MariaDB
-- PHP Version: 7.4.25

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;

--
-- Database: `bitnami_smf`
--

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

--
-- Table structure for table `smf_tp_articles`
--

CREATE TABLE `smf_tp_articles` (
  `id` int(11) NOT NULL,
  `date` int(11) NOT NULL DEFAULT 0,
  `body` longtext DEFAULT NULL,
  `intro` text DEFAULT NULL,
  `useintro` smallint(1) NOT NULL DEFAULT 0,
  `category` smallint(6) NOT NULL DEFAULT 0,
  `frontpage` smallint(1) NOT NULL DEFAULT 0,
  `subject` text DEFAULT NULL,
  `author_id` int(11) NOT NULL DEFAULT 0,
  `author` text DEFAULT NULL,
  `frame` tinytext DEFAULT NULL,
  `approved` smallint(6) NOT NULL DEFAULT 0,
  `off` smallint(6) NOT NULL DEFAULT 0,
  `options` text DEFAULT NULL,
  `parse` smallint(6) NOT NULL DEFAULT 0,
  `comments` smallint(4) NOT NULL DEFAULT 0,
  `comments_var` text DEFAULT NULL,
  `views` int(11) NOT NULL DEFAULT 0,
  `rating` text DEFAULT NULL,
  `voters` text DEFAULT NULL,
  `id_theme` smallint(6) NOT NULL DEFAULT 0,
  `shortname` tinytext DEFAULT NULL,
  `sticky` smallint(6) NOT NULL DEFAULT 0,
  `fileimport` text DEFAULT NULL,
  `topic` int(11) NOT NULL DEFAULT 0,
  `locked` smallint(6) NOT NULL DEFAULT 0,
  `illustration` text DEFAULT NULL,
  `headers` text DEFAULT NULL,
  `type` tinytext DEFAULT NULL,
  `global_tag` text DEFAULT NULL,
  `featured` smallint(6) NOT NULL DEFAULT 0,
  `pub_start` int(11) NOT NULL DEFAULT 0,
  `pub_end` int(11) NOT NULL DEFAULT 0
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3;

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

--
-- Table structure for table `smf_tp_blocks`
--

CREATE TABLE `smf_tp_blocks` (
  `id` int(11) NOT NULL,
  `type` smallint(6) NOT NULL DEFAULT 0,
  `frame` tinytext DEFAULT NULL,
  `title` tinytext DEFAULT NULL,
  `body` text DEFAULT NULL,
  `access` text DEFAULT NULL,
  `bar` smallint(4) NOT NULL DEFAULT 0,
  `pos` int(11) NOT NULL DEFAULT 0,
  `off` smallint(1) NOT NULL DEFAULT 0,
  `visible` text DEFAULT NULL,
  `lang` text DEFAULT NULL,
  `display` text DEFAULT NULL,
  `settings` text DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3;

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

--
-- Table structure for table `smf_tp_comments`
--

CREATE TABLE `smf_tp_comments` (
  `id` int(11) NOT NULL,
  `item_type` varchar(255) NOT NULL,
  `item_id` int(11) NOT NULL DEFAULT 0,
  `datetime` int(11) NOT NULL DEFAULT 0,
  `subject` text DEFAULT NULL,
  `comment` text DEFAULT NULL,
  `member_id` int(11) NOT NULL DEFAULT 0
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3;

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

--
-- Table structure for table `smf_tp_data`
--

CREATE TABLE `smf_tp_data` (
  `id` int(11) NOT NULL,
  `type` smallint(4) NOT NULL DEFAULT 0,
  `id_member` int(11) NOT NULL DEFAULT 0,
  `value` smallint(6) NOT NULL DEFAULT 0,
  `item` int(11) NOT NULL DEFAULT 0
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3;

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

--
-- Table structure for table `smf_tp_dldata`
--

CREATE TABLE `smf_tp_dldata` (
  `id` bigint(20) NOT NULL,
  `views` bigint(20) NOT NULL DEFAULT 0,
  `downloads` bigint(20) NOT NULL DEFAULT 0,
  `item` int(11) NOT NULL DEFAULT 0,
  `week` smallint(4) NOT NULL DEFAULT 0,
  `year` smallint(6) NOT NULL DEFAULT 0
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3;

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

--
-- Table structure for table `smf_tp_dlmanager`
--

CREATE TABLE `smf_tp_dlmanager` (
  `id` int(11) NOT NULL,
  `name` tinytext DEFAULT NULL,
  `description` text DEFAULT NULL,
  `icon` text DEFAULT NULL,
  `category` int(11) NOT NULL DEFAULT 0,
  `type` tinytext DEFAULT NULL,
  `downloads` int(11) NOT NULL DEFAULT 0,
  `views` int(11) NOT NULL DEFAULT 0,
  `file` text DEFAULT NULL,
  `created` int(11) NOT NULL DEFAULT 0,
  `last_access` int(11) NOT NULL DEFAULT 0,
  `filesize` int(11) NOT NULL DEFAULT 0,
  `parent` int(11) NOT NULL DEFAULT 0,
  `access` text DEFAULT NULL,
  `link` text DEFAULT NULL,
  `author_id` int(11) NOT NULL DEFAULT 0,
  `screenshot` text DEFAULT NULL,
  `rating` text DEFAULT NULL,
  `voters` text DEFAULT NULL,
  `subitem` int(11) NOT NULL DEFAULT 0,
  `files` int(11) NOT NULL DEFAULT 0,
  `global_tag` text DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3;

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

--
-- Table structure for table `smf_tp_events`
--

CREATE TABLE `smf_tp_events` (
  `id` int(11) NOT NULL,
  `id_member` int(11) NOT NULL DEFAULT 0,
  `date` int(11) NOT NULL DEFAULT 0,
  `textvariable` mediumtext COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `link` mediumtext COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `description` mediumtext COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `allowed` mediumtext COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `eventid` int(11) NOT NULL DEFAULT 0,
  `on` smallint(4) NOT NULL DEFAULT 0
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

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

--
-- Table structure for table `smf_tp_menu`
--

CREATE TABLE `smf_tp_menu` (
  `id` int(11) NOT NULL,
  `name` tinytext DEFAULT NULL,
  `type` tinytext DEFAULT NULL,
  `link` tinytext DEFAULT NULL,
  `parent` tinytext DEFAULT NULL,
  `permissions` mediumtext DEFAULT NULL,
  `enabled` smallint(4) NOT NULL DEFAULT 0
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3;

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

--
-- Table structure for table `smf_tp_settings`
--

CREATE TABLE `smf_tp_settings` (
  `id` mediumint(9) NOT NULL,
  `name` text DEFAULT NULL,
  `value` text DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3;

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

--
-- Table structure for table `smf_tp_shoutbox`
--

CREATE TABLE `smf_tp_shoutbox` (
  `id` int(11) NOT NULL,
  `content` text DEFAULT NULL,
  `time` text DEFAULT NULL,
  `member_link` text DEFAULT NULL,
  `type` tinytext DEFAULT NULL,
  `member_ip` text DEFAULT NULL,
  `member_id` int(11) NOT NULL DEFAULT -2,
  `edit` smallint(4) NOT NULL DEFAULT 0,
  `shoutbox_id` int(3) NOT NULL DEFAULT 1
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3;

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

--
-- Table structure for table `smf_tp_variables`
--

CREATE TABLE `smf_tp_variables` (
  `id` int(11) NOT NULL,
  `value1` text DEFAULT NULL,
  `value2` text DEFAULT NULL,
  `value3` text DEFAULT NULL,
  `type` tinytext DEFAULT NULL,
  `value4` text DEFAULT NULL,
  `value5` int(11) NOT NULL DEFAULT -2,
  `subtype` tinytext DEFAULT NULL,
  `value7` text DEFAULT NULL,
  `value8` text DEFAULT NULL,
  `subtype2` int(11) NOT NULL DEFAULT 0,
  `value9` text DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3;

--
-- Indexes for dumped tables
--

--
-- Indexes for table `smf_tp_articles`
--
ALTER TABLE `smf_tp_articles`
  ADD PRIMARY KEY (`id`);
ALTER TABLE `smf_tp_articles` ADD FULLTEXT KEY `search` (`subject`,`body`);
ALTER TABLE `smf_tp_articles` ADD FULLTEXT KEY `search_subject` (`subject`);
ALTER TABLE `smf_tp_articles` ADD FULLTEXT KEY `search_body` (`body`);

--
-- Indexes for table `smf_tp_blocks`
--
ALTER TABLE `smf_tp_blocks`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `smf_tp_comments`
--
ALTER TABLE `smf_tp_comments`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `smf_tp_data`
--
ALTER TABLE `smf_tp_data`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `smf_tp_dldata`
--
ALTER TABLE `smf_tp_dldata`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `smf_tp_dlmanager`
--
ALTER TABLE `smf_tp_dlmanager`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `smf_tp_events`
--
ALTER TABLE `smf_tp_events`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `smf_tp_menu`
--
ALTER TABLE `smf_tp_menu`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `smf_tp_settings`
--
ALTER TABLE `smf_tp_settings`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `smf_tp_shoutbox`
--
ALTER TABLE `smf_tp_shoutbox`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `smf_tp_variables`
--
ALTER TABLE `smf_tp_variables`
  ADD PRIMARY KEY (`id`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `smf_tp_articles`
--
ALTER TABLE `smf_tp_articles`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `smf_tp_blocks`
--
ALTER TABLE `smf_tp_blocks`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `smf_tp_comments`
--
ALTER TABLE `smf_tp_comments`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `smf_tp_data`
--
ALTER TABLE `smf_tp_data`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `smf_tp_dldata`
--
ALTER TABLE `smf_tp_dldata`
  MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `smf_tp_dlmanager`
--
ALTER TABLE `smf_tp_dlmanager`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `smf_tp_events`
--
ALTER TABLE `smf_tp_events`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `smf_tp_menu`
--
ALTER TABLE `smf_tp_menu`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `smf_tp_settings`
--
ALTER TABLE `smf_tp_settings`
  MODIFY `id` mediumint(9) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `smf_tp_shoutbox`
--
ALTER TABLE `smf_tp_shoutbox`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `smf_tp_variables`
--
ALTER TABLE `smf_tp_variables`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
COMMIT;

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;


tinoest

Thanks for the export, that's the latest structure so the issue isn't there.

Quote from: ssduser on February 03, 2022, 10:41:24 AMCould you elaborate on why TinyPortal would think that SMF isn't installed? I'm sure the amount of issues that could cause this are vast, but do you have any suggestions on what to check first?


It will only throw the hacking error if
SMF isn't defined. Which suggests the path to get to it isn't right. Which doesn't make much sense if I'm honest. I only saw it once in testing when I royally broke my test forum and had to just do a major update to correct.

ssduser

Quote from: tinoest on February 04, 2022, 07:08:14 AMI only saw it once in testing when I royally broke my test forum and had to just do a major update to correct.

Okay, so does that mean I'd need to go scorched earth? I'm wondering how this even could happen.

ssduser

After more digging I found that TPortal_init() was never in my index.php file for my forum. I added it to my index file, and now it breaks my homepage, but it shows up correctly if I'm anywhere else.

tinoest

Quote from: ssduser on February 04, 2022, 11:01:59 AMAfter more digging I found that TPortal_init() was never in my index.php file for my forum. I added it to my index file, and now it breaks my homepage, but it shows up correctly if I'm anywhere else.

If that was the case it sounds like your files and filesystem is read only, which is why the SMF installer failed to create the files and update the existing onces correctly.

ssduser

Quote from: tinoest on February 04, 2022, 11:10:35 AMsounds like your files and filesystem is read only

Okay, yeah. I looked at some of the TP files and saw that they were in fact read only in my system, but everything else was read/write. So, would you suggest uninstalling TP, and then making my filesystem read/write, and then try installing again? Or could I do some manual changes (like adding TPortal_init() in my index.php file) around my system?

Weird the installer wouldn't catch that, but it would make sense because when I would install TP, it would just create all the files, but nothing was written in them.

ssduser

I resolved my issue by

tldr: manually installing the package

  • Identifying that my system was not properly writing/executing the mod install packages
   Check TPAdmin.php after install, if its size is 0 bytes, there's potentially a permissions issue; check host, mine is an AWS Bitnami installation
  • Downloading and extracting the fresh TP latest version files and transferring them to my site over FTP in the correct directories and locations.
  • Going to the "Uninstall Mod" page for the TP mod to find where TinyPortal makes its changes in the Core Sources file (Load.php, Subs-editor.php, etc), and then
  • Apply those changes to the Sources and index.php files manually because they were never being written in the first place


If you have access to your Apache/Nginx/server's error log, it will be very helpful to diagnose what the issue is. My error log has about 2k recurring errors regarding a call to undefined function TinyPortal\\TPcheckAdminAreas(). This helped me understand that there was something wrong with the core files because they were trying to make a call to something that was there in a file on the server, but wasn't being instantiated in some capacity. Thats when I decided to take a look at some files in my Sources folder and see if there wasn't code that should have been injected where it wasn't.

rcane

installed 2.2.0 and although it shows all the settings and options, the main page of the forums errors out and won't load when trying to refresh that page.

I'm on 2.0.19 SMF; perhaps I grabbed the wrong download?

tinoest

Quote from: rcane on February 12, 2022, 01:59:20 PMinstalled 2.2.0 and although it shows all the settings and options, the main page of the forums errors out and won't load when trying to refresh that page.

I'm on 2.0.19 SMF; perhaps I grabbed the wrong download?

If you go to the admin section and manage blocks and disable the shoutbox block does this still occur?

rcane

Quote from: tinoest on February 12, 2022, 02:04:23 PM
Quote from: rcane on February 12, 2022, 01:59:20 PMinstalled 2.2.0 and although it shows all the settings and options, the main page of the forums errors out and won't load when trying to refresh that page.

I'm on 2.0.19 SMF; perhaps I grabbed the wrong download?

If you go to the admin section and manage blocks and disable the shoutbox block does this still occur?

Yep, that did it.

Does this mean I can't use shoutbox?

tinoest

Quote from: rcane on February 12, 2022, 02:08:24 PM
Quote from: tinoest on February 12, 2022, 02:04:23 PM
Quote from: rcane on February 12, 2022, 01:59:20 PMinstalled 2.2.0 and although it shows all the settings and options, the main page of the forums errors out and won't load when trying to refresh that page.

I'm on 2.0.19 SMF; perhaps I grabbed the wrong download?

If you go to the admin section and manage blocks and disable the shoutbox block does this still occur?

Yep, that did it.

Does this mean I can't use shoutbox?

I think if you save it again now, it will work ok.

There is a bug in the install process which breaks until you disable/enable the shoutbox. There will be a minor point release to fix this, once we make sure we've not broken anything else.

rcane

Thanks for the quick answer/reply.

I'm going to experiment with some php code in a block.  The site isn't open for users yet so it's just me.  If I have a someFile.php on server, what's the smartest way to make a block and implement it?  I ask because TP doesn't appear to be responsive on the theme I'm using (ant's mutant)

Advertisement: