|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #49173 Php don't work with mod_fcgid if I load a extension
Submitted: 2009-08-06 00:31 UTC Modified: 2009-08-14 01:00 UTC
From: malina dot laszlo at malina dot hu Assigned:
Status: No Feedback Package: Dynamic loading
PHP Version: 5.3.0 OS: Debian Lenny
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2009-08-06 00:31 UTC] malina dot laszlo at malina dot hu

I compiled php-5.3.0 (CGI), apache-2.2.12 (mpm-worker) and  mod_fcgid-2.2.0 on Debian Lenny. 

I have more extension: mysql, mysqli, pdo, gd, gettext, memcache, 
imagick, idn, etc.

When I give extension_dir (with absoluth path) and I does NOT allow to load extensions then no problem (and no extension).
When I does allow to load only ONE extension (for example, then the server send me "Internal server error" (status 500).

I can see in apache error-log: 
[warn] (104)Connection reset by peer: mod_fcgid: read data from fastcgi server error.
[info] (104)Connection reset by peer: mod_fcgid: can't read data from fcgid handler
[warn] (104)Connection reset by peer: mod_fcgid: ap_pass_brigade failed in handle_request function

What is problem?

(Sorry for my bad English!)


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2009-08-06 08:07 UTC] malina dot laszlo at malina dot hu

I am trying to load extensions and each works well except for the If I load gd, server send me "Status 500" and written above logs. 

Before there was already a compiling problem (gdhelper), but this is no, without error compiled. 

Thanks for your help!
 [2009-08-06 08:57 UTC]
Please try using this snapshot:
For Windows:

 [2009-08-06 09:43 UTC] malina dot laszlo at malina dot hu

I tried to compile the PHP (not snapshot, but release). There are two ways to do: 

1. I am updating system libraries (libgd, libpng, etc) and compiling gd extension by shared
(--with-gd=shared,/usr and png,jpg,xpm, freetype,etc by shared)
2. I compiling gd extension by "embedded" (it is not shared).
(--with-gd [it is embedded for me] and png, jpg,xpm, etc is not shared)

Point 1: it is failed, same error
Point 2: this is good, no error!

I will try to compile snapshot-php5.3 by shared and "embedded". I'm curious :)
 [2009-08-06 21:36 UTC]
i very much doubt if this is a php bug. 

i bet that extension like is probably depending on a library which it is probably unable to load in your fastcgi environment. 

you can verify this by running ldd on and if there is any dependent library that is not in /lib or /usr/lib (or for that any matter any directory that is not in /etc/*.conf) then this could be the cause. 

to confirm this is the issue, you could try loading an extension which does not depend on libraries that is not in /lib or /usr/lib. if it works fine, then you could either
a) update your apachectl script to add LD_LIBRARY_PATH to include all your dependent library locations
b) create a custom .conf file under /etc/ which contains the list of directories to search in your environment. 

 [2009-08-14 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Jul 21 05:01:30 2024 UTC