Discussion:
[PHP-INSTALL] Fwd: PHP - mb-string not found
Jitesh Dundas
2014-05-07 21:28:50 UTC
Permalink
Hi All,

I am having to install php5.3.28 on a Linux RHEL 6 server without root
access . Thus, I need to build the php from the source and then compile it
with all the modules.

I am having two problems:-
1) I have zlib installed but still it keeps telling me that "zlib not
found".If I give the --with-zlib="path to zlib" param in the ./configure
option, then it will compile but when I run phpinfo.php , then it does not
show up.
2) The php-mbstring was not found .

The first one lets me compile with a with-zlib="path to zlib" but the
second one does not work at all and is stalling me.I dont have a
php-mbstring dependency in the RHEL extension also and thus I need to build
and compile it myself. However, I cannot find this php-mbstring anywhere.
Also, what is the parameter for the php-mbstring if you have it installed
in a separate location. Is it coming in php source by default?

./configure \
--prefix=/opt/app/d1srt1w4/opt/app/php \
--bindir=/opt/app/d1srt1w4/opt/app/php/bin \
--with-config-file-path=/opt/app/d1srt1w4/opt/app/php/etc \
--with-config-file-scan-dir=/opt/app/d1srt1w4/opt/app/php/var/db \
--mandir=/opt/app/d1srt1w4/opt/app/php/share/man \
--infodir=/opt/app/d1srt1w4/opt/app/php/share/info \
--enable-fpm \
--enable-pdo \
--with-pdo-sqlite \
--with-pdo-mysql \
--with-mysql=/opt/app/d1srt1w4/opt/app/mysql/bin \
--with-libdir=lib64 \
--with-mysqli=/opt/app/d1srt1w4/opt/app/mysql/bin/mysql_config \
#--with-mysql-sock=/opt/app/d1srt1w4/opt/app/mysql/mysqld.sock \
#--with-pear \
--enable-mbstring \
--with-curl \
"installphp.sh" 26L,
883C
3,1 Top
./configure \
--prefix=/opt/app/d1srt1w4/opt/app/php \
--bindir=/opt/app/d1srt1w4/opt/app/php/bin \
--with-config-file-path=/opt/app/d1srt1w4/opt/app/php/etc \
--with-config-file-scan-dir=/opt/app/d1srt1w4/opt/app/php/var/db \
--mandir=/opt/app/d1srt1w4/opt/app/php/share/man \
--infodir=/opt/app/d1srt1w4/opt/app/php/share/info \
--enable-fpm \
--enable-pdo \
--with-pdo-sqlite \
--with-pdo-mysql \
--with-mysql=/opt/app/d1srt1w4/opt/app/mysql/bin \
--with-libdir=lib64 \
--with-mysqli=/opt/app/d1srt1w4/opt/app/mysql/bin/mysql_config \
#--with-mysql-sock=/opt/app/d1srt1w4/opt/app/mysql/mysqld.sock \
#--with-pear \
--enable-mbstring \
--with-curl \
--enable-ftp \
--enable-soap \
--enable-sockets \
--with-gd \
--with-jpeg-dir=/opt/app/d1srt1w4/opt/app/piwiksw/jpeg \
--with-zlib=/opt/app/d1srt1w4/opt/app/zlib \
--with-libxml-dir=/opt/app/d1srt1w4/opt/app/libxml2

Please help on this.

Thanks,
JItesh
Jigar Dhulla
2014-05-08 03:40:17 UTC
Permalink
Hi,

After successful compile, Check "php -m" does it list zlib and mbstring?

