Minichan

Topic: Problem while installing minichan on localhost.

Anonymous A started this discussion 10 years ago #48,474

Hey guys.
I'm trying to install minichan on localhost. (using EasyPhp on Windows XP)
Here's what I get on index.php

Warning: require_once(vendor/autoload.php): failed to open stream: No such file or directory in C:\Program Files\EasyPHP-DevServer-14.1VC9\data\localweb\minichan\includes\header.php on line 47

Fatal error: require_once(): Failed opening required 'vendor/autoload.php' (include_path='.;C:\php\pear') in C:\Program Files\EasyPHP-DevServer-14.1VC9\data\localweb\minichan\includes\header.php on line 47


Okay, first of all, wtf is vendor? Should I edit my php.ini or also install this vendor stuff in addition?

Help me, save my soul.

r04r joined in and replied with this 10 years ago, 2 minutes later[^] [v] #632,988

The vendor directory contains dependencies that have to be pulled in with composer. See https://getcomposer.org/doc/00-intro.md

To easily get started do

php -r "readfile('https://getcomposer.org/installer');" | php
php composer.phar install


In the minichan directory (where there is the composer.json file). Be sure to also follow the instructions in the readme.

(Edited 1 minute later.)

Anonymous A (OP) replied with this 10 years ago, 8 minutes later, 11 minutes after the original post[^] [v] #632,989

@previous (r04r)
It's nice to hear from admin himself :)
Let me ask some other stuffs while I found you.
Except the individual features that Minichan has, is this version of Minibbs better for handling bigger database? I have doubts that the original Minibbs of Dalloway's may not work proper with millions of posts. Did you change anything about DB?

r04r replied with this 10 years ago, 5 minutes later, 16 minutes after the original post[^] [v] #632,991

@previous (A)
The code written by Dalloway is unrelated to what is Minichan, they are separate codebases as far as I know. I never looked into the code Dalloway produced, but I wouldn't be surprised if it's similar, and perhaps even superior due to not being ancient. Anyway, minichan runs almost exactly what is on the minichan branch of the github repository.

Minichan itself does not have millions of posts. We're up to 632989 replies and 48476 topics at the moment. It seems to handle this fine, but the database schema is not really all that optimized. You'll probably run into issues at millions of posts. Most of them should be fairly easy to resolve with a well-placed index or improved query, though.

Anonymous A (OP) replied with this 10 years ago, 13 minutes later, 30 minutes after the original post[^] [v] #632,997

@previous (r04r)

That's interesting, they seem almost similar, even the database structure. Wish I knew the statitcs of Minichan such as, DB size or bandwith stuffs so I may be able to decide if I should use your script or Minibbs. Also I don't think Minibbs is more up to date, the last update on github was 2 years ago.
Thanks for the help, by the way. Yet, I'm not able to install vendor on EasyPHP. Is there any way to disable it? I don't even know what vendor stuff is for and what it does :)

Sorry for my bad English, I'm not native.

r04r replied with this 10 years ago, 5 minutes later, 36 minutes after the original post[^] [v] #632,998

@previous (A)
The database is 1.4GB on disk and there's about 25GB of traffic a month on average, but since we're behind cloudflare a bit more than half of that gets cached and never hits the server. Cloudflare says there are 75,353 unique visitors a month, and Google Analytics says there's 20,221 unique visitors. Both seem extremely unrealistic, but there you go.

The vendor directory is required as it contains dependencies necessary for the code to run. First install composer. Since you're on windows use https://getcomposer.org/doc/00-intro.md#using-the-installer. Then just do composer install inside the code directory from a fresh terminal window.

Anonymous A (OP) replied with this 10 years ago, 37 minutes later, 1 hour after the original post[^] [v] #633,009

Externally hosted image@previous (r04r)
Looks like I've managed to install composer but here's what I've got for now.

And it's my config.php lines:

define('DOMAIN', ($_SERVER['HTTPS'] == 'on' ? 'https' : 'http').'://127.0.0.1/minichan/');
define('STATIC_DOMAIN', ($_SERVER['HTTPS'] == 'on' ? 'https' : 'http').'://127.0.0.1/minichan/');


Would it because of I'm trying to install the script not in root folder?

(Edited 2 minutes later.)

r04r replied with this 10 years ago, 4 minutes later, 1 hour after the original post[^] [v] #633,011

@previous (A)
Looks like you didn't configure your php.ini like the readme says.

