PHP-FPM / PHP 5.3.2 build fails on CentOS 5.5

154 views
Skip to first unread message

Antonio Lupher

unread,
Jun 3, 2010, 11:01:28 AM6/3/10
to highloa...@googlegroups.com
Hi all,

I'm trying to compile php with php-fpm on a server running CentOS 5.5,
but the build is failing with the following errors:

cd php-5.3.2;
svn co http://svn.php.net/repository/php/php-src/trunk/sapi/fpm sapi/fpm;
./buildconf --force;
./configure --enable-fpm;
make;
...
sapi/fpm/fpm/fpm_main.o: In function `main':
/usr/local/src/php-5.3.2/sapi/fpm/fpm/fpm_main.c:1666: undefined
reference to `php_output_end_all'
/usr/local/src/php-5.3.2/sapi/fpm/fpm/fpm_main.c:1667: undefined
reference to `php_output_deactivate'
sapi/fpm/fpm/fpm_main.o: In function `zif_fastcgi_finish_request':
/usr/local/src/php-5.3.2/sapi/fpm/fpm/fpm_main.c:1496: undefined
reference to `php_output_end_all'
collect2: ld returned 1 exit status
make: *** [sapi/fpm/php-fpm] Error 1

# uname -a
Linux www3 2.6.18-194.3.1.el5 #1 SMP Thu May 13 13:08:30 EDT 2010
x86_64 x86_64 x86_64 GNU/Linux

I haven't had any issues before when building php with fpm before on
similar servers.

Any help or advice would be much appreciated.

Thanks!
Antonio

--
Antonio Lupher
anto...@gmail.com
http://www.lupher.com

Antony Dovgal

unread,
Jun 3, 2010, 11:10:36 AM6/3/10
to highloa...@googlegroups.com
On 03.06.2010 19:01, Antonio Lupher wrote:
> Hi all,
>
> I'm trying to compile php with php-fpm on a server running CentOS 5.5,
> but the build is failing with the following errors:
>
> cd php-5.3.2;
> svn co http://svn.php.net/repository/php/php-src/trunk/sapi/fpm sapi/fpm;

Change this to
svn co http://svn.php.net/repository/php/php-src/branches/PHP_5_3/sapi/fpm sapi/fpm;

There was a major update to output buffering API in trunk.

--
Wbr,
Antony Dovgal
---
http://pinba.org - realtime statistics for PHP

Antonio Lupher

unread,
Jun 3, 2010, 11:23:54 AM6/3/10
to highloa...@googlegroups.com
On Thu, Jun 3, 2010 at 7:10 PM, Antony Dovgal <to...@daylessday.org> wrote:
>> cd php-5.3.2;
>> svn co http://svn.php.net/repository/php/php-src/trunk/sapi/fpm sapi/fpm;
>
> Change this to
> svn co http://svn.php.net/repository/php/php-src/branches/PHP_5_3/sapi/fpm sapi/fpm;
>

Great, it's compiling now. Thanks!

Michael Shadle

unread,
Jun 3, 2010, 12:04:07 PM6/3/10
to highloa...@googlegroups.com
Should I change this on php-fpm.org or is this just temporary? I
thought fpm was in trunk now?

Jérôme Loyet

unread,
Jun 3, 2010, 12:30:16 PM6/3/10
to highloa...@googlegroups.com
2010/6/3 Michael Shadle <mik...@gmail.com>:

> Should I change this on php-fpm.org or is this just temporary? I thought fpm
> was in trunk now?

Yes you should.

FPM is in trunk for dev and int the 5.3 branch. We are comitting only
fixes ton 5.3. Only new and experimentals features are going to trunk.

In the page on php-fpm.org there should be 3 download items:

- stable --> PHP_5_3
- dev --> trunk
- old --> patches

mk

unread,
Jun 4, 2010, 2:56:37 AM6/4/10
to highload-php-en

there is a bug on new patch ,try this version http://c.wakfc.com/fpm.tar.gz

1、download the file
2、cd php-5.3.2
3、tar zxvf ../fpm.tar.gz
4、./buildconf --force
5、./configure --enable-fpm ....

On 6月3日, 下午11时10分, Antony Dovgal <t...@daylessday.org> wrote:
> On 03.06.2010 19:01, Antonio Lupher wrote:
>
> > Hi all,
>
> > I'm trying to compile php withphp-fpmon a server running CentOS 5.5,

Jérôme Mahuet

unread,
Jun 4, 2010, 5:23:44 PM6/4/10
to highload-php-en
Ok it's compiling now !

Thanks !

But I've got a weird bug that doesn't let me include .php files in my
scripts. I tried under nginx and lighttpd so it's definitively not a
server problem.

Ex: Warning: include() [function.include]: open_basedir restriction in
effect. File() is not within the allowed path(s): (/srv/http/:/home/:/
tmp/:/usr/share/pear/) in /srv/http/index.php on line 9

The open_basedir is correct. Actually it's working with the classic
php, but not with php-fpm. Am I missing something ?

On Jun 4, 8:56 am, mk <r...@mkrss.com> wrote:
> there is a bug on new patch  ,try this version  http://c.wakfc.com/fpm.tar.gz
>
> 1、download the file
> 2、cd php-5.3.2
> 3、tar zxvf ../fpm.tar.gz
> 4、./buildconf --force
> 5、./configure --enable-fpm ....
>
> On 6月3日, 下午11时10分, Antony Dovgal <t...@daylessday.org> wrote:
>
>
>
> > On 03.06.2010 19:01, Antonio Lupher wrote:
>
> > > Hi all,
>
> > > I'm trying to compile php withphp-fpmon a server running CentOS 5.5,
> > > but the build is failing with the following errors:
>
> > > cd php-5.3.2;
> > > svn cohttp://svn.php.net/repository/php/php-src/trunk/sapi/fpmsapi/fpm;
>
> > Change this to
> > svn cohttp://svn.php.net/repository/php/php-src/branches/PHP_5_3/sapi/fpmsa...

Jérôme Loyet

unread,
Jun 5, 2010, 4:56:10 AM6/5/10
to highloa...@googlegroups.com
2010/6/4 Jérôme Mahuet <jerome...@gmail.com>:

> Ok it's compiling now !
>
> Thanks !
>
> But I've got a weird bug that doesn't let me include .php files in my
> scripts. I tried under nginx and lighttpd so it's definitively not a
> server problem.
>
> Ex: Warning: include() [function.include]: open_basedir restriction in
> effect. File() is not within the allowed path(s): (/srv/http/:/home/:/
> tmp/:/usr/share/pear/) in /srv/http/index.php on line 9
>
> The open_basedir is correct. Actually it's working with the classic
> php, but not with php-fpm. Am I missing something ?

did you set chroot in your FPM conf ?
if so, all the PHP path are relative to the chroot

Jérôme Mahuet

unread,
Jun 5, 2010, 5:39:02 AM6/5/10
to highload-php-en
On Jun 5, 10:56 am, Jérôme Loyet <m...@fatbsd.com> wrote:
> 2010/6/4 Jérôme Mahuet <jerome.mah...@gmail.com>:
>
> > Ok it's compiling now !
>
> > Thanks !
>
> > But I've got a weird bug that doesn't let me include .php files in my
> > scripts. I tried under nginx and lighttpd so it's definitively not a
> > server problem.
>
> > Ex: Warning: include() [function.include]: open_basedir restriction in
> > effect. File() is not within the allowed path(s): (/srv/http/:/home/:/
> > tmp/:/usr/share/pear/) in /srv/http/index.php on line 9
>
> > The open_basedir is correct. Actually it's working with the classic
> > php, but not with php-fpm. Am I missing something ?
>
> did you set chroot in your FPM conf ?
> if so, all the PHP path are relative to the chroot


chroot is not set in the FPM conf. Here is my php-fpm.conf :
http://arch.pastebin.com/BkdFeJzb
I don't understand what's wrong.

Jérôme Loyet

unread,
Jun 5, 2010, 6:50:42 AM6/5/10
to highloa...@googlegroups.com
2010/6/5 Jérôme Mahuet <jerome...@gmail.com>:

> On Jun 5, 10:56 am, Jérôme Loyet <m...@fatbsd.com> wrote:
>> 2010/6/4 Jérôme Mahuet <jerome.mah...@gmail.com>:
>>
>> > Ok it's compiling now !
>>
>> > Thanks !
>>
>> > But I've got a weird bug that doesn't let me include .php files in my
>> > scripts. I tried under nginx and lighttpd so it's definitively not a
>> > server problem.
>>
>> > Ex: Warning: include() [function.include]: open_basedir restriction in
>> > effect. File() is not within the allowed path(s): (/srv/http/:/home/:/
>> > tmp/:/usr/share/pear/) in /srv/http/index.php on line 9
>>
>> > The open_basedir is correct. Actually it's working with the classic
>> > php, but not with php-fpm. Am I missing something ?
>>
>> did you set chroot in your FPM conf ?
>> if so, all the PHP path are relative to the chroot
>
>
> chroot is not set in the FPM conf. Here is my php-fpm.conf :
> http://arch.pastebin.com/BkdFeJzb
> I don't understand what's wrong.
>
>

did you try your PHP under apache + Mod_php to ensure it's a FPM
problem and not a problem on your code ?

Jérôme Mahuet

unread,
Jun 5, 2010, 7:01:14 AM6/5/10
to highload-php-en
Yes I tried with apache2 et mod_php -> working
I tried with lighttpd and php-cgi -> working
lighttpd + php-fpm -> same error
nginx + php-fpm -> same error

I made a PHP script test. I've got 2 files index.php and test.php in
the same dir (webroot).
The content of index.php is just an include "test.php";

My web user is http, the webdir rights are goods.

When I launch a phpinfo(); it's working great, I can see the webroot
dir in my open_basedir variable.
All is working, except including other php files.

Here is my phpinfo() : http://xhkr.org/nginx/

I wonder if I made a mistake in compiling php, I don't know. The weird
thing is that php and php-cgi are working as usual.

On Jun 5, 12:50 pm, Jérôme Loyet <m...@fatbsd.com> wrote:
> 2010/6/5 Jérôme Mahuet <jerome.mah...@gmail.com>:

Jérôme Loyet

unread,
Jun 5, 2010, 7:15:04 AM6/5/10
to highloa...@googlegroups.com
Can you try to recompile fpm without the suhosin-patch ?

suhosin-patch has been made form PHP 5.3.2 and FPM has been merged
into PHP_5_3 after the 5.3.2 release. It's maybe not compliant.

++ Jerome
2010/6/5 Jérôme Mahuet <jerome...@gmail.com>:

Jérôme Mahuet

unread,
Jun 5, 2010, 7:41:18 AM6/5/10
to highload-php-en
Same thing without suhosin patch : http://xhkr.org/nginx/

I will disable all php extensions just in case..

On Jun 5, 1:15 pm, Jérôme Loyet <m...@fatbsd.com> wrote:
> Can you try to recompile fpm without the suhosin-patch ?
>
> suhosin-patch has been made form PHP 5.3.2 and FPM has been merged
> into PHP_5_3 after the 5.3.2 release. It's maybe not compliant.
>
> ++ Jerome
> 2010/6/5 Jérôme Mahuet <jerome.mah...@gmail.com>:

Jérôme Loyet

unread,
Jun 5, 2010, 7:43:12 AM6/5/10
to highloa...@googlegroups.com
2010/6/5 Jérôme Mahuet <jerome...@gmail.com>:

> Same thing without suhosin patch : http://xhkr.org/nginx/
>
> I will disable all php extensions just in case..

disable cache ext first. eaccelerator and apc.

Jérôme Mahuet

unread,
Jun 5, 2010, 7:52:13 AM6/5/10
to highload-php-en
Ok, it seems that eaccelerator was the problem.
After removing it, all is working fine.
Thanks :)

Jérôme Loyet

unread,
Jun 5, 2010, 7:59:29 AM6/5/10
to highloa...@googlegroups.com
2010/6/5 Jérôme Mahuet <jerome...@gmail.com>:

> Ok, it seems that eaccelerator was the problem.
> After removing it, all is working fine.
> Thanks :)

can you try the following scenarios please ?

1- activate eaccelerator and apc --> not working
2- activate eaccelerator and NOT apc
3- activate apc and NOT eaccelerator
4- allow eaccelerator.cache_dir in your open_basedir and re-try
scenarios 1, 2, 3

thx
++ Jerome

Jérôme Mahuet

unread,
Jun 5, 2010, 8:17:40 AM6/5/10
to highload-php-en
1- activate eaccelerator and apc --> not working
2- activate eaccelerator and NOT apc --> not working
3- activate apc and NOT eaccelerator --> working
4- doesn't change anything :(

Jérôme Loyet

unread,
Jun 5, 2010, 8:24:23 AM6/5/10
to highloa...@googlegroups.com
2010/6/5 Jérôme Mahuet <jerome...@gmail.com>:

> 1- activate eaccelerator and apc --> not working
> 2- activate eaccelerator and NOT apc --> not working
> 3- activate apc and NOT eaccelerator --> working
> 4- doesn't change anything :(

OK so this is a problem with eaccelerator. Can you open a bug on
http://bugs.php.net about this bug. So I can look at it later ?

thx you very much for helping us making FPM better

++ jerome

Antony Dovgal

unread,
Jun 6, 2010, 1:55:31 PM6/6/10
to highloa...@googlegroups.com
On 05.06.2010 16:24, J�r�me Loyet wrote:
> 2010/6/5 J�r�me Mahuet <jerome...@gmail.com>:

>> 1- activate eaccelerator and apc --> not working
>> 2- activate eaccelerator and NOT apc --> not working
>> 3- activate apc and NOT eaccelerator --> working
>> 4- doesn't change anything :(
>
> OK so this is a problem with eaccelerator. Can you open a bug on
> http://bugs.php.net about this bug. So I can look at it later ?
>
> thx you very much for helping us making FPM better

eaccelerator is not PHP.net extension.

Michael Shadle

unread,
Jun 7, 2010, 6:13:05 AM6/7/10
to highloa...@googlegroups.com
2010/6/3 Jérôme Loyet <m...@fatbsd.com>:

> - stable --> PHP_5_3

which one is it, exactly?

http://svn.php.net/repository/php/php-src/branches/PHP_5_3/
http://svn.php.net/repository/php/php-src/branches/PHP_5_3_FPM/

Also, should there be instructions on snaps.php.net, or is that the
same thing as grabbing directly from trunk (just on a nightly basis?)

This is what I have so far:
http://php-fpm.org/download/

任晓磊

unread,
Jun 7, 2010, 6:16:27 AM6/7/10
to highloa...@googlegroups.com
try snaps.php.net. It's easy than SVN.

--
Ren Xiaolei

Jérôme Loyet

unread,
Jun 7, 2010, 6:21:51 AM6/7/10
to highloa...@googlegroups.com
2010/6/7 Michael Shadle <mik...@gmail.com>:

> 2010/6/3 Jérôme Loyet <m...@fatbsd.com>:
>
>> - stable --> PHP_5_3
>
> which one is it, exactly?
>

> http://svn.php.net/repository/php/php-src/branches/PHP_5_3_FPM/

PHP_5_3_FPM is not used anymore. Please forget it.

Michael Shadle

unread,
Jun 7, 2010, 6:23:04 AM6/7/10
to highloa...@googlegroups.com
That would replace the trunk instructions only, correct?

Since snaps should be a rollup of trunk, which can contain unstable
code. There still needs to be instructions for the stable 5.3 version.

Michael Shadle

unread,
Jun 7, 2010, 6:23:33 AM6/7/10
to highloa...@googlegroups.com
2010/6/7 Jérôme Loyet <m...@fatbsd.com>:

> PHP_5_3_FPM is not used anymore. Please forget it.

Done. I went to look on the web to see which branches were
available... Perhaps that branch should be nixed :)

Reply all
Reply to author
Forward
0 new messages