#22086 [NEW]: OCIBindByName causes problem if more than one Oracle statements are executed.

2003-02-06 Thread gnitesh
From: [EMAIL PROTECTED]
Operating system: Red Hat Linux 7.3
PHP version:  5CVS-2003-02-06 (dev)
PHP Bug Type: OCI8 related
Bug description:  OCIBindByName causes problem if more than one Oracle statements are 
executed.

I have a script that combines various statements before it calls the
OCIParse or OCIExecute.

For instance

Begin 
Insert into TABLEA(COLA, COLB, COLC) Values('VAL1', 'VAL2', 'VAL3');
Update TABLEB Set COLB = 'SOMEVAL' Where ROWID = :RID1 
End;

when I call an OCIBindByName for :RID1 as

OCIBindByName($oci_stmt,":RID".$i,&$this->arr_rowid[$i],-1,OCI_B_ROWID);

where I've defined each subscript of arr_rowid using OCINewDescriptor
using the following

$this->arr_rowid[$i] =
OCINewDescriptor($this->obj_conn,OCI_D_ROWID);

OCIExecute gives me an error saying 

Warning: OCIStmtExecute: ORA-06550: line 1, column 221: PL/SQL: ORA-00933:
SQL command not properly ended ORA-06550: line 1, column 93: PL/SQL: SQL
Statement ignored ORA-06550: line 1, column 224: PLS-00103: Encountered
the symbol "end-of-file" when expecting one of the following: begin case
declare end exception exit for goto if loop mod null pragma raise return
select update while with /var/www/html/crp/includes/dbconn.inc on line
333

I'm still investigating into the issue. Instincts tell me that the problem
is due to multiple statements in 1 query so am all up on changing the
entire class for all such occurances. However, the attempt to save
database time by executing multiple queries together seems like is not
destined to work. If it doesn't work, I'll get back in here with more
info.

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




#22087 [NEW]: OCIBindByName causes problem if more than one Oracle statements are executed.

2003-02-06 Thread gnitesh
From: [EMAIL PROTECTED]
Operating system: Red Hat Linux 7.3
PHP version:  5CVS-2003-02-06 (dev)
PHP Bug Type: OCI8 related
Bug description:  OCIBindByName causes problem if more than one Oracle statements are 
executed.

I have a script that combines various statements before it calls the
OCIParse or OCIExecute.

For instance

Begin 
Insert into TABLEA(COLA, COLB, COLC) Values('VAL1', 'VAL2', 'VAL3');
Update TABLEB Set COLB = 'SOMEVAL' Where ROWID = :RID1 
End;

when I call an OCIBindByName for :RID1 as

OCIBindByName($oci_stmt,":RID".$i,&$this->arr_rowid[$i],-1,OCI_B_ROWID);

where I've defined each subscript of arr_rowid using OCINewDescriptor
using the following

$this->arr_rowid[$i] =
OCINewDescriptor($this->obj_conn,OCI_D_ROWID);

OCIExecute gives me an error saying 

Warning: OCIStmtExecute: ORA-06550: line 1, column 221: PL/SQL: ORA-00933:
SQL command not properly ended ORA-06550: line 1, column 93: PL/SQL: SQL
Statement ignored ORA-06550: line 1, column 224: PLS-00103: Encountered
the symbol "end-of-file" when expecting one of the following: begin case
declare end exception exit for goto if loop mod null pragma raise return
select update while with /var/www/html/crp/includes/dbconn.inc on line
333

I'm still investigating into the issue. Instincts tell me that the problem
is due to multiple statements in 1 query so am all up on changing the
entire class for all such occurances. However, the attempt to save
database time by executing multiple queries together seems like is not
destined to work. If it doesn't work, I'll get back in here with more
info.

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




#22087 [Opn->Bgs]: OCIBindByName causes problem if more than one Oracle statements are executed.

2003-02-06 Thread magnus
 ID:   22087
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Bogus
 Bug Type: OCI8 related
 Operating System: Red Hat Linux 7.3
 PHP Version:  5CVS-2003-02-06 (dev)
 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. Because of this, we hope you add your comments
to the existing bug instead.

Thank you for your interest in PHP.

. 


Previous Comments:


[2003-02-06 02:24:52] [EMAIL PROTECTED]

I have a script that combines various statements before it calls the
OCIParse or OCIExecute.

For instance

Begin 
Insert into TABLEA(COLA, COLB, COLC) Values('VAL1', 'VAL2', 'VAL3');
Update TABLEB Set COLB = 'SOMEVAL' Where ROWID = :RID1 
End;

when I call an OCIBindByName for :RID1 as

OCIBindByName($oci_stmt,":RID".$i,&$this->arr_rowid[$i],-1,OCI_B_ROWID);

where I've defined each subscript of arr_rowid using OCINewDescriptor
using the following

$this->arr_rowid[$i] =
OCINewDescriptor($this->obj_conn,OCI_D_ROWID);

OCIExecute gives me an error saying 

Warning: OCIStmtExecute: ORA-06550: line 1, column 221: PL/SQL:
ORA-00933: SQL command not properly ended ORA-06550: line 1, column 93:
PL/SQL: SQL Statement ignored ORA-06550: line 1, column 224: PLS-00103:
Encountered the symbol "end-of-file" when expecting one of the
following: begin case declare end exception exit for goto if loop mod
null pragma raise return select update while with
/var/www/html/crp/includes/dbconn.inc on line 333

I'm still investigating into the issue. Instincts tell me that the
problem is due to multiple statements in 1 query so am all up on
changing the entire class for all such occurances. However, the attempt
to save database time by executing multiple queries together seems like
is not destined to work. If it doesn't work, I'll get back in here with
more info.





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




#20874 [Dup->Bgs]: socket_read on Multihomed Windows XP crashes PHP

2003-02-06 Thread sniper
 ID:   20874
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Duplicate
+Status:   Bogus
 Bug Type: Sockets related
 Operating System: Windows XP
 PHP Version:  4.3.0RC2
 New Comment:

There's better report around -> bogus.


Previous Comments:


[2003-02-06 00:25:25] [EMAIL PROTECTED]

21197 seems to provide better information. Will mark this 
one as duplicate. 
Please add new comments to: 21197 
 



[2003-02-05 21:33:16] [EMAIL PROTECTED]

duplicate of #21197

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



[2002-12-25 01:00:03] [EMAIL PROTECTED]

No feedback was provided for this bug for over 2 weeks, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".



[2002-12-09 09:22:53] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2002-12-07 15:09:06] [EMAIL PROTECTED]

I downgraded the PHP version on this server to 4.2.2
It now works properly on this version.

It crashes on socket_read();

The parameters I am using in my Application are:
socket_read($this->sock[1],2048);

Like I said, the Example Aplication from the PHP Manual for  a WWW
Client also crashes, also on socket_read.



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

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




#22088 [NEW]: array_shift() and the last index of the array

2003-02-06 Thread audrius
From: [EMAIL PROTECTED]
Operating system: Linux, Windows 
PHP version:  4.3.0
PHP Bug Type: Arrays related
Bug description:  array_shift() and the last index of the array

$m=array('a','b');
$last = array_shift ($m);
$m[]='c';//or array_push ($m,'c');
print_r($m);

in 4.3.0 output is:
Array ( [0] => b [2] => c )

In previous php versions output was:
Array ( [0] => b [1] => c )

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




#18648 [Com]: Single entry form POST gives incorrect variable content

2003-02-06 Thread rep
 ID:   18648
 Comment by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Feedback
 Bug Type: Apache2 related
 Operating System: All
 PHP Version:  5CVS-2003-01-29 (dev) / 4CVS-20020121 (stable)
 New Comment:

That's it.


Previous Comments:


[2003-02-04 20:49:40] [EMAIL PROTECTED]

Thanks... It works ok.



[2003-02-04 15:05:45] [EMAIL PROTECTED]

[To anyone who experiences this trouble]

Are you sure that your httpd.conf has just A SINGLE KIND OF PHP RELATED
DIRECTIVE?

Then try grep "\(OutputFilter\|InputFilter\|AddType\)" < httpd.conf or
whatsoever.

# bad example (a)
AddInputFilter PHP php
AddOutputFilter PHP php

...

AddType x-httpd-php .php

# bad example (b)
SetInputFilter PHP
SetOutputFilter PHP

...

AddType x-httpd-php .php

# not bad (c)
AddInputFilter PHP php
AddOutputFilter PHP php

# good (d)
AddType x-httpd-php .php




[2003-02-04 09:16:42] [EMAIL PROTECTED]

Tested in RH8.0 + PHP 4.2.2 + Apache 2.

- Is ok when you add the 'enctype="multipart/form-data"' propety to the
form tag.
- Is ok when you send using GET method instead POST.
- Is ok when you send more than one field: if you have a text and a
button, if you send it pressing enter only the text send and the
problem occurs. When you press the button, text and button are send and
the problem not occur.
ciao.



[2003-02-03 12:36:09] [EMAIL PROTECTED]

I can _NOT_ reproduce this with Apache 2.0.44 and PHP 4.3.1-dev..




[2003-02-03 11:55:47] [EMAIL PROTECTED]

array(4) {
  [0]=>
  string(1) "1"
  [1]=>
  string(1) "2"
  [2]=>
  string(1) "1"
  [3]=>
  string(1) "2"
}

>From the latest snap's (php4-STABLE, php5). cvs commit (?) :)



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

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




#22072 [Com]: connection_status() always returning 0

2003-02-06 Thread neil
 ID:   22072
 Comment by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Open
 Bug Type: Apache2 related
 Operating System: FREEBSD 4.7-STABLE
 PHP Version:  4.3.0
 New Comment:

To further assist you in your diagnosis, I have supplied you with
additional parameters to the script that is failing.


Firstly you can run the script

http://www.mpfreescene.com/test/

Secondly you can see the source

http://www.mpfreescene.com/test/?option=source

Thirdly you can see phpinfo

http://www.mpfreescene.com/test/?option=info

Forthly you can see the output.txt file, i.e. the result of the failing
script :-

http://www.mpfreescene.com/test/?option=data




Just to recap, this identical script works fine on apache 1,  I have
been to apache they are pushing it back as an php error [the error they
found in an apache2 specific library maybe ?].  And the problem is I
run the script, whenI press stop, it continues to run in the background
and completes normally, i.e. it doesnt recogonise the user abort.



Thanks for your help in this matteer.


Previous Comments:


[2003-02-06 01:55:15] [EMAIL PROTECTED]

Installed this morning, fresh.

Absolutley no difference whatso ever, not even a little bit, still the
same 0's being reported via connection_status when the stop button is
pressed.



[2003-02-05 16:08:19] [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-02-05 15:58:50] [EMAIL PROTECTED]

connection_status() always returns zero on Win32 4.3.0 running IIS.
Yes, ignore_user_abort(true) is set.

Bradley Crockett



[2003-02-05 09:05:27] [EMAIL PROTECTED]

This bug is effecting the connection_status() function in apache 2.x

Okay, getting back to a long standing bug, which we kind of come to the
conclusion last time that it may be a bug in apache 2.x because it
works in apache 1.

Well time has come on, I have submitted the bug to apache after they
fixed the incorrect bytes logged bug, and this is what they have come
up with :-

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16426

ok, I've grabbed the current php source and looked into sapi_apache2.c.
It's
definitely a php bug. Line 90 shows:

if (ap_pass_brigade(f->next, bb) != APR_SUCCESS) {
php_handle_aborted_connection();
}

which won't match in most cases. Also Line 252 and 498.
AFAICS mod_php should (additionally) check connection->aborted.

(marking this bug invalid again)





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




#21775 [NoF->Csd]: memory leak: emalloc(): Unable to alllocate 32 bytes

2003-02-06 Thread peter . karl . mueller
 ID:   21775
 User updated by:  [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   No Feedback
+Status:   Closed
 Bug Type: Reproducible crash
 Operating System: SuSE Linux 7.3
 PHP Version:  4.3.0
 New Comment:

--enable-memory-limit works fine.


Previous Comments:


[2003-02-04 16:51:49] [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-01-21 09:36:56] [EMAIL PROTECTED]

The PHP scripting engine (ZendEngine) doesn't perform conservative GC,
and 
any referenced object are marked as alive. Therefore there are some
cases
where the objects such as mutually-referenced ones remains undestroyed
even
though they are unreachable from the root set of variables. Your
bi-directional
linked list example is just one of such cases.




[2003-01-21 08:26:23] [EMAIL PROTECTED]

The memory limit option will not take effect unless you've compiled
your PHP with --enable-memory-limit.




[2003-01-21 07:26:32] [EMAIL PROTECTED]

Sorry, my bad. I missed "unset" statement.

As for the memory-limit problem it was a bug indeed. See bug #20802.




[2003-01-21 06:03:28] [EMAIL PROTECTED]

my http process rund out of memory after it blowed up
to 320 MB (have 256 MB RAM). in php.ini memory_limit = 8M.
IMHO this is not bogus!



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

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




#22073 [Csd]: --with-mcrypt won't compile

2003-02-06 Thread derick
 ID:   22073
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Closed
 Bug Type: Compile Failure
 Operating System: Red Hat Linux 8.0
 PHP Version:  4.3.0
 New Comment:

PHP's configure still relied that libmcrypt used libltdl always, which
is no longer the case as of libmcrypt 2.5.6.


Previous Comments:


[2003-02-05 20:53:46] [EMAIL PROTECTED]

Any idea what the bug was?

If it's too much trouble to track down the source of the bug don't wory
about it but if someone knows please do tell :)



[2003-02-05 20:43:38] [EMAIL PROTECTED]

User reports the bug is gone in CVS => Closed. 



[2003-02-05 20:38:39] [EMAIL PROTECTED]

Bug disapears with newest CVS snapshot. Thank you.

Just curious but what was the bug?



[2003-02-05 11:48:24] [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

Very likely to be fixed in CVS.



[2003-02-05 11:14:00] [EMAIL PROTECTED]

Sorry, I forgot to answer you question about mcrypt version.

# libmcrypt-config --version
2.5.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/22073

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




#22089 [NEW]: fgetcsv does not like \r\n inside text content

2003-02-06 Thread jolyon
From: [EMAIL PROTECTED]
Operating system: Linux
PHP version:  4.2.3
PHP Bug Type: Filesystem function related
Bug description:  fgetcsv does not like \r\n inside text content

When importing a line with fgetcsv, if a text string contains \r\n
characters it messes up the import as fgetcsv incorrectly believes it to
be the end of the line. 
-- 
Edit bug report at http://bugs.php.net/?id=22089&edit=1
-- 
Try a CVS snapshot: http://bugs.php.net/fix.php?id=22089&r=trysnapshot
Fixed in CVS:   http://bugs.php.net/fix.php?id=22089&r=fixedcvs
Fixed in release:   http://bugs.php.net/fix.php?id=22089&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=22089&r=needtrace
Try newer version:  http://bugs.php.net/fix.php?id=22089&r=oldversion
Not developer issue:http://bugs.php.net/fix.php?id=22089&r=support
Expected behavior:  http://bugs.php.net/fix.php?id=22089&r=notwrong
Not enough info:http://bugs.php.net/fix.php?id=22089&r=notenoughinfo
Submitted twice:http://bugs.php.net/fix.php?id=22089&r=submittedtwice
register_globals:   http://bugs.php.net/fix.php?id=22089&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=22089&r=php3
Daylight Savings:   http://bugs.php.net/fix.php?id=22089&r=dst
IIS Stability:  http://bugs.php.net/fix.php?id=22089&r=isapi
Install GNU Sed:http://bugs.php.net/fix.php?id=22089&r=gnused




#21728 [Opn]: sort() sorts are unpredictable

2003-02-06 Thread mgf
 ID:   21728
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Open
 Bug Type: Unknown/Other Function
 Operating System: All
 PHP Version:  4.4.0-dev
 New Comment:

I agree.  However, in order to give a wholly reliable sort order for
elements of mixed type, I think the only real option is to use a method
that does primary sort on type, with secondary sort on value only when
types are equal.  I suppose there might just be a case for providing an
additional sort type for this, but, given that it can be implemented in
userland with a type-checking callback to usort(), I'm not totally
convinced.

At the very least, I think we need a big fat warning in the docs about
the hazards of mixed-type sorting!

Cheers!

Mike


Previous Comments:


[2003-02-05 02:34:58] [EMAIL PROTECTED]

Reclassified as a sort() problem as this is too weird and
unpredictable.  Maybe php-dev can confirm this behavior as how it
should and will continue to be.  Mike, nice response but I still don't
like this ;)



[2003-01-20 12:00:26] [EMAIL PROTECTED]

 There was (and is) a suspicion in me about because the sort is made by
qsort algo. As you said all comparisons are valid ones but the order is
unpredicatble.
Thanks for the comment.

I think we should rethink the sort() function and maybe change the
default way of sorting (from SORT_REGULAR to SORT_STRING).



[2003-01-20 11:54:48] [EMAIL PROTECTED]

Well, one of the problems here is that some of the array elements will
take different values in an element-to-element comparison depending on
the type of the other element. For example, "true" will be just that
compared to another string, but 0 when compared against an integer;
strings and integers are both converted to Boolean when compared to
true/false (with resulting loss of significant information).

Another problem is that if you're using a non-sequential sorting
algorithm (such as shellsort or quicksort), simply changing the length
of the array will probably change which element is compared to which,
and hence, because of the strangeness of "dual values" caused by
type-juggling, the final order of the array.  (This may be even worse
for an algorithm that is not guaranteed to maintain the order of equal
items.)

If you take a look at the sorted versions of each array cited, you will
find that all of the element-to-neighbour-element comparisons are
actually valid, thus:

array("a","b","c","d","4",5,4,"true","TRUE",true) --
  true   : 4   ==>  (bool)true   == true
  4  : "4" ==>  (int) 4  == 4
  "4": "TRUE"  ==>  (string)  "4"<  "TRUE"
  "TRUE" : "a" ==>  (string)  "TRUE" <  "a"
  "a": "b" ==>  (string)  "a"<  "b"
  "b": "c" ==>  (string)  "b"<  "c"
  "c": "d" ==>  (string)  "c"<  "d"
  "d": "true"  ==>  (string)  "d"<  "true"
  "true" : 5   ==>  (int) 0  <  5

array("a","b","4",5,4,"true","TRUE",true, false, "c") --
  false  : "TRUE"  ==>  (bool)   false  <  true
  "TRUE" : "a" ==>  (string) "TRUE" <  "a"
  "a": "true"  ==>  (string) "a"<  "true"
  "true" : true==>  (bool)   true   == true
  true   : "b" ==>  (bool)   true   == true
  "b": "c" ==>  (string) "b"<  "c"
  "c": 4   ==>  (int)0  == 4
  4  : "4" ==>  (int)4  == 4
  "4": 5   ==>  (int)4  <  5

array("a","b","4",5,4,"true","TRUE",true, false, "c", "d") --
  false  : "4" ==>  (bool)false  <  true
  "4": "TRUE"  ==>  (string)  "4"<  "TRUE"
  "TRUE" : "a" ==>  (string)  "TRUE" <  "a"
  "a": "b" ==>  (string)  "a"<  "b"
  "b": "c" ==>  (string)  "b"<  "c"
  "c": "d" ==>  (string)  "c"<  "d"
  "d": "true"  ==>  (string)  "d"<  "true"
  "true" : true==>  (bool)true   == true
  true   : 4   ==>  (bool)true   == true
  4  : 5   ==>  (int) 4  <  5

So, in each case, we have a valid sort -- just a *different* valid
sort.  The prime determiners here seem to be the non-sequential order
in which the individual comparisons are performed, and, as has been
indicated, the automatic casting that takes place for each one.

(Incidentally, whilst putting the above together I was unable to find a
definitive listing of *exactly* what automatic type-conversions take
place in which contexts.  This is a definite oversight, as in contexts
like the above it's important to know, for example, that comparing an
int to a bool will cast the int to bool, and not the bool to int. 
Perhaps this needs to become a doc problem for the inclusion of such a
list or table?)

Hope this enlightens at least some souls reading this 

#22090 [NEW]: Segmentation fault when build as extension

2003-02-06 Thread tilman . giese
From: [EMAIL PROTECTED]
Operating system: SuSE Linux 8.1
PHP version:  4.3.0
PHP Bug Type: Recode related
Bug description:  Segmentation fault when build as extension

I recently compiled PHP with recode support (Version 3.6) without any
problems. But when I compile it as a shared extension, Apache (2.0.44)
fails on startup with a segmentation fault shortly after loading
librecode. Strace shows the following:

gettimeofday({1044530175, 187698}, NULL) = 0
time(NULL)  = 1044530175
open("/usr/lib/php/extensions/no-debug-non-zts-20020429/recode.so",
O_RDONLY) = 15
read(15, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\340\f\0"...,
1024) = 1024
fstat64(15, {st_mode=S_IFREG|0755, st_size=10374, ...}) = 0
old_mmap(NULL, 10108, PROT_READ|PROT_EXEC, MAP_PRIVATE, 15, 0) =
0x4309d000
mprotect(0x4309f000, 1916, PROT_NONE)   = 0
old_mmap(0x4309f000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED,
15, 0x1000) = 0x4309f000
close(15)   = 0
open("/etc/ld.so.cache", O_RDONLY)  = 15
fstat64(15, {st_mode=S_IFREG|0644, st_size=58193, ...}) = 0
old_mmap(NULL, 58193, PROT_READ, MAP_PRIVATE, 15, 0) = 0x4355e000
close(15)   = 0
open("/usr/lib/librecode.so.0", O_RDONLY) = 15
read(15, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\320/\3"...,
1024) = 1024
fstat64(15, {st_mode=S_IFREG|0755, st_size=1331931, ...}) = 0
old_mmap(NULL, 1279084, PROT_READ|PROT_EXEC, MAP_PRIVATE, 15, 0) =
0x435d
mprotect(0x436db000, 185452, PROT_NONE) = 0
old_mmap(0x436db000, 188416, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED,
15, 0x10b000) = 0x436db000
close(15)   = 0
munmap(0x4355e000, 58193)   = 0
brk(0x821e000)  = 0x821e000
--- SIGSEGV (Segmentation fault) ---

Unfortunately I can't give you more information because debugging apache
via gdb results in a mysterios infinite loop.
-- 
Edit bug report at http://bugs.php.net/?id=22090&edit=1
-- 
Try a CVS snapshot: http://bugs.php.net/fix.php?id=22090&r=trysnapshot
Fixed in CVS:   http://bugs.php.net/fix.php?id=22090&r=fixedcvs
Fixed in release:   http://bugs.php.net/fix.php?id=22090&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=22090&r=needtrace
Try newer version:  http://bugs.php.net/fix.php?id=22090&r=oldversion
Not developer issue:http://bugs.php.net/fix.php?id=22090&r=support
Expected behavior:  http://bugs.php.net/fix.php?id=22090&r=notwrong
Not enough info:http://bugs.php.net/fix.php?id=22090&r=notenoughinfo
Submitted twice:http://bugs.php.net/fix.php?id=22090&r=submittedtwice
register_globals:   http://bugs.php.net/fix.php?id=22090&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=22090&r=php3
Daylight Savings:   http://bugs.php.net/fix.php?id=22090&r=dst
IIS Stability:  http://bugs.php.net/fix.php?id=22090&r=isapi
Install GNU Sed:http://bugs.php.net/fix.php?id=22090&r=gnused




#21792 [Fbk->Opn]: dclfn.h macros as XtOffsetOf,sockopen & zend_isnan macro redifinition

2003-02-06 Thread francois . turi
 ID:   21792
 User updated by:  [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Feedback
+Status:   Open
 Bug Type: Compile Failure
 Operating System: AIX 4.3.2
 PHP Version:  4CVS-2003-01-20 (stable)
 New Comment:

The compilation still fails (using xlc).

I suggest the following fix for php_image.h because xlc is very picky
about comma left at the end of a structure:

diff  php-4.3.0-latest/ext/standard/php_image.h
php-4.3.0-latest/ext/standard/php_image.h.org
20c20
< /* $Id: php_image.h,v 1.19 2002/06/24 19:36:26 helly Exp $ */
---
> /* $Id: php_image.h,v 1.19.4.1 2002/12/31 16:35:33 sebastian Exp $
*/
48c48
<   IMAGE_FILETYPE_IFF
---
>   IMAGE_FILETYPE_IFF,

Sorry I don't have diff -u. Which option is the best ?

$ diff -u php-4.3.0-latest/ext/standard/php_image.h
php-4.3.0-latest/ext/standard/php_image.h.org
diff: illegal option -- u
Usage: diff [-bcitw] [[-C Lines|-D String|-e|-f|-n]|[-h]] File1 File2
   diff [-bcilrstw] [[-C Lines|-e|-f|-n]|[-h]] [-S File] Directory1
Directory2

compile error report:

/bin/sh libtool --silent --mode=compile /usr/vac/bin/xlc 
-Iext/standard/ -I/s00/opendata/build/php-4.3.0-latest/ext/standar
d/ -DPHP_ATOM_INC ...
 -c /s00/opendata/build/php-4.3.0-latest/ext/standard/basic_functions.c
latest/ext/standard/php_image.h", line 48.21: 1506-275 (S) Unexpected
text ',' encountered.
"/s00/opendata/build/php-4.3.0-latest/ext/session/php_session.h", line
225.31: 1506-137 (E) Declaration must declare at least one de
clarator, tag, or the members of an enumeration.
make: The error code from the last command is 1.

After this fix applied the other compile error remains:

++
|   *** ATTENTION ***|
||
| Something is likely to be messed up here, because the configure|
| script was not able to detect a simple feature on your platform.   |
| This is often caused by incorrect configuration parameters. Please |
| see the file debug.log for error messages. |
||
| If you are unable to fix this, send the file debug.log to the  |
| [EMAIL PROTECTED] mailing list and include appropiate  |
| information about your setup.  |
++

   /bin/sh libtool --silent --mode=compile /usr/vac/bin/xlc 
-Iext/standard/ -I/s00/opendata/build/php-4.3.0-latest/ext/standar
d/ -DPHP_ATOM_INC -I/s00/opendata/build/php-4.3.0-latest/include
-I/s00/opendata/build/php-4.3.0-latest/main -I/s00/opendata/build/p
hp-4.3.0-latest -I/s00/opendata/build/php-4.3.0-latest/Zend
-I/s00/app/ldap/product/current/include -I/usr/local/include
-I/s00/app/
mysql/product/current/include/mysql
-I/s00/app/oracle/product/current/rdbms/public
-I/s00/app/oracle/product/current/rdbms/demo -I/s
00/opendata/build/php-4.3.0-latest/ext/xml/expat 
-I/s00/app/apache/product/current/include
-I/s00/app/mhash/product/0.8.16/include 
-I/opt/freeware/include -DAIX=43 -DEAPI -DEAPI_MM
-DUSE_PTHREAD_SERIALIZED_ACCEPT -DAIX_BIND_PROCESSOR -DUSE_HSREGEX
-DUSE_EXPAT -I/
s00/opendata/build/php-4.3.0-latest/TSRM 
-I/s00/app/apache/product/current/include
-I/s00/app/mhash/product/0.8.16/include -I/opt/f
reeware/include  -prefer-pic -c
/s00/opendata/build/php-4.3.0-latest/ext/standard/dl.c -o
ext/standard/dl.lo 
"/s00/opendata/build/php-4.3.0-latest/TSRM/tsrm_config_common.h", line
25.2: 1506-224 (I) Incorrect #pragma ignored.
"/s00/opendata/build/php-4.3.0-latest/ext/standard/dl.c", line 141.16:
1506-068 (S) Operation between types "void*" and "int" is not
 allowed.
make: The error code from the last command is 1.
 (continuing)

/bin/sh libtool --silent --mode=compile /usr/vac/bin/xlc 
-IZend/ -I/s00/opendata/build/php-4.3.0-latest/Zend/ 
-c /s00/opendata/build/php-4.3.0-latest/Zend/zend_extensions.c -o
Zend/zend_extensions.lo 
"/s00/opendata/build/php-4.3.0-latest/Zend/zend_extensions.c", line
33.16: 1506-068 (S) Operation between types "void*" and "int" is
 not allowed.
make: The error code from the last command is 1.
 (continuing)

/bin/sh libtool --silent --mode=compile /usr/vac/bin/xlc
-I/s00/app/apache/product/1.3.22/include -Isapi/apache/ -I/s00/open
data/build/php-4.3.0-latest/sapi/apache/ .
-c /s00/opendata/build/php-4.3.0-latest/sapi/apache/sapi_apache.c
 -o sapi/apache/sapi_apache.lo 
"/usr/include/dlfcn.h", line 67.9: 1506-213 (S) Macro name RTLD_LAZY
cannot be redefined.
"/usr/include/dlfcn.h", line 67.9: 1506-358 (I) "RTLD_LAZY" is defined
on line 85 of /s00/opendata/build/php-4.3.0-latest/Zend/zend.
h.
"/usr/include/dlfcn.h", line 71.9: 1506-213 (S) Macro name RTLD_GLOBAL
cannot be redefined.

#22080 [Opn->Bgs]: NOTICE error reporting fails when an undeclared var is global within function

2003-02-06 Thread mgf
 ID:   22080
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Bogus
 Bug Type: Scripting Engine problem
 Operating System: Linux
 PHP Version:  4.3.0
 New Comment:

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

The global declaration *defines* the variable (effectively setting its
value to NULL).  isset() returns FALSE for variables which are not set
or which are set to NULL.  Hence, both isset()s return FALSE, but the
first print succeeds because $some_undefined_variable is set to NULL,
whilst the second fails because $another_undefined_variable is, in
fact, undefined!


Previous Comments:


[2003-02-05 14:34:51] [EMAIL PROTECTED]

Hi,

I've turned error_reporting() to die() the execution of my scripts as
soon as any error, warning, notice, etc is encountered. 

Yet, in the example global_test() function below,
$some_undefined_variable, which is never set, is declared global, and
$another_undefined_variable is never set and isn't declared global.
isset() returns false on both variables, yet only the line "print
$another_undefined_variable;" triggers an error.

Here's the code:
---
Error [" . $ERROR_STR[$errno] . "] $errstr\n";
  echo "Fatal error in line ".$errline." of file ".$errfile."";
  exit -1;
  break;
} 

$ERROR_STR = array(1 => 'ERROR', 2 => 'WARNING', 4 => 'PARSE',
   8 => 'NOTICE', 16 => 'CORE_ERROR', 32 =>
'CORE_WARNING',
   64 => 'COMPILE_ERROR', 128 => 'COMPILE_WARNING', 256
=> 'USER_ERROR',
   512 => 'USER_WARNING', 1024 => 'USER_NOTICE');

error_reporting (E_ALL);
set_error_handler("allErrorsFatal");


function global_test() {
global $some_undefined_variable;
if (isset($some_undefined_variable)) {
print "some_undefined_variable is set - \n";
} else {
print "some_undefined_variable is not set - \n";
}
print $some_undefined_variable;
if (isset($another_undefined_variable)) {
print "another_undefined_variable is set - \n";
} else {
print "another_undefined_variable is not set - \n";
}
print $another_undefined_variable;
}

global_test();

?>
---


Outputs:
---
some_undefined_variable is not set - 
another_undefined_variable is not set - 
Error [NOTICE] Undefined variable: 
another_undefined_variable
Fatal error in line 33 of file /[...]/global_test.php
---


IMHO, the line "print $some_undefined_variable;" should trigger the
notice. Apparently, the global keyword incorrectly affects the way
$some_undefined_variable is handled by the parser later on.

-Kai Schutte




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




#21895 [Opn->Bgs]: implicit_flush and flush() not working proplerly with CLI SAPI

2003-02-06 Thread mgf
 ID:   21895
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Bogus
 Bug Type: Output Control
 Operating System: FreeBSD 4.7
 PHP Version:  4.3.0
 New Comment:

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

That script is working exactly as expected, and the call to ob_flush()
is exactly the expected solution.  implicit_flush has no relation to
ob_flush(), or output buffers in general.

There are indeed two layers of output buffering, but, slightly
confusingly, only one of them is called "output buffering" -- this is
the layer handled by the ob_*() functions. If output buffering is on,
it works like this:

