New Mars Forums

Official discussion forum of The Mars Society and MarsNews.com

You are not logged in.

Announcement

Announcement: This forum is accepting new registrations by emailing newmarsmember * gmail.com become a registered member. Read the Recruiting expertise for NewMars Forum topic in Meta New Mars for other information for this process.

#3351 2024-03-20 19:38:21

SpaceNut
Administrator
From: New Hampshire
Registered: 2004-07-22
Posts: 29,433

Re: Housekeeping

The php files should be readable in notepad so as to tell what they are pointing to.

I checked the php?id3 and it opens Index» Other space advocacy organizations» Nuclearspace hacked?
I think this was after the conversion from ikon to php for the post...

Offline

#3352 2024-03-20 20:21:57

tahanson43206
Moderator
Registered: 2018-04-27
Posts: 19,443

Re: Housekeeping

For SpaceNut and kbd512 ....

It appears that a file called config.php may (or may not) be needed.

The file is loaded if it exists. but it does not exist in the set of files I received recently.

a PHP variable called PUN_ROOT is used throughout the system, but it appears to be defined as it is needed, and apparently it is not a system environment variable.

For SpaceNut ... would you be interested in seeing the PHP files?  They've been updated by kbd512 to run with modern MySQL, PHP and Apache2.  I have the files unzipped and properly configured to run (ie, the file ownership is set properly) but any php file I attempt to launch with the browser calls install.php instead. I suspect there is something very minor that needs to be done to enable everything to start working.

(th)

Offline

#3353 2024-03-20 20:28:16

kbd512
Administrator
Registered: 2015-01-02
Posts: 7,859

Re: Housekeeping

tahanson43206,

I believe it's trying to create the required tables in the MySQL database, which is part of the FluxBB setup / install process.  You can't "run" the forum software until that's done.

Offline

#3354 2024-03-20 20:49:14

tahanson43206
Moderator
Registered: 2018-04-27
Posts: 19,443

Re: Housekeeping

For kbd512

Thanks for thinking about the situation ...

We don't need to install the tables ... they are all there.

https://newmars.com/forums/viewtopic.ph … 63#p217263

They were all created from the CSV backup files you provided some time ago.

FluxBB needs to understand that the files are already there.

We have no config.php file.  It is used if it exists, but it does not exist in the files I unzipped recently.

Would it help to look at the running software at Dreamhost?

Is there a config file there?

(th)

Offline

#3355 2024-03-21 00:29:01

kbd512
Administrator
Registered: 2015-01-02
Posts: 7,859

Re: Housekeeping

tahanson43206,

I could be wrong, but I believe the installer creates the config.php file, which is why it needs to run.

Offline

#3356 2024-03-21 06:04:32

tahanson43206
Moderator
Registered: 2018-04-27
Posts: 19,443

Re: Housekeeping

For kbd512 re #3355

It came to me overnight that we are NOT using a copy of the actual software running at Dreamhost....

We have downloaded a fresh copy from a repository.

Please consider looking at the actual software running the forum.

We've recreated the database using a backup of the actual data.

We need the equivalent of the require.php file that I am using to run listtopic.php, and we need the actual config file from the actual running application.

I am hoping the config.php file exists in the actual running package, and that it contains the information the application needs to find the mysql database.

config.php appears to exist in the running system at Dreamhost.  I tried running it, and I got a blank screen. 

Running a non-existent php file gave a 404 error.

***
Here is a web page that shows how to recreate the config.php for punBB... I hope we don't have to use this procedure.

https://www.phpbb.com/support/docs/en/3 … gphp-file/

A copy of the config.php from the actual running forum may need to be edited slightly to match the development environment.

We do Not want to do an Install... we are doing a Port of an existing application.

(th)

Offline

#3357 2024-03-21 09:44:51

tahanson43206
Moderator
Registered: 2018-04-27
Posts: 19,443

Re: Housekeeping

For SpaceNut and kbd512 ...

Here is what ChatGPT4 thinks the config.php file may look like:

Apache Internal Server error objected to the file ... it contains codes that are used by FluxBB so I can understand the objection

I'll send the file by email ...

Update: I send the "best guess" file to kbd512.

CH4 confirmed that the behavior i reported is to be expected.  I asked FluxBB to run config.php, and it appears to have done so, but there is no visible output so the browser display of a blank page is correct.  This is a secure file, which should NOT be accessible to anyone other than the webmaster, so I am glad to see that the behavior is correct.


(th)

Offline

#3358 2024-03-21 17:39:05

SpaceNut
Administrator
From: New Hampshire
Registered: 2004-07-22
Posts: 29,433

Offline

#3359 2024-03-21 18:20:50

tahanson43206
Moderator
Registered: 2018-04-27
Posts: 19,443

Re: Housekeeping

For SpaceNut re #3358

Thanks for the link to the documentation on the PHP configuration under various conditions.

That is an additional complication, so I'm glad to be aware of it!

Our immediate situation is the absence of config.php for FluxBB.

As I would have shown you if Apache Internal Server Error had permitted the post, a number of variables are initialized for a FluxBB session when the config.php file is read.  The most important of these is access to the MySQL database!

(th)

Offline

#3360 2024-03-21 20:03:24

kbd512
Administrator
Registered: 2015-01-02
Posts: 7,859

Re: Housekeeping

tahanson43206,

You need to run the install script.  The config file is generated by the install script.  When you run the install script, it prompts you for things like the database name, password, etc.  It's going to create all the required tables for you, so that you can later import the CSV data files.  These configuration settings are going to be different on your version of the database, because you created it, most notably the database user name and password.  Other settings that may be unique to your setup include the database port number.

After you're done with that, then you are going to import the backup data into the MySQL database using a free tool created to make that process a lot easier and faster.  A full MySQL Server install should include the development tool software, which should make import of the data relatively painless, or at least it was for me.

Incidentally, I did try to do what you're doing now, by substituting a modified config file with appropriate database name / password / etc changes made.  That didn't work, or at least it didn't for me.  Hence, I ran the install script.

Offline

#3361 2024-03-21 21:16:22

tahanson43206
Moderator
Registered: 2018-04-27
Posts: 19,443

Re: Housekeeping

For kbd512 re #3360...

I sent an email but I'll add this information here...

Please do send the actual working config.php file from the actual working forum software running on Dreamhost.

The install was being called in error due to the lack of PUN=1 in the config.php .... I had previously attempted to let the install procedure work but it failed multiple times. It is time for us to take a look at the actual real config.php file from the actual working forum software.

I am having to enter echo statements into the php files because I don't know any other way to debug the system.

Viewtopic is starting and it calls common.php which calls config.php and then calls a bunch of other modules.

It is possible the real working honest to goodness config.php file will not help to solve the problem but I'd sure like to see it.

(th)

Offline

#3362 2024-03-21 22:20:53

kbd512
Administrator
Registered: 2015-01-02
Posts: 7,859

Re: Housekeeping

tahanson43206,

I sent an E-mail back with sample config file contents.

Offline

#3363 2024-03-22 06:19:34

tahanson43206
Moderator
Registered: 2018-04-27
Posts: 19,443

Re: Housekeeping

For kbd512 re #3362

Thanks very much!  It will be good to see what it contains!

I thought about the Install not working ... the directory is owned by root, and I was not root when trying the run for the first time, so the install may not have worked due to lack of privileges. What I was worried about is that the install would delete all the files I had created from CSV, by creating empty ones in their place. That would have been a significant loss, since I had not thought to perform a MySQL backup.  I'll attend to that oversight the next work session.

Thanks again for sending a copy of the config.php file!

(th)

Offline

#3364 2024-03-22 07:11:39

kbd512
Administrator
Registered: 2015-01-02
Posts: 7,859

Re: Housekeeping

tahanson43206,

If you made this super easy on yourself, you'd give the newly installed database a different name, and then import the data from database A into database B.

Offline

#3365 2024-03-22 07:50:40

tahanson43206
Moderator
Registered: 2018-04-27
Posts: 19,443

Re: Housekeeping

For kbd512 re #3364

The strategy you suggested seems reasonable.

A backup of the existing database seems like a ** really ** good idea, so I'll definitely do that!

I don't recall a discussion of the best strategy on how to proceed upon receipt of the forum software, but a bit of struggle doesn't hurt anyone.

Exposure to the step-by-step operation of the system is a worthwhile outcome of the try-and-fail-and-try-again approach.

In looking back from here, I can see that an intense study of the working forum as running at Dreamhost would have been helpful.

For some reason that idea never came up.

The package we are working with is NOT the package running at Dreamhost.  This is a fresh copy from the repository, so naturally it contains no updates that might have been applied over the years.

(th)

Offline

#3366 2024-03-22 09:32:12

kbd512
Administrator
Registered: 2015-01-02
Posts: 7,859

Re: Housekeeping

tahanson43206,

The working software package running on the production web server is very old software.  We're "modernizing" FluxBB to the minimal extent necessary to make it compatible with the latest version of PHP, MySQL, and Apache.  There are or should be near-zero changes required to the database.  The internal mechanisms used by MySQL to optimize performance have changed, but the interfaces to access and store data, namely very simple SQL statements, have not.  Virtually identical syntax is used today as was used 10 years ago, as was used 20 years ago, because it's ANSI SQL.  Roughly speaking, ANSI SQL dates back to 1986, and SQL-92 dates back to 1992.  Every actual implementation diverges somewhat from ANSI standards, but not when it comes to "SELECT  this_column FROM that_table".  FluxBB is no more sophisticated than that when it comes to retrieving the post data or storing posts in the database, if you perused through the code.  New Apache vs old Apache is something of an unknown quantity to me.  I don't follow all the latest changes, and there have been many.  FluxBB's PHP code only required some minor language usage modifications to remove prior execution ambiguity that was disallowed under later versions of PHP.  This minor issue was related to array handling syntax.

