1

Im running my server on Red Hat Enterprise Linux with Weblogic server, I have PHP5.3 installed on this, recently for one of my project I had to use MBSTRING extension, Ive noticed that was not installed before and I did it. But still the PHP is unable to recognize this extension, is there any confrontational setup to do after installing?

please help me.

user2398514
  • 137
  • 4
  • 17
  • How did you install it? Did you load the extension in php.ini? – Sven Aug 09 '14 at 06:39
  • @Svenskunganka I installed it using yum install php-mbstring, do I need to configure anything in php.ini? – user2398514 Aug 09 '14 at 06:44
  • have you restarted the web server? (normally I would expect yum doing it, but however, I would try it) – hek2mgl Aug 09 '14 at 06:44
  • @hek2mgl yes, I have restarted it, many times, but no luck – user2398514 Aug 09 '14 at 06:46
  • once would have been enough :) .. Is it a managed server or a root server? – hek2mgl Aug 09 '14 at 06:46
  • what gives you `php -i | grep -i mbstring` ? – hek2mgl Aug 09 '14 at 06:48
  • its a lengthy response, unable to paste here – user2398514 Aug 09 '14 at 06:57
  • License version 2.1. mbstring.detect_order => no value => no value mbstring.encoding_translation => Off => Off mbstring.func_overload => 0 => 0 mbstring.http_input => pass => pass mbstring.http_output => pass => pass mbstring.http_output_conv_mimetypes => ^(text/|application/xhtml\+xml) => ^(text/|application/xhtml\+xml) mbstring.internal_encoding => no value => no value mbstring.language => neutral => neutral mbstring.strict_detection => Off => Off mbstring.substitute_character => no value => no value – user2398514 Aug 09 '14 at 06:57
  • Just a hint: you can either add such output to the question (preferred in this case) or if it gets to large, then you can use a pastebin and post the link here... – hek2mgl Aug 09 '14 at 07:10
  • back to the problem, it looks like the mbstring extension is indeed installed, what makes you think that it isn't? Can you show some example code which is not working? – hek2mgl Aug 09 '14 at 07:11
  • Array ( [0] => Core [1] => date [2] => ereg [3] => libxml [4] => pcre [5] => sqlite3 [6] => ctype [7] => dom [8] => fileinfo [9] => filter [10] => hash [11] => iconv [12] => json [13] => oci8 [14] => SPL [15] => PDO [16] => pdo_sqlite [17] => session [18] => posix [19] => Reflection [20] => standard [21] => SimpleXML [22] => SQLite [23] => Phar [24] => tokenizer [25] => xml [26] => xmlreader [27] => xmlwriter [28] => apache2handler ) MBSTRING NOT RUNNING – user2398514 Aug 09 '14 at 07:16
  • Ive printed the enabled modules, it doesnt show mbstring there, and I have placed a checkup for mb string, that prints MBSTRING NOT RUNNING – user2398514 Aug 09 '14 at 07:16
  • http://www.i2kclasses.com/i2kex_images/editor/status.php – user2398514 Aug 09 '14 at 07:17
  • 1
    Usually there are different configuration files (and/or configuration folders) for each SAPI. It looks like mbstring is enabled in the `php-cli` SAPI but not for the webserver (expected apache2, if not, please tell how you actually integrated PHP) . You'll need to make sure that the extension will be enabled by `extension=mbstring.so`, also in your webserver SAPI configs. Then restart the web server – hek2mgl Aug 09 '14 at 07:26

1 Answers1

0

At the terminal, let's first see if you have this on your server:

rpm -qa | grep php

This command rpm -qa list everything installed on your box. Pipe it through grep to only show lines containing 'php' and you should see a decent list. On my dev box, I see output as such...

$ rpm -qa | grep php
php-5.3.3-40.el6_6.x86_64
php-mbstring-5.3.3-40.el6_6.x86_64
php-pecl-memcache-3.0.5-4.el6.x86_64
php-mysql-5.3.3-40.el6_6.x86_64
php-ldap-5.3.3-40.el6_6.x86_64
php-cli-5.3.3-40.el6_6.x86_64
php-pear-XML-Parser-1.3.4-1.el6.noarch
php-gd-5.3.3-40.el6_6.x86_64
php-pear-1.9.4-4.el6.noarch
php-pear-XML-RSS-1.0.1-1.el6.noarch
php-xml-5.3.3-40.el6_6.x86_64
php-common-5.3.3-40.el6_6.x86_64
php-pdo-5.3.3-40.el6_6.x86_64

Now if you don't see it, attempt to install it via yum. If however, your server returns something like No package php-mbstring available or like this below:

$ sudo yum install php-mbstring
[sudo] password for mr-super-cool: 
Loaded plugins: product-id, rhnplugin, subscription-manager
This system is receiving updates from RHN Classic or Red Hat Satellite.
No package php-mbstring available.
Error: Nothing to do

That means you probably need to subscribe to the Extra Packages for Enterprise Linux (EPEL) Repository. Cyberciti describes this as:

EPEL (Extra Packages for Enterprise Linux) is a volunteer-based community effort from the Fedora project to create a repository of high-quality add-on packages that complement the Fedora-based Red Hat Enterprise Linux (RHEL) and its compatible spinoffs, such as CentOS and Scientific Linux.

That same page has instructions for RHEL 5 and RHEL 6:

RHEL 5.x / CentOS 5.x Users

Type the following command as root user to install repo:

# rpm -Uvh http://download.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm

RHEL 6.x / CentOS 6.x Users

Type the following command as root user to install repo:

# rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm

For RHEL 7 For RHEL 7 let yum take care of that for you.

$ sudo yum install epel-release
$ sudo systemctl restart httpd.service
Rick
  • 591
  • 1
  • 9
  • 23
  • Or the tl;dr version: Install via yum. If that doesn't work, open up the EPEL repo and try again. Restart Apache. – Rick Jun 08 '15 at 17:27