Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.1.0 install issues #4769

Closed
rcubetrac opened this issue Feb 16, 2015 · 7 comments
Closed

1.1.0 install issues #4769

rcubetrac opened this issue Feb 16, 2015 · 7 comments
Assignees
Milestone

Comments

@rcubetrac
Copy link

Reported by slsdoug on 16 Feb 2015 21:02 UTC as Trac ticket #1490280

I had a few problems upgrading to 1.1.0. I have PHP 5.4. The first server does not have mbstring extension. This caused fatal duplicate function defs, mb_strlen, etc. They exist in bootstrap.php, around line 374, and mbstring.php. I had to put a conditional (if(!function_exists('mb_strlen'))) around the 5 functions (listed in bootstrap.php) in mbstring.php to eradicate the fatal dup error.
vendor/patchwork/utf8/class/Patchwork/Utf8/Bootup/mbstring.php

The other server I use has PHP 5.4 but does have mbstring extension but no mb_regex_encoding(). It crashed until I did this (around line 83 in bootstrap.php):
if (extension_loaded('mbstring')) {
mb_internal_encoding(RCUBE_CHARSET);
if(function_exists("mb_regex_encoding"))
mb_regex_encoding(RCUBE_CHARSET);
}

Migrated-From: http://trac.roundcube.net/ticket/1490280

@rcubetrac
Copy link
Author

Milestone changed by @alecpl on 17 Feb 2015 08:02 UTC

later => 1.1.1

@rcubetrac
Copy link
Author

Comment by @thomascube on 17 Feb 2015 08:07 UTC

What kind of (broken?) installation of PHP do you have that pretends to have mbstring but then doesn't support alll functions documented tp be part of the mbstring module?

@rcubetrac
Copy link
Author

Comment by @alecpl on 17 Feb 2015 12:02 UTC

Thomas, problem is that if you have mbstring extension disabled Roundcube Framework creates some mb_* functions in bootstrap.php and iniset.php file loads Patchwork which creates some mb_* functions in mbstring.php file.

So, there are two problems here:

  1. Patchwork does not check if any of mb_* functions exist.
  2. Patchwork does not create mb_regex_encoding() function.

@rcubetrac
Copy link
Author

Comment by @alecpl on 22 Feb 2015 10:19 UTC

Small correction. I was wrong about mb_regex_encoding() and Patchwork. Of course the function is called before we initialize Patchwork. Anyway, I found that the reason for this is that this function is just disabled on some cPanel installations. Simple use of function_exists() will fix that part of the issue.

@rcubetrac
Copy link
Author

Owner changed by @alecpl on 22 Feb 2015 10:19 UTC

=> alec

@rcubetrac
Copy link
Author

Comment by @alecpl on 22 Feb 2015 10:52 UTC

Fixed in f070da7.

I don't know, maybe a better solution would be to remove mb_* functions from bootstrap.php and load the Patchwork's mbstring layer (in iniset.php as it was before). In other words to make mbstring a Framework's requirement. However, it would be a backward incompatible change.

@rcubetrac
Copy link
Author

Status changed by @alecpl on 22 Feb 2015 10:53 UTC

new => closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants