2

I am trying to install MediaWiki on my VPS running Ubuntu 14.10 and php 5.5.9-1ubuntu4.11. I installed php5 using this guide. Now am seeing the MediaWiki setup file. It tells me that the optional PECL is missing: "Warning: The intl PECL extension is not available to handle Unicode normalization, falling back to slow pure-PHP implementation."

phpinfo() confirms this (CTRL+F for "PECL" = 0 hits).

However, if I run sudo pecl install pecl_http I get an error:

...
checking for ext/raphf support... no
    configure: error: Please install pecl/raphf and activate extension=raphf.so in your php.ini
    ERROR: `/tmp/pear/temp/pecl_http/configure --with-http-zlib-dir=/usr --with-http-libcurl-dir=/usr --with-http-libevent-dir=/usr --with-http-libidn-dir=/usr' failed

The same error as this prior question on SO. I have tried all the things mentioned in the answers there including adding the three "extension=" lines to php.ini.

Trying to install raphf leads to:

sudo pecl install raphf
pecl/raphf is already installed and is the same as the released version 1.1.0
install failed

phpinfo() lists RAPHF 1.1.0 as installed too. A script to test (accessed via the browser, not through console):

echo extension_loaded(raphf) ? "raphf loaded" : "raphf not loaded";

Confirms that it is loaded. Script from a prior SO question that received no answers.

If I search for e.g. the raphf.so file on the server, it is not found. Same is true for the other three extensions added to php.ini (mentioned in the other questions).

Basically, RAPHF seems to be installed and not installed at the same time. I have run out of earlier questions and guides to consult, so I come here. Any ideas?

Community
  • 1
  • 1
CoderGuy123
  • 6,219
  • 5
  • 59
  • 89

1 Answers1

1

Install missing intl extension:

sudo apt-get install php5-intl

pecl_http and pecl_intl are two different things, btw.

Basically, RAPHF seems to be installed and not installed at the same time.

Webserver's PHP and console PHP use different php.ini's. So when you phpinfo(); on the webserver and you see module X, doesn't mean it's available via php-cli (pecl == console == php-cli).

Daniel W.
  • 31,164
  • 13
  • 93
  • 151
  • That command did install something new, but it did not change anything after restarting apache. I am not running `phpinfo()` in the console. I made a php file with it and access that via the browser. – CoderGuy123 Sep 03 '15 at 13:07
  • 1
    A friend suggested adding extension=intl to the main php.ini file. Doing this and restarting again made it work. To be sure that was the cause, I removed the line again and restarted, and it still works. So perhaps your solution was correct and I somehow did not restart correctly. I will give your answer the benefit of the doubt. :) – CoderGuy123 Sep 03 '15 at 13:47
  • You tried installing "pecl_http" before, but it has nothing to do with "pecl_intl". Also you can configure different extensions for WEB php and for CONSOLE php. I think a combination of a few minor things caused the installation not to work :) Good luck and glad it working now! – Daniel W. Sep 03 '15 at 15:40