Logging issues with IPv6?

Phoca Download - download manager
arminh
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 26 Jul 2022, 20:50

Logging issues with IPv6?

Post by arminh »

Hi
Apologies if this was asked before, I browsed most of the recent topics and have not found an answer yet.

Using Phoca Download, Logging is enabled for both Down- and Upload.
Works fine for most users but with a few users we have an issue.
On download they receive the following error message:
Data too long for column 'ip' at row 1
The column ip in the database has a maximum length of 21, that does not fit with IPv6.

I could also reproduce when switching the connection on my mobile to "IPv6-only". With at least one cable internet provider here in Germany, the external IP is IPv6 only

Is this an known issue?
Any known solution?
Obvious workaround would be to switch of logging, but we what to track who downloaded what.
Any side effects, besides perhaps formatting on the Logging-Page, if I just increase the size of the column on the database?

regards
Armin
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47810
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Logging issues with IPv6?

Post by Jan »

Hi, which version of Phoca Download do you use?

In latest (4.0.2), there is ip column length ready for the IPv6.

So this can happen:
- when older version is used
- or when newest version is used but it was upgraded and the column length was not updated.

Try to go to your database, and edit following column:

Column: ip
Table: jos_phocadownload_logging (the prefix could be different in your database)

Change the column length from 20 to 50

Image

Jan
If you find Phoca extensions useful, please support the project
arminh
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 26 Jul 2022, 20:50

Re: Logging issues with IPv6?

Post by arminh »

Thanks for the quick reply, it is 4.0.2, but obviously database was not upgraded. We had a rather rough update from Joomla 3 to 4, perhaps a step was accidently skipped here.
Will change the column length and report here afterwards, might take until I have some spare time during the weekend.

Armin
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47810
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Logging issues with IPv6?

Post by Jan »

OK
If you find Phoca extensions useful, please support the project
arminh
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 26 Jul 2022, 20:50

Re: Logging issues with IPv6?

Post by arminh »

Hi
feedback as promised, just in case somebody has the same issue and notices this thread.
extending the IP-Column to varchar(50) worked, download including logging was successful.

Will check later why the database was not updated

Armin
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47810
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Logging issues with IPv6?

Post by Jan »

OK, thank you for the info.

Jan
If you find Phoca extensions useful, please support the project
Post Reply