#26597 [Fbk-Csd]: missing all slashes in the path $_FILES['any_file']['tmp_name']

2003-12-15 Thread valyala at tut dot by
 ID:   26597
 User updated by:  valyala at tut dot by
 Reported By:  valyala at tut dot by
-Status:   Feedback
+Status:   Closed
-Bug Type: Scripting Engine problem
+Bug Type: Strings related
 Operating System: Win2k sp3
 PHP Version:  4.3.4
 New Comment:

I found my error.
My script was doing something like this:
if (get_magic_quotes_gpc()) $_FILES['any_file']['tmp_name'] =
stripslashes($_FILES['any_file']['tmp_name']);
:)
But I can't understand why function stripslashes() strips all
backslashes, not only before special characters [0, \, ', ], which
escapes function addlashes().


Previous Comments:


[2003-12-14 20:41:43] [EMAIL PROTECTED]

Try this:

print(addslashes($_FILES['any_file']['tmp_name']));




[2003-12-12 04:50:43] valyala at tut dot by

Description:

PHP 4.3.4 is running under apache 1.3.27 as module.

Value of $_FILES['any_file']['tmp_name'] is wrong. All slashes in the
path has been deleted. So, I cannot know the real filename of temporary
file.

Reproduce code:
---
/* file with name 'any_file' was posted to the script
 I want to see, where the temporary file was stored on the server:
*/
print($_FILES['any_file']['tmp_name']);

Expected result:

c:/winnt/temp/phpXX.tmp


Actual result:
--
c:winnttempphpXX.tmp





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


#26624 [NEW]: cannot get the right value when i use + operator

2003-12-15 Thread mlsx at cie dot xtu dot edu dot cn
From: mlsx at cie dot xtu dot edu dot cn
Operating system: windows server 2003
PHP version:  4.3.3
PHP Bug Type: Math related
Bug description:  cannot get the right value when i use + operator

Description:

first i define a is 8 and b is 6.
When i use echo a+b=.$a+$b.br; 
the MS IE show the result is 2.
While i use echo a+b=; echo $a+$b.br;
the result is correct!
the same result when use - operator  use a line command.
but the result is correct when i use * and /
i cannnot fix it!

Reproduce code:
---
?php
$a = 8;
$b = 2;
$c = 3;
echo a+b=.$a+$b.br;
echo a-b=.$a-$b.br;
echo a*b=.$a*$b.br;
echo a/b=.$a/$b.br;
echo a%c=.$a%$c.br;
echo a++ is .$a++;
?

Expected result:

2
-2
a*b=16
a/b=4
a%c=2
a++ is 8 

Actual result:
--
a+b=10
a-b=6
a*b=16
a/b=4
a%c=2
a++ is 8 

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


#26625 [NEW]: pg_convert sets NULL incorrectly for character data types

2003-12-15 Thread gregkiyomi at digitaljunkies dot ca
From: gregkiyomi at digitaljunkies dot ca
Operating system: linux
PHP version:  5.0.0b2 (beta2)
PHP Bug Type: PostgreSQL related
Bug description:  pg_convert sets NULL incorrectly for character data types

Description:

When using pg_convert() with PGSQL_CONV_FORCE_NULL option set the
resulting value for character data types (text,char,varchar) is set as
'NULL' instead of NULL.  This therefore inserts the string 'NULL' into the
database instead of the desired NULL value.  This also obviously doesn't
fail a NOT NULL check as it should.

The culprit is ext/pgsql/pgsql.c

*** pgsql.c~Mon Dec 15 00:17:01 2003
--- pgsql.c Mon Dec 15 01:28:56 2003
***
*** 3785,3790 
--- 3785,3791 
if (Z_STRLEN_PP(val) == 0) {
if (opt  PGSQL_CONV_FORCE_NULL) {
ZVAL_STRING(new_val, NULL, 1);
+   break;
}
else {
ZVAL_STRING(new_val, empty_string, 1);

This prevents the NULL value from being passed through
php_pgsql_add_quotes().

This is also present in php 4.3.3.

Reproduce code:
---
$con_str = host=localhost dbname=database user=user password=pass;
$con = pg_connect($con_str);

$data = array(varchar_field1=test,
  varchar_field2=NULL,
  varchar_field3=);

$array = pg_convert($con,test_table,$data,4);
echo(pre);
print_r($array);
echo(/pre);


Expected result:

Array
(
[varchar_field1] = 'test'
[varchar_field2] = NULL
[varchar_field3] = NULL
)


Actual result:
--
Array
(
[varchar_field1] = 'test'
[varchar_field2] = NULL
[varchar_field3] = 'NULL'
)


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


#26624 [Com]: cannot get the right value when i use + operator

2003-12-15 Thread benjcarson at digitaljunkies dot ca
 ID:   26624
 Comment by:   benjcarson at digitaljunkies dot ca
 Reported By:  mlsx at cie dot xtu dot edu dot cn
 Status:   Open
 Bug Type: Math related
 Operating System: windows server 2003
 PHP Version:  4.3.3
 New Comment:

I believe you need to put the math expression in parentheses because
'.' and '+' have the same precedence.  What is happening is that you
end up adding the value 2 to the string a+b=2.  If I do:

echo a+b=.($a+$b).br;  

it comes out correctly.


Previous Comments:


[2003-12-15 02:45:01] mlsx at cie dot xtu dot edu dot cn

Description:

first i define a is 8 and b is 6.
When i use echo a+b=.$a+$b.br; 
the MS IE show the result is 2.
While i use echo a+b=; echo $a+$b.br;
the result is correct!
the same result when use - operator  use a line command.
but the result is correct when i use * and /
i cannnot fix it!

Reproduce code:
---
?php
$a = 8;
$b = 2;
$c = 3;
echo a+b=.$a+$b.br;
echo a-b=.$a-$b.br;
echo a*b=.$a*$b.br;
echo a/b=.$a/$b.br;
echo a%c=.$a%$c.br;
echo a++ is .$a++;
?

Expected result:

2
-2
a*b=16
a/b=4
a%c=2
a++ is 8 

Actual result:
--
a+b=10
a-b=6
a*b=16
a/b=4
a%c=2
a++ is 8 





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


#26624 [Opn-Bgs]: cannot get the right value when i use + operator

2003-12-15 Thread derick
 ID:   26624
 Updated by:   [EMAIL PROTECTED]
 Reported By:  mlsx at cie dot xtu dot edu dot cn
-Status:   Open
+Status:   Bogus
 Bug Type: Math related
 Operating System: windows server 2003
 PHP Version:  4.3.3
 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.

Indeed, you need to use parenthesis


Previous Comments:


[2003-12-15 03:56:03] benjcarson at digitaljunkies dot ca

I believe you need to put the math expression in parentheses because
'.' and '+' have the same precedence.  What is happening is that you
end up adding the value 2 to the string a+b=2.  If I do:

echo a+b=.($a+$b).br;  

it comes out correctly.



[2003-12-15 02:45:01] mlsx at cie dot xtu dot edu dot cn

Description:

first i define a is 8 and b is 6.
When i use echo a+b=.$a+$b.br; 
the MS IE show the result is 2.
While i use echo a+b=; echo $a+$b.br;
the result is correct!
the same result when use - operator  use a line command.
but the result is correct when i use * and /
i cannnot fix it!

Reproduce code:
---
?php
$a = 8;
$b = 2;
$c = 3;
echo a+b=.$a+$b.br;
echo a-b=.$a-$b.br;
echo a*b=.$a*$b.br;
echo a/b=.$a/$b.br;
echo a%c=.$a%$c.br;
echo a++ is .$a++;
?

Expected result:

2
-2
a*b=16
a/b=4
a%c=2
a++ is 8 

Actual result:
--
a+b=10
a-b=6
a*b=16
a/b=4
a%c=2
a++ is 8 





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


#26626 [NEW]: Ruby style feature: get n times a char string

2003-12-15 Thread rohit_lodha at yahoo dot com
From: rohit_lodha at yahoo dot com
Operating system: Any
PHP version:  Irrelevant
PHP Bug Type: Feature/Change Request
Bug description:  Ruby style feature: get n times a char string 

Description:

when an integer is multipled with a char or string we should get a new
string with the string repeating n times.

eg: 2 * 's' = 'ss';
4 * FUN = FUNFUNFUNFUN;


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


#26626 [Opn-WFx]: Ruby style feature: get n times a char string

2003-12-15 Thread derick
 ID:   26626
 Updated by:   [EMAIL PROTECTED]
 Reported By:  rohit_lodha at yahoo dot com
-Status:   Open
+Status:   Wont fix
 Bug Type: Feature/Change Request
 Operating System: Any
 PHP Version:  Irrelevant
 New Comment:

We already have something like this, see http://php.net/str_repeat


Previous Comments:


[2003-12-15 04:15:36] [EMAIL PROTECTED]

We already have something like this, see http://php.net/str_repeat



[2003-12-15 04:11:37] rohit_lodha at yahoo dot com

Description:

when an integer is multipled with a char or string we should get a new
string with the string repeating n times.

eg: 2 * 's' = 'ss';
4 * FUN = FUNFUNFUNFUN;






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


#26626 [Opn]: Ruby style feature: get n times a char string

2003-12-15 Thread rohit_lodha at yahoo dot com
 ID:   26626
 User updated by:  rohit_lodha at yahoo dot com
 Reported By:  rohit_lodha at yahoo dot com
 Status:   Open
 Bug Type: Feature/Change Request
 Operating System: Any
 PHP Version:  Irrelevant
 New Comment:

This can be currently achived by using str_repeat();


Previous Comments:


[2003-12-15 04:11:37] rohit_lodha at yahoo dot com

Description:

when an integer is multipled with a char or string we should get a new
string with the string repeating n times.

eg: 2 * 's' = 'ss';
4 * FUN = FUNFUNFUNFUN;






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


#26602 [Opn]: Mssql.textlimit server restart needed

2003-12-15 Thread mikael at abracadaweb dot com
 ID:   26602
 User updated by:  mikael at abracadaweb dot com
 Reported By:  mikael at abracadaweb dot com
 Status:   Open
 Bug Type: MSSQL related
 Operating System: Windows 2000 Server
 PHP Version:  4.3.4
 New Comment:

We dont't have any crash in our case ... just a php.ini value which
seems de be reinitialised to it default


Previous Comments:


[2003-12-14 20:39:40] [EMAIL PROTECTED]

Possibly related to bug #26589 ?





[2003-12-12 12:06:07] mikael at abracadaweb dot com

The web server is IIS and we use php on the ISAPI mode



[2003-12-12 12:00:39] [EMAIL PROTECTED]

What webserver are you using?



[2003-12-12 09:49:35] mikael at abracadaweb dot com

Description:

We have made a change in the php.ini to set mssql.textlimit 
mssql.textsize to 2 rather than 4096 
Just to allow to have bigger text stored in the database 

It works ... no problem but only for some hours ... after the limit go
down again to 4096 when we retrieve the text from database
If we restart the www service, again it works for some hours ! 










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


#26627 [NEW]: I get source of php files instead of supposed output on random basis

2003-12-15 Thread info at gli dot ch
From: info at gli dot ch
Operating system: Linux 2.4.20
PHP version:  4.3.4
PHP Bug Type: Apache2 related
Bug description:  I get source of php files instead of supposed output on random basis

Description:


Randomly the php-source is displayed instead of the output
(http://www.engstringen.ch/).
This was the case when having installed apache 1.3 und php 4.1.

After ugrading to apache 2 and php 4.3.4 the bug still occurs. But the
browser shows now a file download dialog box for downloading the php
-script instead of having executed it !!!
The header of the response contains the php - mime type configured
application/x-httpd-php.

The apache config contains
AddType application/x-httpd-php .php .php4 .php3 .phtml
AddType application/x-httpd-php-source .phps
Include conf/confixx_vhost.conf

The confixx_vhost.conf contains lots of virtual host configured on a named
vhost basis.


php is minimally configured with
 './configure' '--with-mysql' '--with-apxs'


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


#26629 [NEW]: Inconsistent handle of \n in highlight_string and highlight_file

2003-12-15 Thread [EMAIL PROTECTED]
From: [EMAIL PROTECTED]
Operating system: 
PHP version:  4.3.3
PHP Bug Type: Strings related
Bug description:  Inconsistent handle of \n in highlight_string and highlight_file

Description:

highlight.keyword isn't used in strings without variables for \n and
similar. It is used in strings with variables (e.g. $a\n).

(The problem is in file /ZendEngine2/zend_highlight.c.)

Reproduce code:
---
highlight_string('?php echo a\n; ?');


Expected result:

codefont color=#00
font color=#BBlt;?php /fontfont color=#007700echo
/fontfont color=#DDa/fontfont color=#007700\n/fontfont
color=#DD/fontfont color=#007700; /fontfont
color=#BB?gt;/font
/font
/code

Actual result:
--
codefont color=#00
font color=#BBlt;?php /fontfont color=#007700echo
/fontfont color=#DDa\n/fontfont color=#007700;
/fontfont color=#BB?gt;/font
/font
/code

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


#26630 [NEW]: Crashes whenerver class_exists is called in __autoload

2003-12-15 Thread rohit_lodha at yahoo dot com
From: rohit_lodha at yahoo dot com
Operating system: Windows 2000 adv server
PHP version:  5.0.0b2 (beta2)
PHP Bug Type: Reproducible crash
Bug description:  Crashes whenerver class_exists is called in __autoload

Description:

crashes when following code is executed

Reproduce code:
---
function __autoload($className) {
if(!class_exists($classname)){
   ClassLoader::loadClass($className);
   }
}

Actual result:
--
CGI Error
The specified CGI application misbehaved by not returning a complete set
of HTTP headers. The headers it did return are:

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


#26613 [Fbk-Opn]: ob_gzhandler seems NOT WORKING

2003-12-15 Thread sabio71 at hotmail dot com
 ID:   26613
 User updated by:  sabio71 at hotmail dot com
 Reported By:  sabio71 at hotmail dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Zlib Related
 Operating System: slackware 9.1 stable patched
 PHP Version:  4.3.4
 New Comment:

a more clear explanation


Previous Comments:


[2003-12-13 13:59:24] [EMAIL PROTECTED]

What makes you think ob_gzhandler is not working? Are you certain your
browser supports zlib encoding?



[2003-12-13 04:48:03] sabio71 at hotmail dot com

Description:


[configure line]
./configure --with-mysql --with-apache=../apache_1.3.29

[changes to php.ini]
for legacy reasons: register_globals = On

simply put, it seems it doesn't compress ...

i strongly believe is my fault, but i'm not able to figure why

i've tried also with output_handler = ob_gzhandler but nothing

Reproduce code:
---
[short script descripting]
?php
ob_start(ob_gzhandler);
..
.
.
ob_end_flush();
?






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


#26613 [Opn]: ob_gzhandler seems NOT WORKING

2003-12-15 Thread sabio71 at hotmail dot com
 ID:   26613
 User updated by:  sabio71 at hotmail dot com
 Reported By:  sabio71 at hotmail dot com
 Status:   Open
 Bug Type: Zlib Related
 Operating System: slackware 9.1 stable patched
 PHP Version:  4.3.4
 New Comment:

A MORE CLEAR EXPLANATION 

yes ILIA, for sure :) !!!. I'm using ie 5, ie 5.5, ie 6, netscape 6,
mozilla, konqueror, even lynx ...

i've made some other attempts, in particular i've checked if

1) for some reasons apache was not passing through to php
accept-encoding but, obviously it is not the case

2) it makes thing behaves differently pokeing with php.ini, like
setting [output_buffering = 4096; AND output_handler = ob_gzhandler]
OR
[output_handler = ; AND zlib.output_compression = On]
and calling ob_start() instead of ob_start(ob_gzhandler)

none of the two seems working.

Moreover, it seems the semantic of calling sequence ob_start ...
ob_end_flush has changed a bit from version 4.2.3 (yes i know it is
VERY VERY old and perhaps the changed behaviour il well documented)

in few words, i'm using an old version of ez-publish (2.1) that works
with apache 1.3.27 and php 4.2.3 on linux...
with that combination the system works and compress the http output
stream...

on a apache 1.3.29 with brand new php 4.3.4 simply it doesn't...
moreover (but this is ez-publish code-base fault) on php 4.3.4 there
are some Warnings that impose modification to code-base in order to get
a working configuration...
(a not so painless up-grade :) )

however the simple code

[short script descripting]
?php
ob_start(ob_gzhandler);
..
.
.
ob_end_flush();
?
still doesn't send a compressed stream...

hoping to be the more clear that i can

greetings from italy


Previous Comments:


[2003-12-15 06:07:45] sabio71 at hotmail dot com

a more clear explanation



[2003-12-13 13:59:24] [EMAIL PROTECTED]

What makes you think ob_gzhandler is not working? Are you certain your
browser supports zlib encoding?



[2003-12-13 04:48:03] sabio71 at hotmail dot com

Description:


[configure line]
./configure --with-mysql --with-apache=../apache_1.3.29

[changes to php.ini]
for legacy reasons: register_globals = On

simply put, it seems it doesn't compress ...

i strongly believe is my fault, but i'm not able to figure why

i've tried also with output_handler = ob_gzhandler but nothing

Reproduce code:
---
[short script descripting]
?php
ob_start(ob_gzhandler);
..
.
.
ob_end_flush();
?






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


#26631 [NEW]: mssql_fetch_array() doesn't support the second parameter

2003-12-15 Thread andrzejk at navopgd dot pl
From: andrzejk at navopgd dot pl
Operating system: Mandrake 9.2
PHP version:  4.3.3
PHP Bug Type: MSSQL related
Bug description:  mssql_fetch_array() doesn't support the second parameter

Description:

I'm repeatedly getting this warning:
Wrong parameter count for mssql_fetch_array() in
/home/www/name_has_been_mangled.php on line 210
This line contains:
while($row = mssql_fetch_array($result,MSSQL_ASSOC))


Expected result:

No warning.


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


#25958 [Com]: odbc_connect fails to login to remote Dbase 5

2003-12-15 Thread boa at weboa dot org
 ID:   25958
 Comment by:   boa at weboa dot org
 Reported By:  brian dot garvis at mascommsys dot com
 Status:   Bogus
 Bug Type: ODBC related
 Operating System: Windows 2003 Server
 PHP Version:  4.3.2
 New Comment:

The same error appear on:
Windows XP Professionnal v2002 SP-1
Apache 1.3.24
PHP 4.3.3
Width odbc (dbase IV, access 32bits for AS400) on remote database
file.

And the sql.log stayed void.

Test with the same files under a local directory and all work
perfectly.


Previous Comments:


[2003-11-02 11:18:10] [EMAIL PROTECTED]

I should add that this is provided you are using IIS, I 
am unsure if Apache would get the same results.



[2003-11-02 11:10:13] [EMAIL PROTECTED]

Not a PHP bug, please leave marked as bogus.  From the 
Microsoft documentation area:

STATUS
 This behavior is by design.  



 For example, if the client machine has a mapped drive 
to the database (M:\DataFolder\Database.mdb), it works 
fine at design-time.  However, when viewed in the 
browser, the Web server processes the code based on the 
information given.  The Web server checks its M: drive, 
which more than likely does not have a valid path to 
the database.  





[2003-11-02 07:42:40] brian dot garvis at mascommsys dot com

I have had 5 others try and make this work now.  No one can get php to
work with a DSN when the drive is mapped.  I have searched everything
online that I could find and it seems that no one has been successful. 
I guess that everyone out there is configuring theirs wrong as well. 
Please show me one example or person that has gotten this to work?



[2003-11-01 10:37:04] [EMAIL PROTECTED]

If the SQL.log is blank, it is not finding the driver 
requested.  That would indicate an ODBC configuration 
error on the local machine, not a PHP error.  That 
explination fits with your initial error.



[2003-10-31 17:40:36] brian dot garvis at mascommsys dot com

I can give you the trace, but it is a zero byte file.  ODBC does not
see any errors.  The trace only produces a file on error.



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/25958

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


#26627 [Opn-Bgs]: I get source of php files instead of supposed output on random basis

2003-12-15 Thread alan_k
 ID:   26627
 Updated by:   [EMAIL PROTECTED]
 Reported By:  info at gli dot ch
-Status:   Open
+Status:   Bogus
 Bug Type: Apache2 related
 Operating System: Linux 2.4.20
 PHP Version:  4.3.4
 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.

please read the support page and post a question to pear-general first.


Previous Comments:


[2003-12-15 04:42:17] info at gli dot ch

Description:


