#40847 [NEW]: memory leak
From: cosas at minovela dot com Operating system: Red Hat Enterprise Linux ES rele PHP version: 4.4.6 PHP Bug Type: Apache2 related Bug description: memory leak Description: By chance, i'm used the memory_get_usage() function on some of my principal scripts and i discovered that they were eating about 1.7Mb ram each one. I did some debug but didn't found the part eating memory. Finally i did an apache restart and it went down to 300kb usage. Sometimes, at the end of the day, my server fall into lots of segmentation faults, and i need to restart apache again in order to get it working. I've tested the production server on a XEON and now at a new conroe 64bit, and i'm getting the same issues. is it a httpd or php problem ? -- Edit bug report at http://bugs.php.net/?id=40847edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=40847r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=40847r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=40847r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=40847r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=40847r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=40847r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=40847r=needscript Try newer version:http://bugs.php.net/fix.php?id=40847r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=40847r=support Expected behavior:http://bugs.php.net/fix.php?id=40847r=notwrong Not enough info: http://bugs.php.net/fix.php?id=40847r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=40847r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=40847r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=40847r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=40847r=dst IIS Stability:http://bugs.php.net/fix.php?id=40847r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=40847r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=40847r=float No Zend Extensions: http://bugs.php.net/fix.php?id=40847r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=40847r=mysqlcfg
#12971 [Com]: configure: error: libjpeg not found!
ID: 12971 Comment by: cosas at minovela dot com Reported By: matteo dot redaelli at pirelli dot com Status: Closed Bug Type: Compile Failure Operating System: HP-11 PHP Version: 4.0.6 New Comment: i've got the same problem, i tried with last php4 stable, with php 4.3.7 and php 4.3.2 but i got the same problem. could you send me this configure at my email please? thanks :D Previous Comments: [2001-09-05 08:49:51] [EMAIL PROTECTED] Fixed in CVS. --Jani [2001-09-05 03:00:04] matteo dot redaelli at pirelli dot com Solved! Now it works with the new configure that Jani sent me via e-mail. Will it be added in the future releases (snapshots)? Thanks Matteo [2001-08-27 07:17:21] matteo dot redaelli at pirelli dot com * With the standard make and yacc I had other problems so now I use bison and gmake. export MAKE=/opt/make/bin/gmake CC=cc -Ae CXX=aCC ./configure --prefix=/apps/WEB/php --with-oci8=/oracle/PIRELLI/app/oracle/product/8.0.5 --with-apxs=/apps/WEB/apache/bin/apxs --with-gd=/opt/gd --with-zlib-dir=/opt/zlib --with-freetype-dir=/opt/freetype2 --without-mysql --with-xpm-dir=/opt/xpm --with-png-dir=/opt/libpng --with-jpeg-dir=/opt/jpeg-6 configure: error: libjpeg not found! ** BUT I have the libs: bonnie.root./ $ ls /opt/jpeg-6/lib libjpeg.a libjpeg.la libjpeg.sl * My config.log is: configure:17801: cc -Ae -o conftest -g -DHPUX11 -D_HPUX_SOURCE -DUSE_HSREGEX -D USE_EXPAT -L/opt/zlib/lib -L/opt/zlib/lib conftest.c -ljpeg -L/opt/jpeg-6/lib -lz -lcrypt -lm -lnsl 15 /usr/ccs/bin/ld: Can't find library: jpeg configure: failed program was: #line 17790 configure #include confdefs.h /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char jpeg_read_header(); ** In /opt I've installed all the necessary libraries that I've downloaded from http://hpux.connect.org.uk/hppd/search.html: /apps/WEB/sw/binutils-2.11.2-sd-11.00.depot /apps/WEB/sw/bison-1.28-sd-11.00.depot /apps/WEB/sw/gcc-3.0.1-sd-11.00.depot /apps/WEB/sw/gd-1.8.4-sd-11.00.depot /apps/WEB/sw/jpeg-6b-sd-11.00.depot /apps/WEB/sw/libpng-1.0.11-sd-11.00.depot /apps/WEB/sw/make-3.79.1-sd-11.00.depot /apps/WEB/sw/binutils-2.11.2-sd-11.00.depot /apps/WEB/sw/bison-1.28-sd-11.00.depot /apps/WEB/sw/gcc-3.0.1-sd-11.00.depot /apps/WEB/sw/gd-1.8.4-sd-11.00.depot /apps/WEB/sw/jpeg-6b-sd-11.00.depot /apps/WEB/sw/libpng-1.0.11-sd-11.00.depot /apps/WEB/sw/make-3.79.1-sd-11.00.depot /apps/WEB/sw/perl-5.6.1-sd-11.00.depot /apps/WEB/sw/xpm-3.4k-sd-11.00.depot /apps/WEB/sw/zlib-1.1.3-sd-11.00.depot /apps/WEB/sw/xpm-3.4k-sd-11.00.depot *** If I do not include the library in the ./configure options I have configure: error: libpng not found! * No configure errors with GCC but: I tried with gcc but I have other problems (see bug id.12842) that is still opened. Can anyone help me please? Thanks in advance -- Edit this bug report at http://bugs.php.net/?id=12971edit=1
#26459 [Com]: configure: error: libjpeg.(a|so) not found.
ID: 26459 Comment by: cosas at minovela dot com Reported By: gideon dot kimbrell at medcentercanada dot com Status: Bogus Bug Type: GD related Operating System: Linux RH 9 PLESK PHP Version: 4.3.4 New Comment: i've got the same problem checking whether to enable truetype string function in GD... yes checking whether to enable JIS-mapped Japanese font support in GD... no checking for fabsf... yes checking for floorf... yes checking for jpeg_read_header in -ljpeg... yes configure: error: libpng.(a|so) not found. linjpeg and devel are insalled: [EMAIL PROTECTED] src]# ls /usr/lib | grep jpeg libimlib-jpeg.so libjpeg.a libjpeg.la libjpeg.so libjpeg.so.62 libjpeg.so.62.0.0 [EMAIL PROTECTED] php-4.3.7]# tail -f config.log configure:29873: checking for fabsf configure:29901: gcc -o conftest -g -O2 -L/usr/lib -ldb-4.1 -Wl,-rpath,/usr/kerberos/lib -L/usr/kerberos/lib conftest.c -lz -ldb-4.1 -lcurl -lbz2 -lz -lresolv -lm -ldl -lnsl -lssl -lcrypto -lgssapi_krb5 -lkrb5 -lcom_err -lk5crypto -lresolv -ldl -lz -lcurl -lssl -lcrypto -lgssapi_krb5 -lkrb5 -lcom_err -lk5crypto -lresolv -ldl -lz -lz -lssl -lcrypto -lssl -lcrypto -lgssapi_krb5 -lkrb5 -lcom_err -lk5crypto -lresolv -ldl -lz -lz -lxml2 -lz -lm 15 configure:29885: warning: conflicting types for built-in function `fabsf' /usr/bin/ld: warning: libcom_err.so.3, needed by /usr/lib/libcurl.so, may conflict with libcom_err.so.2 configure:29873: checking for floorf configure:29901: gcc -o conftest -g -O2 -L/usr/lib -ldb-4.1 -Wl,-rpath,/usr/kerberos/lib -L/usr/kerberos/lib conftest.c -lz -ldb-4.1 -lcurl -lbz2 -lz -lresolv -lm -ldl -lnsl -lssl -lcrypto -lgssapi_krb5 -lkrb5 -lcom_err -lk5crypto -lresolv -ldl -lz -lcurl -lssl -lcrypto -lgssapi_krb5 -lkrb5 -lcom_err -lk5crypto -lresolv -ldl -lz -lz -lssl -lcrypto -lssl -lcrypto -lgssapi_krb5 -lkrb5 -lcom_err -lk5crypto -lresolv -ldl -lz -lz -lxml2 -lz -lm 15 /usr/bin/ld: warning: libcom_err.so.3, needed by /usr/lib/libcurl.so, may conflict with libcom_err.so.2 configure:30033: checking for jpeg_read_header in -ljpeg configure:30052: gcc -o conftest -g -O2 -L/usr/lib -ldb-4.1 -Wl,-rpath,/usr/kerberos/lib -L/usr/kerberos/lib conftest.c -ljpeg -lz -ldb-4.1 -lcurl -lbz2 -lz -lresolv -lm -ldl -lnsl -lssl -lcrypto -lgssapi_krb5 -lkrb5 -lcom_err -lk5crypto -lresolv -ldl -lz -lcurl -lssl -lcrypto -lgssapi_krb5 -lkrb5 -lcom_err -lk5crypto -lresolv -ldl -lz -lz -lssl -lcrypto -lssl -lcrypto -lgssapi_krb5 -lkrb5 -lcom_err -lk5crypto -lresolv -ldl -lz -lz -lxml2 -lz -lm 15 /usr/bin/ld: warning: libcom_err.so.3, needed by /usr/lib/libcurl.so, may conflict with libcom_err.so.2 Previous Comments: [2003-11-29 03:18:59] [EMAIL PROTECTED] Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Thank you for your interest in PHP. Install the 'devel' rpms. Not PHP bug. [2003-11-28 22:36:02] gideon dot kimbrell at medcentercanada dot com Description: hello... currently running php 4.2.2 and trying to install 4.3.4 for GD and MCRYPT reasons... i first downloaded the 4.3.4 tarball and did: ./configure --prefix=/usr --with-gd --with-gettext=/usr --enable-safe-mode --with-config-file-path=/etc/httpd --with-exec-dir=/usr/bin --with-zlib --enable-magic-quotes --with-regex=system --with-ttf --with-db --with-gdbm --enable-mbstring --enable-mbstr-enc-trans --enable-track-vars --enable-wddx=shared --enable-mm=shared --enable-xml --enable-ftp --disable-debug --with-libdir=/usr/lib --with-interbase=shared --with-pgsql=shared --with-ldap --with-imap --with-pdflib=shared --with-mcrypt and i got the error: configure: error: libjpeg.(a|so) not found. i then searched google, and landed on the snapshots. i untarred the most recent snapshot and did this: ./configure --prefix=/usr --with-gd --with-gettext=/usr --enable-safe-mode --with-config-file-path=/etc/httpd --with-exec-dir=/usr/bin --with-zlib --enable-magic-quotes --with-regex=system --with-ttf --with-db --with-gdbm --enable-mbstring --enable-mbstr-enc-trans --enable-track-vars --enable-wddx=shared --enable-mm=shared --enable-xml --enable-ftp --disable-debug --with-libdir=/usr/lib --with-interbase=shared --with-pgsql=shared --with-ldap --with-imap --with-pdflib=shared --with-mcrypt and i got the error: configure: error: libjpeg.(a|so) not found. however... /usr/bin contains libjpeg.so.62 which I believe is all that it would require. do i need additional libraries, or is this a configuration problem, or is it a bug? thank you very much! Reproduce code: --- Configuring extensions checking for OpenSSL support... no checking for ZLIB support... yes checking
#11058 [Com]: php_network_getaddresses: getaddrinfo failed
ID: 11058 Comment by: cosas at minovela dot com Reported By: pat at mail dot rit dot edu Status: Bogus Bug Type: Network related Operating System: OpenBSD 2.6 PHP Version: 4.0.6 New Comment: so nobody give us a solution? i can't upgrade to latest version if i want to use fsockopen :( Previous Comments: [2004-05-04 14:35:56] jeppe at bundsgaard dot net I guess it is connected to the server - the problem occurs on some, but not all the servers running php4.3 that I am using. Anyway it would be nice with a solution that solves the problem independent of the servers - or that tells exactly what is to be done with the server (I know, this is not the place for such a request - but I don't know where to turn to). [2004-02-12 21:15:45] cosas at minovela dot com hello, my php is PHP Version 4.3.4 i've exatctly the same problem. my server isn't conected by dialup, and i got ever the message php_network_getaddresses: getaddrinfo failed when i use this line: fsockopen (dummy_ip, 25, $errno, $errstr, 10) it didn't occurs with older versions of php. this IS NOT a server problem, is a problem of PHP, you only need tho make a search at google http://www.google.es/search?hl=esie=UTF-8oe=UTF-8q=php+php_network_getaddresses%3A+getaddrinfo+failedmeta= target php_network_getaddresses: getaddrinfo failed and see results, a lot of people get the same errors. i hope you found a solution for this :) [2003-06-04 10:08:18] fcartegnie dot at dot free dot dot dot fr at null dot null Okay. I identified the problem. When apache starts, php or apache gets dns servers entry from /etc/resolv.conf You're using a dialup connection and when logging in, your dns servers have been added at this later moment. So there's a problem with apache or php to get informed that the content of resolv.conf has been updated. Confirmed for PHP 4.3.1/apache_1.3.27 so. Temporary solution is just to reload apache doing a apachectl stop/start [2002-04-03 16:27:07] g dot almasi at gigcity dot com Well you can tell I had nothing to do today but beat my head against a wall. But I found a solution! I added my target site to /etc/hosts and restarted apache, and now I can include a page in that target site from a different site. It's Miller Time! psht, glug glug glug [2002-04-03 16:20:32] [EMAIL PROTECTED] And that is the cause of the problem (and the reason that this report is set to bogus). You need to tell your SuSE box how to resolve the addresses; the SuSE yast tool should let you set the nameserver in it's network configuration. I can't help you any further here, and this is not the place to discuss this further. I'd suggest looking at the SuSE support database for this: it's bound to be a FAQ. The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/11058 -- Edit this bug report at http://bugs.php.net/?id=11058edit=1
#11058 [Com]: php_network_getaddresses: getaddrinfo failed
ID: 11058 Comment by: cosas at minovela dot com Reported By: pat at mail dot rit dot edu Status: Bogus Bug Type: Network related Operating System: OpenBSD 2.6 PHP Version: 4.0.6 New Comment: i've just installed redhat 9, then the latest version of mysql, php and apache, and i got the error when i tried to run my scripts... Previous Comments: [2004-05-13 00:32:49] cosas at minovela dot com so nobody give us a solution? i can't upgrade to latest version if i want to use fsockopen :( [2004-05-04 14:35:56] jeppe at bundsgaard dot net I guess it is connected to the server - the problem occurs on some, but not all the servers running php4.3 that I am using. Anyway it would be nice with a solution that solves the problem independent of the servers - or that tells exactly what is to be done with the server (I know, this is not the place for such a request - but I don't know where to turn to). [2004-02-12 21:15:45] cosas at minovela dot com hello, my php is PHP Version 4.3.4 i've exatctly the same problem. my server isn't conected by dialup, and i got ever the message php_network_getaddresses: getaddrinfo failed when i use this line: fsockopen (dummy_ip, 25, $errno, $errstr, 10) it didn't occurs with older versions of php. this IS NOT a server problem, is a problem of PHP, you only need tho make a search at google http://www.google.es/search?hl=esie=UTF-8oe=UTF-8q=php+php_network_getaddresses%3A+getaddrinfo+failedmeta= target php_network_getaddresses: getaddrinfo failed and see results, a lot of people get the same errors. i hope you found a solution for this :) [2003-06-04 10:08:18] fcartegnie dot at dot free dot dot dot fr at null dot null Okay. I identified the problem. When apache starts, php or apache gets dns servers entry from /etc/resolv.conf You're using a dialup connection and when logging in, your dns servers have been added at this later moment. So there's a problem with apache or php to get informed that the content of resolv.conf has been updated. Confirmed for PHP 4.3.1/apache_1.3.27 so. Temporary solution is just to reload apache doing a apachectl stop/start [2002-04-03 16:27:07] g dot almasi at gigcity dot com Well you can tell I had nothing to do today but beat my head against a wall. But I found a solution! I added my target site to /etc/hosts and restarted apache, and now I can include a page in that target site from a different site. It's Miller Time! psht, glug glug glug The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/11058 -- Edit this bug report at http://bugs.php.net/?id=11058edit=1
#19421 [Com]: fget* doesn't work when socket resource is stored in class variable
ID: 19421 Comment by: cosas at minovela dot com Reported By: taco at osisoft dot nl Status: Bogus Bug Type: Class/Object related Operating System: Red Hat 7.1 PHP Version: 4.2.2 New Comment: newer versions of php has a lot of problems with sockets... Previous Comments: [2002-09-19 15:40:32] taco at osisoft dot nl I deliberatly commented that line. The code should fetch the welcome messages, but when I uncomment it, the stalling will occure! I know the POP3 protocol, that's not the issue here ;-). Issue is that the fgets stalls when using it in a class structure or/and using class variables. I've got it all working now, but without using a class. After I stripped of the TPOP3Mail class it worked immediatly. [2002-09-19 04:54:21] [EMAIL PROTECTED] Try uncommenting the Catching the servers welcome messages line of code... This is not a support forum; you should really read the POP3 protocol spec. [2002-09-19 01:37:50] taco at osisoft dot nl I can run this example (using my own pop3 account). Unfortunatly you will see something like this: USER +OK Welcome to this POP3 server PASS +OK User is welcome You have message(s) As you see the returning messages is always one message behind. With the commented line I wanted to get the welcome message after connection, before authentication. If I therefor uncomment that line, it will stall. I have tried several things, like using a local variable instead of a class variable. That works better, as the title shows, but it still works buggy. often it's alright, but sometimes it keeps stalling. Currently I use this functionality without a class and than it works fine. ? class TPOP3Mail { var $server; var $port; var $user; var $password; var $socket; var $error; function TPOP3Mail($server, $port, $user, $pwd) { $this-server = $server; $this-port = $port; $this-user = $user; $this-password = $pwd; } function Connect() { $this-socket = fsockopen($this-server, $this-port, $errno, $errstr, 3); if($this-socket = 0) { $this-error = Could not connect to $this-server on port $this-port. Connection Error $errno. Reason: $errstr; return 0; } $this-error = ; // fgets($this-socket, 1024); //Catching server's welcome messages print : USER $this-userBR\n; fwrite($this-socket, USER $this-user\r\n); $result = fgets($this-socket, 1024); print : $resultBR\n; if (substr($result, 0, 3) == +OK) { print : PASS BR\n; fwrite ($this-socket, PASS $this-password\r\n); $result = fgets($this-socket, 1024); print : $resultBR\n; if (substr($result, 0, 3) != +OK) $this-error = Error while logging on ($result); } else $this-error = Error while logging on ($result); if ($this-error != ) return 0; return $this-socket; } function ShowMail($nr) { fwrite ($this-socket, RETR $nr\r\n); $response = fgets ($this-socket, 1024); $i = 4; $s = ; //stores byte size of the message while ($response[$i] != ) $s .= $response[$i++]; $response = fread($this-socket, $s); fgets ($this-socket, 1024); return $response; } function MailCount() { fwrite ($this-socket, STAT\r\n); $response = fgets ($this-socket, 1024); $i = 4; $s = ; while ($response[$i] != ) $s .= $response[$i++]; return $s; } } //Please use an pop3 account in the following line. $webmail = new TPOP3Mail(server, 110, user, pwd); if (!$webmail-Connect()) print $webmail-error; print You have . $webmail-MailCount() . message(s).BRBR\n; print nl2br($webmail-ShowMail(1)); ? [2002-09-18 19:21:58] [EMAIL PROTECTED] Please provide a short but complete example script which shows what you're trying to do
#11058 [Com]: php_network_getaddresses: getaddrinfo failed
ID: 11058 Comment by: cosas at minovela dot com Reported By: pat at mail dot rit dot edu Status: Bogus Bug Type: Network related Operating System: OpenBSD 2.6 PHP Version: 4.0.6 New Comment: hello, my php is PHP Version 4.3.4 i've exatctly the same problem. my server isn't conected by dialup, and i got ever the message php_network_getaddresses: getaddrinfo failed when i use this line: fsockopen (dummy_ip, 25, $errno, $errstr, 10) it didn't occurs with older versions of php. this IS NOT a server problem, is a problem of PHP, you only need tho make a search at google http://www.google.es/search?hl=esie=UTF-8oe=UTF-8q=php+php_network_getaddresses%3A+getaddrinfo+failedmeta= target php_network_getaddresses: getaddrinfo failed and see results, a lot of people get the same errors. i hope you found a solution for this :) Previous Comments: [2003-06-04 10:08:18] fcartegnie dot at dot free dot dot dot fr at null dot null Okay. I identified the problem. When apache starts, php or apache gets dns servers entry from /etc/resolv.conf You're using a dialup connection and when logging in, your dns servers have been added at this later moment. So there's a problem with apache or php to get informed that the content of resolv.conf has been updated. Confirmed for PHP 4.3.1/apache_1.3.27 so. Temporary solution is just to reload apache doing a apachectl stop/start [2002-04-03 16:27:07] g dot almasi at gigcity dot com Well you can tell I had nothing to do today but beat my head against a wall. But I found a solution! I added my target site to /etc/hosts and restarted apache, and now I can include a page in that target site from a different site. It's Miller Time! psht, glug glug glug [2002-04-03 16:20:32] [EMAIL PROTECTED] And that is the cause of the problem (and the reason that this report is set to bogus). You need to tell your SuSE box how to resolve the addresses; the SuSE yast tool should let you set the nameserver in it's network configuration. I can't help you any further here, and this is not the place to discuss this further. I'd suggest looking at the SuSE support database for this: it's bound to be a FAQ. [2002-04-03 15:58:04] g dot almasi at gigcity dot com another note: I have root to another box (it serves about 20 sites to the web) that is also running PHP 4.0.6 and php_network_getaddresses works fine. Does this function require a nameserver? My SuSE 7.3 box is a development machine on my LAN, so I just use proxies to get to it with a browser. Getting DNS, BIND, and DHCP to work was beyond me when I set it up (still is, actually). So I just use a proxy setting for browsers while I build sites. [2002-04-03 14:18:22] g dot almasi at gigcity dot com So I just tried changing a line in /etc/modules.conf: - From alias net-pf-10 off - To alias net-pf-10 ipv6 I rebooted the box and I still had this problem happening. The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/11058 -- Edit this bug report at http://bugs.php.net/?id=11058edit=1