J3 Issue ?
avatar Karl-Goddard
Karl-Goddard
12 Mar 2019

Steps to reproduce the issue

Update any Joomla site that uses geoip2 to v3.9.4

Expected result

The site to be fully functional.

Actual result

Unexpected file extension in "phar://geoip2.phar/src/Database/Reader.php"

System information (as much as possible)

  • The owner is set to apache

  • The server is running on PHP 5.6.36

  • CentOS Linux version 7
    screenshot-dev sungroupinc com-8088-2019 03 12-16-45-06

Additional comments

avatar Karl-Goddard Karl-Goddard - open - 12 Mar 2019
avatar joomla-cms-bot joomla-cms-bot - change - 12 Mar 2019
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 12 Mar 2019
avatar ReLater
ReLater - comment - 12 Mar 2019

Maybe related:
#23907
#23956
@HLeithner

avatar franz-wohlkoenig franz-wohlkoenig - change - 13 Mar 2019
Status New Discussion
avatar HLeithner
HLeithner - comment - 13 Mar 2019

@Karl-Goddard hmm strange @jurihahn tested it with the new version successfully

avatar HLeithner
HLeithner - comment - 13 Mar 2019

@Karl-Goddard can test this on another host? With a lower or higher PHP version?

avatar Karl-Goddard
Karl-Goddard - comment - 13 Mar 2019

@HLeithner I have another test server running PHP7. I'll give it a try and let you know the result.

avatar Karl-Goddard
Karl-Goddard - comment - 13 Mar 2019

@HLeithner

PHP version:

PHP 7.2.13 (cli) (built: Dec 5 2018 07:37:23) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies with Zend OPcache v7.2.13, Copyright (c) 1999-2018, by Zend Technologies

Attached is a screenshot of the site on the php7 server after it was updated to 3.9.4

![screenshot-php7 sungroupinc com-2019 03 13-08-25-39]

(https://user-images.githubusercontent.com/47645546/54278815-db060c00-4569-11e9-82ea-08fe618bef6d.png)

avatar Karl-Goddard
Karl-Goddard - comment - 13 Mar 2019

@ReLater I did the patch from #23907, which now gives me a new error:

screenshot-php7 sungroupinc com-2019 03 13-08-48-52

avatar ohader
ohader - comment - 13 Mar 2019

@Karl-Goddard In the mentioned PharStreamWrapper.php file around line 445 (in method collectInvocation($path)), could you please var_dump($path) and post it here?

avatar Karl-Goddard
Karl-Goddard - comment - 13 Mar 2019

@ohader var_dump($path) doesn't give any output. I tries placing it at the start of the function as well as before this line $manager->getCollection()->collect($this->invocation);

avatar ReLater
ReLater - comment - 13 Mar 2019

I did the patch from #23907, which now gives me a new error

As far as I know the final patch is already integrated in Joomla 3.9.4 with pr 23956. Code in 23907 was just a quick pre-test for old Joomla 3.9.3 code

avatar jurihahn
jurihahn - comment - 14 Mar 2019

I tested it again with Joomla 3.9.4, and it works as verified earlier.
PHP 7.3.2 (apache2handler)

avatar ohader
ohader - comment - 17 Mar 2019

Just for internal research and verification: Which version of the geoip2.phar has been used?

avatar jurihahn
jurihahn - comment - 17 Mar 2019

Which version of the geoip2.phar has been used?

latest 2.9.0

avatar franz-wohlkoenig franz-wohlkoenig - change - 22 Mar 2019
Category External Library
avatar franz-wohlkoenig franz-wohlkoenig - change - 4 Apr 2019
Labels Added: J3 Issue
avatar franz-wohlkoenig franz-wohlkoenig - labeled - 4 Apr 2019
avatar jurihahn
jurihahn - comment - 4 Apr 2019

I think my test was wrong ... I made my correction, then I applied the patch, but it looks like patch tool dont override my hotfix...
My last test with pure Joomla was not successful, I cannot use "geoip.phar".

avatar jurihahn
jurihahn - comment - 9 Apr 2019

does not work even after update to Joomla 3.9.5

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 10 Apr 2019

@jurihahn that is expected as no Dev. made a Pull Request which solve the Issue.

avatar jurihahn
jurihahn - comment - 11 Apr 2019

i have workaround for "GeoIP2.phar"
require_once ( 'phar://' . __DIR__ . '/geoip2.phar/vendor/autoload.php' );

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 12 Apr 2019

@jurihahn is it a Core-Issue?

avatar jurihahn
jurihahn - comment - 12 Apr 2019

Joomla include this library https://github.com/TYPO3/phar-stream-wrapper since version 3.9.3
It's a bug in this library.

avatar HLeithner
HLeithner - comment - 14 Apr 2019

do you have example code how you use this phar file? something I can copy-paste or install?

avatar jurihahn
jurihahn - comment - 14 Apr 2019

In this issue #23907 i have description how to get this error.

avatar HLeithner HLeithner - change - 14 Apr 2019
Status Discussion Closed
Closed_Date 0000-00-00 00:00:00 2019-04-14 19:42:19
Closed_By HLeithner
avatar HLeithner
HLeithner - comment - 14 Apr 2019

Ok, I think we can close this, this is a phar-stream-wrapper problem and has it own issue at TYPO3/phar-stream-wrapper#21

Workaround: require_once ( 'phar://' . __DIR__ . '/geoip2.phar/vendor/autoload.php' );

avatar HLeithner HLeithner - close - 14 Apr 2019

Add a Comment

Login with GitHub to post a comment