?
avatar fastslack
fastslack
30 Mar 2016

mod_fcgid: stderr: PHP Fatal error: Cannot redeclare utf8_is_ascii_ctrl() (previously declared in /var/www/web/libraries/vendor/joomla/string/src/phputf8/utils/ascii.php:45) in /var/www/web/libraries/phputf8/utils/ascii.php on line 48

Steps to reproduce the issue

Clone this repo in webroot
Install Joomla!
run composer install or update
Try to access to site

Expected result

Actual result

System information (as much as possible)

$ apache2 -v
Server version: Apache/2.4.6 (Ubuntu)
Server built: Mar 19 2014 20:56:01
$ php -v
PHP 5.5.3-1ubuntu2.6 (cli) (built: Jul 7 2014 16:54:32)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2013 Zend Technologies
with Zend OPcache v7.0.3-dev, Copyright (c) 1999-2013, by Zend Technologies

avatar fastslack fastslack - open - 30 Mar 2016
avatar roland-d
roland-d - comment - 30 Mar 2016

@fastslack Is this even supposed to work? Joomla is distributed with the package versions that it supports, wouldn't composer get newer versions that are untested?

I guess this would be a real issue if we decide to ship a newer version of phputf8 with Joomla.

Just my 2 cents :)

avatar fastslack
fastslack - comment - 30 Mar 2016

@roland-d I used the default composer.json that come in Joomla! CMS distribution. I supposed that should be compatible but really i'm not sure about this.

avatar zero-24
zero-24 - comment - 30 Mar 2016

@fastslack this is because the phpuft8 is shipped with the string package and the core itself. I'm not sure if we can simple remove the version shipped with the CMS. Maybe @mbabker can have a look here?

avatar brianteeman brianteeman - change - 30 Mar 2016
Category External Library
avatar brianteeman brianteeman - change - 30 Mar 2016
Labels Added: ?
avatar mbabker
mbabker - comment - 30 Mar 2016

The phputf8 library located at libraries/phputf8 was left in place when the Composer integration was set up so as to not break extensions including files from that location. It should be considered deprecated, the version at libraries/vendor/joomla/string/src/phputf8 should be used going forward.

FWIW there are some functions in the phputf8 library that are not made available through the StringHelper class so you'd need to manually load the correct files. But those are honestly more of an exception than a rule.

avatar mbabker
mbabker - comment - 30 Mar 2016

Also to add, phputf8 has been treated differently than other libraries because other library code is included in other ways (either direct includes or autoloader rules). As a massive collection of functions, these files aren't autoloadable in the same sense that classes are. The latest tag of the Framework's String package does tell Composer to auto include all the files the StringHelper class is dependent on which allowed removing a lot of include checks from the class, but again this doesn't cover the entire library.

avatar brianteeman brianteeman - change - 1 Apr 2016
Status New Confirmed
avatar brianteeman
brianteeman - comment - 13 Apr 2016

Is there anything to do here or is it to be closed @mbabker


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9666.

avatar brianteeman brianteeman - change - 13 Apr 2016
Status Confirmed Information Required
avatar brianteeman
brianteeman - comment - 8 May 2016

Closed at this time


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9666.

avatar brianteeman brianteeman - change - 8 May 2016
Status Information Required Closed
Closed_Date 0000-00-00 00:00:00 2016-05-08 10:08:03
Closed_By brianteeman
avatar brianteeman brianteeman - close - 8 May 2016

Add a Comment

Login with GitHub to post a comment