r04r double-posted this 10 years ago, 2 minutes later, 1 hour after the original post[^] [v] #633,012

@633,009 (A)
You might also need to change the rewritebase in the htaccess if you want to run from a subdirectory

Anonymous A (OP) replied with this 10 years ago, 11 minutes later, 1 hour after the original post[^] [v] #633,013

@previous (r04r)
I did php.ini editing as readme says, still the same php error on index.php.
Also, I can not reach to /includes/upgrade.php, I got 403 error even though I've tried to reach with original .htaccess, edited .htaccess or an empty .htaccess file.
That's really interesting.
Seems like it's going to be "How to install Minichan on localhost" topic :)
I'm using Apache/2.4.7 (Win32) PHP/5.4.24.

r04r replied with this 10 years ago, 59 seconds later, 1 hour after the original post[^] [v] #633,015

@previous (A)
Did you restart apache after editing the php.ini? And you have to execute upgrade.php from the command line, it would be silly to let just anyone execute that.

Anonymous A (OP) replied with this 10 years ago, 7 minutes later, 1 hour after the original post[^] [v] #633,017

@previous (r04r)
I'm an idiot. Now I got "We're having some database issues. These should be resolved soon, and we apologize for the inconvenience. The details have been logged for administrative review." on index php, but still can not reach to the upgrade.php

r04r replied with this 10 years ago, 2 minutes later, 1 hour after the original post[^] [v] #633,019

@previous (A)
Right. You have to find the location of your php.exe and use it to execute the upgrade.php on the commandline (this means cmd.exe). Not through your browser. See the readme.

(Edited 6 minutes later.)

Anonymous A (OP) replied with this 10 years ago, 7 minutes later, 1 hour after the original post[^] [v] #633,021

Externally hosted image@previous (r04r)
You are the most kind chan owner I've ever seen, thank you :)
Now I'll dig up the script, I'd like to talk you more about my project later. Hope I can find you on IRC.
Thank you again!

r04r replied with this 10 years ago, 1 minute later, 1 hour after the original post[^] [v] #633,023

@previous (A)
No problem. You can make yourself admin on the board by going to stuff -> Backup UID and adding that UID to the config.php $administrators array at the bottom.

Anonymous A (OP) replied with this 10 years ago, 13 minutes later, 2 hours after the original post[^] [v] #633,029

Externally hosted image@previous (r04r)
It's getting late over here and I'm tired but I'll start thinking that I'm also lil bit retarded because I see no admin dashboard on here. How to enter that?

r04r replied with this 10 years ago, 2 minutes later, 2 hours after the original post[^] [v] #633,030

@previous (A)
It's late here as well. I'm from the Netherlands.

Anyway, there is no real admin dashboard. There's the list of deleted topics, and deleted replies are shown inline within a topic. You can grant permissions to profiles by visiting their profile page. The menu on the bottom right of each topic/reply is extended when using a privileged UID with links to the author's profile, and to delete/edit/adjust the image.

Are there any particular administrative features you're missing?

Green !BEERiVqJJw joined in and replied with this 10 years ago, 2 minutes later, 2 hours after the original post[^] [v] #633,032

(Greeenn) On minichan, we are all losers. Why else would we post on a bbs with only 20 posters at maximum every day for 5 years.

(Edited 40 seconds later.)

Anonymous A (OP) replied with this 10 years ago, 8 minutes later, 2 hours after the original post[^] [v] #633,035

Externally hosted image@633,030 (r04r)
Well, this is what Minibbs has. I know it's not the same script and Minibbs is not builded for common use but it would be nice to change settings on web, not only on config.php.

Adam Jensen joined in and replied with this 10 years ago, 1 minute later, 2 hours after the original post[^] [v] #633,037

