#30668 [Opn->Bgs]: error_log ini inconsistent

2004-11-03 Thread tony2001
 ID:   30668
 Updated by:   [EMAIL PROTECTED]
 Reported By:  kauschovar at sdk dot ath dot cx
-Status:   Open
+Status:   Bogus
 Bug Type: *General Issues
 Operating System: Linux
 PHP Version:  4.3.9
 New Comment:

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.

Use ini_get() instead of get_cfg_var() as the latter always returns
values from php.ini and will not show values altered  with ini_set().


Previous Comments:


[2004-11-03 00:47:51] kauschovar at sdk dot ath dot cx

Description:

The php.ini setting 'error_log' doesn't seem to behave according to its
description in the manual:
http://www.php.net/manual/en/ref.errorfunc.php.  It also does not
behave consistently between Apache 1.3 and Apache 2.

In both versions of Apache, 'error_log' can not be overridden in
httpd.conf, .htaccess, or by ini_set().  The example script below
demonstrates that.  Only changes made to php.ini seem to be recognized.
 This contradicts the manual, which says that 'error_log' has a
changeable property of PHP_INI_ALL, meaning that it can be changed in
any of the places I mentioned above.

In Apache 2, if 'error_log' is set in php.ini then it will log to the
appropriate file, but it will still not recognize changes made in any
other fashion.

In Apache 1.3, PHP will always log to Apache's error_log
(/var/log/apache/error_log on my system) regardless of what 'error_log'
is set to.  Considering the stern warning against using Apache 2
(http://www.php.net/manual/en/faq.installation.php#faq.installation.apache2),
I think making 'error_log' work with Apache 1 is important.

Of course, 'log_errors' is enabled during all of this, I restarted
Apache every time I changed a setting in php.ini, httpd.conf or
.htaccess, and I made sure that the specified log file was writable by
apache (indeed it successfully wrote to it when testing Apache 2, so I
know that permissions are okay).

I tested this on two different machines with both Apache 1 and Apache
2, but both machines are running Gentoo Linux.  I  don't have a machine
with a different Operating system to confirm this bug with.

Reproduce code:
---
';
ini_set('error_log', 'php_error_log');
var_dump(get_cfg_var('error_log'));
echo '';

// 404.html doesn't exist. This will trigger an error which is
// supposed to be logged to the file set by 'error_log'
require_once '404.html';

?>

Expected result:

Excepted to see a warning about PHP failing to open 404.html in my log
file set by 'error_log'.  Also, expected to be able to override the
value set by php.ini in httpd.conf, .htaccess, or by ini_set().

Actual result:
--
>From the var_dump():
string(39) "/var/www/localhost/htdocs/phperrors.log"

... which is the value I set in my php.ini.

Additionally (with Apache 1.3), I expected to see "Warning:
main(404.html): failed to open stream" and "Fatal error: main(): Failed
opening required '404.html'" in phperrors.log, but instead they appeared
in Apache's error_log.





-- 
Edit this bug report at http://bugs.php.net/?id=30668&edit=1


#30682 [Opn->Bgs]: php (cgi) binary does not compile with apxs2 configured

2004-11-03 Thread derick
 ID:   30682
 Updated by:   [EMAIL PROTECTED]
 Reported By:  germann at gmx dot de
-Status:   Open
+Status:   Bogus
 Bug Type: *Compile Issues
 Operating System: Linux
 PHP Version:  5.0.2
 New Comment:

No bug, you can only compile one SAPI + cli at the same time. You can't
both compile CGI and the apache2 SAPI at the same time.


Previous Comments:


[2004-11-04 02:16:45] germann at gmx dot de

Description:

When I compile PHP with apxs2 for Apache2 the cgi binary won't be
build. Even if I try to force it with "--enable-cgi" there is no binary
placed in "sapi/cgi/" after executing make.

Reproduce code:
---
./configure \
  --prefix=/usr \
  --sysconfdir=/etc \
  --with-apxs2=/usr/local/apache/bin/apxs \
  --with-config-file-path=/etc \
  --enable-cgi \
  --enable-force-cgi-redirect \
  --enable-discard-path \
  --enable-safe-mode \
  --enable-memory-limit \
  --enable-versioning \
  --enable-magic-quotes \
  --with-pear \
  --with-openssl=/usr \
  --with-zlib=/usr \
  --with-mysql


Expected result:

As mentioned in http://de2.php.net/manual/en/features.commandline.php:
"By default when executing make, both the CGI and CLI are built and
placed as sapi/cgi/php and sapi/cli/php respectively, in your PHP
source directory."

Actual result:
--
myhost:/usr/src/php-5.0.2 # ls sapi/cgi/
.  ..  CREDITS  Makefile.frag  README.FastCGI  cgi_main.c  config.w32 
config9.m4  getopt.c  libfcgi  php.sym  php_getopt.h






-- 
Edit this bug report at http://bugs.php.net/?id=30682&edit=1


#30681 [Opn->Bgs]: include() not including chained include() files

2004-11-03 Thread tony2001
 ID:   30681
 Updated by:   [EMAIL PROTECTED]
 Reported By:  php at healthfleet dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Unknown/Other Function
 Operating System: Linux/WinXP
 PHP Version:  4.3.9
 New Comment:

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.

Add "/includes/" to your include_path.


Previous Comments:


[2004-11-04 00:11:57] php at healthfleet dot com

Description:

Ok, I have found a couple of spots mentioning this, including here. But
no solid answer.
This code works fine on 2 WinXP boxes, 1 RH linux box, and another misc
linux (I think also RH). So I'm thinking this isn't a relative position
issue.

However it does not work on a custom Web Server Application box (aka
Cobalt RaQ 550).

Reproduce code:
---
Here is the senerio:
DOCUMENT_ROOT: /home/.sites/143/site2/web/
SitePath of index.php: /modules/adminpanel/
SitePath of privileges.php: /modules/adminpanel/
SitePath of fleet_functions.php: /includes/
SitePath of fleetdb.php: /includes/

File1: index.php

File2: privileges.php

File3: fleet_functions.php


Expected result:

I expected all the files to be included like they have on my local box
testing and server testing. This is something unique about my new
development test server.

Actual result:
--
I get an error message on the fleet_functions.php file:

Warning: main(fleetdb.php): failed to open stream: No such file or
directory in /home/.sites/143/site2/web/includes/fleet_functions.php on
line 2

Warning: main(): Failed opening 'fleetdb.php' for inclusion
(include_path='') in
/home/.sites/143/site2/web/includes/fleet_functions.php on line 2





-- 
Edit this bug report at http://bugs.php.net/?id=30681&edit=1


#30683 [NEW]: Change in behavious of FILES array between 4.3.6 and 4.3.7_3

2004-11-03 Thread bugs at bsdfirst dot com
From: bugs at bsdfirst dot com
Operating system: FreeBSD
PHP version:  Irrelevant
PHP Bug Type: Zend Engine 2 problem
Bug description:  Change in behavious of FILES array between 4.3.6 and 4.3.7_3

Description:

Hi,

I have two FreeBSD servers detailed as follows:

lassa:
FreeBSD 4.10-STABLE
php4-4.3.7_3
apache+mod_ssl+mod_deflate-1.3.31+2.8.18+1.3.14.12+1.0.21_4

honk:
FreeBSD 4.9-RELEASE
php4-4.3.6
apache+mod_ssl+mod_deflate-1.3.29+2.8.16+1.0.20_3

I am using a HTML form (enctype="multipart/form-data") to upload image
files to each server.

On the server honk I am using the function isurlorfile to allow the user
to type a URL instead of selecting a file in the  box.

Selecting a file for upload works correctly in both cases. 
C:\Pics\test.png yields the following the in $_FILES array:

honk & lassa:
$_FILES['pic']['name'] contains 'test.png'

However entering a URL only works on the server honk.  Entering the URL
http://localhost/test.png into the  box on the form
yields the following results in the $_FILES array:

honk:
$_FILES['pic']['name'] contains 'http://localhost/test.png'

lassa:
$_FILES['pic']['name'] contains 'test.png'

Honk is our development server and we have written code relying on this
undocumented feature.

Obviously the behavious exhibited on the server honk is usefull as a user
can select a file or enter a URL to a file in the one input field.

Which of these is the expected behaviour?  Is there an expected behaviour
and what behaviour would I expect from a more current version of PHP? 
Could I request the behaviour exibited on the server honk be a documented
feature?

Thanks,
Patrick Brennan

Reproduce code:
---
function _isurlorfile(&$str) {
  if (is_uploaded_file($str['tmp_name']) && $str['size']) {
return $str['tmp_name'];
  } elseif (ereg('^http|ftp', $str['name'])) {
return $str['name'];
  } else {
return 0;
  }
}


-- 
Edit bug report at http://bugs.php.net/?id=30683&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=30683&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30683&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30683&r=trysnapshot51
Fixed in CVS:http://bugs.php.net/fix.php?id=30683&r=fixedcvs
Fixed in release:http://bugs.php.net/fix.php?id=30683&r=alreadyfixed
Need backtrace:  http://bugs.php.net/fix.php?id=30683&r=needtrace
Need Reproduce Script:   http://bugs.php.net/fix.php?id=30683&r=needscript
Try newer version:   http://bugs.php.net/fix.php?id=30683&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=30683&r=support
Expected behavior:   http://bugs.php.net/fix.php?id=30683&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=30683&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=30683&r=submittedtwice
register_globals:http://bugs.php.net/fix.php?id=30683&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=30683&r=php3
Daylight Savings:http://bugs.php.net/fix.php?id=30683&r=dst
IIS Stability:   http://bugs.php.net/fix.php?id=30683&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=30683&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=30683&r=float
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=30683&r=mysqlcfg


#25863 [Com]: IIS: The specified CGI application misbehaved

2004-11-03 Thread mmyer at rightnowtech dot com
 ID:   25863
 Comment by:   mmyer at rightnowtech dot com
 Reported By:  salmanarshad2000 at yahoo dot com
 Status:   Open
 Bug Type: CGI related
 Operating System: win32 only
 PHP Version:  4CVS, 5CVS, 6CVS..
 New Comment:

We've spent an extensive amount of time investigating this and have
found a work-around for the PHP CGI error in the header("Location:
") redirect case.  In our experience, this was only encountered on
Windows 2003 Server and IIS 6, however it seems others have experienced
similar problems elsehwere.

First some observations:
1. As reported in bug #9852, changing the performance options fixes the
problem on slower hardware.  With faster hardware, this had no effect. 
Hence, it must be some kind of race condition.  (to change this setting
r-click on My Computer -> Advanced -> Performance -> Advanced and select
Background Services)

2. If the php cgi did an odbc connection, the problem occurs.  Without
the odbc connection, no problem.

3. If the php cgi wastes some time in a busy loop prior to issuing the
header() redirect, it works.  For us, doing for($i=0; $i<100; $i++)
did the trick.  Issuing a sleep() did not work.  Strange, but again,
seems to indicate a race condition in IIS.

4. One of the previous posts mentioned that re-directing to the IP
address instead of the domain worked.  This was the primary clue to the
solution.

Our solution:
The web browser will use the same TCP connection to send a subsequent
request if it receives a Location: redirect for the same domain.  In
observation #4 above, it works because the re-direct is issued to an IP
address which causes the browser to think the redirect is to a different
system and close the existing TCP connection and make a new connection. 
It seems that IIS has a problem if (a) the initial CGI execution occurs
very quickly and (b) a subsequent HTTP request is received over the
same socket as the first request.  So the work-around is to force the
browser to close the TCP connection and open a new connection when a
redirect occurs.  This can be done by issuing a "Connection: close"
header in addition to the "Location: redirect" header.  The following
has solved the problem for us:

header("Connection: close");
header("Location: $url");

Hopefully some day Microsoft will fix this...


Previous Comments:


[2004-10-16 02:04:49] marc at durdin dot net

The situation that I consistently see this bug in is:

  header("Location: http://site/";);

The error does not occur every time.  To me, this does suggest a timing
issue.  One piece of pertinent information is that the error is
occurring on the page redirected to, and not on the page doing the
redirection, as you can see from the following log entries.  Steps
taken to generate this were: Open web browser to default page
(index.php), click on link to home.php - which detects that I am not
logged in and redirects to login.php (which then fails with error
502).

2004-10-15 23:37:39 192.168.20.9 GET /index.php - 80 - 192.168.20.11
Mozilla/4.0+(compatible;+MSIE+6.0;+Windows+NT+5.1;+SV1;+.NET+CLR+1.1.4322)
200 0 0
2004-10-15 23:37:41 192.168.20.9 GET /home.php - 80 - 192.168.20.11
Mozilla/4.0+(compatible;+MSIE+6.0;+Windows+NT+5.1;+SV1;+.NET+CLR+1.1.4322)
302 0 0
2004-10-15 23:37:41 192.168.20.9 GET /login.php - 80 - 192.168.20.11
Mozilla/4.0+(compatible;+MSIE+6.0;+Windows+NT+5.1;+SV1;+.NET+CLR+1.1.4322)
502 2 0

It's a real pain - IIS doesn't give any detail in its logs about the
error, there are no eventlog entries, etc., and running it through Zend
Server Debugger shows no issues in the headers that I can see.

This is basically the code I am using to redirect:

header("Location: http://"; . $_SERVER['HTTP_HOST'] . 
   str_replace("\\", "/", 
   dirname($_SERVER['PHP_SELF'])) . $page);
exit;



[2004-10-14 08:25:39] winterpalace at netspace dot net dot au

Damn.  Comment above isn't solution.  1 app appears to be okay , but
another is still having problems.  The \ is not the cause.



[2004-10-14 07:49:07] winterpalace at netspace dot net dot au

We have experienced similar probs here, except with Windows 2000
Server, CGI, and using MS SQL Server 2000.

I have a theory: 
The DB function calls are a red herring.
It's the redirection that's the problem.
IIS is telling the truth.
The location isn't valid.

Basis: 
Switched to FireFox, started getting messages about the location not
being found (where usually I'd get the CGI error).  Looked at the code
I use for redirection:
header("Location: http://"; . $_SERVER['HTTP_HOST'] .
dirname($_SERVER['PHP_SELF']) . "nextpage.php");
Found that dirname function was returning a "\" not a "/".
Rewrote this as:
header("Location: http://"; . $_SERVER['HTTP_HOST'] .
str_replace("\\","/",di

#30682 [NEW]: php (cgi) binary does not compile with apxs2 configured

2004-11-03 Thread germann at gmx dot de
From: germann at gmx dot de
Operating system: Linux
PHP version:  5.0.2
PHP Bug Type: *Compile Issues
Bug description:  php (cgi) binary does not compile with apxs2 configured

Description:

When I compile PHP with apxs2 for Apache2 the cgi binary won't be build.
Even if I try to force it with "--enable-cgi" there is no binary placed in
"sapi/cgi/" after executing make.

Reproduce code:
---
./configure \
  --prefix=/usr \
  --sysconfdir=/etc \
  --with-apxs2=/usr/local/apache/bin/apxs \
  --with-config-file-path=/etc \
  --enable-cgi \
  --enable-force-cgi-redirect \
  --enable-discard-path \
  --enable-safe-mode \
  --enable-memory-limit \
  --enable-versioning \
  --enable-magic-quotes \
  --with-pear \
  --with-openssl=/usr \
  --with-zlib=/usr \
  --with-mysql


Expected result:

As mentioned in http://de2.php.net/manual/en/features.commandline.php: "By
default when executing make, both the CGI and CLI are built and placed as
sapi/cgi/php and sapi/cli/php respectively, in your PHP source directory."

Actual result:
--
myhost:/usr/src/php-5.0.2 # ls sapi/cgi/
.  ..  CREDITS  Makefile.frag  README.FastCGI  cgi_main.c  config.w32 
config9.m4  getopt.c  libfcgi  php.sym  php_getopt.h


-- 
Edit bug report at http://bugs.php.net/?id=30682&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=30682&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30682&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30682&r=trysnapshot51
Fixed in CVS:http://bugs.php.net/fix.php?id=30682&r=fixedcvs
Fixed in release:http://bugs.php.net/fix.php?id=30682&r=alreadyfixed
Need backtrace:  http://bugs.php.net/fix.php?id=30682&r=needtrace
Need Reproduce Script:   http://bugs.php.net/fix.php?id=30682&r=needscript
Try newer version:   http://bugs.php.net/fix.php?id=30682&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=30682&r=support
Expected behavior:   http://bugs.php.net/fix.php?id=30682&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=30682&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=30682&r=submittedtwice
register_globals:http://bugs.php.net/fix.php?id=30682&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=30682&r=php3
Daylight Savings:http://bugs.php.net/fix.php?id=30682&r=dst
IIS Stability:   http://bugs.php.net/fix.php?id=30682&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=30682&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=30682&r=float
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=30682&r=mysqlcfg


#30672 [Opn->Csd]: exif_thumbnail fails after image has been edited in Exifer

2004-11-03 Thread helly
 ID:   30672
 Updated by:   [EMAIL PROTECTED]
 Reported By:  bosse at mellberg dot org
-Status:   Open
+Status:   Closed
 Bug Type: *Graphics related
 Operating System: *
 PHP Version:  4.3.9, 5.0.2
 Assigned To:  helly
 New Comment:

Well it looks like you exchanged working/non working, however both are
pretty fine using HEAD. If you want to verify yourself then doenload
php source and edit ext/exif/exif.c and change the line "#undef
EXIF_DEBUG" into "#define EXIF_DEBUG". Then you'll see all details of
the decoding process.

The test script i used was: 
php -r 'file_put_contents($argv[1].".thumb.jpg",
exif_thumbnail($argv[1]));' filename.jpg

and then i looked at the generated file and both are fine.
To Exifer i can only say it seems to correctly rewrite the info as
expected.

If you find an image that really doesn't work of it is specific to
older php versions then feel free to reopen.


Previous Comments:


[2004-11-04 00:09:11] bosse at mellberg dot org

Example pictures can be found here:
http://www.mellberg.org/exif_thumbnail



[2004-11-03 21:12:46] [EMAIL PROTECTED]

I need such an image because i don't have Exifer.



[2004-11-03 15:15:03] bosse at mellberg dot org

Description:

Using the script in the documentation for exif_thumbnail, you can
extract the thumbnail image from the exif-header. If you alter the
exif-information (f.ex. delete the thumbnail and add it again) using
Exifer, the exif_thumbnail function will no longer be able to find the
thumbnail.

According to the author of Exifer, this is likely because
exif_thumbnail doesn't handle offsets to the thumbnail properly.






-- 
Edit this bug report at http://bugs.php.net/?id=30672&edit=1


#30638 [Asn->Csd]: localeconv returns wrong LC_NUMERIC settings

2004-11-03 Thread derick
 ID:   30638
 Updated by:   [EMAIL PROTECTED]
 Reported By:  k at ailis dot de
-Status:   Assigned
+Status:   Closed
 Bug Type: *Languages/Translation
 Operating System: Linux
 PHP Version:  5.0.2
 Assigned To:  derick
 New Comment:

This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.




Previous Comments:


[2004-11-02 00:37:37] [EMAIL PROTECTED]

we call localeconv when we change locale for numeric or all types. If
we were cache this data, we could make localeconv return it without any
magic.



[2004-11-01 07:51:15] [EMAIL PROTECTED]

I think this patch is  abit too much magic myself. We should reconsider
the setting of LS_NUMERIC to "C" when we call setlocale(). I'll
investigate.



[2004-11-01 01:14:53] k at ailis dot de

Description:

If locale is switched to a european language (like de_DE) then
localeconv returns wrong settings for decimal_point and thousands_sep
while other data (like mon_decimal_point and mon_thousands_sep) is
correct.

This bug was introduced by this patch for ext/standard/string.c:

$Id: string.c,v 1.320 2002/10/10 16:29:35 iliaa Exp $

This patch modified setlocale() so it resets the LC_NUMERIC locale to
C. This was a bad enough but there were reasons I agree to.

Here is a patch which corrects this bug by remembering the LC_NUMERIC
locale, setting this remembered locale before calling localeconv_r()
and resetting it to C after the call. In that way localeconv() returns
the correct data and PHP can still stick to LC_NUMERIC=C:

diff -Nur php-src.orig/ext/standard/basic_functions.c
php-src/ext/standard/basic_functions.c
--- php-src.orig/ext/standard/basic_functions.c 2004-10-09
00:19:03.0 +0200
+++ php-src/ext/standard/basic_functions.c  2004-11-01
00:36:48.0 +0100
@@ -1156,6 +1156,7 @@
BG(strtok_string) = NULL;
BG(strtok_zval) = NULL;
BG(locale_string) = NULL;
+   BG(numeric_locale_string) = NULL;
BG(user_compare_func_name) = NULL;
BG(array_walk_func_name) = NULL;
BG(page_uid) = -1;
@@ -1212,7 +1213,8 @@
setlocale(LC_CTYPE, "");
}
STR_FREE(BG(locale_string));
-
+STR_FREE(BG(numeric_locale_string));
+
if (FG(stream_wrappers)) {
zend_hash_destroy(FG(stream_wrappers));
efree(FG(stream_wrappers));
diff -Nur php-src.orig/ext/standard/basic_functions.h
php-src/ext/standard/basic_functions.h
--- php-src.orig/ext/standard/basic_functions.h 2004-08-07
17:59:59.0 +0200
+++ php-src/ext/standard/basic_functions.h  2004-11-01
00:30:18.0 +0100
@@ -155,6 +155,7 @@
zval *strtok_zval;
char *strtok_string;
char *locale_string;
+   char *numeric_locale_string;
char *strtok_last;
char strtok_table[256];
ulong strtok_len;
diff -Nur php-src.orig/ext/standard/string.c
php-src/ext/standard/string.c
--- php-src.orig/ext/standard/string.c  2004-10-21 00:44:43.0
+0200
+++ php-src/ext/standard/string.c   2004-11-01 00:36:01.0 +0100
@@ -3799,6 +3799,10 @@

EG(float_separator)[0] = (lc.decimal_point)[0];
 
+/* Remember numeric locale */
+STR_FREE(BG(numeric_locale_string));
+BG(numeric_locale_string) = estrdup(loc);
+
if ((lc.decimal_point)[0] != '.') {
/* set locale back to C */
setlocale(LC_NUMERIC, "C"); 
@@ -4351,7 +4355,18 @@
{
struct lconv currlocdata;
 
+/* Remember numeric locale */
+if (BG(numeric_locale_string)) {
+setlocale(LC_NUMERIC, BG(numeric_locale_string));
+}
+
+/* Fetch formatting information */
localeconv_r( &currlocdata );
+   
+   /* Reset numeric locale to C */
+   if (BG(numeric_locale_string)) {
+   setlocale(LC_NUMERIC, "C");
+   }

/* Grab the grouping data out of the array */
len = strlen(currlocdata.grouping);


Reproduce code:
---



Expected result:

decimal_point: ,
thousands_sep: .


Actual result:
--
decimal_point: .
thousands_sep: 






-- 
Edit this bug report at http://bugs.php.net/?id=30638&edit=1


#30672 [Fbk->Opn]: exif_thumbnail fails after image has been edited in Exifer

2004-11-03 Thread bosse at mellberg dot org
 ID:   30672
 User updated by:  bosse at mellberg dot org
 Reported By:  bosse at mellberg dot org
-Status:   Feedback
+Status:   Open
 Bug Type: *Graphics related
 Operating System: *
 PHP Version:  4.3.9, 5.0.2
 Assigned To:  helly
 New Comment:

Example pictures can be found here:
http://www.mellberg.org/exif_thumbnail


Previous Comments:


[2004-11-03 21:12:46] [EMAIL PROTECTED]

I need such an image because i don't have Exifer.



[2004-11-03 15:15:03] bosse at mellberg dot org

Description:

Using the script in the documentation for exif_thumbnail, you can
extract the thumbnail image from the exif-header. If you alter the
exif-information (f.ex. delete the thumbnail and add it again) using
Exifer, the exif_thumbnail function will no longer be able to find the
thumbnail.

According to the author of Exifer, this is likely because
exif_thumbnail doesn't handle offsets to the thumbnail properly.






-- 
Edit this bug report at http://bugs.php.net/?id=30672&edit=1


#30681 [NEW]: include() not including chained include() files

2004-11-03 Thread php at healthfleet dot com
From: php at healthfleet dot com
Operating system: Linux/WinXP
PHP version:  4.3.9
PHP Bug Type: Unknown/Other Function
Bug description:  include() not including chained include() files

Description:

Ok, I have found a couple of spots mentioning this, including here. But no
solid answer.
This code works fine on 2 WinXP boxes, 1 RH linux box, and another misc
linux (I think also RH). So I'm thinking this isn't a relative position
issue.

However it does not work on a custom Web Server Application box (aka
Cobalt RaQ 550).

Reproduce code:
---
Here is the senerio:
DOCUMENT_ROOT: /home/.sites/143/site2/web/
SitePath of index.php: /modules/adminpanel/
SitePath of privileges.php: /modules/adminpanel/
SitePath of fleet_functions.php: /includes/
SitePath of fleetdb.php: /includes/

File1: index.php

File2: privileges.php

File3: fleet_functions.php


Expected result:

I expected all the files to be included like they have on my local box
testing and server testing. This is something unique about my new
development test server.

Actual result:
--
I get an error message on the fleet_functions.php file:

Warning: main(fleetdb.php): failed to open stream: No such file or
directory in /home/.sites/143/site2/web/includes/fleet_functions.php on
line 2

Warning: main(): Failed opening 'fleetdb.php' for inclusion
(include_path='') in
/home/.sites/143/site2/web/includes/fleet_functions.php on line 2

-- 
Edit bug report at http://bugs.php.net/?id=30681&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=30681&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30681&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30681&r=trysnapshot51
Fixed in CVS:http://bugs.php.net/fix.php?id=30681&r=fixedcvs
Fixed in release:http://bugs.php.net/fix.php?id=30681&r=alreadyfixed
Need backtrace:  http://bugs.php.net/fix.php?id=30681&r=needtrace
Need Reproduce Script:   http://bugs.php.net/fix.php?id=30681&r=needscript
Try newer version:   http://bugs.php.net/fix.php?id=30681&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=30681&r=support
Expected behavior:   http://bugs.php.net/fix.php?id=30681&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=30681&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=30681&r=submittedtwice
register_globals:http://bugs.php.net/fix.php?id=30681&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=30681&r=php3
Daylight Savings:http://bugs.php.net/fix.php?id=30681&r=dst
IIS Stability:   http://bugs.php.net/fix.php?id=30681&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=30681&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=30681&r=float
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=30681&r=mysqlcfg


#30679 [NEW]: Segmentation fault by php_mysqli_fetch_into_hash

2004-11-03 Thread alex at netflex dot nl
From: alex at netflex dot nl
Operating system: Fedora Core 2 (x86_64)
PHP version:  5.0.2
PHP Bug Type: MySQLi related
Bug description:  Segmentation fault by php_mysqli_fetch_into_hash

Description:

exec a mysql query with mysqli results in Segmentation fault.

Traceback:

#0  zend_object_store_get_object (zobject=0x0) at
/data/downloads/php-5.0.2/Zend/zend_objects_API.c:202
#1  0x0046e6dc in php_mysqli_fetch_into_hash (ht=2,
return_value=0x8584f8, this_ptr=0x0, return_value_used=-1073759168,
override_flags=0, into_object=0) at
/data/downloads/php-5.0.2/ext/mysqli/mysqli.c:626
#2  0x004769ef in zif_mysqli_fetch_array (ht=0,
return_value=0x7fbfffbc80, this_ptr=0x2, return_value_used=-1073759168) at
/data/downloads/php-5.0.2/ext/mysqli/mysqli_nonapi.c:185
#3  0x0058b10c in zend_do_fcall_common_helper
(execute_data=0x7fbfffcf60, opline=0x84bd00, op_array=0x848c50)at
/data/downloads/php-5.0.2/Zend/zend_execute.c:2711
#4  0x0058b24a in zend_do_fcall_handler
(execute_data=0x7fbfffcf60, opline=0x84bd00, op_array=0x848c50) at
/data/downloads/php-5.0.2/Zend/zend_execute.c:2843
#5  0x00587da0 in execute (op_array=0x848c50) at
/data/downloads/php-5.0.2/Zend/zend_execute.c:1400
#6  0x0058aeff in zend_do_fcall_common_helper
(execute_data=0x7fbfffd210, opline=0x846980, op_array=0x842078) at
/data/downloads/php-5.0.2/Zend/zend_execute.c:2740
#7  0x0058b1a1 in zend_do_fcall_by_name_handler (execute_data=0x0,
opline=0x7fbfffbc80, op_array=0x2) at
/data/downloads/php-5.0.2/Zend/zend_execute.c:2825
#8  0x00587da0 in execute (op_array=0x842078) at
/data/downloads/php-5.0.2/Zend/zend_execute.c:1400
#9  0x0056af79 in zend_execute_scripts (type=8, retval=0x0,
file_count=3) at /data/downloads/php-5.0.2/Zend/zend.c:1060
#10 0x005371df in php_execute_script (primary_file=0x7fb830)
at /data/downloads/php-5.0.2/main/main.c:1629
#11 0x00593bd7 in main (argc=3, argv=0x7fb998) at
/data/downloads/php-5.0.2/sapi/cli/php_cli.c:943


PHP (5.0.2): ./configure \
--libdir=/usr/local/lib64 \
--with-apxs2=/services/httpd/bin/apxs \
--with-mysql=/services/mysql \
--with-mysqli=/services/mysql/bin/mysql_config \
--enable-track-vars \
--with-openssl=/usr/local/ssl \
--enable-ftp --enable-sysvsem \
--enable-sysvshm \
--enable-sockets \
--with-gettext \
--with-mm=/usr/local/mm-1.3.0 \
--with-zlib \
--enable-so=shared \
--enable-pcntl \
--with-jpeg-dir=/usr/lib64 \
--with-png-dir=/usr/local \
--enable-gd \
--enable-debug--enable-maintainer-mode

httpd (2.0.52): ./configure \
--prefix=/services/httpd \
--enable-module=rewrite \
--enable-module=info \
--enable-module=status \
--enable-module=log_agent \
--enable-module=log_referer \
--enable-module=so \
--enable-ssl=shared \
CPPFLAGS=-I/usr/kerberos/include \
LDFLAGS=-L/usr/kerberos/lib \
--enable-maintainer-mode

mysql (4.1.1): ./configure \
--prefix=/services/mysql \
--enable-assembler \
--with-innodb \
--without-debug

Reproduce code:
---
$result = mysqli_query($conn, 'SELECT * FROM `dns_domains` WHERE `id` = '
. (int)$domainId) or die('MySQL: ' . mysqli_error($conn));

Expected result:

no crash?

Actual result:
--
blank web page in the browser

httpd error log:
[Tue Nov 02 21:04:56 2004] [notice] child pid 1659 exit signal
Segmentation fault (11)

-- 
Edit bug report at http://bugs.php.net/?id=30679&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=30679&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30679&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30679&r=trysnapshot51
Fixed in CVS:http://bugs.php.net/fix.php?id=30679&r=fixedcvs
Fixed in release:http://bugs.php.net/fix.php?id=30679&r=alreadyfixed
Need backtrace:  http://bugs.php.net/fix.php?id=30679&r=needtrace
Need Reproduce Script:   http://bugs.php.net/fix.php?id=30679&r=needscript
Try newer version:   http://bugs.php.net/fix.php?id=30679&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=30679&r=support
Expected behavior:   http://bugs.php.net/fix.php?id=30679&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=30679&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=30679&r=submittedtwice
register_globals:http://bugs.php.net/fix.php?id=30679&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=30679&r=php3
Daylight Savings:http://bugs.php.net/fix.php?id=30679&r=dst
IIS Stability:   http://bugs.php.net/fix.php?id=30679&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=30679&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=30679&r=float
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=30679&r=mysqlcfg


#30672 [Opn->Fbk]: exif_thumbnail fails after image has been edited in Exifer

2004-11-03 Thread helly
 ID:   30672
 Updated by:   [EMAIL PROTECTED]
 Reported By:  bosse at mellberg dot org
-Status:   Open
+Status:   Feedback
 Bug Type: *Graphics related
-Operating System: Debian Woody
+Operating System: *
-PHP Version:  4.3.9
+PHP Version:  4.3.9, 5.0.2
-Assigned To:  
+Assigned To:  helly
 New Comment:

I need such an image because i don't have Exifer.


Previous Comments:


[2004-11-03 15:15:03] bosse at mellberg dot org

Description:

Using the script in the documentation for exif_thumbnail, you can
extract the thumbnail image from the exif-header. If you alter the
exif-information (f.ex. delete the thumbnail and add it again) using
Exifer, the exif_thumbnail function will no longer be able to find the
thumbnail.

According to the author of Exifer, this is likely because
exif_thumbnail doesn't handle offsets to the thumbnail properly.






-- 
Edit this bug report at http://bugs.php.net/?id=30672&edit=1


#30678 [Opn->Bgs]: strtotime() has problems with Halloween

2004-11-03 Thread derick
 ID:   30678
 Updated by:   [EMAIL PROTECTED]
 Reported By:  alexbo at delphian dot org
-Status:   Open
+Status:   Bogus
 Bug Type: Date/time related
 Operating System: RedHat 9 (Kernel 2.4.20-20.9smp)
 PHP Version:  5.0.1
 New Comment:

We are happy to tell you that you just discovered Daylight Savings
Time. For more information see:
http://webexhibits.org/daylightsaving/b.html
Instead of using mktime/date consider using gmmktime and gmdate which
do
not suffer from DST.

.


Previous Comments:


[2004-11-03 20:27:21] alexbo at delphian dot org

Description:

Halloween, according to strtotime(), is both Sunday and Monday this
year. I haven't checked other years, but I just ran into this.

Uh... that's all I've got for you.

Reproduce code:
---
echo("");
echo(date("d_M_y",mktime(0,0,0,10,30,04)));
echo("");
echo(date("d_M_y",strtotime("tuesday",mktime(0,0,0,10,30,04;
echo("");
echo(date("d_M_y",strtotime("monday",mktime(0,0,0,10,30,04;
echo("");
echo(date("d_M_y",strtotime("sunday",mktime(0,0,0,10,30,04;
echo("");

Expected result:

30_Oct_04

02_Nov_04

01_Nov_04

31_Oct_04

Actual result:
--
30_Oct_04

01_Nov_04

31_Oct_04

31_Oct_04





-- 
Edit this bug report at http://bugs.php.net/?id=30678&edit=1


#30678 [NEW]: strtotime() has problems with Halloween

2004-11-03 Thread alexbo at delphian dot org
From: alexbo at delphian dot org
Operating system: RedHat 9 (Kernel 2.4.20-20.9smp)
PHP version:  5.0.1
PHP Bug Type: Date/time related
Bug description:  strtotime() has problems with Halloween

Description:

Halloween, according to strtotime(), is both Sunday and Monday this year.
I haven't checked other years, but I just ran into this.

Uh... that's all I've got for you.

Reproduce code:
---
echo("");
echo(date("d_M_y",mktime(0,0,0,10,30,04)));
echo("");
echo(date("d_M_y",strtotime("tuesday",mktime(0,0,0,10,30,04;
echo("");
echo(date("d_M_y",strtotime("monday",mktime(0,0,0,10,30,04;
echo("");
echo(date("d_M_y",strtotime("sunday",mktime(0,0,0,10,30,04;
echo("");

Expected result:

30_Oct_04

02_Nov_04

01_Nov_04

31_Oct_04

Actual result:
--
30_Oct_04

01_Nov_04

31_Oct_04

31_Oct_04

-- 
Edit bug report at http://bugs.php.net/?id=30678&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=30678&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30678&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30678&r=trysnapshot51
Fixed in CVS:http://bugs.php.net/fix.php?id=30678&r=fixedcvs
Fixed in release:http://bugs.php.net/fix.php?id=30678&r=alreadyfixed
Need backtrace:  http://bugs.php.net/fix.php?id=30678&r=needtrace
Need Reproduce Script:   http://bugs.php.net/fix.php?id=30678&r=needscript
Try newer version:   http://bugs.php.net/fix.php?id=30678&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=30678&r=support
Expected behavior:   http://bugs.php.net/fix.php?id=30678&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=30678&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=30678&r=submittedtwice
register_globals:http://bugs.php.net/fix.php?id=30678&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=30678&r=php3
Daylight Savings:http://bugs.php.net/fix.php?id=30678&r=dst
IIS Stability:   http://bugs.php.net/fix.php?id=30678&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=30678&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=30678&r=float
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=30678&r=mysqlcfg


#30673 [Opn->WFx]: a mysql and other databases request

2004-11-03 Thread georg
 ID:   30673
 Updated by:   [EMAIL PROTECTED]
 Reported By:  mazdak1 at telia dot com
-Status:   Open
+Status:   Wont fix
 Bug Type: Feature/Change Request
 Operating System: irrelevant winxp pro sp1
 PHP Version:  Irrelevant
 New Comment:

Not every database supports retrieval of these values. And 
those which supports it, provide SQL commands for. 
 
We will not add new functions which are simple wrappers 
for SQL commands. You can do that in your code. 


Previous Comments:


[2004-11-03 16:04:58] mazdak1 at telia dot com

Description:

my name is mazdak.farrokhzad
i would like to request a mysql feature that would be
mysql_db_size(),mysql_table_size(),mysql_column_size()
and mysql_row_size
what it would do is that it would get the lenght of a db,table,column
and row
this would make the amounts of queries less
and this could be implemented for other databases too
if this is for plugin makers could you tell the please

Reproduce code:
---
here i am showing an example
mysql_connect('...','...','...');
mysql_select_db('...'); --> beacause db is selected you should not need
to use the db parameters for table,column,row,size
let all functions accept float
and let them return true/false
echo mysql_db_size(mixed_var)/1024.'kb';
echo mysql_table_size(mixed_var)/1024.'kb';
echo mysql_column_size(mixed_var)/1024.'kb';
echo mysql_row_size(mixed_var)/1024.'kb';

Expected result:

depends on what you have in your code above
like
4kb
1.03715kb
0.005kb
0.72436kb

Actual result:
--
look above





-- 
Edit this bug report at http://bugs.php.net/?id=30673&edit=1


#30676 [NEW]: Segmentation fault with "mm",PHP works fine with "files"

2004-11-03 Thread joe dot maldonado at gmail dot com
From: joe dot maldonado at gmail dot com
Operating system: RH9.0
PHP version:  4.3.9
PHP Bug Type: Reproducible crash
Bug description:  Segmentation fault with "mm",PHP  works fine with "files"

Description:

>From time to time the Apache child will terminate on a segmentation fault
(11) and after some time the webserver needs to be restarted.

This started happening when I changed to using mm version 1.3.1.  It
stopped happening when the save_handler was changed to files

current config:
PHP 4.3.9/Apache 2.0.51 with mm v 1.3.1.


Actual result:
--
bt from core file:
(gdb) bt
#0  ps_mm_destroy (data=0x825d060) at
/root/src/apache/php-4.3.9/ext/session/mod_mm.c:243
#1  0x1839cea9 in zm_shutdown_ps_mm (type=1, module_number=5)
at /root/src/apache/php-4.3.9/ext/session/mod_mm.c:295
#2  0x1839be98 in zm_shutdown_session (type=1, module_number=5)
at /root/src/apache/php-4.3.9/ext/session/session.c:1665
#3  0x18433659 in module_destructor (module=0x82684b0) at
/root/src/apache/php-4.3.9/Zend/zend_API.c:1125
#4  0x1843565c in zend_hash_apply_deleter (ht=0x1860abe0, p=0x8268480)
at /root/src/apache/php-4.3.9/Zend/zend_hash.c:611
#5  0x184356ea in zend_hash_graceful_reverse_destroy (ht=0x1860abe0)
at /root/src/apache/php-4.3.9/Zend/zend_hash.c:677
#6  0x18430b7d in zend_shutdown () at
/root/src/apache/php-4.3.9/Zend/zend.c:556
#7  0x1840a9c7 in php_module_shutdown () at
/root/src/apache/php-4.3.9/main/main.c:1286
#8  0x1840a98e in php_module_shutdown_wrapper (sapi_globals=0x185ef520)
at /root/src/apache/php-4.3.9/main/main.c:1263
#9  0x184421b8 in php_apache_server_shutdown (tmp=0x0)
at /root/src/apache/php-4.3.9/sapi/apache2handler/sapi_apache2.c:328
#10 0x18106af9 in run_cleanups (cref=0x8190ee8) at apr_pools.c:1951
#11 0x18106353 in apr_pool_destroy (pool=0x8190ed8) at apr_pools.c:730
#12 0x1810641f in apr_pool_destroy (pool=0x818eed0) at apr_pools.c:727
#13 0x080b2ca8 in destroy_and_exit_process (process=0x185ef520,
process_exit_value=0) at main.c:208
#14 0x080b3614 in main (argc=4, argv=0xbfffdc84) at main.c:624
#15 0x181e85cd in __libc_start_main () from /lib/libc.so.6
(gdb)

-- 
Edit bug report at http://bugs.php.net/?id=30676&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=30676&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30676&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30676&r=trysnapshot51
Fixed in CVS:http://bugs.php.net/fix.php?id=30676&r=fixedcvs
Fixed in release:http://bugs.php.net/fix.php?id=30676&r=alreadyfixed
Need backtrace:  http://bugs.php.net/fix.php?id=30676&r=needtrace
Need Reproduce Script:   http://bugs.php.net/fix.php?id=30676&r=needscript
Try newer version:   http://bugs.php.net/fix.php?id=30676&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=30676&r=support
Expected behavior:   http://bugs.php.net/fix.php?id=30676&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=30676&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=30676&r=submittedtwice
register_globals:http://bugs.php.net/fix.php?id=30676&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=30676&r=php3
Daylight Savings:http://bugs.php.net/fix.php?id=30676&r=dst
IIS Stability:   http://bugs.php.net/fix.php?id=30676&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=30676&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=30676&r=float
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=30676&r=mysqlcfg


#30642 [Com]: static variables not inherited by other classes when extended

2004-11-03 Thread ashk06 at dsl dot pipex dot com
 ID:   30642
 Comment by:   ashk06 at dsl dot pipex dot com
 Reported By:  keith dot ward at gmail dot com
 Status:   Open
 Bug Type: Class/Object related
 Operating System: *
 PHP Version:  5.*
 Assigned To:  helly
 New Comment:

http://bugs.php.net/bug.php?id=30451

Seems to be a duplicate of this .


Previous Comments:


[2004-11-02 01:52:15] keith dot ward at gmail dot com

This is NOT BOGUS , had you bothered to read the results , you would
see that var_dump , did indeed return the static member myvar( from
class A )  . 
If returning static members with var_dump was not to be supported
(that's what it sounds like) it should not show up in the first
var_dump either !.
In Addition ... using echo parent::$myvar;  or echo $this->myvar within
class B , also returns nothing . So this bug is perfectly valid .



[2004-11-01 11:51:48] [EMAIL PROTECTED]

var_dump() doesn't show static members.

And don't reopen this report - check your code



[2004-11-01 04:53:01] keith dot ward at gmail dot com

Description:

When using extend to extend a class . Static variables are not 
inherited .

Reproduce code:
---
class a
{
public static $myvar;
public function __construct()
{
$this->myvar = '1';
echo ' Set myvar to 1 ... ' . "\n";
var_dump($this);
}
}

$a =  new a();
class b extends a
{
function __construct()
{
echo 'DUmping from class b' . "\n";
var_dump($this);
}
}
$a = new b();
?>

Expected result:

 Set myvar to 1 ... 
object(a)#1 (1) {
  ["myvar"]=>
  string(1) "1"
}
Dumping from class b
object(b)#2 (1) {
  ["myvar"]=>
  string(1) "1"
}


Actual result:
--
 Set myvar to 1 ... 
object(a)#1 (1) {
  ["myvar"]=>
  string(1) "1"
}
Dumping from class b
object(b)#2 (0) {
}






-- 
Edit this bug report at http://bugs.php.net/?id=30642&edit=1


#30675 [NEW]: Why ldap_sort() not using strcoll instead strcmp?

2004-11-03 Thread aszuts at jobmail dot hu
From: aszuts at jobmail dot hu
Operating system: Debian Linux
PHP version:  4.3.9
PHP Bug Type: Feature/Change Request
Bug description:  Why ldap_sort() not using strcoll instead strcmp?

Description:

In ext/ldap/ldap.c line 1554. stay:

(ldap_sort_entries(ld->link, (LDAPMessage **) &le->ptr, sflen ? sortfilter
: NULL, strcmp)

It uses strcmp to compare LDAP result on the client side. IMHO it will be
better to use locale sensitive strcoll or give a PHP-API paramater to set
comparision function manually!

Thanks 
  Atti


-- 
Edit bug report at http://bugs.php.net/?id=30675&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=30675&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30675&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30675&r=trysnapshot51
Fixed in CVS:http://bugs.php.net/fix.php?id=30675&r=fixedcvs
Fixed in release:http://bugs.php.net/fix.php?id=30675&r=alreadyfixed
Need backtrace:  http://bugs.php.net/fix.php?id=30675&r=needtrace
Need Reproduce Script:   http://bugs.php.net/fix.php?id=30675&r=needscript
Try newer version:   http://bugs.php.net/fix.php?id=30675&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=30675&r=support
Expected behavior:   http://bugs.php.net/fix.php?id=30675&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=30675&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=30675&r=submittedtwice
register_globals:http://bugs.php.net/fix.php?id=30675&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=30675&r=php3
Daylight Savings:http://bugs.php.net/fix.php?id=30675&r=dst
IIS Stability:   http://bugs.php.net/fix.php?id=30675&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=30675&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=30675&r=float
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=30675&r=mysqlcfg


#30043 [Opn]: ODBC Column Name Truncation

2004-11-03 Thread arobins at csg dot uwaterloo dot ca
 ID:   30043
 User updated by:  arobins at csg dot uwaterloo dot ca
 Reported By:  arobins at csg dot uwaterloo dot ca
 Status:   Open
 Bug Type: ODBC related
 Operating System: Win2k or Linux
 PHP Version:  Irrelevant
 New Comment:

Until 'true multi-byte support' comes along, might I suggest as a
temporary solution simply increasing the field name buffer? (i.e. from
32 to 256)


Previous Comments:


[2004-09-10 03:23:40] [EMAIL PROTECTED]

Known issue.  Was once looked into correct to provide 
true multi-byte support, but was side tracked.



[2004-09-09 22:08:24] arobins at csg dot uwaterloo dot ca

Description:

When retrieving ODBC results from Sybase SQL Anywhere 6 and 9, the
column names are being truncated to 31 characters. 

This happens even if the column name is simply specified using sql 'AS'
(i.e. "select column as
a_really_long_name_that_is_longer_than_31_characters from crap" would
still return "a_really_long_name_that_is_long" as the column name).

Have tried in PHP 4 and 5, Win2K Server and SUSE Linux, all with same
results.

-- The buffer used by the odbc extension to store field
names is only 32 bytes.

Reproduce code:
---



Expected result:

1: key - 4
2: a_really_long_name_that_is_longer_than_31_characters - 5
3: longer_name - 6


Actual result:
--
1: key - 4
2: a_really_long_name_that_is_long - 5
3: longer_name - 6






-- 
Edit this bug report at http://bugs.php.net/?id=30043&edit=1


#30674 [Opn]: Unexpected results and core dump with recursive references serializing

2004-11-03 Thread fmmarzoa at gmx dot net
 ID:   30674
 User updated by:  fmmarzoa at gmx dot net
-Summary:  Unexpected results and crashes with recursive
   references serializing
 Reported By:  fmmarzoa at gmx dot net
 Status:   Open
 Bug Type: Zend Engine 2 problem
 Operating System: Linux (probably others)
 PHP Version:  5.0.2
 New Comment:

(just changed "crashed" by "core dump" in subject)


Previous Comments:


[2004-11-03 16:29:49] fmmarzoa at gmx dot net

Description:

serialize function lost references to itself on an array and produces a
segfault in some other circunstances. I send the code with which I've
discovered the problem, but Andrey Hristov has also cooked some code
based on this that crash the PHP engine. 

Complete quoted thread with more code samples can be found on the
internals list archive:

http://marc.theaimsgroup.com/?l=php-dev&m=109949534625983&w=2

Reproduce code:
---




Complete quoted thread with more code samples, including segfaults, can
be found on the internals list archive:
http://marc.theaimsgroup.com/?l=php-dev&m=109949534625983&w=2


Expected result:

array(1) {
 ["self"]=>
 array(1) {
   ["self"]=>
   *RECURSION*
 }
}

array(1) {
 ["self"]=>
 array(1) {
   ["self"]=>
   *RECURSION*
 }
} 

Actual result:
--
array(1) {
 ["self"]=>
 array(1) {
   ["self"]=>
   *RECURSION*
 }
}

array(1) {
 ["self"]=>
 array(1) {
   ["self"]=>
   NULL
 }
} 





-- 
Edit this bug report at http://bugs.php.net/?id=30674&edit=1


#30674 [NEW]: Unexpected results and crashes with recursive references serializing

2004-11-03 Thread fmmarzoa at gmx dot net
From: fmmarzoa at gmx dot net
Operating system: Linux (probably others)
PHP version:  5.0.2
PHP Bug Type: Zend Engine 2 problem
Bug description:  Unexpected results and crashes with recursive references serializing

Description:

serialize function lost references to itself on an array and produces a
segfault in some other circunstances. I send the code with which I've
discovered the problem, but Andrey Hristov has also cooked some code based
on this that crash the PHP engine. 

Complete quoted thread with more code samples can be found on the
internals list archive:

http://marc.theaimsgroup.com/?l=php-dev&m=109949534625983&w=2

Reproduce code:
---




Complete quoted thread with more code samples, including segfaults, can be
found on the internals list archive:
http://marc.theaimsgroup.com/?l=php-dev&m=109949534625983&w=2


Expected result:

array(1) {
 ["self"]=>
 array(1) {
   ["self"]=>
   *RECURSION*
 }
}

array(1) {
 ["self"]=>
 array(1) {
   ["self"]=>
   *RECURSION*
 }
} 

Actual result:
--
array(1) {
 ["self"]=>
 array(1) {
   ["self"]=>
   *RECURSION*
 }
}

array(1) {
 ["self"]=>
 array(1) {
   ["self"]=>
   NULL
 }
} 

-- 
Edit bug report at http://bugs.php.net/?id=30674&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=30674&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30674&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30674&r=trysnapshot51
Fixed in CVS:http://bugs.php.net/fix.php?id=30674&r=fixedcvs
Fixed in release:http://bugs.php.net/fix.php?id=30674&r=alreadyfixed
Need backtrace:  http://bugs.php.net/fix.php?id=30674&r=needtrace
Need Reproduce Script:   http://bugs.php.net/fix.php?id=30674&r=needscript
Try newer version:   http://bugs.php.net/fix.php?id=30674&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=30674&r=support
Expected behavior:   http://bugs.php.net/fix.php?id=30674&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=30674&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=30674&r=submittedtwice
register_globals:http://bugs.php.net/fix.php?id=30674&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=30674&r=php3
Daylight Savings:http://bugs.php.net/fix.php?id=30674&r=dst
IIS Stability:   http://bugs.php.net/fix.php?id=30674&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=30674&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=30674&r=float
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=30674&r=mysqlcfg


#30673 [NEW]: a mysql and other databases request

2004-11-03 Thread mazdak1 at telia dot com
From: mazdak1 at telia dot com
Operating system: irrelevant winxp pro sp1
PHP version:  Irrelevant
PHP Bug Type: Feature/Change Request
Bug description:  a mysql and other databases request

Description:

my name is mazdak.farrokhzad
i would like to request a mysql feature that would be
mysql_db_size(),mysql_table_size(),mysql_column_size()
and mysql_row_size
what it would do is that it would get the lenght of a db,table,column and
row
this would make the amounts of queries less
and this could be implemented for other databases too
if this is for plugin makers could you tell the please

Reproduce code:
---
here i am showing an example
mysql_connect('...','...','...');
mysql_select_db('...'); --> beacause db is selected you should not need to
use the db parameters for table,column,row,size
let all functions accept float
and let them return true/false
echo mysql_db_size(mixed_var)/1024.'kb';
echo mysql_table_size(mixed_var)/1024.'kb';
echo mysql_column_size(mixed_var)/1024.'kb';
echo mysql_row_size(mixed_var)/1024.'kb';

Expected result:

depends on what you have in your code above
like
4kb
1.03715kb
0.005kb
0.72436kb

Actual result:
--
look above

-- 
Edit bug report at http://bugs.php.net/?id=30673&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=30673&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30673&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30673&r=trysnapshot51
Fixed in CVS:http://bugs.php.net/fix.php?id=30673&r=fixedcvs
Fixed in release:http://bugs.php.net/fix.php?id=30673&r=alreadyfixed
Need backtrace:  http://bugs.php.net/fix.php?id=30673&r=needtrace
Need Reproduce Script:   http://bugs.php.net/fix.php?id=30673&r=needscript
Try newer version:   http://bugs.php.net/fix.php?id=30673&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=30673&r=support
Expected behavior:   http://bugs.php.net/fix.php?id=30673&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=30673&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=30673&r=submittedtwice
register_globals:http://bugs.php.net/fix.php?id=30673&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=30673&r=php3
Daylight Savings:http://bugs.php.net/fix.php?id=30673&r=dst
IIS Stability:   http://bugs.php.net/fix.php?id=30673&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=30673&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=30673&r=float
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=30673&r=mysqlcfg


#30672 [NEW]: exif_thumbnail fails after image has been edited in Exifer

2004-11-03 Thread bosse at mellberg dot org
From: bosse at mellberg dot org
Operating system: Debian Woody
PHP version:  4.3.9
PHP Bug Type: *Graphics related
Bug description:  exif_thumbnail fails after image has been edited in Exifer

Description:

Using the script in the documentation for exif_thumbnail, you can extract
the thumbnail image from the exif-header. If you alter the
exif-information (f.ex. delete the thumbnail and add it again) using
Exifer, the exif_thumbnail function will no longer be able to find the
thumbnail.

According to the author of Exifer, this is likely because exif_thumbnail
doesn't handle offsets to the thumbnail properly.


-- 
Edit bug report at http://bugs.php.net/?id=30672&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=30672&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30672&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30672&r=trysnapshot51
Fixed in CVS:http://bugs.php.net/fix.php?id=30672&r=fixedcvs
Fixed in release:http://bugs.php.net/fix.php?id=30672&r=alreadyfixed
Need backtrace:  http://bugs.php.net/fix.php?id=30672&r=needtrace
Need Reproduce Script:   http://bugs.php.net/fix.php?id=30672&r=needscript
Try newer version:   http://bugs.php.net/fix.php?id=30672&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=30672&r=support
Expected behavior:   http://bugs.php.net/fix.php?id=30672&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=30672&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=30672&r=submittedtwice
register_globals:http://bugs.php.net/fix.php?id=30672&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=30672&r=php3
Daylight Savings:http://bugs.php.net/fix.php?id=30672&r=dst
IIS Stability:   http://bugs.php.net/fix.php?id=30672&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=30672&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=30672&r=float
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=30672&r=mysqlcfg


#30654 [Ana->Csd]: OCIPLogon always creates new connection with OCINLogon

2004-11-03 Thread tony2001
 ID:   30654
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Analyzed
+Status:   Closed
 Bug Type: OCI8 related
 Operating System: Linux
 PHP Version:  4.3.9
 Assigned To:  tony2001
 New Comment:

This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.

Fixed, thanks!



Previous Comments:


[2004-11-02 09:19:57] [EMAIL PROTECTED]

I believe you are misunderstanding my words. I know you are
fed up with a lot of bogus bugs but this one's not.

The problem here is the recorded entry which created by
OCI*P*Logon is deleted by the destructor of the connection
created by OCI*N*Logon (in case both of them are created with 
same user, password, sid).

I do not mean such a simple matter as you wrote... (although
the cause of this problem is rather simple one:)




[2004-11-02 09:08:23] [EMAIL PROTECTED]

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

Only connections created with the persistent versoin of the logon
function are recorded, just like with any other database extension. No
bug here.



[2004-11-02 04:30:46] [EMAIL PROTECTED]

Description:

OCIPLogon always creates new connection even if the process
already has the connectoin with same user, same password 
and same sid, when it's called with OCINLogon.

This happens when I called OCINLogon after OCIPLogon with
same user, password and sid as OCIPLogon
(please see also following "Reproduce code").

I'm not sure why but when php is trying to shutting down
the resource created by OCINLogon, _oci_close_session()
remove the entry in OCI(user). And then of course,
_oci_open_session() called by OCIPLogon cannot find entry
in OCI(uesr) and creates new connection next time...

and the fix will be something like this?

Index: oci8.c
===
RCS file: /repository/php-src/ext/oci8/oci8.c,v
retrieving revision 1.183.2.15
diff -r1.183.2.15 oci8.c
2479c2479
<   if (! OCI(shutdown)) {
---
>   if (!OCI(shutdown) && !session->persistent) {


Reproduce code:
---


Expected result:

OCIPLogon does not create new connection more than once,
and returns the connection created in previous execution.


Actual result:
--
OCIPLogon creates new connection everytime. You can confirm
this in v$session table.






-- 
Edit this bug report at http://bugs.php.net/?id=30654&edit=1


#30671 [NEW]: "Unable to fork..."-error appears periodically

2004-11-03 Thread henning dot mohren at gmx dot de
From: henning dot mohren at gmx dot de
Operating system: Solaris 9
PHP version:  5.0.2
PHP Bug Type: Filesystem function related
Bug description:  "Unable to fork..."-error appears periodically

Description:

Solaris restricts the use of popen() to 255 files, which is a low limit in
case of servers. When using PHP's system() commands, PHP calls Solaris
popen(). This fails, when too system-commands have been invoked.
See here
(http://www.sitepoint.com/forums/showthread.php?p=1245879#post1245879) for
more details.

Expected result:

PHP should implement a workaround or call another Solaris function for
invoking system commands.


-- 
Edit bug report at http://bugs.php.net/?id=30671&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=30671&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30671&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30671&r=trysnapshot51
Fixed in CVS:http://bugs.php.net/fix.php?id=30671&r=fixedcvs
Fixed in release:http://bugs.php.net/fix.php?id=30671&r=alreadyfixed
Need backtrace:  http://bugs.php.net/fix.php?id=30671&r=needtrace
Need Reproduce Script:   http://bugs.php.net/fix.php?id=30671&r=needscript
Try newer version:   http://bugs.php.net/fix.php?id=30671&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=30671&r=support
Expected behavior:   http://bugs.php.net/fix.php?id=30671&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=30671&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=30671&r=submittedtwice
register_globals:http://bugs.php.net/fix.php?id=30671&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=30671&r=php3
Daylight Savings:http://bugs.php.net/fix.php?id=30671&r=dst
IIS Stability:   http://bugs.php.net/fix.php?id=30671&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=30671&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=30671&r=float
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=30671&r=mysqlcfg


#30665 [Bgs->Opn]: With safe_mod = On Maximum execution time of 30 seconds exceeded

2004-11-03 Thread udovdh at yahoo dot com
 ID:   30665
 User updated by:  udovdh at yahoo dot com
 Reported By:  udovdh at yahoo dot com
-Status:   Bogus
+Status:   Open
 Bug Type: Unknown/Other Function
 Operating System: FC2/Linux 2.6.10-rc1
 PHP Version:  4.3.8
 New Comment:

That measn that there is another BUG! (since the command works as
implemented)
Also this does not explain the execution time message, the original
complaint.


Previous Comments:


[2004-11-03 08:55:16] [EMAIL PROTECTED]

You can't pass parameters to commands called with system() in
safe_mode.



[2004-11-03 07:51:28] udovdh at yahoo dot com

You wrote:
> Sorry, but your problem does not imply a bug in PHP itself.

Please explain. Please tell why older bug reports like this one were
PHP related. Please tell what info you'd need to make it a PHP bug or a
definite Apache bug.



[2004-11-02 18:29:51] [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.

.



[2004-11-02 17:18:40] udovdh at yahoo dot com

Description:

With safe_mode = On I get PHP Fatal error:  Maximum execution time of
30 seconds exceeded in Unknown on line 0 in the error_log  after each
view of this PHP using IE6:



Uptime records for this host


Uptime records for this host
This host runs a cool program called uptimed to log uptime
records.
It comes with a nice program to examine the logs and display them in a
humane manner.
As you can see this program runs as php thingie as well as cgi!

Here are the uptime records for this system:





Cool eh?

You can now go back to the main page of my
site.



It's the stock Fedora Core 2 PHP RPM and the line appears every time
after a view.

Expected result:

No error message, just a functioning and safe php.






-- 
Edit this bug report at http://bugs.php.net/?id=30665&edit=1


#30670 [NEW]: ldap_search does not work on Windows 2003 directories (but other tools do)

2004-11-03 Thread michael dot siebke at keymile dot com
From: michael dot siebke at keymile dot com
Operating system: Linux (Redhat 8)
PHP version:  5.0.1
PHP Bug Type: LDAP related
Bug description:  ldap_search does not work on Windows 2003 directories (but other 
tools do)

Description:

It's not possible to search a Windows 2003 active directory using the LDAP
interface (Windows 2000 works fine). However, using other tools (like LDAP
browers), searching the Windows 2003 directory works. The problems occurs
only using the PHP library.

Reproduce code:
---
$connect  =  ldap_connect("[i]server.domain.de[/i]");

  if ($connect != FALSE) {

$res   = ldap_bind($connect, "[i]username[/i]", "[i]password[/i]");

if ($res == FALSE) {
  echo "Unable to bind to LDAP server";
  exit;
}

$attributes = array("sAMAccountName", "dn", "mail");
$data = ldap_search($connect, "[i]DC=company,DC=de[/i]",
"(sAMAccountName=[i]targetaccount[/i])");

if ($data != FALSE) {
   echo "Reading data...";
   $data  = ldap_get_entries($connect, $data);
} else {
   echo "Nothing :-(";
}
  
ldap_close($connect);
  }

Expected result:

"Reading data..."

Actual result:
--
Warning: ldap_search() [function.ldap-search]: Search: Operations error in
/data/htdocs/hd5dev/Test.php on line 57
Nothing :-(

-- 
Edit bug report at http://bugs.php.net/?id=30670&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=30670&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30670&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30670&r=trysnapshot51
Fixed in CVS:http://bugs.php.net/fix.php?id=30670&r=fixedcvs
Fixed in release:http://bugs.php.net/fix.php?id=30670&r=alreadyfixed
Need backtrace:  http://bugs.php.net/fix.php?id=30670&r=needtrace
Need Reproduce Script:   http://bugs.php.net/fix.php?id=30670&r=needscript
Try newer version:   http://bugs.php.net/fix.php?id=30670&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=30670&r=support
Expected behavior:   http://bugs.php.net/fix.php?id=30670&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=30670&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=30670&r=submittedtwice
register_globals:http://bugs.php.net/fix.php?id=30670&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=30670&r=php3
Daylight Savings:http://bugs.php.net/fix.php?id=30670&r=dst
IIS Stability:   http://bugs.php.net/fix.php?id=30670&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=30670&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=30670&r=float
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=30670&r=mysqlcfg