New posts appear on both sites - after a site replication

Get help with installation and running phpBB 3.2.x here. Please do not post bug reports, feature requests, or extension related questions here.
User avatar
warmweer
Jr. Extension Validator
Posts: 11234
Joined: Fri Jul 04, 2003 6:34 am
Location: Van Allen Bel ... gium
Contact:

Re: New posts appear on both sites - after a site replication

Post by warmweer »

nguyen2075 wrote: Wed Sep 18, 2019 4:19 pm So it seems our customized code have been lost. Does the convertor even try to convert/update/merge customized files that we had in 2.x to 3.x?
No, because the convertor uses phpBB3 files and converts the 2.0 database no a 3.x database. I'm not even sure an autoupdate (which does modify existing files) would be able to transfer phpbb2 code).
If you did by any chance use autoupdate, it means you didn't follow update instructions and in that case who knows what the result is, and should start over again.
Spelling is freeware, which means you can use it for free.
On the other hand, it is not open source, which means you cannot change it or publish it in a modified form.


Time flies like an arrow, but fruit flies like a banana.
nguyen2075
Registered User
Posts: 25
Joined: Thu Sep 05, 2019 11:37 pm

Re: New posts appear on both sites - after a site replication

Post by nguyen2075 »

Ok. Thanks.

So the phpbb2 to phbbb3 convertor only converts the database and not do anything about customized code.

So I think I need to now merge the customized authentication code to the PHPBB3 installation.
User avatar
janus_zonstraal
Registered User
Posts: 6418
Joined: Sat Aug 30, 2014 1:30 pm

Re: New posts appear on both sites - after a site replication

Post by janus_zonstraal »

The code automatically logon the user to the board w/o prompting for the password.
I think this is normal behaviour also for a 3.2.7 board.
Are your cookies setting OK?
Sorry! My English is bat ;) !!!
User avatar
warmweer
Jr. Extension Validator
Posts: 11234
Joined: Fri Jul 04, 2003 6:34 am
Location: Van Allen Bel ... gium
Contact:

Re: New posts appear on both sites - after a site replication

Post by warmweer »

nguyen2075 wrote: Wed Sep 18, 2019 4:49 pm So I think I need to now merge the customized authentication code to the PHPBB3 installation.
I doubt it. It's very unlikely that (php)code which worked on phpBB2 will work on phpBB3.2
I'm fairly certain that the code will have to be rewritten. Perhaps an existing extension could be used as a framework to create the autologin you want but I doubt that's even necessary since your users are authenticated on their PCs, so they can just as well tick the "remember me" on first login.
Spelling is freeware, which means you can use it for free.
On the other hand, it is not open source, which means you cannot change it or publish it in a modified form.


Time flies like an arrow, but fruit flies like a banana.
nguyen2075
Registered User
Posts: 25
Joined: Thu Sep 05, 2019 11:37 pm

Re: New posts appear on both sites - after a site replication

Post by nguyen2075 »

Oh, if "Remember me" works, I may be able to do away with having to merge/recode our authentication.

Thanks
nguyen2075
Registered User
Posts: 25
Joined: Thu Sep 05, 2019 11:37 pm

Re: New posts appear on both sites - after a site replication

Post by nguyen2075 »

Hi,

This is an update ...

The "Remember me" check box helps. But I still had to do the logon after I terminated my browser. But after installing the extension remember_me_checked_default, it works great!!! I don't have to do the logon after terminating the browser.

Thank you all for the support.
nguyen2075
Registered User
Posts: 25
Joined: Thu Sep 05, 2019 11:37 pm

Re: New posts appear on both sites - after a site replication

Post by nguyen2075 »

Actually, for Chrome, I don't have to logon after terminating it. But for IE, it still prompts for me to logon. There must be some switches in IE that affect this behavior.
nguyen2075
Registered User
Posts: 25
Joined: Thu Sep 05, 2019 11:37 pm

Re: New posts appear on both sites - after a site replication

Post by nguyen2075 »

After I turn off "Delete browsing history on exit" in IE, that resolved the problem.
nguyen2075
Registered User
Posts: 25
Joined: Thu Sep 05, 2019 11:37 pm

Re: New posts appear on both sites - after a site replication

Post by nguyen2075 »

Help!

