#23059 [Opn->Ana]: Documentation wrong? Or just used the wrong word?

2003-04-05 Thread jmcastagnetto
 ID:   23059
 Updated by:   [EMAIL PROTECTED]
 Reported By:  kyrael at web dot de
-Status:   Open
+Status:   Analyzed
-Bug Type: Documentation problem
+Bug Type: Session related
 Operating System: Linux
 PHP Version:  4.3.1
 New Comment:

That is a typo in the php4/php.ini-dist that comes from a typo in the
code 
in php4/ext/session/session.c (introduced in revision 1.329) 
 
The 'diff -u' output for the fixes is below: 
 
$ diff -u php4/php.ini-dist-orig php4/php.ini-dist 
--- php4/php.ini-dist-orig  2003-04-05 02:51:07.0 -0800 
+++ php4/php.ini-dist   2003-04-05 02:56:01.0 -0800 
@@ -850,11 +850,11 @@ 
 
 ; Define the probability that the 'garbage collection' process is
started 
 ; on every session initialization. 
-; The probability is calculated by using gc_probability/gc_dividend, 
+; The probability is calculated by using gc_probability/gc_divisor, 
 ; e.g. 1/100 means 1%. 
 
 session.gc_probability = 1 
-session.gc_dividend= 100 
+session.gc_divisor= 100 
 
 ; After this number of seconds, stored data will be seen as 'garbage'

and 
 ; cleaned up by the garbage collection process. 
 