@633,032 (Green !BEERiVqJJw)
:(

r04r replied with this 10 years ago, 1 second later, 2 hours after the original post[^] [v] #633,038

@633,035 (A)
Nope, nothing like that. All settings go in configuration file.

Anonymous A (OP) replied with this 10 years ago, 14 minutes later, 2 hours after the original post[^] [v] #633,042

@633,032 (Green !BEERiVqJJw)
It would be a great place when I'll modify my own minichan clone :)
Plus, it'd be awesome with a little concept changing. Now it is very... ordinary.

@previous (r04r)
I see r04r, that's not a big deal actually.
Statics doesn't work also :) It's probably because of I'm on localhost.
Warning (2): Division by zero in \includes\functions.php on line 239


I've changed the line about Site Founded time with this:
define('SITE_FOUNDED', 1450222780);

I'll report all the bugs here in time.

r04r replied with this 10 years ago, 3 minutes later, 2 hours after the original post[^] [v] #633,044

@previous (A)
That error happens because you have zero total topics. Go post a topic and a reply and the statistics page will probably work.

Anonymous A (OP) replied with this 10 years ago, 5 minutes later, 2 hours after the original post[^] [v] #633,048

@previous (r04r)
Ah - stupid me again.
By the way, it'd be great to add url slug to this script.
Topic urls will be like this:
http://minichan.org/topic/48474-Problem-while-installing-minichan-on-localhost

Now it's very open for scraping with iMacros or something like that. Topic urls go by topic ID's.
I'm sure you got what I'm trying to say.

Anonymous E joined in and replied with this 10 years ago, 2 minutes later, 2 hours after the original post[^] [v] #633,050

@previous (A)
I, for one, welcome our new chan developer overlord.

r04r replied with this 10 years ago, 58 seconds later, 2 hours after the original post[^] [v] #633,051

@633,048 (A)
I'm not against scraping. And slugs are not intended to stop scraping either, the usual implementation is that the lookup still happens by the ID and that no verification happens on the slug, so http://minichan.org/topic/48474-suck-my-dick would still yield the page.

There's also the problem of what should happen when the headline is changed. Then the URL also changes, which either invalidates old URLs or now you have two URLs pointing to the same content. Google does not like this a whole lot as far as I know.

Anonymous E replied with this 10 years ago, 1 minute later, 2 hours after the original post[^] [v] #633,053

@previous (r04r)
start by learning about functional programming including first class functions, recursion, and modifying data structures

RWBY Rhubarb? !!iNo3FkiZx joined in and replied with this 10 years ago, 5 minutes later, 2 hours after the original post[^] [v] #633,057

@632,998 (r04r)
> Cloudflare says there are 75,353 unique visitors a month, and Google Analytics says there's 20,221 unique visitors.
Not that I don't also think those numbers are off, but could bots be the bulk of the traffic? I've heard Minichan is very popular with bots.

r04r replied with this 10 years ago, 1 minute later, 2 hours after the original post[^] [v] #633,058

@previous (RWBY Rhubarb? !!iNo3FkiZx)
For cloudflare I'm sure a large portion of that is bots. I would hope that Google Analytics at least tries to filter those out, and GA is only triggered by bots that also execute javascript which are rather rare.

Anonymous E replied with this 10 years ago, 48 seconds later, 2 hours after the original post[^] [v] #633,059

@633,057 (RWBY Rhubarb? !!iNo3FkiZx)
It's not a comma, it's a decimal:

Cloudflare says there are 75.353 unique visitors a month, and Google Analytics says there's 20.221 unique visitors.

Averaged over the year I suppose

Anonymous A (OP) replied with this 10 years ago, 5 minutes later, 3 hours after the original post[^] [v] #633,061

@633,051 (r04r)
Scraping would be bad for my project. At least it would be nice to have some unique random slug as topic id like youtube.
It's okay, I can work on it.
Let me ask if topic pagination exist?

r04r replied with this 10 years ago, 1 minute later, 3 hours after the original post[^] [v] #633,063

@previous (A)
You'll never be able to truly block scraping. It would take me 5 minutes to write a bot that parses the index page for links to topics and then grabs those. It would look just like a regular browser, too. There's just nothing you can do short of annoying the hell out of your users with constant captchas for everything. Or charging money. Topic pagination does not exist.

Anonymous A (OP) replied with this 10 years ago, 4 minutes later, 3 hours after the original post[^] [v] #633,064

@previous (r04r)
Yeah I know what you mean.
Where is RECAPTCHA_MIN_POSTS function located? This is a great feature which Minibbs doesn't have.

r04r replied with this 10 years ago, 58 seconds later, 3 hours after the original post[^] [v] #633,066

@previous (A)
https://github.com/r04r/Minichan/search?utf8=%E2%9C%93&q=RECAPTCHA_MIN_POSTS

Also I'm pretty sure the youtube URLs are also just incremental numbers, but not in base10.

(Edited 51 seconds later.)

Anonymous A (OP) replied with this 10 years ago, 4 minutes later, 3 hours after the original post[^] [v] #633,067

@previous (r04r)
Admin, you are great. Thank you for your big support.
Now I'm gonna sleep.
Good night ya'll.
:

Please familiarise yourself with the rules and markup syntax before posting.