Welcome to Geeklog Monday, June 25 2018 @ 04:03 am EDT

Geeklog Forums

Need advice for website update from old version.


Status: offline

OMAL

Forum User
Chatty
Registered: 06/12/17
Posts: 39
I'll upgrade my geeklog site from v.1.4 on php ver.5.4 to the latest version on php ver.7.
Geeklog ver.1.4 does not support PHP ver.7, and latest version does not support php ver.5.4.
It would be really appreciated if you have some advice for this situation. Wink

Status: offline

Laugh

Site Admin
Admin
Registered: 27/09/05
Posts: 1281
First thing I would do is make sure to backup all of your files and MySQL database. That is quite a version jump between 1.4 and 2.1.3.

I would also disable all plugins you are using that are not core plugins (plugins that come with the geeklog install) as if they don't support PHP 7 they could error out and ruin the upgrade.

I would then upgrade your PHP to version 7. The current 1.4 site may not work but once you copy over the new files, the install will work just fine along with the upgrade process.

Tom


One of the Geeklog Core Developers.

Status: offline

OMAL

Forum User
Chatty
Registered: 06/12/17
Posts: 39
Thanks.I'm relieved to hear that.
That is What I'm going to trying to do.

Status: offline

OMAL

Forum User
Chatty
Registered: 06/12/17
Posts: 39
Another question.

When I use installer to upgrade my site, what the installer can handle and inherit to automatically upgrade the site is only config.php file of my current site, is it right? Geeklog's manual for site update says like that.
From that information, I think installer only handle config.file and I have to deal with all the other upgrading process after the install.
Am I missing some thing? Anything else they can handle to upgrade site except for config.php?

Status: offline

Laugh

Site Admin
Admin
Registered: 27/09/05
Posts: 1281
The latest install should be able to handle the config file fine. It should convert the required config values and store them in the database. Copy over the new install files and make sure you remove the old ones not used anymore except leave the config.php files so the upgrade can grab the require information. Once the upgrade is complete you can then remove that old config.php file

It has been a long while since I have dealt with such an old install like 1.4.1. As I said before backup everything before hand incase you need to redo the upgrade process again incase something errors out.



One of the Geeklog Core Developers.

Status: offline

OMAL

Forum User
Chatty
Registered: 06/12/17
Posts: 39
When I open install/index.php on a browser, following message appears:
Geeklog Installation

Unable to locate Geeklog files

The installer was unable to locate critical Geeklog files. This is probably because you have moved them from their default location. Please specify the paths to the files and directories below:

db-config.php

I can configure path here, but I am worried about the term "db-config.php", because I have now two configuration files in geeklog directory, config.php from my site and db-config.php from downloaded zip.

I tried to indicate config.php file, then, the following error occurs:

ERROR The path /***/private/config.php/db-config.php does not appear to be correct. Please go back and try again.


So, the name config.php seems not be acceptable for the installer.
Then I ignored config.php file and instead entered db-config.php path. That is "/***/private/" or "/***/private/db-config.php", both result in same status in step2.
Next, I chose upgrade, then the third page(step 2) displays form for site configuration. Here, all default data does not reflect my config.php file, instead, just "site_name: Geeklog Site" for example, not my site name.

The latest install should be able to handle the config file fine.

The installer is the latest version but from Japanese site, so it is possibly lack of the handling ability.

Do you think which is better, modifying db-config file manually before working with the installer or after working with that?

thanks.

Status: offline

OMAL

Forum User
Chatty
Registered: 06/12/17
Posts: 39
I ignored config.php on Step1 and Step2, input data such as host_name, then on next page, errors are displayed. That error include the word "config.php", so it is used. But the errors was weird. That says the installer warns like "Fatal error: 1051: Unknown table 'mydb.gl_****' in /****/private/system/databases/mysqli.class.php on line 469".
After that error, some of tables in my database seems to be DELETED on the installation process.
I'll check it out later about this issue.
Now I think, placing config.php in the geeklog system directory before installation process is bad idea, and I should overwrite configuration with config.php after the installer complete the installation.

PS. When installer worked, my local test system seemed to be crushed and db was destroyed, it may be the cause of weird errors.

Status: offline

Laugh

Site Admin
Admin
Registered: 27/09/05
Posts: 1281
The installer shouldn't be deleting tables unless they are not needed anymore. In most cases it will just be altering tables to either change or add table columns as needed.

Try the install without the config.php and

rename the db-config.php.dist to db-config.php

and the siteconfig.php.dist found in public_html to siteconfig.php
One of the Geeklog Core Developers.

remy

Anonymous
Quote by: Laugh

The installer shouldn't be deleting tables unless they are not needed anymore.



What's the condition to decide that tables are
not needed anymore
?

How would you know ?


Status: offline

Laugh

Site Admin
Admin
Registered: 27/09/05
Posts: 1281
Well the installer uses the update scripts found in the directory \sql\updates so you would have to look in those to figure it out.