$ diff -u php4/ext/session/session.c-orig php4/ext/session/session.c 
--- php4/ext/session/session.c-orig 2003-04-05 02:57:33.0 
-0800 
+++ php4/ext/session/session.c  2003-04-05 02:58:04.0 -0800 
@@ -138,7 +138,7 @@ 
PHP_INI_ENTRY("session.save_handler",   "files", 
PHP_INI_ALL, OnUpdateSaveHandler) 
STD_PHP_INI_BOOLEAN("session.auto_start",   "0", 
PHP_INI_ALL, OnUpdateBool,   auto_start, php_ps_globals,
ps_globals) 
STD_PHP_INI_ENTRY("session.gc_probability", "1", 
PHP_INI_ALL, OnUpdateLong,gc_probability, php_ps_globals,
ps_globals) 
-   STD_PHP_INI_ENTRY("session.gc_dividend","100",   
PHP_INI_ALL, OnUpdateLong,gc_dividend,php_ps_globals,
ps_globals) 
+   STD_PHP_INI_ENTRY("session.gc_divisor","100",   
PHP_INI_ALL, OnUpdateLong,gc_divisor,php_ps_globals,
ps_globals) 
STD_PHP_INI_ENTRY("session.gc_maxlifetime", "1440",  
PHP_INI_ALL, OnUpdateLong,gc_maxlifetime, php_ps_globals,
ps_globals) 
PHP_INI_ENTRY("session.serialize_handler",  "php",   
PHP_INI_ALL, OnUpdateSerializer) 
STD_PHP_INI_ENTRY("session.cookie_lifetime","0", 
PHP_INI_ALL, OnUpdateLong,cookie_lifetime,php_ps_globals,
ps_globals) 
@@ -1154,7 +1154,7 @@ 
if (PS(mod_data) && PS(gc_probability) > 0) { 
int nrdels = -1; 
 
-   nrand = (int) ((float) PS(gc_dividend) * 
php_combined_lcg(TSRMLS_C)); 
+   nrand = (int) ((float) PS(gc_divisor) * 
php_combined_lcg(TSRMLS_C)); 
if (nrand < PS(gc_probability)) { 
PS(mod)->s_gc(&PS(mod_data),
PS(gc_maxlifetime), 
&nrdels TSRMLS_CC); 
 #if 0 
 
 


Previous Comments:


[2003-04-05 04:45:09] kyrael at web dot de

Taken from php.ini-dist:

; Define the probability that the 'garbage collection' process is
started
; on every session initialization.
; The probability is calculated by using gc_probability/gc_dividend,
; e.g. 1/100 means 1%.

session.gc_probability = 1
session.gc_dividend= 100

Is this really true? Because, if it really was that way, gc_dividend
should be named gc_divisor... dividend is the latin form for something
to be divided.




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



#23061 [NEW]: fockopen resource leaking

2003-04-05 Thread nico at osict dot com
From: nico at osict dot com
Operating system: Windows XP
PHP version:  4.3.1
PHP Bug Type: Reproducible crash
Bug description:  fockopen resource leaking

When fockopen is used on a non working IP address (e.g. to test if some
server is currently running) it seems to cause resource leaking. Even if
fclose is used properly, and the php page has finished. This behaviour
does not occur with working IP addresses.

This can be verified with windows task manager by looking in the handles
column of apache.exe.

When repeated many times (>1) Windows XP will collapse because
applications will no longer be able to open IP ports.

I am using the windows binary on http://www.php.net/downloads.php with
Apache/1.3.24.

Nico de Vries ([EMAIL PROTECTED])
-- 
Edit bug report at http://bugs.php.net/?id=23061&edit=1
-- 
Try a CVS snapshot: http://bugs.php.net/fix.php?id=23061&r=trysnapshot
Fixed in CVS:   http://bugs.php.net/fix.php?id=23061&r=fixedcvs
Fixed in release:   http://bugs.php.net/fix.php?id=23061&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=23061&r=needtrace
Try newer version:  http://bugs.php.net/fix.php?id=23061&r=oldversion
Not developer issue:http://bugs.php.net/fix.php?id=23061&r=support
Expected behavior:  http://bugs.php.net/fix.php?id=23061&r=notwrong
Not enough info:http://bugs.php.net/fix.php?id=23061&r=notenoughinfo
Submitted twice:http://bugs.php.net/fix.php?id=23061&r=submittedtwice
register_globals:   http://bugs.php.net/fix.php?id=23061&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=23061&r=php3
Daylight Savings:   http://bugs.php.net/fix.php?id=23061&r=dst
IIS Stability:  http://bugs.php.net/fix.php?id=23061&r=isapi
Install GNU Sed:http://bugs.php.net/fix.php?id=23061&r=gnused



#23050 [Bgs]: Header Location error

2003-04-05 Thread tomas dot marklund at datortek dot orebro dot se
 ID:   23050
 User updated by:  tomas dot marklund at datortek dot orebro dot se
 Reported By:  tomas dot marklund at datortek dot orebro dot se
 Status:   Bogus
 Bug Type: IIS related
 Operating System: WinXP
 PHP Version:  4.3.1
 New Comment:

I thought i've tried that??! I'll try it again!

Thanks!


Previous Comments:


[2003-04-04 12:45:00] [EMAIL PROTECTED]

Use the full, absolute URI. 
 
header("Location: http://www.example.com/foo.php";); 
 
The RFC: 
 
http://www.w3.org/Protocols/rfc2616/rfc2616.html 
 
J 



[2003-04-04 12:37:59] tomas dot marklund at datortek dot orebro dot se

Ok how to make it work then???



[2003-04-04 11:09:26] [EMAIL PROTECTED]

header("Location:foo.php"); violates the RFC. Not bug in PHP.




[2003-04-04 07:15:25] tomas dot marklund at datortek dot orebro dot se

I installed a new php4.3.1 on a new IIS5 on a new computer with WinXP
SP1.
And then all my scripts with the 
Header("location:index.php") funktion stopt working.

The only error message that i get is:

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

Note: It worked before!!
I hope this is no bug! but a error i've made

PHP 4.3.1 installer.zip
MySQL 4.0 (if this matter)


code--



--code





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



#23040 [Opn->Csd]: Periodic Segmentation Faults

2003-04-05 Thread tim at danan dot com
 ID:   23040
 User updated by:  tim at danan dot com
 Reported By:  tim at danan dot com
-Status:   Open
+Status:   Closed
 Bug Type: Reproducible crash
 Operating System: Redhat 8
 PHP Version:  4.3.1
 New Comment:

I'm marking this one as closed.  It appears that the problem was in
apache, not php.  It looks like a couple of recent glibc rpm updates
were the source of the problem.  After rebuilding apache and php I
haven't seen a seg faults in over 16 hours.  Perviously I was seeing
5-10 per hour.

Thank you to those of you who took the time to help me with this
problem.


Previous Comments:


[2003-04-04 08:38:14] tim at danan dot com

AHA!  I just checked the script (and all of it's includes).  There is
only one putenv call in the entire forum system.  Perhaps these code
snippets can provide some insight (I'm going to see if I can crash the
server with a short script containing these functions).

//included from a conf file
$SERVER_TZ  = "America/New_York";

// the potential offending code
function set_tz($timezone)
{
if( $timezone ) @putenv("TZ=".$timezone);
}

// one of the fields in users is time_zone.  All users are currently
set to "America/New_York"
function get_user_by_id($id)
{
 qobj("SELECT * FROM fud2_users WHERE id=".$id, $this);
 if( empty($this->id) ) return;
 return $this->id;
}

// within this init function the set_tz function is called
function init_user()
{
$s = new fud_session;

$u = new fud_user;

$s->cookie_get_session();
if ( $s->user_id && $s->user_id<20 ) {
if ( !$u->get_user_by_id($s->user_id) ) {
$u=NULL;
$s->delete_session();
}
/* else NOP */
}
else $u = NULL;

if ( empty($u) && empty($s->id) ) $s->save_session();

$rv[0] = $s;

if( !empty($u) ) {
set_tz($u->time_zone);

define('d_thread_view',
(($GLOBALS['TREE_THREADS_ENABLE']=='N'||$u->default_view=='msg'||$u->default_view=='tree_msg')?'msg':'tree'));
define('t_thread_view',
(($GLOBALS['TREE_THREADS_ENABLE']=='N'||$u->default_view=='msg'||$u->default_view=='msg_tree')?'thread':'threadt'));

q("UPDATE fud2_users SET
last_visit=".__request_timestamp__." WHERE id=".$u->id);
$rv[1] = $u;
}else {
set_tz($GLOBALS["SERVER_TZ"]);

define('d_thread_view',
(($GLOBALS['TREE_THREADS_ENABLE']=='N'||$GLOBALS['DEFAULT_THREAD_VIEW']=='msg'||$GLOBALS['DEFAULT_THREAD_VIEW']=='tree_msg')?'msg':'tree'));
define('t_thread_view',
(($GLOBALS['TREE_THREADS_ENABLE']=='N'||$GLOBALS['DEFAULT_THREAD_VIEW']=='msg'||$GLOBALS['DEFAULT_THREAD_VIEW']=='msg_tree')?'thread':'threadt'));

$rv[1] = NULL;
if( !empty($GLOBALS["rid"]) &&
empty($GLOBALS["HTTP_COOKIE_VARS"]["frm_referer_id"]) )
set_referer_cookie($GLOBALS["rid"]);
}

define('s', $s->ses_id);
define('_rsid', 'rid='.$u->id.'&S='.s);
define('_rsidl', 'rid='.$u->id.'&S='.s);
define('_hs', '');
define('_uid', (($u->email_conf == 'Y')?$u->id:0));

return $rv;
}



[2003-04-04 08:13:21] tim at danan dot com

I tried the cvs snapshot and I'm still seeing the seg faults.  Is it
possible that Apache is the problem here and not PHP?  In other words,
is the putenv setting with an enviroment variable for PHP or all of
httpd?



[2003-04-03 19:38:16] [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

There have been couple of dozen fixes that might have
also fixed this. So please give the snapshot a go.




[2003-04-03 16:49:02] [EMAIL PROTECTED]

It looks like putenv() is the last thing called from PHP 
land before the crash, so that's a start. 
 
J 



[2003-04-03 16:36:46] tim at danan dot com

I've not been able to narrow it down to anything that specific yet. 
I've only just narrowed it down to this page in the past day or so. 
Unfortunately, the page almost 700 lines long, so I wouldn't call it
"short".

I'll continue to try to narrow it down to see if I can isolate a
function, but it may not be easy since the page tends to load fine
50-60 times in a row, then blow up.   There's probably something unique
going on in the crash instances, but I've not located it yet.

If you'd like the long script I'll be happy to provide it.

I'm not an expert at re

#23061 [Opn->Fbk]: fockopen resource leaking

2003-04-05 Thread wez
 ID:   23061
 Updated by:   [EMAIL PROTECTED]
 Reported By:  nico at osict dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Reproducible crash
 Operating System: Windows XP
 PHP Version:  4.3.1
 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-04-05 05:21:25] nico at osict dot com

When fockopen is used on a non working IP address (e.g. to test if some
server is currently running) it seems to cause resource leaking. Even
if fclose is used properly, and the php page has finished. This
behaviour does not occur with working IP addresses.

This can be verified with windows task manager by looking in the
handles column of apache.exe.

When repeated many times (>1) Windows XP will collapse because
applications will no longer be able to open IP ports.

I am using the windows binary on http://www.php.net/downloads.php with
Apache/1.3.24.

Nico de Vries ([EMAIL PROTECTED])




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



#22880 [Fbk->Opn]: Performance loss of 50% form 4.0 to 4.3?

2003-04-05 Thread project dot draco at gmx dot net
 ID:   22880
 User updated by:  project dot draco at gmx dot net
 Reported By:  project dot draco at gmx dot net
-Status:   Feedback
+Status:   Open
 Bug Type: Performance problem
 Operating System: win98//freebsd//any?
 PHP Version:  4.3.2-RC
 New Comment:

ok,ok

did some testing and found at least the following behaviour:
i kept track of includ_once times in my script and ran a couple of
times the same script, wich includes havily about 300 kB.

While 4.0.6 did this job with an avarage time of 0.4 ms per kB included
script, the 4.3.1 and 4.3.2 versions show an increasing amount of time
use to include_once the scripts.

Some values

sumsize avg 406 avg 432

0   0,550,47
16660   0,540,49
32859   3,923,65
57138   0,570,80
62766   0,460,74
83208   0,460,77
106302  0,440,69
114039  0,560,93
119067  0,571,17
129474  0,621,08
150891  0,901,70
161932  1,461,74
167775  0,430,83
182655  0,421,06
209909  0,471,63
246752  0,491,51
269711  0,421,61
330045  0,481,85
346306  0,411,64


The three bigger values (3.92,0.90,1.46 at the avg406 col) are scripts
that do initial executions and db-queries, so we ommit them.
the rest is simple classdefs, no initializing done.

As you can see, the 432 avg times increase with increasing filesize
(the sizes are summed up so 346306 is the full scriptsize that is run)

Can you read anything helpful out of this posting???

ps Testing was done on win98/php-cgi/apache 1.3.20 systemenvironment.

gruss
mir


Previous Comments:


[2003-03-31 02:13:08] [EMAIL PROTECTED]

Still waiting for the feedback of more detailed information.




[2003-03-30 05:10:09] project dot draco at gmx dot net

Gave it a try.

Didn't work, sorry. As slow as before...

So now im going to make some testings to find out, where the
performance loss originates from.

I already localized some strange side effects, wich point to the
conclusion, that it is in fact something with the memorymanagment.
The same script, executed as standalone is much faster, than executed
within a huge script.

Ill be back with some more accurate bug-report soon.

so long

mir



[2003-03-25 14:48:32] [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

There was a performance problem for file() and file_get_contents() on
systems without memory mapping support; this has been fixed in the
stable snapshots.

Please give it a try.



[2003-03-25 12:43:16] project dot draco at gmx dot net

I switched from php 4.0.6 to 4.3.1 lately. I run php as cgi on an
win98-apache 1.3.20-php-mysql system.

I think i missed all versions in between, but now i realize a
performance loss of about 50% (execution time nearly doubled without
ANY code changed, simply giving Apache a different cgi)
I was able to catch up partly by tuning the php.ini (i never did this
before!) but still expirience serious performance loss.

This mostly seems to take place on database and filesystem operations,
but i'm not sure of this.

Could someone measure this out?






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



#22787 [Com]: Make fails after upgrading to mysql v4.0.12

2003-04-05 Thread azza at sbcglobal dot net
 ID:   22787
 Comment by:   azza at sbcglobal dot net
 Reported By:  gregory dot fennell at am dot sony dot com
 Status:   Bogus
 Bug Type: MySQL related
 Operating System: RedHat v8.0
 PHP Version:  4.3.1
 New Comment:

OPEN not BOGUS and a potential solution.

I am unclear why this has been set to bogus vs open.

(1) A significant number of other parties are having this issue.
(2) The failure to reproduce the error does not mean the error does not
exist. 
(3) The installation process for php and mysql is quite varied, thus
unlesss one tests all major installation scenarios no conclusion may be
drawn. 
(4) As shown in my previous post - several rpms show a requirement of
libmysqlclient.so.10. The correction is to use libmysqlclient.so which
has a symlink to the current version, which is libmysqlclient.so.12.

Thus, a) the bug is not bogus, b) the correction may be simple and c)
failure to correct the error may have significant negative
consequences.

Thks


Previous Comments:


[2003-04-04 20:39:56] azza at sbcglobal dot net

Same Issue:
I agree that working together is the means for resolving this issue. 

(1) php-mysql-4.3.1-rbt.rh8.1.i386.rpm shows requirement of
libmysqlclient.so.10  
http://www.aucs.org/rpmcenter/details/php-4.3.1-for-apache-1.3.x/php-mysql-4.3.1-rbt.rh8.1.i386.rpm.html

(2) php-mysql-4.2.2-8.0.7 RPM for i386 shows requirement of 
libmysqlclient.so.10
http://rpmfind.net/linux/RPM/redhat/updates/8.0/i386/php-mysql-4.2.2-8.0.7.i386.html

What should be in the code is a reference to libmysqlclient.so which is
a symlink
to the current version - libmysqlclient.so.12.

This may be a major issue if it crashes a large number of sites. Take a
look at how libmyssqlclient.so is configured on your system.

Have fun..of bogus to open



[2003-04-04 10:57:34] [EMAIL PROTECTED]

Did you uninstall the old mysql 3.23 version before installing that new
one? Are you sure it's not just a conflict between old and new version
of mysql?

And I say again: This is NOT any bug in PHP. Please ask further support
questions on e.g. [EMAIL PROTECTED]





[2003-04-04 07:15:37] gregory dot fennell at am dot sony dot com

The following RPMs are used (Version: 4.0.12):

Server 
Client programs
Libraries and header files
Dynamic client libraries

I also use a self-compiled version of PHP-4.3.1 with the configure line
that is in my original posting.  Any help you can give is greatly
appreciated.  I know I have several colleagues that are waiting on a
fix as well.

Thanks for your help in this.



[2003-04-03 19:48:38] [EMAIL PROTECTED]

Which RPMs have you installed? You need to have the libraries and
header files installed too to get the build work..




[2003-04-03 07:09:47] gregory dot fennell at am dot sony dot com

Sniper, I understand that it works for you.  But you stated you are
using the latest CVS and self compiled MySQL.  That is not the original
issue and I want to stay on track.

The issue is that the RPM installation of MySQL will not work with the
self-compiled version of PHP.  Two people have posted to this saying
they are having the same issue, but you insist on saying this is bogus.
 I will not use a CVS version on production machines, nor should
anyone.  So what do we need to do so that you will take this issue
seriously?

I thought the purpose of open source products was for people to work
together to make a product better, but in this case it seems our needs
to make the product better are being ignored.



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

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



#23056 [Ana->Bgs]: gif and jpeg php generated pictures bug

2003-04-05 Thread sniper
 ID:   23056
 Updated by:   [EMAIL PROTECTED]
 Reported By:  dan1 at edenpics dot com
-Status:   Analyzed
+Status:   Bogus
 Bug Type: Output Control
 Operating System: Linux RedHat 7.1
 PHP Version:  4.3.2RC1
 New Comment:

the example bird.gif is actually JPEG, not GIF..
And when having the correct script with correct imagetype,
this all works just fine.

This is NOT any bug in PHP.



Previous Comments:


[2003-04-05 00:28:33] [EMAIL PROTECTED]

I copied your script directly and found a bird.gif image out there. 
You can see the result at:
http://lerdorf.com/bird.php
Source code at:
http://lerdorf.com/bird.phps
Works ok for me.  Perhaps you have something before or after the
start/end php tags, or do you have weird line endings or something?  Do
an "od -c bird.php" and compare it to:
http://lerdorf.com/bird.txt




[2003-04-04 12:55:43] dan1 at edenpics dot com

Something more: this happens with all versions of Internet Explorer



[2003-04-04 12:21:28] dan1 at edenpics dot com

Sorry, $output is the file name.
here is the correct code:



I tried PHP version 4.3.2RC1. The same happens.
This bug appears with jpeg (.jpg) files too, with the "e99\r\n" code
before the picture datas, and they can only be saved as BMP too.



[2003-04-04 11:05:48] [EMAIL PROTECTED]

fixed script, using PHP 4.3.2-RC, and it works fine.




[2003-04-04 11:04:22] [EMAIL PROTECTED]

Your script is broken. (what is $output supposed to contain??)





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

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



#23056 [Bgs]: gif and jpeg php generated pictures bug

2003-04-05 Thread sniper
 ID:   23056
 Updated by:   [EMAIL PROTECTED]
 Reported By:  dan1 at edenpics dot com
 Status:   Bogus
 Bug Type: Output Control
 Operating System: Linux RedHat 7.1
 PHP Version:  4.3.2RC1
 New Comment:

Disclaimer: the bird.gif _WAS_ jpeg before.. :)



Previous Comments:


[2003-04-05 11:12:22] [EMAIL PROTECTED]

the example bird.gif is actually JPEG, not GIF..
And when having the correct script with correct imagetype,
this all works just fine.

This is NOT any bug in PHP.




[2003-04-05 00:28:33] [EMAIL PROTECTED]

I copied your script directly and found a bird.gif image out there. 
You can see the result at:
http://lerdorf.com/bird.php
Source code at:
http://lerdorf.com/bird.phps
Works ok for me.  Perhaps you have something before or after the
start/end php tags, or do you have weird line endings or something?  Do
an "od -c bird.php" and compare it to:
http://lerdorf.com/bird.txt




[2003-04-04 12:55:43] dan1 at edenpics dot com

Something more: this happens with all versions of Internet Explorer



[2003-04-04 12:21:28] dan1 at edenpics dot com

Sorry, $output is the file name.
here is the correct code:



I tried PHP version 4.3.2RC1. The same happens.
This bug appears with jpeg (.jpg) files too, with the "e99\r\n" code
before the picture datas, and they can only be saved as BMP too.



[2003-04-04 11:05:48] [EMAIL PROTECTED]

fixed script, using PHP 4.3.2-RC, and it 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/23056

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



#23057 [Opn->Bgs]: gcc: ext/stand: No such file or directory make: *** [sapi/cli/php] Error 1

2003-04-05 Thread sniper
 ID:   23057
 Updated by:   [EMAIL PROTECTED]
 Reported By:  joydeep_ghosh at net dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Compile Failure
 Operating System: Sun2.7
 PHP Version:  4.3.1
 New Comment:

Due to a bug in the installed sed on your system the build
fails. Install GNU sed and it should be okay.
 
Thank you for your interest in PHP.

.


Previous Comments:


[2003-04-04 17:55:55] joydeep_ghosh at net dot com

Directory php4-STABLE-200301150030 created 
   PHP_VERSION "4.3.1-dev"

   Configuration is OK 

./configure --enable-debug --enable-libgcc --enable-dbx \
--enable-ftp --enable-inline-optimization \
--with-java=/export/webtools/java/Solaris_JDK_1.2.2_13 \
--with-nsapi=/export/webtools/netscape/server4 \
--with-oci8=/export/webtools/app/oracle/product/8.1.7

Following ERROR encountered while executing Make command: 

ext/stand -R/usr/ucblib
-R/usr/local/lib/gcc-lib/sparc-sun-solaris2.7/3.2
-R/export/webtools/java/Solaris_JDK_1.2.2_13/jre/lib/sparc
-R/export/webtools/app/oracle/product/8.1.7/lib
gcc: ext/stand: No such file or directory
make: *** [sapi/cli/php] Error 1  


This started happening after putting --with-java option during
configuration  




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



#23058 [Fbk]: gdFreeFontCache compilation failure

2003-04-05 Thread sniper
 ID:   23058
 Updated by:   [EMAIL PROTECTED]
 Reported By:  russell+php dot net at loosenut dot com
 Status:   Feedback
-Bug Type: *General Issues
+Bug Type: GD related
 Operating System: Solaris 2.5.1
 PHP Version:  4.3.2RC1
 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

Can not reproduce. What version of GD library are you trying to compile
PHP with? FYI: It's safer to use the bundled library if your external
one is some GD 2.x.x version..



Previous Comments:


[2003-04-04 22:17:52] [EMAIL PROTECTED]

Try with the bundled gd lib. --with-gd only, no path.



[2003-04-04 22:11:16] russell+php dot net at loosenut dot com

/bin/sh /export/home/russell/build/php-4.3.2RC1/libtool --silent
--preserve-dup-deps --mode=link gcc -export-dynamic -g -O2 
-avoid-version -module -L/usr/ucblib
-L/usr/local/lib/gcc-lib/sparc-sun-solaris2.5.1/2.95.3
-L/usr/local/ssl/lib -L/usr/local/lib
-L/usr/home/russell/build/jpeg-6b/lib -L/usr/local/imap-2002b/lib
-L/usr/local/mysql/lib/mysql  -R /usr/ucblib -R
/usr/local/lib/gcc-lib/sparc-sun-solaris2.5.1/2.95.3 -R
/usr/local/ssl/lib -R /usr/local/lib -R
/usr/home/russell/build/jpeg-6b/lib -R /usr/local/imap-2002b/lib -R
/usr/local/mysql/lib/mysql ext/zlib/zlib.lo
ext/zlib/zlib_fopen_wrapper.lo ext/ctype/ctype.lo ext/gd/gd.lo
ext/gd/gdttf.lo ext/gd/gdcache.lo ext/imap/php_imap.lo
ext/mysql/php_mysql.lo ext/openssl/openssl.lo ext/overload/overload.lo
ext/pcre/pcrelib/maketables.lo ext/pcre/pcrelib/get.lo
ext/pcre/pcrelib/study.lo ext/pcre/pcrelib/pcre.lo ext/pcre/php_pcre.lo
ext/posix/posix.lo ext/session/session.lo ext/session/mod_files.lo
ext/session/mod_mm.lo ext/session/mod_user.lo ext/standard/array.lo
ext/standard/base64.lo ext/standard/basic_functions.lo
ext/standard/browscap.lo ext/standard/crc32.lo ext/standard/crypt.lo
ext/standard/cyr_convert.lo ext/standard/datetime.lo
ext/standard/dir.lo ext/standard/dl.lo ext/standard/dns.lo
ext/standard/exec.lo ext/standard/file.lo ext/standard/filestat.lo
ext/standard/flock_compat.lo ext/standard/formatted_print.lo
ext/standard/fsock.lo ext/standard/head.lo ext/standard/html.lo
ext/standard/image.lo ext/standard/info.lo ext/standard/iptc.lo
ext/standard/lcg.lo ext/standard/link.lo ext/standard/mail.lo
ext/standard/math.lo ext/standard/md5.lo ext/standard/metaphone.lo
ext/standard/microtime.lo ext/standard/pack.lo ext/standard/pageinfo.lo
ext/standard/parsedate.lo ext/standard/quot_print.lo
ext/standard/rand.lo ext/standard/reg.lo ext/standard/soundex.lo
ext/standard/string.lo ext/standard/scanf.lo ext/standard/syslog.lo
ext/standard/type.lo ext/standard/uniqid.lo ext/standard/url.lo
ext/standard/url_scanner.lo ext/standard/var.lo
ext/standard/versioning.lo ext/standard/assert.lo
ext/standard/strnatcmp.lo ext/standard/levenshtein.lo
ext/standard/incomplete_class.lo ext/standard/url_scanner_ex.lo
ext/standard/ftp_fopen_wrapper.lo ext/standard/http_fopen_wrapper.lo
ext/standard/php_fopen_wrapper.lo ext/standard/credits.lo
ext/standard/css.lo ext/standard/var_unserializer.lo
ext/standard/ftok.lo ext/standard/aggregation.lo ext/standard/sha1.lo
ext/tokenizer/tokenizer.lo ext/xml/xml.lo ext/xml/expat/xmlparse.lo
ext/xml/expat/xmlrole.lo ext/xml/expat/xmltok.lo regex/regcomp.lo
regex/regexec.lo regex/regerror.lo regex/regfree.lo TSRM/TSRM.lo
TSRM/tsrm_strtok_r.lo TSRM/tsrm_virtual_cwd.lo main/main.lo
main/snprintf.lo main/spprintf.lo main/php_sprintf.lo main/safe_mode.lo
main/fopen_wrappers.lo main/alloca.lo main/php_scandir.lo
main/php_ini.lo main/SAPI.lo main/rfc1867.lo main/php_content_types.lo
main/strlcpy.lo main/strlcat.lo main/mergesort.lo main/reentrancy.lo
main/php_variables.lo main/php_ticks.lo main/streams.lo main/network.lo
main/php_open_temporary_file.lo main/php_logos.lo main/output.lo
main/memory_streams.lo main/user_streams.lo
Zend/zend_language_parser.lo Zend/zend_language_scanner.lo
Zend/zend_ini_parser.lo Zend/zend_ini_scanner.lo Zend/zend_alloc.lo
Zend/zend_compile.lo Zend/zend_constants.lo Zend/zend_dynamic_array.lo
Zend/zend_execute_API.lo Zend/zend_highlight.lo Zend/zend_llist.lo
Zend/zend_opcode.lo Zend/zend_operators.lo Zend/zend_ptr_stack.lo
Zend/zend_stack.lo Zend/zend_variables.lo Zend/zend.lo Zend/zend_API.lo
Zend/zend_extensions.lo Zend/zend_hash.lo Zend/zend_list.lo
Zend/zend_indent.lo Zend/zend_builtin_functions.lo Zend/zend_sprintf.lo
Zend/zend_ini.lo Zend/zend_qsort.lo Zend/zend_multibyte.lo
Zend/zend_execute.lo sapi/cli/php_cli.lo sapi/cli/getopt.lo
main/internal_functions_cli.lo -lcrypt -lc-client -lssl -lcrypto
-lmysqlclient -lcrypt -lgd -lpng -lz -ljpeg -lz -lssl -lcrypto -lresolv
-lm -ldl -lnsl -lsocket -lgcc -lcrypt  -o sapi/cli/php
Undefined   first referenced
 sy

#23058 [Fbk]: gdFreeFontCache compilation failure

2003-04-05 Thread sniper
 ID:   23058
 Updated by:   [EMAIL PROTECTED]
 Reported By:  russell+php dot net at loosenut dot com
 Status:   Feedback
 Bug Type: GD related
 Operating System: Solaris 2.5.1
 PHP Version:  4.3.2RC1
 New Comment:

duh..I can't read it seems. :)
Anyway, how did you configure the GD library?



Previous Comments:


[2003-04-05 11:20:35] [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

Can not reproduce. What version of GD library are you trying to compile
PHP with? FYI: It's safer to use the bundled library if your external
one is some GD 2.x.x version..




[2003-04-04 22:17:52] [EMAIL PROTECTED]

Try with the bundled gd lib. --with-gd only, no path.



[2003-04-04 22:11:16] russell+php dot net at loosenut dot com

/bin/sh /export/home/russell/build/php-4.3.2RC1/libtool --silent
--preserve-dup-deps --mode=link gcc -export-dynamic -g -O2 
-avoid-version -module -L/usr/ucblib
-L/usr/local/lib/gcc-lib/sparc-sun-solaris2.5.1/2.95.3
-L/usr/local/ssl/lib -L/usr/local/lib
-L/usr/home/russell/build/jpeg-6b/lib -L/usr/local/imap-2002b/lib
-L/usr/local/mysql/lib/mysql  -R /usr/ucblib -R
/usr/local/lib/gcc-lib/sparc-sun-solaris2.5.1/2.95.3 -R
/usr/local/ssl/lib -R /usr/local/lib -R
/usr/home/russell/build/jpeg-6b/lib -R /usr/local/imap-2002b/lib -R
/usr/local/mysql/lib/mysql ext/zlib/zlib.lo
ext/zlib/zlib_fopen_wrapper.lo ext/ctype/ctype.lo ext/gd/gd.lo
ext/gd/gdttf.lo ext/gd/gdcache.lo ext/imap/php_imap.lo
ext/mysql/php_mysql.lo ext/openssl/openssl.lo ext/overload/overload.lo
ext/pcre/pcrelib/maketables.lo ext/pcre/pcrelib/get.lo
ext/pcre/pcrelib/study.lo ext/pcre/pcrelib/pcre.lo ext/pcre/php_pcre.lo
ext/posix/posix.lo ext/session/session.lo ext/session/mod_files.lo
ext/session/mod_mm.lo ext/session/mod_user.lo ext/standard/array.lo
ext/standard/base64.lo ext/standard/basic_functions.lo
ext/standard/browscap.lo ext/standard/crc32.lo ext/standard/crypt.lo
ext/standard/cyr_convert.lo ext/standard/datetime.lo
ext/standard/dir.lo ext/standard/dl.lo ext/standard/dns.lo
ext/standard/exec.lo ext/standard/file.lo ext/standard/filestat.lo
ext/standard/flock_compat.lo ext/standard/formatted_print.lo
ext/standard/fsock.lo ext/standard/head.lo ext/standard/html.lo
ext/standard/image.lo ext/standard/info.lo ext/standard/iptc.lo
ext/standard/lcg.lo ext/standard/link.lo ext/standard/mail.lo
ext/standard/math.lo ext/standard/md5.lo ext/standard/metaphone.lo
ext/standard/microtime.lo ext/standard/pack.lo ext/standard/pageinfo.lo
ext/standard/parsedate.lo ext/standard/quot_print.lo
ext/standard/rand.lo ext/standard/reg.lo ext/standard/soundex.lo
ext/standard/string.lo ext/standard/scanf.lo ext/standard/syslog.lo
ext/standard/type.lo ext/standard/uniqid.lo ext/standard/url.lo
ext/standard/url_scanner.lo ext/standard/var.lo
ext/standard/versioning.lo ext/standard/assert.lo
ext/standard/strnatcmp.lo ext/standard/levenshtein.lo
ext/standard/incomplete_class.lo ext/standard/url_scanner_ex.lo
ext/standard/ftp_fopen_wrapper.lo ext/standard/http_fopen_wrapper.lo
ext/standard/php_fopen_wrapper.lo ext/standard/credits.lo
ext/standard/css.lo ext/standard/var_unserializer.lo
ext/standard/ftok.lo ext/standard/aggregation.lo ext/standard/sha1.lo
ext/tokenizer/tokenizer.lo ext/xml/xml.lo ext/xml/expat/xmlparse.lo
ext/xml/expat/xmlrole.lo ext/xml/expat/xmltok.lo regex/regcomp.lo
regex/regexec.lo regex/regerror.lo regex/regfree.lo TSRM/TSRM.lo
TSRM/tsrm_strtok_r.lo TSRM/tsrm_virtual_cwd.lo main/main.lo
main/snprintf.lo main/spprintf.lo main/php_sprintf.lo main/safe_mode.lo
main/fopen_wrappers.lo main/alloca.lo main/php_scandir.lo
main/php_ini.lo main/SAPI.lo main/rfc1867.lo main/php_content_types.lo
main/strlcpy.lo main/strlcat.lo main/mergesort.lo main/reentrancy.lo
main/php_variables.lo main/php_ticks.lo main/streams.lo main/network.lo
main/php_open_temporary_file.lo main/php_logos.lo main/output.lo
main/memory_streams.lo main/user_streams.lo
Zend/zend_language_parser.lo Zend/zend_language_scanner.lo
Zend/zend_ini_parser.lo Zend/zend_ini_scanner.lo Zend/zend_alloc.lo
Zend/zend_compile.lo Zend/zend_constants.lo Zend/zend_dynamic_array.lo
Zend/zend_execute_API.lo Zend/zend_highlight.lo Zend/zend_llist.lo
Zend/zend_opcode.lo Zend/zend_operators.lo Zend/zend_ptr_stack.lo
Zend/zend_stack.lo Zend/zend_variables.lo Zend/zend.lo Zend/zend_API.lo
Zend/zend_extensions.lo Zend/zend_hash.lo Zend/zend_list.lo
Zend/zend_indent.lo Zend/zend_builtin_functions.lo Zend/zend_sprintf.lo
Zend/zend_ini.lo Zend/zend_qsort.lo Zend/zend_multibyte.lo
Zend/zend_execute.lo sapi/cli/php_cli.lo sapi/cli/getopt.lo
main/internal_functions_cli.lo -lcrypt -lc-client -lssl -lcrypto
-lmysqlclient -lcryp

#12358 [Com]: CGI Error-CGI application misbehaved

2003-04-05 Thread powerorb at gmx dot de
 ID:   12358
 Comment by:   powerorb at gmx dot de
 Reported By:  suresh_inbox at rediffmail dot com
 Status:   Closed
 Bug Type: PWS related
 Operating System: windows 98
 PHP Version:  4.0.6
 New Comment:

Hi All,

I had the same error all the time. In my case it were the
Security-Settings inside the webroot. There need to be a entry like
IUSR_ ( is the name of your computer). Give this user at least
rights to read the directory.


Previous Comments:


[2003-04-03 18:38:19] baje14 at eudoramail dot com

i also have the same problem please please please help us!



[2003-01-20 08:49:01] parryk at croner dot co dot uk

it's a bit late now, but maybe someone else will come look for answers
here...

The CGI error can be solved by opening PWS, clicking on the Advanced
button, and adding the folder where your scripts reside to the vitual
directories tree (don't forget to enable the execute option by ticking
the box).



[2003-01-13 20:00:58] martinbudden at hotmail dot com

I'm getting the same problem.  It's not about setting
cgi.force_redirect=0 in php.ini, that was for a different problem and
that one is now fixed.

So what is causing this error?  Any help greatly appreciated!
CGI Error
The specified CGI application misbehaved by not returning a complete
set
of HTTP headers. The headers it did return are:



[2002-06-25 03:55:17] renghen at servihoo dot com

set cgi.force_redirect=0 in your php.ini



[2001-08-20 12:04:57] [EMAIL PROTECTED]

no feedback.




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

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



#23059 [Ana->WFx]: Documentation wrong? Or just used the wrong word?

2003-04-05 Thread sniper
 ID:   23059
 Updated by:   [EMAIL PROTECTED]
 Reported By:  kyrael at web dot de
-Status:   Analyzed
+Status:   Wont fix
 Bug Type: Session related
 Operating System: Linux
 PHP Version:  4.3.1
 New Comment:

Nitpicking..



Previous Comments:


[2003-04-05 04:58:39] [EMAIL PROTECTED]

That is a typo in the php4/php.ini-dist that comes from a typo in the
code 
in php4/ext/session/session.c (introduced in revision 1.329) 
 
The 'diff -u' output for the fixes is below: 
 
$ diff -u php4/php.ini-dist-orig php4/php.ini-dist 
--- php4/php.ini-dist-orig  2003-04-05 02:51:07.0 -0800 
+++ php4/php.ini-dist   2003-04-05 02:56:01.0 -0800 
@@ -850,11 +850,11 @@ 
 
 ; Define the probability that the 'garbage collection' process is
started 
 ; on every session initialization. 
-; The probability is calculated by using gc_probability/gc_dividend, 
+; The probability is calculated by using gc_probability/gc_divisor, 
 ; e.g. 1/100 means 1%. 
 
 session.gc_probability = 1 
-session.gc_dividend= 100 
+session.gc_divisor= 100 
 
 ; After this number of seconds, stored data will be seen as 'garbage'

and 
 ; cleaned up by the garbage collection process. 
 
$ diff -u php4/ext/session/session.c-orig php4/ext/session/session.c 
--- php4/ext/session/session.c-orig 2003-04-05 02:57:33.0 
-0800 
+++ php4/ext/session/session.c  2003-04-05 02:58:04.0 -0800 
@@ -138,7 +138,7 @@ 
PHP_INI_ENTRY("session.save_handler",   "files", 
PHP_INI_ALL, OnUpdateSaveHandler) 
STD_PHP_INI_BOOLEAN("session.auto_start",   "0", 
PHP_INI_ALL, OnUpdateBool,   auto_start, php_ps_globals,
ps_globals) 
STD_PHP_INI_ENTRY("session.gc_probability", "1", 
PHP_INI_ALL, OnUpdateLong,gc_probability, php_ps_globals,
ps_globals) 
-   STD_PHP_INI_ENTRY("session.gc_dividend","100",   
PHP_INI_ALL, OnUpdateLong,gc_dividend,php_ps_globals,
ps_globals) 
+   STD_PHP_INI_ENTRY("session.gc_divisor","100",   
PHP_INI_ALL, OnUpdateLong,gc_divisor,php_ps_globals,
ps_globals) 
STD_PHP_INI_ENTRY("session.gc_maxlifetime", "1440",  
PHP_INI_ALL, OnUpdateLong,gc_maxlifetime, php_ps_globals,
ps_globals) 
PHP_INI_ENTRY("session.serialize_handler",  "php",   
PHP_INI_ALL, OnUpdateSerializer) 
STD_PHP_INI_ENTRY("session.cookie_lifetime","0", 
PHP_INI_ALL, OnUpdateLong,cookie_lifetime,php_ps_globals,
ps_globals) 
@@ -1154,7 +1154,7 @@ 
if (PS(mod_data) && PS(gc_probability) > 0) { 
int nrdels = -1; 
 
-   nrand = (int) ((float) PS(gc_dividend) * 
php_combined_lcg(TSRMLS_C)); 
+   nrand = (int) ((float) PS(gc_divisor) * 
php_combined_lcg(TSRMLS_C)); 
if (nrand < PS(gc_probability)) { 
PS(mod)->s_gc(&PS(mod_data),
PS(gc_maxlifetime), 
&nrdels TSRMLS_CC); 
 #if 0 
 
 



[2003-04-05 04:45:09] kyrael at web dot de

Taken from php.ini-dist:

; Define the probability that the 'garbage collection' process is
started
; on every session initialization.
; The probability is calculated by using gc_probability/gc_dividend,
; e.g. 1/100 means 1%.

session.gc_probability = 1
session.gc_dividend= 100

Is this really true? Because, if it really was that way, gc_dividend
should be named gc_divisor... dividend is the latin form for something
to be divided.




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



#23040 [Csd->Bgs]: Periodic Segmentation Faults

2003-04-05 Thread sniper
 ID:   23040
 Updated by:   [EMAIL PROTECTED]
 Reported By:  tim at danan dot com
-Status:   Closed
+Status:   Bogus
-Bug Type: Reproducible crash
+Bug Type: Apache related
 Operating System: Redhat 8
 PHP Version:  4.3.1
 New Comment:

Not bug in PHP -> bogus.




Previous Comments:


[2003-04-05 07:29:45] tim at danan dot com

I'm marking this one as closed.  It appears that the problem was in
apache, not php.  It looks like a couple of recent glibc rpm updates
were the source of the problem.  After rebuilding apache and php I
haven't seen a seg faults in over 16 hours.  Perviously I was seeing
5-10 per hour.

Thank you to those of you who took the time to help me with this
problem.



[2003-04-04 08:38:14] tim at danan dot com

AHA!  I just checked the script (and all of it's includes).  There is
only one putenv call in the entire forum system.  Perhaps these code
snippets can provide some insight (I'm going to see if I can crash the
server with a short script containing these functions).

//included from a conf file
$SERVER_TZ  = "America/New_York";

// the potential offending code
function set_tz($timezone)
{
if( $timezone ) @putenv("TZ=".$timezone);
}

// one of the fields in users is time_zone.  All users are currently
set to "America/New_York"
function get_user_by_id($id)
{
 qobj("SELECT * FROM fud2_users WHERE id=".$id, $this);
 if( empty($this->id) ) return;
 return $this->id;
}

// within this init function the set_tz function is called
function init_user()
{
$s = new fud_session;

$u = new fud_user;

$s->cookie_get_session();
if ( $s->user_id && $s->user_id<20 ) {
if ( !$u->get_user_by_id($s->user_id) ) {
$u=NULL;
$s->delete_session();
}
/* else NOP */
}
else $u = NULL;

if ( empty($u) && empty($s->id) ) $s->save_session();

$rv[0] = $s;

if( !empty($u) ) {
set_tz($u->time_zone);

define('d_thread_view',
(($GLOBALS['TREE_THREADS_ENABLE']=='N'||$u->default_view=='msg'||$u->default_view=='tree_msg')?'msg':'tree'));
define('t_thread_view',
(($GLOBALS['TREE_THREADS_ENABLE']=='N'||$u->default_view=='msg'||$u->default_view=='msg_tree')?'thread':'threadt'));

q("UPDATE fud2_users SET
last_visit=".__request_timestamp__." WHERE id=".$u->id);
$rv[1] = $u;
}else {
set_tz($GLOBALS["SERVER_TZ"]);

define('d_thread_view',
(($GLOBALS['TREE_THREADS_ENABLE']=='N'||$GLOBALS['DEFAULT_THREAD_VIEW']=='msg'||$GLOBALS['DEFAULT_THREAD_VIEW']=='tree_msg')?'msg':'tree'));
define('t_thread_view',
(($GLOBALS['TREE_THREADS_ENABLE']=='N'||$GLOBALS['DEFAULT_THREAD_VIEW']=='msg'||$GLOBALS['DEFAULT_THREAD_VIEW']=='msg_tree')?'thread':'threadt'));

$rv[1] = NULL;
if( !empty($GLOBALS["rid"]) &&
empty($GLOBALS["HTTP_COOKIE_VARS"]["frm_referer_id"]) )
set_referer_cookie($GLOBALS["rid"]);
}

define('s', $s->ses_id);
define('_rsid', 'rid='.$u->id.'&S='.s);
define('_rsidl', 'rid='.$u->id.'&S='.s);
define('_hs', '');
define('_uid', (($u->email_conf == 'Y')?$u->id:0));

return $rv;
}



[2003-04-04 08:13:21] tim at danan dot com

I tried the cvs snapshot and I'm still seeing the seg faults.  Is it
possible that Apache is the problem here and not PHP?  In other words,
is the putenv setting with an enviroment variable for PHP or all of
httpd?



[2003-04-03 19:38:16] [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

There have been couple of dozen fixes that might have
also fixed this. So please give the snapshot a go.




[2003-04-03 16:49:02] [EMAIL PROTECTED]

It looks like putenv() is the last thing called from PHP 
land before the crash, so that's a start. 
 
J 



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

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



#23063 [NEW]: Enhancement to urlencode(), rawurlencode()

2003-04-05 Thread mccarthy36 at earthlink dot net
From: mccarthy36 at earthlink dot net
Operating system: All
PHP version:  4.3.1
PHP Bug Type: Feature/Change Request
Bug description:  Enhancement to urlencode(), rawurlencode()

I'd like to see an optional boolean second argument to urlencode() and
rawurlencode() to cause encoding of all characters in the argument string,
even alphanumerics.

Like this:
string urlencode ( string str [, bool encode_all])
string rawurlencode ( string str [, bool encode_all])

Naturally the optional argument would default to false to preserve the
current behavior.

Thanks
-- 
Edit bug report at http://bugs.php.net/?id=23063&edit=1
-- 
Try a CVS snapshot: http://bugs.php.net/fix.php?id=23063&r=trysnapshot
Fixed in CVS:   http://bugs.php.net/fix.php?id=23063&r=fixedcvs
Fixed in release:   http://bugs.php.net/fix.php?id=23063&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=23063&r=needtrace
Try newer version:  http://bugs.php.net/fix.php?id=23063&r=oldversion
Not developer issue:http://bugs.php.net/fix.php?id=23063&r=support
Expected behavior:  http://bugs.php.net/fix.php?id=23063&r=notwrong
Not enough info:http://bugs.php.net/fix.php?id=23063&r=notenoughinfo
Submitted twice:http://bugs.php.net/fix.php?id=23063&r=submittedtwice
register_globals:   http://bugs.php.net/fix.php?id=23063&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=23063&r=php3
Daylight Savings:   http://bugs.php.net/fix.php?id=23063&r=dst
IIS Stability:  http://bugs.php.net/fix.php?id=23063&r=isapi
Install GNU Sed:http://bugs.php.net/fix.php?id=23063&r=gnused



#22880 [Opn->Fbk]: Performance loss of 50% form 4.0 to 4.3?

2003-04-05 Thread sniper
 ID:   22880
 Updated by:   [EMAIL PROTECTED]
 Reported By:  project dot draco at gmx dot net
-Status:   Open
+Status:   Feedback
 Bug Type: Performance problem
 Operating System: win98//freebsd//any?
 PHP Version:  4.3.2-RC
 New Comment:

You need to provide us the same script to test this with.
Just testing on one machine does not give reliable results.



Previous Comments:


[2003-04-05 09:39:31] project dot draco at gmx dot net

ok,ok

did some testing and found at least the following behaviour:
i kept track of includ_once times in my script and ran a couple of
times the same script, wich includes havily about 300 kB.

While 4.0.6 did this job with an avarage time of 0.4 ms per kB included
script, the 4.3.1 and 4.3.2 versions show an increasing amount of time
use to include_once the scripts.

Some values

sumsize avg 406 avg 432

0   0,550,47
16660   0,540,49
32859   3,923,65
57138   0,570,80
62766   0,460,74
83208   0,460,77
106302  0,440,69
114039  0,560,93
119067  0,571,17
129474  0,621,08
150891  0,901,70
161932  1,461,74
167775  0,430,83
182655  0,421,06
209909  0,471,63
246752  0,491,51
269711  0,421,61
330045  0,481,85
346306  0,411,64


The three bigger values (3.92,0.90,1.46 at the avg406 col) are scripts
that do initial executions and db-queries, so we ommit them.
the rest is simple classdefs, no initializing done.

As you can see, the 432 avg times increase with increasing filesize
(the sizes are summed up so 346306 is the full scriptsize that is run)

Can you read anything helpful out of this posting???

ps Testing was done on win98/php-cgi/apache 1.3.20 systemenvironment.

gruss
mir



[2003-03-31 02:13:08] [EMAIL PROTECTED]

Still waiting for the feedback of more detailed information.




[2003-03-30 05:10:09] project dot draco at gmx dot net

Gave it a try.

Didn't work, sorry. As slow as before...

So now im going to make some testings to find out, where the
performance loss originates from.

I already localized some strange side effects, wich point to the
conclusion, that it is in fact something with the memorymanagment.
The same script, executed as standalone is much faster, than executed
within a huge script.

Ill be back with some more accurate bug-report soon.

so long

mir



[2003-03-25 14:48:32] [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

There was a performance problem for file() and file_get_contents() on
systems without memory mapping support; this has been fixed in the
stable snapshots.

Please give it a try.



[2003-03-25 12:43:16] project dot draco at gmx dot net

I switched from php 4.0.6 to 4.3.1 lately. I run php as cgi on an
win98-apache 1.3.20-php-mysql system.

I think i missed all versions in between, but now i realize a
performance loss of about 50% (execution time nearly doubled without
ANY code changed, simply giving Apache a different cgi)
I was able to catch up partly by tuning the php.ini (i never did this
before!) but still expirience serious performance loss.

This mostly seems to take place on database and filesystem operations,
but i'm not sure of this.

Could someone measure this out?






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



#23059 [WFx->Csd]: Documentation wrong? Or just used the wrong word?

2003-04-05 Thread sniper
 ID:   23059
 Updated by:   [EMAIL PROTECTED]
 Reported By:  kyrael at web dot de
-Status:   Wont fix
+Status:   Closed
 Bug Type: Session related
 Operating System: Linux
 PHP Version:  4.3.1
 New Comment:

And as some people don't bother closing bugs they 'fix'...
This is now "fixed" in CVS.



Previous Comments:


[2003-04-05 11:26:13] [EMAIL PROTECTED]

Nitpicking..




[2003-04-05 04:58:39] [EMAIL PROTECTED]

That is a typo in the php4/php.ini-dist that comes from a typo in the
code 
in php4/ext/session/session.c (introduced in revision 1.329) 
 
The 'diff -u' output for the fixes is below: 
 
$ diff -u php4/php.ini-dist-orig php4/php.ini-dist 
--- php4/php.ini-dist-orig  2003-04-05 02:51:07.0 -0800 
+++ php4/php.ini-dist   2003-04-05 02:56:01.0 -0800 
@@ -850,11 +850,11 @@ 
 
 ; Define the probability that the 'garbage collection' process is
started 
 ; on every session initialization. 
-; The probability is calculated by using gc_probability/gc_dividend, 
+; The probability is calculated by using gc_probability/gc_divisor, 
 ; e.g. 1/100 means 1%. 
 
 session.gc_probability = 1 
-session.gc_dividend= 100 
+session.gc_divisor= 100 
 
 ; After this number of seconds, stored data will be seen as 'garbage'

and 
 ; cleaned up by the garbage collection process. 
 
$ diff -u php4/ext/session/session.c-orig php4/ext/session/session.c 
--- php4/ext/session/session.c-orig 2003-04-05 02:57:33.0 
-0800 
+++ php4/ext/session/session.c  2003-04-05 02:58:04.0 -0800 
@@ -138,7 +138,7 @@ 
PHP_INI_ENTRY("session.save_handler",   "files", 
PHP_INI_ALL, OnUpdateSaveHandler) 
STD_PHP_INI_BOOLEAN("session.auto_start",   "0", 
PHP_INI_ALL, OnUpdateBool,   auto_start, php_ps_globals,
ps_globals) 
STD_PHP_INI_ENTRY("session.gc_probability", "1", 
PHP_INI_ALL, OnUpdateLong,gc_probability, php_ps_globals,
ps_globals) 
-   STD_PHP_INI_ENTRY("session.gc_dividend","100",   
PHP_INI_ALL, OnUpdateLong,gc_dividend,php_ps_globals,
ps_globals) 
+   STD_PHP_INI_ENTRY("session.gc_divisor","100",   
PHP_INI_ALL, OnUpdateLong,gc_divisor,php_ps_globals,
ps_globals) 
STD_PHP_INI_ENTRY("session.gc_maxlifetime", "1440",  
PHP_INI_ALL, OnUpdateLong,gc_maxlifetime, php_ps_globals,
ps_globals) 
PHP_INI_ENTRY("session.serialize_handler",  "php",   
PHP_INI_ALL, OnUpdateSerializer) 
STD_PHP_INI_ENTRY("session.cookie_lifetime","0", 
PHP_INI_ALL, OnUpdateLong,cookie_lifetime,php_ps_globals,
ps_globals) 
@@ -1154,7 +1154,7 @@ 
if (PS(mod_data) && PS(gc_probability) > 0) { 
int nrdels = -1; 
 
-   nrand = (int) ((float) PS(gc_dividend) * 
php_combined_lcg(TSRMLS_C)); 
+   nrand = (int) ((float) PS(gc_divisor) * 
php_combined_lcg(TSRMLS_C)); 
if (nrand < PS(gc_probability)) { 
PS(mod)->s_gc(&PS(mod_data),
PS(gc_maxlifetime), 
&nrdels TSRMLS_CC); 
 #if 0 
 
 



[2003-04-05 04:45:09] kyrael at web dot de

Taken from php.ini-dist:

; Define the probability that the 'garbage collection' process is
started
; on every session initialization.
; The probability is calculated by using gc_probability/gc_dividend,
; e.g. 1/100 means 1%.

session.gc_probability = 1
session.gc_dividend= 100

Is this really true? Because, if it really was that way, gc_dividend
should be named gc_divisor... dividend is the latin form for something
to be divided.




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



#23063 [Opn->WFx]: Enhancement to urlencode(), rawurlencode()

2003-04-05 Thread pollita
 ID:   23063
 Updated by:   [EMAIL PROTECTED]
 Reported By:  mccarthy36 at earthlink dot net
-Status:   Open
+Status:   Wont fix
 Bug Type: Feature/Change Request
 Operating System: All
 PHP Version:  4.3.1
 New Comment:

You can achieve the same results using preg_replace:

preg_replace('/./e',"sprintf('%%%02X',ord('\\0'))",$foo);

The resulting string can be parsed by any RFC compliant query string
decoder.


Previous Comments:


[2003-04-05 11:29:14] mccarthy36 at earthlink dot net

I'd like to see an optional boolean second argument to urlencode() and
rawurlencode() to cause encoding of all characters in the argument
string, even alphanumerics.

Like this:
string urlencode ( string str [, bool encode_all])
string rawurlencode ( string str [, bool encode_all])

Naturally the optional argument would default to false to preserve the
current behavior.

Thanks




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



#23063 [WFx]: Enhancement to urlencode(), rawurlencode()

2003-04-05 Thread mccarthy36 at earthlink dot net
 ID:   23063
 User updated by:  mccarthy36 at earthlink dot net
 Reported By:  mccarthy36 at earthlink dot net
 Status:   Wont fix
 Bug Type: Feature/Change Request
 Operating System: All
 PHP Version:  4.3.1
 New Comment:

That's true.  You could also do the following and dispense with the
built in functions entirely, but it's not very convenient (and perhaps
less efficient?).

preg_replace( array( '/[^\w. -]/e', '/ /' ), array( "sprintf( '%%%02X',
ord( '\\0' ) ) ", '+' ), $foo_original );

preg_replace( '/[^\w.-]/e', "sprintf( '%%%02X', ord( '\\0' ) )",
$foo_original );

That's some pretty complicated code, that you have to go through the
hassle of carrying around with you everywhere you need it, to perform a
pretty simple action.  I don't understand why you just automatically
decided to condemn this to "Wont fix".  It seems like it would be
pretty simple to implement, and the change I suggested wouldn't
interfere with anything.  The usefulness / necessity is self-evident
and demonstrated by the existence of the current built in functions.


Previous Comments:


[2003-04-05 12:44:44] [EMAIL PROTECTED]

You can achieve the same results using preg_replace:

preg_replace('/./e',"sprintf('%%%02X',ord('\\0'))",$foo);

The resulting string can be parsed by any RFC compliant query string
decoder.



[2003-04-05 11:29:14] mccarthy36 at earthlink dot net

I'd like to see an optional boolean second argument to urlencode() and
rawurlencode() to cause encoding of all characters in the argument
string, even alphanumerics.

Like this:
string urlencode ( string str [, bool encode_all])
string rawurlencode ( string str [, bool encode_all])

Naturally the optional argument would default to false to preserve the
current behavior.

Thanks




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



#23064 [NEW]: don't connect to mysql

2003-04-05 Thread jelzio at hotmail dot com
From: jelzio at hotmail dot com
Operating system: linux
PHP version:  4.3.0
PHP Bug Type: MySQL related
Bug description:  don't connect to mysql

**this is error
Warning: Wrong parameter count for mysql_connect() in
.../class/adodb/drivers/adodb-mysql.inc.php on line 190 

*this is the script that I use **
include 'class/adodb.php'
$db = ADONewConnection('mysql'); 
/*here*/$db->Connect($db_host, $db_user, $db_password, $db_name)

Then I opened to the file adodb-mysql.inc.php to review it and if you see
the error happens in 190 line of adodb v3.00 and 211 line in adodb v3.31,
as they are equal in both cases only you I show it once.

function _connect($argHostname, $argUsername, $argPassword,
$argDatabasename) 
{ 
global $ADODB_PHPVER; 
if ($ADODB_PHPVER >= 0x4300) 
$this->_connectionID =
mysql_connect($argHostname,$argUsername,$argPassword, 
/*in this line  it happens the error
*/$this->forceNewConnect,$this->clientFlags); 


I have PHP 4.3.0 and MySQL 3.23.37 
-- 
Edit bug report at http://bugs.php.net/?id=23064&edit=1
-- 
Try a CVS snapshot: http://bugs.php.net/fix.php?id=23064&r=trysnapshot
Fixed in CVS:   http://bugs.php.net/fix.php?id=23064&r=fixedcvs
Fixed in release:   http://bugs.php.net/fix.php?id=23064&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=23064&r=needtrace
Try newer version:  http://bugs.php.net/fix.php?id=23064&r=oldversion
Not developer issue:http://bugs.php.net/fix.php?id=23064&r=support
Expected behavior:  http://bugs.php.net/fix.php?id=23064&r=notwrong
Not enough info:http://bugs.php.net/fix.php?id=23064&r=notenoughinfo
Submitted twice:http://bugs.php.net/fix.php?id=23064&r=submittedtwice
register_globals:   http://bugs.php.net/fix.php?id=23064&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=23064&r=php3
Daylight Savings:   http://bugs.php.net/fix.php?id=23064&r=dst
IIS Stability:  http://bugs.php.net/fix.php?id=23064&r=isapi
Install GNU Sed:http://bugs.php.net/fix.php?id=23064&r=gnused



#23065 [NEW]: Under some circumstances retval is broken.

2003-04-05 Thread bole at EUnet dot yu
From: bole at EUnet dot yu
Operating system: Linux, 2.4.20
PHP version:  4.3.2RC1
PHP Bug Type: Program Execution
Bug description:  Under some circumstances retval is broken.

Hmm.. this one is a little bit tricky.

I do something like this:
system ("/usr/bin/ssh -l someuser somehost /path/somescr.pl", $return);

Executing that command (from the same user as apache runs) back EVERY TIME
correct retval.

But, when called from Apache+PHP (no matter if safe_mode is enabled nor
disabled) and if somescr.pl outputs something on STDOUT, retval randomly
vary (0 or 255).

somescr.pl is:

#! /usr/bin/perl
print "OK";
exit 0;

Tried exec() and passthru (), results are the same.
-- 
Edit bug report at http://bugs.php.net/?id=23065&edit=1
-- 
Try a CVS snapshot: http://bugs.php.net/fix.php?id=23065&r=trysnapshot
Fixed in CVS:   http://bugs.php.net/fix.php?id=23065&r=fixedcvs
Fixed in release:   http://bugs.php.net/fix.php?id=23065&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=23065&r=needtrace
Try newer version:  http://bugs.php.net/fix.php?id=23065&r=oldversion
Not developer issue:http://bugs.php.net/fix.php?id=23065&r=support
Expected behavior:  http://bugs.php.net/fix.php?id=23065&r=notwrong
Not enough info:http://bugs.php.net/fix.php?id=23065&r=notenoughinfo
Submitted twice:http://bugs.php.net/fix.php?id=23065&r=submittedtwice
register_globals:   http://bugs.php.net/fix.php?id=23065&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=23065&r=php3
Daylight Savings:   http://bugs.php.net/fix.php?id=23065&r=dst
IIS Stability:  http://bugs.php.net/fix.php?id=23065&r=isapi
Install GNU Sed:http://bugs.php.net/fix.php?id=23065&r=gnused



#23056 [Bgs->Opn]: gif and jpeg php generated pictures bug

2003-04-05 Thread dan1 at edenpics dot com
 ID:   23056
 User updated by:  dan1 at edenpics dot com
 Reported By:  dan1 at edenpics dot com
-Status:   Bogus
+Status:   Open
 Bug Type: Output Control
 Operating System: Linux RedHat 7.1
 PHP Version:  4.3.2RC1
 New Comment:

Yes, the bird was in JPEG before, I changed it in GIF, to be more
coherent with the code. It's because I tested several formats, sorry
for this incovenience. However, the bug appears in GIF or JPEG, so the
bug is the same now.

I just found out that the bug comes out only if we sent the
"Cache-Control" header along with the picture, which is something I
forgot to mention in my previous code, because I thought that it was
not relevant. In fact, THIS IS the problem.

So here is the code that really generates the bug:



If you comment out the Cache-Control header line, everything works
fine, so this is a workaround. However, I think that it is still a PHP
bug, don't you ?
Please try again (1 minute), I updated the report page:
http://www.edenpics.com/pub/iebug/iebug2.phtml

Thank you.


Previous Comments:


[2003-04-05 11:13:29] [EMAIL PROTECTED]

Disclaimer: the bird.gif _WAS_ jpeg before.. :)




[2003-04-05 11:12:22] [EMAIL PROTECTED]

the example bird.gif is actually JPEG, not GIF..
And when having the correct script with correct imagetype,
this all works just fine.

This is NOT any bug in PHP.




[2003-04-05 00:28:33] [EMAIL PROTECTED]

I copied your script directly and found a bird.gif image out there. 
You can see the result at:
http://lerdorf.com/bird.php
Source code at:
http://lerdorf.com/bird.phps
Works ok for me.  Perhaps you have something before or after the
start/end php tags, or do you have weird line endings or something?  Do
an "od -c bird.php" and compare it to:
http://lerdorf.com/bird.txt




[2003-04-04 12:55:43] dan1 at edenpics dot com

Something more: this happens with all versions of Internet Explorer



[2003-04-04 12:21:28] dan1 at edenpics dot com

Sorry, $output is the file name.
here is the correct code:



I tried PHP version 4.3.2RC1. The same happens.
This bug appears with jpeg (.jpg) files too, with the "e99\r\n" code
before the picture datas, and they can only be saved as BMP too.



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

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



#23056 [Opn->Ana]: gif and jpeg php generated pictures bug

2003-04-05 Thread rasmus
 ID:   23056
 Updated by:   [EMAIL PROTECTED]
 Reported By:  dan1 at edenpics dot com
-Status:   Open
+Status:   Analyzed
 Bug Type: Output Control
 Operating System: Linux RedHat 7.1
 PHP Version:  4.3.2RC1
 New Comment:

I don't see how this could possible be a PHP problem.  I see nothing
wrong with the output of your script.  I sent an IE6 request and looked
at the output.  The headers sent by
http://www.edenpics.com/pub/iebug/bird.php were:

HTTP/1.1 200 OK
Date: Sat, 05 Apr 2003 23:13:47 GMT
Server: Apache
X-Powered-By: PHP/4.1.2
Cache-Control: no-cache, must-revalidate
Connection: close
Content-Type: image/gif

Followed by this gif datastream:

000   G   I   F   8   9   a   2  \0   (  \0 367 204  \0 001 002
002
020 003 002  \t 005  \n 017  \b 003  \b  \f  \n 002  \n  \n  \v
003
040 006 025 006  \t 035  \n  \f 032  \f 021 036 024 024 026 020
024
060 036  \v 021   ! 016 023   ( 024 025   - 027 033   ) 022 031  
2
100 033 036   0 032   $   . 025   #   8 033   !   < 030   (   :  
!
120   +   E   #   ,   N   *   3   L   '   1   Q   '   1   \   1  
<
140   V   /   <   b   ,   >   l   +   <   r   7   E   n   :   E  
g
160   <   M   m   ;   J   s   =   L   ~   ?   P   |   A   N   x  
B

I see nothing wrong.  


Previous Comments:


[2003-04-05 15:59:06] dan1 at edenpics dot com

Yes, the bird was in JPEG before, I changed it in GIF, to be more
coherent with the code. It's because I tested several formats, sorry
for this incovenience. However, the bug appears in GIF or JPEG, so the
bug is the same now.

I just found out that the bug comes out only if we sent the
"Cache-Control" header along with the picture, which is something I
forgot to mention in my previous code, because I thought that it was
not relevant. In fact, THIS IS the problem.

So here is the code that really generates the bug:



If you comment out the Cache-Control header line, everything works
fine, so this is a workaround. However, I think that it is still a PHP
bug, don't you ?
Please try again (1 minute), I updated the report page:
http://www.edenpics.com/pub/iebug/iebug2.phtml

Thank you.



[2003-04-05 11:13:29] [EMAIL PROTECTED]

Disclaimer: the bird.gif _WAS_ jpeg before.. :)




[2003-04-05 11:12:22] [EMAIL PROTECTED]

the example bird.gif is actually JPEG, not GIF..
And when having the correct script with correct imagetype,
this all works just fine.

This is NOT any bug in PHP.




[2003-04-05 00:28:33] [EMAIL PROTECTED]

I copied your script directly and found a bird.gif image out there. 
You can see the result at:
http://lerdorf.com/bird.php
Source code at:
http://lerdorf.com/bird.phps
Works ok for me.  Perhaps you have something before or after the
start/end php tags, or do you have weird line endings or something?  Do
an "od -c bird.php" and compare it to:
http://lerdorf.com/bird.txt




[2003-04-04 12:55:43] dan1 at edenpics dot com

Something more: this happens with all versions of Internet Explorer



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

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



#23066 [NEW]: fsocketopen fail when connecting to server where calling script run

2003-04-05 Thread garfield_fr at tiscali dot fr
From: garfield_fr at tiscali dot fr
Operating system: Windows 2000
PHP version:  4.3.1
PHP Bug Type: *Network Functions
Bug description:  fsocketopen fail when connecting to server where calling script run

Config :
OS : Win2000
Server HTTP : IIS5
PHP 4.3.1 ISAPI

I have 2 scripts : client.php and server.php on a server.
I can use these scripts by http://mysite.domain.net/server.php and
http://mysite.domain.net/client.php.

In fact, client.php is a test script to check server.php, a web services
using nuSOAP. both scripts are using nuSOAP.php.

1/ When client.php run on server and call server.php with URL :
http://mysite.domain.net/server.php I have a fsockopen error:
[05-Apr-2003 22:15:10] PHP Warning:  fsockopen() [function.fsockopen]:
php_hostconnect: connect failed in E:\Root\mysite\nuSOAP\nusoap.php on
line 1352
[05-Apr-2003 22:15:10] PHP Warning:  fsockopen() [function.fsockopen]:
unable to connect to mysite.domain.net:80 in
E:\Root\mysite\nuSOAP\nusoap.php on line 1352

2/ When I use my computer to run client.php (running at
http://10.0.0.11/client.php where 10.0.0.11 is my local IP) and call
server.php at http://mysite.domain.net/server.php I have a good result and
evry thing work fine.

3/ When I use my computer to run client.php (running at
http://10.0.0.11/client.php where 10.0.0.11 is my local IP) and call
server.php at http://10.0.0.11/server.php I have a good result and evry
thing work fine too !!!

>From 1/ and 2/ I think fsockopen() can't open a connection on the server
who run the calling scripts (remember, it's in ISAPI mode)...so maybe a
bug here ?

but from why 3/ work ? my local server is in ISAPI mode to (IIS5/W2K Pro
SP3)...

conclusion : fsockopen seem to fail in some case  I think is a bug ???
-- 
Edit bug report at http://bugs.php.net/?id=23066&edit=1
-- 
Try a CVS snapshot: http://bugs.php.net/fix.php?id=23066&r=trysnapshot
Fixed in CVS:   http://bugs.php.net/fix.php?id=23066&r=fixedcvs
Fixed in release:   http://bugs.php.net/fix.php?id=23066&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=23066&r=needtrace
Try newer version:  http://bugs.php.net/fix.php?id=23066&r=oldversion
Not developer issue:http://bugs.php.net/fix.php?id=23066&r=support
Expected behavior:  http://bugs.php.net/fix.php?id=23066&r=notwrong
Not enough info:http://bugs.php.net/fix.php?id=23066&r=notenoughinfo
Submitted twice:http://bugs.php.net/fix.php?id=23066&r=submittedtwice
register_globals:   http://bugs.php.net/fix.php?id=23066&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=23066&r=php3
Daylight Savings:   http://bugs.php.net/fix.php?id=23066&r=dst
IIS Stability:  http://bugs.php.net/fix.php?id=23066&r=isapi
Install GNU Sed:http://bugs.php.net/fix.php?id=23066&r=gnused



#23063 [WFx]: Enhancement to urlencode(), rawurlencode()

2003-04-05 Thread pollita
 ID:   23063
 Updated by:   [EMAIL PROTECTED]
 Reported By:  mccarthy36 at earthlink dot net
 Status:   Wont fix
 Bug Type: Feature/Change Request
 Operating System: All
 PHP Version:  4.3.1
 New Comment:

What's neither useful nor self-evident is what the value of encoding
alphanumerics and other non-special characters is.

You're absolutely right when you say that it's a simple matter to add
this function and that it won't break BC.  The reason this is marked
"Won't Fix", however, is because there are literally hundreds of such
functions which, while taken individually are trivial and harmless,
while taken together add up to a great deal of bloat.

Have you considered creating a PEAR class?  Possibly one which includes
other URL related functionality as well.  One of the reasons the PEAR
and PECL repositories were created (the chief reason in fact) was to
allow functions such as what you describe to be 'standard' without
adding to what is (let's be honest) an already overloaded scripting
engine.


Previous Comments:


[2003-04-05 14:54:32] mccarthy36 at earthlink dot net

That's true.  You could also do the following and dispense with the
built in functions entirely, but it's not very convenient (and perhaps
less efficient?).

preg_replace( array( '/[^\w. -]/e', '/ /' ), array( "sprintf( '%%%02X',
ord( '\\0' ) ) ", '+' ), $foo_original );

preg_replace( '/[^\w.-]/e', "sprintf( '%%%02X', ord( '\\0' ) )",
$foo_original );

That's some pretty complicated code, that you have to go through the
hassle of carrying around with you everywhere you need it, to perform a
pretty simple action.  I don't understand why you just automatically
decided to condemn this to "Wont fix".  It seems like it would be
pretty simple to implement, and the change I suggested wouldn't
interfere with anything.  The usefulness / necessity is self-evident
and demonstrated by the existence of the current built in functions.



[2003-04-05 12:44:44] [EMAIL PROTECTED]

You can achieve the same results using preg_replace:

preg_replace('/./e',"sprintf('%%%02X',ord('\\0'))",$foo);

The resulting string can be parsed by any RFC compliant query string
decoder.



[2003-04-05 11:29:14] mccarthy36 at earthlink dot net

I'd like to see an optional boolean second argument to urlencode() and
rawurlencode() to cause encoding of all characters in the argument
string, even alphanumerics.

Like this:
string urlencode ( string str [, bool encode_all])
string rawurlencode ( string str [, bool encode_all])

Naturally the optional argument would default to false to preserve the
current behavior.

Thanks




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



#23066 [Opn->Fbk]: fsocketopen fail when connecting to server where calling script run

2003-04-05 Thread pollita
 ID:   23066
 Updated by:   [EMAIL PROTECTED]
 Reported By:  garfield_fr at tiscali dot fr
-Status:   Open
+Status:   Feedback
 Bug Type: *Network Functions
 Operating System: Windows 2000
 PHP Version:  4.3.1
 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.


This is *impossible* to debug without knowing the contents of
client.php and server.php.


Previous Comments:


[2003-04-05 16:18:38] garfield_fr at tiscali dot fr

Config :
OS : Win2000
Server HTTP : IIS5
PHP 4.3.1 ISAPI

I have 2 scripts : client.php and server.php on a server.
I can use these scripts by http://mysite.domain.net/server.php and
http://mysite.domain.net/client.php.

In fact, client.php is a test script to check server.php, a web
services using nuSOAP. both scripts are using nuSOAP.php.

1/ When client.php run on server and call server.php with URL :
http://mysite.domain.net/server.php I have a fsockopen error:
[05-Apr-2003 22:15:10] PHP Warning:  fsockopen() [function.fsockopen]:
php_hostconnect: connect failed in E:\Root\mysite\nuSOAP\nusoap.php
on line 1352
[05-Apr-2003 22:15:10] PHP Warning:  fsockopen() [function.fsockopen]:
unable to connect to mysite.domain.net:80 in
E:\Root\mysite\nuSOAP\nusoap.php on line 1352

2/ When I use my computer to run client.php (running at
http://10.0.0.11/client.php where 10.0.0.11 is my local IP) and call
server.php at http://mysite.domain.net/server.php I have a good result
and evry thing work fine.

3/ When I use my computer to run client.php (running at
http://10.0.0.11/client.php where 10.0.0.11 is my local IP) and call
server.php at http://10.0.0.11/server.php I have a good result and evry
thing work fine too !!!

>From 1/ and 2/ I think fsockopen() can't open a connection on the
server who run the calling scripts (remember, it's in ISAPI mode)...so
maybe a bug here ?

but from why 3/ work ? my local server is in ISAPI mode to (IIS5/W2K
Pro SP3)...

conclusion : fsockopen seem to fail in some case  I think is a bug
???




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



#22108 [Com]: php doesn't ignore the utf-8 BOM

2003-04-05 Thread tronxoe at hotpop dot com
 ID:   22108
 Comment by:   tronxoe at hotpop dot com
 Reported By:  bugzilla at jellycan dot com
 Status:   Open
 Bug Type: Feature/Change Request
 Operating System: Any
 PHP Version:  All (as of the current implementation)
 Assigned To:  moriyoshi
 New Comment:

The BOM is still fine when the php file does not include another
Unicode file (by using @include()).

Another problem: If a php file is saved in unicode,  session and
cookies can not be used because "headers already sent ...". I think the
first 3 bytes has been sent in this case


Previous Comments:


[2003-02-08 10:57:30] [EMAIL PROTECTED]

reassigning



[2003-02-08 06:10:51] [EMAIL PROTECTED]

Ok, the UTF-8 BOM was new to me.
If i find the time i'll have a look at it over the weekend.
I think the solution would be somewhere in zend's multibyte support
since i fear adding that bom to mbstring
alone does not do the trick.



[2003-02-08 05:43:14] bugzilla at jellycan dot com

derick, assuming that you wanted to create a version of the the example
at http://www.php.net/manual/en/introduction.php#intro-whatis which
displayed the text "Hi, I'm a PHP script" in multiple languages, how
would you propose doing it?  

The only way is to use a form of unicode encoding. The least intrusive
of these ways is utf-8 because it encodes the text in such a way that
ascii characters (7 bit characters) are still plain ascii characters,
and all encoded characters are always >128 and will never be mistaken
for ascii.

I haven't seen any documentation which states that php can only handle
ascii text, please direct me to it if it exists.  If there is some
known problem with PHP parsing UTF-8 scripts, I haven't found it yet in
a multitude of different files with different languages which PHP is
parsing happily.

The only problem that I have had is that any files which have an UTF-8
BOM, PHP is mistakenly outputting the BOM as input. This is a bug of
PHP. The solution is easy, on loading a file, strip the BOM if it
exists. Make it optional processing via a php.ini config argument if
necessary.

Don't be US-centric in your thinking, there is far more world existing
outside those borders.

Regards,
Brodie.



[2003-02-08 04:24:12] [EMAIL PROTECTED]

PHP doesn't want UNICODE scripts, but just ASCII ones. Not a bug ->
bogus.



[2003-02-08 02:01:11] [EMAIL PROTECTED]

And assigning this task to me.




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

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