Welcome! Log In Create A New Profile

Advanced

can't recompile php?

Posted by unomateo 
can't recompile php?
September 13, 2010 08:27PM
Hi,

I'm moving from nginx and Spawn-fcgi to nginx and php-fpm. I downloaded php 5.3.3 and compiled it with php-fpm.

everything worked fine, I got nginx running fine, but I didn't enable mysql support, only mysqli. I found out that WordPress needs mysql.

So, I'm trying to recompile php with --with-mysql and it keeps failing during "make". I've even tried the old configuration settings and it still fails during make. I'm new to compiling from source. I thought you could run ./configure with a single extension to enable it while maintaining the original configuration. If that's not the case, how will I update php if I need to add an extension?

this is the error:
[code]
/sources/php-5.3.3/ext/standard/html.c:732: undefined reference to `mbstring_globals'
main/rfc1867.o: In function `substring_conf':
/sources/php-5.3.3/main/rfc1867.c:583: undefined reference to `php_mb_encoding_translation'
/sources/php-5.3.3/main/rfc1867.c:584: undefined reference to `php_mb_gpc_mbchar_bytes'
main/rfc1867.o: In function `php_ap_getword_conf':
/sources/php-5.3.3/main/rfc1867.c:607: undefined reference to `php_mb_encoding_translation'
/sources/php-5.3.3/main/rfc1867.c:609: undefined reference to `php_mb_gpc_encoding_detector'
main/rfc1867.o: In function `php_mb_flush_gpc_variables':
/sources/php-5.3.3/main/rfc1867.c:62: undefined reference to `php_mb_encoding_translation'
/sources/php-5.3.3/main/rfc1867.c:64: undefined reference to `php_mb_gpc_encoding_detector'
/sources/php-5.3.3/main/rfc1867.c:65: undefined reference to `php_mb_gpc_encoding_converter'
main/rfc1867.o: In function `rfc1867_post_handler':
/sources/php-5.3.3/main/rfc1867.c:845: undefined reference to `php_mb_encoding_translation'
/sources/php-5.3.3/main/rfc1867.c:940: undefined reference to `php_mb_encoding_translation'
/sources/php-5.3.3/main/rfc1867.c:1174: undefined reference to `php_mb_encoding_translation'
/sources/php-5.3.3/main/rfc1867.c:1181: undefined reference to `php_mb_gpc_encoding_detector'
/sources/php-5.3.3/main/rfc1867.c:1185: undefined reference to `php_mb_strrchr'
/sources/php-5.3.3/main/rfc1867.c:1186: undefined reference to `php_mb_strrchr'
/sources/php-5.3.3/main/rfc1867.c:1183: undefined reference to `php_mb_gpc_encoding_converter'
main/output.o: In function `php_ob_init_named':
/sources/php-5.3.3/main/output.c:438: undefined reference to `php_ob_gzhandler_check'
collect2: ld returned 1 exit status
make: *** [sapi/cgi/php-cgi] Error 1

[/code]
Jérôme Loyet
Re: can't recompile php?
September 14, 2010 01:48AM
2010/9/14 unomateo <nginx-forum@nginx.us>:
> Hi,
>
> I'm moving from nginx and Spawn-fcgi to nginx and php-fpm. I downloaded
> php 5.3.3 and compiled it with php-fpm.
>
> everything worked fine, I got nginx running fine, but I didn't enable
> mysql support, only mysqli. I found out that WordPress needs mysql.
>
> So, I'm trying to recompile php with --with-mysql and it keeps failing
> during "make". I've even tried the old configuration settings and it
> still fails during make. I'm new to compiling from source. I thought you
> could run ./configure with a single extension to enable it while
> maintaining the original configuration. If that's not the case, how will
> I update php if I need to add an extension?

did you make clean before recompiling ?

>
> this is the error:
> [code]
> /sources/php-5.3.3/ext/standard/html.c:732: undefined reference to
> `mbstring_globals'
> main/rfc1867.o: In function `substring_conf':
> /sources/php-5.3.3/main/rfc1867.c:583: undefined reference to
> `php_mb_encoding_translation'
> /sources/php-5.3.3/main/rfc1867.c:584: undefined reference to
> `php_mb_gpc_mbchar_bytes'
> main/rfc1867.o: In function `php_ap_getword_conf':
> /sources/php-5.3.3/main/rfc1867.c:607: undefined reference to
> `php_mb_encoding_translation'
> /sources/php-5.3.3/main/rfc1867.c:609: undefined reference to
> `php_mb_gpc_encoding_detector'
> main/rfc1867.o: In function `php_mb_flush_gpc_variables':
> /sources/php-5.3.3/main/rfc1867.c:62: undefined reference to
> `php_mb_encoding_translation'
> /sources/php-5.3.3/main/rfc1867.c:64: undefined reference to
> `php_mb_gpc_encoding_detector'
> /sources/php-5.3.3/main/rfc1867.c:65: undefined reference to
> `php_mb_gpc_encoding_converter'
> main/rfc1867.o: In function `rfc1867_post_handler':
> /sources/php-5.3.3/main/rfc1867.c:845: undefined reference to
> `php_mb_encoding_translation'
> /sources/php-5.3.3/main/rfc1867.c:940: undefined reference to
> `php_mb_encoding_translation'
> /sources/php-5.3.3/main/rfc1867.c:1174: undefined reference to
> `php_mb_encoding_translation'
> /sources/php-5.3.3/main/rfc1867.c:1181: undefined reference to
> `php_mb_gpc_encoding_detector'
> /sources/php-5.3.3/main/rfc1867.c:1185: undefined reference to
> `php_mb_strrchr'
> /sources/php-5.3.3/main/rfc1867.c:1186: undefined reference to
> `php_mb_strrchr'
> /sources/php-5.3.3/main/rfc1867.c:1183: undefined reference to
> `php_mb_gpc_encoding_converter'
> main/output.o: In function `php_ob_init_named':
> /sources/php-5.3.3/main/output.c:438: undefined reference to
> `php_ob_gzhandler_check'
> collect2: ld returned 1 exit status
> make: *** [sapi/cgi/php-cgi] Error 1
>
> [/code]
>
> Posted at Nginx Forum: http://forum.nginx.org/read.php?3,130169,130169#msg-130169
>
>
Re: can't recompile php?
September 14, 2010 05:33PM
No,