Try setting LDFLAGS and CPPFLAGS before ./configure commands. So that
proper headers and libraries are found.
Post by Jitesh Dundas
Hi All,
I am having to install php5.3.28 on a Linux RHEL 6 server without root
access . Thus, I need to build the php from the source and then compile it
with all the modules.
I am having two problems:-
1) I have zlib installed but still it keeps telling me that "zlib not
found".If I give the --with-zlib="path to zlib" param in the ./configure
option, then it will compile but when I run phpinfo.php , then it does not
show up.
2) The php-mbstring was not found .
The first one lets me compile with a with-zlib="path to zlib" but the
second one does not work at all and is stalling me.I dont have a
php-mbstring dependency in the RHEL extension also and thus I need to build
and compile it myself. However, I cannot find this php-mbstring anywhere.
Also, what is the parameter for the php-mbstring if you have it installed
in a separate location. Is it coming in php source by default?
./configure \
--prefix=/opt/app/d1srt1w4/opt/app/php \
--bindir=/opt/app/d1srt1w4/opt/app/php/bin \
--with-config-file-path=/opt/app/d1srt1w4/opt/app/php/etc \
--with-config-file-scan-dir=/opt/app/d1srt1w4/opt/app/php/var/db \
--mandir=/opt/app/d1srt1w4/opt/app/php/share/man \
--infodir=/opt/app/d1srt1w4/opt/app/php/share/info \
--enable-fpm \
--enable-pdo \
--with-pdo-sqlite \
--with-pdo-mysql \
--with-mysql=/opt/app/d1srt1w4/opt/app/mysql/bin \
--with-libdir=lib64 \
--with-mysqli=/opt/app/d1srt1w4/opt/app/mysql/bin/mysql_config \
#--with-mysql-sock=/opt/app/d1srt1w4/opt/app/mysql/mysqld.sock \
#--with-pear \
--enable-mbstring \
--with-curl \
"installphp.sh" 26L,
883C
3,1 Top
./configure \
--prefix=/opt/app/d1srt1w4/opt/app/php \
--bindir=/opt/app/d1srt1w4/opt/app/php/bin \
--with-config-file-path=/opt/app/d1srt1w4/opt/app/php/etc \
--with-config-file-scan-dir=/opt/app/d1srt1w4/opt/app/php/var/db \
--mandir=/opt/app/d1srt1w4/opt/app/php/share/man \
--infodir=/opt/app/d1srt1w4/opt/app/php/share/info \
--enable-fpm \
--enable-pdo \
--with-pdo-sqlite \
--with-pdo-mysql \
--with-mysql=/opt/app/d1srt1w4/opt/app/mysql/bin \
--with-libdir=lib64 \
--with-mysqli=/opt/app/d1srt1w4/opt/app/mysql/bin/mysql_config \
#--with-mysql-sock=/opt/app/d1srt1w4/opt/app/mysql/mysqld.sock \
#--with-pear \
--enable-mbstring \
--with-curl \
--enable-ftp \
--enable-soap \
--enable-sockets \
--with-gd \
--with-jpeg-dir=/opt/app/d1srt1w4/opt/app/piwiksw/jpeg \
--with-zlib=/opt/app/d1srt1w4/opt/app/zlib \
--with-libxml-dir=/opt/app/d1srt1w4/opt/app/libxml2
Please help on this.
Thanks,
JItesh
Jitesh Dundas
2014-05-08 14:47:33 UTC
Permalink
Hi,

Thank you for your reply. I did but zlib and mb-string do not show up in
there.

I will give a shot to adding the flags first in them.
Post by Jigar Dhulla
Hi,
After successful compile, Check "php -m" does it list zlib and mbstring?
Try setting LDFLAGS and CPPFLAGS before ./configure commands. So that
proper headers and libraries are found.
Post by Jitesh Dundas
Hi All,
I am having to install php5.3.28 on a Linux RHEL 6 server without root
access . Thus, I need to build the php from the source and then compile it
with all the modules.
I am having two problems:-
1) I have zlib installed but still it keeps telling me that "zlib not
found".If I give the --with-zlib="path to zlib" param in the ./configure
option, then it will compile but when I run phpinfo.php , then it does not
show up.
2) The php-mbstring was not found .
The first one lets me compile with a with-zlib="path to zlib" but the
second one does not work at all and is stalling me.I dont have a
php-mbstring dependency in the RHEL extension also and thus I need to build
and compile it myself. However, I cannot find this php-mbstring anywhere.
Also, what is the parameter for the php-mbstring if you have it
installed in a separate location. Is it coming in php source by default?
./configure \
--prefix=/opt/app/d1srt1w4/opt/app/php \
--bindir=/opt/app/d1srt1w4/opt/app/php/bin \
--with-config-file-path=/opt/app/d1srt1w4/opt/app/php/etc \
--with-config-file-scan-dir=/opt/app/d1srt1w4/opt/app/php/var/db \
--mandir=/opt/app/d1srt1w4/opt/app/php/share/man \
--infodir=/opt/app/d1srt1w4/opt/app/php/share/info \
--enable-fpm \
--enable-pdo \
--with-pdo-sqlite \
--with-pdo-mysql \
--with-mysql=/opt/app/d1srt1w4/opt/app/mysql/bin \
--with-libdir=lib64 \
--with-mysqli=/opt/app/d1srt1w4/opt/app/mysql/bin/mysql_config \
#--with-mysql-sock=/opt/app/d1srt1w4/opt/app/mysql/mysqld.sock \
#--with-pear \
--enable-mbstring \
--with-curl \
"installphp.sh" 26L,
883C
3,1 Top
./configure \
--prefix=/opt/app/d1srt1w4/opt/app/php \
--bindir=/opt/app/d1srt1w4/opt/app/php/bin \
--with-config-file-path=/opt/app/d1srt1w4/opt/app/php/etc \
--with-config-file-scan-dir=/opt/app/d1srt1w4/opt/app/php/var/db \
--mandir=/opt/app/d1srt1w4/opt/app/php/share/man \
--infodir=/opt/app/d1srt1w4/opt/app/php/share/info \
--enable-fpm \
--enable-pdo \
--with-pdo-sqlite \
--with-pdo-mysql \
--with-mysql=/opt/app/d1srt1w4/opt/app/mysql/bin \
--with-libdir=lib64 \
--with-mysqli=/opt/app/d1srt1w4/opt/app/mysql/bin/mysql_config \
#--with-mysql-sock=/opt/app/d1srt1w4/opt/app/mysql/mysqld.sock \
#--with-pear \
--enable-mbstring \
--with-curl \
--enable-ftp \
--enable-soap \
--enable-sockets \
--with-gd \
--with-jpeg-dir=/opt/app/d1srt1w4/opt/app/piwiksw/jpeg \
--with-zlib=/opt/app/d1srt1w4/opt/app/zlib \
--with-libxml-dir=/opt/app/d1srt1w4/opt/app/libxml2
Please help on this.
Thanks,
JItesh
Jigar Dhulla
2014-05-09 05:03:06 UTC
Permalink
Hi,

Are they not statically build to PHP ?

Check if .so files are created in extensions folder. If they are present,
you will have to load the extensions from php.ini

add the lines in the end of php.ini
extensions=zlib.so
extensions=mbstring.so
Post by Jitesh Dundas
Hi,
Thank you for your reply. I did but zlib and mb-string do not show up in
there.
I will give a shot to adding the flags first in them.
Post by Jigar Dhulla
Hi,
After successful compile, Check "php -m" does it list zlib and mbstring?
Try setting LDFLAGS and CPPFLAGS before ./configure commands. So that
proper headers and libraries are found.
Post by Jitesh Dundas
Hi All,
I am having to install php5.3.28 on a Linux RHEL 6 server without root
access . Thus, I need to build the php from the source and then compile it
with all the modules.
I am having two problems:-
1) I have zlib installed but still it keeps telling me that "zlib not
found".If I give the --with-zlib="path to zlib" param in the ./configure
option, then it will compile but when I run phpinfo.php , then it does not
show up.
2) The php-mbstring was not found .
The first one lets me compile with a with-zlib="path to zlib" but the
second one does not work at all and is stalling me.I dont have a
php-mbstring dependency in the RHEL extension also and thus I need to build
and compile it myself. However, I cannot find this php-mbstring anywhere.
Also, what is the parameter for the php-mbstring if you have it
installed in a separate location. Is it coming in php source by default?
./configure \
--prefix=/opt/app/d1srt1w4/opt/app/php \
--bindir=/opt/app/d1srt1w4/opt/app/php/bin \
--with-config-file-path=/opt/app/d1srt1w4/opt/app/php/etc \
--with-config-file-scan-dir=/opt/app/d1srt1w4/opt/app/php/var/db \
--mandir=/opt/app/d1srt1w4/opt/app/php/share/man \
--infodir=/opt/app/d1srt1w4/opt/app/php/share/info \
--enable-fpm \
--enable-pdo \
--with-pdo-sqlite \
--with-pdo-mysql \
--with-mysql=/opt/app/d1srt1w4/opt/app/mysql/bin \
--with-libdir=lib64 \
--with-mysqli=/opt/app/d1srt1w4/opt/app/mysql/bin/mysql_config \
#--with-mysql-sock=/opt/app/d1srt1w4/opt/app/mysql/mysqld.sock \
#--with-pear \
--enable-mbstring \
--with-curl \
"installphp.sh" 26L,
883C
3,1 Top
./configure \
--prefix=/opt/app/d1srt1w4/opt/app/php \
--bindir=/opt/app/d1srt1w4/opt/app/php/bin \
--with-config-file-path=/opt/app/d1srt1w4/opt/app/php/etc \
--with-config-file-scan-dir=/opt/app/d1srt1w4/opt/app/php/var/db \
--mandir=/opt/app/d1srt1w4/opt/app/php/share/man \
--infodir=/opt/app/d1srt1w4/opt/app/php/share/info \
--enable-fpm \
--enable-pdo \
--with-pdo-sqlite \
--with-pdo-mysql \
--with-mysql=/opt/app/d1srt1w4/opt/app/mysql/bin \
--with-libdir=lib64 \
--with-mysqli=/opt/app/d1srt1w4/opt/app/mysql/bin/mysql_config \
#--with-mysql-sock=/opt/app/d1srt1w4/opt/app/mysql/mysqld.sock \
#--with-pear \
--enable-mbstring \
--with-curl \
--enable-ftp \
--enable-soap \
--enable-sockets \
--with-gd \
--with-jpeg-dir=/opt/app/d1srt1w4/opt/app/piwiksw/jpeg \
--with-zlib=/opt/app/d1srt1w4/opt/app/zlib \
--with-libxml-dir=/opt/app/d1srt1w4/opt/app/libxml2
Please help on this.
Thanks,
JItesh
--
Regards,
Jigar Dhulla
Loading...