php.net |  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
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: malina dot laszlo at malina dot hu
New email:
PHP Version: OS:

 

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

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 gd.so), 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!)


Patches

Pull Requests

History

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

I am trying to load extensions and each works well except for the gd.so. 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!
Bearcheese
 [2009-08-06 08:57 UTC] jani@php.net
Please try using this snapshot:

  http://snaps.php.net/php5.3-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/


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

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)

Results:
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] srinatar@php.net
i very much doubt if this is a php bug. 

i bet that extension like gd.so 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 gd.so 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/ld.so.conf.d/*.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/ld.so.conf.d 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: Sat Dec 21 13:01:31 2024 UTC