output goes to (script's) output buffer (ob).

ob_flush() sends it to PHP's "connection" buffer.

flush() (or implicit_flush) sends connection buffer to browser.

If you want to use flush() or implicit_flush to send output to the
browser as it's produced, you'd be much better to turn output buffering
off.  (You could also take a look at ob_implicit_flush()
(http://www.php.net/manual/en/function.ob-implicit-flush.php), but it
seems to me this would be rather inefficient.)


Previous Comments:


[2003-02-05 18:21:27] [EMAIL PROTECTED]

I think the key is this:

implicit_flush => On => Off

Is there a double internal pointer to this setting or something?  No
amount of setting implicit_flush will
make both of them true.

This script does not output as you'd expect:



This should output a period every second on the CLI, but does not. 
Even putting a call to flush() in the while loop does nothing.  I was
able to get this to work by using ob_flush() oddly enough.

So essentially, flushing is completely broken unless you use ob_flush.



[2003-01-27 01:12:59] [EMAIL PROTECTED]

Basically it just seems to not be working at all on my system...however
when initiating "php -i" I get:

implicit_flush => On => Off

my configure line was: ./configure --with-mysql --enable-ftp
--with-apxs=/usr/local/apache/bin/apxs


Here is the script, which doesn't output ANYTHING until the script
ends...it is then all flushed out at once...the warning messages come
out as the script executes, but not the echo's or print()'s







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




#21895 [Bgs->Opn]: implicit_flush and flush() not working proplerly with CLI SAPI

2003-02-06 Thread mgf
 ID:   21895
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Bogus
+Status:   Open
 Bug Type: Output Control
 Operating System: FreeBSD 4.7
 PHP Version:  4.3.0
 New Comment:

Oops -- my bad -- didn't read enough of the report properly. I see I
seem to have explained what you already know.  Sorry!


Previous Comments:


[2003-02-06 05:58:31] [EMAIL PROTECTED]

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

That script is working exactly as expected, and the call to ob_flush()
is exactly the expected solution.  implicit_flush has no relation to
ob_flush(), or output buffers in general.

There are indeed two layers of output buffering, but, slightly
confusingly, only one of them is called "output buffering" -- this is
the layer handled by the ob_*() functions. If output buffering is on,
it works like this:

output goes to (script's) output buffer (ob).

ob_flush() sends it to PHP's "connection" buffer.

flush() (or implicit_flush) sends connection buffer to browser.

If you want to use flush() or implicit_flush to send output to the
browser as it's produced, you'd be much better to turn output buffering
off.  (You could also take a look at ob_implicit_flush()
(http://www.php.net/manual/en/function.ob-implicit-flush.php), but it
seems to me this would be rather inefficient.)



[2003-02-05 18:21:27] [EMAIL PROTECTED]

I think the key is this:

implicit_flush => On => Off

Is there a double internal pointer to this setting or something?  No
amount of setting implicit_flush will
make both of them true.

This script does not output as you'd expect:



This should output a period every second on the CLI, but does not. 
Even putting a call to flush() in the while loop does nothing.  I was
able to get this to work by using ob_flush() oddly enough.

So essentially, flushing is completely broken unless you use ob_flush.



[2003-01-27 01:12:59] [EMAIL PROTECTED]

Basically it just seems to not be working at all on my system...however
when initiating "php -i" I get:

implicit_flush => On => Off

my configure line was: ./configure --with-mysql --enable-ftp
--with-apxs=/usr/local/apache/bin/apxs


Here is the script, which doesn't output ANYTHING until the script
ends...it is then all flushed out at once...the warning messages come
out as the script executes, but not the echo's or print()'s







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




#22086 [Opn->Bgs]: OCIBindByName causes problem if more than one Oracle statements are executed.

2003-02-06 Thread maxim
 ID:   22086
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Bogus
 Bug Type: OCI8 related
 Operating System: Red Hat Linux 7.3
 PHP Version:  5CVS-2003-02-06 (dev)
 New Comment:

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


You forgot to add the semicolon `;' at the end of the second statement.
Moreover - I doubt you can run this very thing he way you intended. Try
the PL/SQL in SQL *PLUS before trying to run it from PHP.

Conclusion - it is Oracle's error message due your bad PLSQL design.

Closed as Bogus


Previous Comments:


[2003-02-06 02:15:39] [EMAIL PROTECTED]

I have a script that combines various statements before it calls the
OCIParse or OCIExecute.

For instance

Begin 
Insert into TABLEA(COLA, COLB, COLC) Values('VAL1', 'VAL2', 'VAL3');
Update TABLEB Set COLB = 'SOMEVAL' Where ROWID = :RID1 
End;

when I call an OCIBindByName for :RID1 as

OCIBindByName($oci_stmt,":RID".$i,&$this->arr_rowid[$i],-1,OCI_B_ROWID);

where I've defined each subscript of arr_rowid using OCINewDescriptor
using the following

$this->arr_rowid[$i] =
OCINewDescriptor($this->obj_conn,OCI_D_ROWID);

OCIExecute gives me an error saying 

Warning: OCIStmtExecute: ORA-06550: line 1, column 221: PL/SQL:
ORA-00933: SQL command not properly ended ORA-06550: line 1, column 93:
PL/SQL: SQL Statement ignored ORA-06550: line 1, column 224: PLS-00103:
Encountered the symbol "end-of-file" when expecting one of the
following: begin case declare end exception exit for goto if loop mod
null pragma raise return select update while with
/var/www/html/crp/includes/dbconn.inc on line 333

I'm still investigating into the issue. Instincts tell me that the
problem is due to multiple statements in 1 query so am all up on
changing the entire class for all such occurances. However, the attempt
to save database time by executing multiple queries together seems like
is not destined to work. If it doesn't work, I'll get back in here with
more info.





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




#22055 [Opn->Fbk]: Memory leak with references in objects

2003-02-06 Thread sniper
 ID:   22055
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Feedback
 Bug Type: Scripting Engine problem
 Operating System: RedHat 7.2
 PHP Version:  4.3.1-dev
 New Comment:

You were supposed to test this snapshot:

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


Previous Comments:


[2003-02-05 13:41:08] [EMAIL PROTECTED]

Same result with PHP Version 4.3.1-dev
php4-STABLE-200302051830.tar.gz
Build Date  Feb 5 2003 20:08:24



[2003-02-04 14:37:20] [EMAIL PROTECTED]

oops!

you need to development snapshot from snaps.php.net, which should solve
this.

Derick



[2003-02-04 14:36:48] [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-02-04 14:35:56] [EMAIL PROTECTED]

/*
If you don't set the UP property,
garbage collection is done in real time

If you set the UP property,
garbage collection is done on script shutdown only
and the VmSize increase.

This is a test case
but if a sub-object (in some package) creates a 
circular reference with a sub-sub-object you leak 
memory without the knowledge of it.
*/
for($i=1;$i<=$nb_loop;$i++){
echo "loop $i";
flush();
for($j=1;$j<=$nb_by_loop;$j++){
$a=&new A(500);
$a->b=&new B(500);
$a->b->UP=&$a; // Memory Leak here
//  unset($a->b->up);
}
sleep($sleep_by_loop);
}





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




#22084 [Opn->Bgs]: Content-Type: text/css, broaken bigtime in new versions of PHP

2003-02-06 Thread sniper
 ID:   22084
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Bogus
 Bug Type: Apache related
 Operating System: Linux Mandrake 9.0
 PHP Version:  4.2.3
 New Comment:

Thank you for taking the time to report a problem with PHP.
Unfortunately you are not using a current version of PHP -- 
the problem might already be fixed. Please download a new
PHP version from http://www.php.net/downloads.php

If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.

4.3.0 was released over a month ago..



Previous Comments:


[2003-02-05 17:58:41] [EMAIL PROTECTED]

As written in the RFC this "Content-Type: text/css" should be
interpreted as
"Content-Type: text/css; charset=ISO-8859-1" by 
any HTTP 1.0/1.1 software, but it's not by newer version of php and
it's changed to "Content-Type: text/html; charset=" and that's plain
wrong, the one provided to Apache is even more broaken, "Content-Type:
text/html; charset=iso-8859-15" there by breaking
support for standard compliant Mozilla/Netscape 7.0 and making any CSS
used by non functional.


http://www.jorendorff.com/articles/unicode/unicode-http.html

and

ftp://ftp.isi.edu/in-notes/rfc2616.txt

3.4.1 Missing Charset

   Some HTTP/1.0 software has interpreted a Content-Type header
without
   charset parameter incorrectly to mean "recipient should guess."
   Senders wishing to defeat this behavior MAY include a charset
   parameter even when the charset is ISO-8859-1 and SHOULD do so when
   it is known that it will not confuse the recipient.

   Unfortunately, some older HTTP/1.0 clients did not deal properly
with
   an explicit charset parameter. HTTP/1.1 recipients MUST respect the
   charset label provided by the sender; and those user agents that
have
   a provision to "guess" a charset MUST use the charset from the

and

test.php:


[tlb@tlb tlb]$ wget -O - -d http://tlb.rapanden.dk/test.php
DEBUG output created by Wget 1.8.2 on linux-gnu.

--00:14:54--  http://tlb.rapanden.dk/test.php
   => `-'
Resolving tlb.rapanden.dk... done.
Caching tlb.rapanden.dk => 195.249.214.150
Connecting to tlb.rapanden.dk[195.249.214.150]:80... connected.
Created socket 3.
Releasing 0x80830e8 (new refcount 1).
---request begin---
GET /test.php HTTP/1.0
User-Agent: Wget/1.8.2
Host: tlb.rapanden.dk
Accept: */*
Connection: Keep-Alive

---request end---
HTTP request sent, awaiting response... HTTP/1.1 200 OK
Date: Wed, 05 Feb 2003 23:13:26 GMT
Server: Apache-AdvancedExtranetServer/1.3.26 (Mandrake Linux/6.1mdk)
PHP/4.2.3
Vary: Host
X-Powered-By: PHP/4.2.3
Connection: close
Content-Type: text/html; charset=iso-8859-15
Length: unspecified [text/html]




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




#22065 [Opn->Fbk]: file() function

2003-02-06 Thread sniper
 ID:   22065
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Feedback
 Bug Type: Filesystem function related
 Operating System: Windows 2000 server
 PHP Version:  4.3.0
 New Comment:

Does the file exist?
What are the permissions for it?

(I think it's is_readable() that does not work correctly
on windows)



Previous Comments:


[2003-02-06 01:52:50] [EMAIL PROTECTED]

safe_mode = Off
;open_basedir =



[2003-02-05 10:41:21] [EMAIL PROTECTED]

Do you have open_basedir or safe_mode enabled?



[2003-02-05 02:48:23] [EMAIL PROTECTED]

Error log fills with warnings abount the file() function.

Apache 2.0/34
Using php module version 4.3.0 rather than cgi.
Errors.log shows:-
[05-Feb-2003 08:33:45] PHP Warning:  file(d:/temp/ht1/050203.ht1) [function.file]: failed to
create stream: Permission denied in d:\Apache
Group\Apache2\htdocs\fa_tools_ht.php on line 103

Code:-
   if(file_exists($file1)==FALSE) die("File1 does not exist");
   if(is_readable($file1)==FALSE) die("File1 not readable");
   // parse files into arrays
   $file_array1=file($file1); //WARNING HERE

   if($file_array1==null) die("Permission denied to open file");




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




#22072 [Opn->Ver]: connection_status() always returning 0

2003-02-06 Thread sniper
 ID:   22072
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Verified
 Bug Type: Apache2 related
 Operating System: FREEBSD 4.7-STABLE
-PHP Version:  4.3.0
+PHP Version:  4.3.1-dev


Previous Comments:


[2003-02-06 04:36:28] [EMAIL PROTECTED]

To further assist you in your diagnosis, I have supplied you with
additional parameters to the script that is failing.


Firstly you can run the script

http://www.mpfreescene.com/test/

Secondly you can see the source

http://www.mpfreescene.com/test/?option=source

Thirdly you can see phpinfo

http://www.mpfreescene.com/test/?option=info

Forthly you can see the output.txt file, i.e. the result of the failing
script :-

http://www.mpfreescene.com/test/?option=data




Just to recap, this identical script works fine on apache 1,  I have
been to apache they are pushing it back as an php error [the error they
found in an apache2 specific library maybe ?].  And the problem is I
run the script, whenI press stop, it continues to run in the background
and completes normally, i.e. it doesnt recogonise the user abort.



Thanks for your help in this matteer.



[2003-02-06 01:55:15] [EMAIL PROTECTED]

Installed this morning, fresh.

Absolutley no difference whatso ever, not even a little bit, still the
same 0's being reported via connection_status when the stop button is
pressed.



[2003-02-05 16:08:19] [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-02-05 15:58:50] [EMAIL PROTECTED]

connection_status() always returns zero on Win32 4.3.0 running IIS.
Yes, ignore_user_abort(true) is set.

Bradley Crockett



[2003-02-05 09:05:27] [EMAIL PROTECTED]

This bug is effecting the connection_status() function in apache 2.x

Okay, getting back to a long standing bug, which we kind of come to the
conclusion last time that it may be a bug in apache 2.x because it
works in apache 1.

Well time has come on, I have submitted the bug to apache after they
fixed the incorrect bytes logged bug, and this is what they have come
up with :-

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16426

ok, I've grabbed the current php source and looked into sapi_apache2.c.
It's
definitely a php bug. Line 90 shows:

if (ap_pass_brigade(f->next, bb) != APR_SUCCESS) {
php_handle_aborted_connection();
}

which won't match in most cases. Also Line 252 and 498.
AFAICS mod_php should (additionally) check connection->aborted.

(marking this bug invalid again)





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




#22055 [Fbk->Opn]: Memory leak with references in objects

2003-02-06 Thread jparneodo
 ID:   22055
 User updated by:  [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Feedback
+Status:   Open
 Bug Type: Scripting Engine problem
 Operating System: RedHat 7.2
 PHP Version:  4.3.1-dev
 New Comment:

You are asking me to test PHP 5,
but the bug is open for for PHP 4


Previous Comments:


[2003-02-06 08:31:39] [EMAIL PROTECTED]

You were supposed to test this snapshot:

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



[2003-02-05 13:41:08] [EMAIL PROTECTED]

Same result with PHP Version 4.3.1-dev
php4-STABLE-200302051830.tar.gz
Build Date  Feb 5 2003 20:08:24



[2003-02-04 14:37:20] [EMAIL PROTECTED]

oops!

you need to development snapshot from snaps.php.net, which should solve
this.

Derick



[2003-02-04 14:36:48] [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-02-04 14:35:56] [EMAIL PROTECTED]

/*
If you don't set the UP property,
garbage collection is done in real time

If you set the UP property,
garbage collection is done on script shutdown only
and the VmSize increase.

This is a test case
but if a sub-object (in some package) creates a 
circular reference with a sub-sub-object you leak 
memory without the knowledge of it.
*/
for($i=1;$i<=$nb_loop;$i++){
echo "loop $i";
flush();
for($j=1;$j<=$nb_by_loop;$j++){
$a=&new A(500);
$a->b=&new B(500);
$a->b->UP=&$a; // Memory Leak here
//  unset($a->b->up);
}
sleep($sleep_by_loop);
}





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




#22088 [Opn->Asn]: array_shift() and the last index of the array

2003-02-06 Thread sniper
 ID:   22088
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Assigned
 Bug Type: Arrays related
 Operating System: Linux, Windows
-PHP Version:  4.3.0
+PHP Version:  4.3.1-dev
-Assigned To:  
+Assigned To:  sniper
 New Comment:

I'm checking this out..(verified with 4.3.1-dev)



Previous Comments:


[2003-02-06 03:43:21] [EMAIL PROTECTED]

$m=array('a','b');
$last = array_shift ($m);
$m[]='c';//or array_push ($m,'c');
print_r($m);

in 4.3.0 output is:
Array ( [0] => b [2] => c )

In previous php versions output was:
Array ( [0] => b [1] => c )

As yuo see, index for element 'c' differs.




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




#22088 [Asn->Csd]: array_shift() and the last index of the array

2003-02-06 Thread sniper
 ID:   22088
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Assigned
+Status:   Closed
 Bug Type: Arrays related
 Operating System: Linux, Windows
 PHP Version:  4.3.1-dev
 Assigned To:  sniper
 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-02-06 09:06:37] [EMAIL PROTECTED]

I'm checking this out..(verified with 4.3.1-dev)




[2003-02-06 03:43:21] [EMAIL PROTECTED]

$m=array('a','b');
$last = array_shift ($m);
$m[]='c';//or array_push ($m,'c');
print_r($m);

in 4.3.0 output is:
Array ( [0] => b [2] => c )

In previous php versions output was:
Array ( [0] => b [1] => c )

As yuo see, index for element 'c' differs.




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




#21743 [Asn]: Driver initialization failed for handler: db3 (and db2)

2003-02-06 Thread priyadi
 ID:   21743
 User updated by:  [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Assigned
 Bug Type: DBM/DBA related
 Operating System: RedHat Linux 7.2
 PHP Version:  4.3.0
 Assigned To:  helly
 New Comment:

Hello, sorry for not responding for so long. I have 
another observation to this elusive problem. 
 
- It fails when using mode 'c' but the file doesn't exist 
already 
- It succeeds when using mode 'n' and the file doesn't 
already exist 
- It succeeds when using mode 'c' and the file exists and 
it is a valid db3 btree 
- It fails when using mode 'c' and the file exists but it 
is not a valid db3 btree 
 
Regarding db4 version, I lost access to the system but I 
think it is version 4.0.14.


Previous Comments:


[2003-01-31 01:28:04] [EMAIL PROTECTED]

Please update: ext/dba/config.m4

This fixes some problems when linking against a specific
library version. If you do not use your systems default
db library you must not include ndbm support since that
is based on db1 which in turn is db-1.85 or based on db-x
where x is 1.85 or x >= 2.

I tried the following:
- db-3.2 (not shared) and it works.
- db-4.1.25 (shared/not shared) and it works.
- db-3.3 from system rpm (not shared) and it works.
- db-3.3 from source (shared) and it works

So i will ask sleepycat for known problems and maybe
disable shared dba in case of db-3.2.

I missed to answer your question: db libraries *can*
do file locking but we tell the library not to do so and 
use our own locking.

To unalize your db4 problems: What extact version are you 
using (ldd) and which config (but ldd should be enough).



[2003-01-30 11:38:18] [EMAIL PROTECTED]

I also encountered segfaults with db4 compiled with 
--with-db3=dir but not with db3 supplied by redhat.



[2003-01-29 18:59:10] [EMAIL PROTECTED]

Called my contact at Berkeley and got the link to the 3.2
version. Now i am able to reproduce a segfault...I'll look
into deeper ASAP



[2003-01-26 23:49:22] [EMAIL PROTECTED]

I've tested it with db3-3.3 (RedHat 7.3) and also   
experienced the same result :(. 
 
Older berkeley db sources can be obtained from 
http://rpmfind.net as SRPMSs.  
 
I've also uploaded my binary dba.so to 
http://priyadi.net/php/dba.so if that will help. It is 
compiled with --with-flatfile --with-cdb --with-db3. 
Compiled on a RedHat 7.2 system, and db3-3.2.9.



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

I've reconfigured my system with shared dba and db3-3.3
and cannot reproduce you results. Hopefully i can get a
copy of the db-3.2 source distrubution which is no longer
online :-(



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

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




#22065 [Fbk->Opn]: file() function

2003-02-06 Thread paul . d . rowlands
 ID:   22065
 User updated by:  [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Feedback
+Status:   Open
 Bug Type: Filesystem function related
 Operating System: Windows 2000 server
 PHP Version:  4.3.0
 New Comment:

The file must exist to continue in the code:-
if(file_exists($file1)==FALSE) die("File1 does not exist");
The file is everybody full control.

What would have if the file was in use by another server (updating) ?
Can php detect this condition ?


Previous Comments:


[2003-02-06 08:45:38] [EMAIL PROTECTED]

Does the file exist?
What are the permissions for it?

(I think it's is_readable() that does not work correctly
on windows)




[2003-02-06 01:52:50] [EMAIL PROTECTED]

safe_mode = Off
;open_basedir =



[2003-02-05 10:41:21] [EMAIL PROTECTED]

Do you have open_basedir or safe_mode enabled?



[2003-02-05 02:48:23] [EMAIL PROTECTED]

Error log fills with warnings abount the file() function.

Apache 2.0/34
Using php module version 4.3.0 rather than cgi.
Errors.log shows:-
[05-Feb-2003 08:33:45] PHP Warning:  file(d:/temp/ht1/050203.ht1) [function.file]: failed to
create stream: Permission denied in d:\Apache
Group\Apache2\htdocs\fa_tools_ht.php on line 103

Code:-
   if(file_exists($file1)==FALSE) die("File1 does not exist");
   if(is_readable($file1)==FALSE) die("File1 not readable");
   // parse files into arrays
   $file_array1=file($file1); //WARNING HERE

   if($file_array1==null) die("Permission denied to open file");




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




#21688 [Com]: CGI Timeout

2003-02-06 Thread leen
 ID:   21688
 Comment by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Open
 Bug Type: IIS related
 Operating System: win2k advanced server
 PHP Version:  4.3.0
 New Comment:

It seems that when the buffer contents is very small (when using output
buffering ?? or under normal usage, still looking into that) doens't
return headers and/or body/wrong headers (don't know which one).

The CGI-interface of IIS doesn't know how to handle it anyway.

Hope this was usefull.


Previous Comments:


[2003-01-16 09:21:48] [EMAIL PROTECTED]

I'm using php 4.3.0 and IIS 5, Win2kadv

As already a couple of others found out, PHP misbehaves, when installed
as CGI under Win2k advanced server. the scripts more than often time
out and the server announces the following error message - sometimes
the server even hangs totally - but in any case there are a lot of
php.exe processes in the server's memory left after shutting IIS down:

The script /xxx/index.php with parameters '' has not responded within
the configured timeout. The HTTP server is terminating the script.
For additional information please visit micro$oft website bla bla
bla...

Who knows a cure for this IIS version? As I don't have any problem
under apache for windows 

Somebody posted a registry hack how to stop that. Could you repost
that?





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




#21688 [Com]: CGI Timeout

2003-02-06 Thread leen
 ID:   21688
 Comment by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Open
 Bug Type: IIS related
 Operating System: win2k advanced server
 PHP Version:  4.3.0
 New Comment:

ok, on my workstation I have Visual Studio and thus I know the
CGI-version of PHP actually crashed.

Here is the CGI-IIS-error:

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

Here the popup's:
Application popup: php.exe - Application Error : The instruction at
"0x1b00997b" referenced memory at "0x1b00997b". The memory could not be
"read".

Application popup: php.exe - Application Error : The instruction at
"0x10030727" referenced memory at "0x01790dd8". The memory could not be
"read".


Previous Comments:


[2003-02-06 09:43:29] [EMAIL PROTECTED]

It seems that when the buffer contents is very small (when using output
buffering ?? or under normal usage, still looking into that) doens't
return headers and/or body/wrong headers (don't know which one).

The CGI-interface of IIS doesn't know how to handle it anyway.

Hope this was usefull.



[2003-01-16 09:21:48] [EMAIL PROTECTED]

I'm using php 4.3.0 and IIS 5, Win2kadv

As already a couple of others found out, PHP misbehaves, when installed
as CGI under Win2k advanced server. the scripts more than often time
out and the server announces the following error message - sometimes
the server even hangs totally - but in any case there are a lot of
php.exe processes in the server's memory left after shutting IIS down:

The script /xxx/index.php with parameters '' has not responded within
the configured timeout. The HTTP server is terminating the script.
For additional information please visit micro$oft website bla bla
bla...

Who knows a cure for this IIS version? As I don't have any problem
under apache for windows 

Somebody posted a registry hack how to stop that. Could you repost
that?





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




#21792 [Opn]: dclfn.h macros as XtOffsetOf,sockopen & zend_isnan macro redifinition

2003-02-06 Thread sniper
 ID:   21792
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Open
 Bug Type: Compile Failure
 Operating System: AIX 4.3.2
 PHP Version:  4CVS-2003-01-20 (stable)
 New Comment:

Please get new snapshot, I fixed that php_image.h issue
already, the revision in php_image.h should be 1.19.4.2

The other error has to be investigated..



Previous Comments:


[2003-02-06 05:30:37] [EMAIL PROTECTED]

The compilation still fails (using xlc).

I suggest the following fix for php_image.h because xlc is very picky
about comma left at the end of a structure:

diff  php-4.3.0-latest/ext/standard/php_image.h
php-4.3.0-latest/ext/standard/php_image.h.org
20c20
< /* $Id: php_image.h,v 1.19 2002/06/24 19:36:26 helly Exp $ */
---
> /* $Id: php_image.h,v 1.19.4.1 2002/12/31 16:35:33 sebastian Exp $
*/
48c48
<   IMAGE_FILETYPE_IFF
---
>   IMAGE_FILETYPE_IFF,

Sorry I don't have diff -u. Which option is the best ?

$ diff -u php-4.3.0-latest/ext/standard/php_image.h
php-4.3.0-latest/ext/standard/php_image.h.org
diff: illegal option -- u
Usage: diff [-bcitw] [[-C Lines|-D String|-e|-f|-n]|[-h]] File1 File2
   diff [-bcilrstw] [[-C Lines|-e|-f|-n]|[-h]] [-S File] Directory1
Directory2

compile error report:

/bin/sh libtool --silent --mode=compile /usr/vac/bin/xlc 
-Iext/standard/ -I/s00/opendata/build/php-4.3.0-latest/ext/standar
d/ -DPHP_ATOM_INC ...
 -c /s00/opendata/build/php-4.3.0-latest/ext/standard/basic_functions.c
latest/ext/standard/php_image.h", line 48.21: 1506-275 (S) Unexpected
text ',' encountered.
"/s00/opendata/build/php-4.3.0-latest/ext/session/php_session.h", line
225.31: 1506-137 (E) Declaration must declare at least one de
clarator, tag, or the members of an enumeration.
make: The error code from the last command is 1.

After this fix applied the other compile error remains:

++
|   *** ATTENTION ***|
||
| Something is likely to be messed up here, because the configure|
| script was not able to detect a simple feature on your platform.   |
| This is often caused by incorrect configuration parameters. Please |
| see the file debug.log for error messages. |
||
| If you are unable to fix this, send the file debug.log to the  |
| [EMAIL PROTECTED] mailing list and include appropiate  |
| information about your setup.  |
++

   /bin/sh libtool --silent --mode=compile /usr/vac/bin/xlc 
-Iext/standard/ -I/s00/opendata/build/php-4.3.0-latest/ext/standar
d/ -DPHP_ATOM_INC -I/s00/opendata/build/php-4.3.0-latest/include
-I/s00/opendata/build/php-4.3.0-latest/main -I/s00/opendata/build/p
hp-4.3.0-latest -I/s00/opendata/build/php-4.3.0-latest/Zend
-I/s00/app/ldap/product/current/include -I/usr/local/include
-I/s00/app/
mysql/product/current/include/mysql
-I/s00/app/oracle/product/current/rdbms/public
-I/s00/app/oracle/product/current/rdbms/demo -I/s
00/opendata/build/php-4.3.0-latest/ext/xml/expat 
-I/s00/app/apache/product/current/include
-I/s00/app/mhash/product/0.8.16/include 
-I/opt/freeware/include -DAIX=43 -DEAPI -DEAPI_MM
-DUSE_PTHREAD_SERIALIZED_ACCEPT -DAIX_BIND_PROCESSOR -DUSE_HSREGEX
-DUSE_EXPAT -I/
s00/opendata/build/php-4.3.0-latest/TSRM 
-I/s00/app/apache/product/current/include
-I/s00/app/mhash/product/0.8.16/include -I/opt/f
reeware/include  -prefer-pic -c
/s00/opendata/build/php-4.3.0-latest/ext/standard/dl.c -o
ext/standard/dl.lo 
"/s00/opendata/build/php-4.3.0-latest/TSRM/tsrm_config_common.h", line
25.2: 1506-224 (I) Incorrect #pragma ignored.
"/s00/opendata/build/php-4.3.0-latest/ext/standard/dl.c", line 141.16:
1506-068 (S) Operation between types "void*" and "int" is not
 allowed.
make: The error code from the last command is 1.
 (continuing)

/bin/sh libtool --silent --mode=compile /usr/vac/bin/xlc 
-IZend/ -I/s00/opendata/build/php-4.3.0-latest/Zend/ 
-c /s00/opendata/build/php-4.3.0-latest/Zend/zend_extensions.c -o
Zend/zend_extensions.lo 
"/s00/opendata/build/php-4.3.0-latest/Zend/zend_extensions.c", line
33.16: 1506-068 (S) Operation between types "void*" and "int" is
 not allowed.
make: The error code from the last command is 1.
 (continuing)

/bin/sh libtool --silent --mode=compile /usr/vac/bin/xlc
-I/s00/app/apache/product/1.3.22/include -Isapi/apache/ -I/s00/open
data/build/php-4.3.0-latest/sapi/apache/ .
-c /s00/opendata/build/php-4.3.0-latest/sapi/apache/sapi_apache.c
 -o sapi/apache/sapi_apache.lo 
"/usr/include/dlfcn.h", line 67.9: 1506-213 (S) Macro n

#21688 [Opn->Fbk]: CGI Timeout

2003-02-06 Thread sniper
 ID:   21688
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Feedback
 Bug Type: IIS related
 Operating System: win2k advanced server
 PHP Version:  4.3.0
 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-02-06 10:05:18] [EMAIL PROTECTED]

ok, on my workstation I have Visual Studio and thus I know the
CGI-version of PHP actually crashed.

Here is the CGI-IIS-error:

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

Here the popup's:
Application popup: php.exe - Application Error : The instruction at
"0x1b00997b" referenced memory at "0x1b00997b". The memory could not be
"read".

Application popup: php.exe - Application Error : The instruction at
"0x10030727" referenced memory at "0x01790dd8". The memory could not be
"read".



[2003-02-06 09:43:29] [EMAIL PROTECTED]

It seems that when the buffer contents is very small (when using output
buffering ?? or under normal usage, still looking into that) doens't
return headers and/or body/wrong headers (don't know which one).

The CGI-interface of IIS doesn't know how to handle it anyway.

Hope this was usefull.



[2003-01-16 09:21:48] [EMAIL PROTECTED]

I'm using php 4.3.0 and IIS 5, Win2kadv

As already a couple of others found out, PHP misbehaves, when installed
as CGI under Win2k advanced server. the scripts more than often time
out and the server announces the following error message - sometimes
the server even hangs totally - but in any case there are a lot of
php.exe processes in the server's memory left after shutting IIS down:

The script /xxx/index.php with parameters '' has not responded within
the configured timeout. The HTTP server is terminating the script.
For additional information please visit micro$oft website bla bla
bla...

Who knows a cure for this IIS version? As I don't have any problem
under apache for windows 

Somebody posted a registry hack how to stop that. Could you repost
that?





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




#22089 [Opn->Fbk]: fgetcsv does not like \r\n inside text content

2003-02-06 Thread sniper
 ID:   22089
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Feedback
 Bug Type: Filesystem function related
 Operating System: Linux
 PHP Version:  4.2.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-02-06 04:46:55] [EMAIL PROTECTED]

When importing a line with fgetcsv, if a text string contains \r\n
characters it messes up the import as fgetcsv incorrectly believes it
to be the end of the line. 




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




#22090 [Opn->Fbk]: Segmentation fault when build as extension

2003-02-06 Thread sniper
 ID:   22090
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Feedback
 Bug Type: Recode related
 Operating System: SuSE Linux 8.1
 PHP Version:  4.3.0
 New Comment:

Please read this page:

  http://www.php.net/manual/en/ref.recode.php

And especially the "Warning" boxes..
Furthermore, you didn't tell how you configured PHP
and are you running Apache2 with the 'worker' MPM?



Previous Comments:


[2003-02-06 05:26:08] [EMAIL PROTECTED]

I recently compiled PHP with recode support (Version 3.6) without any
problems. But when I compile it as a shared extension, Apache (2.0.44)
fails on startup with a segmentation fault shortly after loading
librecode. Strace shows the following:

gettimeofday({1044530175, 187698}, NULL) = 0
time(NULL)  = 1044530175
open("/usr/lib/php/extensions/no-debug-non-zts-20020429/recode.so",
O_RDONLY) = 15
read(15, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\340\f\0"...,
1024) = 1024
fstat64(15, {st_mode=S_IFREG|0755, st_size=10374, ...}) = 0
old_mmap(NULL, 10108, PROT_READ|PROT_EXEC, MAP_PRIVATE, 15, 0) =
0x4309d000
mprotect(0x4309f000, 1916, PROT_NONE)   = 0
old_mmap(0x4309f000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED,
15, 0x1000) = 0x4309f000
close(15)   = 0
open("/etc/ld.so.cache", O_RDONLY)  = 15
fstat64(15, {st_mode=S_IFREG|0644, st_size=58193, ...}) = 0
old_mmap(NULL, 58193, PROT_READ, MAP_PRIVATE, 15, 0) = 0x4355e000
close(15)   = 0
open("/usr/lib/librecode.so.0", O_RDONLY) = 15
read(15, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\320/\3"...,
1024) = 1024
fstat64(15, {st_mode=S_IFREG|0755, st_size=1331931, ...}) = 0
old_mmap(NULL, 1279084, PROT_READ|PROT_EXEC, MAP_PRIVATE, 15, 0) =
0x435d
mprotect(0x436db000, 185452, PROT_NONE) = 0
old_mmap(0x436db000, 188416, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED, 15, 0x10b000) = 0x436db000
close(15)   = 0
munmap(0x4355e000, 58193)   = 0
brk(0x821e000)  = 0x821e000
--- SIGSEGV (Segmentation fault) ---

Unfortunately I can't give you more information because debugging
apache via gdb results in a mysterios infinite loop.




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




#22091 [NEW]: make test crashes with "Bus error"

2003-02-06 Thread slash
From: [EMAIL PROTECTED]
Operating system: OpenBSD 3.2 sparc64
PHP version:  4.3.0
PHP Bug Type: Reproducible crash
Bug description:  make test crashes with "Bus error"

[root@sparc64 php-4.3.0]# make test

=
CWD : /root/php-4.3.0
PHP : /root/php-4.3.0/sapi/cli/php 
PHP_SAPI: cli
PHP_VERSION : 4.3.0
ZEND_VERSION: 1.3.0
PHP_OS  : OpenBSD
INI actual  : /root/php-4.3.0
More .INIs  : 
Extra dirs  : 
=
TIME START 2003-02-06 11:14:28
=
PASS EXPECT [tests/run-test/test001.phpt]
PASS EXPECTF [tests/run-test/test002.phpt]
PASS EXPECTREGEX [tests/run-test/test003.phpt]
PASS INI section allows '=' [tests/run-test/test004.phpt]
PASS Error message handling [tests/run-test/test005.phpt]
PASS Error messages are shown [tests/run-test/test006.phpt]
PASS dirname test [tests/run-test/test007.phpt]
PASS Trivial "Hello World" test [tests/basic/001.phpt]
SKIP Simple POST Method test [tests/basic/002.phpt]
SKIP GET and POST Method combined [tests/basic/003.phpt]
SKIP Two variables in POST data [tests/basic/004.phpt]
SKIP Three variables in POST data [tests/basic/005.phpt]
PASS Add 3 variables together and print result [tests/basic/006.phpt]
PASS Multiply 3 variables and print result [tests/basic/007.phpt]
PASS Divide 3 variables and print result [tests/basic/008.phpt]
PASS Subtract 3 variables and print result [tests/basic/009.phpt]
PASS Testing | and & operators [tests/basic/010.phpt]
SKIP Testing $argc and $argv handling (GET) [tests/basic/011.phpt]
PASS Testing $argc and $argv handling (cli) [tests/basic/012.phpt]
PASS Bug #20539 (PHP CLI Segmentation Fault) [tests/basic/bug20539.phpt]
PASS Methods via variable name, bug #20120 [tests/classes/bug20120.phpt]
PASS Classes general test [tests/classes/class_example.phpt]
PASS Classes inheritance test [tests/classes/inheritance.phpt]
PASS Strlen() function test [tests/func/001.phpt]
PASS Static variables in functions [tests/func/002.phpt]
PASS General function test [tests/func/003.phpt]
PASS General function test [tests/func/004.phpt]
PASS Testing register_shutdown_function() [tests/func/005.phpt]
PASS Output buffering tests [tests/func/006.phpt]
PASS INI functions test [tests/func/007.phpt]
PASS Test for buffering in core functions with implicit flush off
[tests/func/008.phpt]
PASS Test for buffering in core functions with implicit flush on
[tests/func/009.phpt]
PASS Simple If condition test [tests/lang/001.phpt]
PASS Simple While Loop Test [tests/lang/002.phpt]
PASS Simple Switch Test [tests/lang/003.phpt]
PASS Simple If/Else Test [tests/lang/004.phpt]
PASS Simple If/ElseIf/Else Test [tests/lang/005.phpt]
PASS Nested If/ElseIf/Else Test [tests/lang/006.phpt]
PASS Function call with global and static variables [tests/lang/007.phpt]
PASS Testing recursive function [tests/lang/008.phpt]
PASS Testing function parameter passing [tests/lang/009.phpt]
PASS Testing function parameter passing with a return value
[tests/lang/010.phpt]
PASS Testing nested functions [tests/lang/011.phpt]
PASS Testing stack after early function return [tests/lang/012.phpt]
PASS Testing eval function [tests/lang/013.phpt]
PASS Testing eval function inside user-defined function
[tests/lang/014.phpt]
PASS Testing include [tests/lang/015.phpt]
PASS Testing user-defined function in included file [tests/lang/016.phpt]
PASS Testing user-defined function falling out of an If into another
[tests/lang/017.phpt]
PASS eval() test [tests/lang/018.phpt]
PASS eval() test [tests/lang/019.phpt]
PASS Switch test 1 [tests/lang/020.phpt]
PASS Switch test 2 [tests/lang/021.phpt]
PASS Switch test 3 [tests/lang/022.phpt]
PASS Regression test [tests/lang/023.phpt]
PASS Looped regression test (may take a while) [tests/lang/024.phpt]
PASS Mean recursion test [tests/lang/025.phpt]
PASS Testing string scanner confirmance [tests/lang/026.phpt]
PASS Testing do-while loop [tests/lang/027.phpt]
PASS Testing calling user-level functions from C [tests/lang/028.phpt]
SKIP OO Bug Test (Bug #7515) [tests/lang/029.phpt] (reason: Zend Engine 2
needed)
PASS $this in constructor test [tests/lang/030.phpt]
PASS Internal hash position bug on assignment (Bug #16227)
[tests/lang/031.phpt]
PASS Class method registration [tests/lang/032.phpt]
PASS Alternative syntaxes test [tests/lang/033.phpt]
SKIP Locale settings affecting float parsing [tests/lang/034.phpt]
SKIP ZE2: set_exception_handler() [tests/lang/035.phpt] (reason: Zend
engine 2 required)
PASS Bison weirdness [tests/lang/bison1.phpt]
PASS Bug #19566 (get_declared_classes() segfaults)
[tests/lang/bug19566.phpt]
SKIP Bug #20175 (Static vars can't store ref to new instance)
[tests/lang/bug20175.phpt] (reason: ZE1 does not have static class
members)
PASS String functions [t

#21310 [Com]: no such file (paths)

2003-02-06 Thread olonoh
 ID:   21310
 Comment by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Open
 Bug Type: *Directory/Filesystem functions
 Operating System: Solaris 8
 PHP Version:  4.3.0
 New Comment:

I've also experienced the same problem on Solaris 8, w/ PHP 4.3.0, but
haven't been able to duplicate it on Linux.  The problem occurs when
running scripts through the web, but the problem doesn't occur when
running from the CLI.  For me it has nothing to do w/ permissions--same
problem even if the files/directories have full RWX permissions set.

For all of you dealing w/ this issue, a workaround I'm using so I don't
have to hard-code the full path in scripts is something like:

require(dirname($_SERVER['SCRIPT_FILENAME']).'/../lib/test.php');

That works both from web and CLI.


Previous Comments:


[2003-02-04 16:52:55] [EMAIL PROTECTED]

I am able to duplicate this on Solaris 8, Apache 1.3.27, PHP 4.3.0.  I
traced it to getcwd() (aka VCWD_GETCWD) returning null, and
errno=EACCES in fopen_wrappers.c:expand_filepath().  The same code
works on 4.2.3.  However, this test was done in a non-standard
environment using Kerberos and a distributed file system, so this test
may not be representative.

For those of you experiencing this problem, check to see that there is
read perms on the afflicted directory and all ancestors.



[2003-01-23 06:41:04] [EMAIL PROTECTED]

Not to jump in..

Theres a cron job i've been running on a few servers and
it's survived quite a few php upgrades.  I tested
php4.3.0 on one of those servers (upgrading cli from 4.2.3)
and now the cron job refuses to run.  Same issue as above.
It appears the cli is not honoring include path. (My path
has a . (dot), and relative paths from the directory of
the script do not work after the upgrade.  The application
running on the webserver works fine on 4.3.0.



[2003-01-17 20:10:38] [EMAIL PROTECTED]

oops..




[2003-01-17 10:41:19] [EMAIL PROTECTED]

[EMAIL PROTECTED]:
Instead of spamming the bugdb with your theories, *please* respond to
our requests for more information in your own bug report.
We need *facts* to be able to fix the problem, and so far you haven't
given us any.



[2003-01-17 10:21:26] [EMAIL PROTECTED]

I reported this same problem aka. (BUG) at Bug# 21674
I too was told this is not a bug. I just upgraded to 4.3.0 from 4.1.2.
This problem did not previously exist. I'm getting the exact same
messages. Why hasn't the tech group at php.net not recognized that this
is, in fact, a bug? Too many reported occurences and all seem related
to 4.3.0.

The issue is related to "include_path".

In my case, I have a file located at 
/home/sites/site2/web/IV/config.php

The above file contans the following lines:
include_once ('lang.php');
include ('extras.php'); 

I have another script located at 
/home/sites/site3/web/powerpage.php 
 -> which contains the following lines: < 
require_once ("/home/sites/site2/web/IV/config.php");
langtop();

At first I thought it was a permissions issue. But then I rechecked my
debug process and found the errors are still occuring. (Actually they
appeared with another script of was testing that does similar path
includes.)

Warning: main(lang.php) [function.main]: failed to create stream: No
such file or directory in /home/sites/site2/web/IV/config.php on line
97

Warning: main() [function.main]: Failed opening 'lang.php' for
inclusion (include_path='') in /home/sites/site2/web/IV/config.php on
line 97

Warning: main(extras.php) [function.main]: failed to create stream: No
such file or directory in /home/sites/site2/web/IV/config.php on line
98

Warning: main() [function.main]: Failed opening 'extras.php' for
inclusion (include_path='') in /home/sites/site2/web/IV/config.php on
line 98


This is my guess.  PHP 4.3.0 now incorporates Stream functionality to
allow for references such as https or ssl:

I think that somewhere in this functionality, there was introduced a
hard dependency on absolute file paths that have now negatively
impacted on include functions calls such that if the include does not
reference a file in the same exact path as the calling script, the
above referenced errors will return indicating a failure to create the
stream connection to the requested file.

Just a guess. Im not a php guru. But I do know common sense.
How can all of us who have been affected by this, fix this annoying
problem?

Is it an issue with the PHP.ini file?
Is it an issue with the build process?
Are we now required to use absolute paths for all required includes or
require

#21310 [Opn]: no such file (paths)

2003-02-06 Thread czuma
 ID:   21310
 User updated by:  [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Open
 Bug Type: *Directory/Filesystem functions
 Operating System: Solaris 8
 PHP Version:  4.3.0
 New Comment:

Have you checked ALL directories permissions (especially permission to
read for HTTP server) from / to directory with included file?


Previous Comments:


[2003-02-06 12:06:31] [EMAIL PROTECTED]

I've also experienced the same problem on Solaris 8, w/ PHP 4.3.0, but
haven't been able to duplicate it on Linux.  The problem occurs when
running scripts through the web, but the problem doesn't occur when
running from the CLI.  For me it has nothing to do w/ permissions--same
problem even if the files/directories have full RWX permissions set.

For all of you dealing w/ this issue, a workaround I'm using so I don't
have to hard-code the full path in scripts is something like:

require(dirname($_SERVER['SCRIPT_FILENAME']).'/../lib/test.php');

That works both from web and CLI.



[2003-02-04 16:52:55] [EMAIL PROTECTED]

I am able to duplicate this on Solaris 8, Apache 1.3.27, PHP 4.3.0.  I
traced it to getcwd() (aka VCWD_GETCWD) returning null, and
errno=EACCES in fopen_wrappers.c:expand_filepath().  The same code
works on 4.2.3.  However, this test was done in a non-standard
environment using Kerberos and a distributed file system, so this test
may not be representative.

For those of you experiencing this problem, check to see that there is
read perms on the afflicted directory and all ancestors.



[2003-01-23 06:41:04] [EMAIL PROTECTED]

Not to jump in..

Theres a cron job i've been running on a few servers and
it's survived quite a few php upgrades.  I tested
php4.3.0 on one of those servers (upgrading cli from 4.2.3)
and now the cron job refuses to run.  Same issue as above.
It appears the cli is not honoring include path. (My path
has a . (dot), and relative paths from the directory of
the script do not work after the upgrade.  The application
running on the webserver works fine on 4.3.0.



[2003-01-17 20:10:38] [EMAIL PROTECTED]

oops..




[2003-01-17 10:41:19] [EMAIL PROTECTED]

[EMAIL PROTECTED]:
Instead of spamming the bugdb with your theories, *please* respond to
our requests for more information in your own bug report.
We need *facts* to be able to fix the problem, and so far you haven't
given us any.



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

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




#22092 [NEW]: Strange warning and no functionality in imagettfbbox and imagettftext

2003-02-06 Thread davidl
From: [EMAIL PROTECTED]
Operating system: Redhat 7.1
PHP version:  4.3.0
PHP Bug Type: GD related
Bug description:  Strange warning and no functionality in imagettfbbox and imagettftext

here is the script:


which produces the following:
1
Warning: imagettfbbox() [function.imagettfbbox]: øÈÿ¿G˜@ç%@ in
/xxx/xxx/xxx/xxx/test2.php on line 3

so the font file exists, I don't know if that is the problem or not, but
if I turn off error reporting, and use imagettftext, the text doesn't show
up.  I have several applications placing text on a jpeg that work in 4.2.3
and don't place any text in 4.3.0, making 4.3.0 unusable to me until I can
figure out what the difference is.  fyi, compile flags are:

for 4.2.3 (working fine):
'./configure' '--with-apxs' '--with-mysql' '--with-ttf' '--with-jpeg-dir'
'--with-gd' '--with-xpm-dir=/usr/X11R6' '--with-png' '--with-zlib'
'--enable-track-vars' '--without-oracle' '--without-oci8' '--with-xml'
'--with-pdflib=/usr/local' 

for 4.3.0 (not working):
'./configure' '--with-apxs' '--with-mysql' '--with-xpm-dir=/usr/X11R6'
'--with-ttf' '--with-zlib' '--enable-track-vars' '--without-oracle'
'--without-oci8' --with-gd '--with-xml' '--with-pdflib=/usr/local'
'--disable-cgi' --with-jpeg-dir=/usr/lib/ --with-png
--enable-gd-native-ttf

Trying the same compile flags for 4.3 as was used on 4.2.3 doesn't work as
well.

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




#22092 [Opn]: Strange warning and no functionality in imagettfbbox and imagettftext

2003-02-06 Thread davidl
 ID:   22092
 User updated by:  [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Open
 Bug Type: GD related
 Operating System: Redhat 7.1
 PHP Version:  4.3.0
 New Comment:

just fyi, I put the /xxx/xxx/xxx in the file path to hide my directory
structure, however the gibberish for a warning came completely from php
:)


Previous Comments:


[2003-02-06 12:46:42] [EMAIL PROTECTED]

here is the script:


which produces the following:
1
Warning: imagettfbbox() [function.imagettfbbox]: øÈÿ¿G˜@ç%@ in
/xxx/xxx/xxx/xxx/test2.php on line 3

so the font file exists, I don't know if that is the problem or not,
but if I turn off error reporting, and use imagettftext, the text
doesn't show up.  I have several applications placing text on a jpeg
that work in 4.2.3 and don't place any text in 4.3.0, making 4.3.0
unusable to me until I can figure out what the difference is.  fyi,
compile flags are:

for 4.2.3 (working fine):
'./configure' '--with-apxs' '--with-mysql' '--with-ttf'
'--with-jpeg-dir' '--with-gd' '--with-xpm-dir=/usr/X11R6' '--with-png'
'--with-zlib' '--enable-track-vars' '--without-oracle' '--without-oci8'
'--with-xml' '--with-pdflib=/usr/local' 

for 4.3.0 (not working):
'./configure' '--with-apxs' '--with-mysql' '--with-xpm-dir=/usr/X11R6'
'--with-ttf' '--with-zlib' '--enable-track-vars' '--without-oracle'
'--without-oci8' --with-gd '--with-xml' '--with-pdflib=/usr/local'
'--disable-cgi' --with-jpeg-dir=/usr/lib/ --with-png
--enable-gd-native-ttf

Trying the same compile flags for 4.3 as was used on 4.2.3 doesn't work
as well.

Thanks in advance.




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




#21905 [Com]: fopen/fsockopen via HTTPS

2003-02-06 Thread mike . duncan
 ID:   21905
 Comment by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Feedback
 Bug Type: Sockets related
 Operating System: Linux
 PHP Version:  4.3.0
 New Comment:

To solve this issue in the time frame given, I had to rewrite the HTTP
client class I wrote to incorporate cURL instead of using sockets. I am
NOT in favor of this, but it seems to be working well.

I did not try the latest CVS version of PHP to see if it would handle
the SSL handshake any better. But the way I understand SSL is that it
does start in the clear to exchange certificate and setup the
connection (ciphers and such). I think this is deferred to OpenSSL for
handling, but in any case, it was not working as planned. 

It is ok to close this report. Thanks for the help.


Previous Comments:


[2003-01-29 03:58:05] [EMAIL PROTECTED]

PHP does not perform certificate verification, so self-signed certs
should work just fine.

The error message implies that the handshake failed, which in turn
implies that the remote server could be using a different version of
the SSL "protocol".

PHP will by default attempt versions 2 and 3 of the SSL protocol.  If
the remote server is using something else, such as TLS, then it is
quite possible that you would encounter this error.
If that is the case, then you can attempt to use
fsockopen("tls://nameofyourhost") and see if that helps.

Bug 21642 is NOT related to this issue, and your understanding of the
that bug report is not correct.
PHP does NOT fsockopen "ssl://" or "tls://" connections in-the clear;
the issue in that report was that the user was expecting them to open
in the clear.




[2003-01-28 14:54:53] [EMAIL PROTECTED]

Could this whole mess be hanging on the certificate passed back by the
server? I am using a self-signed cert., not a valid certificate.



[2003-01-28 12:27:44] [EMAIL PROTECTED]

I think you are misunderstanding me. I tried fsockopen() and it failed
with "php_stream_sock_ssl_activate_with_method: SSL
handshake/connection failed...fsockopen()
[http://www.php.net/function.fsockopen]: failed to activate SSL mode 1
in..." error. This is exactly the same error reported in the Bug link
given above. 

After reading that report, you suggested he use fopen() instead. This
is what I did too, but unfortunately I got the error I reported above.


What did you work out with him? 

After looking into other options, I noticed that cURL lib could be used
to curl_init() the SSL first, but I think this beating around the
subject. I do not want to have to install extranious libraries all over
for this option. You state in the documentation that SSL support is in
streams for PHP v4.3.0 as long as I build in support for OpenSSL. Which
I did (see php -m above). Is there something I am missing?



[2003-01-27 12:21:01] [EMAIL PROTECTED]

This is not a support forum, and this is not a bug in PHP (marking as
bogus).

fsockopen("ssl://webmail.domain.com", 443) should function exactly how
you need it to for this task.



[2003-01-27 11:24:47] [EMAIL PROTECTED]

The problem I am experiencing is close to, but not exactly, the same
problem in bug #21642. That problem was not fully explained or
understood by me and since the conversation went offline, I may never
know what actually was resolved.

I am trying to access a Outlook Web Access box via SSL (HTTPS). Because
the fsockopen() does not support SSL directly (because it starts in the
clear initially) I tried to use fopen() but because you are not allowed
to write to a HTTP-schemed, fopen()connection, I cannot see how to get
around POST'ing info to the site. 

Am I missing an easier way to do this?

The error I receive with fopen() is: "failed to create stream: HTTP
wrapper does not support writeable connections". Here is a snippit of
code:
--
$fp = fopen("https://webmail.domain.com";, "w+");
if(! $fp)  {
  echo "Could not connect to server.\n";
  exit;
}

fputs($fp, "POST /exchange/logon.asp HTTP/1.1\r\n");
fputs($fp, ...various HTTP headers and info...);

while(! feof($fp))
  echo fgets($fp, 1024);

fclose($fp);


I know it may not always be necessary to POST data, but I need to know
if I must use Perl (which I can use LWP) for this. I would really like
to stick with PHP because everything else is already written in it. 


Some system info...
-
$ php -v
PHP 4.3.0 (cli) (built: Jan 24 2003 15:12:37)
Copyright (c) 1997-2002 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2002 Zend Technologies

$ php -m
[PHP Modules]
ctype
ftp
ldap
mysql
oci8
openss

#22093 [NEW]: include_path

2003-02-06 Thread hennautd
From: [EMAIL PROTECTED]
Operating system: windows
PHP version:  4.2.2
PHP Bug Type: *General Issues
Bug description:  include_path

I have an alias in apache : alias test "\\server\test"
when i use the function include with "../" it doesn't works and i have
this message : 
Warning: Failed opening '../class/test.php' for inclusion
(include_path='.') in \\server\test\...


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




#22094 [NEW]: include_path

2003-02-06 Thread hennautd
From: [EMAIL PROTECTED]
Operating system: windows
PHP version:  4.2.2
PHP Bug Type: *General Issues
Bug description:  include_path

I have an alias in apache : alias test "\\server\test"
when i use the function include with "../" it doesn't works and i have
this message : 
Warning: Failed opening '../class/test.php' for inclusion
(include_path='.') in \\server\test\...


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




#22093 [Opn->Bgs]: include_path

2003-02-06 Thread derick
 ID:   22093
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Bogus
 Bug Type: *General Issues
 Operating System: windows
 PHP Version:  4.2.2
 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. Because of this, we hope you add your comments
to the existing bug instead.

Thank you for your interest in PHP.

see #22094 (which has correct email addy)


Previous Comments:


[2003-02-06 13:12:08] [EMAIL PROTECTED]

I have an alias in apache : alias test "\\server\test"
when i use the function include with "../" it doesn't works and i have
this message : 
Warning: Failed opening '../class/test.php' for inclusion
(include_path='.') in \\server\test\...






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




#22092 [Opn]: Strange warning and no functionality in imagettfbbox and imagettftext

2003-02-06 Thread davidl
 ID:   22092
 User updated by:  [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Open
 Bug Type: GD related
 Operating System: Redhat 7.1
 PHP Version:  4.3.0
 New Comment:

also tried adding --with-ttf to the 4.3.0 compile, still no love


Previous Comments:


[2003-02-06 12:48:16] [EMAIL PROTECTED]

just fyi, I put the /xxx/xxx/xxx in the file path to hide my directory
structure, however the gibberish for a warning came completely from php
:)



[2003-02-06 12:46:42] [EMAIL PROTECTED]

here is the script:


which produces the following:
1
Warning: imagettfbbox() [function.imagettfbbox]: øÈÿ¿G˜@ç%@ in
/xxx/xxx/xxx/xxx/test2.php on line 3

so the font file exists, I don't know if that is the problem or not,
but if I turn off error reporting, and use imagettftext, the text
doesn't show up.  I have several applications placing text on a jpeg
that work in 4.2.3 and don't place any text in 4.3.0, making 4.3.0
unusable to me until I can figure out what the difference is.  fyi,
compile flags are:

for 4.2.3 (working fine):
'./configure' '--with-apxs' '--with-mysql' '--with-ttf'
'--with-jpeg-dir' '--with-gd' '--with-xpm-dir=/usr/X11R6' '--with-png'
'--with-zlib' '--enable-track-vars' '--without-oracle' '--without-oci8'
'--with-xml' '--with-pdflib=/usr/local' 

for 4.3.0 (not working):
'./configure' '--with-apxs' '--with-mysql' '--with-xpm-dir=/usr/X11R6'
'--with-ttf' '--with-zlib' '--enable-track-vars' '--without-oracle'
'--without-oci8' --with-gd '--with-xml' '--with-pdflib=/usr/local'
'--disable-cgi' --with-jpeg-dir=/usr/lib/ --with-png
--enable-gd-native-ttf

Trying the same compile flags for 4.3 as was used on 4.2.3 doesn't work
as well.

Thanks in advance.




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




#22092 [Opn->Fbk]: Strange warning and no functionality in imagettfbbox and imagettftext

2003-02-06 Thread iliaa
 ID:   22092
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Feedback
 Bug Type: GD related
 Operating System: Redhat 7.1
 PHP Version:  4.3.0
 New Comment:

Try adding the --with-freetype-dir option to your configure. As is I
cannot replicate the bug using the latest CVS (4.3.1-dev).


Previous Comments:


[2003-02-06 13:18:56] [EMAIL PROTECTED]

also tried adding --with-ttf to the 4.3.0 compile, still no love



[2003-02-06 12:48:16] [EMAIL PROTECTED]

just fyi, I put the /xxx/xxx/xxx in the file path to hide my directory
structure, however the gibberish for a warning came completely from php
:)



[2003-02-06 12:46:42] [EMAIL PROTECTED]

here is the script:


which produces the following:
1
Warning: imagettfbbox() [function.imagettfbbox]: øÈÿ¿G˜@ç%@ in
/xxx/xxx/xxx/xxx/test2.php on line 3

so the font file exists, I don't know if that is the problem or not,
but if I turn off error reporting, and use imagettftext, the text
doesn't show up.  I have several applications placing text on a jpeg
that work in 4.2.3 and don't place any text in 4.3.0, making 4.3.0
unusable to me until I can figure out what the difference is.  fyi,
compile flags are:

for 4.2.3 (working fine):
'./configure' '--with-apxs' '--with-mysql' '--with-ttf'
'--with-jpeg-dir' '--with-gd' '--with-xpm-dir=/usr/X11R6' '--with-png'
'--with-zlib' '--enable-track-vars' '--without-oracle' '--without-oci8'
'--with-xml' '--with-pdflib=/usr/local' 

for 4.3.0 (not working):
'./configure' '--with-apxs' '--with-mysql' '--with-xpm-dir=/usr/X11R6'
'--with-ttf' '--with-zlib' '--enable-track-vars' '--without-oracle'
'--without-oci8' --with-gd '--with-xml' '--with-pdflib=/usr/local'
'--disable-cgi' --with-jpeg-dir=/usr/lib/ --with-png
--enable-gd-native-ttf

Trying the same compile flags for 4.3 as was used on 4.2.3 doesn't work
as well.

Thanks in advance.




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




#22094 [Opn->Fbk]: include_path

2003-02-06 Thread iliaa
 ID:   22094
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Feedback
 Bug Type: *General Issues
 Operating System: windows
 PHP Version:  4.2.2
 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-02-06 13:12:37] [EMAIL PROTECTED]

I have an alias in apache : alias test "\\server\test"
when i use the function include with "../" it doesn't works and i have
this message : 
Warning: Failed opening '../class/test.php' for inclusion
(include_path='.') in \\server\test\...






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




#22095 [NEW]: Won't configure correctly with libmcrypt enabled

2003-02-06 Thread Nicolas . Ross
From: [EMAIL PROTECTED]
Operating system: Mac OS X darwin
PHP version:  4.3.0
PHP Bug Type: *Configuration Issues
Bug description:  Won't configure correctly with libmcrypt enabled

On our Mac OS X (Darwin) server, I used to compile php with some twists and
tricks, but 4.2.3 configured and compiled correctly width mcrypt enabled.
Now I can't configure 4.3.0 with libmcrypt enabled.

Configure line :

./configure --with-apxs=/usr/local/apache/bin/apxs \
--with-mysql \
--with-fbsql \
--with-xml \
--enable-ftp \
--with-zlib \
--with-zlib-dir=../zlib \
--with-png \
--with-png-dir=../libpng-1.2.0 \
--with-jpeg \
--with-jpeg-dir=../jpeg-6b \
--with-gd \
--with-mcrypt \
--enable-track-vars \
--enable-trans-id

I get :

checking for mcrypt support... yes
checking for mcrypt_module_open in -lmcrypt... no
checking for init_mcrypt in -lmcrypt... no
configure: error: Sorry, I was not able to diagnose which libmcrypt
version you have installed.

Here's the tail of config.log
char init_mcrypt();

int main() {
init_mcrypt()
; return 0; }

This configure line works perfectly without the mcrypt part, and results
in a working php installation.

libmcrypt 2.5.5 is install in /usr/local and other php version (4.2.3)
configure and compile againts it successfully.

I tried every combinaison of

--with-mcrypt=../libmcrypt-2.5.5
--with-mcrypt=/usr/local

and so on.

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




#21756 [NoF->Opn]: Accessing $_SERVER['PATH_INFO '] causes intermittent segfault in Apache

2003-02-06 Thread php
 ID:   21756
 User updated by:  [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   No Feedback
+Status:   Open
 Bug Type: Reproducible crash
 Operating System: Linux/Apache (Debian 3.0r1)
 PHP Version:  4.3.0
 New Comment:

I have already tried to generate the requested backtrace (as already
noted below...), but was unable to get apache to segfault while I was
watching.

I determined the cause of the bug by comparing access and error logs,
looking at the called scripts, and examining points of similarity.

The bug was confirmed when, after I wrapped the reads to
$_SERVER['PATH_INFO'] (see below) the segfault frequency went from
1-200/day to zero.  This was the only change made, which would seem to
clinch the deal.


Previous Comments:


[2003-02-04 16:51:06] [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-01-20 04:50:25] [EMAIL PROTECTED]

Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.


There you can find some info how to use GDB properly.

Can you provide a short, COMPLETE and self-contained
example script that can be used to reproduce this?

It's not much use for us to try guessing unless you don't 
give us the necessary information..




[2003-01-20 04:46:57] [EMAIL PROTECTED]

Yes, you're right, the include() statement in my toy example should
have been wrapped in a pair of braces - the actual code does not
contain calls to include() however...

I'm sorry I could not provide a backtrace - the thing refused to
misbehave when gdb was listening.  Prehaps someone who is more familiar
with the Apache (1.3) / PHP interface will know where to examine more
closely.



[2003-01-20 00:04:35] [EMAIL PROTECTED]

Sounds pretty unlikely for the crash being caused 
by unset variable/array index. 

And btw. If you conditionally include() files, then
you MUST use { } with the clauses:

http://www.php.net/manual/en/function.include.php
(Example 12-6)

Maybe this caused the crashes?





[2003-01-19 14:34:35] [EMAIL PROTECTED]

If the special global $_SERVER['PATH_INFO'] is accessed in scripts on
either my test or production server when it is not set (on load of home
page usually) it causes Apache to segfault intermittently (like 1/100
page views...).

eg, this is what caused me grief:
if( $_SERVER['PATH_INFO'] == 'whatever')
   include( 'whatever_else');

Wrapping in call to 'isset' stopped crashes:
if( isset($_SERVER['PATH_INFO']) )
if( $_SERVER['PATH_INFO'] == 'whatever')
   include( 'whatever_else');

Was really hard to reproduce.  In the end I sat at a split screen
comparing the error to the access log, second by second.  The error log
was reporting ~100-300 segfaults a day untill I used the call to isset,
when that dropped to zero.  (After a fun 6 hours trying to catch it
with gdb...)




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




#22095 [Opn->Fbk]: Won't configure correctly with libmcrypt enabled

2003-02-06 Thread derick
 ID:   22095
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Feedback
 Bug Type: *Configuration Issues
 Operating System: Mac OS X darwin
 PHP Version:  4.3.0
 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-02-06 13:35:23] [EMAIL PROTECTED]

On our Mac OS X (Darwin) server, I used to compile php with some twists
and tricks, but 4.2.3 configured and compiled correctly width mcrypt
enabled. Now I can't configure 4.3.0 with libmcrypt enabled.

Configure line :

./configure --with-apxs=/usr/local/apache/bin/apxs \
--with-mysql \
--with-fbsql \
--with-xml \
--enable-ftp \
--with-zlib \
--with-zlib-dir=../zlib \
--with-png \
--with-png-dir=../libpng-1.2.0 \
--with-jpeg \
--with-jpeg-dir=../jpeg-6b \
--with-gd \
--with-mcrypt \
--enable-track-vars \
--enable-trans-id

I get :

checking for mcrypt support... yes
checking for mcrypt_module_open in -lmcrypt... no
checking for init_mcrypt in -lmcrypt... no
configure: error: Sorry, I was not able to diagnose which libmcrypt
version you have installed.

Here's the tail of config.log
char init_mcrypt();

int main() {
init_mcrypt()
; return 0; }

This configure line works perfectly without the mcrypt part, and
results in a working php installation.

libmcrypt 2.5.5 is install in /usr/local and other php version (4.2.3)
configure and compile againts it successfully.

I tried every combinaison of

--with-mcrypt=../libmcrypt-2.5.5
--with-mcrypt=/usr/local

and so on.

So any hints ?




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




#19113 [Com]: HTTP status 200 returned on HTTP CONNECT when mod_proxy not in use

2003-02-06 Thread fearphage
 ID:   19113
 Comment by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Open
 Bug Type: Apache related
 Operating System: any
 PHP Version:  4.3.0
 New Comment:

Im not sure how or why but apache sends a 200 (ok) back from requests
for files that do not exist. I do not know how to rememedy this.


Previous Comments:


[2003-01-22 05:14:24] [EMAIL PROTECTED]

It *is* severe because when I see in apache access_log a message like
this:

24.153.155.146 - - [22/Jan/2003:01:25:48 +0300] "CONNECT
maildelivery.somewhere:25 HTTP/1.0" 200 44623 "-" "-"
it is threatening enough for me to put away what I was doing and start
staring at my httpd.conf. And that only takes 3-4 hours to just find
this bug-report and make myself comfortable about this new "PHP
feature".



[2003-01-19 04:57:37] [EMAIL PROTECTED]

Well can you tell me why it is "severe"?

Okay it is maybe not correct that it reacts on any string
but basicly why should it not react on

TINTE / HTTP/1.0

This could be a valid request if the server has loaded
mod_tinte v1.0 or whatever. If you dislike the feature
you can always check for a valid ("from your point of
view") request method from within your scripts.




[2003-01-18 20:33:41] [EMAIL PROTECTED]

This problem seems more severe than reported here, at least in 4.1.3
with Apache 1.3.26 shipped with Debian GNU/Linux 3.0.1: If mod_php4 is
enabled, any (!) string (try "foobar\n\n" instead of "GET /
HTTP/1.0\n\n") will return the home page from $DOCUMENT_ROOT/index.php.
If we comment out the LoadModule directive for mod_php4, the server
returns correctly "501 method not implemented".

Interestingly we couldn't reproduce it on an Apache 1.3.26 with PHP
4.2.2, but this may be because of the tested virtual host is not the
first one in the httpd.conf.

We noticed this while trying to figure out why the Apache answered to
requests like "\xe3P" (probably trying to exploit some bugs in some
webserver) with "200 OK" instead of "501 method not implemented".

An example:

With mod_php4:

> telnet our_host 80
Trying ###.###.###.###...
Connected to our_host.
Escape character is '^]'.
\xe3P



our_host home page

[...]

Without mod_php4:

> telnet our_host 80
Trying ###.###.###.###...
Connected to our_host.
Escape character is '^]'.
\xe3P


501 Method Not Implemented

Method Not Implemented
\xe3P to /index.php not supported.
Invalid method in request \\xe3P

Apache/1.3.26 Server at our_host Port 80

Connection closed by foreign host.

Maybe also interessting: A very long string (e.g. 80.000 characters)
correctly leads to an error "414 Request-URI Too Large", equal if
mod_php4 is loaded or not.

This looks like mod_php4 handles any possible request method, which is
passed to it. Is this really the wanted behaviour? Why should PHP
change Apache's behaviour in such cases?



[2003-01-05 07:41:37] [EMAIL PROTECTED]

Verified in Apache 1.3.27/Linux/PHP 4.3.0



[2003-01-04 16:48:32] [EMAIL PROTECTED]

Yes; [EMAIL PROTECTED] is correct.  My previous comment ("bug possibly
fixed") was in haste.

The problem still exists in 4.3.0.  Please, someone in the PHP crew
investigate this fully, as it's becoming more and more of an issue and
seems to be affecting essentially everyone who uses PHP and Apache.



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

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




#19506 [Opn->Csd]: some functions are not visble from "get_extension_funcs"

2003-02-06 Thread iliaa
 ID:   19506
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Closed
 Bug Type: Feature/Change Request
 Operating System: Linux 2.4.19
 PHP Version:  4.2.3
 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.

PHP 5-dev CVS.


Previous Comments:


[2003-01-21 03:58:48] [EMAIL PROTECTED]

reclassified as feature request.




[2003-01-21 02:59:33] [EMAIL PROTECTED]

This isn't a documentation problem.  Either 'standard' should list said
functions or they need to be listed/grouped under an additional
'extension'.  As betz said, 'standard' is misleading.

Reclassified -> Other Function.



[2002-09-20 10:55:24] [EMAIL PROTECTED]

get_defined_funcs works well, but get_extension_funcs does not returm
any of the zend_builtin_functions.
This may not be only a documentation problem, maybe it should be fixed
in the source, because get_extensions_funcs
could not be "trusted". The module name standard is misleading, as long
as zend_builtin_functions are standard functions
(zend_builtin_functions.c), but not treated as those by
get_extension_funcs.



[2002-09-20 07:02:30] [EMAIL PROTECTED]

This is just documentation issue. (I didn't remember
get_defined_functions() at all)




[2002-09-20 02:56:02] [EMAIL PROTECTED]

There is nothing wrong with get_defined_functions(), 
except that functions like:
 - extension_loaded
 - get_extension_funcs
 - get_loaded_extensions

are not returned by the script I submit.
Problem in the function or the definition of the function...

For you to decide.

Gilles



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

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




#18003 [Opn->Bgs]: trim() to accept arrays as argument

2003-02-06 Thread iliaa
 ID:   18003
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Bogus
 Bug Type: Feature/Change Request
 Operating System: Linux
 PHP Version:  4.2.1
 New Comment:

Both array_map and array_walk can be used to implement this quite
easily. I see no reason to make a string function support array
arguments.


Previous Comments:


[2002-11-10 18:29:03] [EMAIL PROTECTED]

Hmm, -1 for having this feature. In simplest case, you can also use
array_map() for this purpose:

$result = array_map('trim',$array);

I don't think this code is too tedious.



[2002-11-10 18:18:37] [EMAIL PROTECTED]

Trim is a stricly string function, I don't see any need giving it an
array as argument...

It is so easy to do with php by applying array_walk() to your array or
simply looping it... If your case really needs it tyou hen can just add
it into sources yourself.

On the other hand, there are already string functions that accept
arrays in place of strings returning elaborated lements...

Anyone? Leave this request or close it?



[2002-06-26 18:10:21] [EMAIL PROTECTED]

+1 from me to make trim() understanding array as 1st argument and in
that case trim all elements in array each by each.




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




#22095 [Fbk->Opn]: Won't configure correctly with libmcrypt enabled

2003-02-06 Thread Nicolas . Ross
 ID:   22095
 User updated by:  [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Feedback
+Status:   Open
 Bug Type: *Configuration Issues
 Operating System: Mac OS X darwin
 PHP Version:  4.3.0
 New Comment:

It works in deed. But I had to remove all gd/png/jpeg/zlib stuff
because of configure errors regarding png or zlib.

Is there a way to back-port the fix to distro php-4.3.0 ?


Previous Comments:


[2003-02-06 13:49:33] [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-02-06 13:35:23] [EMAIL PROTECTED]

On our Mac OS X (Darwin) server, I used to compile php with some twists
and tricks, but 4.2.3 configured and compiled correctly width mcrypt
enabled. Now I can't configure 4.3.0 with libmcrypt enabled.

Configure line :

./configure --with-apxs=/usr/local/apache/bin/apxs \
--with-mysql \
--with-fbsql \
--with-xml \
--enable-ftp \
--with-zlib \
--with-zlib-dir=../zlib \
--with-png \
--with-png-dir=../libpng-1.2.0 \
--with-jpeg \
--with-jpeg-dir=../jpeg-6b \
--with-gd \
--with-mcrypt \
--enable-track-vars \
--enable-trans-id

I get :

checking for mcrypt support... yes
checking for mcrypt_module_open in -lmcrypt... no
checking for init_mcrypt in -lmcrypt... no
configure: error: Sorry, I was not able to diagnose which libmcrypt
version you have installed.

Here's the tail of config.log
char init_mcrypt();

int main() {
init_mcrypt()
; return 0; }

This configure line works perfectly without the mcrypt part, and
results in a working php installation.

libmcrypt 2.5.5 is install in /usr/local and other php version (4.2.3)
configure and compile againts it successfully.

I tried every combinaison of

--with-mcrypt=../libmcrypt-2.5.5
--with-mcrypt=/usr/local

and so on.

So any hints ?




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




#16681 [Opn->Csd]: Request new words() function returning no of words in string

2003-02-06 Thread iliaa
 ID:   16681
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Closed
 Bug Type: Feature/Change Request
 Operating System: Windows XP Home Edition
 PHP Version:  4.1.2
 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.

str_words_count() is avaliable as of PHP 4.3.0.


Previous Comments:


[2002-05-06 10:16:23] [EMAIL PROTECTED]

I have a few points to add:

1) YOU CANNOT ALWAYS CHOOSE THE STARTING FORMAT

Daniel says that instead of:
  $countries = "England Spain France Italy";
we should code:
  $countries = array("England", "Spain", "France", "Italy");
but it is not always so easy to start with an array.  Let me give a
real world example.

I am currently writing a search engine, where the user may type
whatever they want; I want to match not just the whole search term, but
each individual word.  So, if the user types "Baptist churches", I can
match "Baptist" and "churches".

// $search_string = "Baptist churches"

// Loop for the number of words in the string
for ($i=0; $i<=words($search_string); $i++) {
  // Get the matches for the i-th word
  get_matches(word($search_string, $i));
}

I agree that we CAN get the words using regular expressions.  That
brings me to my next point.

2) IT IS NOT EASY FOR PEOPLE TO CORRECTLY USE REGULAR EXPRESSIONS TO
GET WORDS.

If you are reading this, you are probably a highly skilled PHP
programmer, able to create first time a correctly functioning regular
expression.  And one which functions correctly for ALL inputs.

This example in the ereg section from the PHP documentation itself does
NOT always give the correct result:

ereg ("([[:alnum:]]+) ([[:alnum:]]+) ([[:alnum:]]+)", $string,$regs); 
/* Places three space separated words
   into $regs[1], $regs[2] and $regs[3]. */

For example, in my real search engine example, a user searching "C++ or
C" would be disappointed to find that I have searched for "C" or "C"! 


And of course regular expressions do not use the locale.

3) THE OBJECT-ORIENTED VIEW OF STRINGS DEMANDS THE PROPOSED WORD
FUNCTIONS

It goes against OO to convert a string into an array, just because
string lacks a function (i.e. words) that array has (i.e. count).  If
we view the string as an object, it is not satisfactory to say that we
can convert the object to another object type and use the functions
which exist for that object type.  It is rather like saying that we do
not need an addition operator for integers because we are able to
convert integers to doubles/floats in order to add.

4) CONSISTENCY

There already exists the 'ucwords()' function, so it is accepted that a
word is a valid concept within a string.

Hugh



[2002-04-20 08:45:12] [EMAIL PROTECTED]

I notice this example in the ereg section:

ereg ("([[:alnum:]]+) ([[:alnum:]]+) ([[:alnum:]]+)", $string,$regs); 
/* Places three space separated words
   into $regs[1], $regs[2] and $regs[3]. */

which could become something like the following with the proposed
word() function:
$regs[1] = word($string, 1);
$regs[2] = word($string, 2);
$regs[3] = word($string, 3);

Even for hardened regular expression fans, I'm sure you would agree
which would be nicer to encounter in somebody elses uncommented code.

And I know which I'd rather place my money on as working correctly.

Hugh



[2002-04-19 04:59:54] [EMAIL PROTECTED]

This does not warrant new functions. What you are trying to do should
be done with arrays:

/**/
$countries = array("England", "Spain", "France", "Italy");

print "There are " . count($countries) . " countries competing";

print "The " . count($countries) . " are:";

for ($i=0; $ihttp://bugs.php.net/16681

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




#22095 [Opn->Csd]: Won't configure correctly with libmcrypt enabled

2003-02-06 Thread derick
 ID:   22095
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Closed
 Bug Type: *Configuration Issues
 Operating System: Mac OS X darwin
 PHP Version:  4.3.0
 New Comment:

Copy ext/mcrypt/config.m4 to the php-4.2.3 directory (in ext/mcrypt),
go to the php-4.2.3 directory and execute:
rm configure
rm config.cache
./buildconf

(and make sure you have autoconf 2.13)

then you can run configure with the options of your liking.

Derick


Previous Comments:


[2003-02-06 14:38:02] [EMAIL PROTECTED]

It works in deed. But I had to remove all gd/png/jpeg/zlib stuff
because of configure errors regarding png or zlib.

Is there a way to back-port the fix to distro php-4.3.0 ?



[2003-02-06 13:49:33] [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-02-06 13:35:23] [EMAIL PROTECTED]

On our Mac OS X (Darwin) server, I used to compile php with some twists
and tricks, but 4.2.3 configured and compiled correctly width mcrypt
enabled. Now I can't configure 4.3.0 with libmcrypt enabled.

Configure line :

./configure --with-apxs=/usr/local/apache/bin/apxs \
--with-mysql \
--with-fbsql \
--with-xml \
--enable-ftp \
--with-zlib \
--with-zlib-dir=../zlib \
--with-png \
--with-png-dir=../libpng-1.2.0 \
--with-jpeg \
--with-jpeg-dir=../jpeg-6b \
--with-gd \
--with-mcrypt \
--enable-track-vars \
--enable-trans-id

I get :

checking for mcrypt support... yes
checking for mcrypt_module_open in -lmcrypt... no
checking for init_mcrypt in -lmcrypt... no
configure: error: Sorry, I was not able to diagnose which libmcrypt
version you have installed.

Here's the tail of config.log
char init_mcrypt();

int main() {
init_mcrypt()
; return 0; }

This configure line works perfectly without the mcrypt part, and
results in a working php installation.

libmcrypt 2.5.5 is install in /usr/local and other php version (4.2.3)
configure and compile againts it successfully.

I tried every combinaison of

--with-mcrypt=../libmcrypt-2.5.5
--with-mcrypt=/usr/local

and so on.

So any hints ?




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




#22092 [Fbk->Opn]: Strange warning and no functionality in imagettfbbox and imagettftext

2003-02-06 Thread davidl
 ID:   22092
 User updated by:  [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Feedback
+Status:   Open
 Bug Type: GD related
 Operating System: Redhat 7.1
 PHP Version:  4.3.0
 New Comment:

okies, that fixed one problem and created another (although MUCH LESS
MAJOR)

the results now:
1
Warning: imagettfbbox() [function.imagettfbbox]: Could not find/open
font in /xxx/xxx/xxx/xxx/test2.php on line 3

if I put an absolute path into the font location, it works, but
relative paths do not.


Previous Comments:


[2003-02-06 13:33:10] [EMAIL PROTECTED]

Try adding the --with-freetype-dir option to your configure. As is I
cannot replicate the bug using the latest CVS (4.3.1-dev).



[2003-02-06 13:18:56] [EMAIL PROTECTED]

also tried adding --with-ttf to the 4.3.0 compile, still no love



[2003-02-06 12:48:16] [EMAIL PROTECTED]

just fyi, I put the /xxx/xxx/xxx in the file path to hide my directory
structure, however the gibberish for a warning came completely from php
:)



[2003-02-06 12:46:42] [EMAIL PROTECTED]

here is the script:


which produces the following:
1
Warning: imagettfbbox() [function.imagettfbbox]: øÈÿ¿G˜@ç%@ in
/xxx/xxx/xxx/xxx/test2.php on line 3

so the font file exists, I don't know if that is the problem or not,
but if I turn off error reporting, and use imagettftext, the text
doesn't show up.  I have several applications placing text on a jpeg
that work in 4.2.3 and don't place any text in 4.3.0, making 4.3.0
unusable to me until I can figure out what the difference is.  fyi,
compile flags are:

for 4.2.3 (working fine):
'./configure' '--with-apxs' '--with-mysql' '--with-ttf'
'--with-jpeg-dir' '--with-gd' '--with-xpm-dir=/usr/X11R6' '--with-png'
'--with-zlib' '--enable-track-vars' '--without-oracle' '--without-oci8'
'--with-xml' '--with-pdflib=/usr/local' 

for 4.3.0 (not working):
'./configure' '--with-apxs' '--with-mysql' '--with-xpm-dir=/usr/X11R6'
'--with-ttf' '--with-zlib' '--enable-track-vars' '--without-oracle'
'--without-oci8' --with-gd '--with-xml' '--with-pdflib=/usr/local'
'--disable-cgi' --with-jpeg-dir=/usr/lib/ --with-png
--enable-gd-native-ttf

Trying the same compile flags for 4.3 as was used on 4.2.3 doesn't work
as well.

Thanks in advance.




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




#14269 [Com]: doesn't compile, reporting: mod_mm.c:35: #error mm is not thread-safe

2003-02-06 Thread jsu2
 ID:   14269
 Comment by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Closed
 Bug Type: Feature/Change Request
 Operating System: SuSE linux 7.2 kernel 2.4.4
 PHP Version:  4.0CVS-2001-11-28
 New Comment:

Okay, I was able to figured out how to get PHP to use java classes.  I
was able
to get rpm to build all the packages.  Now, I'm trying to enable
servlets.
The only difference is I've added --with-servlet to the list of
arguments to
pass to the configure script.  I get the following compile error, that
wasn't
present when it was just --with-java.

make[3]: Entering directory
`/usr/src/redhat/BUILD/php-4.1.2/ext/session'
/bin/sh /usr/src/redhat/BUILD/php-4.1.2/libtool --silent --mode=compile
/usr/src/redhat/BUILD/php-4.1.2/meta_ccld  -I.
-I/usr/src/redhat/BUILD/php-4.1.2/ext/session
-I/usr/src/redhat/BUILD/php-4.1.2/main
-I/usr/src/redhat/BUILD/php-4.1.2
-I/usr/src/redhat/BUILD/php-4.1.2/Zend -I/usr/include/libxml2
-I/usr/include/freetype2/freetype -I/usr/include/imap
-I/usr/include/mysql
-I/usr/local/include -I/usr/include/pspell -I/usr/include/ucd-snmp 
-D_REENTRANT -I/usr/src/redhat/BUILD/php-4.1.2/TSRM -O2 -march=i386
-mcpu=i686 -fPIC -pthread -DZTS -prefer-pic  -c mod_mm.c
mod_mm.c:37:3: #error mm is not thread-safe
make[3]: *** [mod_mm.lo] Error 1


Previous Comments:


[2001-11-28 13:38:28] [EMAIL PROTECTED]

Sorry, didn't realise that.
Thanx anyway.



[2001-11-28 12:47:10] [EMAIL PROTECTED]

Not a bug, the MM module can't be used in a threading webserver,
including Apache 2.
I'm closing this.

Derick



[2001-11-28 12:07:47] [EMAIL PROTECTED]

well, actually, the problem is quite easy: it won't compile

i can't figure out why the problem occurs and how to fix it ;)




[2001-11-28 12:05:53] [EMAIL PROTECTED]

downloaded latest cvs, using apache2, latest cvs, (that one compiled
without any problems). configure is no problem, but doing make fails:

gcc -I. -I/src_dl/php4/ext/session -I/src_dl/php4/main -I/src_dl/php4
-I/usr/local/httpd2/include -I/src_dl/php4/Zend
-I/usr/include/freetype2/freetype/include/freetype2/freetype
-I/usr/include/imap -I/src_dl/php4/ext/mysql/libmysql
-I/src_dl/php4/ext/xml/expat -D_REENTRANT -I/src_dl/php4/TSRM
-DTHREAD=1 -g -O2 -pthread -Wall -DZTS -c mod_mm.c  -fPIC -DPIC -o
mod_mm.lo
mod_mm.c:35: #error mm is not thread-safe
make[3]: *** [mod_mm.lo] Error 1
make[3]: Leaving directory `/src_dl/php4/ext/session'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/src_dl/php4/ext/session'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/src_dl/php4/ext'
make: *** [all-recursive] Error 1

my configure line:

./configure --prefix=/usr --bindir=/usr/bin --libdir=/usr/lib
--with-config-file-path=/etc --with-exec-dir=%{libdir}/php/bin
--with-mysql  --with-gd=/usr/lib --with-tiff-dir=/usr 
--with-jpeg-dir=/usr/lib --with-png-dir=/usr/lib --with-imap
--with-zlib --with-bz2 --with-xml --with-ttf
--with-t1lib-dir=/usr/share/t1lib --with-ftp --with-ndbm --with-gdbm
--with-mm --with-gd=yes --with-qtdom=/usr/lib/qt-2.2.1/
--enable-versioning --enable-yp --enable-bcmath --enable-trans-sid
--enable-inline-optimization --enable-track-vars --enable-magic-quotes
--enable-safe-mode --enable-sockets --enable-sysvsem --enable-sysvshm
--enable-shmop  --enable-calendar --enable-exif --enable-ftp
--enable-memory-limit --enable-wddx --enable-filepro --enable-dbase
--enable-ctype --enable-debug --enable-force-cgi-redirect
--enable-discard-path --enable-sigchild --enable-gd-imgstrttf
--with-apxs2=/usr/local/httpd2/bin/apxs
--with-freetype-dir=/usr/include/freetype2/freetype --with-imap-ssl

i can't figure out what the problem is :(




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




#22096 [NEW]: return inside a while loop isn't breaking the loop and returning a value

2003-02-06 Thread enygma
From: [EMAIL PROTECTED]
Operating system: RedHat Linux
PHP version:  4.2.2
PHP Bug Type: *General Issues
Bug description:  return inside a while loop isn't breaking the loop and returning a 
value

Here's the code I'm working with:

function getFilePath($filename,$path=''){
if(empty($path)){ $path=$this->basedir; }
echo $path."";
if($dir=@opendir($path)){
while(false!==($file=readdir($dir))){
if(!in_array($file,$this->remove_array)){
$file_path=$path."/".$file;
if(is_file($file_path)){

if(strtolower($file)==strtolower($filename)){
$this->found_path=$file_path;
return $file_path;
}
}elseif(is_dir($file_path)){

$this->getFilePath($filename,$file_path);
}
}
}
}
closedir($dir);
//return $this->found_path;
}

Where it starts in one dir, and goes until it finds a file - then, when it
does, it's supposed to return that path value - but it doesn't. It keeps
going through the rest of the directories without stopping at the "return"
-- 
Edit bug report at http://bugs.php.net/?id=22096&edit=1
-- 
Try a CVS snapshot: http://bugs.php.net/fix.php?id=22096&r=trysnapshot
Fixed in CVS:   http://bugs.php.net/fix.php?id=22096&r=fixedcvs
Fixed in release:   http://bugs.php.net/fix.php?id=22096&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=22096&r=needtrace
Try newer version:  http://bugs.php.net/fix.php?id=22096&r=oldversion
Not developer issue:http://bugs.php.net/fix.php?id=22096&r=support
Expected behavior:  http://bugs.php.net/fix.php?id=22096&r=notwrong
Not enough info:http://bugs.php.net/fix.php?id=22096&r=notenoughinfo
Submitted twice:http://bugs.php.net/fix.php?id=22096&r=submittedtwice
register_globals:   http://bugs.php.net/fix.php?id=22096&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=22096&r=php3
Daylight Savings:   http://bugs.php.net/fix.php?id=22096&r=dst
IIS Stability:  http://bugs.php.net/fix.php?id=22096&r=isapi
Install GNU Sed:http://bugs.php.net/fix.php?id=22096&r=gnused




#22092 [Opn]: Strange warning and no functionality in imagettfbbox and imagettftext

2003-02-06 Thread davidl
 ID:   22092
 User updated by:  [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Open
 Bug Type: GD related
 Operating System: Redhat 7.1
 PHP Version:  4.3.0
 New Comment:

Also, it won't accept spaces in the font file name, if I have no spaces
(ie arial.ttf) it works, with spaces (ie "futura bold.ttf") generates:
Could not find/open font in /xxx/xxx/xxx/test2.php on line 3


Previous Comments:


[2003-02-06 15:01:53] [EMAIL PROTECTED]

okies, that fixed one problem and created another (although MUCH LESS
MAJOR)

the results now:
1
Warning: imagettfbbox() [function.imagettfbbox]: Could not find/open
font in /xxx/xxx/xxx/xxx/test2.php on line 3

if I put an absolute path into the font location, it works, but
relative paths do not.



[2003-02-06 13:33:10] [EMAIL PROTECTED]

Try adding the --with-freetype-dir option to your configure. As is I
cannot replicate the bug using the latest CVS (4.3.1-dev).



[2003-02-06 13:18:56] [EMAIL PROTECTED]

also tried adding --with-ttf to the 4.3.0 compile, still no love



[2003-02-06 12:48:16] [EMAIL PROTECTED]

just fyi, I put the /xxx/xxx/xxx in the file path to hide my directory
structure, however the gibberish for a warning came completely from php
:)



[2003-02-06 12:46:42] [EMAIL PROTECTED]

here is the script:


which produces the following:
1
Warning: imagettfbbox() [function.imagettfbbox]: øÈÿ¿G˜@ç%@ in
/xxx/xxx/xxx/xxx/test2.php on line 3

so the font file exists, I don't know if that is the problem or not,
but if I turn off error reporting, and use imagettftext, the text
doesn't show up.  I have several applications placing text on a jpeg
that work in 4.2.3 and don't place any text in 4.3.0, making 4.3.0
unusable to me until I can figure out what the difference is.  fyi,
compile flags are:

for 4.2.3 (working fine):
'./configure' '--with-apxs' '--with-mysql' '--with-ttf'
'--with-jpeg-dir' '--with-gd' '--with-xpm-dir=/usr/X11R6' '--with-png'
'--with-zlib' '--enable-track-vars' '--without-oracle' '--without-oci8'
'--with-xml' '--with-pdflib=/usr/local' 

for 4.3.0 (not working):
'./configure' '--with-apxs' '--with-mysql' '--with-xpm-dir=/usr/X11R6'
'--with-ttf' '--with-zlib' '--enable-track-vars' '--without-oracle'
'--without-oci8' --with-gd '--with-xml' '--with-pdflib=/usr/local'
'--disable-cgi' --with-jpeg-dir=/usr/lib/ --with-png
--enable-gd-native-ttf

Trying the same compile flags for 4.3 as was used on 4.2.3 doesn't work
as well.

Thanks in advance.




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




#21905 [Fbk->Csd]: fopen/fsockopen via HTTPS

2003-02-06 Thread sniper
 ID:   21905
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Feedback
+Status:   Closed
 Bug Type: Sockets related
 Operating System: Linux
 PHP Version:  4.3.0
 New Comment:

closed per user request.



Previous Comments:


[2003-02-06 12:48:48] [EMAIL PROTECTED]

To solve this issue in the time frame given, I had to rewrite the HTTP
client class I wrote to incorporate cURL instead of using sockets. I am
NOT in favor of this, but it seems to be working well.

I did not try the latest CVS version of PHP to see if it would handle
the SSL handshake any better. But the way I understand SSL is that it
does start in the clear to exchange certificate and setup the
connection (ciphers and such). I think this is deferred to OpenSSL for
handling, but in any case, it was not working as planned. 

It is ok to close this report. Thanks for the help.



[2003-01-29 03:58:05] [EMAIL PROTECTED]

PHP does not perform certificate verification, so self-signed certs
should work just fine.

The error message implies that the handshake failed, which in turn
implies that the remote server could be using a different version of
the SSL "protocol".

PHP will by default attempt versions 2 and 3 of the SSL protocol.  If
the remote server is using something else, such as TLS, then it is
quite possible that you would encounter this error.
If that is the case, then you can attempt to use
fsockopen("tls://nameofyourhost") and see if that helps.

Bug 21642 is NOT related to this issue, and your understanding of the
that bug report is not correct.
PHP does NOT fsockopen "ssl://" or "tls://" connections in-the clear;
the issue in that report was that the user was expecting them to open
in the clear.




[2003-01-28 14:54:53] [EMAIL PROTECTED]

Could this whole mess be hanging on the certificate passed back by the
server? I am using a self-signed cert., not a valid certificate.



[2003-01-28 12:27:44] [EMAIL PROTECTED]

I think you are misunderstanding me. I tried fsockopen() and it failed
with "php_stream_sock_ssl_activate_with_method: SSL
handshake/connection failed...fsockopen()
[http://www.php.net/function.fsockopen]: failed to activate SSL mode 1
in..." error. This is exactly the same error reported in the Bug link
given above. 

After reading that report, you suggested he use fopen() instead. This
is what I did too, but unfortunately I got the error I reported above.


What did you work out with him? 

After looking into other options, I noticed that cURL lib could be used
to curl_init() the SSL first, but I think this beating around the
subject. I do not want to have to install extranious libraries all over
for this option. You state in the documentation that SSL support is in
streams for PHP v4.3.0 as long as I build in support for OpenSSL. Which
I did (see php -m above). Is there something I am missing?



[2003-01-27 12:21:01] [EMAIL PROTECTED]

This is not a support forum, and this is not a bug in PHP (marking as
bogus).

fsockopen("ssl://webmail.domain.com", 443) should function exactly how
you need it to for this task.



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

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




#22091 [Opn->Fbk]: make test crashes with "Bus error"

2003-02-06 Thread sniper
 ID:   22091
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Feedback
 Bug Type: Reproducible crash
 Operating System: OpenBSD 3.2 sparc64
 PHP Version:  4.3.0
 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


Also, if some test still fails, please add one of those .out
files here. For example, if test ext/standard/tests/file/003.phpt
fails, the file is ext/standard/tests/file/003.out 

That might give us a clue why the run-tests.php causes that
Bus error.



Previous Comments:


[2003-02-06 11:35:28] [EMAIL PROTECTED]

[root@sparc64 php-4.3.0]# make test

=
CWD : /root/php-4.3.0
PHP : /root/php-4.3.0/sapi/cli/php 
PHP_SAPI: cli
PHP_VERSION : 4.3.0
ZEND_VERSION: 1.3.0
PHP_OS  : OpenBSD
INI actual  : /root/php-4.3.0
More .INIs  : 
Extra dirs  : 
=
TIME START 2003-02-06 11:14:28
=
PASS EXPECT [tests/run-test/test001.phpt]
PASS EXPECTF [tests/run-test/test002.phpt]
PASS EXPECTREGEX [tests/run-test/test003.phpt]
PASS INI section allows '=' [tests/run-test/test004.phpt]
PASS Error message handling [tests/run-test/test005.phpt]
PASS Error messages are shown [tests/run-test/test006.phpt]
PASS dirname test [tests/run-test/test007.phpt]
PASS Trivial "Hello World" test [tests/basic/001.phpt]
SKIP Simple POST Method test [tests/basic/002.phpt]
SKIP GET and POST Method combined [tests/basic/003.phpt]
SKIP Two variables in POST data [tests/basic/004.phpt]
SKIP Three variables in POST data [tests/basic/005.phpt]
PASS Add 3 variables together and print result [tests/basic/006.phpt]
PASS Multiply 3 variables and print result [tests/basic/007.phpt]
PASS Divide 3 variables and print result [tests/basic/008.phpt]
PASS Subtract 3 variables and print result [tests/basic/009.phpt]
PASS Testing | and & operators [tests/basic/010.phpt]
SKIP Testing $argc and $argv handling (GET) [tests/basic/011.phpt]
PASS Testing $argc and $argv handling (cli) [tests/basic/012.phpt]
PASS Bug #20539 (PHP CLI Segmentation Fault)
[tests/basic/bug20539.phpt]
PASS Methods via variable name, bug #20120
[tests/classes/bug20120.phpt]
PASS Classes general test [tests/classes/class_example.phpt]
PASS Classes inheritance test [tests/classes/inheritance.phpt]
PASS Strlen() function test [tests/func/001.phpt]
PASS Static variables in functions [tests/func/002.phpt]
PASS General function test [tests/func/003.phpt]
PASS General function test [tests/func/004.phpt]
PASS Testing register_shutdown_function() [tests/func/005.phpt]
PASS Output buffering tests [tests/func/006.phpt]
PASS INI functions test [tests/func/007.phpt]
PASS Test for buffering in core functions with implicit flush off
[tests/func/008.phpt]
PASS Test for buffering in core functions with implicit flush on
[tests/func/009.phpt]
PASS Simple If condition test [tests/lang/001.phpt]
PASS Simple While Loop Test [tests/lang/002.phpt]
PASS Simple Switch Test [tests/lang/003.phpt]
PASS Simple If/Else Test [tests/lang/004.phpt]
PASS Simple If/ElseIf/Else Test [tests/lang/005.phpt]
PASS Nested If/ElseIf/Else Test [tests/lang/006.phpt]
PASS Function call with global and static variables
[tests/lang/007.phpt]
PASS Testing recursive function [tests/lang/008.phpt]
PASS Testing function parameter passing [tests/lang/009.phpt]
PASS Testing function parameter passing with a return value
[tests/lang/010.phpt]
PASS Testing nested functions [tests/lang/011.phpt]
PASS Testing stack after early function return [tests/lang/012.phpt]
PASS Testing eval function [tests/lang/013.phpt]
PASS Testing eval function inside user-defined function
[tests/lang/014.phpt]
PASS Testing include [tests/lang/015.phpt]
PASS Testing user-defined function in included file
[tests/lang/016.phpt]
PASS Testing user-defined function falling out of an If into another
[tests/lang/017.phpt]
PASS eval() test [tests/lang/018.phpt]
PASS eval() test [tests/lang/019.phpt]
PASS Switch test 1 [tests/lang/020.phpt]
PASS Switch test 2 [tests/lang/021.phpt]
PASS Switch test 3 [tests/lang/022.phpt]
PASS Regression test [tests/lang/023.phpt]
PASS Looped regression test (may take a while) [tests/lang/024.phpt]
PASS Mean recursion test [tests/lang/025.phpt]
PASS Testing string scanner confirmance [tests/lang/026.phpt]
PASS Testing do-while loop [tests/lang/027.phpt]
PASS Testing calling user-level functions from C [tests/lang/028.phpt]
SKIP OO Bug Test (Bug #7515) [tests/lang/029.phpt] (reason: Zend Engine
2 needed)
PASS $this in constructor test [tests/lang/030.phpt]
P

#22091 [Fbk->Opn]: make test crashes with "Bus error"

2003-02-06 Thread slash
 ID:   22091
 User updated by:  [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Feedback
+Status:   Open
 Bug Type: Reproducible crash
 Operating System: OpenBSD 3.2 sparc64
 PHP Version:  4.3.0
 New Comment:

This is pre-snapshot. I am trying to get that to work. So this output
is *still* 4.3.0

[root@sparc64 php-4.3.0]# find . -name *.out -print -exec cat {} \;
-exec echo "" \; -exec echo "" \;
./ext/ctype/tests/001.out
ctype_lower 26
ctype_upper 26
ctype_alpha 52
ctype_digit 10
ctype_alnum 62
ctype_cntrl 65
ctype_graph 189
ctype_print 191
ctype_punct 127
ctype_space 12
ctype_xdigit 22

./ext/iconv/tests/ob_iconv_handler.out
Bus error (core dumped)

./ext/iconv/tests/translit-utf8.out
Bus error (core dumped)

./ext/openssl/tests/001.out
Creating private key
Export key to file
Load key from file - array syntax
failed to load key using array syntax

./ext/session/tests/014.out
Bus error (core dumped)

./ext/session/tests/015.out
Bus error (core dumped)

./ext/session/tests/018.out
Bus error (core dumped)

./ext/session/tests/019.out
array(2) {
  ["o1"]=>
  &object(tfoo)(1) {
["c"]=>
int(42)
  }
  ["o2"]=>
  &object(tfoo)(1) {
["c"]=>
int(42)
  }
}
array(2) {
  ["o1"]=>
  &object(tfoo)(1) {
["c"]=>
int(44)
  }
  ["o2"]=>
  &object(tfoo)(1) {
["c"]=>
int(44)
  }
}
php in free(): warning: chunk is already free.

./ext/session/tests/020.out
Bus error (core dumped)

./ext/session/tests/021.out
Bus error (core dumped)

./ext/standard/tests/file/002.out
Bus error (core dumped)

./ext/standard/tests/file/bug21131.out
int(6)
int(0)
Bus error (core dumped)

./ext/standard/tests/math/abs.out
1,1,1,1

Assert failed:
-LONG_MIN+1 === abs(LONG_MIN-1)
Left:  int(-9223372036854775807)
Right: int(9223372036854775807)

Assert failed:
-LONG_MIN   === abs(LONG_MIN)
Left:  int(-9223372036854775808)
Right: float(9.2233720368548E+18)

./ext/standard/tests/math/pow.out
1,1,1,1
On failure, please mail result to [EMAIL PROTECTED]

Assert failed:
LONG_MAX-1 === pow(LONG_MAX-1,1)
Left:  int(9223372036854775806)
Right: int(9223372036854775807)

Assert failed:
LONG_MIN+1 === pow(LONG_MIN+1,1)
Left:  int(-9223372036854775807)
Right: int(-9223372036854775808)

./ext/standard/tests/math/round.out
1,1,1,1

Assert failed:
 LONG_MIN-1 ~== round(LONG_MIN - 0.6)
Left:  int(9223372036854775807)
Right: float(-9.2233720368548E+18)

Assert failed:
 LONG_MIN-1 ~== floor(LONG_MIN - 0.5)
Left:  int(9223372036854775807)
Right: float(-9.2233720368548E+18)

Assert failed:
 LONG_MAX+1 ~== ceil(LONG_MAX + 0.5)
Left:  int(-9223372036854775808)
Right: float(9.2233720368548E+18)

Assert failed:
 LONG_MAX+1 ~== round(LONG_MAX + 0.6)
Left:  int(-9223372036854775808)
Right: float(9.2233720368548E+18)

./ext/standard/tests/strings/bug20934.out
string(2) "àá"
string(1) "à"

./ext/standard/tests/strings/htmlentities01.out
string(22) "⠪"
string(19) "€¢£"

./ext/standard/tests/strings/htmlentities10.out
cp1252
string(22) "⠪"
string(19) "€¢£"

./ext/standard/tests/strings/htmlentities13.out
EUC-JP
string(4) "¡¢¡£"

./ext/standard/tests/strings/htmlentities14.out
Shift_JIS
string(4) "AB"

./ext/standard/tests/strings/strcspn.out
string(25) " bbb "
string(4) "1234"
int(0)
int(0)
int(0)

./ext/standard/tests/strings/strspn.out
string(25) " bbb "
string(4) "1234"
Memory fault (core dumped)

./ext/xml/tests/xml001.out
{?[]}{?[
]}{?[]}{?[
]}{?[%incent;]}{?[
]}{?[]]}{?[>]}{?[
]}{ROOT ID="elem1"}{CDATA[
]}{CDATA[ Plain text.]}{CDATA[
]}{CDATA[ ]}{ELEM1}{CDATA[
]}{CDATA[  ]}{?[]}{CDATA[
]}{CDATA[  ]}{ELEM2}{CDATA[
]}{CDATA[   ]}{?[]}{CDATA[
]}{CDATA[   ]}{ELEM3}{CDATA[
]}{CDATA[]}XML error: undefined entity at line 13

./ext/xml/tests/xml002.out
{?[]}{?[
]}{?[]}{?[
]}{?[%incent;]}{?[
]}{?[]]}{?[>]}{?[
]}{ROOT ID="elem1"}{CDATA[
]}{CDATA[ Plain text.]}{CDATA[
]}{CDATA[ ]}{ELEM1}{CDATA[
]}{CDATA[  ]}{?[]}{CDATA[
]}{

#22091 [Opn->Fbk]: make test crashes with "Bus error"

2003-02-06 Thread sniper
 ID:   22091
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Feedback
 Bug Type: Reproducible crash
 Operating System: OpenBSD 3.2 sparc64
 PHP Version:  4.3.0
 New Comment:

PLEASE try this snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz

(what is pre-snapshot anyway?)

And I asked the output of _ONE_ test, not ALL of them..
Do NOT add any more long texts!!



Previous Comments:


[2003-02-06 16:19:02] [EMAIL PROTECTED]

This is pre-snapshot. I am trying to get that to work. So this output
is *still* 4.3.0

[root@sparc64 php-4.3.0]# find . -name *.out -print -exec cat {} \;
-exec echo "" \; -exec echo "" \;
./ext/ctype/tests/001.out
ctype_lower 26
ctype_upper 26
ctype_alpha 52
ctype_digit 10
ctype_alnum 62
ctype_cntrl 65
ctype_graph 189
ctype_print 191
ctype_punct 127
ctype_space 12
ctype_xdigit 22

./ext/iconv/tests/ob_iconv_handler.out
Bus error (core dumped)

./ext/iconv/tests/translit-utf8.out
Bus error (core dumped)

./ext/openssl/tests/001.out
Creating private key
Export key to file
Load key from file - array syntax
failed to load key using array syntax

./ext/session/tests/014.out
Bus error (core dumped)

./ext/session/tests/015.out
Bus error (core dumped)

./ext/session/tests/018.out
Bus error (core dumped)

./ext/session/tests/019.out
array(2) {
  ["o1"]=>
  &object(tfoo)(1) {
["c"]=>
int(42)
  }
  ["o2"]=>
  &object(tfoo)(1) {
["c"]=>
int(42)
  }
}
array(2) {
  ["o1"]=>
  &object(tfoo)(1) {
["c"]=>
int(44)
  }
  ["o2"]=>
  &object(tfoo)(1) {
["c"]=>
int(44)
  }
}
php in free(): warning: chunk is already free.

./ext/session/tests/020.out
Bus error (core dumped)

./ext/session/tests/021.out
Bus error (core dumped)

./ext/standard/tests/file/002.out
Bus error (core dumped)

./ext/standard/tests/file/bug21131.out
int(6)
int(0)
Bus error (core dumped)

./ext/standard/tests/math/abs.out
1,1,1,1

Assert failed:
-LONG_MIN+1 === abs(LONG_MIN-1)
Left:  int(-9223372036854775807)
Right: int(9223372036854775807)

Assert failed:
-LONG_MIN   === abs(LONG_MIN)
Left:  int(-9223372036854775808)
Right: float(9.2233720368548E+18)

./ext/standard/tests/math/pow.out
1,1,1,1
On failure, please mail result to [EMAIL PROTECTED]

Assert failed:
LONG_MAX-1 === pow(LONG_MAX-1,1)
Left:  int(9223372036854775806)
Right: int(9223372036854775807)

Assert failed:
LONG_MIN+1 === pow(LONG_MIN+1,1)
Left:  int(-9223372036854775807)
Right: int(-9223372036854775808)

./ext/standard/tests/math/round.out
1,1,1,1

Assert failed:
 LONG_MIN-1 ~== round(LONG_MIN - 0.6)
Left:  int(9223372036854775807)
Right: float(-9.2233720368548E+18)

Assert failed:
 LONG_MIN-1 ~== floor(LONG_MIN - 0.5)
Left:  int(9223372036854775807)
Right: float(-9.2233720368548E+18)

Assert failed:
 LONG_MAX+1 ~== ceil(LONG_MAX + 0.5)
Left:  int(-9223372036854775808)
Right: float(9.2233720368548E+18)

Assert failed:
 LONG_MAX+1 ~== round(LONG_MAX + 0.6)
Left:  int(-9223372036854775808)
Right: float(9.2233720368548E+18)

./ext/standard/tests/strings/bug20934.out
string(2) "àá"
string(1) "à"

./ext/standard/tests/strings/htmlentities01.out
string(22) "⠪"
string(19) "€¢£"

./ext/standard/tests/strings/htmlentities10.out
cp1252
string(22) "⠪"
string(19) "€¢£"

./ext/standard/tests/strings/htmlentities13.out
EUC-JP
string(4) "¡¢¡£"

./ext/standard/tests/strings/htmlentities14.out
Shift_JIS
string(4) "AB"

./ext/standard/tests/strings/strcspn.out
string(25) " bbb "
string(4) "1234"
int(0)
int(0)
int(0)

./ext/standard/tests/strings/strspn.out
string(25) " bbb "
string(4) "1234"
Memory fault (core dumped)

./ext/xml/tests/xml001.out
{?[]}{?[
]}{?[]}{?[
]}{?[%incent;]}{?[
]}{?[]]}{?[>]}{?[
]}{ROOT ID="elem1"}{CDATA[
]}{CDATA[ Plain text.]}{CDATA[
]}{CDATA[ ]}{ELEM1}{CDATA[
]}{CDATA[  ]}{?[]}{CDATA[
]}{CDATA[  ]}{ELEM2}{CDATA[
]}{CDATA[   ]}{

#22097 [NEW]: Eval fails to process this gem.

2003-02-06 Thread tdrake
From: [EMAIL PROTECTED]
Operating system: Linux x86 2.4.18
PHP version:  4.3.0
PHP Bug Type: Scripting Engine problem
Bug description:  Eval fails to process this gem.

$error["1231"] = "invalid";
$error["1255"] = "invalid_max";

$invalid = 'You did not choose a valid quantity for item number
$item.\n';
$invalid_min = 'You did not order the minimum amount for item $item.\n';
$invalid_max = 'You ordered more than you were permitted for item
$item.\n';

while (list($item, $errortype) = each($error)) {
eval("\$errormessage .= \"$$errortype\";");
}

print $errormessage;

Eval prints the following:
You did not choose a valid quantity for item number $item.
You ordered more than you were permitted for item $item.

It should print this:
You did not choose a valid quantity for item number 1231.
You ordered more than you were permitted for item 1255.
-- 
Edit bug report at http://bugs.php.net/?id=22097&edit=1
-- 
Try a CVS snapshot: http://bugs.php.net/fix.php?id=22097&r=trysnapshot
Fixed in CVS:   http://bugs.php.net/fix.php?id=22097&r=fixedcvs
Fixed in release:   http://bugs.php.net/fix.php?id=22097&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=22097&r=needtrace
Try newer version:  http://bugs.php.net/fix.php?id=22097&r=oldversion
Not developer issue:http://bugs.php.net/fix.php?id=22097&r=support
Expected behavior:  http://bugs.php.net/fix.php?id=22097&r=notwrong
Not enough info:http://bugs.php.net/fix.php?id=22097&r=notenoughinfo
Submitted twice:http://bugs.php.net/fix.php?id=22097&r=submittedtwice
register_globals:   http://bugs.php.net/fix.php?id=22097&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=22097&r=php3
Daylight Savings:   http://bugs.php.net/fix.php?id=22097&r=dst
IIS Stability:  http://bugs.php.net/fix.php?id=22097&r=isapi
Install GNU Sed:http://bugs.php.net/fix.php?id=22097&r=gnused




#21756 [Opn->Fbk]: Accessing $_SERVER['PATH_INFO '] causes intermittent segfault in Apache

2003-02-06 Thread sniper
 ID:   21756
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Feedback
 Bug Type: Reproducible crash
 Operating System: Linux/Apache (Debian 3.0r1)
 PHP Version:  4.3.0
 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


With the very little information you've given..please
give the snapshot a try. If the problem persists,
please give us a _complete_ and short example script
which can be used to reproduce this.

Also, what was the configure line used to configure PHP?



Previous Comments:


[2003-02-06 13:36:56] [EMAIL PROTECTED]

I have already tried to generate the requested backtrace (as already
noted below...), but was unable to get apache to segfault while I was
watching.

I determined the cause of the bug by comparing access and error logs,
looking at the called scripts, and examining points of similarity.

The bug was confirmed when, after I wrapped the reads to
$_SERVER['PATH_INFO'] (see below) the segfault frequency went from
1-200/day to zero.  This was the only change made, which would seem to
clinch the deal.



[2003-02-04 16:51:06] [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-01-20 04:50:25] [EMAIL PROTECTED]

Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.


There you can find some info how to use GDB properly.

Can you provide a short, COMPLETE and self-contained
example script that can be used to reproduce this?

It's not much use for us to try guessing unless you don't 
give us the necessary information..




[2003-01-20 04:46:57] [EMAIL PROTECTED]

Yes, you're right, the include() statement in my toy example should
have been wrapped in a pair of braces - the actual code does not
contain calls to include() however...

I'm sorry I could not provide a backtrace - the thing refused to
misbehave when gdb was listening.  Prehaps someone who is more familiar
with the Apache (1.3) / PHP interface will know where to examine more
closely.



[2003-01-20 00:04:35] [EMAIL PROTECTED]

Sounds pretty unlikely for the crash being caused 
by unset variable/array index. 

And btw. If you conditionally include() files, then
you MUST use { } with the clauses:

http://www.php.net/manual/en/function.include.php
(Example 12-6)

Maybe this caused the crashes?





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

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




#22098 [NEW]: problems with filemtime/filemsize

2003-02-06 Thread stdbmt12
From: [EMAIL PROTECTED]
Operating system: Linux/RedHat 7.3
PHP version:  4.2.3
PHP Bug Type: Filesystem function related
Bug description:  problems with filemtime/filemsize

having problems with the way PHP handles a long filename containing "@'s"
e.g. @P@@80@@[EMAIL PROTECTED]

the '@' in this case is a delimiter, only the four fields listed above may
appear in the filename but the first ('P' in this case) is optional.  if
the first field is empty the system returns:

"stat failed for @@@80@@[EMAIL PROTECTED] (errno=2 - No such file
or directory)"

if the 'P' is there, there is no problem.  i tried placing the
path/filename in quotes, escaping all the "@'s" with "\@'s".

PHP just will not handle the filename if the 'P' is missing, can't use
file_exists(), filemtime(), filesize(), fopen(), i stopped testing when
none of these worked.
-- 
Edit bug report at http://bugs.php.net/?id=22098&edit=1
-- 
Try a CVS snapshot: http://bugs.php.net/fix.php?id=22098&r=trysnapshot
Fixed in CVS:   http://bugs.php.net/fix.php?id=22098&r=fixedcvs
Fixed in release:   http://bugs.php.net/fix.php?id=22098&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=22098&r=needtrace
Try newer version:  http://bugs.php.net/fix.php?id=22098&r=oldversion
Not developer issue:http://bugs.php.net/fix.php?id=22098&r=support
Expected behavior:  http://bugs.php.net/fix.php?id=22098&r=notwrong
Not enough info:http://bugs.php.net/fix.php?id=22098&r=notenoughinfo
Submitted twice:http://bugs.php.net/fix.php?id=22098&r=submittedtwice
register_globals:   http://bugs.php.net/fix.php?id=22098&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=22098&r=php3
Daylight Savings:   http://bugs.php.net/fix.php?id=22098&r=dst
IIS Stability:  http://bugs.php.net/fix.php?id=22098&r=isapi
Install GNU Sed:http://bugs.php.net/fix.php?id=22098&r=gnused




#22099 [NEW]: Strange freeze when EOF reached in socket.

2003-02-06 Thread sthomas
From: [EMAIL PROTECTED]
Operating system: Redhat 7.3
PHP version:  4.3.0
PHP Bug Type: Sockets related
Bug description:  Strange freeze when EOF reached in socket.

I'm not sure this bug is related to bug #21529 or not; this is not a
segfault, but a simple program hang.  This is from a script I run from a
PHP CLI, and is intermittent.  I'd attach the script, but it's a 10k class
file...  I've used stream_set_timeout to set the limit to two seconds, and
the connect timeout is also two seconds.  From my debugging output, there
are no infinite loops, the freezes are essentially random, and sometimes
nonexistent - but always before a single call to fclose after feof()
returns true.  This leads me to believe that a remote server I'm
contacting isn't behaving properly 100% of the time

php -m returns:

[PHP Modules]
ctype
dio
ftp
mysql
overload
pcre
pgsql
posix
session
standard
tokenizer
wddx
xml
zlib

Backtrace:

#0  0x401c941e in select () from /lib/libc.so.6
#1  0x08199f44 in __DTOR_END__ ()
#2  0x08121d01 in _php_stream_free (stream=0x83079c4, close_options=3)
at /home/install/php-4.3.0/main/streams.c:327
#3  0x080acff7 in zif_fclose (ht=1, return_value=0x825e32c, this_ptr=0x0,

return_value_used=0) at
/home/install/php-4.3.0/ext/standard/file.c:1120
#4  0x0815b05c in execute (op_array=0x823a26c)
at /home/install/php-4.3.0/Zend/zend_execute.c:1596
#5  0x0815b234 in execute (op_array=0x822b5f0)
at /home/install/php-4.3.0/Zend/zend_execute.c:1640
#6  0x0815b234 in execute (op_array=0x8222518)
at /home/install/php-4.3.0/Zend/zend_execute.c:1640
#7  0x0815b234 in execute (op_array=0x81daaa4)
at /home/install/php-4.3.0/Zend/zend_execute.c:1640
#8  0x08145398 in zend_execute_scripts (type=8, retval=0x0, file_count=3)
at /home/install/php-4.3.0/Zend/zend.c:864
#9  0x081188b5 in php_execute_script (primary_file=0xba40)
at /home/install/php-4.3.0/main/main.c:1573
#10 0x08163ecc in main (argc=2, argv=0xbae4)
at /home/install/php-4.3.0/sapi/cli/php_cli.c:746
#11 0x4010a1c4 in __libc_start_main () from /lib/libc.so.6

I did it three times to make sure, and aside from memory segments, the
trace is the same.
-- 
Edit bug report at http://bugs.php.net/?id=22099&edit=1
-- 
Try a CVS snapshot: http://bugs.php.net/fix.php?id=22099&r=trysnapshot
Fixed in CVS:   http://bugs.php.net/fix.php?id=22099&r=fixedcvs
Fixed in release:   http://bugs.php.net/fix.php?id=22099&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=22099&r=needtrace
Try newer version:  http://bugs.php.net/fix.php?id=22099&r=oldversion
Not developer issue:http://bugs.php.net/fix.php?id=22099&r=support
Expected behavior:  http://bugs.php.net/fix.php?id=22099&r=notwrong
Not enough info:http://bugs.php.net/fix.php?id=22099&r=notenoughinfo
Submitted twice:http://bugs.php.net/fix.php?id=22099&r=submittedtwice
register_globals:   http://bugs.php.net/fix.php?id=22099&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=22099&r=php3
Daylight Savings:   http://bugs.php.net/fix.php?id=22099&r=dst
IIS Stability:  http://bugs.php.net/fix.php?id=22099&r=isapi
Install GNU Sed:http://bugs.php.net/fix.php?id=22099&r=gnused




#22097 [Opn->Bgs]: Eval fails to process this gem.

2003-02-06 Thread helly
 ID:   22097
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Bogus
 Bug Type: Scripting Engine problem
 Operating System: Linux x86 2.4.18
 PHP Version:  4.3.0
 New Comment:

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

You need to double evaluate.
$$errortype resolves to $invalid
evaluating resolves to the string containing $number.
That has to be evaluated as well.

Also why not use foreach and you can use eval()'s
return value. See below:

$errortype) {
$errormessage .= eval("echo eval(\"echo
\\\"$$errortype\\\";\");");
}

echo $errormessage;
?

Send further questions please [EMAIL PROTECTED]


Previous Comments:


[2003-02-06 16:43:28] [EMAIL PROTECTED]

$error["1231"] = "invalid";
$error["1255"] = "invalid_max";

$invalid = 'You did not choose a valid quantity for item number
$item.\n';
$invalid_min = 'You did not order the minimum amount for item
$item.\n';
$invalid_max = 'You ordered more than you were permitted for item
$item.\n';

while (list($item, $errortype) = each($error)) {
eval("\$errormessage .= \"$$errortype\";");
}

print $errormessage;

Eval prints the following:
You did not choose a valid quantity for item number $item.
You ordered more than you were permitted for item $item.

It should print this:
You did not choose a valid quantity for item number 1231.
You ordered more than you were permitted for item 1255.




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




#22097 [Bgs]: Eval fails to process this gem.

2003-02-06 Thread helly
 ID:   22097
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Bogus
 Bug Type: Scripting Engine problem
 Operating System: Linux x86 2.4.18
 PHP Version:  4.3.0
 New Comment:

CAUTION: The input field scrambled my input!

You have to use 
- 3 slashes where it shows 7
- 1 slash where it shows 3
- 0 slash where it shows 1


Previous Comments:


[2003-02-06 17:28:24] [EMAIL PROTECTED]

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

You need to double evaluate.
$$errortype resolves to $invalid
evaluating resolves to the string containing $number.
That has to be evaluated as well.

Also why not use foreach and you can use eval()\'s
return value. See below:

$errortype) {
$errormessage .= eval(\"echo eval(\\\"echo
\\\"$$errortype\\\";\\\");\");
}

echo $errormessage;
?

Send further questions please [EMAIL PROTECTED]



[2003-02-06 16:43:28] [EMAIL PROTECTED]

$error["1231"] = "invalid";
$error["1255"] = "invalid_max";

$invalid = 'You did not choose a valid quantity for item number
$item.\n';
$invalid_min = 'You did not order the minimum amount for item
$item.\n';
$invalid_max = 'You ordered more than you were permitted for item
$item.\n';

while (list($item, $errortype) = each($error)) {
eval("\$errormessage .= \"$$errortype\";");
}

print $errormessage;

Eval prints the following:
You did not choose a valid quantity for item number $item.
You ordered more than you were permitted for item $item.

It should print this:
You did not choose a valid quantity for item number 1231.
You ordered more than you were permitted for item 1255.




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




#22098 [Opn->Bgs]: problems with filemtime/filemsize

2003-02-06 Thread sniper
 ID:   22098
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Bogus
 Bug Type: Filesystem function related
 Operating System: Linux/RedHat 7.3
 PHP Version:  4.2.3
 New Comment:

Thank you for taking the time to report a problem with PHP.
Unfortunately you are not using a current version of PHP -- 
the problem might already be fixed. Please download a new
PHP version from http://www.php.net/downloads.php

If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.

PHP 4.3.0 was released over a month ago..



Previous Comments:


[2003-02-06 17:05:16] [EMAIL PROTECTED]

having problems with the way PHP handles a long filename containing
"@'s" e.g. @P@@80@@[EMAIL PROTECTED]

the '@' in this case is a delimiter, only the four fields listed above
may appear in the filename but the first ('P' in this case) is
optional.  if the first field is empty the system returns:

"stat failed for @@@80@@[EMAIL PROTECTED] (errno=2 - No such
file or directory)"

if the 'P' is there, there is no problem.  i tried placing the
path/filename in quotes, escaping all the "@'s" with "\@'s".

PHP just will not handle the filename if the 'P' is missing, can't use
file_exists(), filemtime(), filesize(), fopen(), i stopped testing when
none of these worked.




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




#22099 [Opn->Fbk]: Strange freeze when EOF reached in socket.

2003-02-06 Thread sniper
 ID:   22099
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Feedback
 Bug Type: Sockets related
 Operating System: Redhat 7.3
 PHP Version:  4.3.0
 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


..and you'll know for sure if it's related to #21529 since
that was fixed in CVS..



Previous Comments:


[2003-02-06 17:17:34] [EMAIL PROTECTED]

I'm not sure this bug is related to bug #21529 or not; this is not a
segfault, but a simple program hang.  This is from a script I run from
a PHP CLI, and is intermittent.  I'd attach the script, but it's a 10k
class file...  I've used stream_set_timeout to set the limit to two
seconds, and the connect timeout is also two seconds.  From my
debugging output, there are no infinite loops, the freezes are
essentially random, and sometimes nonexistent - but always before a
single call to fclose after feof() returns true.  This leads me to
believe that a remote server I'm contacting isn't behaving properly
100% of the time

php -m returns:

[PHP Modules]
ctype
dio
ftp
mysql
overload
pcre
pgsql
posix
session
standard
tokenizer
wddx
xml
zlib

Backtrace:

#0  0x401c941e in select () from /lib/libc.so.6
#1  0x08199f44 in __DTOR_END__ ()
#2  0x08121d01 in _php_stream_free (stream=0x83079c4, close_options=3)
at /home/install/php-4.3.0/main/streams.c:327
#3  0x080acff7 in zif_fclose (ht=1, return_value=0x825e32c,
this_ptr=0x0, 
return_value_used=0) at
/home/install/php-4.3.0/ext/standard/file.c:1120
#4  0x0815b05c in execute (op_array=0x823a26c)
at /home/install/php-4.3.0/Zend/zend_execute.c:1596
#5  0x0815b234 in execute (op_array=0x822b5f0)
at /home/install/php-4.3.0/Zend/zend_execute.c:1640
#6  0x0815b234 in execute (op_array=0x8222518)
at /home/install/php-4.3.0/Zend/zend_execute.c:1640
#7  0x0815b234 in execute (op_array=0x81daaa4)
at /home/install/php-4.3.0/Zend/zend_execute.c:1640
#8  0x08145398 in zend_execute_scripts (type=8, retval=0x0,
file_count=3)
at /home/install/php-4.3.0/Zend/zend.c:864
#9  0x081188b5 in php_execute_script (primary_file=0xba40)
at /home/install/php-4.3.0/main/main.c:1573
#10 0x08163ecc in main (argc=2, argv=0xbae4)
at /home/install/php-4.3.0/sapi/cli/php_cli.c:746
#11 0x4010a1c4 in __libc_start_main () from /lib/libc.so.6

I did it three times to make sure, and aside from memory segments, the
trace is the same.




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




#17312 [Com]: Build problem with GCC 3.1

2003-02-06 Thread ecarter
 ID:   17312
 Comment by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   No Feedback
 Bug Type: MySQL related
 Operating System: Redhat 7.2
 PHP Version:  4.2.1
 New Comment:

/usr/bin/ld: Dwarf Error: Invalid or unhandled FORM value: 14.
ext/mysql/libmysql/my_tempnam.o: In function `my_tempnam':
/local/src/php-4.3.0/ext/mysql/libmysql/my_tempnam.c:103: the use of
`tempnam' is dangerous, better use `mkstemp'
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1

Here's the gcc ver:
gcc-2.96-98
gcc3-g77-3.0.4-1
gcc-g77-2.96-98
libgcc-3.0.4-1
gcc-chill-2.96-98
gcc3-3.0.4-1
gcc3-objc-3.0.4-1
gcc-c++-2.96-98
gcc-objc-2.96-98
gcc3-java-3.0.4-1
gcc-java-2.96-98
gcc3-c++-3.0.4-1

-- I'm not sure what the problem is.
It seems that I have no problems with
another machine, here's the gcc ver on that:

gcc-chill-2.96-98
libgcc-3.0.1-3
gcc-g77-2.96-98
gcc-c++-2.96-98
gcc3-g77-3.0.1-3
gcc-java-2.96-98
gcc-2.96-98
gcc3-objc-3.0.1-3
gcc3-c++-3.0.1-3
gcc-objc-2.96-98
gcc3-3.0.1-3
gcc3-java-3.0.1-3

Both are redhat linux,
eric


Previous Comments:


[2003-01-08 01:17:00] [EMAIL PROTECTED]

OS: linux mandrake 2.4.18
PHP: 4.3.0

i got the problem... again...
my 4.2.3 make nicely.
my 4.3.0 screw up with this error

ext/mysql/libmysql/my_tempnam.o: In function `my_tempnam':
/home/install/tmp/php-4.3.0/ext/mysql/libmysql/my_tempnam.c:103: the
use of `tempnam' is dangerous, better use `mkstemp'


can anyone tell me which files in my
php-4.3.0/ext/mysql/
should i replace to re-fix the problem, please?

thanks



[2002-08-03 01:00:11] [EMAIL PROTECTED]

No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".



[2002-07-02 09:56:01] [EMAIL PROTECTED]

Please try this snapshot:

http://snaps.php.net/php4-latest.tar.gz

(has updated bundled libmysql)




[2002-05-29 23:56:23] [EMAIL PROTECTED]


  Is this something that could be caught when ./configure is run?  My
concern is that ./configure checks for tempnam successfully eventhough
it will not link.

  However, since this seems to be the behavior of AC_CHECK_FUNCS there
might not be anything to do.



[2002-05-22 15:41:14] [EMAIL PROTECTED]

Even better this one http://gcc.gnu.org/ml/gcc/2002-02/msg01071.html
(one of the Follow-Ups)



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

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




#21756 [Fbk->Opn]: Accessing $_SERVER['PATH_INFO '] causes intermittent segfault in Apache

2003-02-06 Thread php
 ID:   21756
 User updated by:  [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Feedback
+Status:   Open
 Bug Type: Reproducible crash
 Operating System: Linux/Apache (Debian 3.0r1)
 PHP Version:  4.3.0
 New Comment:

I sense some degree of frustration here.  I had thought that I had
given enough details for someone familiar with the Apache/PHP interface
to diagnose the problem.  Please accept my apologies if that is not the
case.  I will try to rectify matters now.

This is a *very* serious issue, effectively killing off apache
intermittantly, and so is worthy of a fair degree of effort to diagnose
- I spent three days correlating access logs, error logs, and the
scripts that were called looking for common elements, and eliminating
possible matches, before discovering the cause (and a work-around).

It is especially insidious, as it only seems to cause real problems
(ie, failures visible to clients) on a production machine.  I use a
testbed that is configured the same as the production server in order
to test new PHP releases etc..., and everything seemed to work fine,
even when stressed by test scripts run on clients.

Anyway, here is as much information as I can give you...

The requested (short, COMPLETE, and self contained) example script:



If $_SERVER['PATH_INFO'] contains a value, this value is echoed, and
there is no problem.  

If $_SERVER['PATH_INFO'] does not contain a value (usually at the
frontpage of site) *sometimes* Apache will throw a segfault.

I ran gdb on the test server (identically configured to production
server), but was unable to catch segfault in action.  The intermittant
segfault occured in both machines, though *much* more often on the
production machine.  

Examination of old error logs seems to show that problem existed with
4.2.3 as well, but not earlier builds (but I cannot absolutely confirm
that).

The workaround: Wrapping reads with call to isset() reduced occurance
of segfaults from 200-300 a day on the production machine, to zero.
eg:


Observations on production machine:
The segfaults seemed to increase in frequency over time, untill Apache
effectively stops serving pages altogether.  I could only observe this
effect on our (remote) production system.  Restarting Apache seems to
settle things for a day or two from a users perspective, though there
continue to be segfaults in the error log.  Setting the maxrequests
config. in Apache had no effect.

Most of our websites use the value of $_SERVER['PATH_INFO'] extensively
in order produce dynamic content while avoiding use of ugly, search
engine unfriendly urls, eg:
www.test.com/products/clothes/boys/summer.html vrs.
www.test.com/products.html?line=clothes&sex=boys&season=summer
which may help to explain why I have experianced this problem, while
obviously many others have not.

Misc. info:
Linux 2.4.20 (Debian 3.01), Apache 1.3.26, 
php 4.3,0, options: --with-apxs --with-pgsql --with-zlib --with-xml
--enable-wddx --with-mm --with-config-file-path=/etc/php --with-gd


Previous Comments:


[2003-02-06 16:59:05] [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


With the very little information you've given..please
give the snapshot a try. If the problem persists,
please give us a _complete_ and short example script
which can be used to reproduce this.

Also, what was the configure line used to configure PHP?




[2003-02-06 13:36:56] [EMAIL PROTECTED]

I have already tried to generate the requested backtrace (as already
noted below...), but was unable to get apache to segfault while I was
watching.

I determined the cause of the bug by comparing access and error logs,
looking at the called scripts, and examining points of similarity.

The bug was confirmed when, after I wrapped the reads to
$_SERVER['PATH_INFO'] (see below) the segfault frequency went from
1-200/day to zero.  This was the only change made, which would seem to
clinch the deal.



[2003-02-04 16:51:06] [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-01-20 04:50:25] [EMAIL PROTECTED]

Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.ne

#22100 [NEW]: Query failure when WHERE clause matches on column with value '0'

2003-02-06 Thread eigenuser
From: [EMAIL PROTECTED]
Operating system: FreeBSD 4.7
PHP version:  4.3.0
PHP Bug Type: PostgreSQL related
Bug description:  Query failure when WHERE clause matches on column with value '0'

I have a PostgreSQL db with the table 'news_article', which has its primary
index a serial column named 'art_id'. This table has a row whose art_id is
set to zero. Now I'll do the following:

1. Make a persistent connection.
2. Make query of the form: 
 SELECT * FROM news_article WHERE art_id = 0

Most of the time this query will work fine, but if I refresh the PHP
script multiple times, I'll eventually get an error with the following
error messages.

---
PHP error message:
---
Warning: pg_query() [function.pg-query]: Query failed: server closed the
connection unexpectedly This probably means the server terminated
abnormally before or while processing the request. .in [filename.php] on
line 21

--
PostgreSQL error message:
--
pq_recvbuf: recv() failed: Undefined error: 0


Some things I've noticed:

* This problem does not seem to appear when
  connecting with non-persistent connections.

* Although the PHP error message suggests the
  connection was closed prematurely, you can
  still issue successful queries using the same
  connection resource later on in the PHP page,
  so it appears that the connection is still
  open.


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




#14877 [Com]: HTTP_FDF_DATA not available (php_fdf.dll crashes)

2003-02-06 Thread toni . viemero
 ID:   14877
 Comment by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Open
 Bug Type: FDF related
 Operating System: XP Pro
 PHP Version:  4.4 dev
 Assigned To:  hholzgra
 New Comment:

We ran into this same bug today.

Windows (2000 and XP) with Apache 1.3.27 crashes (both 4.3.0 and todays
win32 4.3.1-stable snapshot) when page is requested.

Apache 2.0.44 works ok on both platforms with php_fdf.dll and with both
tested PHP versions.


Previous Comments:


[2002-12-30 14:27:38] [EMAIL PROTECTED]

I can confirm the bug (crash when php_fdf.dll is loaded) in 4.3.0 an
current dev and stable snapshots.



[2002-12-30 11:21:38] [EMAIL PROTECTED]

Hi,

I installed the Win32 php 4.3.0 final released on a Windows NT server. 
I created a phpinfo.php file to view the phpinfo and everything looks
good.  The phpinfo.php file will not come up when I uncomment the
php_fdf.dll extension.  Is there a fix for this?

Thanks,

Trent



[2002-12-02 01:25:47] [EMAIL PROTECTED]

I've been testing windows today (I have very little experience
installing on win32 so bare with me) and so I decided to include all
the dlls.  This particular one (php_fdf.dll) is causing problems and
when the dll is loaded it gives an error at startup yet no error in the
error log.  Apache still runs but PHP will not.

In short: I just experienced what Christoph did, *crash*.  Although I
only tested php4.3.0rc2... Apache module.



[2002-11-29 14:01:23] [EMAIL PROTECTED]

sorry for the delay - dev snapshot from today still crashing at startup
when fdf is enabled.



[2002-11-19 01:00:04] [EMAIL PROTECTED]

No feedback was provided for this bug for over 2 weeks, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".



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

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




#22099 [Fbk->Opn]: Strange freeze when EOF reached in socket.

2003-02-06 Thread sthomas
 ID:   22099
 User updated by:  [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Feedback
+Status:   Open
 Bug Type: Sockets related
 Operating System: Redhat 7.3
 PHP Version:  4.3.0
 New Comment:

Nope, problem still exists.  As of right now, it's hanging on a piece
of code that looks like this:

 CODE 

print "Unresponsive server, closing connection... ";
ob_flush();

if (is_resource($this->m_rConn))
  fclose($this->m_rConn);

$this->m_rConn = NULL;
print "Done!\n";
ob_flush();

 CODE 

Note that it's not printing "Done!" in the spot where it is freezing. 
Meaning it's either is_resource, or fclose.  How's that for nasty?


Previous Comments:


[2003-02-06 17:37:38] [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


..and you'll know for sure if it's related to #21529 since
that was fixed in CVS..




[2003-02-06 17:17:34] [EMAIL PROTECTED]

I'm not sure this bug is related to bug #21529 or not; this is not a
segfault, but a simple program hang.  This is from a script I run from
a PHP CLI, and is intermittent.  I'd attach the script, but it's a 10k
class file...  I've used stream_set_timeout to set the limit to two
seconds, and the connect timeout is also two seconds.  From my
debugging output, there are no infinite loops, the freezes are
essentially random, and sometimes nonexistent - but always before a
single call to fclose after feof() returns true.  This leads me to
believe that a remote server I'm contacting isn't behaving properly
100% of the time

php -m returns:

[PHP Modules]
ctype
dio
ftp
mysql
overload
pcre
pgsql
posix
session
standard
tokenizer
wddx
xml
zlib

Backtrace:

#0  0x401c941e in select () from /lib/libc.so.6
#1  0x08199f44 in __DTOR_END__ ()
#2  0x08121d01 in _php_stream_free (stream=0x83079c4, close_options=3)
at /home/install/php-4.3.0/main/streams.c:327
#3  0x080acff7 in zif_fclose (ht=1, return_value=0x825e32c,
this_ptr=0x0, 
return_value_used=0) at
/home/install/php-4.3.0/ext/standard/file.c:1120
#4  0x0815b05c in execute (op_array=0x823a26c)
at /home/install/php-4.3.0/Zend/zend_execute.c:1596
#5  0x0815b234 in execute (op_array=0x822b5f0)
at /home/install/php-4.3.0/Zend/zend_execute.c:1640
#6  0x0815b234 in execute (op_array=0x8222518)
at /home/install/php-4.3.0/Zend/zend_execute.c:1640
#7  0x0815b234 in execute (op_array=0x81daaa4)
at /home/install/php-4.3.0/Zend/zend_execute.c:1640
#8  0x08145398 in zend_execute_scripts (type=8, retval=0x0,
file_count=3)
at /home/install/php-4.3.0/Zend/zend.c:864
#9  0x081188b5 in php_execute_script (primary_file=0xba40)
at /home/install/php-4.3.0/main/main.c:1573
#10 0x08163ecc in main (argc=2, argv=0xbae4)
at /home/install/php-4.3.0/sapi/cli/php_cli.c:746
#11 0x4010a1c4 in __libc_start_main () from /lib/libc.so.6

I did it three times to make sure, and aside from memory segments, the
trace is the same.




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




#21279 [NoF->Opn]: odbc_fetch_into returns empty strings for columns with NULL values

2003-02-06 Thread ernani
 ID:   21279
 Updated by:   [EMAIL PROTECTED]
-Reported By:  [EMAIL PROTECTED]
+Reported By:  [EMAIL PROTECTED]
-Status:   No Feedback
+Status:   Open
 Bug Type: ODBC related
 Operating System: Windows
 PHP Version:  4.3.0
 New Comment:

Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.

This bug still happening, the solution is here in this diff. Please
commit it because I do not have enough karma to do it myself.

Hope This Helps,

Ernani Joppert Pontes Martins


Index: php_odbc.c
===
RCS file: /repository/php4/ext/odbc/php_odbc.c,v
retrieving revision 1.153
diff -c -r1.153 php_odbc.c
*** php_odbc.c  24 Jan 2003 22:40:38 -  1.153
--- php_odbc.c  7 Feb 2003 01:38:46 -
***
*** 1589,1595 
if (rc == SQL_SUCCESS_WITH_INFO) {
Z_STRLEN_P(tmp) = result->longreadlen;
} else if (result->values[i].vallen == SQL_NULL_DATA) 
{
!   Z_STRVAL_P(tmp) = IS_NULL;
break;
} else {
Z_STRLEN_P(tmp) = result->values[i].vallen;
--- 1589,1595 
if (rc == SQL_SUCCESS_WITH_INFO) {
Z_STRLEN_P(tmp) = result->longreadlen;
} else if (result->values[i].vallen == SQL_NULL_DATA) 
{
!   ZVAL_NULL(tmp);
break;
} else {
Z_STRLEN_P(tmp) = result->values[i].vallen;
***
*** 1599,1605 
  
default:
if (result->values[i].vallen == SQL_NULL_DATA) {
!   Z_STRVAL_P(tmp) = IS_NULL;
break;
}
Z_STRLEN_P(tmp) = result->values[i].vallen;
--- 1599,1605 
  
default:
if (result->values[i].vallen == SQL_NULL_DATA) {
!   ZVAL_NULL(tmp);
break;
}
Z_STRLEN_P(tmp) = result->values[i].vallen;



Previous Comments:


[2003-01-31 13:44:39] [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-01-16 10:56:03] [EMAIL PROTECTED]

It should contain it.  You can look into the code though and see for
yourself just to ensure.  The fix is in the points that you suggested,
but if it's not working I'm not sure what to tell you other than wait. 




[2003-01-06 23:03:13] [EMAIL PROTECTED]

I just tried Win32 build of PHP 4.4.0-dev taken from snaps.php.net
(php4-win32-200301062330.zip) and it is working the same. It looked
like the fix would solve the problem but it works as if the fix was not
applied. Isn't that build supposed to include the fix?



[2003-01-06 12:11:01] [EMAIL PROTECTED]

Try a snapshot dated sometime after this.  I believe it does what you
want/desire.  If not many complaints happen I'll leave it in... 



[2003-01-03 17:09:16] [EMAIL PROTECTED]

What I meant is that every SQL based PHP database API has a function to
fetch rows into an array. When it is not not *_fetch_into is
*_fetch_row.

I do not see any ambiguity in figuring if a result column has a NULL.
As a matter of fact in the current odbc_function of php_odbc.c you
have:

http://cvs.php.net/co.php/php4/ext/odbc/php_odbc.c?r=1.143.2.1

if (result->values[i].vallen == SQL_NULL_DATA) {
Z_STRVAL_P(tmp) = empty_string;
break;
}

Since NULL is always NULL regardless of the data type of a column, all
that needs to be done is to leave undefined (NU

#22101 [NEW]: Wrong behaviour of open_basedir restriction

2003-02-06 Thread cmouse
From: [EMAIL PROTECTED]
Operating system: Debian linux 2.4.19
PHP version:  4.3.0
PHP Bug Type: Scripting Engine problem
Bug description:  Wrong behaviour of open_basedir restriction

Warning: Unknown(): open_basedir restriction in effect.
File(/www/htdocs/phpSysInfo-2.1/index.php) is not within the allowed
path(s): (/) in Unknown on line 0

Warning: Unknown(/www/htdocs/phpSysInfo-2.1/index.php): failed to create
stream: Operation not permitted in Unknown on line 0

Warning: Unknown(): Failed opening '/www/htdocs/phpSysInfo-2.1/index.php'
for inclusion (include_path='.:/usr/lib/php') in Unknown on line 0

As you can see, /www is in my opinion, inside /, which is my open_basedir
for this particular file. 

The Apache config for this directory:


 php_admin_value open_basedir "/"


You can get the phpSysInfo-2.1 script yourselves, too long to paste here,
and it's not mine anyways.
-- 
Edit bug report at http://bugs.php.net/?id=22101&edit=1
-- 
Try a CVS snapshot: http://bugs.php.net/fix.php?id=22101&r=trysnapshot
Fixed in CVS:   http://bugs.php.net/fix.php?id=22101&r=fixedcvs
Fixed in release:   http://bugs.php.net/fix.php?id=22101&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=22101&r=needtrace
Try newer version:  http://bugs.php.net/fix.php?id=22101&r=oldversion
Not developer issue:http://bugs.php.net/fix.php?id=22101&r=support
Expected behavior:  http://bugs.php.net/fix.php?id=22101&r=notwrong
Not enough info:http://bugs.php.net/fix.php?id=22101&r=notenoughinfo
Submitted twice:http://bugs.php.net/fix.php?id=22101&r=submittedtwice
register_globals:   http://bugs.php.net/fix.php?id=22101&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=22101&r=php3
Daylight Savings:   http://bugs.php.net/fix.php?id=22101&r=dst
IIS Stability:  http://bugs.php.net/fix.php?id=22101&r=isapi
Install GNU Sed:http://bugs.php.net/fix.php?id=22101&r=gnused




#22101 [Opn->Ana]: Wrong behaviour of open_basedir restriction

2003-02-06 Thread rasmus
 ID:   22101
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Analyzed
 Bug Type: Scripting Engine problem
 Operating System: Debian linux 2.4.19
 PHP Version:  4.3.0
 New Comment:

I wouldn't be surprised if an open_basedir set to / wasn't handled
correctly.  It is one of these non-sensical settings that I suppose we
should account for, but it really is meaningless.  All you are doing is
burning more system calls with absolutely no benefit since everything
is under /


Previous Comments:


[2003-02-06 19:58:56] [EMAIL PROTECTED]

Warning: Unknown(): open_basedir restriction in effect.
File(/www/htdocs/phpSysInfo-2.1/index.php) is not within the allowed
path(s): (/) in Unknown on line 0

Warning: Unknown(/www/htdocs/phpSysInfo-2.1/index.php): failed to
create stream: Operation not permitted in Unknown on line 0

Warning: Unknown(): Failed opening
'/www/htdocs/phpSysInfo-2.1/index.php' for inclusion
(include_path='.:/usr/lib/php') in Unknown on line 0

As you can see, /www is in my opinion, inside /, which is my
open_basedir for this particular file. 

The Apache config for this directory:


 php_admin_value open_basedir "/"


You can get the phpSysInfo-2.1 script yourselves, too long to paste
here, and it's not mine anyways.




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




#21279 [Opn->Csd]: odbc_fetch_into returns empty strings for columns with NULL values

2003-02-06 Thread kalowsky
 ID:   21279
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Closed
 Bug Type: ODBC related
 Operating System: Windows
 PHP Version:  4.3.0
 New Comment:

commited.


Previous Comments:


[2003-02-06 19:39:47] [EMAIL PROTECTED]

Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.

This bug still happening, the solution is here in this diff. Please
commit it because I do not have enough karma to do it myself.

Hope This Helps,

Ernani Joppert Pontes Martins


Index: php_odbc.c
===
RCS file: /repository/php4/ext/odbc/php_odbc.c,v
retrieving revision 1.153
diff -c -r1.153 php_odbc.c
*** php_odbc.c  24 Jan 2003 22:40:38 -  1.153
--- php_odbc.c  7 Feb 2003 01:38:46 -
***
*** 1589,1595 
if (rc == SQL_SUCCESS_WITH_INFO) {
Z_STRLEN_P(tmp) = result->longreadlen;
} else if (result->values[i].vallen == SQL_NULL_DATA) 
{
!   Z_STRVAL_P(tmp) = IS_NULL;
break;
} else {
Z_STRLEN_P(tmp) = result->values[i].vallen;
--- 1589,1595 
if (rc == SQL_SUCCESS_WITH_INFO) {
Z_STRLEN_P(tmp) = result->longreadlen;
} else if (result->values[i].vallen == SQL_NULL_DATA) 
{
!   ZVAL_NULL(tmp);
break;
} else {
Z_STRLEN_P(tmp) = result->values[i].vallen;
***
*** 1599,1605 
  
default:
if (result->values[i].vallen == SQL_NULL_DATA) {
!   Z_STRVAL_P(tmp) = IS_NULL;
break;
}
Z_STRLEN_P(tmp) = result->values[i].vallen;
--- 1599,1605 
  
default:
if (result->values[i].vallen == SQL_NULL_DATA) {
!   ZVAL_NULL(tmp);
break;
}
Z_STRLEN_P(tmp) = result->values[i].vallen;




[2003-01-31 13:44:39] [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-01-16 10:56:03] [EMAIL PROTECTED]

It should contain it.  You can look into the code though and see for
yourself just to ensure.  The fix is in the points that you suggested,
but if it's not working I'm not sure what to tell you other than wait. 




[2003-01-06 23:03:13] [EMAIL PROTECTED]

I just tried Win32 build of PHP 4.4.0-dev taken from snaps.php.net
(php4-win32-200301062330.zip) and it is working the same. It looked
like the fix would solve the problem but it works as if the fix was not
applied. Isn't that build supposed to include the fix?



[2003-01-06 12:11:01] [EMAIL PROTECTED]

Try a snapshot dated sometime after this.  I believe it does what you
want/desire.  If not many complaints happen I'll leave it in... 



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

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




#15734 [Opn->Csd]: get_defined_constants() feature

2003-02-06 Thread iliaa
 ID:   15734
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Closed
 Bug Type: Feature/Change Request
 Operating System: ALL
 PHP Version:  4.1.1
 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.

Will be part of PHP 5.0, optional parameter to get_defined_constants()
will make the output break down the constants into categories.


Previous Comments:


[2002-02-26 12:11:07] [EMAIL PROTECTED]

Hi developers!

The get_defined_constants() could have some parameters, like
this [type]:

- SYSTEM_DEFINES/SYSTEM_CONSTANS
- USER_DEFINES/USER_CONSTANS
- ALL_DEFINES/ALL_CONSTANS

and this two [prefix] and [mode] which could be left :

it is looking for a text which contains [prefix] in the firs/last part
of define [mode]

possibly in the get_defined_vars() too :)

or similar to the get_defined_functions() [internal] [user]

thx, Benjamin




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




#15459 [Opn->Csd]: milter interface

2003-02-06 Thread iliaa
 ID:   15459
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Closed
 Bug Type: Feature/Change Request
 Operating System: Linux
 PHP Version:  4.1.1
 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.

Milter SAPI is avaliable in PHP 5.0-dev.


Previous Comments:


[2002-02-08 18:23:31] [EMAIL PROTECTED]

I notice that Perl has the Sendmail::milter module.

I think a milter extension to PHP would be great for PHP's use as a
local scripting language.  

Thank you

Hans




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




#15211 [Opn->Bgs]: println?

2003-02-06 Thread iliaa
 ID:  15211
 Updated by:  [EMAIL PROTECTED]
 Reported By: [EMAIL PROTECTED]
-Status:  Open
+Status:  Bogus
 Bug Type:Feature/Change Request
 PHP Version: 4.1.1
 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.

Given the number of print functions already in PHP this seem pointless,
especially considering it'd only print a single character.


Previous Comments:


[2002-06-08 10:38:26] [EMAIL PROTECTED]

Actually, what would be HUGE is if println could determine the sapi
module it is running as and then add the endline appropriately, meaning
for the web it would add a '' tag after the line.

But honestly, if php is really going to be considered for commandline
scripting, it needs a println() feature.



[2002-01-24 13:36:56] [EMAIL PROTECTED]

I'm in the midst of doing quite a bit of shell/command line 
stuff with PHP, and I think it would be kind of useful to 
have a println construct, much like in Java or a number of 
other languages. println is identical to print, but a 
newline/carriage return is appended to the output. 

I know I could just write function in PHP or even a 
function in an extension to provide the same functionality, 
but it might as well be in the language itself, if only 
because it may be used often enough to warrant inclusion. 
(I know I'd use it all the time.) 

I started trying to add it myself (I can see that it would 
go in the Zend engine, correct?) but after reminding myself 
that I've never used Lex before (nor really looked at the 
Zend code) I decided that this would be best left to 
someone who actually knows what they're doing when it 
comes to the Zend engine.

The only problem I can think of is portability, 
specifically the oft-cursed differences between OS newline 
sequences. (Is it \n? \r\n? \n\r? Dammit?!) Doesn't seem 
like a huge issue, though, does it?

J





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




#15208 [Opn->Csd]: .phps file additional feature

2003-02-06 Thread iliaa
 ID:   15208
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Closed
 Bug Type: Feature/Change Request
 Operating System: Linux
 PHP Version:  4.1.1
 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.

There is no ini settings, however as of PHP 4.3.0 you can passd a
string via GET that will enable the display of line numbers.


Previous Comments:


[2002-01-24 12:32:54] [EMAIL PROTECTED]

It would be very helpful if you had a php.ini directive like:

php_source_view_linenum = 0/1

 If it is set to '1', a .phps file would print the line number in front
of the colorized syntax. It's not a huge feature, but would be very
nice to help debug some code, or help others see the logic of code.




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




#14901 [Opn->Csd]: Add a new language construct which prints to stderr by default

2003-02-06 Thread iliaa
 ID:   14901
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Closed
 Bug Type: Feature/Change Request
 Operating System: n/a
 PHP Version:  4.1.1
 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.

As of PHP 4.3.0 you have STDERR constant that you can use to echo stuff
to stderr. Ex.

fwrite(STDERR, "error\n");


Previous Comments:


[2002-01-07 06:05:03] [EMAIL PROTECTED]

A new language construct as a 'friend' to echo wouldn't be a bad idea
IMHO. Something like echoerr which prints to stderr instead of stdout
(and does not use output buffering of course).

The current situation requires the following steps:

$f = fopen('php://stderr', 'w');
fputs($f, 'debug message');
close($f);

which is ... well, it's nice to have but cumbersome to use (obviously,
I hope).

Example:
echo "ene", "mene", str_repeat('bla', '3), "\n";

should just work with echoerr the same:

echoerr "ene", "mene", str_repeat('bla', '3), "\n";

The reason I'm for a language construct:
Make it as similar to use as echo itself. Not requireing it having to
use parentheses. Easily to replaceable echo and echoerr.

That's it, flames on.




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




#14853 [Opn->Bgs]: escapeshellarg should return '' for empty argument list

2003-02-06 Thread iliaa
 ID:   14853
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Bogus
 Bug Type: Feature/Change Request
 Operating System: Linux
 PHP Version:  4.1.0
 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.

This seems like a rather unexpected behaviour to me and if the feature
you request is added it'll likely break many scripts.
Do your own input validation.


Previous Comments:


[2002-01-04 13:05:56] [EMAIL PROTECTED]

If I build a command line like this:
$cmd  = "ls ";
$cmd .= escapeshellarg($file);
system($cmd);

It works fine if $file contains data.  But if $file is empty, $cmd is
"ls " instead of "ls ''".

The code would be easier to write if escapeshellarg always returned the
two single quotes, even if its argument was blank.




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




#22102 [NEW]: Link fails with modified mysql path

2003-02-06 Thread allen012
From: [EMAIL PROTECTED]
Operating system: Solaris 8
PHP version:  4.3.0
PHP Bug Type: Compile Failure
Bug description:  Link fails with modified mysql path

Environment:  Gnu installation (GCC, MySQL, etc) from Solaris 8 Companion
CD, Apache 2.0.44, PHP 4.3.0, MySQL 3.23
Apache compiled and runs fine in the environment.  

PHP:  ./configure --with-mysql=/opt/sfw/mysql
--with-apxs2=/usr/local/apache2/bin/apxs

PHP configure runs fine, and the build works up to link.  It then fails
with:
Cannot find /opt/sfw/mysql/lib/mysql/.lib/libmysqlclient.so

Where is the ".lib" coming from?  
The link also indicates that it has failed to create .lib/libphp4.so
Again - what gives with the ".lib"?
-- 
Edit bug report at http://bugs.php.net/?id=22102&edit=1
-- 
Try a CVS snapshot: http://bugs.php.net/fix.php?id=22102&r=trysnapshot
Fixed in CVS:   http://bugs.php.net/fix.php?id=22102&r=fixedcvs
Fixed in release:   http://bugs.php.net/fix.php?id=22102&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=22102&r=needtrace
Try newer version:  http://bugs.php.net/fix.php?id=22102&r=oldversion
Not developer issue:http://bugs.php.net/fix.php?id=22102&r=support
Expected behavior:  http://bugs.php.net/fix.php?id=22102&r=notwrong
Not enough info:http://bugs.php.net/fix.php?id=22102&r=notenoughinfo
Submitted twice:http://bugs.php.net/fix.php?id=22102&r=submittedtwice
register_globals:   http://bugs.php.net/fix.php?id=22102&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=22102&r=php3
Daylight Savings:   http://bugs.php.net/fix.php?id=22102&r=dst
IIS Stability:  http://bugs.php.net/fix.php?id=22102&r=isapi
Install GNU Sed:http://bugs.php.net/fix.php?id=22102&r=gnused




#14643 [Opn->Csd]: wordwrap() only for long words

2003-02-06 Thread iliaa
 ID:   14643
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Closed
 Bug Type: Feature/Change Request
 Operating System: Linux
 PHP Version:  4.0.6
 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:


[2001-12-21 10:22:14] [EMAIL PROTECTED]

The function wordwrap() could work in another fashion, breaking only
words bigger than the specified width instead of break all lines.

The web browsers always break text at spaces, fiting it in the web
page. But if a somebody post a message with very long words (example:
HLOHWWWAREYOOU),
it will stretch the page, showing the horizontal scrollbar and making a
mess in the layout. 

With the actual wordwrap(), it will break all lines of text, so when I
need to use the nl2br(), the text will appear as a small column in the
left.

I need to use ns2br(), or the posts will appear "compacted".
So, if wordwrap() break only long words at specified width that will
depend of my layout, everything will be fine. 

I think such behavior could work with a little differece in the cut
parameter.





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




#7869 [Opn->Bgs]: parse_str produces no trapable value

2003-02-06 Thread iliaa
 ID:   7869
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Bogus
 Bug Type: Feature/Change Request
 Operating System: RH Linux 6.2
 PHP Version:  4.0.3pl1
 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.

I believe that since there is a way to fetch the data in form of an
array this feature request is mostly pointless.


Previous Comments:


[2001-01-21 03:57:45] [EMAIL PROTECTED]

have parse_str return would be certainly good; as a workaround you can
use 

parse_str( $s , $a ) ;
if( 0 == count( $a ) ) {
   # problem
   ...



[2000-11-17 22:05:57] [EMAIL PROTECTED]

 

I would submit that to maintain the elegant conventions of PHP, it
would be good to return 
A) The number of variables parsed (I'll leave in your court how to
handle counting the # of array variables parsed) 

or 

B) false if the string was null, corrupt or "un-parsable". 

Currently, the only way to evaluate the success of this function is to
know the last variable that is/should be in the input stream and check
to see that THAT variable exists after running this function = less
than optimum. 

Thanks!

-Ben 




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




#7095 [Opn->Bgs]: Unwanted content-type header

2003-02-06 Thread iliaa
 ID:   7095
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Bogus
 Bug Type: Feature/Change Request
 Operating System: Linux
 PHP Version:  4.0
 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.

Seems to work fine now, no?


Previous Comments:


[2001-02-10 15:06:12] [EMAIL PROTECTED]

refiled as 4.0 feature request.



[2000-10-09 04:40:23] [EMAIL PROTECTED]

This is a follow up to bug 3299.
Although I agree that PHP is in compilance, this header causes both IE
and Netscape to produce a blank screen.

Could the code be amended to supress this header line until an attempt
is made to generate non header output?




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




#2328 [Opn->Bgs]: I would like animated gif support within php.

2003-02-06 Thread iliaa
 ID:   2328
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Bogus
 Bug Type: Feature/Change Request
 Operating System: anything
 PHP Version:  4.0
 New Comment:

Not only is the project is dead, but creation of gif files would
violate the Unisys lisence on GIF/LZW compression algorithm.


Previous Comments:


[2002-02-24 07:01:19] [EMAIL PROTECTED]

Seems to be a pretty dead project...



[2001-02-10 13:45:54] [EMAIL PROTECTED]

refiled against 4.0.



[1999-09-19 22:51:11] [EMAIL PROTECTED]

c lib avaliable at http://phil.ipal.org/freeware/angif/
btw, rasmus told me to mail here




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




#21482 [Ana->Csd]: removing cybercach in php-4.3.0

2003-02-06 Thread iliaa
 ID:   21482
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Analyzed
+Status:   Closed
 Bug Type: Feature/Change Request
 Operating System: linux
 PHP Version:  4.3.0
 New Comment:

Should be closed.


Previous Comments:


[2003-01-07 12:51:27] [EMAIL PROTECTED]

Thank You you your quick responce.  Worked like a charm.



[2003-01-07 05:22:42] [EMAIL PROTECTED]

If you think you really need it:

1)Download PHP-4.2.3 and PHP4.3.0.
2)cp -R php-4.2.3/ext/cybercash php-4.3.0/ext/
3)rm -rf php-4.2.3; cd php-4.3.0/
4)./buildconf
5)./configure (your options there)..
6) make ; make install

Thank you for your report.



[2003-01-07 02:58:43] [EMAIL PROTECTED]

verisign still uses cybercash technology for its older 
clients, I have a client who still uses it. By needlessly 
removing it, you prohibited me from upgrading to php 4.3.0.  
Please let me know if there is a way to include the 
cybercash functions in php 4.3.0.  Thank You

Greg Greenhaw
[EMAIL PROTECTED]




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




#20902 [Opn->Bgs]: Function needed to return name of current script independent of O/S

2003-02-06 Thread iliaa
 ID:   20902
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Bogus
 Bug Type: Feature/Change Request
 Operating System: Win2K Server
 PHP Version:  4.2.3
 New Comment:

Use the __FILE__ constant.


Previous Comments:


[2002-12-09 06:12:17] [EMAIL PROTECTED]

Finding the name of the currently running script (to save it, for
instance, before branching) requires too much messing around to make it
operating system independent. This sort of complexity should be hidden
from end-user programmers.

An example of the hoops needed to be jumped through is shown below:

function me() {
/* returns the name of the current script, without the querystring
portion.
 * this function is necessary because PHP_SELF and REQUEST_URI and
PATH_INFO
 * return different things depending on a lot of things like your OS,
Web
 * server, and the way PHP is compiled (ie. as a CGI, module, ISAPI,
etc.) */

if (getenv("REQUEST_URI")) {
$me = getenv("REQUEST_URI");

} elseif (getenv("PATH_INFO")) {
$me = getenv("PATH_INFO");

} elseif (ini_get('register_globals') && $GLOBALS["PHP_SELF"]) {
$me = $GLOBALS["PHP_SELF"];

// Supply default case that works when register_globals = Off - RJ 
} else $me = $_SERVER['SCRIPT_NAME'];

return strip_querystring($me);
}

I think this can be improved. PHP_SELF is quoted as the standard
solution, but I think you'll find those pushing it are relying on a
particular O/S or server.





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




#20881 [Opn->Bgs]: strip_tags() option to change brackets

2003-02-06 Thread iliaa
 ID:  20881
 Updated by:  [EMAIL PROTECTED]
 Reported By: [EMAIL PROTECTED]
-Status:  Open
+Status:  Bogus
 Bug Type:Feature/Change Request
 PHP Version: 4.3.0RC2
 New Comment:

Use strtr() it will be much faster then modifying strip_tags with the
suggested functionality.

strtr($your_string, array(">" => ">", "<" => "<"));


Previous Comments:


[2002-12-09 17:58:47] [EMAIL PROTECTED]

Exactly :)



[2002-12-09 15:55:17] [EMAIL PROTECTED]

Your example is inconsistent with your explanation.  Does the following
look like the behavior you had in mind?

strip_tags("hithere", "", "<", ">");

would have an output of:

hithere



[2002-12-07 13:37:08] [EMAIL PROTECTED]

#15972, which is open right now, had some good thoughts on how to
expand strip_tags...

My suggestion:

1. Add a third/fourth parameter to it that (if specified) says what to
change the brackets *to* instead of replacing them.

e.g.:

strip_tags("hithere", "", "<", ">");

would have an output of:

hi 

The point of this is so that rather than strip away tags that are
invalid, a forum would be able to see code just fine..  Well, that, and
we'd be able to have brackets on the site without typing in the html
equivalent ;)




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




#21218 [Opn->Bgs]: should be able to set a list of hidden environment vars

2003-02-06 Thread iliaa
 ID:   21218
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Bogus
 Bug Type: Feature/Change Request
 Operating System: Red Hat Linux 7.3
 PHP Version:  4.3.0
 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.

Simply make sure that these variables are not exported when the
webserver is started.


Previous Comments:


[2002-12-27 14:36:55] [EMAIL PROTECTED]

Hm, I didn't even know you could do that. But I don't want to prevent
accessing of environment variables, really just prevent access of some,
or at the very least be able to only turn _ENV off for phpinfo().



[2002-12-27 14:27:51] [EMAIL PROTECTED]

On a related note fwiw, even if E is removed from the variables_order
directive (so that $_ENV will not exist), one can still use getenv() to
access the variables.



[2002-12-27 13:55:14] [EMAIL PROTECTED]

Currently, safe_mode_protected_env_vars can be set to disallow setting
of specific environment variables. I propose an option to set a list of
environment variables (possibly with wildcards, such as SUDO_*) that
are completely hidden from PHP pages, and do not show up in phpinfo()
(Since you can disable environment variables, but to hide _ENV globals,
you would have to disable variable listing completely, which is not
always good enough). Showing certain environment settings are a huge
security risk, such as SUDO_UID and SUDO_USER if apache was started
using sudo, as well as PWD, PATH, SSH_CONNECTION, etc. Disabling
phpinfo() is not always a possibility, since it gives a lot of useful
information to users.




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




#21392 [Opn->Bgs]: use of

2003-02-06 Thread iliaa
 ID:   21392
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Bogus
 Bug Type: Feature/Change Request
 Operating System: Windows
 PHP Version:  4.3.0
 New Comment:

Impractical and pointless. The runat directive is completely frivolous
and adding support for it, would only slow down the page parsing.


Previous Comments:


[2003-01-03 09:49:02] [EMAIL PROTECTED]

Enter the bugs as Windows only since I don't have a way to confirm on
Linux, Unix, or Mac.



[2003-01-03 09:39:16] [EMAIL PROTECTED]


#20230 [Opn->Bgs]: getacl

2003-02-06 Thread iliaa
 ID:   20230
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Bogus
 Bug Type: Feature/Change Request
 Operating System: Debain
 PHP Version:  4.2.3
 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. Because of this, we hope you add your comments
to the existing bug instead.

Thank you for your interest in PHP.

Dupe of #19801.


Previous Comments:


[2002-11-03 13:43:44] [EMAIL PROTECTED]

I submitted a note on the imap refrence page...

Would it be at all possible to get a function that could get the acl on
a mailbox?




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




#19610 [Opn->Bgs]: define() defined() usage of constants -> handler

2003-02-06 Thread iliaa
 ID:   19610
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Bogus
 Bug Type: Feature/Change Request
 Operating System: all
 PHP Version:  4.2.3
 New Comment:

Tracking variable usage will result in too much overhead during
runtime. Why not use the grep tool with the 'c' flag to count the
number of times each constant is used and if any are unused, remove
them. PHP is hardly needed for this.


Previous Comments:


[2002-09-26 17:34:59] [EMAIL PROTECTED]

"things get confusing while editing code and youre bound to come to
unused/unreferenced constants (or missing ones)."

- what i ment is, that when you have lots of code, and lots of defines,
and you evolve the code further, you get rid of some existing defines,
and people do forget to delete the define() then

this behaviour is common with "gcc -Wall" and also with msvc (compiler,
error suppression at level 1 or 2, 1 beeing most verbose (i think - its
been a while since i used msvc)), basically it tells you when a
variable is not referenced, or in our case, a constant.

doesnt really matter, since from what i understand, there are no hooks
on constants/variables in zend, so you cant really define a hook on
when a define is fetched (like that _MB_TODAYSDATE example above),
ofcourse if it could be done, i would do it

there is supposed to be a hook on undefined variables / constants, but
i dont know how far that can be addapted to write a handler which would
fetch values from a database (for example);

a very primitive example would be:

function hook_undefinedvalue($key) {
  list($retval) = mysql_fetch_row(mysql_query("select keyval from tab
where keyname='".mysql_escape_string($key)."'"));
  return $retval;
}

this would pretty much take _MB_TODAYSDATE (if not define()'d from the
database. I know as an example this is stupid, but the only use this
has is to help me write more clean code, and also count variable
references, also to see which variables which were defined are not used
so i can delete them, and they take less memory..

as for your question, yes, a simple call to a function (for example
gettext()) with the parameter would be okay, but lets take software
like phpbb/postnuke/phpnuke for example, they have their own language
system and it also uses define()'s, and have a grand total of over
200kb code, each

are you suggesting that a developer which wants to put lets say, phpbb,
to a gettext() environment, needs to acctually look at 200kb code and
encapsulate theese constants, when you could simply just
register_constant_handler and automatically call that function trough a
php hook

ofcourse parsing around 500 language entries in define() and
str_replace'ing occurances inside the source code so that they have
"gettext(" prefixed and ")" suffixed is faster, but personally i think
less is more in cases like this

i do thing only that this functionality is most usefull when developing
and bugfixing large ammounts of code which is not yours to start with,
so you probablly dont even agree on the design the developer before you
decided on, as is the case for me, since i have to put a 2 year old
piece of code in an up to date condition, oop, and register_globals =
off, ofcourse with multilang support

as for my problem - it was already fixed, but this is still a feature
request not a bug solving issue

(ofcourse a handler on constant reference is currently not possible
inside zend so derick gave me -1 on that, since that would require
modification to zend, and he doesnt like that - i feel most developers
won't since 4.3 is coming up, and i guess 5.0 is also close around the
corner so this also isnt acceptable in zend2, but i guess rasmus, andi,
zeev, derick and probably some other more important people need to
discuss that)



[2002-09-26 06:24:13] [EMAIL PROTECTED]

I seem to fail to understand your exackt concerns. Can you elaborate a
bit more on

"things get confusing while editing code and youre bound to come to
unused/unreferenced constants (or missing ones)."

especially the second part of the sentence ?


Wouldn't a simply call to function solve the problem (which itself
isn't yet clear to me).

Requesting feedback.



[2002-09-26 05:47:39] [EMAIL PROTECTED]

lets say for example you have vast ammounts of code which use a
language system which is based on define() statements, and ofcourse
addressing of theese in the source code in the following way:

echo date(_MB_TODAYSDATE,time());

things get confusing while editing code and youre bound to come to
unused/unreferenced constants (or missing ones).

having the handler would help us do two things:

#1 using the define() statement to call a handler 

#19801 [Opn->Bgs]: Imap_getacl()

2003-02-06 Thread iliaa
 ID:   19801
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Bogus
 Bug Type: Feature/Change Request
 Operating System: Linux/Debian 3.0 (+Sid)
 PHP Version:  4CVS-2002-10-07
 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. Because of this, we hope you add your comments
to the existing bug instead.

Thank you for your interest in PHP.

Dupe of feature request #18355.


Previous Comments:


[2002-10-07 09:13:32] [EMAIL PROTECTED]

The IMAP-implementation allready has the ACL-function, imap_setacl(),
for setting/writing rights.

Wouldn't it be nice if imap_getacl() was also implemented, so we could
"read our rights" ?




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




#17001 [Opn->Bgs]: enhancement for addslashes()

2003-02-06 Thread iliaa
 ID:   17001
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Bogus
 Bug Type: Feature/Change Request
 Operating System: Linux
 PHP Version:  4.2.0
 New Comment:

Use addcslashes() it allows you specify the list of characters that
should be escaped.


Previous Comments:


[2002-05-04 02:26:18] [EMAIL PROTECTED]

it would be VERY useful if the addslashes() function would take a
second parameter to specify that only one particular kind of quote is
to be escaped, instead of escaping both... sort of like
htmlentities()'s quote_style.

- erick




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




#22103 [NEW]: imagefilledellipse() is incorrect with alpha blending

2003-02-06 Thread ljpersson
From: [EMAIL PROTECTED]
Operating system: Linux
PHP version:  4.3.0
PHP Bug Type: GD related
Bug description:  imagefilledellipse() is incorrect with alpha blending

(Using built-in GD 2.x in PHP 4.3.0)

imagefilledellipse() creates moire' patterns inside the filled ellipse
when alpha blending is enabled.

The problem seems to be that the fill algorithm strokes the same point
within the ellipse several times and due to the alpha blending of single
pixels creates several color shades within the ellipse.

This is fine as long as a solid fill is used but does not work together
with alpha blending. 


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




#16303 [Opn->Bgs]: file() MUCH faster than fsockopen() + fgets() but we should be able to set th

2003-02-06 Thread iliaa
 ID:   16303
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Bogus
 Bug Type: Feature/Change Request
 Operating System: Linux
 PHP Version:  4.1.1
 New Comment:

Try using fread() and a large buffer, something like 2-5 bytes.
This will reduce the number of PHP operations that occur and probably
be much closer file() performance. 
As for your request of adding headers to file(), readfile() and so on
it is simple not practical as it would break many existing scripts that
rely on the lack of headers.


Previous Comments:


[2002-03-28 00:58:39] [EMAIL PROTECTED]

AND:

$file = file("http://myqddress.com/foo.htm";);
$file = readfile("http://myaddress.com/foo.htm";);

and what I told you before was that the other options we have to send
our own defined headers(fsockopen) are too slow. 

What I'm asking is to have the ability to set the headers of file(),
readfile() and fopen().



[2002-03-28 00:40:44] [EMAIL PROTECTED]

We should able to set the headers sent by file() and fopen-wrappers
when the requests are made to outside, like:

$file = fopen("http://myaddress.com/blah.php?op=po";);



[2002-03-27 09:23:39] [EMAIL PROTECTED]

I'm not quite sure what you are asking for here;
could you be more specific?



[2002-03-27 01:55:45] [EMAIL PROTECTED]


When tring to open a file for remote edition like:

$file = file("http://myaddress.com/users.php?op=xz&f=w";);

Whe can't set the headers.
And why one would like to?

1 - Readfile throws the content to std out.
2 - fsockopen takes too much time to do the same:

$sck = fsockopen($host,$port,&$errno,&$errstr);
fputs($sck,$request);
while(!feof($sck)) {
   $result .= fgets($sck,128);
}
This will take about 300-400% more time compared with file() or
readfile(). (WHY??? Ive tested the int lenght of fgets() with
2,32,64,128...4096 and it is still very slow: filesizes > 400kb ~
90-120 sec (@ 256k) when file() does the same in ~ 20-30 sec).

I've not tested cURL yet, but I think PHP should support this w/o 3
parties..

Thanks ppl!






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




  1   2   >