Randomly the php-source is displayed instead of the output
(http://www.engstringen.ch/).
This was the case when having installed apache 1.3 und php 4.1.

After ugrading to apache 2 and php 4.3.4 the bug still occurs. But the
browser shows now a file download dialog box for downloading the php
-script instead of having executed it !!!
The header of the response contains the php - mime type configured
application/x-httpd-php.

The apache config contains
AddType application/x-httpd-php .php .php4 .php3 .phtml
AddType application/x-httpd-php-source .phps
Include conf/confixx_vhost.conf

The confixx_vhost.conf contains lots of virtual host configured on a
named vhost basis.


php is minimally configured with
 './configure' '--with-mysql' '--with-apxs'






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


#26627 [Bgs]: I get source of php files instead of supposed output on random basis

2003-12-15 Thread info at gli dot ch
 ID:   26627
 User updated by:  info at gli dot ch
 Reported By:  info at gli dot ch
 Status:   Bogus
 Bug Type: Apache2 related
 Operating System: Linux 2.4.20
 PHP Version:  4.3.4
 New Comment:

Well, I just want to be clear that that that php module doesn't decline
the request for any reason. This could lead to this result.
The Error_log doesnt' give any information about this.


Previous Comments:


[2003-12-15 07:23:36] [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.

please read the support page and post a question to pear-general first.



[2003-12-15 04:42:17] info at gli dot ch

Description:


Randomly the php-source is displayed instead of the output
(http://www.engstringen.ch/).
This was the case when having installed apache 1.3 und php 4.1.

After ugrading to apache 2 and php 4.3.4 the bug still occurs. But the
browser shows now a file download dialog box for downloading the php
-script instead of having executed it !!!
The header of the response contains the php - mime type configured
application/x-httpd-php.

The apache config contains
AddType application/x-httpd-php .php .php4 .php3 .phtml
AddType application/x-httpd-php-source .phps
Include conf/confixx_vhost.conf

The confixx_vhost.conf contains lots of virtual host configured on a
named vhost basis.


php is minimally configured with
 './configure' '--with-mysql' '--with-apxs'






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


#24773 [Csd-Opn]: Specific use of unset() (mistaking integer for array) crashes PHP

2003-12-15 Thread sniper
 ID:   24773
 Updated by:   [EMAIL PROTECTED]
 Reported By:  info at tphnet dot com
-Status:   Closed
+Status:   Open
 Bug Type: Scripting Engine problem
 Operating System: *
-PHP Version:  4CVS, 5CVS
+PHP Version:  4CVS
 New Comment:

Fixed in HEAD, not in PHP_4_3 branch.



Previous Comments:


[2003-12-03 14:44:44] [EMAIL PROTECTED]

This bug has been fixed in CVS.

In case this was a PHP problem, 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/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.





[2003-07-23 13:55:13] [EMAIL PROTECTED]

Here is the sample script that causes the crash:
?php
$array = '1';
unset($array[1][2][3]);
?



[2003-07-23 13:49:07] info at tphnet dot com

Description:

When trying to unset() a multidimensional array which actually is an
integer, PHP will crash. Windows signals the program has generated a
fatal error and will be shutdown.

I had an array which looked something like this: $array[1][2][3] =
'value' and I used unset($array[1][2][3]) to clear the value of this
element of my array.
At some point in my script I accidently replaced the value of $array
with a simple integer (e.g. $array = 'value'), so $array wasn't an
array anymore.
If i then tried to unset($array[1][2][3]), PHP would crash (after a few
seconds of running @ 100% cpu). I know the code is faulty, I don't
think it should be able to crash PHP...

I'm using Apache 2.0.45 with PHP as a module, but the crash also
occours when using the client version (php-cli.php on windows) from the
command prompt.

Note: The crash only occours when using multidimensional arrays.

Reproduce code:
---
?

$array = 'test';

unset($array[lvl1][lvl2][b]);

?

Expected result:

When Using Apache:
Windows signals apache has generated a fatal error and will be closed.
Apache automatically restarts and resumes loading the webpage, thus
crashing again and getting stuck in an endless crashing loop (until you
close the browser).
When Using PHP CLI:
Windows signals PHP has generated a fatal error and will be closed,
script execution is terminated and you are returned to the command
prompt.

Actual result:
--
AppName: php.exe
AppVer: 4.3.2.2
ModName: php4ts.dll
ModVer: 4.3.2.2
Offset: 000cf358

I've also saved the log windows generated when the crash occoured. It's
kinda long (in XML) and I don't know which (if any) part you require,
so let me know if you need.





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


#24773 [Opn-Ver]: Specific use of unset() (mistaking integer for array) crashes PHP

2003-12-15 Thread sniper
 ID:   24773
 Updated by:   [EMAIL PROTECTED]
 Reported By:  info at tphnet dot com
-Status:   Open
+Status:   Verified
 Bug Type: Scripting Engine problem
 Operating System: *
 PHP Version:  4CVS
 New Comment:

Fixed in HEAD, not in PHP_4_3 branch.



Previous Comments:


[2003-12-15 08:37:51] [EMAIL PROTECTED]

Fixed in HEAD, not in PHP_4_3 branch.




[2003-12-03 14:44:44] [EMAIL PROTECTED]

This bug has been fixed in CVS.

In case this was a PHP problem, 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/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.





[2003-07-23 13:55:13] [EMAIL PROTECTED]

Here is the sample script that causes the crash:
?php
$array = '1';
unset($array[1][2][3]);
?



[2003-07-23 13:49:07] info at tphnet dot com

Description:

When trying to unset() a multidimensional array which actually is an
integer, PHP will crash. Windows signals the program has generated a
fatal error and will be shutdown.

I had an array which looked something like this: $array[1][2][3] =
'value' and I used unset($array[1][2][3]) to clear the value of this
element of my array.
At some point in my script I accidently replaced the value of $array
with a simple integer (e.g. $array = 'value'), so $array wasn't an
array anymore.
If i then tried to unset($array[1][2][3]), PHP would crash (after a few
seconds of running @ 100% cpu). I know the code is faulty, I don't
think it should be able to crash PHP...

I'm using Apache 2.0.45 with PHP as a module, but the crash also
occours when using the client version (php-cli.php on windows) from the
command prompt.

Note: The crash only occours when using multidimensional arrays.

Reproduce code:
---
?

$array = 'test';

unset($array[lvl1][lvl2][b]);

?

Expected result:

When Using Apache:
Windows signals apache has generated a fatal error and will be closed.
Apache automatically restarts and resumes loading the webpage, thus
crashing again and getting stuck in an endless crashing loop (until you
close the browser).
When Using PHP CLI:
Windows signals PHP has generated a fatal error and will be closed,
script execution is terminated and you are returned to the command
prompt.

Actual result:
--
AppName: php.exe
AppVer: 4.3.2.2
ModName: php4ts.dll
ModVer: 4.3.2.2
Offset: 000cf358

I've also saved the log windows generated when the crash occoured. It's
kinda long (in XML) and I don't know which (if any) part you require,
so let me know if you need.





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


#26618 [Fbk-Opn]: include_once() sometimes works, sometimes doesn't with each page refresh

2003-12-15 Thread t dot steve at ariadne-quatra dot com
 ID:   26618
 User updated by:  t dot steve at ariadne-quatra dot com
 Reported By:  t dot steve at ariadne-quatra dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Zend Engine 2 problem
 Operating System: Windows 2000 server SP4
 PHP Version:  5.0.0b2 (beta2)
 New Comment:

The same :( - includes are done eratically.

A note here: this is also the case if I start to wander around the site
(as opposed to just refreshing the same page again and again), i.e. as
the various pages are loaded, sometimes the inlude is done, sometimes
it is not.


Previous Comments:


[2003-12-14 20:21:56] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2003-12-14 10:46:58] t dot steve at ariadne-quatra dot com

Description:

PHP5 beta2
IIS5
Windows 2000 SP4
ISAPI mode

- Worked correctly with PHP4.3.4 with Zend 2.0.1

- With PHP5 beta2 (also ISAPI mode) a simple PHP page which uses
include_once([local path]) to include the menu part of a web page
sometimes works, sometimes does not (sometimes the menu is included,
sometimes it is not). (There is only the single include_once in the
code, so this is NOT an issue of my trying to include something twice
with include_ONCE... )

- The page contains NO other PHP code, just the lines below:
% include_once(c:/wwwroot/domain.com/english/inc/header.inc); %

(html_head.inc is the file to be included, it contains only html code,
no php)

- Again, note that the exact same page, exact same setup works fine
under 4.3.4 - and has done so with previous versions!

- Under PHP5, with every refresh of the page the inclusion of the file
is erratic - every few refreshes the inclusion is not done.

If you need any part of my php.ini, let me know please.

Thanks,
Steve

Reproduce code:
---
html
head
titleThe world of services/title
/head
body

% include_once(c:/wwwroot/domain.com/english/inc/header.inc); %

Please select from the menu on the left!

/body
/html

Expected result:

A page with the menu on the left (created fromt he included file), plus
the contents.

Actual result:
--
Only the contents apperas, the inclusion is not done.





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


#25123 [Opn-Fbk]: ocierror() returns always ORA-24315 illegal attribute type

2003-12-15 Thread sniper
 ID:   25123
 Updated by:   [EMAIL PROTECTED]
 Reported By:  karel dot miarka at issa dot cz
-Status:   Open
+Status:   Feedback
 Bug Type: OCI8 related
 Operating System: Windows 2000
-PHP Version:  4.3.3RC5-dev, 5.0.0b2-dev
+PHP Version:  4.3.3
 New Comment:

Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip




Previous Comments:


[2003-09-22 03:47:14] cjbj at hotmail dot com

Does not reproduce for me with PHP 4.3.3 on W2K using Oracle 9.2.0.1.

Re SET AUTOTRACE, this is SQL*Plus specific and produces a simple
tuning report

I discovered PHP's OCI8 internal debug output can be enabled by calling
ociinternaldebug(1).  Maybe this will help
the filer?



[2003-08-29 09:13:59] karel dot miarka at issa dot cz

I use Apache/1.3.24 for Windows 95/NT, and Oracle8 Release 8.0.5.0.0 -
Production on Linux, but it behaves the same also under Oracle 8.1 for
Windows.

Autotrace seems to be SQL*plus feature only and in addition it seems to
be off by default.

The ocierror() behaves fine under PHP 4.2 on Windows. 
And there is no problem with ocierror() on Linux with PHP 4.3.3 .

I have reported this bug on PHP 4.3.x and someone else has changed
this my line to 4.3.3RC5-dev, 5.0.0b2-dev so I guess this unknown
person is a PHP-OCI8 developer who reproduced this error with those PHP
version.



[2003-08-29 08:44:48] guenter_doge at web dot de

Could not reproduce this with PHP 4.3.3  IIS 5.0  win 2k  Oracle
8.1.7

One guess: Disable tracing in Oracle (Set Autotrace Off) and try
again.



[2003-08-18 00:58:09] karel dot miarka at issa dot cz

Description:

ocierror() function:
1) returns ORA-24315 illegal attribute type
 after any error. For example ociexcute() prints the valid error in
notice, but calling ocierror returns always ORA-24315 illegal attribute
type:

Warning: OCIStmtExecute: ORA-00942: table or view does not exist in
c:\www\ocierror_bug.php on line 20

ocierror($stmt): Array ( [code] = 24315 [message] = ORA-24315:
illegal attribute type [offset] = 17 [sqltext] = ) 1
 
2) doesn't return the sqltext item in the error array

The bug is in all PHP 4.3.x Windows versions.

3) invalid error offset returned

Reproduce code:
---
?php

  echo 'h1PHP ocierror() bug/h1';

  $conn = ocilogon('user', 'passwd', 'host');

  // execute error BEGIN
  $stmt = ociparse($conn, SELECT xyz12345 FROM no_table123);
  ociexecute($stmt);
echo 'ocierror($stmt): ', print_r(ocierror($stmt)), 'br /';
  ocifreestatement($stmt);
  // execute error END

  ocilogoff($conn);

?

Expected result:

Warning: OCIStmtExecute: ORA-00942: table or view does not exist in
c:\www\ocierror_bug.php on line 20

ocierror($stmt): Array ( [code] = 942 [message] = ORA-00942: table or
view does not exist [offset] = 22 [sqltext] = SELECT xyz12345 FROM
no_table123) 1

Actual result:
--
Warning: OCIStmtExecute: ORA-00942: table or view does not exist in
c:\www\ocierror_bug.php on line 20

ocierror($stmt): Array ( [code] = 24315 [message] = ORA-24315:
illegal attribute type [offset] = 17 [sqltext] = ) 1





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


#26631 [Opn-Bgs]: mssql_fetch_array() doesn't support the second parameter

2003-12-15 Thread sniper
 ID:   26631
 Updated by:   [EMAIL PROTECTED]
 Reported By:  andrzejk at navopgd dot pl
-Status:   Open
+Status:   Bogus
 Bug Type: MSSQL related
 Operating System: Mandrake 9.2
 PHP Version:  4.3.3
 New Comment:

You're propably using sybase (which has these aliases for some reason),
and it only expects one parameter for this function.

No bug here.



Previous Comments:


[2003-12-15 06:27:44] andrzejk at navopgd dot pl

Description:

I'm repeatedly getting this warning:
Wrong parameter count for mssql_fetch_array() in
/home/www/name_has_been_mangled.php on line 210
This line contains:
while($row = mssql_fetch_array($result,MSSQL_ASSOC))


Expected result:

No warning.






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


#26629 [Opn-Fbk]: Inconsistent handle of \n in highlight_string and highlight_file

2003-12-15 Thread sniper
 ID:  26629
 Updated by:  [EMAIL PROTECTED]
 Reported By: [EMAIL PROTECTED]
-Status:  Open
+Status:  Feedback
 Bug Type:Strings related
 PHP Version: 4.3.3
 New Comment:

Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to Open.

Thank you for your interest in PHP.


And is this with PHP 5 or 4 ??? You're referring to ZendEngine 2 but
the version in this report is 4.3.3 

(I would expect that people who have @php.net address should know HOW
to report bugs..)



Previous Comments:


[2003-12-15 05:57:24] [EMAIL PROTECTED]

Description:

highlight.keyword isn't used in strings without variables for \n and
similar. It is used in strings with variables (e.g. $a\n).

(The problem is in file /ZendEngine2/zend_highlight.c.)

Reproduce code:
---
highlight_string('?php echo a\n; ?');


Expected result:

codefont color=#00
font color=#BBlt;?php /fontfont color=#007700echo
/fontfont color=#DDa/fontfont
color=#007700\n/fontfont color=#DD/fontfont
color=#007700; /fontfont color=#BB?gt;/font
/font
/code

Actual result:
--
codefont color=#00
font color=#BBlt;?php /fontfont color=#007700echo
/fontfont color=#DDa\n/fontfont color=#007700;
/fontfont color=#BB?gt;/font
/font
/code





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


#26599 [Fbk-Opn]: segfault in php_session_initialize

2003-12-15 Thread chris at widexs dot nl
 ID:   26599
 User updated by:  chris at widexs dot nl
 Reported By:  chris at widexs dot nl
-Status:   Feedback
+Status:   Open
 Bug Type: Session related
 Operating System: linux 2.4.23
 PHP Version:  4CVS-2003-12-12 (stable)
 New Comment:

This seems to solve the problem.
But, this means, that i cannot use threaded MPM.. ?

Thx for the quick response.


Previous Comments:


[2003-12-14 20:49:02] [EMAIL PROTECTED]

Can you please try compiling Apache2 with the non-threaded MPM.
(prefork) 
Also grab the latest stable PHP snapshot.





[2003-12-12 07:27:01] chris at widexs dot nl

[PHP]

safe_mode   =   On
safe_mode_exec_dir  =   .
safe_mode_include_dir   =   /usr/local/lib/php
upload_tmp_dir  =   /var/spool/php
session.save_path   =   /var/spool/php
asp_tags=   On
register_globals=   On
upload_max_filesize =   26214400
post_max_size   =   26214400
magic_quotes_gpc=   Off

max_execution_time  = 60; Maximum execution time of
each script, in seconds
memory_limit= 26214400  ; Maximum amount of memory a
script may consume (25MB)



[2003-12-12 07:20:26] [EMAIL PROTECTED]

Can you put your php.ini online (with all the commented out lines
removed please). I think it has to do with a wrong setting of the
session module.



[2003-12-12 07:15:20] chris at widexs dot nl

ZendOptimizer commented out in php.ini.
I get the next segfault:

#0  0x404ed36c in php_session_initialize (tsrm_ls=0x853e130) at
/root/apache2.new/php4-STABLE-200312120830/ext/session/session.c:598
598 if (PS(mod)-s_open(PS(mod_data), PS(save_path),
PS(session_name) TSRMLS_CC) == FAILURE) {
(gdb) bt
#0  0x404ed36c in php_session_initialize (tsrm_ls=0x853e130) at
/root/apache2.new/php4-STABLE-200312120830/ext/session/session.c:598
#1  0x404eeb6b in php_session_start (tsrm_ls=0x853e130) at
/root/apache2.new/php4-STABLE-200312120830/ext/session/session.c:1047
#2  0x404f07b5 in zif_session_start (ht=0, return_value=0x8e2a944,
this_ptr=0x0, return_value_used=0, tsrm_ls=0x85e5e78)
at
/root/apache2.new/php4-STABLE-200312120830/ext/session/session.c:1486
#3  0x405adb8f in execute (op_array=0x8dca804, tsrm_ls=0x853e130) at
/root/apache2.new/php4-STABLE-200312120830/Zend/zend_execute.c:1616
#4  0x4059e1fd in zend_execute_scripts (type=8, tsrm_ls=0x853e130,
retval=0x0, file_count=3) at
/root/apache2.new/php4-STABLE-200312120830/Zend/zend.c:884
#5  0x4056bd76 in php_execute_script (primary_file=0xbefff89c,
tsrm_ls=0x853e130) at
/root/apache2.new/php4-STABLE-200312120830/main/main.c:1729
#6  0x405b3472 in php_handler (r=0x8a57d18) at
/root/apache2.new/php4-STABLE-200312120830/sapi/apache2handler/sapi_apache2.c:537
#7  0x080ac3d5 in ap_run_handler (r=0x8a57d18) at config.c:195
#8  0x080ac9ef in ap_invoke_handler (r=0x8a57d18) at config.c:401
#9  0x0808b236 in ap_process_request (r=0x8a57d18) at
http_request.c:288
#10 0x0808681c in ap_process_http_connection (c=0x8a551d0) at
http_core.c:293
#11 0x080b7515 in ap_run_process_connection (c=0x8a551d0) at
connection.c:85
#12 0x080a8a8c in process_socket (p=0x8a550a8, sock=0x8a550e0,
my_child_num=29, my_thread_num=139732752, bucket_alloc=0x85e5e78) at
worker.c:632
#13 0x080a921a in worker_thread (thd=0x85e5e78, dummy=0x85e5e78) at
worker.c:946
#14 0x401ceda6 in dummy_worker (opaque=0x85e5e78) at thread.c:127
#15 0x4025bda0 in pthread_start_thread (arg=0xbefffbe0) at
manager.c:300
#16 0x40387447 in __clone () from /lib/libc.so.6



[2003-12-12 05:56:01] [EMAIL PROTECTED]

Please try without ZendOptimizer.

Derick



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/26599

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


#26599 [Opn]: segfault in php_session_initialize

2003-12-15 Thread chris at widexs dot nl
 ID:   26599
 User updated by:  chris at widexs dot nl
 Reported By:  chris at widexs dot nl
 Status:   Open
 Bug Type: Session related
 Operating System: linux 2.4.23
 PHP Version:  4CVS-2003-12-12 (stable)
 New Comment:

This seems to solve the problem.
But, this means, that i cannot use threaded MPM.. ?

Thx for the quick response.


Previous Comments:


[2003-12-15 09:17:12] chris at widexs dot nl

This seems to solve the problem.
But, this means, that i cannot use threaded MPM.. ?

Thx for the quick response.



[2003-12-14 20:49:02] [EMAIL PROTECTED]

Can you please try compiling Apache2 with the non-threaded MPM.
(prefork) 
Also grab the latest stable PHP snapshot.





[2003-12-12 07:27:01] chris at widexs dot nl

[PHP]

safe_mode   =   On
safe_mode_exec_dir  =   .
safe_mode_include_dir   =   /usr/local/lib/php
upload_tmp_dir  =   /var/spool/php
session.save_path   =   /var/spool/php
asp_tags=   On
register_globals=   On
upload_max_filesize =   26214400
post_max_size   =   26214400
magic_quotes_gpc=   Off

max_execution_time  = 60; Maximum execution time of
each script, in seconds
memory_limit= 26214400  ; Maximum amount of memory a
script may consume (25MB)



[2003-12-12 07:20:26] [EMAIL PROTECTED]

Can you put your php.ini online (with all the commented out lines
removed please). I think it has to do with a wrong setting of the
session module.



[2003-12-12 07:15:20] chris at widexs dot nl

ZendOptimizer commented out in php.ini.
I get the next segfault:

#0  0x404ed36c in php_session_initialize (tsrm_ls=0x853e130) at
/root/apache2.new/php4-STABLE-200312120830/ext/session/session.c:598
598 if (PS(mod)-s_open(PS(mod_data), PS(save_path),
PS(session_name) TSRMLS_CC) == FAILURE) {
(gdb) bt
#0  0x404ed36c in php_session_initialize (tsrm_ls=0x853e130) at
/root/apache2.new/php4-STABLE-200312120830/ext/session/session.c:598
#1  0x404eeb6b in php_session_start (tsrm_ls=0x853e130) at
/root/apache2.new/php4-STABLE-200312120830/ext/session/session.c:1047
#2  0x404f07b5 in zif_session_start (ht=0, return_value=0x8e2a944,
this_ptr=0x0, return_value_used=0, tsrm_ls=0x85e5e78)
at
/root/apache2.new/php4-STABLE-200312120830/ext/session/session.c:1486
#3  0x405adb8f in execute (op_array=0x8dca804, tsrm_ls=0x853e130) at
/root/apache2.new/php4-STABLE-200312120830/Zend/zend_execute.c:1616
#4  0x4059e1fd in zend_execute_scripts (type=8, tsrm_ls=0x853e130,
retval=0x0, file_count=3) at
/root/apache2.new/php4-STABLE-200312120830/Zend/zend.c:884
#5  0x4056bd76 in php_execute_script (primary_file=0xbefff89c,
tsrm_ls=0x853e130) at
/root/apache2.new/php4-STABLE-200312120830/main/main.c:1729
#6  0x405b3472 in php_handler (r=0x8a57d18) at
/root/apache2.new/php4-STABLE-200312120830/sapi/apache2handler/sapi_apache2.c:537
#7  0x080ac3d5 in ap_run_handler (r=0x8a57d18) at config.c:195
#8  0x080ac9ef in ap_invoke_handler (r=0x8a57d18) at config.c:401
#9  0x0808b236 in ap_process_request (r=0x8a57d18) at
http_request.c:288
#10 0x0808681c in ap_process_http_connection (c=0x8a551d0) at
http_core.c:293
#11 0x080b7515 in ap_run_process_connection (c=0x8a551d0) at
connection.c:85
#12 0x080a8a8c in process_socket (p=0x8a550a8, sock=0x8a550e0,
my_child_num=29, my_thread_num=139732752, bucket_alloc=0x85e5e78) at
worker.c:632
#13 0x080a921a in worker_thread (thd=0x85e5e78, dummy=0x85e5e78) at
worker.c:946
#14 0x401ceda6 in dummy_worker (opaque=0x85e5e78) at thread.c:127
#15 0x4025bda0 in pthread_start_thread (arg=0xbefffbe0) at
manager.c:300
#16 0x40387447 in __clone () from /lib/libc.so.6



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/26599

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


#26630 [Opn-Csd]: Crashes whenerver class_exists is called in __autoload

2003-12-15 Thread sniper
 ID:   26630
 Updated by:   [EMAIL PROTECTED]
 Reported By:  rohit_lodha at yahoo dot com
-Status:   Open
+Status:   Closed
 Bug Type: Reproducible crash
 Operating System: Windows 2000 adv server
 PHP Version:  5.0.0b2 (beta2)
 New Comment:

Does not crash with latest CVS.



Previous Comments:


[2003-12-15 06:06:31] rohit_lodha at yahoo dot com

Description:

crashes when following code is executed

Reproduce code:
---
function __autoload($className) {
if(!class_exists($classname)){
   ClassLoader::loadClass($className);
   }
}

Actual result:
--
CGI Error
The specified CGI application misbehaved by not returning a complete
set of HTTP headers. The headers it did return are:





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


#26625 [Opn-Fbk]: pg_convert sets NULL incorrectly for character data types

2003-12-15 Thread sniper
 ID:   26625
 Updated by:   [EMAIL PROTECTED]
 Reported By:  gregkiyomi at digitaljunkies dot ca
-Status:   Open
+Status:   Feedback
 Bug Type: PostgreSQL related
 Operating System: linux
 PHP Version:  5.0.0b2 (beta2)
 New Comment:

Please try using this CVS snapshot:

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




Previous Comments:


[2003-12-15 03:32:38] gregkiyomi at digitaljunkies dot ca

Description:

When using pg_convert() with PGSQL_CONV_FORCE_NULL option set the
resulting value for character data types (text,char,varchar) is set as
'NULL' instead of NULL.  This therefore inserts the string 'NULL' into
the database instead of the desired NULL value.  This also obviously
doesn't fail a NOT NULL check as it should.

The culprit is ext/pgsql/pgsql.c

*** pgsql.c~Mon Dec 15 00:17:01 2003
--- pgsql.c Mon Dec 15 01:28:56 2003
***
*** 3785,3790 
--- 3785,3791 
if (Z_STRLEN_PP(val) == 0) {
if (opt  PGSQL_CONV_FORCE_NULL) {
ZVAL_STRING(new_val, NULL, 1);
+   break;
}
else {
ZVAL_STRING(new_val, empty_string, 1);

This prevents the NULL value from being passed through
php_pgsql_add_quotes().

This is also present in php 4.3.3.

Reproduce code:
---
$con_str = host=localhost dbname=database user=user password=pass;
$con = pg_connect($con_str);

$data = array(varchar_field1=test,
  varchar_field2=NULL,
  varchar_field3=);

$array = pg_convert($con,test_table,$data,4);
echo(pre);
print_r($array);
echo(/pre);


Expected result:

Array
(
[varchar_field1] = 'test'
[varchar_field2] = NULL
[varchar_field3] = NULL
)


Actual result:
--
Array
(
[varchar_field1] = 'test'
[varchar_field2] = NULL
[varchar_field3] = 'NULL'
)






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


#26618 [Opn-Fbk]: include_once() sometimes works, sometimes doesn't with each page refresh

2003-12-15 Thread sniper
 ID:   26618
 Updated by:   [EMAIL PROTECTED]
 Reported By:  t dot steve at ariadne-quatra dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Zend Engine 2 problem
 Operating System: Windows 2000 server SP4
 PHP Version:  5.0.0b2 (beta2)
 New Comment:

Do you get any errors if you put 'error_reporting(E_ALL);' before the
include_once() line? 

Does this happen if you use include() ?



Previous Comments:


[2003-12-15 08:40:15] t dot steve at ariadne-quatra dot com

The same :( - includes are done eratically.

A note here: this is also the case if I start to wander around the site
(as opposed to just refreshing the same page again and again), i.e. as
the various pages are loaded, sometimes the inlude is done, sometimes
it is not.



[2003-12-14 20:21:56] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2003-12-14 10:46:58] t dot steve at ariadne-quatra dot com

Description:

PHP5 beta2
IIS5
Windows 2000 SP4
ISAPI mode

- Worked correctly with PHP4.3.4 with Zend 2.0.1

- With PHP5 beta2 (also ISAPI mode) a simple PHP page which uses
include_once([local path]) to include the menu part of a web page
sometimes works, sometimes does not (sometimes the menu is included,
sometimes it is not). (There is only the single include_once in the
code, so this is NOT an issue of my trying to include something twice
with include_ONCE... )

- The page contains NO other PHP code, just the lines below:
% include_once(c:/wwwroot/domain.com/english/inc/header.inc); %

(html_head.inc is the file to be included, it contains only html code,
no php)

- Again, note that the exact same page, exact same setup works fine
under 4.3.4 - and has done so with previous versions!

- Under PHP5, with every refresh of the page the inclusion of the file
is erratic - every few refreshes the inclusion is not done.

If you need any part of my php.ini, let me know please.

Thanks,
Steve

Reproduce code:
---
html
head
titleThe world of services/title
/head
body

% include_once(c:/wwwroot/domain.com/english/inc/header.inc); %

Please select from the menu on the left!

/body
/html

Expected result:

A page with the menu on the left (created fromt he included file), plus
the contents.

Actual result:
--
Only the contents apperas, the inclusion is not done.





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


#25123 [Fbk-Opn]: ocierror() returns always ORA-24315 illegal attribute type

2003-12-15 Thread karel dot miarka at issa dot cz
 ID:   25123
 User updated by:  karel dot miarka at issa dot cz
 Reported By:  karel dot miarka at issa dot cz
-Status:   Feedback
+Status:   Open
 Bug Type: OCI8 related
 Operating System: Windows 2000
-PHP Version:  4.3.3
+PHP Version:  4.x including 4.3.5-dev
 New Comment:

Still invalid behaviour with PHP 4.3.5-dev on w2k. :-(


Previous Comments:


[2003-12-15 08:40:50] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip





[2003-09-22 03:47:14] cjbj at hotmail dot com

Does not reproduce for me with PHP 4.3.3 on W2K using Oracle 9.2.0.1.

Re SET AUTOTRACE, this is SQL*Plus specific and produces a simple
tuning report

I discovered PHP's OCI8 internal debug output can be enabled by calling
ociinternaldebug(1).  Maybe this will help
the filer?



[2003-08-29 09:13:59] karel dot miarka at issa dot cz

I use Apache/1.3.24 for Windows 95/NT, and Oracle8 Release 8.0.5.0.0 -
Production on Linux, but it behaves the same also under Oracle 8.1 for
Windows.

Autotrace seems to be SQL*plus feature only and in addition it seems to
be off by default.

The ocierror() behaves fine under PHP 4.2 on Windows. 
And there is no problem with ocierror() on Linux with PHP 4.3.3 .

I have reported this bug on PHP 4.3.x and someone else has changed
this my line to 4.3.3RC5-dev, 5.0.0b2-dev so I guess this unknown
person is a PHP-OCI8 developer who reproduced this error with those PHP
version.



[2003-08-29 08:44:48] guenter_doge at web dot de

Could not reproduce this with PHP 4.3.3  IIS 5.0  win 2k  Oracle
8.1.7

One guess: Disable tracing in Oracle (Set Autotrace Off) and try
again.



[2003-08-18 00:58:09] karel dot miarka at issa dot cz

Description:

ocierror() function:
1) returns ORA-24315 illegal attribute type
 after any error. For example ociexcute() prints the valid error in
notice, but calling ocierror returns always ORA-24315 illegal attribute
type:

Warning: OCIStmtExecute: ORA-00942: table or view does not exist in
c:\www\ocierror_bug.php on line 20

ocierror($stmt): Array ( [code] = 24315 [message] = ORA-24315:
illegal attribute type [offset] = 17 [sqltext] = ) 1
 
2) doesn't return the sqltext item in the error array

The bug is in all PHP 4.3.x Windows versions.

3) invalid error offset returned

Reproduce code:
---
?php

  echo 'h1PHP ocierror() bug/h1';

  $conn = ocilogon('user', 'passwd', 'host');

  // execute error BEGIN
  $stmt = ociparse($conn, SELECT xyz12345 FROM no_table123);
  ociexecute($stmt);
echo 'ocierror($stmt): ', print_r(ocierror($stmt)), 'br /';
  ocifreestatement($stmt);
  // execute error END

  ocilogoff($conn);

?

Expected result:

Warning: OCIStmtExecute: ORA-00942: table or view does not exist in
c:\www\ocierror_bug.php on line 20

ocierror($stmt): Array ( [code] = 942 [message] = ORA-00942: table or
view does not exist [offset] = 22 [sqltext] = SELECT xyz12345 FROM
no_table123) 1

Actual result:
--
Warning: OCIStmtExecute: ORA-00942: table or view does not exist in
c:\www\ocierror_bug.php on line 20

ocierror($stmt): Array ( [code] = 24315 [message] = ORA-24315:
illegal attribute type [offset] = 17 [sqltext] = ) 1





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


#25123 [Opn]: ocierror() returns always ORA-24315 illegal attribute type

2003-12-15 Thread karel dot miarka at issa dot cz
 ID:   25123
 User updated by:  karel dot miarka at issa dot cz
 Reported By:  karel dot miarka at issa dot cz
 Status:   Open
 Bug Type: OCI8 related
 Operating System: Windows 2000
-PHP Version:  4.x including 4.3.5-dev
+PHP Version:  4.3.x including 4.3.5-dev
 New Comment:

Our Oracle server version is 8.0.5.0.0 , so maybe that's the problem,
but it was working fine with older versions of php.


Previous Comments:


[2003-12-15 09:33:37] karel dot miarka at issa dot cz

Still invalid behaviour with PHP 4.3.5-dev on w2k. :-(



[2003-12-15 08:40:50] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip





[2003-09-22 03:47:14] cjbj at hotmail dot com

Does not reproduce for me with PHP 4.3.3 on W2K using Oracle 9.2.0.1.

Re SET AUTOTRACE, this is SQL*Plus specific and produces a simple
tuning report

I discovered PHP's OCI8 internal debug output can be enabled by calling
ociinternaldebug(1).  Maybe this will help
the filer?



[2003-08-29 09:13:59] karel dot miarka at issa dot cz

I use Apache/1.3.24 for Windows 95/NT, and Oracle8 Release 8.0.5.0.0 -
Production on Linux, but it behaves the same also under Oracle 8.1 for
Windows.

Autotrace seems to be SQL*plus feature only and in addition it seems to
be off by default.

The ocierror() behaves fine under PHP 4.2 on Windows. 
And there is no problem with ocierror() on Linux with PHP 4.3.3 .

I have reported this bug on PHP 4.3.x and someone else has changed
this my line to 4.3.3RC5-dev, 5.0.0b2-dev so I guess this unknown
person is a PHP-OCI8 developer who reproduced this error with those PHP
version.



[2003-08-29 08:44:48] guenter_doge at web dot de

Could not reproduce this with PHP 4.3.3  IIS 5.0  win 2k  Oracle
8.1.7

One guess: Disable tracing in Oracle (Set Autotrace Off) and try
again.



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/25123

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


#26598 [Opn-Fbk]: Segmentation fault

2003-12-15 Thread sniper
 ID:   26598
 Updated by:   [EMAIL PROTECTED]
 Reported By:  robert at interjinn dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Zend Engine 2 problem
 Operating System: Mandrake 9.0
 PHP Version:  5CVS-2003-12-12 (dev)
 New Comment:

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with ?php and ends with ?,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc.

If possible, make the script source available online and provide
an URL to it here. Try avoid embedding huge scripts into the report.




Previous Comments:


[2003-12-14 21:17:36] robert at interjinn dot com

I compiled and ran the latest CVS snapshot with the minimal compile
options indicated in a recent post with the same results. Engine still
segfaults at the same line of code. On the flip side, I also tried the
binary on the script I wanted to make available that illustrates the
problem, and it now works (so the bug previously mentioned as bFatal
error/b:  Only variables or references can be returned by
reference in
b/home/suds/yackspit/interJinn-0.9.1/Core/libraries/templateJinn/templ
ateManager.inc/b on line b17/bbr / is now fixed.) 

So to test you can download the following link:

http://www.interjinn.com/download/interJinn-0.9.1-php5mods.tar.gz

then switch into the created directory (interJinn-0.9.1-php5mods) and
type:

$ /usr/bin/wherever/phpbinary -qC makeInterJinnSite.php

The segfault should occur immediately after a bunch of deprecation
warnings.

HTH,
Rob.



[2003-12-14 20:23:25] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2003-12-12 18:10:28] robert at interjinn dot com

I hav recompiled with minimal extensions compiled in, namely:

./configure \
--disable-all \
--with-pcre-regex \
--prefix=/usr/local/php/${PHP_VERSION_DIR}/installation \
--exec-prefix=/usr/local/php/${PHP_VERSION_DIR}/installation

And I still have a no go. I spent the last 3 hours trying to produce a
short script which would illustrate the bug and running the PHP binary
through GDB and Valgrind to no avail. What I do know is that at:

zend_do_declare_property
(/usr/local/php/php5-200312120830/Zend/zend_compile.c:2442)

CG(active_class_entry) evaluates to null and so
CG(active_class_entry)-ce_flags causes a NULL pointer fault. I tried
patching with a test for NULL, but then I got a crash in
zend_hash_find() where the memory for the hash appeared to be corrupted
- Valgrind was not useful in determining where the memory may have
become corrupt.

I was going to set up a link to an InterJinn download, but while I was
testing to make sure it ran, I got the following error (possibly
related to this bug):

bFatal error/b:  Only variables or references can be returned by
reference in
b/home/suds/yackspit/interJinn-0.9.1/Core/libraries/templateJinn/templateManager.inc/b
on line b17/bbr /

For which the actual line of code is:

var $filename = __FILE__;

which is in a class. If it is also helpful I get a LOT of deprecated
warnings for:

bStrict Standards/b:  var: Deprecated. Please use the
public/private/protected modifiers.

The reason I think maybe the above is related is because in the
backtrace of the original report, and more recent ones with minimal
extensions, the zend_do_declare_property() function is attmepting to
work with a property called filename.



[2003-12-12 06:49:03] [EMAIL PROTECTED]

Don't forget to remove the non-standard exts from your PHP config
either.



[2003-12-12 05:17:46] robert at interjinn dot com

Description:

No idea why script crashes. I'm including my compile information and
the backtrace.

export PHP_VERSION_DIR=php5-200312120830
make clean
rm config.cache
./configure \
--disable-all \
--with-mysql \
--enable-carnagemath \
--enable-carnagexml \
--enable-carnageutilities \
--enable-interjinn \
--enable-ctype \
--with-zlib \
--enable-ftp \
--enable-sockets \
--with-ncurses \
--enable-pcntl \
--with-pcre-regex \
--enable-exif \
--with-jpeg-dir=/usr/lib \
--with-png-dir=/usr/lib \
--with-tiff-dir=/usr/lib \
--with-gif-dir=/usr/lib \
--with-gd \
--prefix=/usr/local/php/${PHP_VERSION_DIR}/installation \
--exec-prefix=/usr/local/php/${PHP_VERSION_DIR}/installation
make
make install


#26418 [Opn-Fbk]: loading class files crashes

2003-12-15 Thread sniper
 ID:   26418
 Updated by:   [EMAIL PROTECTED]
 Reported By:  danielc at analysisandsolutions dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Zend Engine 2 problem
 Operating System: Windows 2000
 PHP Version:  5CVS-2003-12-1
 New Comment:

Please try using this CVS snapshot:

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

Can not reproduce..



Previous Comments:


[2003-12-01 13:41:57] danielc at analysisandsolutions dot com

#! c:/progra~1/php/cli/php
?php

/*
 * http://bugs.php.net/bug.php?id=26418
 *
 * Notice the inclusion of PEAR's DB class at the bottom.  Make sure
 * your include_path or the path in the require statement below is
 * correct.
 *
 * The crashes involve a weird combination of factors.  The factors
 * can be rearranged to cause the crashes to vanish.
 *
 * If the parent class' name is 15 characters long, it crashes, but if
 * it's 14 or 16 characters long, it does not.  But the length of the
 * class name isn't _really_ the problem.
 *
 * For example, the length of the method names and the existence of
 * parameters play a role too.  See the comment in the class for more
 * details.
 */


//class A2345678901234 {
class A23456789012345 {
//class A234567890123456 {
}


//class B extends A2345678901234 {
class B extends A23456789012345 {
//class B extends A234567890123456 {
function foo() {}
function goo($Directory) {}

/*
 * Crashes if the next method name is = 21 characters long.
 * But doesn't crash if both methods are uncommented.
 * Similarly, doesn't crash if the parameter, $Directory, is
removed
 * from method goo(), above.
 */
function a2345689012345678901() {}
//function a23456890123456789012() {}

}

require_once('DB.php');

?



[2003-11-26 02:24:47] danielc at analysisandsolutions dot com

Description:

Using the latest snapshot, php5-win32-200311260330.zip, when a script
loads up a bunch of class files, a Dr Watson error dialog appears
saying PHP has crashed.  Note, I'm just including the files, not
creating an object via new.

I've tried to pin this down to some particular lines of code, but have
been unable to find something in particular.

While certain combinations of my class files and PEAR::DB create the
crash, others don't.

This code worked fine until now, so I don't think it's the content.  In
addition, I've tweaked PEAR.php and DB.php so methods that return by
reference are always returning variables.

Below is an excerpt from a dump file as examined by WinDbg:

(5e4.600): Access violation - code c005 (!!! second chance !!!)
eax=00866dfc ebx=00d9ad80 ecx=6e692e67 edx=0063 esi=00d9c5e0
edi=00d9c658
eip=100dcf91 esp=0012fae8 ebp=78001db0 iopl=0 nv up ei pl nz na
pe nc
cs=001b  ss=0023  ds=0023  es=0023  fs=0038  gs=
efl=0202
*** WARNING: Unable to verify checksum for php4ts.dll
*** ERROR: Symbol file could not be found.  Defaulted to export symbols
for php4ts.dll - 
php4ts!zend_ts_hash_rehash+481:
100dcf91 89510c   mov [ecx+0xc],edx
ds:0023:6e692e73=







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


#14968 [Com]: SSL: couldn't create a context

2003-12-15 Thread dlaffitte at hotmail dot com
 ID:   14968
 Comment by:   dlaffitte at hotmail dot com
 Reported By:  morganh at angelfire dot com
 Status:   Closed
 Bug Type: cURL related
 Operating System: freebsd 4.4
 PHP Version:  4.1.1
 New Comment:

Are there any known work arounds?  My ISP does not plan to upgrade PHP
to resolve the issue.

Thanks,

David


Previous Comments:


[2002-01-27 01:10:09] [EMAIL PROTECTED]

problem when you use --with-openssl and --with-curl together, fixed in
CVS.



[2002-01-10 10:31:26] morganh at angelfire dot com

while trying to use curl over https, i get the error SSL: couldn't
create a context!  works fine with http:// websites.  the error and the
code both are at 

http://synergy.xanthusinc.com/~morgan/hello.php

any help would be great




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


#26321 [Opn]: 'ld: warning multiple definitions' problem

2003-12-15 Thread grayw at mail dot montclair dot edu
 ID:   26321
 User updated by:  grayw at mail dot montclair dot edu
 Reported By:  grayw at mail dot montclair dot edu
 Status:   Open
 Bug Type: Compile Failure
 Operating System: Mac OS X 10.3.1
 PHP Version:  5CVS-2003-12-1
 New Comment:

I have the time to put more work into this bug, so if there's anything
I can do (I understand how busy the bugs people are!), please let me
know.  I'll give it another whack with the latest CVS snapshot.

Bill


Previous Comments:


[2003-12-02 10:19:10] grayw at mail dot montclair dot edu

Well, I didn't get past the configure --without-pcre-
regex:
[OUTPUT]
Configuring PEAR
checking whether to install PEAR... yes
configure: error:  
PEAR requires PCRE to be enabled.
Add --with-pcre-regex to the configure line.
[/OUTPUT]

Trying configure --without-pcre-regex and --without-
pear... well it seems the make bonked again (this seems 
to happen right when the final libphp5.so is being 
built):

ld: ext/openssl/openssl.o illegal reference to symbol: 
_SSL_get_privatekey defined in indirectly referenced 
dynamic library /usr/lib/libssl.0.9.7.dylib
ld: warning multiple definitions of symbol _regerror
ext/mbstring/oniguruma/regposerr.o definition of 
_regerror in section (__TEXT,__text)
/Library/Apache2/bin/httpd definition of _regerror
ld: warning multiple definitions of symbol _regcomp
/Library/Apache2/bin/httpd definition of _regcomp
/usr/lib/libm.dylib(regcomp.So) definition of _regcomp
ld: warning multiple definitions of symbol _regexec
/Library/Apache2/bin/httpd definition of _regexec
/usr/lib/libm.dylib(regexec.So) definition of _regexec
ld: warning multiple definitions of symbol _regfree
/Library/Apache2/bin/httpd definition of _regfree
/usr/lib/libm.dylib(regfree.So) definition of _regfree
make: *** [libs/libphp5.bundle] Error 1



[2003-12-02 00:14:22] [EMAIL PROTECTED]

Does the problem go away if you add --without-pcre-regex to your PHP
configure line..? (remember to delete config.cache before reconfigure)




[2003-12-01 12:51:54] grayw at mail dot montclair dot edu

DOH!  sorry about that! Apache configure:
./configure \
--enable-so \
--prefix=/Library/Apache2 \
--enable-cache \
--enable-disk-cache \
--enable-ldap \
--enable-auth-ldap \
--enable-mime-magic \
--enable-expires \
--enable-headers \
--enable-ssl \
--enable-http \
--enable-info \
--enable-cgi \
--enable-vhost-alias \
--enable-rewrite



[2003-12-01 11:59:57] [EMAIL PROTECTED]

What was the configure line used to configure Apache?




[2003-11-19 12:05:03] grayw at mail dot montclair dot edu

Description:

Compiling PHP5.0.0b2 on Mac OS X Panther 10.3.1, make 
fails.  I took a look at similar bugs in php 4 in the 
bug search, but nothing seems to match this well enough 
to provide a workaround.  also tried latest cvs 
snapshot, see below.

Reproduce code:
---
configure:
./configure 
--includedir=/usr/include  
--mandir=/usr/share/man  
--infodir=/usr/share/info  
--with-apxs2=/Library/Apache2/bin/apxs  
--with-openssl  
--with-zlib  
--with-zlib-dir=/usr/lib  
--with-bz2  
--enable-calendar   
--with-libxml-dir=/usr/local  
--with-gd  
--with-ldap  
--enable-mbstring  
--with-mcrypt  
--with-openssl-dir=/usr/include/openssl  
--with-mhash  
--with-mime-magic=/usr/share/file/magic.mime  
--with-mysql=/Library/MySQL  
--with-pgsql=/usr/local/postgres  
--enable-sockets  
--with-xsl=/Library/PHP4 
--prefix=/Library/PHP5 
--with-png-dir=/usr/local
--with-jpeg-dir=/usr/local

configure succeeds,

then plain old 'make'

Expected result:

to run sudo make install afterwards ;)

Actual result:
--
this seems to be the relevant make crash part:
ld: warning multiple definitions of symbol _pcre_free
ext/pcre/pcrelib/pcre.o definition of _pcre_free in 
section (__DATA,__data)
/Library/Apache2/bin/httpd definition of _pcre_free
ld: warning multiple definitions of symbol _pcre_malloc
ext/pcre/pcrelib/pcre.o definition of _pcre_malloc in 
section (__DATA,__data)
/Library/Apache2/bin/httpd definition of _pcre_malloc
ld: warning multiple definitions of symbol _regerror
ext/mbstring/oniguruma/regposerr.o definition of 
_regerror in section (__TEXT,__text)
/Library/Apache2/bin/httpd definition of _regerror
ld: warning multiple definitions of symbol _regcomp
/Library/Apache2/bin/httpd definition of _regcomp
/usr/lib/libm.dylib(regcomp.So) definition of _regcomp
ld: warning multiple definitions of symbol _regexec
/Library/Apache2/bin/httpd definition of _regexec
/usr/lib/libm.dylib(regexec.So) definition of _regexec
ld: warning multiple definitions of symbol 

#21197 [Com]: socket_read() outputs error with PHP_NORMAL_READ

2003-12-15 Thread nunoplopes at sapo dot pt
 ID:   21197
 Comment by:   nunoplopes at sapo dot pt
 Reported By:  bool at boolsite dot net
 Status:   No Feedback
 Bug Type: Sockets related
 Operating System: win32 only
 PHP Version:  4.3.4-dev
 New Comment:

I'm using latest snapshot and I have the same problem. With
PHP_BINARY_READ everything works but with PHP_NORMAL_READ I receive the
following error:

Warning: socket_read() unable to read from socket [0]: The operation
completed s
uccessfully.


Previous Comments:


[2003-12-07 12:01:47] [EMAIL PROTECTED]

No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to Open. Thank you.





[2003-12-01 02:35:08] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip





[2003-08-26 02:00:58] bool at boolsite dot net

Ok, this is a short example : (a little echo server)

?php
error_reporting(E_ALL);

$Port=6669;

if(($Sock=socket_create(AF_INET,SOCK_STREAM,0))=0) {
echo 'socket_create() a échoué :
',socket_strerror(socket_last_error($Sock)),\r\n;
exit;
}
if(($Ret=socket_bind($Sock,0,$Port))=0) {
echo 'socket_bind() a échoué :
',socket_strerror(socket_last_error($Ret)),\r\n;
exit;
}
if(($Ret=socket_listen($Sock,5))=0) {
echo 'socket_listen() a échoué :
',socket_strerror(socket_last_error($Ret)),\r\n;
exit;
}

while(true){
$MsgSock=socket_accept($Sock);
if($MsgSock===false) {
echo 'socket_accept() a échoué :
',socket_strerror(socket_last_error($MsgSock)),\r\n;
break;
}
  else {
echo '= Debut de la connexion...',\r\n;
$EndTime=time()+15;
do{
$buffer=socket_read($MsgSock,1024,PHP_NORMAL_READ);
if($buffer===false) {
echo 'socket_read() a échoué :
',socket_strerror(socket_last_error($MsgSock)),\r\n;
break;
}
elseif(!$buffer){
continue;
}
$buffer=trim($buffer);
echo ' ',$buffer,\r\n;
if($buffer=='quit') {
break;
}

$back='You sent : ['.$buffer.']';

echo ' ',$back,\r\n;
socket_write($MsgSock,$back.\r\n);
} while(time()$EndTime);

@socket_close($MsgSock);
echo '= End...',\r\n;
}
}
socket_close($Sock);
?



[2003-08-25 20:17:06] [EMAIL PROTECTED]

Please provide a complete but short example script that can be used to
reproduce this bug.




[2003-08-25 18:19:27] bool at boolsite dot net

It's not the same bugs than http://bugs.php.net/bug.php?id=21760 . Here
it's a Win32 PHP version bug only, since the PHP 4.3.0 version, and
there is always the bug in the last version 4.3.3.

socket_read() always return FALSE, and display this error : erreur [0]
avec socket_read : OpÚration rÚussie.
(in english it should be error [0] with socket_read : operation
completed.)

maybe it's because of the socket_select() before the socket_read() ?


PS : it affects all my codes, but only with PHP 4.3.x Win32 version. On
unix or with PHP 4.2.3 all works fine.



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/21197

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


#26632 [NEW]: Problem calling COM interface methods

2003-12-15 Thread Regis dot Derimay at iQvolution dot com
From: Regis dot Derimay at iQvolution dot com
Operating system: Windows XP Professional
PHP version:  4.3.4
PHP Bug Type: COM related
Bug description:  Problem calling COM interface methods 

Description:

I call the following in PHP:
$x = new VARIANT(0.0, VT_R8 | VT_BYREF);
$y = new VARIANT(0.0, VT_R8 | VT_BYREF);
$z = new VARIANT(0.0, VT_R8 | VT_BYREF);
com_invoke($sphereIf, getPosition, $x, $y, $z, false);

The getPosition function is defined by:
interface IiQSphereObjIf : IDispatch
{
[id(1), helpstring(method getPosition)] HRESULT getPosition([out]
double* x, [out] double* y, [out] double* z, [in] VARIANT_BOOL
globalTrafo, [out, retval] int* result);
};

I get the following error code
Warning: com_invoke(): Invoke() failed: Type mismatch. Argument: 2 in
...php

It seems to be a problem with the COM module when using functions with
paramaters by reference (like x, y and z here).
When using normal parameters everything is working well.

Expected result:

Having x y and z filed with the position.

Actual result:
--
I get the following error code
Warning: com_invoke(): Invoke() failed: Type mismatch. Argument: 2 in
...php



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


#20382 [Com]: strtotime (Monday, $date) can produce incorrect output

2003-12-15 Thread bostjan dot skufca at domenca dot com
 ID:   20382
 Comment by:   bostjan dot skufca at domenca dot com
 Reported By:  nickj-phpbugs at nickj dot org
 Status:   Verified
 Bug Type: Date/time related
 Operating System: *
 PHP Version:  4CVS, 5CVS
 Assigned To:  hholzgra
 New Comment:

mktime() constantly returns timestamp that which is exactly one year
behind real (or better - correct) even if I leave year parameter out
completely or specify correct year manually - so I use 2004 to get
timestamps for 2003.


Previous Comments:


[2003-04-06 18:47:03] scottmacvicar at ntlworld dot com

This is a DST problem by the looks of it. The specific dates mentioned
are when DST takes effect which is the last sunday in March.



[2002-11-12 19:46:28] nickj-phpbugs at nickj dot org

OK, I decided that was needed was some kind of automated testing, so I
wrote it:

#!/root/php4-200211122230 -q
?php

// report any errors at all
error_reporting (E_ALL);

// pass a date, supply a strtotime modifier, and get a date back
function getDateWithModifier($date, $modifier) {
list ($year, $month, $day) = explode (-,$date);
$starting_timestamp = mktime (1,1,1,$month,$day,$year);
$timestamp_with_modifier = strtotime ($modifier,
$starting_timestamp);
return date(Y-n-j, $timestamp_with_modifier);
}

/*
** @desc: for the specified date, will find the date for the desired
day of the 
**week that is also in the same week. Does NOT use 'strtotime'
*/
function getDayOfTheWeekFromDate($date, $desired_day_of_week) {
// weekdays - note special case for sundays (7, not 0), so as to treat
as end of week, not start
$weekdays = array (Sunday = 7, Monday = 1, Tuesday = 2,
Wednesday = 3,
Thursday = 4, Friday = 5, Saturday
= 6);

// convert into a number
$desired_day_of_week_number = $weekdays[$desired_day_of_week];

// see what day we have currently
list ($year, $month, $day) = explode (-,$date);
$date_day_of_week = date(w, mktime
(17,17,17,$month,$day,$year));

$new_day = $day+(($desired_day_of_week_number-$date_day_of_week)+7) %
7;
return date(Y-n-j, mktime (17,17,17,$month,$new_day,$year));
}


// run an automated test to compare the output of these two functions,
and complain if they differ
for ($i=1; $i1000; $i++) {
$date =  date(Y-n-j, mktime (17,17,17,1,$i,1999));
$strtotime_date = getDateWithModifier($date, Monday);
$other_date = getDayOfTheWeekFromDate($date, Monday);
if ($strtotime_date != $other_date) {
print Discrepancy for $date - results were $strtotime_date vs
$other_date\n;
}
}

print PHP version:  . phpversion(). br\n;

?



Here's the output that I get:

[EMAIL PROTECTED] tmp]# ./automated-date-test.php 
Discrepancy for 1999-3-23 - results were 1999-3-28 vs 1999-3-29
Discrepancy for 1999-3-24 - results were 1999-3-28 vs 1999-3-29
Discrepancy for 1999-3-25 - results were 1999-3-28 vs 1999-3-29
Discrepancy for 1999-3-26 - results were 1999-3-28 vs 1999-3-29
Discrepancy for 1999-3-27 - results were 1999-3-28 vs 1999-3-29
Discrepancy for 1999-3-28 - results were 1999-3-28 vs 1999-3-29
Discrepancy for 2000-3-21 - results were 2000-3-26 vs 2000-3-27
Discrepancy for 2000-3-22 - results were 2000-3-26 vs 2000-3-27
Discrepancy for 2000-3-23 - results were 2000-3-26 vs 2000-3-27
Discrepancy for 2000-3-24 - results were 2000-3-26 vs 2000-3-27
Discrepancy for 2000-3-25 - results were 2000-3-26 vs 2000-3-27
Discrepancy for 2000-3-26 - results were 2000-3-26 vs 2000-3-27
Discrepancy for 2001-3-20 - results were 2001-3-25 vs 2001-3-26
Discrepancy for 2001-3-21 - results were 2001-3-25 vs 2001-3-26
Discrepancy for 2001-3-22 - results were 2001-3-25 vs 2001-3-26
Discrepancy for 2001-3-23 - results were 2001-3-25 vs 2001-3-26
Discrepancy for 2001-3-24 - results were 2001-3-25 vs 2001-3-26
Discrepancy for 2001-3-25 - results were 2001-3-25 vs 2001-3-26
PHP version: 4.3.0-devbr
[EMAIL PROTECTED] tmp]# 


In other words, the result for these 6 days of the year consistently
appears to be wrong. (I suppose I should be glad that the very first
date I choose to test this function with just by fluke happened to be
one of those 6 days, as opposed to causing mysterious problems later!)


Does anyone else get any results that appear incorrect on running this
script?



[2002-11-12 02:11:16] nickj-phpbugs at nickj dot org

Strtotime() appears to produce incorrect output under some
circumstances - specifically when wanting the date of a particular day
of the week day of the week from a given starting date. 

#26633 [NEW]: exec(), system() and backtick give maximum execution time error with Apache

2003-12-15 Thread jruffer at hss dot co dot uk
From: jruffer at hss dot co dot uk
Operating system: DG/UX
PHP version:  4.3.4
PHP Bug Type: Apache related
Bug description:  exec(), system() and backtick give maximum execution time error with 
Apache

Description:

These functions work fine using the CLI but when used with Apache give a
spurious execution timeout error.  I tried setting the timeout to 3
and it still happened immediately.  The problem occurs with any command
that I try to call using system(), exec() or backtick.  I do not have
safe-mode enabled.

I did have a couple of porting problems with DG/UX.  I had to add #include
sys/dir.h to main/php_scandir.h and
double expm1(double x)
{
  return(exp(x));
}
before #include php.h in ext/standard/math.c


'./configure' '--with-ingres=/OI/ingres' '--without-mysql' '--enable-ftp'
'--enable-cli' '--enable-cgi'
'--with-apache=/usr/opt/apache/apache_1.3.29' 

php.ini:
safe_mode_exec_dir = /usr/
log_errors = On
report_memleaks = Off
track_errors = On
error_log = /usr/opt/apache/www/logs/php.log
sendmail_from = [EMAIL PROTECTED]
ingres.allow_persistent = Off
ingres.default_database = divtest
ingres.default_user = devdba

Reproduce code:
---
?php
  print html\n;
  print h2 align='center'Attempting to run `ls -l` /h2\n;
  $list = `ls -l`;
  foreach($list as $value) {
  print $listbr\n;
  print /html\n;
?

Expected result:

Attempting to run `ls -l`

total 97 -rw-r--r-- 1 jeremy general 5520 Dec 12 09:56 build_status.php
-rw-r--r
-- 1 jeremy general 501 Dec 12 10:24 cr.menu -rw-r--r-- 1 jeremy general
365 Dec
 2 08:49 debug.inc lrwxrwxrwx 1 jeremy general 11 Dec 2 09:36 doc -
/phase3/doc
 -rw-r--r-- 1 jeremy general 3868 Dec 10 18:29 image_request.php
-rw-r--r-- 1 je
remy other 2543 Dec 2 17:31 images.php -rw-r--r-- 1 jeremy general 86 Dec
12 11:
00 index.html -rw-r--r-- 1 jeremy general 362 Dec 1 16:12 index.old.html
-rw-r--
r-- 1 jeremy general 77 Dec 10 12:08 info.php -rw-r--r-- 1 jeremy general
105 De
c 12 11:21 ingkey.err -rw-r--r-- 1 jeremy general 386 Dec 12 12:21
init.inc -rw-
r--r-- 1 jeremy general 786 Dec 12 15:17 login.inc -rw-r--r-- 1 jeremy
general 2
05 Dec 12 11:10 login.php -rw-r--r-- 1 jeremy general 863 Dec 12 10:55
menu.php
-rw-r--r-- 1 jeremy general 1899 Dec 3 10:31 release.php -rw-r--r-- 1
jeremy gen
eral 569 Dec 7 10:08 resume.php -rw-r--r-- 1 jeremy general 1041 Dec 11
17:52 ru
n_signoff.php -rw-r--r-- 1 jeremy general 857 Dec 12 15:18 secure.inc
-rw-r--r--
 1 jeremy general 6712 Dec 15 09:30 signoff.php -rw-r--r-- 1 jeremy
general 1046
 Dec 3 11:37 suspend.php -rw-r--r-- 1 jeremy general 619 Dec 5 16:45
tech.html -
rw-r--r-- 1 jeremy general 155 Dec 15 17:08 test.php -rw-r--r-- 1 jeremy
general
 2379 Dec 10 16:51 update_queue.php -rw-r--r-- 1 jeremy general 2783 Dec
10 16:4
8 update_queue.v1.php -rw-r--r-- 1 jeremy general 277 Dec 12 12:23
wrap.inc


Actual result:
--
Attempting to run `ls -l`

Fatal error: Maximum execution time of 30 seconds exceeded in
/usr/opt/apache/www/htdocs/image/test.php on line 4


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


#20382 [Com]: strtotime (Monday, $date) can produce incorrect output

2003-12-15 Thread bostjan dot skufca at domenca dot com
 ID:   20382
 Comment by:   bostjan dot skufca at domenca dot com
 Reported By:  nickj-phpbugs at nickj dot org
 Status:   Verified
 Bug Type: Date/time related
 Operating System: *
 PHP Version:  4CVS, 5CVS
 Assigned To:  hholzgra
 New Comment:

Disregard my previous post please!


Previous Comments:


[2003-12-15 12:22:53] bostjan dot skufca at domenca dot com

mktime() constantly returns timestamp that which is exactly one year
behind real (or better - correct) even if I leave year parameter out
completely or specify correct year manually - so I use 2004 to get
timestamps for 2003.



[2003-04-06 18:47:03] scottmacvicar at ntlworld dot com

This is a DST problem by the looks of it. The specific dates mentioned
are when DST takes effect which is the last sunday in March.



[2002-11-12 19:46:28] nickj-phpbugs at nickj dot org

OK, I decided that was needed was some kind of automated testing, so I
wrote it:

#!/root/php4-200211122230 -q
?php

// report any errors at all
error_reporting (E_ALL);

// pass a date, supply a strtotime modifier, and get a date back
function getDateWithModifier($date, $modifier) {
list ($year, $month, $day) = explode (-,$date);
$starting_timestamp = mktime (1,1,1,$month,$day,$year);
$timestamp_with_modifier = strtotime ($modifier,
$starting_timestamp);
return date(Y-n-j, $timestamp_with_modifier);
}

/*
** @desc: for the specified date, will find the date for the desired
day of the 
**week that is also in the same week. Does NOT use 'strtotime'
*/
function getDayOfTheWeekFromDate($date, $desired_day_of_week) {
// weekdays - note special case for sundays (7, not 0), so as to treat
as end of week, not start
$weekdays = array (Sunday = 7, Monday = 1, Tuesday = 2,
Wednesday = 3,
Thursday = 4, Friday = 5, Saturday
= 6);

// convert into a number
$desired_day_of_week_number = $weekdays[$desired_day_of_week];

// see what day we have currently
list ($year, $month, $day) = explode (-,$date);
$date_day_of_week = date(w, mktime
(17,17,17,$month,$day,$year));

$new_day = $day+(($desired_day_of_week_number-$date_day_of_week)+7) %
7;
return date(Y-n-j, mktime (17,17,17,$month,$new_day,$year));
}


// run an automated test to compare the output of these two functions,
and complain if they differ
for ($i=1; $i1000; $i++) {
$date =  date(Y-n-j, mktime (17,17,17,1,$i,1999));
$strtotime_date = getDateWithModifier($date, Monday);
$other_date = getDayOfTheWeekFromDate($date, Monday);
if ($strtotime_date != $other_date) {
print Discrepancy for $date - results were $strtotime_date vs
$other_date\n;
}
}

print PHP version:  . phpversion(). br\n;

?



Here's the output that I get:

[EMAIL PROTECTED] tmp]# ./automated-date-test.php 
Discrepancy for 1999-3-23 - results were 1999-3-28 vs 1999-3-29
Discrepancy for 1999-3-24 - results were 1999-3-28 vs 1999-3-29
Discrepancy for 1999-3-25 - results were 1999-3-28 vs 1999-3-29
Discrepancy for 1999-3-26 - results were 1999-3-28 vs 1999-3-29
Discrepancy for 1999-3-27 - results were 1999-3-28 vs 1999-3-29
Discrepancy for 1999-3-28 - results were 1999-3-28 vs 1999-3-29
Discrepancy for 2000-3-21 - results were 2000-3-26 vs 2000-3-27
Discrepancy for 2000-3-22 - results were 2000-3-26 vs 2000-3-27
Discrepancy for 2000-3-23 - results were 2000-3-26 vs 2000-3-27
Discrepancy for 2000-3-24 - results were 2000-3-26 vs 2000-3-27
Discrepancy for 2000-3-25 - results were 2000-3-26 vs 2000-3-27
Discrepancy for 2000-3-26 - results were 2000-3-26 vs 2000-3-27
Discrepancy for 2001-3-20 - results were 2001-3-25 vs 2001-3-26
Discrepancy for 2001-3-21 - results were 2001-3-25 vs 2001-3-26
Discrepancy for 2001-3-22 - results were 2001-3-25 vs 2001-3-26
Discrepancy for 2001-3-23 - results were 2001-3-25 vs 2001-3-26
Discrepancy for 2001-3-24 - results were 2001-3-25 vs 2001-3-26
Discrepancy for 2001-3-25 - results were 2001-3-25 vs 2001-3-26
PHP version: 4.3.0-devbr
[EMAIL PROTECTED] tmp]# 


In other words, the result for these 6 days of the year consistently
appears to be wrong. (I suppose I should be glad that the very first
date I choose to test this function with just by fluke happened to be
one of those 6 days, as opposed to causing mysterious problems later!)


Does anyone else get any results that appear incorrect on running this
script?



[2002-11-12 02:11:16] nickj-phpbugs at nickj dot org

Strtotime() 

#26633 [Opn]: exec(), system() and backtick give maximum execution time error with Apache

2003-12-15 Thread jruffer at hss dot co dot uk
 ID:   26633
 User updated by:  jruffer at hss dot co dot uk
 Reported By:  jruffer at hss dot co dot uk
 Status:   Open
 Bug Type: Apache related
 Operating System: DG/UX
 PHP Version:  4.3.4
 New Comment:

set_time_limit(0) makes it work.


Previous Comments:


[2003-12-15 12:28:32] jruffer at hss dot co dot uk

Description:

These functions work fine using the CLI but when used with Apache give
a spurious execution timeout error.  I tried setting the timeout to
3 and it still happened immediately.  The problem occurs with any
command that I try to call using system(), exec() or backtick.  I do
not have safe-mode enabled.

I did have a couple of porting problems with DG/UX.  I had to add
#include sys/dir.h to main/php_scandir.h and
double expm1(double x)
{
  return(exp(x));
}
before #include php.h in ext/standard/math.c


'./configure' '--with-ingres=/OI/ingres' '--without-mysql'
'--enable-ftp' '--enable-cli' '--enable-cgi'
'--with-apache=/usr/opt/apache/apache_1.3.29' 

php.ini:
safe_mode_exec_dir = /usr/
log_errors = On
report_memleaks = Off
track_errors = On
error_log = /usr/opt/apache/www/logs/php.log
sendmail_from = [EMAIL PROTECTED]
ingres.allow_persistent = Off
ingres.default_database = divtest
ingres.default_user = devdba

Reproduce code:
---
?php
  print html\n;
  print h2 align='center'Attempting to run `ls -l` /h2\n;
  $list = `ls -l`;
  foreach($list as $value) {
  print $listbr\n;
  print /html\n;
?

Expected result:

Attempting to run `ls -l`

total 97 -rw-r--r-- 1 jeremy general 5520 Dec 12 09:56 build_status.php
-rw-r--r
-- 1 jeremy general 501 Dec 12 10:24 cr.menu -rw-r--r-- 1 jeremy
general 365 Dec
 2 08:49 debug.inc lrwxrwxrwx 1 jeremy general 11 Dec 2 09:36 doc -
/phase3/doc
 -rw-r--r-- 1 jeremy general 3868 Dec 10 18:29 image_request.php
-rw-r--r-- 1 je
remy other 2543 Dec 2 17:31 images.php -rw-r--r-- 1 jeremy general 86
Dec 12 11:
00 index.html -rw-r--r-- 1 jeremy general 362 Dec 1 16:12
index.old.html -rw-r--
r-- 1 jeremy general 77 Dec 10 12:08 info.php -rw-r--r-- 1 jeremy
general 105 De
c 12 11:21 ingkey.err -rw-r--r-- 1 jeremy general 386 Dec 12 12:21
init.inc -rw-
r--r-- 1 jeremy general 786 Dec 12 15:17 login.inc -rw-r--r-- 1 jeremy
general 2
05 Dec 12 11:10 login.php -rw-r--r-- 1 jeremy general 863 Dec 12 10:55
menu.php
-rw-r--r-- 1 jeremy general 1899 Dec 3 10:31 release.php -rw-r--r-- 1
jeremy gen
eral 569 Dec 7 10:08 resume.php -rw-r--r-- 1 jeremy general 1041 Dec 11
17:52 ru
n_signoff.php -rw-r--r-- 1 jeremy general 857 Dec 12 15:18 secure.inc
-rw-r--r--
 1 jeremy general 6712 Dec 15 09:30 signoff.php -rw-r--r-- 1 jeremy
general 1046
 Dec 3 11:37 suspend.php -rw-r--r-- 1 jeremy general 619 Dec 5 16:45
tech.html -
rw-r--r-- 1 jeremy general 155 Dec 15 17:08 test.php -rw-r--r-- 1
jeremy general
 2379 Dec 10 16:51 update_queue.php -rw-r--r-- 1 jeremy general 2783
Dec 10 16:4
8 update_queue.v1.php -rw-r--r-- 1 jeremy general 277 Dec 12 12:23
wrap.inc


Actual result:
--
Attempting to run `ls -l`

Fatal error: Maximum execution time of 30 seconds exceeded in
/usr/opt/apache/www/htdocs/image/test.php on line 4






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


#26634 [NEW]: fgetcsv error: tab delimited with backslash

2003-12-15 Thread tgallagher at kalos-inc dot com
From: tgallagher at kalos-inc dot com
Operating system: Windows 2000 Pro
PHP version:  4.3.4
PHP Bug Type: Filesystem function related
Bug description:  fgetcsv error: tab delimited with backslash

Description:

Using this sample.txt file with fgetcsv (tab delimited)

9712211
950707\\
\\
999637ERYC 250

on the middle record I get instead of 3 records, I get 7.
instead of 3 records I get 2.
record 1 is read correctly, records 2 and 3 run together.

if I put a space at the beginning of the line with the double back slash
it works.

after searching the bug database I believe this error has not been
reported.
please correct me if this is not a bug.

Reproduce code:
---
?PHP

$fileHandle = fopen(sample.txt, r);
while ($data = @fgetcsv ($fileHandle, 5000, \t))
{
print_r($data);
}

?

Expected result:

Array
(
[0] =  
[1] = 
[2] = 971221
[3] = 1
)
Array
(
[0] =  
[1] = 
[2] = 950707
[3] = \\

\\
Array
(
[0] = 
[1] = 
[2] = 999637
[3] = ERYC 250
)

Actual result:
--
Array
(
[0] =  
[1] = 
[2] = 971221
[3] = 1
)
Array
(
[0] =  
[1] = 
[2] = 950707
[3] = \\
\\


[4] = 
[5] = 999637
[6] = ERYC 250
)

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


#26634 [Opn]: fgetcsv error: tab delimited with backslash

2003-12-15 Thread tgallagher at kalos-inc dot com
 ID:   26634
 User updated by:  tgallagher at kalos-inc dot com
 Reported By:  tgallagher at kalos-inc dot com
 Status:   Open
 Bug Type: Filesystem function related
 Operating System: Windows 2000 Pro
 PHP Version:  4.3.4
 New Comment:

clairification:
 on the middle record I get 7 fields: expected 3.


Previous Comments:


[2003-12-15 12:58:08] tgallagher at kalos-inc dot com

Description:

Using this sample.txt file with fgetcsv (tab delimited)

9712211
950707\\
\\
999637ERYC 250

on the middle record I get instead of 3 records, I get 7.
instead of 3 records I get 2.
record 1 is read correctly, records 2 and 3 run together.

if I put a space at the beginning of the line with the double back
slash it works.

after searching the bug database I believe this error has not been
reported.
please correct me if this is not a bug.

Reproduce code:
---
?PHP

$fileHandle = fopen(sample.txt, r);
while ($data = @fgetcsv ($fileHandle, 5000, \t))
{
print_r($data);
}

?

Expected result:

Array
(
[0] =  
[1] = 
[2] = 971221
[3] = 1
)
Array
(
[0] =  
[1] = 
[2] = 950707
[3] = \\

\\
Array
(
[0] = 
[1] = 
[2] = 999637
[3] = ERYC 250
)

Actual result:
--
Array
(
[0] =  
[1] = 
[2] = 971221
[3] = 1
)
Array
(
[0] =  
[1] = 
[2] = 950707
[3] = \\
\\


[4] = 
[5] = 999637
[6] = ERYC 250
)





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


#26634 [Opn-Asn]: fgetcsv error: tab delimited with backslash

2003-12-15 Thread iliaa
 ID:   26634
 Updated by:   [EMAIL PROTECTED]
 Reported By:  tgallagher at kalos-inc dot com
-Status:   Open
+Status:   Assigned
 Bug Type: Filesystem function related
 Operating System: Windows 2000 Pro
 PHP Version:  4.3.4
-Assigned To:  
+Assigned To:  iliaa


Previous Comments:


[2003-12-15 12:59:54] tgallagher at kalos-inc dot com

clairification:
 on the middle record I get 7 fields: expected 3.



[2003-12-15 12:58:08] tgallagher at kalos-inc dot com

Description:

Using this sample.txt file with fgetcsv (tab delimited)

9712211
950707\\
\\
999637ERYC 250

on the middle record I get instead of 3 records, I get 7.
instead of 3 records I get 2.
record 1 is read correctly, records 2 and 3 run together.

if I put a space at the beginning of the line with the double back
slash it works.

after searching the bug database I believe this error has not been
reported.
please correct me if this is not a bug.

Reproduce code:
---
?PHP

$fileHandle = fopen(sample.txt, r);
while ($data = @fgetcsv ($fileHandle, 5000, \t))
{
print_r($data);
}

?

Expected result:

Array
(
[0] =  
[1] = 
[2] = 971221
[3] = 1
)
Array
(
[0] =  
[1] = 
[2] = 950707
[3] = \\

\\
Array
(
[0] = 
[1] = 
[2] = 999637
[3] = ERYC 250
)

Actual result:
--
Array
(
[0] =  
[1] = 
[2] = 971221
[3] = 1
)
Array
(
[0] =  
[1] = 
[2] = 950707
[3] = \\
\\


[4] = 
[5] = 999637
[6] = ERYC 250
)





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


#26635 [NEW]: imagettfbbox() imagettftext() fontfile does not allow relative path

2003-12-15 Thread choinet at rocketmail dot com
From: choinet at rocketmail dot com
Operating system: Windows XP
PHP version:  4.3.4
PHP Bug Type: *Graphics related
Bug description:  imagettfbbox()  imagettftext() fontfile does not allow relative path

Description:

array imagettfbbox ( int size, int angle, string fontfile, string text)

This is the prototype for the imagettfbbox() function, and the fontfile
argument is the same for the imagettftext() function. On Windows, there is
a problem with using relative paths to the fontfile. Full absolute
pathname must be used.

On Linux systems, however, both absolute and relative pathnames to the
fontfile are allowed.

In addition, the absolute pathname to the fontfile must have no spaces in
it, and pathnames that do have spaces must use the DOS naming convention
(e.g. C:\Progra~1\Apache~1\apache2\arial.ttf). This can become quite
annoying.

So in summary, the imagettfbbox() and imagettftext() do not allow relative
paths to the fontfile, and do not allow spaces in the paths, either, on
Windows. I did not have this problem before in the summertime when I used
an earlier release of PHP 4.

Reproduce code:
---
[text.php]
?php
$fp = imagecreate(300, 100);
$color1 = imagecolorallocate($fp, 255, 255, 255);
$color2 = imagecolorallocate($fp, 0, 0, 153);
$path = 'arial.ttf';
imagettftext($fp, 12, 0, 50, 35, $color2, $path, 'test');
?

the arial true-type font file is in the same directory as text.php.

Expected result:

I expect to see a white image with the blue text saying 'test.'

Actual result:
--
Warning: imagettftext(): Could not find/open font in C:\Program
Files\Apache Group\Apache2\htdocs\text.php on line 5

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



#26634 [Asn-Opn]: fgetcsv error: tab delimited with backslash

2003-12-15 Thread iliaa
 ID:   26634
 Updated by:   [EMAIL PROTECTED]
 Reported By:  tgallagher at kalos-inc dot com
-Status:   Assigned
+Status:   Open
 Bug Type: Filesystem function related
 Operating System: Windows 2000 Pro
 PHP Version:  4.3.4
 Assigned To:  iliaa
 New Comment:

This bug has been fixed in CVS.

In case this was a PHP problem, 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/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.




Previous Comments:


[2003-12-15 12:59:54] tgallagher at kalos-inc dot com

clairification:
 on the middle record I get 7 fields: expected 3.



[2003-12-15 12:58:08] tgallagher at kalos-inc dot com

Description:

Using this sample.txt file with fgetcsv (tab delimited)

9712211
950707\\
\\
999637ERYC 250

on the middle record I get instead of 3 records, I get 7.
instead of 3 records I get 2.
record 1 is read correctly, records 2 and 3 run together.

if I put a space at the beginning of the line with the double back
slash it works.

after searching the bug database I believe this error has not been
reported.
please correct me if this is not a bug.

Reproduce code:
---
?PHP

$fileHandle = fopen(sample.txt, r);
while ($data = @fgetcsv ($fileHandle, 5000, \t))
{
print_r($data);
}

?

Expected result:

Array
(
[0] =  
[1] = 
[2] = 971221
[3] = 1
)
Array
(
[0] =  
[1] = 
[2] = 950707
[3] = \\

\\
Array
(
[0] = 
[1] = 
[2] = 999637
[3] = ERYC 250
)

Actual result:
--
Array
(
[0] =  
[1] = 
[2] = 971221
[3] = 1
)
Array
(
[0] =  
[1] = 
[2] = 950707
[3] = \\
\\


[4] = 
[5] = 999637
[6] = ERYC 250
)





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


#26634 [Opn-Csd]: fgetcsv error: tab delimited with backslash

2003-12-15 Thread iliaa
 ID:   26634
 Updated by:   [EMAIL PROTECTED]
 Reported By:  tgallagher at kalos-inc dot com
-Status:   Open
+Status:   Closed
 Bug Type: Filesystem function related
 Operating System: Windows 2000 Pro
 PHP Version:  4.3.4
 Assigned To:  iliaa


Previous Comments:


[2003-12-15 13:50:00] [EMAIL PROTECTED]

This bug has been fixed in CVS.

In case this was a PHP problem, 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/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.





[2003-12-15 12:59:54] tgallagher at kalos-inc dot com

clairification:
 on the middle record I get 7 fields: expected 3.



[2003-12-15 12:58:08] tgallagher at kalos-inc dot com

Description:

Using this sample.txt file with fgetcsv (tab delimited)

9712211
950707\\
\\
999637ERYC 250

on the middle record I get instead of 3 records, I get 7.
instead of 3 records I get 2.
record 1 is read correctly, records 2 and 3 run together.

if I put a space at the beginning of the line with the double back
slash it works.

after searching the bug database I believe this error has not been
reported.
please correct me if this is not a bug.

Reproduce code:
---
?PHP

$fileHandle = fopen(sample.txt, r);
while ($data = @fgetcsv ($fileHandle, 5000, \t))
{
print_r($data);
}

?

Expected result:

Array
(
[0] =  
[1] = 
[2] = 971221
[3] = 1
)
Array
(
[0] =  
[1] = 
[2] = 950707
[3] = \\

\\
Array
(
[0] = 
[1] = 
[2] = 999637
[3] = ERYC 250
)

Actual result:
--
Array
(
[0] =  
[1] = 
[2] = 971221
[3] = 1
)
Array
(
[0] =  
[1] = 
[2] = 950707
[3] = \\
\\


[4] = 
[5] = 999637
[6] = ERYC 250
)





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


#26635 [Opn]: imagettfbbox() imagettftext() fontfile does not allow relative path

2003-12-15 Thread choinet at rocketmail dot com
 ID:   26635
 User updated by:  choinet at rocketmail dot com
 Reported By:  choinet at rocketmail dot com
 Status:   Open
 Bug Type: *Graphics related
 Operating System: Windows XP
 PHP Version:  4.3.4
 New Comment:

Eh, actually, I should add that in the summertime, I must have used the
path c:\Apache\htdocs\arial.tff for the fontfile, so that is why it
worked before in the summertime.


Previous Comments:


[2003-12-15 13:22:43] choinet at rocketmail dot com

Description:

array imagettfbbox ( int size, int angle, string fontfile, string
text)

This is the prototype for the imagettfbbox() function, and the fontfile
argument is the same for the imagettftext() function. On Windows, there
is a problem with using relative paths to the fontfile. Full absolute
pathname must be used.

On Linux systems, however, both absolute and relative pathnames to the
fontfile are allowed.

In addition, the absolute pathname to the fontfile must have no spaces
in it, and pathnames that do have spaces must use the DOS naming
convention (e.g. C:\Progra~1\Apache~1\apache2\arial.ttf). This can
become quite annoying.

So in summary, the imagettfbbox() and imagettftext() do not allow
relative paths to the fontfile, and do not allow spaces in the paths,
either, on Windows. I did not have this problem before in the
summertime when I used an earlier release of PHP 4.

Reproduce code:
---
[text.php]
?php
$fp = imagecreate(300, 100);
$color1 = imagecolorallocate($fp, 255, 255, 255);
$color2 = imagecolorallocate($fp, 0, 0, 153);
$path = 'arial.ttf';
imagettftext($fp, 12, 0, 50, 35, $color2, $path, 'test');
?

the arial true-type font file is in the same directory as text.php.

Expected result:

I expect to see a white image with the blue text saying 'test.'

Actual result:
--
Warning: imagettftext(): Could not find/open font in C:\Program
Files\Apache Group\Apache2\htdocs\text.php on line 5





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


#26598 [Fbk-Opn]: Segmentation fault

2003-12-15 Thread robert at interjinn dot com
 ID:   26598
 User updated by:  robert at interjinn dot com
 Reported By:  robert at interjinn dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Zend Engine 2 problem
 Operating System: Mandrake 9.0
 PHP Version:  5CVS-2003-12-12 (dev)
 New Comment:

As stated previously I was unable to come up with a short script that
can reproduce the bug. I attached a link to a big script in my last
response. I apologize if this is not suitable but I don't see another
alternative.


Previous Comments:


[2003-12-15 09:43:05] [EMAIL PROTECTED]

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with ?php and ends with ?,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc.

If possible, make the script source available online and provide
an URL to it here. Try avoid embedding huge scripts into the report.





[2003-12-14 21:17:36] robert at interjinn dot com

I compiled and ran the latest CVS snapshot with the minimal compile
options indicated in a recent post with the same results. Engine still
segfaults at the same line of code. On the flip side, I also tried the
binary on the script I wanted to make available that illustrates the
problem, and it now works (so the bug previously mentioned as bFatal
error/b:  Only variables or references can be returned by
reference in
b/home/suds/yackspit/interJinn-0.9.1/Core/libraries/templateJinn/templ
ateManager.inc/b on line b17/bbr / is now fixed.) 

So to test you can download the following link:

http://www.interjinn.com/download/interJinn-0.9.1-php5mods.tar.gz

then switch into the created directory (interJinn-0.9.1-php5mods) and
type:

$ /usr/bin/wherever/phpbinary -qC makeInterJinnSite.php

The segfault should occur immediately after a bunch of deprecation
warnings.

HTH,
Rob.



[2003-12-14 20:23:25] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2003-12-12 18:10:28] robert at interjinn dot com

I hav recompiled with minimal extensions compiled in, namely:

./configure \
--disable-all \
--with-pcre-regex \
--prefix=/usr/local/php/${PHP_VERSION_DIR}/installation \
--exec-prefix=/usr/local/php/${PHP_VERSION_DIR}/installation

And I still have a no go. I spent the last 3 hours trying to produce a
short script which would illustrate the bug and running the PHP binary
through GDB and Valgrind to no avail. What I do know is that at:

zend_do_declare_property
(/usr/local/php/php5-200312120830/Zend/zend_compile.c:2442)

CG(active_class_entry) evaluates to null and so
CG(active_class_entry)-ce_flags causes a NULL pointer fault. I tried
patching with a test for NULL, but then I got a crash in
zend_hash_find() where the memory for the hash appeared to be corrupted
- Valgrind was not useful in determining where the memory may have
become corrupt.

I was going to set up a link to an InterJinn download, but while I was
testing to make sure it ran, I got the following error (possibly
related to this bug):

bFatal error/b:  Only variables or references can be returned by
reference in
b/home/suds/yackspit/interJinn-0.9.1/Core/libraries/templateJinn/templateManager.inc/b
on line b17/bbr /

For which the actual line of code is:

var $filename = __FILE__;

which is in a class. If it is also helpful I get a LOT of deprecated
warnings for:

bStrict Standards/b:  var: Deprecated. Please use the
public/private/protected modifiers.

The reason I think maybe the above is related is because in the
backtrace of the original report, and more recent ones with minimal
extensions, the zend_do_declare_property() function is attmepting to
work with a property called filename.



[2003-12-12 06:49:03] [EMAIL PROTECTED]

Don't forget to remove the non-standard exts from your PHP config
either.



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/26598

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


#26635 [Opn-Csd]: imagettfbbox() imagettftext() fontfile does not allow relative path

2003-12-15 Thread iliaa
 ID:   26635
 Updated by:   [EMAIL PROTECTED]
 Reported By:  choinet at rocketmail dot com
-Status:   Open
+Status:   Closed
 Bug Type: *Graphics related
 Operating System: Windows XP
 PHP Version:  4.3.4
 New Comment:

This bug has been fixed in CVS.

In case this was a PHP problem, 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/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.




Previous Comments:


[2003-12-15 14:56:55] choinet at rocketmail dot com

Eh, actually, I should add that in the summertime, I must have used the
path c:\Apache\htdocs\arial.tff for the fontfile, so that is why it
worked before in the summertime.



[2003-12-15 13:22:43] choinet at rocketmail dot com

Description:

array imagettfbbox ( int size, int angle, string fontfile, string
text)

This is the prototype for the imagettfbbox() function, and the fontfile
argument is the same for the imagettftext() function. On Windows, there
is a problem with using relative paths to the fontfile. Full absolute
pathname must be used.

On Linux systems, however, both absolute and relative pathnames to the
fontfile are allowed.

In addition, the absolute pathname to the fontfile must have no spaces
in it, and pathnames that do have spaces must use the DOS naming
convention (e.g. C:\Progra~1\Apache~1\apache2\arial.ttf). This can
become quite annoying.

So in summary, the imagettfbbox() and imagettftext() do not allow
relative paths to the fontfile, and do not allow spaces in the paths,
either, on Windows. I did not have this problem before in the
summertime when I used an earlier release of PHP 4.

Reproduce code:
---
[text.php]
?php
$fp = imagecreate(300, 100);
$color1 = imagecolorallocate($fp, 255, 255, 255);
$color2 = imagecolorallocate($fp, 0, 0, 153);
$path = 'arial.ttf';
imagettftext($fp, 12, 0, 50, 35, $color2, $path, 'test');
?

the arial true-type font file is in the same directory as text.php.

Expected result:

I expect to see a white image with the blue text saying 'test.'

Actual result:
--
Warning: imagettftext(): Could not find/open font in C:\Program
Files\Apache Group\Apache2\htdocs\text.php on line 5





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


#26035 [Asn-Csd]: Opening existing CDB does not work

2003-12-15 Thread helly
 ID:   26035
 Updated by:   [EMAIL PROTECTED]
 Reported By:  a dot stagl at gmx dot at
-Status:   Assigned
+Status:   Closed
 Bug Type: DBM/DBA related
 Operating System: *
 PHP Version:  4CVS, 5CVS
 Assigned To:  helly
 New Comment:

- The cascon database is not a CDB database.
- The failure is in malloc (safe_emalloc) 
  which tries to allocate more memory then available.
  This cannot be fixed within dba.
- The workaround to check the file length would slowdown
  CDB by adding 2 additional seeks. This contradicts its
  design.
- Hence there is nothing to fixed - closed



Previous Comments:


[2003-10-31 08:28:12] [EMAIL PROTECTED]

OTOH, I don't think that Nokia/Cascon are using the CDB but something
of their own invention.




[2003-10-31 08:26:33] [EMAIL PROTECTED]

It actually returns empty string. When you change the
check to while ($key !== false) it'll crash:

(gdb) bt
#0  0x4072cf51 in kill () from /lib/i686/libc.so.6
#1  0x082762ac in _emalloc (size=1735290733, __zend_filename=0x8327600
/usr/src/web/php/php4/ext/dba/dba_cdb.c, 
__zend_lineno=303, __zend_orig_filename=0x84a6220
/usr/src/web/php/php4/Zend/zend_alloc.c, __zend_orig_lineno=218)
at /usr/src/web/php/php4/Zend/zend_alloc.c:166
#2  0x082765c1 in _safe_emalloc (nmemb=1735290732, size=1, offset=1, 
__zend_filename=0x8327600
/usr/src/web/php/php4/ext/dba/dba_cdb.c, __zend_lineno=303,
__zend_orig_filename=0x0, 
__zend_orig_lineno=0) at
/usr/src/web/php/php4/Zend/zend_alloc.c:218
#3  0x080bce64 in dba_nextkey_cdb (info=0x864eb74, newlen=0xbfffd4ec)
at /usr/src/web/php/php4/ext/dba/dba_cdb.c:303
#4  0x080bbfa4 in zif_dba_nextkey (ht=1, return_value=0x86401ec,
this_ptr=0x0, return_value_used=1)
at /usr/src/web/php/php4/ext/dba/dba.c:914

Assigned to Marcus who added this thing.




[2003-10-31 03:55:39] a dot stagl at gmx dot at

Unfortunatly, I cannot provide you the DB which I'm refering to,
because - as already mentioned - it is the contacts-database from a
nokia 9210i which contains sensitive data. I tried to get a sample
contacts.cdb directly from nokia, but they haven't been supportive :-(

But I found the following two cdb-databases on the internet:

http://web.mit.edu/cascon/updates/cascon.cdb (does not work with the
provided code)

http://cvs.sourceforge.net/viewcvs.py/*checkout*/cdbfile/cdbFile/cdbFile/Attic/test.cdb?rev=1.1.1.1
(works fine with my code)

HTH



[2003-10-30 05:30:43] a dot stagl at gmx dot at

Description:

I'm trying to open the contacts-databse from a nokia 9210i mobile, but
it doesn't work.


Reproduce code:
---
$db_conn = dba_open(contacts.cdb,r,cdb);
if (!$db_conn) die (opening failed);
$key = dba_firstkey ($db_conn);
while ($key != false)
{
  echo $key.br /;
  echo dba_fetch ($key, $db_conn).br /br /;
  $key = dba_nextkey ($db_conn);
}
dba_close($db_conn);

Expected result:

...to get a list of key-value pairs.

Actual result:
--
The code didn't produce the expected output nor any error message. It
seems that the commands dba_firstkey and dba_nextkey always return
false instead of a key.






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


#26623 [Opn]: XML Parser ignores UTF-8 input encoding?

2003-12-15 Thread steven at acko dot net
 ID:   26623
 User updated by:  steven at acko dot net
 Reported By:  steven at acko dot net
 Status:   Open
 Bug Type: XML related
 Operating System: Windows 2000
 PHP Version:  4CVS-2003-12-14 (stable)
 New Comment:

This bug does not happen with the latest PHP5 by the way. PHP5 will
correctly handle my example.


Previous Comments:


[2003-12-14 23:13:35] steven at acko dot net

Description:

PHP seems to ignore the encoding when parsing an UTF-8 encoded XML
file, and assumes it is ISO-8859-1 instead.

The code below contains a very short XML file (inline) to parse, with
the character a-with-tilde as value (this is just to show what happens,
there is nothing special about this character). The a-with-tilde takes
2 bytes in UTF-8 encoding, and is represented as such in the XML file
string.

The buggy behaviour is illustrated with the 3 possible PHP output
encodings. Comment/uncomment the correct xml_parser_set_option() call
to see the behaviour in all output encodings.

Note that nothing changes in behaviour if you change the
encoding=utf-8 in the source XML into 'iso-8859-1', or remove it
altogether, which shows that it is being ignored.

Reproduce code:
---
?php

$xmlfile = ?xml version=\1.0\ encoding=\utf-8\
?tag\xC3\xA3/tag;

function handler_data($parser, $data) {
  print Data: $data\n;
  print Length: . strlen($data) .\n;
}

$xml_parser = xml_parser_create();
xml_set_character_data_handler($xml_parser, handler_data);
xml_parser_set_option($xml_parser, XML_OPTION_TARGET_ENCODING,
utf-8);
// xml_parser_set_option($xml_parser, XML_OPTION_TARGET_ENCODING,
iso-8859-1);
// xml_parser_set_option($xml_parser, XML_OPTION_TARGET_ENCODING,
us-ascii);

xml_parse($xml_parser, $xmlfile, 1);
xml_parser_free($xml_parser);

?


Expected result:

With output encoding set to UTF-8, PHP should leave the data alone and
should print 2 bytes (\xC3 and \xA3) for the a-with-tilde.

With output encoding set to ISO-8859-1, PHP should encode the
a-with-tile as a single byte (\xE3).

With output encoding set to US-ASCII, PHP should output a single '?' to
indicate the a-with-tilde is not available in the output encoding.

Actual result:
--
With output encoding set to UTF-8, PHP re-encodes the input into UTF-8,
resulting in 4 bytes for a-with-tilde.

With output encoding set to ISO-8859-1, PHP leaves the input
untouched.

With output encoding set to US-ASCII, PHP outputs two question marks.





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


#26632 [Opn-Bgs]: Problem calling COM interface methods

2003-12-15 Thread sniper
 ID:   26632
 Updated by:   [EMAIL PROTECTED]
 Reported By:  Regis dot Derimay at iQvolution dot com
-Status:   Open
+Status:   Bogus
 Bug Type: COM related
 Operating System: Windows XP Professional
 PHP Version:  4.3.4
 New Comment:

Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. 

Thank you for your interest in PHP.

Try PHP 5..this extension is no longer supported in PHP 4.



Previous Comments:


[2003-12-15 12:18:09] Regis dot Derimay at iQvolution dot com

Description:

I call the following in PHP:
$x = new VARIANT(0.0, VT_R8 | VT_BYREF);
$y = new VARIANT(0.0, VT_R8 | VT_BYREF);
$z = new VARIANT(0.0, VT_R8 | VT_BYREF);
com_invoke($sphereIf, getPosition, $x, $y, $z, false);

The getPosition function is defined by:
interface IiQSphereObjIf : IDispatch
{
[id(1), helpstring(method getPosition)] HRESULT getPosition([out]
double* x, [out] double* y, [out] double* z, [in] VARIANT_BOOL
globalTrafo, [out, retval] int* result);
};

I get the following error code
Warning: com_invoke(): Invoke() failed: Type mismatch. Argument: 2 in
...php

It seems to be a problem with the COM module when using functions with
paramaters by reference (like x, y and z here).
When using normal parameters everything is working well.

Expected result:

Having x y and z filed with the position.

Actual result:
--
I get the following error code
Warning: com_invoke(): Invoke() failed: Type mismatch. Argument: 2 in
...php







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


#25123 [Opn-Fbk]: ocierror() returns always ORA-24315 illegal attribute type

2003-12-15 Thread sniper
 ID:   25123
 Updated by:   [EMAIL PROTECTED]
 Reported By:  karel dot miarka at issa dot cz
-Status:   Open
+Status:   Feedback
 Bug Type: OCI8 related
 Operating System: Windows 2000
-PHP Version:  4.3.x including 4.3.5-dev
+PHP Version:  4CVS-2003-12-15
 New Comment:

Try the ociinternaldebug(1); like suggested by cjbj at hotmail dot com




Previous Comments:


[2003-12-15 09:37:14] karel dot miarka at issa dot cz

Our Oracle server version is 8.0.5.0.0 , so maybe that's the problem,
but it was working fine with older versions of php.



[2003-12-15 09:33:37] karel dot miarka at issa dot cz

Still invalid behaviour with PHP 4.3.5-dev on w2k. :-(



[2003-12-15 08:40:50] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip





[2003-09-22 03:47:14] cjbj at hotmail dot com

Does not reproduce for me with PHP 4.3.3 on W2K using Oracle 9.2.0.1.

Re SET AUTOTRACE, this is SQL*Plus specific and produces a simple
tuning report

I discovered PHP's OCI8 internal debug output can be enabled by calling
ociinternaldebug(1).  Maybe this will help
the filer?



[2003-08-29 09:13:59] karel dot miarka at issa dot cz

I use Apache/1.3.24 for Windows 95/NT, and Oracle8 Release 8.0.5.0.0 -
Production on Linux, but it behaves the same also under Oracle 8.1 for
Windows.

Autotrace seems to be SQL*plus feature only and in addition it seems to
be off by default.

The ocierror() behaves fine under PHP 4.2 on Windows. 
And there is no problem with ocierror() on Linux with PHP 4.3.3 .

I have reported this bug on PHP 4.3.x and someone else has changed
this my line to 4.3.3RC5-dev, 5.0.0b2-dev so I guess this unknown
person is a PHP-OCI8 developer who reproduced this error with those PHP
version.



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/25123

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


#25905 [Asn-Csd]: getimagesize fail with some jpegs

2003-12-15 Thread helly
 ID:   25905
 Updated by:   [EMAIL PROTECTED]
 Reported By:  sitnikov at infonet dot ee
-Status:   Assigned
+Status:   Closed
 Bug Type: Feature/Change Request
-Operating System: Linux
+Operating System: *
 PHP Version:  4CVS-2003-10-18 (stable)
 Assigned To:  helly
 New Comment:

The code you mentioned is to support the 'standard' error in writing
wrong jpeg files. I do not plan to add any additional workarounds for
any other software whose manufacturer cannot read a standard. If you
feel a need for this go ahead and show me a working patch. If that does
not hurt robustness too much, i will consider applying it.


Previous Comments:


[2003-10-20 10:41:48] sitnikov at infonet dot ee

reopen



[2003-10-19 06:03:48] [EMAIL PROTECTED]

Well it's a valid point you can take. Probably i'll even adapt the code
for getImageSize() but not now.



[2003-10-19 05:21:36] sitnikov at infonet dot ee

ok, why you implement this ?

/* get marker byte, swallowing possible padding */
if ( last_marker==M_COM  comment_correction) {
/* some software does not count the length bytes of COM section */
/* one company doing so is very much envolved in JPEG... so we accept
too */
/* by the way: some of those companies changed their code now... */
  comment_correction = 2;
} else {
  last_marker = 0;
  comment_correction = 0;
}



[2003-10-19 04:56:21] [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.

Your image file is corrupt and i don\'t think i will implement a
special handling for all wrong software out there. That would lead to
unrobust php code.



[2003-10-19 03:10:52] sitnikov at infonet dot ee

/usr/local/ImageMagick/bin/identify -format %[EXIF:*] wrong_jpeg.jpg
Make=Konica
Model=Revio C2
Orientation=1
XResolution=288/3
YResolution=288/3
ResolutionUnit=2
DateTime=2003:10:15 13:48:10
YCbCrPositioning=2
ExifOffset=174
ExposureTime=5924356/268435456
FNumber=28/10
ExposureProgram=3
ISOSpeedRatings=64
ExifVersion=0220
DateTimeOriginal=2003:10:15 13:48:10
DateTimeDigitized=2003:10:15 13:48:10
ComponentsConfiguration=...
CompressedBitsPerPixel=1989456/1228800
ShutterSpeedValue=44/8
ApertureValue=28/10
ExposureBiasValue=0/10
MaxApertureValue=28/10
SubjectDistance=11/10
MeteringMode=5
LightSource=0
Flash=0
FocalLength=45/10
MakerNote=0060162454
FlashPixVersion=0100
ColorSpace=1
ExifImageWidth=1280
ExifImageLength=960
unknown=
InteroperabilityOffset=724
unknown=R98
unknown=0100
ExposureIndex=1/1
SensingMethod=2
FileSource=.
SceneType=.
unknown=1280/1280
unknown=37

jpeg lib also working properly with this image.
Please see this code (from jpeg-6b):
next_marker (j_decompress_ptr cinfo)
{
  int c;
  INPUT_VARS(cinfo);

  for (;;) {
INPUT_BYTE(cinfo, c, return FALSE);
/* Skip any non-FF bytes. 
 * This may look a bit inefficient, but it will not occur in a
valid file. 
 * We sync after each discarded byte so that a suspending data
source 
 * can discard the byte from its buffer. 
 */
while (c != 0xFF) {
  cinfo-marker-discarded_bytes++;
  INPUT_SYNC(cinfo);
  INPUT_BYTE(cinfo, c, return FALSE);
}
/* This loop swallows any duplicate FF bytes.  Extra FFs are legal
as 
 * pad bytes, so don't count them in discarded_bytes.  We assume
there 
 * will not be so many consecutive FF bytes as to overflow a
suspending 
 * data source's input buffer. 
 */
do {
  INPUT_BYTE(cinfo, c, return FALSE);
} while (c == 0xFF);
if (c != 0)
  break;/* found a valid marker, exit loop */
/* Reach here if we found a stuffed-zero data sequence (FF/00). 
 * Discard it and loop back to try again. 
 */
cinfo-marker-discarded_bytes += 2;
INPUT_SYNC(cinfo);
  }
  
  if (cinfo-marker-discarded_bytes != 0) {
WARNMS2(cinfo, JWRN_EXTRANEOUS_DATA,
cinfo-marker-discarded_bytes, c);
cinfo-marker-discarded_bytes = 0;
  }
  
  cinfo-unread_marker = c;

  INPUT_SYNC(cinfo);
  return TRUE;
}



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/25905

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


#25905 [Csd]: getimagesize fail with some jpegs

2003-12-15 Thread helly
 ID:   25905
 Updated by:   [EMAIL PROTECTED]
 Reported By:  sitnikov at infonet dot ee
 Status:   Closed
 Bug Type: Feature/Change Request
 Operating System: *
 PHP Version:  4CVS-2003-10-18 (stable)
 Assigned To:  helly
 New Comment:

Also see: Bug #13213 Unknown image format 


Previous Comments:


[2003-12-15 17:03:04] [EMAIL PROTECTED]

The code you mentioned is to support the 'standard' error in writing
wrong jpeg files. I do not plan to add any additional workarounds for
any other software whose manufacturer cannot read a standard. If you
feel a need for this go ahead and show me a working patch. If that does
not hurt robustness too much, i will consider applying it.



[2003-10-20 10:41:48] sitnikov at infonet dot ee

reopen



[2003-10-19 06:03:48] [EMAIL PROTECTED]

Well it's a valid point you can take. Probably i'll even adapt the code
for getImageSize() but not now.



[2003-10-19 05:21:36] sitnikov at infonet dot ee

ok, why you implement this ?

/* get marker byte, swallowing possible padding */
if ( last_marker==M_COM  comment_correction) {
/* some software does not count the length bytes of COM section */
/* one company doing so is very much envolved in JPEG... so we accept
too */
/* by the way: some of those companies changed their code now... */
  comment_correction = 2;
} else {
  last_marker = 0;
  comment_correction = 0;
}



[2003-10-19 04:56:21] [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.

Your image file is corrupt and i don\'t think i will implement a
special handling for all wrong software out there. That would lead to
unrobust php code.



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/25905

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


#13213 [Csd]: Unknown image format

2003-12-15 Thread helly
 ID:   13213
 Updated by:   [EMAIL PROTECTED]
 Reported By:  pulstar at mail dot com
 Status:   Closed
 Bug Type: GetImageSize related
 Operating System: Linux RedHat 7.1
 PHP Version:  4.1.1
 Assigned To:  helly
 New Comment:

Also see: Bug #25905 getimagesize fail with some jpegs 


Previous Comments:


[2002-03-10 07:15:50] janderk at digitaldutch dot com

I'm the main developer of Arles Image Web Page Creator, the application
that generated those JPEG's with the illegal comment section. I got an
email about this PHP BUG report from a user asking me to repair this
Arles bug.

FYI: It was a bug in an older versions of Arles and has been repaired
in the latest releases. It was actually caused by a bug in the Intel
JPEG library we used at that time.

I'm glad that we could help making PHP more robust in reading corrupted
images ;)



[2002-03-09 11:04:37] [EMAIL PROTECTED]

Took a closer look on the file.
The promlem is that both photo1 and photo3 have an illegal comment
section. The section is appended by some 0x00 where 0xFF were expected.
As other software ignores the NULLs i will add this to CVS / php4.3
version.



[2002-03-08 11:44:25] [EMAIL PROTECTED]

The current CVS implementation has been improoved on that.
As you can see from exif's debug warnings. photo1 and photo3 are
illegal. An internal section says it is longer than the file :-(

I could implement handling that but it would blow up code.
I will consider the applied patch...

photo1.jpg 
GetImageSize [ , , , ] 
exif_read_data exif_read_data returned false
Invalid JPEG/TIFF file: 'photo1.jpg' 
21 
PHP Warning: error reading from file: got=x3648(=13896) !=
itemlen-2=x4EE1(=20193)

photo2.jpg 
GetImageSize [ 640, 480, 2, width=640 height=480 ] 
exif_read_data exif_read_data returned false
O.K. 
22 

photo3.jpg 
GetImageSize [ , , , ] 
exif_read_data exif_read_data returned false
Invalid JPEG/TIFF file: 'photo3.jpg' 
23 
PHP Warning: error reading from file: got=x1E3D(=7741) !=
itemlen-2=xF698(=63128)

photo4.jpg 
GetImageSize [ 640, 480, 2, width=640 height=480 ] 
exif_read_data exif_read_data returned false
O.K. 




[2002-01-22 16:34:48] mul at rentapacs dot com

Solution: Read additional bytes to resync on the marker sequence. If
marker length is too short, nothing is lost. If too long, one marker
will be missing. Besides that APPn in $info array will contain
consistent entries and no bogus markers. Uhm, ... and if the JPEG
format follows the spec and contains correct marker lengths, it will
work also ;-)

This patch against 4.1.1 might do the trick:
--- ext/standard/image.c.orig   Sat Aug 11 19:03:37 2001
+++ ext/standard/image.cTue Jan 22 22:10:42 2002
@@ -253,12 +253,20 @@
 
 /* {{{ php_next_marker
  */
-static unsigned int php_next_marker(int socketd, FILE *fp, int
issock)
+static unsigned int php_next_marker(int socketd, FILE *fp, int issock,
int isfirst)
 /* get next marker byte from file */
 {
int c;
 
-   /* get marker byte, swallowing possible padding */
+   if (!isfirst) {
+   /* swallow bytes resulting from short marker length */
+   do {
+   if ((c = FP_FGETC(socketd, fp, issock)) ==
EOF)
+   return M_EOI;   /* we hit EOF */
+   } while (c != 0xff);
+   }
+
+   /* get marker byte, swallowing possible 0xff padding */
do {
if ((c = FP_FGETC(socketd, fp, issock)) == EOF)
return M_EOI;   /* we hit EOF */
@@ -320,12 +328,14 @@
 static struct gfxinfo *php_handle_jpeg (int socketd, FILE *fp, int
issock, pval *info)
 {
struct gfxinfo *result = NULL;
+   int isfirst = 1;/* First marker after JPEG sig 'FF D8
FF' */
unsigned int marker;
char tmp[2];
unsigned char a[4];
 
for (;;) {
-   marker = php_next_marker(socketd, fp, issock);
+   marker = php_next_marker(socketd, fp, issock,
isfirst);
+   isfirst = 0;
switch (marker) {
case M_SOF0:
case M_SOF1:



[2002-01-22 13:15:04] mul at rentapacs dot com

Offending images contain COM marker with length parameter two bytes
short. This breaks further decoding of JPEG header - GetImageSize()
cannot return useful information.



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/13213

-- 
Edit this 

#26633 [Opn-Bgs]: exec(), system() and backtick give maximum execution time error with Apache

2003-12-15 Thread sniper
 ID:   26633
 Updated by:   [EMAIL PROTECTED]
 Reported By:  jruffer at hss dot co dot uk
-Status:   Open
+Status:   Bogus
 Bug Type: Apache related
 Operating System: DG/UX
 PHP Version:  4.3.4
 New Comment:

Dunno what DG/UX even is, apparently not any OS we can support. (and as
you have modified the sources yourself..)




Previous Comments:


[2003-12-15 12:53:00] jruffer at hss dot co dot uk

set_time_limit(0) makes it work.



[2003-12-15 12:28:32] jruffer at hss dot co dot uk

Description:

These functions work fine using the CLI but when used with Apache give
a spurious execution timeout error.  I tried setting the timeout to
3 and it still happened immediately.  The problem occurs with any
command that I try to call using system(), exec() or backtick.  I do
not have safe-mode enabled.

I did have a couple of porting problems with DG/UX.  I had to add
#include sys/dir.h to main/php_scandir.h and
double expm1(double x)
{
  return(exp(x));
}
before #include php.h in ext/standard/math.c


'./configure' '--with-ingres=/OI/ingres' '--without-mysql'
'--enable-ftp' '--enable-cli' '--enable-cgi'
'--with-apache=/usr/opt/apache/apache_1.3.29' 

php.ini:
safe_mode_exec_dir = /usr/
log_errors = On
report_memleaks = Off
track_errors = On
error_log = /usr/opt/apache/www/logs/php.log
sendmail_from = [EMAIL PROTECTED]
ingres.allow_persistent = Off
ingres.default_database = divtest
ingres.default_user = devdba

Reproduce code:
---
?php
  print html\n;
  print h2 align='center'Attempting to run `ls -l` /h2\n;
  $list = `ls -l`;
  foreach($list as $value) {
  print $listbr\n;
  print /html\n;
?

Expected result:

Attempting to run `ls -l`

total 97 -rw-r--r-- 1 jeremy general 5520 Dec 12 09:56 build_status.php
-rw-r--r
-- 1 jeremy general 501 Dec 12 10:24 cr.menu -rw-r--r-- 1 jeremy
general 365 Dec
 2 08:49 debug.inc lrwxrwxrwx 1 jeremy general 11 Dec 2 09:36 doc -
/phase3/doc
 -rw-r--r-- 1 jeremy general 3868 Dec 10 18:29 image_request.php
-rw-r--r-- 1 je
remy other 2543 Dec 2 17:31 images.php -rw-r--r-- 1 jeremy general 86
Dec 12 11:
00 index.html -rw-r--r-- 1 jeremy general 362 Dec 1 16:12
index.old.html -rw-r--
r-- 1 jeremy general 77 Dec 10 12:08 info.php -rw-r--r-- 1 jeremy
general 105 De
c 12 11:21 ingkey.err -rw-r--r-- 1 jeremy general 386 Dec 12 12:21
init.inc -rw-
r--r-- 1 jeremy general 786 Dec 12 15:17 login.inc -rw-r--r-- 1 jeremy
general 2
05 Dec 12 11:10 login.php -rw-r--r-- 1 jeremy general 863 Dec 12 10:55
menu.php
-rw-r--r-- 1 jeremy general 1899 Dec 3 10:31 release.php -rw-r--r-- 1
jeremy gen
eral 569 Dec 7 10:08 resume.php -rw-r--r-- 1 jeremy general 1041 Dec 11
17:52 ru
n_signoff.php -rw-r--r-- 1 jeremy general 857 Dec 12 15:18 secure.inc
-rw-r--r--
 1 jeremy general 6712 Dec 15 09:30 signoff.php -rw-r--r-- 1 jeremy
general 1046
 Dec 3 11:37 suspend.php -rw-r--r-- 1 jeremy general 619 Dec 5 16:45
tech.html -
rw-r--r-- 1 jeremy general 155 Dec 15 17:08 test.php -rw-r--r-- 1
jeremy general
 2379 Dec 10 16:51 update_queue.php -rw-r--r-- 1 jeremy general 2783
Dec 10 16:4
8 update_queue.v1.php -rw-r--r-- 1 jeremy general 277 Dec 12 12:23
wrap.inc


Actual result:
--
Attempting to run `ls -l`

Fatal error: Maximum execution time of 30 seconds exceeded in
/usr/opt/apache/www/htdocs/image/test.php on line 4






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


#26598 [Opn-Fbk]: Segmentation fault

2003-12-15 Thread sniper
 ID:   26598
 Updated by:   [EMAIL PROTECTED]
 Reported By:  robert at interjinn dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Zend Engine 2 problem
 Operating System: Mandrake 9.0
 PHP Version:  5CVS-2003-12-12 (dev)
 New Comment:

Start by removing all the unnecessary lines from the first file, all
unnecessary include()'s etc. Then remove all the includes, ie. put the
stuff in one file. But only those parts of the code that are necessary
for the reduced first file..
 
Just remove stuff line by line, run the code and if it still crashes,
continue nuking the code until it doesn't crash. :)



Previous Comments:


[2003-12-15 15:03:09] robert at interjinn dot com

As stated previously I was unable to come up with a short script that
can reproduce the bug. I attached a link to a big script in my last
response. I apologize if this is not suitable but I don't see another
alternative.



[2003-12-15 09:43:05] [EMAIL PROTECTED]

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with ?php and ends with ?,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc.

If possible, make the script source available online and provide
an URL to it here. Try avoid embedding huge scripts into the report.





[2003-12-14 21:17:36] robert at interjinn dot com

I compiled and ran the latest CVS snapshot with the minimal compile
options indicated in a recent post with the same results. Engine still
segfaults at the same line of code. On the flip side, I also tried the
binary on the script I wanted to make available that illustrates the
problem, and it now works (so the bug previously mentioned as bFatal
error/b:  Only variables or references can be returned by
reference in
b/home/suds/yackspit/interJinn-0.9.1/Core/libraries/templateJinn/templ
ateManager.inc/b on line b17/bbr / is now fixed.) 

So to test you can download the following link:

http://www.interjinn.com/download/interJinn-0.9.1-php5mods.tar.gz

then switch into the created directory (interJinn-0.9.1-php5mods) and
type:

$ /usr/bin/wherever/phpbinary -qC makeInterJinnSite.php

The segfault should occur immediately after a bunch of deprecation
warnings.

HTH,
Rob.



[2003-12-14 20:23:25] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2003-12-12 18:10:28] robert at interjinn dot com

I hav recompiled with minimal extensions compiled in, namely:

./configure \
--disable-all \
--with-pcre-regex \
--prefix=/usr/local/php/${PHP_VERSION_DIR}/installation \
--exec-prefix=/usr/local/php/${PHP_VERSION_DIR}/installation

And I still have a no go. I spent the last 3 hours trying to produce a
short script which would illustrate the bug and running the PHP binary
through GDB and Valgrind to no avail. What I do know is that at:

zend_do_declare_property
(/usr/local/php/php5-200312120830/Zend/zend_compile.c:2442)

CG(active_class_entry) evaluates to null and so
CG(active_class_entry)-ce_flags causes a NULL pointer fault. I tried
patching with a test for NULL, but then I got a crash in
zend_hash_find() where the memory for the hash appeared to be corrupted
- Valgrind was not useful in determining where the memory may have
become corrupt.

I was going to set up a link to an InterJinn download, but while I was
testing to make sure it ran, I got the following error (possibly
related to this bug):

bFatal error/b:  Only variables or references can be returned by
reference in
b/home/suds/yackspit/interJinn-0.9.1/Core/libraries/templateJinn/templateManager.inc/b
on line b17/bbr /

For which the actual line of code is:

var $filename = __FILE__;

which is in a class. If it is also helpful I get a LOT of deprecated
warnings for:

bStrict Standards/b:  var: Deprecated. Please use the
public/private/protected modifiers.

The reason I think maybe the above is related is because in the
backtrace of the original report, and more recent ones with minimal
extensions, the zend_do_declare_property() function is attmepting to
work with a property called filename.



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/26598

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


#26625 [Fbk-Opn]: pg_convert sets NULL incorrectly for character data types

2003-12-15 Thread gregkiyomi at digitaljunkies dot ca
 ID:   26625
 User updated by:  gregkiyomi at digitaljunkies dot ca
 Reported By:  gregkiyomi at digitaljunkies dot ca
-Status:   Feedback
+Status:   Open
 Bug Type: PostgreSQL related
 Operating System: linux
 PHP Version:  5.0.0b2 (beta2)
 New Comment:

http://snaps.php.net/php5-latest.tar.gz has the same problem, as does
php 4.3.  I posted the fix in my original post.

In the switch statement in pgsql.c for text types
(PG_TEXT,PG_CHAR,PG_VARCHAR) if the string length is 0 and the
PGSQL_CONV_FORCE_NULL option is set then the value is set to NULL and
then is run through the php_pgsql_add_quotes() function. This results
with the value entered as 'NULL' when it should be NULL.

The solution, as in my original post is to put a break; statement
after the value is set to NULL so it doesn't get passed through the add
quotes function.  This was detailed in the diff I put in the original
post.

I have added this change and recompiled myself so the bug report was
merely for the benefit of the developers and anyone else who's having
this problem.

Hope this helps!:)


Previous Comments:


[2003-12-15 09:23:22] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2003-12-15 03:32:38] gregkiyomi at digitaljunkies dot ca

Description:

When using pg_convert() with PGSQL_CONV_FORCE_NULL option set the
resulting value for character data types (text,char,varchar) is set as
'NULL' instead of NULL.  This therefore inserts the string 'NULL' into
the database instead of the desired NULL value.  This also obviously
doesn't fail a NOT NULL check as it should.

The culprit is ext/pgsql/pgsql.c

*** pgsql.c~Mon Dec 15 00:17:01 2003
--- pgsql.c Mon Dec 15 01:28:56 2003
***
*** 3785,3790 
--- 3785,3791 
if (Z_STRLEN_PP(val) == 0) {
if (opt  PGSQL_CONV_FORCE_NULL) {
ZVAL_STRING(new_val, NULL, 1);
+   break;
}
else {
ZVAL_STRING(new_val, empty_string, 1);

This prevents the NULL value from being passed through
php_pgsql_add_quotes().

This is also present in php 4.3.3.

Reproduce code:
---
$con_str = host=localhost dbname=database user=user password=pass;
$con = pg_connect($con_str);

$data = array(varchar_field1=test,
  varchar_field2=NULL,
  varchar_field3=);

$array = pg_convert($con,test_table,$data,4);
echo(pre);
print_r($array);
echo(/pre);


Expected result:

Array
(
[varchar_field1] = 'test'
[varchar_field2] = NULL
[varchar_field3] = NULL
)


Actual result:
--
Array
(
[varchar_field1] = 'test'
[varchar_field2] = NULL
[varchar_field3] = 'NULL'
)






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


#26636 [NEW]: multi-result-set on Sybase

2003-12-15 Thread a dot lahaye at wanadoo dot fr
From: a dot lahaye at wanadoo dot fr
Operating system: Linux RedHat 7.3
PHP version:  4.3.4
PHP Bug Type: *General Issues
Bug description:  multi-result-set on Sybase

Description:

Hi,

When your run a stored procedure (under sybase) that make multi-result-set
you can only have the first multi-result-set (not the other).

Bug related to : #13763, #11475, #13475, #13735, #12074

for example in a stored procedure (at the end of this)


SELECT LIB1, LIB2 FROM LIBELLE
SELECT NAME, FNAME FROM PEOPLE

You have only date from table LIBELLE


Expected result:

From java you can access to the multi-result-set

Actual result:
--
get only the first result set

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


#25266 [NoF-Opn]: connection_status() ( see bug #22072 ).

2003-12-15 Thread avarnals at zigg dot net
 ID:   25266
 User updated by:  avarnals at zigg dot net
 Reported By:  avarnals at zigg dot net
-Status:   No Feedback
+Status:   Open
 Bug Type: Apache2 related
 Operating System: Linux 2.4.21
 PHP Version:  4.3.3
 New Comment:

I have just repeated the first simple test using
php4-STABLE-200312152230 and Apache 2.0.48, with PHP loaded as an
Apache module.

The bug has not gone. I.e. the httpd process continues to run the
script ( until halted by the PHP time limit ) after the browser's stop
button has been used.


Previous Comments:


[2003-12-14 21:17:48] [EMAIL PROTECTED]

No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to Open. Thank you.





[2003-12-09 06:15:42] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip





[2003-08-26 22:05:10] avarnals at zigg dot net

Description:

See bug #22072.

Since the above is now closed, I am creating this entry. Please accept
my apologies if it would have been better added to 22072 instead.

I wasn't aware of this potential problem until I saw it in the change
log for 4.3.3, so I thought I'd test it. Something is still not right.
I'm using PHP 4.3.3 with Apache 2.0.47.

My first test was to see whether ignore_user_abort() works as expected.
I used the very simple:

  ignore_user_abort ( false );
  while ( 1 );

This makes it easy to spot in the process list using 'top'. I tested
both using PHP as a dynamically loaded Apache module and the CGI
binary. The latter had safe mode enabled, the former didn't; I don't
know whether this can/should make any difference. In both cases the
script continued to execute after I clicked on the browser's stop
button and until its PHP enforced time limit was reached.

I then went on to test ( using only the Apache module ) using the code
suggested in bug report 22072:

  http://www.mpfreescene.com/test/?option=source

As rather expected now, this continued to execute after I'd used the
stop button.

I went on to test by modifying the code as follows:

  - I set set_time_limit(15); so it would eventually be
  aborted by this limit.
  - I made $m very large.
  - Have the result of connection_status() written to a
  file each time round the loop.
  - I removed the sleep() call.

I ran the script and used the stop button while it was running. It
continued to execute until it had used 15 seconds of CPU time. Log file
shows: httpd: PHP Fatal error:  Maximum execution time of 15 seconds
exceeded in...
The final ( large ) output file contained all zeros and a final 2.

So, it seems that PHP correctly detects and reports the case of a
timeout, but not an abort.

I noticed one other possibly odd thing while doing this. If PHP has
output buffering enabled, the call to flush() results in the script
being immediately shut down ( execution doesn't get to the line
following flush() ). The result of connection_status() when called in
exitfp() is then 1. If the flush() call is removed, the results as
previously described are the same whether or not output buffering is
enabled.

I hope someone can make sense of all this! Do let me know if you would
like any further information.







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


#26611 [Fbk-Opn]: make install [install-pear-installer] Error 134

2003-12-15 Thread george_planansky at harvard dot edu
 ID:   26611
 User updated by:  george_planansky at harvard dot edu
 Reported By:  george_planansky at harvard dot edu
-Status:   Feedback
+Status:   Open
 Bug Type: Compile Failure
 Operating System: solaris 2.8 patched to nov 2003
 PHP Version:  4CVS-2003-12-13
 New Comment:

The problem seems to follow the pspell option.
I get the Abort if I configure with --with-pspell,
but do not get the Abort if I configure without it.
http://snaps.php.net/php4-STABLE-latest.tar.gz

This was true of a more inclusive configure ...
--with-pspell -- Abort .

The pspell library like most others I'm using
was built with gcc-3.0.X ... I'm trying to build it
with gcc-3.3.2 , just in case.

# ./configure
--with-openssl=/usr/local/openssl
--with-gettext=/usr/local
--with-pspell=/usr/local
--disable-all
--enable-xml
--with-pcre-regex
--enable-cli
--enable-debug

wacke(6)%cd sapi/cli
wacke(7)%./php -v
Abort (core dumped)
wacke(8)% gdb ./php ./core
GNU gdb 5.2.1
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and
you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type show copying to see the conditions.
There is absolutely no warranty for GDB.  Type show warranty for
details.
This GDB was configured as sparc-sun-solaris2.8...
Core was generated by `./php -v'.
Program terminated with signal 6, Aborted.
Reading symbols from /usr/local/lib/libpspell.so.4...done.
Loaded symbols for /usr/local/lib/libpspell.so.4
Reading symbols from /usr/local/lib/libltdl.so.3...done.
Loaded symbols for /usr/local/lib/libltdl.so.3
Reading symbols from /usr/local/lib/libpspell-modules.so.1...done.
Loaded symbols for /usr/local/lib/libpspell-modules.so.1
Reading symbols from /usr/local/lib/libstdc++.so.5...done.
Loaded symbols for /usr/local/lib/libstdc++.so.5
Reading symbols from /usr/lib/libm.so.1...done.
Loaded symbols for /usr/lib/libm.so.1
Reading symbols from /usr/local/lib/libgcc_s.so.1...done.
Loaded symbols for /usr/local/lib/libgcc_s.so.1
Reading symbols from /usr/local/lib/libintl.so.2...done.
Loaded symbols for /usr/local/lib/libintl.so.2
Reading symbols from /usr/local/lib/libiconv.so.2...done.
Loaded symbols for /usr/local/lib/libiconv.so.2
Reading symbols from /usr/lib/libc.so.1...done.
Loaded symbols for /usr/lib/libc.so.1
Reading symbols from /usr/local/openssl/lib/libssl.so.0.9.7...done.
Loaded symbols for /usr/local/openssl/lib/libssl.so.0.9.7
Reading symbols from /usr/local/openssl/lib/libcrypto.so.0.9.7...done.
Loaded symbols for /usr/local/openssl/lib/libcrypto.so.0.9.7
Reading symbols from /usr/lib/libresolv.so.2...done.
Loaded symbols for /usr/lib/libresolv.so.2
Reading symbols from /usr/lib/libdl.so.1...done.
Loaded symbols for /usr/lib/libdl.so.1
Reading symbols from /usr/lib/libnsl.so.1...done.
Loaded symbols for /usr/lib/libnsl.so.1
Reading symbols from /usr/lib/libsocket.so.1...done.
Loaded symbols for /usr/lib/libsocket.so.1
Reading symbols from /usr/local/lib/libstdc++.so.3...done.
Loaded symbols for /usr/local/lib/libstdc++.so.3
Reading symbols from /usr/lib/libmp.so.2...done.
Loaded symbols for /usr/lib/libmp.so.2
Reading symbols from
/usr/platform/SUNW,Ultra-5_10/lib/libc_psr.so.1...done.
Loaded symbols for /usr/platform/SUNW,Ultra-5_10/lib/libc_psr.so.1
#0  0xff09f980 in _libc_kill () from /usr/lib/libc.so.1
(gdb) bt#0  0xff09f980 in _libc_kill () from /usr/lib/libc.so.1
#1  0xff035964 in abort () from /usr/lib/libc.so.1
#2  0xff2e1adc in ?? () from /usr/local/lib/libstdc++.so.5
#3  0xff2e1b14 in ?? () from /usr/local/lib/libstdc++.so.5
#4  0xff2e1b24 in ?? () from /usr/local/lib/libstdc++.so.5
#5  0xff2e1a00 in ?? () from /usr/local/lib/libstdc++.so.5
#6  0xff2bfa3c in ?? () from /usr/local/lib/libstdc++.so.5
#7  0xff2b7098 in ?? () from /usr/local/lib/libstdc++.so.5
#8  0xff2b69a0 in ?? () from /usr/local/lib/libstdc++.so.5
#9  0xff2bbfd8 in ?? () from /usr/local/lib/libstdc++.so.5
#10 0xff2bc36c in ?? () from /usr/local/lib/libstdc++.so.5
#11 0xff377470 in ?? () from /usr/local/lib/libpspell.so.4
#12 0xff3774e0 in ?? () from /usr/local/lib/libpspell.so.4
#13 0xff378530 in ?? () from /usr/local/lib/libpspell.so.4
#14 0xff36e73c in ?? () from /usr/local/lib/libpspell.so.4
#15 0xff3bcf0c in ?? ()
#16 0xff3c7440 in ?? ()
#17 0xff3b2c30 in ?? ()
#18 0xff2f669c in ?? () from /usr/local/lib/libstdc++.so.5
#19 0xff2c4e94 in ?? () from /usr/local/lib/libstdc++.so.5
#20 0xff2d0d60 in ?? () from /usr/local/lib/libstdc++.so.5
#21 0xff2c0e9c in ?? () from /usr/local/lib/libstdc++.so.5
#22 0xff2bfa18 in ?? () from /usr/local/lib/libstdc++.so.5
#23 0xff2b7098 in ?? () from /usr/local/lib/libstdc++.so.5
#24 0xff2b69a0 in ?? () from /usr/local/lib/libstdc++.so.5
#25 0xff2bbfd8 in ?? () from /usr/local/lib/libstdc++.so.5
#26 0xff2bc36c in ?? () from /usr/local/lib/libstdc++.so.5
#27 0xff2b4740 in ?? () from /usr/local/lib/libstdc++.so.5
#28 0xff2b3068 in ?? () from 

#26625 [Opn-Csd]: pg_convert sets NULL incorrectly for character data types

2003-12-15 Thread iliaa
 ID:   26625
 Updated by:   [EMAIL PROTECTED]
 Reported By:  gregkiyomi at digitaljunkies dot ca
-Status:   Open
+Status:   Closed
 Bug Type: PostgreSQL related
 Operating System: linux
 PHP Version:  5.0.0b2 (beta2)
 New Comment:

This bug has been fixed in CVS.

In case this was a PHP problem, 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/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.




Previous Comments:


[2003-12-15 18:18:49] gregkiyomi at digitaljunkies dot ca

http://snaps.php.net/php5-latest.tar.gz has the same problem, as does
php 4.3.  I posted the fix in my original post.

In the switch statement in pgsql.c for text types
(PG_TEXT,PG_CHAR,PG_VARCHAR) if the string length is 0 and the
PGSQL_CONV_FORCE_NULL option is set then the value is set to NULL and
then is run through the php_pgsql_add_quotes() function. This results
with the value entered as 'NULL' when it should be NULL.

The solution, as in my original post is to put a break; statement
after the value is set to NULL so it doesn't get passed through the add
quotes function.  This was detailed in the diff I put in the original
post.

I have added this change and recompiled myself so the bug report was
merely for the benefit of the developers and anyone else who's having
this problem.

Hope this helps!:)



[2003-12-15 09:23:22] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2003-12-15 03:32:38] gregkiyomi at digitaljunkies dot ca

Description:

When using pg_convert() with PGSQL_CONV_FORCE_NULL option set the
resulting value for character data types (text,char,varchar) is set as
'NULL' instead of NULL.  This therefore inserts the string 'NULL' into
the database instead of the desired NULL value.  This also obviously
doesn't fail a NOT NULL check as it should.

The culprit is ext/pgsql/pgsql.c

*** pgsql.c~Mon Dec 15 00:17:01 2003
--- pgsql.c Mon Dec 15 01:28:56 2003
***
*** 3785,3790 
--- 3785,3791 
if (Z_STRLEN_PP(val) == 0) {
if (opt  PGSQL_CONV_FORCE_NULL) {
ZVAL_STRING(new_val, NULL, 1);
+   break;
}
else {
ZVAL_STRING(new_val, empty_string, 1);

This prevents the NULL value from being passed through
php_pgsql_add_quotes().

This is also present in php 4.3.3.

Reproduce code:
---
$con_str = host=localhost dbname=database user=user password=pass;
$con = pg_connect($con_str);

$data = array(varchar_field1=test,
  varchar_field2=NULL,
  varchar_field3=);

$array = pg_convert($con,test_table,$data,4);
echo(pre);
print_r($array);
echo(/pre);


Expected result:

Array
(
[varchar_field1] = 'test'
[varchar_field2] = NULL
[varchar_field3] = NULL
)


Actual result:
--
Array
(
[varchar_field1] = 'test'
[varchar_field2] = NULL
[varchar_field3] = 'NULL'
)






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


#26598 [Fbk-Opn]: Segmentation fault

2003-12-15 Thread robert at interjinn dot com
 ID:   26598
 User updated by:  robert at interjinn dot com
 Reported By:  robert at interjinn dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Zend Engine 2 problem
 Operating System: Mandrake 9.0
 PHP Version:  5CVS-2003-12-12 (dev)
 New Comment:

I have done as you asked and stripped away everything that I could
while still reproducing the same segmentation fault. You can download
the tarball at this following location:

http://www.interjinn.com/download/interJinn-0.9.1-php5mods-2.tar.gz


Previous Comments:


[2003-12-15 17:33:49] [EMAIL PROTECTED]

Start by removing all the unnecessary lines from the first file, all
unnecessary include()'s etc. Then remove all the includes, ie. put the
stuff in one file. But only those parts of the code that are necessary
for the reduced first file..
 
Just remove stuff line by line, run the code and if it still crashes,
continue nuking the code until it doesn't crash. :)




[2003-12-15 15:03:09] robert at interjinn dot com

As stated previously I was unable to come up with a short script that
can reproduce the bug. I attached a link to a big script in my last
response. I apologize if this is not suitable but I don't see another
alternative.



[2003-12-15 09:43:05] [EMAIL PROTECTED]

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with ?php and ends with ?,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc.

If possible, make the script source available online and provide
an URL to it here. Try avoid embedding huge scripts into the report.





[2003-12-14 21:17:36] robert at interjinn dot com

I compiled and ran the latest CVS snapshot with the minimal compile
options indicated in a recent post with the same results. Engine still
segfaults at the same line of code. On the flip side, I also tried the
binary on the script I wanted to make available that illustrates the
problem, and it now works (so the bug previously mentioned as bFatal
error/b:  Only variables or references can be returned by
reference in
b/home/suds/yackspit/interJinn-0.9.1/Core/libraries/templateJinn/templ
ateManager.inc/b on line b17/bbr / is now fixed.) 

So to test you can download the following link:

http://www.interjinn.com/download/interJinn-0.9.1-php5mods.tar.gz

then switch into the created directory (interJinn-0.9.1-php5mods) and
type:

$ /usr/bin/wherever/phpbinary -qC makeInterJinnSite.php

The segfault should occur immediately after a bunch of deprecation
warnings.

HTH,
Rob.



[2003-12-14 20:23:25] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





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/26598

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


#26618 [Fbk-Opn]: include_once() sometimes works, sometimes doesn't with each page refresh

2003-12-15 Thread t dot steve at ariadne-quatra dot com
 ID:   26618
 User updated by:  t dot steve at ariadne-quatra dot com
 Reported By:  t dot steve at ariadne-quatra dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Zend Engine 2 problem
 Operating System: Windows 2000 server SP4
 PHP Version:  5CVS-2003-12-14
 New Comment:

- No, I get no errors even after adding 'error_reporting(E_ALL);'.

- Yes, the same behaviour even if I use include() instead of
include_once().


Previous Comments:


[2003-12-15 09:25:33] [EMAIL PROTECTED]

Do you get any errors if you put 'error_reporting(E_ALL);' before the
include_once() line? 

Does this happen if you use include() ?




[2003-12-15 08:40:15] t dot steve at ariadne-quatra dot com

The same :( - includes are done eratically.

A note here: this is also the case if I start to wander around the site
(as opposed to just refreshing the same page again and again), i.e. as
the various pages are loaded, sometimes the inlude is done, sometimes
it is not.



[2003-12-14 20:21:56] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2003-12-14 10:46:58] t dot steve at ariadne-quatra dot com

Description:

PHP5 beta2
IIS5
Windows 2000 SP4
ISAPI mode

- Worked correctly with PHP4.3.4 with Zend 2.0.1

- With PHP5 beta2 (also ISAPI mode) a simple PHP page which uses
include_once([local path]) to include the menu part of a web page
sometimes works, sometimes does not (sometimes the menu is included,
sometimes it is not). (There is only the single include_once in the
code, so this is NOT an issue of my trying to include something twice
with include_ONCE... )

- The page contains NO other PHP code, just the lines below:
% include_once(c:/wwwroot/domain.com/english/inc/header.inc); %

(html_head.inc is the file to be included, it contains only html code,
no php)

- Again, note that the exact same page, exact same setup works fine
under 4.3.4 - and has done so with previous versions!

- Under PHP5, with every refresh of the page the inclusion of the file
is erratic - every few refreshes the inclusion is not done.

If you need any part of my php.ini, let me know please.

Thanks,
Steve

Reproduce code:
---
html
head
titleThe world of services/title
/head
body

% include_once(c:/wwwroot/domain.com/english/inc/header.inc); %

Please select from the menu on the left!

/body
/html

Expected result:

A page with the menu on the left (created fromt he included file), plus
the contents.

Actual result:
--
Only the contents apperas, the inclusion is not done.





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


#26598 [Opn-Fbk]: Segmentation fault

2003-12-15 Thread sniper
 ID:   26598
 Updated by:   [EMAIL PROTECTED]
 Reported By:  robert at interjinn dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Zend Engine 2 problem
 Operating System: Mandrake 9.0
 PHP Version:  5CVS-2003-12-12 (dev)
 New Comment:

Maybe I wasn't clear enough..but I think I said something about ONE
file..? And that generating of some weird configuration file really
wasn't necessary either?
(one file - no need for includes - no need for config file)

hardcode the stuff..



Previous Comments:


[2003-12-15 20:46:46] robert at interjinn dot com

I have done as you asked and stripped away everything that I could
while still reproducing the same segmentation fault. You can download
the tarball at this following location:

http://www.interjinn.com/download/interJinn-0.9.1-php5mods-2.tar.gz



[2003-12-15 17:33:49] [EMAIL PROTECTED]

Start by removing all the unnecessary lines from the first file, all
unnecessary include()'s etc. Then remove all the includes, ie. put the
stuff in one file. But only those parts of the code that are necessary
for the reduced first file..
 
Just remove stuff line by line, run the code and if it still crashes,
continue nuking the code until it doesn't crash. :)




[2003-12-15 15:03:09] robert at interjinn dot com

As stated previously I was unable to come up with a short script that
can reproduce the bug. I attached a link to a big script in my last
response. I apologize if this is not suitable but I don't see another
alternative.



[2003-12-15 09:43:05] [EMAIL PROTECTED]

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with ?php and ends with ?,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc.

If possible, make the script source available online and provide
an URL to it here. Try avoid embedding huge scripts into the report.





[2003-12-14 21:17:36] robert at interjinn dot com

I compiled and ran the latest CVS snapshot with the minimal compile
options indicated in a recent post with the same results. Engine still
segfaults at the same line of code. On the flip side, I also tried the
binary on the script I wanted to make available that illustrates the
problem, and it now works (so the bug previously mentioned as bFatal
error/b:  Only variables or references can be returned by
reference in
b/home/suds/yackspit/interJinn-0.9.1/Core/libraries/templateJinn/templ
ateManager.inc/b on line b17/bbr / is now fixed.) 

So to test you can download the following link:

http://www.interjinn.com/download/interJinn-0.9.1-php5mods.tar.gz

then switch into the created directory (interJinn-0.9.1-php5mods) and
type:

$ /usr/bin/wherever/phpbinary -qC makeInterJinnSite.php

The segfault should occur immediately after a bunch of deprecation
warnings.

HTH,
Rob.



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/26598

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


#26618 [Opn-Fbk]: include_once() sometimes works, sometimes doesn't with each page refresh

2003-12-15 Thread sniper
 ID:   26618
 Updated by:   [EMAIL PROTECTED]
 Reported By:  t dot steve at ariadne-quatra dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Zend Engine 2 problem
 Operating System: Windows 2000 server SP4
 PHP Version:  5CVS-2003-12-14
 New Comment:

Are you absolutely sure you are using the latest CVS snapshot?
Grab the latest now, remove ALL (and I mean _all_) php related dlls
from your system before you install it.

Most important one being php4ts.dll (make sure you only have ONE of
those around). Also make sure IIS is not running when you install
PHP..



Previous Comments:


[2003-12-15 22:04:48] t dot steve at ariadne-quatra dot com

- No, I get no errors even after adding 'error_reporting(E_ALL);'.

- Yes, the same behaviour even if I use include() instead of
include_once().



[2003-12-15 09:25:33] [EMAIL PROTECTED]

Do you get any errors if you put 'error_reporting(E_ALL);' before the
include_once() line? 

Does this happen if you use include() ?




[2003-12-15 08:40:15] t dot steve at ariadne-quatra dot com

The same :( - includes are done eratically.

A note here: this is also the case if I start to wander around the site
(as opposed to just refreshing the same page again and again), i.e. as
the various pages are loaded, sometimes the inlude is done, sometimes
it is not.



[2003-12-14 20:21:56] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2003-12-14 10:46:58] t dot steve at ariadne-quatra dot com

Description:

PHP5 beta2
IIS5
Windows 2000 SP4
ISAPI mode

- Worked correctly with PHP4.3.4 with Zend 2.0.1

- With PHP5 beta2 (also ISAPI mode) a simple PHP page which uses
include_once([local path]) to include the menu part of a web page
sometimes works, sometimes does not (sometimes the menu is included,
sometimes it is not). (There is only the single include_once in the
code, so this is NOT an issue of my trying to include something twice
with include_ONCE... )

- The page contains NO other PHP code, just the lines below:
% include_once(c:/wwwroot/domain.com/english/inc/header.inc); %

(html_head.inc is the file to be included, it contains only html code,
no php)

- Again, note that the exact same page, exact same setup works fine
under 4.3.4 - and has done so with previous versions!

- Under PHP5, with every refresh of the page the inclusion of the file
is erratic - every few refreshes the inclusion is not done.

If you need any part of my php.ini, let me know please.

Thanks,
Steve

Reproduce code:
---
html
head
titleThe world of services/title
/head
body

% include_once(c:/wwwroot/domain.com/english/inc/header.inc); %

Please select from the menu on the left!

/body
/html

Expected result:

A page with the menu on the left (created fromt he included file), plus
the contents.

Actual result:
--
Only the contents apperas, the inclusion is not done.





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


#26611 [Opn-Bgs]: make install [install-pear-installer] Error 134

2003-12-15 Thread sniper
 ID:   26611
 Updated by:   [EMAIL PROTECTED]
 Reported By:  george_planansky at harvard dot edu
-Status:   Open
+Status:   Bogus
 Bug Type: Compile Failure
 Operating System: solaris 2.8 patched to nov 2003
 PHP Version:  4CVS-2003-12-13
 New Comment:

Most likely this crash will disappear when you cleanup and compile
all related stuff with same compiler / linker.

In any case, this is not PHP bug as is.



Previous Comments:


[2003-12-15 19:51:52] george_planansky at harvard dot edu

The problem seems to follow the pspell option.
I get the Abort if I configure with --with-pspell,
but do not get the Abort if I configure without it.
http://snaps.php.net/php4-STABLE-latest.tar.gz

This was true of a more inclusive configure ...
--with-pspell -- Abort .

The pspell library like most others I'm using
was built with gcc-3.0.X ... I'm trying to build it
with gcc-3.3.2 , just in case.

# ./configure
--with-openssl=/usr/local/openssl
--with-gettext=/usr/local
--with-pspell=/usr/local
--disable-all
--enable-xml
--with-pcre-regex
--enable-cli
--enable-debug

wacke(6)%cd sapi/cli
wacke(7)%./php -v
Abort (core dumped)
wacke(8)% gdb ./php ./core
GNU gdb 5.2.1
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and
you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type show copying to see the conditions.
There is absolutely no warranty for GDB.  Type show warranty for
details.
This GDB was configured as sparc-sun-solaris2.8...
Core was generated by `./php -v'.
Program terminated with signal 6, Aborted.
Reading symbols from /usr/local/lib/libpspell.so.4...done.
Loaded symbols for /usr/local/lib/libpspell.so.4
Reading symbols from /usr/local/lib/libltdl.so.3...done.
Loaded symbols for /usr/local/lib/libltdl.so.3
Reading symbols from /usr/local/lib/libpspell-modules.so.1...done.
Loaded symbols for /usr/local/lib/libpspell-modules.so.1
Reading symbols from /usr/local/lib/libstdc++.so.5...done.
Loaded symbols for /usr/local/lib/libstdc++.so.5
Reading symbols from /usr/lib/libm.so.1...done.
Loaded symbols for /usr/lib/libm.so.1
Reading symbols from /usr/local/lib/libgcc_s.so.1...done.
Loaded symbols for /usr/local/lib/libgcc_s.so.1
Reading symbols from /usr/local/lib/libintl.so.2...done.
Loaded symbols for /usr/local/lib/libintl.so.2
Reading symbols from /usr/local/lib/libiconv.so.2...done.
Loaded symbols for /usr/local/lib/libiconv.so.2
Reading symbols from /usr/lib/libc.so.1...done.
Loaded symbols for /usr/lib/libc.so.1
Reading symbols from /usr/local/openssl/lib/libssl.so.0.9.7...done.
Loaded symbols for /usr/local/openssl/lib/libssl.so.0.9.7
Reading symbols from /usr/local/openssl/lib/libcrypto.so.0.9.7...done.
Loaded symbols for /usr/local/openssl/lib/libcrypto.so.0.9.7
Reading symbols from /usr/lib/libresolv.so.2...done.
Loaded symbols for /usr/lib/libresolv.so.2
Reading symbols from /usr/lib/libdl.so.1...done.
Loaded symbols for /usr/lib/libdl.so.1
Reading symbols from /usr/lib/libnsl.so.1...done.
Loaded symbols for /usr/lib/libnsl.so.1
Reading symbols from /usr/lib/libsocket.so.1...done.
Loaded symbols for /usr/lib/libsocket.so.1
Reading symbols from /usr/local/lib/libstdc++.so.3...done.
Loaded symbols for /usr/local/lib/libstdc++.so.3
Reading symbols from /usr/lib/libmp.so.2...done.
Loaded symbols for /usr/lib/libmp.so.2
Reading symbols from
/usr/platform/SUNW,Ultra-5_10/lib/libc_psr.so.1...done.
Loaded symbols for /usr/platform/SUNW,Ultra-5_10/lib/libc_psr.so.1
#0  0xff09f980 in _libc_kill () from /usr/lib/libc.so.1
(gdb) bt#0  0xff09f980 in _libc_kill () from /usr/lib/libc.so.1
#1  0xff035964 in abort () from /usr/lib/libc.so.1
#2  0xff2e1adc in ?? () from /usr/local/lib/libstdc++.so.5
#3  0xff2e1b14 in ?? () from /usr/local/lib/libstdc++.so.5
#4  0xff2e1b24 in ?? () from /usr/local/lib/libstdc++.so.5
#5  0xff2e1a00 in ?? () from /usr/local/lib/libstdc++.so.5
#6  0xff2bfa3c in ?? () from /usr/local/lib/libstdc++.so.5
#7  0xff2b7098 in ?? () from /usr/local/lib/libstdc++.so.5
#8  0xff2b69a0 in ?? () from /usr/local/lib/libstdc++.so.5
#9  0xff2bbfd8 in ?? () from /usr/local/lib/libstdc++.so.5
#10 0xff2bc36c in ?? () from /usr/local/lib/libstdc++.so.5
#11 0xff377470 in ?? () from /usr/local/lib/libpspell.so.4
#12 0xff3774e0 in ?? () from /usr/local/lib/libpspell.so.4
#13 0xff378530 in ?? () from /usr/local/lib/libpspell.so.4
#14 0xff36e73c in ?? () from /usr/local/lib/libpspell.so.4
#15 0xff3bcf0c in ?? ()
#16 0xff3c7440 in ?? ()
#17 0xff3b2c30 in ?? ()
#18 0xff2f669c in ?? () from /usr/local/lib/libstdc++.so.5
#19 0xff2c4e94 in ?? () from /usr/local/lib/libstdc++.so.5
#20 0xff2d0d60 in ?? () from /usr/local/lib/libstdc++.so.5
#21 0xff2c0e9c in ?? () from /usr/local/lib/libstdc++.so.5
#22 0xff2bfa18 in ?? () from /usr/local/lib/libstdc++.so.5
#23 0xff2b7098 in ?? () from /usr/local/lib/libstdc++.so.5
#24 

#26636 [Opn-Bgs]: multi-result-set on Sybase

2003-12-15 Thread sniper
 ID:   26636
 Updated by:   [EMAIL PROTECTED]
 Reported By:  a dot lahaye at wanadoo dot fr
-Status:   Open
+Status:   Bogus
-Bug Type: *General Issues
+Bug Type: Sybase-ct (ctlib) related
 Operating System: Linux RedHat 7.3
 PHP Version:  4.3.4
 New Comment:

Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. 

Thank you for your interest in PHP.

See bug #13475



Previous Comments:


[2003-12-15 18:29:09] a dot lahaye at wanadoo dot fr

Description:

Hi,

When your run a stored procedure (under sybase) that make
multi-result-set you can only have the first multi-result-set (not the
other).

Bug related to : #13763, #11475, #13475, #13735, #12074

for example in a stored procedure (at the end of this)


SELECT LIB1, LIB2 FROM LIBELLE
SELECT NAME, FNAME FROM PEOPLE

You have only date from table LIBELLE


Expected result:

From java you can access to the multi-result-set

Actual result:
--
get only the first result set





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


#26618 [Fbk-Opn]: include_once() sometimes works, sometimes doesn't with each page refresh

2003-12-15 Thread t dot steve at ariadne-quatra dot com
 ID:   26618
 User updated by:  t dot steve at ariadne-quatra dot com
 Reported By:  t dot steve at ariadne-quatra dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Zend Engine 2 problem
 Operating System: Windows 2000 server SP4
 PHP Version:  5CVS-2003-12-14
 New Comment:

I always downloaded http://snaps.php.net/win32/php5-win32-latest.zip
each time I tried something new! It was no different this time - a new
download and install before I tried what you requested! (No local proxy
or cache - I am downloading the actual file each time!)

I have ALL PHP-related DLLs in my PHP dir, nothing in WINNT and so
on... I checked and double-checked!

Each time I want to try PHP5 this is what I do:
- stop IIS
- rename PHP (whcih is where my current PHP version resides) to PHP4
- create a new, empty PHP dir, and expand the downloaded ZIP in there
- copy the php4isapi.dll from the sapi folder up one level to the PHP
folder (this is how I have IIS set up)
- no need to move anything anywhere else, my system is set up so that
there is no need to copy any DLLS to the WINNT directory (I also
checked to make sure there are none there - there aren't!)
- then restart IIS
- test...

Please let me know if there is anything else I can do to help! Many
thanks!

Steve


Previous Comments:


[2003-12-15 23:58:55] [EMAIL PROTECTED]

Are you absolutely sure you are using the latest CVS snapshot?
Grab the latest now, remove ALL (and I mean _all_) php related dlls
from your system before you install it.

Most important one being php4ts.dll (make sure you only have ONE of
those around). Also make sure IIS is not running when you install
PHP..




[2003-12-15 22:04:48] t dot steve at ariadne-quatra dot com

- No, I get no errors even after adding 'error_reporting(E_ALL);'.

- Yes, the same behaviour even if I use include() instead of
include_once().



[2003-12-15 09:25:33] [EMAIL PROTECTED]

Do you get any errors if you put 'error_reporting(E_ALL);' before the
include_once() line? 

Does this happen if you use include() ?




[2003-12-15 08:40:15] t dot steve at ariadne-quatra dot com

The same :( - includes are done eratically.

A note here: this is also the case if I start to wander around the site
(as opposed to just refreshing the same page again and again), i.e. as
the various pages are loaded, sometimes the inlude is done, sometimes
it is not.



[2003-12-14 20:21:56] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





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/26618

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


#26618 [Opn]: include_once() sometimes works, sometimes doesn't with each page refresh

2003-12-15 Thread t dot steve at ariadne-quatra dot com
 ID:   26618
 User updated by:  t dot steve at ariadne-quatra dot com
 Reported By:  t dot steve at ariadne-quatra dot com
 Status:   Open
 Bug Type: Zend Engine 2 problem
 Operating System: Windows 2000 server SP4
 PHP Version:  5CVS-2003-12-14
 New Comment:

Sorry, to clarify: by It was no different this time - ... I meant
that I did it the same way this time as well.


Previous Comments:


[2003-12-16 00:11:22] t dot steve at ariadne-quatra dot com

I always downloaded http://snaps.php.net/win32/php5-win32-latest.zip
each time I tried something new! It was no different this time - a new
download and install before I tried what you requested! (No local proxy
or cache - I am downloading the actual file each time!)

I have ALL PHP-related DLLs in my PHP dir, nothing in WINNT and so
on... I checked and double-checked!

Each time I want to try PHP5 this is what I do:
- stop IIS
- rename PHP (whcih is where my current PHP version resides) to PHP4
- create a new, empty PHP dir, and expand the downloaded ZIP in there
- copy the php4isapi.dll from the sapi folder up one level to the PHP
folder (this is how I have IIS set up)
- no need to move anything anywhere else, my system is set up so that
there is no need to copy any DLLS to the WINNT directory (I also
checked to make sure there are none there - there aren't!)
- then restart IIS
- test...

Please let me know if there is anything else I can do to help! Many
thanks!

Steve



[2003-12-15 23:58:55] [EMAIL PROTECTED]

Are you absolutely sure you are using the latest CVS snapshot?
Grab the latest now, remove ALL (and I mean _all_) php related dlls
from your system before you install it.

Most important one being php4ts.dll (make sure you only have ONE of
those around). Also make sure IIS is not running when you install
PHP..




[2003-12-15 22:04:48] t dot steve at ariadne-quatra dot com

- No, I get no errors even after adding 'error_reporting(E_ALL);'.

- Yes, the same behaviour even if I use include() instead of
include_once().



[2003-12-15 09:25:33] [EMAIL PROTECTED]

Do you get any errors if you put 'error_reporting(E_ALL);' before the
include_once() line? 

Does this happen if you use include() ?




[2003-12-15 08:40:15] t dot steve at ariadne-quatra dot com

The same :( - includes are done eratically.

A note here: this is also the case if I start to wander around the site
(as opposed to just refreshing the same page again and again), i.e. as
the various pages are loaded, sometimes the inlude is done, sometimes
it is not.



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/26618

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


#26637 [NEW]: pickle/unpickle

2003-12-15 Thread scott at scottdial dot com
From: scott at scottdial dot com
Operating system: N/A
PHP version:  4.3.4
PHP Bug Type: Feature/Change Request
Bug description:  pickle/unpickle

Description:

For the unknowing, pickle is the python derived term for object
serialization. Currenlty, session management has such functionality, but
this functionality is not exposed to the programmer to be done outside of
using a session. I propose there be a pickle/unpickle function that uses
the same serialization method that the session managment uses.

Reproduce code:
---
$foo = array(1, 2, 3)
$string = pickle($foo);

echo $string;

$bar = unpickle($foo);

echo $bar;
print_r($bar);

Expected result:

a:3:{i:0;i:1;i:1;i:2;i:2;i:3;}

Array
Array ( [0] = 1 [1] = 2 [2] = 3 )



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


#26637 [Opn]: pickle/unpickle function

2003-12-15 Thread scott at scottdial dot com
 ID:   26637
 User updated by:  scott at scottdial dot com
-Summary:  pickle/unpickle
 Reported By:  scott at scottdial dot com
 Status:   Open
 Bug Type: Feature/Change Request
 Operating System: N/A
-PHP Version:  4.3.4
+PHP Version:  Any
 New Comment:

I typo'd.. should be: $bar = unpickle($string);


Previous Comments:


[2003-12-16 01:20:34] scott at scottdial dot com

Description:

For the unknowing, pickle is the python derived term for object
serialization. Currenlty, session management has such functionality,
but this functionality is not exposed to the programmer to be done
outside of using a session. I propose there be a pickle/unpickle
function that uses the same serialization method that the session
managment uses.

Reproduce code:
---
$foo = array(1, 2, 3)
$string = pickle($foo);

echo $string;

$bar = unpickle($foo);

echo $bar;
print_r($bar);

Expected result:

a:3:{i:0;i:1;i:1;i:2;i:2;i:3;}

Array
Array ( [0] = 1 [1] = 2 [2] = 3 )







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


#26637 [Opn-Bgs]: pickle/unpickle function

2003-12-15 Thread scott at scottdial dot com
 ID:   26637
 User updated by:  scott at scottdial dot com
 Reported By:  scott at scottdial dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Feature/Change Request
 Operating System: N/A
 PHP Version:  Any
 New Comment:

Doh, I needed to RTFM harder :-p


Previous Comments:


[2003-12-16 01:23:08] scott at scottdial dot com

I typo'd.. should be: $bar = unpickle($string);



[2003-12-16 01:20:34] scott at scottdial dot com

Description:

For the unknowing, pickle is the python derived term for object
serialization. Currenlty, session management has such functionality,
but this functionality is not exposed to the programmer to be done
outside of using a session. I propose there be a pickle/unpickle
function that uses the same serialization method that the session
managment uses.

Reproduce code:
---
$foo = array(1, 2, 3)
$string = pickle($foo);

echo $string;

$bar = unpickle($foo);

echo $bar;
print_r($bar);

Expected result:

a:3:{i:0;i:1;i:1;i:2;i:2;i:3;}

Array
Array ( [0] = 1 [1] = 2 [2] = 3 )







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


#26598 [Fbk-Opn]: Segmentation fault

2003-12-15 Thread robert at interjinn dot com
 ID:   26598
 User updated by:  robert at interjinn dot com
 Reported By:  robert at interjinn dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Zend Engine 2 problem
 Operating System: Mandrake 9.0
 PHP Version:  5CVS-2003-12-12 (dev)
 New Comment:

The following does NOT combine everything into one file since when I do
that the segmentation fault disappears. However, it does shrink the
code into as few files as possible.

http://www.interjinn.com/download/interJinn-0.9.1-php5mods-3.tar.gz

FYI, I'm not getting payed for this, I don't get payed to do InterJinn,
and I have very little disposable time lately since I became a father 3
weeks ago. I'm doing this because I came across a bug and thought I
would help out, I was not paricularly in a rush to ensure InterJinn has
PHP5 compatibility, since I don't think it's going to have massive
adoption for a year or two. I just happened to have a little spare time
one night to test. Now I've spent about 10 hours debugging, trimming,
and rewriting various chunks of my application all so I could help you
guys. Time which probably would have been better spent helping my wife
with the baby. A little tolerance and less sarcasm would be great for
your karma.

Thanks,
Rob.


Previous Comments:


[2003-12-15 23:56:02] [EMAIL PROTECTED]

Maybe I wasn't clear enough..but I think I said something about ONE
file..? And that generating of some weird configuration file really
wasn't necessary either?
(one file - no need for includes - no need for config file)

hardcode the stuff..




[2003-12-15 20:46:46] robert at interjinn dot com

I have done as you asked and stripped away everything that I could
while still reproducing the same segmentation fault. You can download
the tarball at this following location:

http://www.interjinn.com/download/interJinn-0.9.1-php5mods-2.tar.gz



[2003-12-15 17:33:49] [EMAIL PROTECTED]

Start by removing all the unnecessary lines from the first file, all
unnecessary include()'s etc. Then remove all the includes, ie. put the
stuff in one file. But only those parts of the code that are necessary
for the reduced first file..
 
Just remove stuff line by line, run the code and if it still crashes,
continue nuking the code until it doesn't crash. :)




[2003-12-15 15:03:09] robert at interjinn dot com

As stated previously I was unable to come up with a short script that
can reproduce the bug. I attached a link to a big script in my last
response. I apologize if this is not suitable but I don't see another
alternative.



[2003-12-15 09:43:05] [EMAIL PROTECTED]

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with ?php and ends with ?,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc.

If possible, make the script source available online and provide
an URL to it here. Try avoid embedding huge scripts into the report.





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/26598

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


#26611 [Bgs]: make install [install-pear-installer] Error 134

2003-12-15 Thread george_planansky at harvard dot edu
 ID:   26611
 User updated by:  george_planansky at harvard dot edu
 Reported By:  george_planansky at harvard dot edu
 Status:   Bogus
 Bug Type: Compile Failure
 Operating System: solaris 2.8 patched to nov 2003
 PHP Version:  4CVS-2003-12-13
 New Comment:

Evidently --with-pspell used to use pspell, but, by php-4.3,
changed to use aspell instead.  Not surprisingly, this
cryptic change cryptically breaks builds that once
used --with-pspell successfully.  

If that is indeed the case ... then --with-pspell
is a booby trap.

I strongly suggest getting rid of --with-pspell and
adding --with-aspell .  Losing the former will explictly
alert people of the change (breaking, and no longer using, pspell);
adding the latter will indicate what to use
instead (aspell).   Would have saved me grief.


Previous Comments:


[2003-12-16 00:05:35] [EMAIL PROTECTED]

Most likely this crash will disappear when you cleanup and compile
all related stuff with same compiler / linker.

In any case, this is not PHP bug as is.




[2003-12-15 19:51:52] george_planansky at harvard dot edu

The problem seems to follow the pspell option.
I get the Abort if I configure with --with-pspell,
but do not get the Abort if I configure without it.
http://snaps.php.net/php4-STABLE-latest.tar.gz

This was true of a more inclusive configure ...
--with-pspell -- Abort .

The pspell library like most others I'm using
was built with gcc-3.0.X ... I'm trying to build it
with gcc-3.3.2 , just in case.

# ./configure
--with-openssl=/usr/local/openssl
--with-gettext=/usr/local
--with-pspell=/usr/local
--disable-all
--enable-xml
--with-pcre-regex
--enable-cli
--enable-debug

wacke(6)%cd sapi/cli
wacke(7)%./php -v
Abort (core dumped)
wacke(8)% gdb ./php ./core
GNU gdb 5.2.1
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and
you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type show copying to see the conditions.
There is absolutely no warranty for GDB.  Type show warranty for
details.
This GDB was configured as sparc-sun-solaris2.8...
Core was generated by `./php -v'.
Program terminated with signal 6, Aborted.
Reading symbols from /usr/local/lib/libpspell.so.4...done.
Loaded symbols for /usr/local/lib/libpspell.so.4
Reading symbols from /usr/local/lib/libltdl.so.3...done.
Loaded symbols for /usr/local/lib/libltdl.so.3
Reading symbols from /usr/local/lib/libpspell-modules.so.1...done.
Loaded symbols for /usr/local/lib/libpspell-modules.so.1
Reading symbols from /usr/local/lib/libstdc++.so.5...done.
Loaded symbols for /usr/local/lib/libstdc++.so.5
Reading symbols from /usr/lib/libm.so.1...done.
Loaded symbols for /usr/lib/libm.so.1
Reading symbols from /usr/local/lib/libgcc_s.so.1...done.
Loaded symbols for /usr/local/lib/libgcc_s.so.1
Reading symbols from /usr/local/lib/libintl.so.2...done.
Loaded symbols for /usr/local/lib/libintl.so.2
Reading symbols from /usr/local/lib/libiconv.so.2...done.
Loaded symbols for /usr/local/lib/libiconv.so.2
Reading symbols from /usr/lib/libc.so.1...done.
Loaded symbols for /usr/lib/libc.so.1
Reading symbols from /usr/local/openssl/lib/libssl.so.0.9.7...done.
Loaded symbols for /usr/local/openssl/lib/libssl.so.0.9.7
Reading symbols from /usr/local/openssl/lib/libcrypto.so.0.9.7...done.
Loaded symbols for /usr/local/openssl/lib/libcrypto.so.0.9.7
Reading symbols from /usr/lib/libresolv.so.2...done.
Loaded symbols for /usr/lib/libresolv.so.2
Reading symbols from /usr/lib/libdl.so.1...done.
Loaded symbols for /usr/lib/libdl.so.1
Reading symbols from /usr/lib/libnsl.so.1...done.
Loaded symbols for /usr/lib/libnsl.so.1
Reading symbols from /usr/lib/libsocket.so.1...done.
Loaded symbols for /usr/lib/libsocket.so.1
Reading symbols from /usr/local/lib/libstdc++.so.3...done.
Loaded symbols for /usr/local/lib/libstdc++.so.3
Reading symbols from /usr/lib/libmp.so.2...done.
Loaded symbols for /usr/lib/libmp.so.2
Reading symbols from
/usr/platform/SUNW,Ultra-5_10/lib/libc_psr.so.1...done.
Loaded symbols for /usr/platform/SUNW,Ultra-5_10/lib/libc_psr.so.1
#0  0xff09f980 in _libc_kill () from /usr/lib/libc.so.1
(gdb) bt#0  0xff09f980 in _libc_kill () from /usr/lib/libc.so.1
#1  0xff035964 in abort () from /usr/lib/libc.so.1
#2  0xff2e1adc in ?? () from /usr/local/lib/libstdc++.so.5
#3  0xff2e1b14 in ?? () from /usr/local/lib/libstdc++.so.5
#4  0xff2e1b24 in ?? () from /usr/local/lib/libstdc++.so.5
#5  0xff2e1a00 in ?? () from /usr/local/lib/libstdc++.so.5
#6  0xff2bfa3c in ?? () from /usr/local/lib/libstdc++.so.5
#7  0xff2b7098 in ?? () from /usr/local/lib/libstdc++.so.5
#8  0xff2b69a0 in ?? () from /usr/local/lib/libstdc++.so.5
#9  0xff2bbfd8 in ?? () from /usr/local/lib/libstdc++.so.5
#10 0xff2bc36c in ?? () from /usr/local/lib/libstdc++.so.5
#11 0xff377470