Previously in this post I described the problem I had trying to perform a TEST conversion of my phpBB2 board to phpBB 3.2.27. I was able to successfully did the conversion after all.

The last couple days, I tried the REAL conversion, but I kept getting below error about table phpbb3_userconv doesn't exists:

Information

General Error:
SQL ERROR [ mysql4 ]

Table 'tc_devdoc.phpbb3_userconv' doesn't exist [1146]

SQL

SELECT username_cleanFROM phpbb3_userconvGROUP BY username_cleanHAVING COUNT(user_id) > 1
in file /plm/cinas/pdweb/pd/tools/tc_upgrade/phpBB3/phpbb/db/driver/driver.php on line 997

BACKTRACE



FILE: (not given by php)
LINE: (not given by php)
CALL: installer_msg_handler()

FILE: [ROOT]/phpbb/db/driver/driver.php
LINE: 997
CALL: trigger_error()

FILE: [ROOT]/phpbb/db/driver/mysql.php
LINE: 191
CALL: phpbb\db\driver\driver->sql_error()

FILE: [ROOT]/install/convertors/functions_phpbb20.php
LINE: 1852
CALL: phpbb\db\driver\mysql->sql_query()

FILE: [ROOT]/install/convert/convertor.php(539) : eval()'d code
LINE: 1
CALL: phpbb_check_username_collisions()

FILE: [ROOT]/install/convert/convertor.php
LINE: 539
CALL: eval()

FILE: [ROOT]/install/convert/controller/convertor.php
LINE: 370
CALL: phpbb\convert\convertor->convert_data()

FILE: (not given by php)
LINE: (not given by php)
CALL: phpbb\convert\controller\convertor->convert()

FILE: [ROOT]/vendor/symfony/http-kernel/HttpKernel.php
LINE: 135
CALL: call_user_func_array()

FILE: [ROOT]/vendor/symfony/http-kernel/HttpKernel.php
LINE: 57
CALL: Symfony\Component\HttpKernel\HttpKernel->handleRaw()

FILE: [ROOT]/install/app.php
LINE: 61
CALL: Symfony\Component\HttpKernel\HttpKernel->handle()




I increased below 2 parameters of my destination PHP install to below values, but that did not help
max_execution_time = 120
memory_limit = 512M

I searched PHPBB support site and the internet and saw several people had the same problem about table phpbb3_userconv doesn't exists, but non of them seemed to have come to a solution.

Any help out there please. I'm desperate.

Thank you in advance.
User avatar
warmweer
Jr. Extension Validator
Posts: 11234
Joined: Fri Jul 04, 2003 6:34 am
Location: Van Allen Bel ... gium
Contact:

Re: New posts appear on both sites - after a site replication

Post by warmweer »

Is you phpBB 3.2 config.php correct?
It should look like this

Code: Select all

<?php
// phpBB 3.2.x auto-generated configuration file
// Do not change anything in this file!
$dbms = 'phpbb\\db\\driver\\mysqli';
$dbhost = 'xxxxx';
$dbport = 'xxxxx';
$dbname = 'xxxxx';
$dbuser = 'xxxxx';
$dbpasswd = 'xxxxx';
$table_prefix = 'phpbb_';
$phpbb_adm_relative_path = 'adm/';
$acm_type = 'phpbb\\cache\\driver\\file';

@define('PHPBB_INSTALLED', true);
// @define('PHPBB_DISPLAY_LOAD_TIME', true);
@define('PHPBB_ENVIRONMENT', 'production');
// @define('DEBUG_CONTAINER', true);
Added:
Are you trying this conversion on the same system as your testconvert?

If you had converted successfully before (completely), then you could use that converted database (no need to convert the same database twice).
Spelling is freeware, which means you can use it for free.
On the other hand, it is not open source, which means you cannot change it or publish it in a modified form.


Time flies like an arrow, but fruit flies like a banana.
nguyen2075
Registered User
Posts: 25
Joined: Thu Sep 05, 2019 11:37 pm

Re: New posts appear on both sites - after a site replication

Post by nguyen2075 »

Thanks for the reply.

My config.php file has the same settings, except the dbms entry, it has:

$dbms = 'phpbb\\db\\driver\\mysql';

This is the same env as the test conversion. I used the same database, but this time used a different prefix:
test -> phpbb_
real -> phpbb3_

Since the test conversion, I let my users used the old PHPbb2 and it's been 2 months now, so I need to do this conversion to get the latest changes to the board.
User avatar
warmweer
Jr. Extension Validator
Posts: 11234
Joined: Fri Jul 04, 2003 6:34 am
Location: Van Allen Bel ... gium
Contact:

Re: New posts appear on both sites - after a site replication

Post by warmweer »

Change that to mysqli then.

If that doesn't work then:
I had a look at the converter code. In functions_phpbb20.php you can see the table definition for the missing table
line 1790 // create a temporary table in which we store the clean usernames
You could try creating this table yourself before starting the conversion (but you will have to comment out $drop_sql = 'DROP TABLE ' . USERCONV_TABLE; or it will be deleted when starting the conversion).

Added:
You can create the table by executing: (copied from functions_phpbb20.php)

Code: Select all

			$create_sql = 'CREATE TABLE ' . USERCONV_TABLE . ' (
				user_id mediumint(8) NOT NULL,
				username_clean varchar(255) DEFAULT \'\' NOT NULL
			) CHARACTER SET `utf8` COLLATE `utf8_bin`';
Added again: forgot to mention that in your case (since we're bypassing some code, the table should have the name phpbb3_userconv so replace USERCONV_TABLE with 'phpbb3_userconv')

BTW this just an idea - no guarantee given
Spelling is freeware, which means you can use it for free.
On the other hand, it is not open source, which means you cannot change it or publish it in a modified form.


Time flies like an arrow, but fruit flies like a banana.
nguyen2075
Registered User
Posts: 25
Joined: Thu Sep 05, 2019 11:37 pm

Re: New posts appear on both sites - after a site replication

Post by nguyen2075 »

Thanks. I tried changing dbms entry, that didn't help.

Before I do what you suggested about creating the table, I want to add some info that I neglected to inform ... During my failed conversion with the table doesn't exists error, I was able to peek into the destination database (using MySQL Workbench), before the conversion, the table phpbb3_userconv was't there, during step 2, I peeked into the db and saw the table was there with all expected ~8000 users entries, then a little while later it got deleted, then I got the table doesn't exists error. So not sure why it got created an then deleted underneath.
User avatar
warmweer
Jr. Extension Validator
Posts: 11234
Joined: Fri Jul 04, 2003 6:34 am
Location: Van Allen Bel ... gium
Contact:

Re: New posts appear on both sites - after a site replication

Post by warmweer »

nguyen2075 wrote: Mon Nov 25, 2019 9:51 pm Thanks. I tried changing dbms entry, that didn't help.

Before I do what you suggested about creating the table, I want to add some info that I neglected to inform ... During my failed conversion with the table doesn't exists error, I was able to peek into the destination database (using MySQL Workbench), before the conversion, the table phpbb3_userconv was't there, during step 2, I peeked into the db and saw the table was there with all expected ~8000 users entries, then a little while later it got deleted, then I got the table doesn't exists error. So not sure why it got created an then deleted underneath.
OK, I was treading on uncharted territory anyway.

Since your previous conversion was successful, how about importing your current phpBB2 database into your test conversion setup and doing the conversion there. If that is also successful then all you need to do is to take a database backup of the 3.2, and import it in your live 3.2 database (which you can empty first).
Spelling is freeware, which means you can use it for free.
On the other hand, it is not open source, which means you cannot change it or publish it in a modified form.


Time flies like an arrow, but fruit flies like a banana.
nguyen2075
Registered User
Posts: 25
Joined: Thu Sep 05, 2019 11:37 pm

Re: New posts appear on both sites - after a site replication

Post by nguyen2075 »

This post viewtopic.php?t=1796975 suggested:

A white page indicates a server timeout. Try this:
Open {phpbb3_root}/install/install_convert.php
and add:
@set_time_limit(0);
@ini_set('memory_limit', '256M');
@ini_set('upload_max_filesize', '128M');
@ini_set('post_max_size', '256M');
@ini_set('max_input_time', '-1');
@ini_set('max_execution_time', '-1');
@ini_set('expect.timeout', '-1');
@ini_set('default_socket_timeout', '-1');

But I didn't find the file install/install_convert.php in my phpbb3 root.

Is there another file I can add such settings?
Post Reply

Return to “[3.2.x] Support Forum”