I believe Geeklog 1.4.1 was released over 10 years ago so If memory serves no tables should be deleted since 1.4.1 but tables have been added and modified since then (along with the data in them.
One of the Geeklog Core Developers.

Status: offline

OMAL

Forum User
Chatty
Registered: 06/12/17
Posts: 39
I still don't understand the way of installation for geeklog's update.
Installation failed many times.
And for each trial, I have to repeat drop database, create database and import all data, because each failure cause corruption of tables and collumns, also installer says database is already updated unless I replace the db.

For installation, unpacked src files and old files are placed on test server like this:
-/somepath/geeklogsrc/(here unpacked files)
-/somepath/htdocs/(here old public files)
-/somepath/private/(here old files other than old public files)

The config file is placed under private/ and now renamed to db_config.
For the first step of installation, installer ask me where db_config file is, so I indicate the place.
For the step2, default values are not same as old configuration except for site email. Now I am confused about Site URL and Admin Directory Path in Optional Configurations. Are these the path of unpacked files or the path of old files?

[Update]
I placed unpacked files in some directory, and add old files to the directory without overwriting new ones.
Then add modified db-config.php there and old themes under layout/.
Again, I recreate database for installation.

Finally, success.html was displayed without any errors and text garbling.

I found out that database structure's change from old version to the latest one is extreme. I understand that the issue I had before was the reasonable process. Some of tables and columns are disappeared due to the upgrade so that old source codes for database connection is useless. For example, lines describe like "Select tid from gl_sometbl where ***" cause connection problem because there is no tid column and gl_sometbl anymore in the latest version.

My test site's index.php shows blank page. Old source files can't deal with sql connection properly.

BTW, I found a bug in system/lib-syndication.php line245:
I think you should modify
$tid_list = TOPIC_getChildList($tid, 1);
to
$tid_list = TOPIC_getChildList($tid, 1);
if (empty($tid_list)) {
$tid_list = "'" . DB_escapeString($topic) . "'";
}
if don't, it causes issue during or just after installation. I had that issue.

Status: offline

Laugh

Site Admin
Admin
Registered: 27/09/05
Posts: 1281
>> The config file is placed under private/ and now renamed to db_config.
Actually this is not really correct. The db_config file should contain only the config options needed to connect to the database

>> For installation, unpacked src files and old files are placed on test server like this:
It looks like your original Geeklog install is setup differently than most which may have confused things.

>>I placed unpacked files in some directory, and add old files to the directory without overwriting new ones.
Your original install is over 10 years old there have been many changes since then. Every single file (belonging to the Geeklog install) should have been either deleted as it may not be needed any more or updated with a new file. Leaving old unused files on your server could be a security risk


>> I found out that database structure's change from old version to the latest one is extreme
Yes as I stated before your install is over 10 years old and there have been many updates since then

>> Select tid from gl_sometbl where ***" cause connection problem
Yes topic ids where removed a while ago from many tables when Geeklog supported items belonging to multiple topics

>> My test site's index.php shows blank page. Old source files can't deal with sql connection properly.
So your updated site still doesn't work? What does it say in your error log file?

If your error log doesn't contain any information I may have to take a look at your files and database and run the upgrade myself to help you further.

One of the Geeklog Core Developers.

Status: offline

OMAL

Forum User
Chatty
Registered: 06/12/17
Posts: 39

So your updated site still doesn't work? What does it say in your error log file?

If your error log doesn't contain any information I may have to take a look at your files and database and run the upgrade myself to help you further.
[/p]

Don't worry. Days passed since I posted this first question, but actual time I worked for the site is just about dozen hours.

Currently, browser tries to load index.php for seconds, then display like
:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, you@example.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.


No detailed error logs in system.
Only error.log in geeklog system has a little clue:
Mon 2/26 21:01:07 2018 - ::1 - 1053: Server shutdown in progress in /testpath/geeklog-japan-master/system/custom/phpblock_lastarticles.php:289. SQL in question: SELECT STRAIGHT_JOIN
s.sid , t.tid , s.title, s.date, s.group_id
, s.introtext, s.bodytext, t.topic
FROM gl_stories AS s
, gl_topics AS t
,gl_topic_assignments AS t2
WHERE
(s.title <> ''Wink
AND s.sid = t2.id
AND t2.tid = t.tid
AND (s.draft_flag = 0)
AND (s.date <= NOW())
AND (t.tid IN ('dM3','dM4','dM2','dD1',.....))
ORDER BY s.date DESC LIMIT 5


(..... contains hundreds arguments, it is not needed to be atatched here.)

So I'll try to patch sql/updates tool for db, if that fails, I'll manually modify them.

Status: offline

Laugh

Site Admin
Admin
Registered: 27/09/05
Posts: 1281
I should have mentioned it before but any custom code you have should be removed and then added back afterwards. This could have affected the upgrade.
One of the Geeklog Core Developers.

All times are EDT. The time is now 04:03 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content