We could go through a working session this weekend where we look at the production environment if that's helpful to you, but again, I did that and found nothing truly remarkable about it.  I'd like to do this on Friday (tonight) or Saturday, if that works for you.  You can see anything you want to look at.  If we tar, download, and deploy the old code, it's not going to merely execute / "run" using the latest version of PHP, or any version beyond 7.3.x.  The changes I made had the benefit of executing within my own environment (web application ran and the installation script allowed me to create / configure the database objects).  I presume if I loaded it with the data, then it would function like the existing forum software.  It would not look precisely the same due to CSS customization to provide the NewMars "look-and-feel", but that's about it.

Offline

#3367 2024-03-23 10:16:27

Mars_B4_Moon
Member
Registered: 2006-03-23
Posts: 9,776

Re: Housekeeping

When I copy and paste the title of the video Minority Rule F 1 rst P as t th3 P0st ... I get a internal error or misconfiguration 404 server error log


https://www.youtube.com/watch?v=s7tWHJfhiyo

Offline

#3368 2024-03-23 11:11:17

kbd512
Administrator
Registered: 2015-01-02
Posts: 7,859

Re: Housekeeping

tahanson43206,

Please let me know if there's anything you want to look at in the production environment.

Offline

#3369 2024-03-23 11:24:55

tahanson43206
Moderator
Registered: 2018-04-27
Posts: 19,443

Re: Housekeeping

For kbd512 re offer to look at situation Saturday evening ....

I've just started to spend some time with FluxBB.

I'll start by making a backup.

As reported elsewhere, I've deduced that the reason the install.php did not run is because (a) I was running as a user and not as root and (b) the way to run install.php in Linux is from a terminal window using SUDO to simulate root temporarily.

(th)

Offline

#3370 2024-03-23 12:00:50

kbd512
Administrator
Registered: 2015-01-02
Posts: 7,859

Re: Housekeeping

tahanson43206,

Let me know if you want a second pair of eyes to look at anything.

Offline

#3371 2024-03-23 14:05:28

tahanson43206
Moderator
Registered: 2018-04-27
Posts: 19,443

Re: Housekeeping

For SpaceNut (and kbd512) re FluxBB port to test ...

I have created a backup of the restored database, just in case something happens during testing.

While working my way through common.php, I found that the minimum post size was set to 1 megabyte. ... that's at line 174 of the revised file, which means it is at a lower line number in the original version.

I added a line to the config.php file, thanks to an example provided by kbd512. 

The application is still not surviving execution of common.php.  I added code to config.php to confirm the database connection is working, and no error occurs so I assume the database is loaded.

Update: the backup of the forum database is uploaded to Dropbox in the folder for kbd512.  The format is .gz
I'm hoping Windows can unzip it.  If not I'll use another zip program. The filesize dropped from 500Mb+ to 155.

(th)

Offline

#3372 2024-03-23 18:26:53

kbd512
Administrator
Registered: 2015-01-02
Posts: 7,859

Re: Housekeeping

tahanson43206,

Now that I have use of the computer where I originally installed all of the software, I'm running the installation script against the database.  I'll let you know how that goes.

Offline

#3373 2024-03-23 18:34:02

tahanson43206
Moderator
Registered: 2018-04-27
Posts: 19,443

Re: Housekeeping

For kbd512 re #3372...

Thanks for giving this a try!

I'll continue adding echo statements to try to find where the system is going off to oblivion...

***
It's nice to see JoshNH4H back after an extended absence!

(th)

Offline

#3374 2024-03-23 19:18:33

SpaceNut
Administrator
From: New Hampshire
Registered: 2004-07-22
Posts: 29,433

Re: Housekeeping

We got 5 inches of snow followed by freezing rain to just rain this evening but now we are without power. Seems it's going to be several hours. Just got the cable companies alert as well for the outage. Good that the cellphone is charged up.

Offline

#3375 2024-03-23 19:34:32

tahanson43206
Moderator
Registered: 2018-04-27
Posts: 19,443

Re: Housekeeping

For SpaceNut re #3374

Best wishes for you and Mrs. SpaceNut for power to be restored soon.

You didn't need this !!!

Thanks for checking in! 

(th)

Offline

Board footer

Powered by FluxBB