I ran this:

./buildconf --force
./configure --with the options
make
make install

Then when trying to recompile
I ran

./configure --with-mysql
make
errors out
Jérôme Loyet
Re: can't recompile php?
September 14, 2010 05:40PM
2010/9/14 unomateo <nginx-forum@nginx.us>:
> No,
>
> I ran this:
>
> ./buildconf --force
> ./configure --with the options
> make
> make install
>
> Then when trying to recompile
> I ran
>
> ./configure --with-mysql
> make
> errors out

how can you activate fpm without setting --with-fpm ?

Is it really a FPM related problem ?

>
> Posted at Nginx Forum: http://forum.nginx.org/read.php?3,130169,130464#msg-130464
>
>
Re: can't recompile php?
September 15, 2010 04:21PM
I did the compile with fpm... The reason I posted in this section is becuase I can install nginx with PHP fine using yum, but since you have to compile php to get php-fpm to work, I posted here.

The problem that I'm having is how do you update the php? I need to add GD support and need to recompile again, but I run into the make error
Diemuzi
Re: can't recompile php?
September 15, 2010 04:44PM
This doesn't appear to be an FPM Related issue however, why don't you:

1) open up a phpinfo(); page and copy the configuration you see at the
top.
2) Patch PHP (if using php 5.2.x) to have support for FPM using the
patches on the FPM website
3) add the --enable-fpm to the end of the configuration you copied
from step 1
4) make && make install

and this should put you on the right track. It's honestly that simple.
If you're getting errors from compiling it that way, then you'll
seriously need to check into the packages you've been installing using
the Yum package installer. Those packages (ie: PHP) from Yum wouldn't
have been able to be created unless those specific configuration
options worked. So I believe it's safe to say if you copied and pasted
the configuration then it should work just fine.

~ Sammie

On Sep 15, 3:21 pm, "unomateo" <nginx-fo...@nginx.us> wrote:
> I did the compile with fpm... The reason I posted in this section is
> becuase I can install nginx with PHP fine using yum, but since you have
> to compile php to get php-fpm to work, I posted here.
>
> The problem that I'm having is how do you update the php? I need to add
> GD support  and need to recompile again, but I run into the make error
>
> Posted at Nginx Forum:http://forum.nginx.org/read.php?3,130169,130752#msg-130752
Re: can't recompile php?
September 15, 2010 05:32PM
It sounds like the problem the OP is having is that he is not running
configure with ALL of the previous flags. Follow Sammie's instructions and
you should be fine. Your ./configure statement needs to have all the
previous flags PLUS the one additional flag to enable fpm.

On Wed, Sep 15, 2010 at 4:42 PM, Diemuzi <diemuzi@gmail.com> wrote:

> This doesn't appear to be an FPM Related issue however, why don't you:
>
> 1) open up a phpinfo(); page and copy the configuration you see at the
> top.
> 2) Patch PHP (if using php 5.2.x) to have support for FPM using the
> patches on the FPM website
> 3) add the --enable-fpm to the end of the configuration you copied
> from step 1
> 4) make && make install
>
> and this should put you on the right track. It's honestly that simple.
> If you're getting errors from compiling it that way, then you'll
> seriously need to check into the packages you've been installing using
> the Yum package installer. Those packages (ie: PHP) from Yum wouldn't
> have been able to be created unless those specific configuration
> options worked. So I believe it's safe to say if you copied and pasted
> the configuration then it should work just fine.
>
> ~ Sammie
>
> On Sep 15, 3:21 pm, "unomateo" <nginx-fo...@nginx.us> wrote:
> > I did the compile with fpm... The reason I posted in this section is
> > becuase I can install nginx with PHP fine using yum, but since you have
> > to compile php to get php-fpm to work, I posted here.
> >
> > The problem that I'm having is how do you update the php? I need to add
> > GD support and need to recompile again, but I run into the make error
> >
> > Posted at Nginx Forum:
> http://forum.nginx.org/read.php?3,130169,130752#msg-130752
>
Re: can't recompile php?
September 15, 2010 05:39PM
Hi,

Thanks for all the help... From using easyapache, which maintained old configurations, I thought I could recompile by appending...

I was able to get it to work by reusing all the config settings, but there were a few new errors I had to fix.

Feeling a lot more comfortable with php-fpm now that I can update the php.

Thanks for all the help
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 147
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready