#25624 [Bgs-Opn]: FATAL: emalloc(): Unable to allocate 35 bytes

2003-09-24 Thread vijay at mitoken dot com
 ID:   25624
 User updated by:  vijay at mitoken dot com
 Reported By:  vijay at mitoken dot com
-Status:   Bogus
+Status:   Open
 Bug Type: *General Issues
 Operating System: windows 2000 Professional
 PHP Version:  4.3.1
 New Comment:

I doubled the memory_limit in my php.ini and upgraded the version to
4.3.3 still the same error is there anything else that has to be done,
please kindly help me.


Previous Comments:


[2003-09-22 06:57:02] [EMAIL PROTECTED]

Increase the memory_limit in php.ini. And upgrade to PHP 4.3.3 too.




[2003-09-22 06:00:04] vijay at mitoken dot com

Description:

I am displaying my XML File in table format on the browser using PHP,
but when ever i have an xml file of size more than 35 KB i get the
following error

FATAL:  emalloc():  Unable to allocate 35 bytes 

Expected result:

It should be able to allocate the memory based on the xml file size

Actual result:
--
FATAL:  emalloc():  Unable to allocate 35 bytes





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


#25637 [Bgs-Fbk]: Unserialize limitations?

2003-09-24 Thread derick
 ID:   25637
 Updated by:   [EMAIL PROTECTED]
 Reported By:  paulo_graca at hotmail dot com
-Status:   Bogus
+Status:   Feedback
 Bug Type: Variables related
 Operating System: Win 2003
 PHP Version:  4.3.2
 New Comment:

1. Come up with a short example
2. Use the latest STABLE snapshot.

If you're unable to provide this information, then we can't and won't
help.


Previous Comments:


[2003-09-23 18:36:07] [EMAIL PROTECTED]

Try the latest STABLE snapshot. And don't you think it's pretty stupid
to store such data in session..?
(maybe you should at least compress it?)




[2003-09-23 18:32:11] paulo_graca at hotmail dot com

I'm sorry to pollute your database but this isn't crap! It's the
code/text returned by a PDF submission (FDF).

If you assign this text to a variable and try to unserialize the result
You will get incorrect data. 
This is one limitation don't you think? But maybe it's corrected on the
next version.



[2003-09-23 13:27:05] [EMAIL PROTECTED]

1. Thank you very much for polluting our bug database with this crap.

2. Likely to be fixed already, if not in 4.3.3, then in latest CVS. 




[2003-09-23 13:11:10] paulo_graca at hotmail dot com

Description:

The function unserialize truncates the string passed as a parameter and
the obtained result is incorrect.

I use this function in the method getSessionData that returns the
unserialized value of one record by session_id and key.
With smaller values there isn't no problem, the method works perfectly.

Reproduce code:
---
//--
// This method receives a keyword and returns 
// the db record by session_id and $params.
// Then returns the unserialized value in the record
//-
  function getSessionData($params)
  {
if (!is_array($params)) $params = array('sessionKey'=$params);
//get $params[sessionKey]
if($record=$this-dbSessionsData-getRecordBySessionKey($params)){
  return unserialize($record['value']);
}
else{
  return array();
}
  }

Expected result:

The value in the DB (mysql) is an FDF document and is the serialized
result of the submission:

s:11414:%FDF-1.2
%âãÏÓ
1 0
obj/FDF/F(http://192.168.0.1/ccrlvt/ccr-lvt.pt/formsSubmit/files/formularioCCRLVT2.pdf)/ID[524e520fd1bc8059da333576f1e82500f959d25c2f04be60f1eb3bb55091d481]/Fields[/T(chk1)/V/Yes/T(chk2)/V/Off/T(chk3)/V/Off/T(chk4)/V/Off/T(chk5)/V/Yes/T(chk6)/V/Off/T(chk7)/V/Off/T(chk8)/V/Off/T(chk9)/V/Off/T(chkIVAEsp)/V/Off/T(combIndicResEsper1)/V(
)/T(combIndicResEsper10)/V( )/T(combIndicResEsper2)/V(
)/T(combIndicResEsper3)/V( )/T(combIndicResEsper4)/V(
)/T(combIndicResEsper5)/V( )/T(combIndicResEsper6)/V(
)/T(combIndicResEsper7)/V( )/T(combIndicResEsper8)/V(
)/T(combIndicResEsper9)/V(
)/T(txtAgenInov)/V(0)/T(txtArticDesc)/T(txtAssocEmp)/V(0)/T(txtAssocMunic)/V(0)/T(txtAssocRegional)/V(0)/T(txtBIC)/V(0)/T(txtCAE)/V()/T(txtCCRVLT)/V(0)/T(txtCamMunic)/V(0)/T(txtCentrosTecnTransTec)/V(0)/T(txtCodPostal1)/V()/T(txtCodPostal2)/V()/T(txtCodRepFinancas)/V()/T(txtCodigo)/V()/T(txtConcelho)/V()/T(txtData)/V()/T(txtDescPlanoGeralProj)/T(txtDescProj)/T(txtDesigCAE)/V()/T(txtDesigEntBenef)/V()/T(txtDesigPrograma)/V(teste

#24028 [Com]: Reading raw post message by php://input

2003-09-24 Thread vikisain at yahoo dot com
 ID:   24028
 Comment by:   vikisain at yahoo dot com
 Reported By:  xiongwei at aerafront dot com
 Status:   Closed
 Bug Type: CGI related
 Operating System: win32 only
 PHP Version:  4.3.2
 New Comment:

Hi  every one  ,


$$$ SAFE AND FAST MONEY MAKING $$$


This is not like other scheme this is the fast money making scheme

GET FREE CASH $ CASH $ CASH $ !!!  



I'll Tell You How To Do It For Free

I found it on one of the newsgroups while surfing the net.
I didnt believe that this could be true in a case of earning money on
net.
I wanted to know how true is it. I thought 10 days over it and finally

decided i will do it. I may go for a loss of \$6.00 at the most.
I sent \$6.00 to six people as told to do so, AND to my surprise within

10 days i started getting letters with \$1.00 attached to it.
the next week i collected a amount of \$124.00 and in few more days it
went
to \$1473.00 and so on I had never expected it would work so soon,
so fast, so efficient as so well...  
   



IMPORTANT: This is not a rip-off; it is not indecent; it is not
illegal; and it is 99% no risk - it really works!

It's easy. It's legal. And, your investment is only \$6.00 (Plus
postage)


PLEASE NOTE:
Please follow these directions EXACTLY, and \$50,000 or more can be
yours in 20 to 60 days. This program remains successful because of
the honesty and integrity of the participants. Please continue its
success by carefully adhering to the instructions.

4 Easy Steps To Success:

STEP 1: Get 6 separate pieces of paper and write the following on
each piece of paper PLEASE PUT ME ON YOUR MAILING LIST. Now
get 6 US\$1.00 bills and place ONE inside EACH of the 6 pieces of
paper so the bill will not be seen through the envelope (to prevent
thievery). Next, place one paper in each of the 6 envelopes and seal
them. You should now have 6 sealed envelopes, each with a piece of
paper stating the above phrase, your name and address, and a \$1.00
bill. What you are doing is creating a service. THIS IS ABSOLUTELY
LEGAL! You are requesting a legitimate service and you are paying for
it! Like most of us I was a little skeptical and a little worried
about the legal aspects of it all. So I checked it out with the U.S.
Post Office (1-800-725-2161) and they confirmed that it is indeed
legal. Mail the 6 envelopes to the following addresses:


#1) T. Trimuel
1245 W. Chase
Chicago, IL 60626

#2) W. Hanafi
1801, 501-40th Ave, NW
Calgary, AB, T2K 5S5
Canada

#3) I. Allan
906, Putra Apt.,
Jln Bkt Setiawangsa
Tmn Setiawangsa
54200 Kuala Lumpur
Malaysia

#4) M. Holze
7 Geraldton Drive
Redhead,
NSW, 2290
Australia

#5)Ravi V. Dhotre
   plot no.11 Renu Building, 
   Ganesh nagar, Patvardhan Layout,
   Vadagaon, Belgaum-05,
   Karnataka(India).


#6) Vikram L. Sainuche
5 , Khanapur road, Raviwar peth , 
Tilakwadi , BELGAUM - 590006.
KARNATAKA ( INDIA )
Mail to : [EMAIL PROTECTED]

STEP 2: Now take the #1 name off the list that you see above, move
the other names up (6 becomes 5, 5 becomes 4, etc...) and add YOUR
Name as number 6 on the list.

STEP 3:  Now, post your amended article to atleast 300 newsgroups. 
(I think there are close to 25,000 groups) All you need is 300,
but remember, the more you post, the more money you
make! You won't get very much unless you post like crazy. :)

This is perfectly legal! If you have any doubts, refer to Title 18
Sec. 1302  1341 of the Postal lottery laws.

PLEASE REMEMBER that this program remains successful because of the
honesty and integrity of the participants and by their carefully
adhering to the directions. Look at it this way. If you are of
integrity, the program will continue and the money that so many
others have received will come your way.

(Also, it might be a good idea to wrap the $1 bill in dark paper to 
reduce the risk of mail theft.)

So, as each post is downloaded and the directions carefully followed,
six members will be reimbursed for their participation as a List
Developer with one dollar each. Your name will move up the list
geometrically so that when your name reaches the #1 position you will
be receiving thousands of dollars in CASH!!! What an opportunity for
only $6.00 ($1.00 for each of the first six people listed above) Send
it now, add your own name to the list and you're in business!

TO POST TO NEWSGROUPS

Step 1) You do not need to re-type this entire letter to do your own
posting. Simply copy the text ahd save it as a name.txt file in your

hardisk of your computer.

Step 2) Use Netscape or Internet explorer and try searching for
various newsgroups (on-line forums, message boards, chat sites,
discussions.) Eg.- Log on to www.sify.com and give post message
in its 'find' textbox ahd say 'GO' 


Step 5) Visit these message boards and post this article as a new
message by highlighting the text of this letter and selecting paste
from the edit menu. Fill in the Subject, this will be the header that

#25624 [Opn-Bgs]: FATAL: emalloc(): Unable to allocate 35 bytes

2003-09-24 Thread sniper
 ID:   25624
 Updated by:   [EMAIL PROTECTED]
 Reported By:  vijay at mitoken dot com
-Status:   Open
+Status:   Bogus
 Bug Type: *General Issues
 Operating System: windows 2000 Professional
-PHP Version:  4.3.1
+PHP Version:  4.3.3
 New Comment:

Read http://bugs.php.net/how-to-report.php ?
(Provide a _short_ example of what you're doing?)



Previous Comments:


[2003-09-24 02:06:15] vijay at mitoken dot com

I doubled the memory_limit in my php.ini and upgraded the version to
4.3.3 still the same error is there anything else that has to be done,
please kindly help me.



[2003-09-22 06:57:02] [EMAIL PROTECTED]

Increase the memory_limit in php.ini. And upgrade to PHP 4.3.3 too.




[2003-09-22 06:00:04] vijay at mitoken dot com

Description:

I am displaying my XML File in table format on the browser using PHP,
but when ever i have an xml file of size more than 35 KB i get the
following error

FATAL:  emalloc():  Unable to allocate 35 bytes 

Expected result:

It should be able to allocate the memory based on the xml file size

Actual result:
--
FATAL:  emalloc():  Unable to allocate 35 bytes





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


#25597 [Opn-Fbk]: fastcgi + pfsockopen = crash

2003-09-24 Thread edink
 ID:   25597
 Updated by:   [EMAIL PROTECTED]
 Reported By:  dietrich dot ayala at foundstone dot com
-Status:   Open
+Status:   Feedback
 Bug Type: CGI related
 Operating System: windows 2000
 PHP Version:  4.3.3
 New Comment:

This is the latest ssl enabled build:

ftp://ftp.proventum.net/pub/php/win32/misc/openssl/php-4.3.4-dev-ssl.zip



Previous Comments:


[2003-09-19 13:58:54] dietrich dot ayala at foundstone dot com

My apologies for leaving out an important detail:

This only occurrs when using SSL. I cannot reproduce this issue using
unencrypted communication.

Since there still exists a problem with dynamically linking OpenSSL in
the 4.x tree, I have asked EdinK to compile a new php4ts.dll with
OpenSSL. Once that's available, I'll test using the latest.

Thanks!



[2003-09-18 20:30:12] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2003-09-18 16:46:12] dietrich dot ayala at foundstone dot com

Description:

first time loading the reproduction script works fine. subsequent
reloads will first cause php.exe to crash (The instruction at
0x100108b4 referenced memory at 0x. The memory could not be
read.), then once I hit OK on that alert, I'll get a Server Error,
unable to connect to fastcgi server. error in the browser. 

We've found that this error text is in the FastCGI source. It looks
like maybe php crashes, then fastcgi attempts to access a php thread
that has gone bye-bye, and throws that error. So there may be 2 issues:
what's causing the original php crash, and then the fastcgi problem.

Here's how to repro:

- environment: win2k, IIS, FastCGI, PHP 4.3.2/.3 (I repro'd w/ both)
- set up a test script, such as a phpinfo script
- configure the repro script to hit your host, port,
path_to_test_script and load it, then hit refresh (sometimes, I'll have
to restart w3svc to be able to repro the bug)

notes:
- this does not occur if using fsockopen, only with pfsockopen
- i could not reproduce this with windows XP, only windows 2000 (both
server and professional)


Reproduce code:
---
http://dietrich.ganx4.com/phpbug_iis.phps

Expected result:

it should output the URL it's attempting to connect to.

Actual result:
--
first time loading the reproduction script works fine. subsequent
reloads will first cause php.exe to crash (The instruction at
0x100108b4 referenced memory at 0x. The memory could not be
read.), then once I hit OK on that alert, I'll get a Server Error,
unable to connect to fastcgi server. error in the browser. 





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


#25623 [Opn-Fbk]: Memory leak in function load()

2003-09-24 Thread thies
 ID:   25623
 Updated by:   [EMAIL PROTECTED]
 Reported By:  maoy at fjii dot com
-Status:   Open
+Status:   Feedback
 Bug Type: OCI8 related
 Operating System: Windows XP
 PHP Version:  4.3.3
 New Comment:

sorry, if the leak does not show on unix there's not much 
i can do as i don't run windows. 
 
can you compile a debug-build and see if php actually 
complains about mem-leaks? 
 


Previous Comments:


[2003-09-22 06:04:55] maoy at fjii dot com

In fact, I tried to use following codes:

ocifetchinto($stmt, $arr,OCI_ASSOC); 
$result = $arr[CLOB_FLDNAME]-load(); 

but it always cause memory leak on Windows system. It doesn't cause
memory leak on Linux system.

By the way, running environment is:
Windows XP
Apache 1.3.26
PHP 4.3.3
Oracle 8.1.7

I am looking forward to reply.



[2003-09-22 05:09:45] [EMAIL PROTECTED]

could you plz replace  
$result = OCIResult($stmt, clob_fldname); 
if (is_object ($result)) $result = $result-load(); 
against: 
ocifetchinto($stmt, $arr,OCI_ASSOC); 
$result = $arr[CLOB_FLDNAME]-load(); 
 
as this is the code i use all the time and it doesn't 
(seem) to leak for me. 
 



[2003-09-21 22:55:48] maoy at fjii dot com

memory leak size relate with value of the field, it also increase along
with running times



[2003-09-21 22:38:20] maoy at fjii dot com

Description:

Web Server: Apache 1.3.26
When I get value of a field as Clob type, it always cause memory leak.

Reproduce code:
---
?php

$conn = ocilogon(username,password);
$query = SELECT clob_fldname FROM tablename;
$stmt = OCIParse ($conn, $query);
OCIExecute($stmt, OCI_DEFAULT);
$result = OCIResult($stmt, clob_fldname);
if (is_object ($result)) $result = $result-load();

?






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


#25641 [NEW]: ftp_rawlist long list retrive fail after 60 sec

2003-09-24 Thread sentomas at hotmail dot com
From: sentomas at hotmail dot com
Operating system: FreeBSD
PHP version:  4.3.3
PHP Bug Type: FTP related
Bug description:  ftp_rawlist long list retrive fail after 60 sec

Description:

if the ftp list so long that can retrive in 60sec, the ftp_rawlist()
automaticly fail. 

I re-set FTP timeout and default_socket timeout and of cause use
commandline mode , but it didnt seems to work.



Reproduce code:
---
//-lR option in order to make ftp server reply whole dir list, which might
be very very long, so its take time more than 60 sec.
$dirlist = ftp_rawlist($conn_id, -lR);
if ($dirlist === false){
   //defintely fail whatever you do after 60sec
   //commandline mode 
   return fail;
}

Expected result:

might be some kind of default_socket_timeout limit in inter-core?
because i saw the ftp.c will write to the list tmpfile first then output
to array.


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


#25641 [Opn-Fbk]: ftp_rawlist long list retrive fail after 60 sec

2003-09-24 Thread sniper
 ID:   25641
 Updated by:   [EMAIL PROTECTED]
 Reported By:  sentomas at hotmail dot com
-Status:   Open
+Status:   Feedback
 Bug Type: FTP related
 Operating System: FreeBSD
 PHP Version:  4.3.3
 New Comment:

Please try using this CVS snapshot:

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


Previous Comments:


[2003-09-24 05:42:17] sentomas at hotmail dot com

Description:

if the ftp list so long that can retrive in 60sec, the ftp_rawlist()
automaticly fail. 

I re-set FTP timeout and default_socket timeout and of cause use
commandline mode , but it didnt seems to work.



Reproduce code:
---
//-lR option in order to make ftp server reply whole dir list, which
might be very very long, so its take time more than 60 sec.
$dirlist = ftp_rawlist($conn_id, -lR);
if ($dirlist === false){
   //defintely fail whatever you do after 60sec
   //commandline mode 
   return fail;
}

Expected result:

might be some kind of default_socket_timeout limit in inter-core?
because i saw the ftp.c will write to the list tmpfile first then
output to array.






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


#25470 [Opn]: array_merge converts indexes differently in 4.3.3

2003-09-24 Thread bmansion at mamasam dot com
 ID:  25470
 User updated by: bmansion at mamasam dot com
-Summary: HTML_QuickForm bug in setDefaults, setConstants because
  of array_merge
 Reported By: bmansion at mamasam dot com
 Status:  Open
-Bug Type:PEAR related
+Bug Type:Arrays related
 PHP Version: 4.3.3
 Assigned To: mansion
 New Comment:

Changing bug category as requested by f.berger.


Previous Comments:


[2003-09-24 07:13:51] f dot berger at 21torr dot com

The Category should be changed and the bug should be retitled, because
this is a general bug, not related to PEAR, and not related to
HTML_QuickForm.

Problem I have:
  $ar = array ('-999'='a',0='b',1='c');
  $ar2 = array ('x'='x','y'='y','z'='z');
  print_r(array_merge($ar,$ar2));
results in a version prior to 4.3.3 to
  Array ( [-999] = c [0] = b [1] = a [x] = x [y] = y [z] = z )
in version 4.3.3 to
   [0] = a [1] = b [2] = c [x] = x [y] = y [z] = z )



[2003-09-10 11:53:37] bmansion at mamasam dot com

Description:

When the index in the array is a string like 1234567890, I mean
containing only figures, array_merge will convert it to an int and
change the index by resetting the value.

2 options:
Make our own array_merge function.

PHP Team fix array_merge so that it keep track of the index type.






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


#25642 [NEW]: CGI error with php4ts.dll

2003-09-24 Thread astron at bronxwhq dot org
From: astron at bronxwhq dot org
Operating system: Windows 2000 Server
PHP version:  4.3.3
PHP Bug Type: CGI related
Bug description:  CGI error with php4ts.dll

Description:

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

I aim to enable SSL with Php4.3.3 or Php4.3.2.. But i didnt manage to
reach solutions with Windows2000 server. In my local to enable SSL
connection for Php , i have downloaded new php4ts.dll,thanks to Marek
Kilimajer,   
from http://ftp.proventum.net/pub/php/win32/misc/openssl/ and replaced it.
On WinXP there is no problem everythings is okay. But when i have been
replacing php4ts.dll on Windows2000 server it gives me CGI error..

Do you have any idea? Or can it be a bug?

Reproduce code:
---
Any php code.. 


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


#25643 [NEW]: Unable to retrive page content using Join function

2003-09-24 Thread btanweer at hotmail dot com
From: btanweer at hotmail dot com
Operating system: Linux
PHP version:  4.3.1
PHP Bug Type: Arrays related
Bug description:  Unable to retrive page content using Join function

Description:

I have written few lines of code to retrive data from Google. It simply
reads the Google search page and then creates an array of all search
listings. This code works on my local machine with Php 4.3.2 in windows
but it does not return any result on my webserver with Php 4.3.1 in linux.
It does not give any error message.

Reproduce code:
---
?  

$page =
@join(,file(http://www.google.com/search?q=Travelhl=enlr=ie=UTF-8oe=UTF-8start=$pagexsa=N;));


#- Fetch the page and remove newlines
$page = str_replace(\n,,$page);

#- Grab all the website listed on the page
preg_match_all('/p class=ga href=(.*?)(.*?)\/abrfont
size=-1.*?(.*?)br.*?(.*?)br/',$page,$matches); 


$number = count($matches[3]);   


  for($x=0;$x$number;$x++)
{
$url = strip_tags($matches[1][$x]);
$title = str_replace(...,,strip_tags($matches[2][$x]));
$description = str_replace(...,,strip_tags($matches[3][$x])
);
$description1 = str_replace(...,,strip_tags($matches[4][$x],...));


#- print all the links from array
print font size=\+0\a href=$url target=_self
class=\cnn\$title/abr$description$description1/fontp\n;

   }

?

Expected result:

It should display list of search results as seen in Google. For Example:
Title: Travelocity: Airline Tickets, Hotels, Cars, Vacations, and 
Decription: Business Travel Center. Save your company money. Find out how.
Alreadya user? Sign-in. Travel Information Center. Departures  Arrivals.


Title: Expedia Travel -- discount airfare, flights, hotels, cars, 
Description: Expedia.com is the premier online travel planning and
flight-bookingsite. Purchase airline tickets online, find vacation
packages 



Actual result:
--
Blank Page

It does not display any error or results at all

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


#25644 [NEW]: xsl:sort with data-type='text' ... php crashes

2003-09-24 Thread sparky_industries at mad dot scientist dot com
From: sparky_industries at mad dot scientist dot com
Operating system: Windows 98
PHP version:  4.3.3
PHP Bug Type: XSLT related
Bug description:  xsl:sort with data-type='text' ... php crashes

Description:

if i want to xsl:sort the elements of xsl:for-each and set data-type to
'text' (or drop data-type, which is the same), php crashes (windows
error-popup)!

Reproduce code:
---
XML:
?xml version=1.0 encoding=UTF-8?
root
   names
  namehansi/name
  namebergi/name
  namekrabi/name
  nametali/name
   /names
/root

XSL:
?xml version=1.0 encoding=UTF-8?
xsl:stylesheet version=1.0
xmlns:xsl=http://www.w3.org/1999/XSL/Transform;

xsl:template match=/root
xsl:apply-templates select=names /
/xsl:template

xsl:template match=names
xsl:for-each select=name
xsl:sort select=. order=descending data-type=text /
xsl:value-of select=. /
br /
/xsl:for-each
/xsl:template

/xsl:stylesheet

Expected result:

talibr /
krabibr /
hansibr /
bergibr /




Actual result:
--
PHP crashes ...

if i exclude the xsl:sort instruction, it works !

it also works, when data-type=number (this makes no sense here), but if
i drop it, or set data-type=text php crashes

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


#25642 [Opn-Bgs]: CGI error with php4ts.dll

2003-09-24 Thread sniper
 ID:   25642
 Updated by:   [EMAIL PROTECTED]
 Reported By:  astron at bronxwhq dot org
-Status:   Open
+Status:   Bogus
 Bug Type: CGI related
 Operating System: Windows 2000 Server
 PHP Version:  4.3.3
 New Comment:

1. You're using unsupported binary
2. Most likely just wrong dlls around.



Previous Comments:


[2003-09-24 07:32:10] astron at bronxwhq dot org

Description:

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

I aim to enable SSL with Php4.3.3 or Php4.3.2.. But i didnt manage to
reach solutions with Windows2000 server. In my local to enable SSL
connection for Php , i have downloaded new php4ts.dll,thanks to Marek
Kilimajer,   
from http://ftp.proventum.net/pub/php/win32/misc/openssl/ and replaced
it. On WinXP there is no problem everythings is okay. But when i have
been replacing php4ts.dll on Windows2000 server it gives me CGI
error..

Do you have any idea? Or can it be a bug?

Reproduce code:
---
Any php code.. 






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


#25643 [Opn-Bgs]: Unable to retrive page content using Join function

2003-09-24 Thread sniper
 ID:   25643
 Updated by:   [EMAIL PROTECTED]
 Reported By:  btanweer at hotmail dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Arrays related
 Operating System: Linux
 PHP Version:  4.3.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.

This is not support forum for your common scripting problems.
(there is no bug here in anything but your code)



Previous Comments:


[2003-09-24 09:10:14] btanweer at hotmail dot com

Description:

I have written few lines of code to retrive data from Google. It simply
reads the Google search page and then creates an array of all search
listings. This code works on my local machine with Php 4.3.2 in windows
but it does not return any result on my webserver with Php 4.3.1 in
linux. It does not give any error message.

Reproduce code:
---
?  

$page =
@join(,file(http://www.google.com/search?q=Travelhl=enlr=ie=UTF-8oe=UTF-8start=$pagexsa=N;));


#- Fetch the page and remove newlines
$page = str_replace(\n,,$page);

#- Grab all the website listed on the page
preg_match_all('/p class=ga href=(.*?)(.*?)\/abrfont
size=-1.*?(.*?)br.*?(.*?)br/',$page,$matches); 


$number = count($matches[3]);   


  for($x=0;$x$number;$x++)
{
$url = strip_tags($matches[1][$x]);
$title = str_replace(...,,strip_tags($matches[2][$x]));
$description = str_replace(...,,strip_tags($matches[3][$x])
);
$description1 =
str_replace(...,,strip_tags($matches[4][$x],...));


#- print all the links from array
print font size=\+0\a href=$url target=_self
class=\cnn\$title/abr$description$description1/fontp\n;

   }

?

Expected result:

It should display list of search results as seen in Google. For
Example:
Title: Travelocity: Airline Tickets, Hotels, Cars, Vacations, and 
Decription: Business Travel Center. Save your company money. Find out
how. Alreadya user? Sign-in. Travel Information Center. Departures 
Arrivals. 

Title: Expedia Travel -- discount airfare, flights, hotels, cars, 
Description: Expedia.com is the premier online travel planning and
flight-bookingsite. Purchase airline tickets online, find vacation
packages 



Actual result:
--
Blank Page

It does not display any error or results at all





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


#25644 [Opn-Fbk]: xsl:sort with data-type='text' ... php crashes

2003-09-24 Thread sniper
 ID:   25644
 Updated by:   [EMAIL PROTECTED]
 Reported By:  sparky_industries at mad dot scientist dot com
-Status:   Open
+Status:   Feedback
 Bug Type: XSLT related
 Operating System: Windows 98
 PHP Version:  4.3.3
 New Comment:

Add the php script here too.



Previous Comments:


[2003-09-24 09:13:44] sparky_industries at mad dot scientist dot com

Description:

if i want to xsl:sort the elements of xsl:for-each and set data-type to
'text' (or drop data-type, which is the same), php crashes (windows
error-popup)!

Reproduce code:
---
XML:
?xml version=1.0 encoding=UTF-8?
root
   names
  namehansi/name
  namebergi/name
  namekrabi/name
  nametali/name
   /names
/root

XSL:
?xml version=1.0 encoding=UTF-8?
xsl:stylesheet version=1.0
xmlns:xsl=http://www.w3.org/1999/XSL/Transform;

xsl:template match=/root
xsl:apply-templates select=names /
/xsl:template

xsl:template match=names
xsl:for-each select=name
xsl:sort select=. order=descending data-type=text /
xsl:value-of select=. /
br /
/xsl:for-each
/xsl:template

/xsl:stylesheet

Expected result:

talibr /
krabibr /
hansibr /
bergibr /




Actual result:
--
PHP crashes ...

if i exclude the xsl:sort instruction, it works !

it also works, when data-type=number (this makes no sense here), but
if i drop it, or set data-type=text php crashes





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


#25357 [Com]: Mail() function is loosing cahracters when sending mail

2003-09-24 Thread dj_canard at yahoo dot com
 ID:   25357
 Comment by:   dj_canard at yahoo dot com
 Reported By:  pjsmith at microtech dot co dot gg
 Status:   Bogus
 Bug Type: *Mail Related
 Operating System: Windows 2003, IIS, ISAPI
 PHP Version:  4.3.3
 New Comment:

Got the same problem here... I try to send a simple text e-mail but
around character number 1020 a character is lost.
I installed 4.3.0 and the problem is gone.
I'm using Windows 2000 and IIS 5.0


Previous Comments:


[2003-09-02 13:14:36] da_cookie at hotmail dot com

I'm getting a similar problem, although I'm not certain if this is it. 
I send emails with 4 pdf file attachments.  in PHP 4.3.2, it worked
great.  but with 4.3.3, the files are a few bytes smaller than the
original and wont open.



[2003-09-02 09:37:08] [EMAIL PROTECTED]

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 bug #25333




[2003-09-02 08:19:56] pjsmith at microtech dot co dot gg

Just to confirm I have re-installed php 4.3.2 and the problem has gone
away...



[2003-09-02 06:32:13] pjsmith at microtech dot co dot gg

Description:

If you try to mail a string such as 

recur-bill:
notes:
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.6 (MingW32)
Comment: For info see http://www.gnupg.org

iQCVAwUBP1R7lxOu+5gqBlaxAQHHqgQAqPNOlWVQWak4SQ6XUyIBu3c+09EE08lH
MR8mlRGzxy6LZd8MFxmnVjSMyDQJMDWlNwfRFdIokKTI0zDV2IU74GAct9VyPF5D
gW+cGXh7xyLdDBrq5BvjRlZ4iLspdgm1WHyZACV/DNikYTiax+XjYG34rCiN20Bn
3fqcGVXaGFM=
=syYY
-END PGP SIGNATURE-

With a pgp signature, it seems to be missing 1 character of the first
line of the signature, breaking it.  This worked flawslessly with
4.3.2.  When we upgraded yesterday, this started happening.  I've spent
several hours on this and it would appear that the mail() function is
at fault.

Reproduce code:
---
Mail a pgp signed sig such as in the desciption and check the sig
before and after sending.  My messages are about 1,220 bytes in length
on average with the sig at the bottom

The code I'm usnig is
$apptext=fread($domapp,filesize(uk_apps\\$appname.
_modify.asc));
fclose($domapp);
mail($recipient, MODIFY, 
$apptext,
From: [EMAIL 
PROTECTED]\r\nMessage-Id:  . time() .
@microtech.co.gg\r\nReply-To:
[EMAIL PROTECTED]\r\nX-Mailer: PHP/ . phpversion()); 


Expected result:

It to send the mail with the string as supplied.






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


#24030 [Com]: sprintf with negative floating point type leaves null in string

2003-09-24 Thread tyler at nas dot net
 ID:   24030
 Comment by:   tyler at nas dot net
 Reported By:  prgallier at yahoo dot com
 Status:   Closed
 Bug Type: Strings related
 Operating System: Linux 2.4.20
 PHP Version:  4.3.2
 New Comment:

A temporary work around:
%1.1f doesn't seem to print the nulls like %0.1f does.


Previous Comments:


[2003-06-05 00:56:00] [EMAIL PROTECTED]

Already fixed in CVS.




[2003-06-05 00:39:08] prgallier at yahoo dot com

Using sprintf with a floating point value for a negative number leaves
a null character in the string, such as:
$num = sprintf(%0.1f, -12.5);

$num will contain the following characters within the actual string
when printing out:
0x45 0x31 0x32 0x2E 0x35 0x00

This does not occur with non-negative numbers.

Try the following for realtime example:
?php
$num = sprintf(%0.1f, 12.5);
echo Positive Num: $numbr\n;
$num = sprintf(%0.1f, -12.5);
echo Negative Num: $numbr\n;
?

This is apparently an old bug that's been reintroduced in version
4.3.2.





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


#25645 [NEW]: Error including a PHP file from within an SSI

2003-09-24 Thread makull at freemail dot nl
From: makull at freemail dot nl
Operating system: Windows 2000
PHP version:  4.3.3
PHP Bug Type: IIS related
Bug description:  Error including a PHP file from within an SSI

Description:

If you use any PHP version above 4.2.3, including a PHP file from within a
SSI file using '#exec cgi' or '#include virtual' will fail and either
result in the raw source code of the PHP script or in machine code.

If you go back to PHP 4.2.3 using '#exec cgi' to include a PHP file works
perfectly.

This is on a Windows 2000 server using IIS 5 and all the latest service
packs and patches.

Reproduce code:
---
Lines from the SSI file (.shtml) :

!--#exec cgi=test.php--
!--#virtual include=test.php--


Expected result:

Expected result : The output of the PHP script in HTML (the output is
correct when you run it directly).

Actual result:
--
Actual result : Either the source code from the PHP script (virtual
include) or machine code (exec cgi).

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


#23220 [Com]: fgets() causes warning while reading data via SSL channel (HTTPS)

2003-09-24 Thread chris dot edwards at obinet dot com
 ID:   23220
 Comment by:   chris dot edwards at obinet dot com
 Reported By:  storozhilov at mail dot ru
 Status:   Assigned
 Bug Type: Filesystem function related
 Operating System: FreeBSD 4.8
 PHP Version:  4-STABLE-200307070330
 Assigned To:  wez
 New Comment:

Getting the exact same error.  Same OS, same version of PHP.

Changing the length of the string offered no changes.  I still get:

 SSL: fatal protocol error 

I'm getting this for fread() and fgets().


Previous Comments:


[2003-08-21 20:25:22] info at splendense dot nl

Using '$buff = fgets ($f, 355);' does not give any error, however 356
does for me (php 4.3.2 solaris).

My script seems to work fine but maybe a response string greater than
355 chars will not work?!?



[2003-08-21 20:18:33] scottm at spamcop dot net

I've not verified this patch will work and I'll hopefully test it
tomorrow.

I believe it is reaching the end of the file and nr_bytes is returning
0 and this is being caught by an if statement which should be looking
for -1.

--- network.c   Thu Aug 21 21:06:43 2003
+++ network.c.patched   Thu Aug 21 21:13:09 2003
@@ -1011,13 +1011,14 @@
do {
nr_bytes = SSL_read(sock-ssl_handle, buf,
count);
 
-   if (nr_bytes = 0) {
+   if (nr_bytes  0) {
retry = handle_ssl_error(stream,
nr_bytes TSRMLS_CC);
if (retry == 0 
!SSL_pending(sock-ssl_handle)) {
stream-eof = 1;
}
} else {
-   /* we got the data */
+   /* we got the data */
+   stream-eof = 1;
break;
}
} while (retry);



[2003-08-05 09:43:36] uk at access dot lv

php4.3.2 configured with-openssl

if ($f = fopen('https://site', 'r')) {
while (!feof($f)) {
$buff = fgets ($f, 1024);
echo $buff;
}
}
fclose ($f);

Warning: fgets(): SSL: fatal protocol error

if i read just some bits then no error.



[2003-07-07 00:48:32] severitt at ihug dot co dot nz

After experiencing this same bug with php 4.3.2 on FreeBSD 4.4, I came
searched here and found this bug report.
After reading the comment to try the latest stable version, I compiled
and installed php4-STABLE-200307070330.
 However the problem still remains. It appears that maybe feof() is not
detecting the eof properly, because if I read in less bytes than the
the size of the response, I don't get this warning.



[2003-04-15 01:52:09] storozhilov at mail dot ru

?php
  $fd = fsockopen(
'ssl://www.somehost.com',
443,
$errno,
$errstr,
30
  );
  fputs($fd, GET / HTTP/1.0\r\n\r\n);
  while (!feof($fd)) {
echo fgets($fd, 1024);
  );
?
After executing of this script following message appears:
Warning: fgets() [function.fgets]: SSL: fatal protocol error in
/blah/blah/blah/blah.php on line NN

PHP was configured with following arguments:
#!/bin/sh
./configure --with-apache=../apache_1.3.27rusPL30.17 --with-mod_charset
--with-pgsql=/usr/local/pgsql --with-mhash --with-sybase=/usr/local
--with-openssl




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


#25645 [Opn-Fbk]: Error including a PHP file from within an SSI

2003-09-24 Thread sniper
 ID:   25645
 Updated by:   [EMAIL PROTECTED]
 Reported By:  makull at freemail dot nl
-Status:   Open
+Status:   Feedback
 Bug Type: IIS related
 Operating System: Windows 2000
 PHP Version:  4.3.3
 New Comment:

Are you using ISAPI module or CGI binary version of PHP?

What is cgi.fix_pathinfo set to in php.ini (if you use PHP CGI
binary)

Did you update your php.ini with the new php.ini-dist from the PHP
4.3.3 distribution?



Previous Comments:


[2003-09-24 11:24:13] makull at freemail dot nl

Description:

If you use any PHP version above 4.2.3, including a PHP file from
within a SSI file using '#exec cgi' or '#include virtual' will fail and
either result in the raw source code of the PHP script or in machine
code.

If you go back to PHP 4.2.3 using '#exec cgi' to include a PHP file
works perfectly.

This is on a Windows 2000 server using IIS 5 and all the latest service
packs and patches.

Reproduce code:
---
Lines from the SSI file (.shtml) :

!--#exec cgi=test.php--
!--#virtual include=test.php--


Expected result:

Expected result : The output of the PHP script in HTML (the output is
correct when you run it directly).

Actual result:
--
Actual result : Either the source code from the PHP script (virtual
include) or machine code (exec cgi).





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


#25646 [NEW]: parse_ini_file with save_mode

2003-09-24 Thread hd at phportals dot de
From: hd at phportals dot de
Operating system: Linux
PHP version:  Irrelevant
PHP Bug Type: Filesystem function related
Bug description:  parse_ini_file with save_mode

Description:

When give an absolute path to parse_ini_file and save_mode is active, an
error occured, even if the absolute path points to an allowed directory.
The only solution is to user fopen etc. and process the file. Happend with
4.2.3; I'm not able to update on that server.

Reproduce code:
---
$path = dirname(__FILE__) . '/my.ini';
$cfg = parse_ini_file($path);


Expected result:

$cfg set up with an array or FALSE.

Actual result:
--
An error: Save mode restrictions.

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


#24502 [Asn-Fbk]: Fast CGI interface is broken

2003-09-24 Thread sniper
 ID:   24502
 Updated by:   [EMAIL PROTECTED]
 Reported By:  gwang at litespeedtech dot com
-Status:   Assigned
+Status:   Feedback
 Bug Type: CGI related
 Operating System: Linux
 PHP Version:  4.3.3
 Assigned To:  shane
 New Comment:

Check php.ini for cgi.fix_pathinfo and try setting it to 1 or 0.




Previous Comments:


[2003-08-25 16:28:02] gwang at litespeedtech dot com

This has not been completely fixed in 4.3.3.
When there is no PATH_INFO, it works fine.
When PATH_INFO is populated, it breaks. Try something like 
/phpinfo.php/path/info?a=b
The reason it breaks is PATH_TRANSLATED is used as the path to the PHP
script file instead of SCRIPT_FILENAME when PAHT_INFO is popluated.
As our LiteSpeed web server follows the CGI specification, all the code
controled by macro 

#if !DISCARD_PATH

and

#if ENABLE_PATHINFO_CHECK

are not necessory. If PHP is configured with following options,

./configure --enable-fastcgi --enable-discard-path
--disable-path-info-check

then the testing URL /phpinfo.php/path/info?a=b works just fine except
the PHP and Zend logos are missing due to the wrong value of PHP_SELF.

According to the comments in the code that the way PHP_SELF populated
is to provide backward compatibility for version before 4.3. My
question is, is this another reverse hacking for web server that does
not follow CGI spec, like Apache? By doing so, PHP_SELF is happen to be
the right value for them? If so, those code should be moved inside the
section controled by macro ENABLE_PATHINFO_CHECK or !DISCARD_PATH.

I think it is better to seperate the reserve hacking code for Apache's
fast CGI interface from the others as it is the only odd guy. The code
could be much cleaner.
 
Just some suggestions.

Sincerely,
LiteSpeed Team

.



[2003-07-04 18:04:00] gwang at litespeedtech dot com

Also, when I test it with phpinfo(), if the PATH_INFO is not empty,
PHP_SELF is set to PATH_INFO instead of SCRIPT_NAME, then the PHP and
Zend logos are missing.



[2003-07-04 16:53:44] gwang at litespeedtech dot com

Description:

Fast CGI interface is broken in both 4.3.2 4.3.3rc1 and the most recent
snap shot for web server with Fast CGI implementation that follows CGI
specification.
Our LiteSpeed web server (at http://www.litespeedtech.com ) supports
PHP through the Fast CGI interface (faster than Apache's mod_php). Our
Fast CGI implementation follows the CGI specification and set
environment variables exactly as what Apache's CGI does. It set
SCRIPT_FILENAME=/docroot/info.php and works fine with 4.3.1, but the
interface is broken since 4.3.2.
Our test shows that 
SG(request_info).path_translated 
is not populated with the value of SCRIPT_FILENAME but is NULL.
Further study shows that the root cause is at cgi-main.c:812 in release
4.3.2
 script_path_translated=env_path_translated;
set script_path_translated to NULL or whatever the value of
PATH_TRANSLATED. If we take that line out, every thing works fine.
We can use --enable-discard-path to avoid it but it is forbidden in
README.FastCGI (We don't know why based on our reading of the source
code).
I think one possilbe fix is to avoid that line of code for FastCGI, but
may need to add some code for Apache's mod_fastcgi. Or change the
document, say: --enable-discard-path should be used for web server
follows CGI Specs.  

Sincerely,
LiteSpeed Team
 






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


#25646 [Opn-Csd]: parse_ini_file with safe_mode

2003-09-24 Thread sniper
 ID:   25646
 Updated by:   [EMAIL PROTECTED]
 Reported By:  hd at phportals dot de
-Status:   Open
+Status:   Closed
 Bug Type: Filesystem function related
 Operating System: Linux
 PHP Version:  Irrelevant
 New Comment:

Thank you for your bug report. This issue has already been fixed
in the latest released version of PHP, which you can download at 
http://www.php.net/downloads.php




Previous Comments:


[2003-09-24 11:58:39] hd at phportals dot de

Description:

When give an absolute path to parse_ini_file and save_mode is active,
an error occured, even if the absolute path points to an allowed
directory. The only solution is to user fopen etc. and process the
file. Happend with 4.2.3; I'm not able to update on that server.

Reproduce code:
---
$path = dirname(__FILE__) . '/my.ini';
$cfg = parse_ini_file($path);


Expected result:

$cfg set up with an array or FALSE.

Actual result:
--
An error: Save mode restrictions.





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


#24389 [Com]: PHP 5 : Windows build needs a MySQL DLL

2003-09-24 Thread rodrigoclp at hotmail dot com
 ID:   24389
 Comment by:   rodrigoclp at hotmail dot com
 Reported By:  philip at cornado dot com
 Status:   Closed
 Bug Type: Feature/Change Request
 Operating System: Windows
 PHP Version:  5CVS-2003-06-29 (dev)
 Assigned To:  edink
 New Comment:

I caught the last version, Sep 24, 2003 14:30 GMT, i copied
libmySql.ddl for system  and php_mysql.dll still did not function.


Previous Comments:


[2003-07-19 16:55:38] spom at hotmail dot com

...but it crashes upon starting with The specified procedure could not
be found.  Sorry for the double post.



[2003-07-19 16:39:09] spom at hotmail dot com

You can obtain php_mysql.dll inside
http://snaps.php.net/win32/php5-win32-latest.zip . :^)



[2003-07-13 18:17:37] h3 at mindkind dot org

you can get the latest stables versions of PHP5 win32 extensions at
http://snaps.php.net/win32/PECL_STABLE , event with them i gived up
installing php5 over my win2k machine and decided to install it on my
redhat server instead (dont know if it'll work).

h3



[2003-07-12 07:40:36] rcherry at raysoft dot net

The Windows binary distribution - PHP 5.0.0b1 -  downloaded 24 hours
ago, includes libmysql.dll, but does NOT include php_mysql.dll.  Where
can I find a copy of pup_mysql.dll?  Thanks.



[2003-07-03 16:56:14] [EMAIL PROTECTED]

Philip, this bug was fixed, so leave it closed.



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

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


#25641 [Fbk]: ftp_rawlist long list retrive fail after 60 sec

2003-09-24 Thread pollita
 ID:   25641
 Updated by:   [EMAIL PROTECTED]
 Reported By:  sentomas at hotmail dot com
 Status:   Feedback
 Bug Type: FTP related
 Operating System: FreeBSD
 PHP Version:  4.3.3
 New Comment:

Your use of ftp_rawlist is incorrect.  The second argument must contain
a path (otherwise a -- technicly -- invalid command is sent to the
server).

Try again with ftp_rawlist($conn_if, -lR /);

(Passing -lR as arguments, while undocumented, will at least not result
in invalid behavior)

I'm not saying this is necessarily the problem (in fact it's probably
not), but I'd like to rule it out.

In the mean time, are you querying a public FTP server?  If so which
one? (I'd like to reproduce the precise circumstances).  If it's a
private FTP, it would help to at least know what FTP daemon is running
(i.e.: ProFTPd, IIS, etc...)




Previous Comments:


[2003-09-24 06:22:11] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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



[2003-09-24 05:42:17] sentomas at hotmail dot com

Description:

if the ftp list so long that can retrive in 60sec, the ftp_rawlist()
automaticly fail. 

I re-set FTP timeout and default_socket timeout and of cause use
commandline mode , but it didnt seems to work.



Reproduce code:
---
//-lR option in order to make ftp server reply whole dir list, which
might be very very long, so its take time more than 60 sec.
$dirlist = ftp_rawlist($conn_id, -lR);
if ($dirlist === false){
   //defintely fail whatever you do after 60sec
   //commandline mode 
   return fail;
}

Expected result:

might be some kind of default_socket_timeout limit in inter-core?
because i saw the ftp.c will write to the list tmpfile first then
output to array.






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


#25647 [NEW]: Date functions before 1970, after 2038

2003-09-24 Thread jtucker at bsiweb dot com
From: jtucker at bsiweb dot com
Operating system: Red Hat 9
PHP version:  4.3.3
PHP Bug Type: Date/time related
Bug description:  Date functions before 1970, after 2038

Description:

Hi,

We have a very troubling bug after upgrading Red Hat to 9.0 and PHP to
4.33. The problem is many of the date functions do not work with dates
before 1970 or after 2038. This is a result of the posix standard set by
glibc v2.3.

The major problem with this is this makes much of existing PHP code
broken. Red Hat 9 is dependent on this version of glibc, as well as many
libraries associated with PHP. A solution has been provided with an adodb
date library, but this breaks a large amount of existing scripts including
the Pear libraries and many pre-existing applications.

Many users choices are grim, either lock themselves into earlier versions
of glibc, PHP, Linux, or be fored to update all their code to use the
adodb function calls, along with every application upgrade and every
update to Pear.

I strongly feel that support for date functions with glibc 2.3 should be
included in the next version of PHP. We can't all wait for PHP 5 to
support this functionality. Thank you.

Reproduce code:
---
getdate()
date() 
gmdate()
mktime()
gmmktime()
strtotime()

with any date before 1970 or after 2038 on a system compiled with glibc
2.3.


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


#25642 [Bgs]: CGI error with php4ts.dll

2003-09-24 Thread astron at bronxwhq dot org
 ID:   25642
 User updated by:  astron at bronxwhq dot org
 Reported By:  astron at bronxwhq dot org
 Status:   Bogus
 Bug Type: CGI related
 Operating System: Windows 2000 Server
 PHP Version:  4.3.3
 New Comment:

So, how can i find correct ones? Or what will you suggest to me? And
how will i enable SSL connection..

Thanks Astron..


Previous Comments:


[2003-09-24 09:39:21] [EMAIL PROTECTED]

1. You're using unsupported binary
2. Most likely just wrong dlls around.




[2003-09-24 07:32:10] astron at bronxwhq dot org

Description:

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

I aim to enable SSL with Php4.3.3 or Php4.3.2.. But i didnt manage to
reach solutions with Windows2000 server. In my local to enable SSL
connection for Php , i have downloaded new php4ts.dll,thanks to Marek
Kilimajer,   
from http://ftp.proventum.net/pub/php/win32/misc/openssl/ and replaced
it. On WinXP there is no problem everythings is okay. But when i have
been replacing php4ts.dll on Windows2000 server it gives me CGI
error..

Do you have any idea? Or can it be a bug?

Reproduce code:
---
Any php code.. 






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


#25648 [NEW]: XSLT xslt_set_encoding() being detected as incorrectly missing

2003-09-24 Thread mloftis at wgops dot com
From: mloftis at wgops dot com
Operating system: Linux 2.4
PHP version:  4.3.3
PHP Bug Type: XSLT related
Bug description:  XSLT xslt_set_encoding() being detected as incorrectly missing

Description:

As per my comment on #24786.  23148, 21427, 20640 may all also be
related.

This is with the current version.

The issue is this, the -ljs and other libs tested earlier by the
config.m4 file ARE NOT used during the calls to check teh Sablot libs
for SetEncoding and GetOptions calls.  Thsi bug STILL exists in 4.3.3
and is the reason why (on my system at atleast) they don't get compiled
in unless i manually hit main/php_config.h with vi and change the undef
to #define.



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


#25269 [Com]: Output to mail ends with '/html' in mailform

2003-09-24 Thread php at grandriver dot net
 ID:   25269
 Comment by:   php at grandriver dot net
 Reported By:  otto at wikkelsoe dot dk
 Status:   No Feedback
 Bug Type: Mail related
 Operating System: Windows 2000 Advanced Server
 PHP Version:  4.3.3
 New Comment:

I also have encountered this problem with the same config.

Using the text/html content-type and html tables with the mail function
sends emails with missing characters, including the  in /html.  The
character loss otherwise appears random, resulting in invalid tags,
misspellings, etc.


Previous Comments:


[2003-09-02 18:14:54] [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-08-27 17:25:21] [EMAIL PROTECTED]

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

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

Thank you for your interest in PHP.


And this time, READ the url.




[2003-08-27 06:45:54] otto at wikkelsoe dot dk

Description:

Upgrading from 4.3.2 results in following error:
Output to mail ends with '/html' visibile in mailform.
No errors in the phperror.log.







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


#25644 [Fbk-Opn]: xsl:sort with data-type='text' ... php crashes

2003-09-24 Thread sparky_industries at mad dot scientist dot com
 ID:   25644
 User updated by:  sparky_industries at mad dot scientist dot com
 Reported By:  sparky_industries at mad dot scientist dot com
-Status:   Feedback
+Status:   Open
 Bug Type: XSLT related
 Operating System: Windows 98
 PHP Version:  4.3.3
 New Comment:

according to php script:

i would like to add the php script, but it is totally integrated into a
big framework, so it would not make sense to extract a few code-lines.

but it works like that:


$xml = function-to-generate-xml-document();
// xml-document is both WELLFORMED and VALID, i really checked that!

$xsl = implode(, file($xslfile));

$arguments = array
(   
   /_xml = $xml,
   /_xsl = $xsl
);

$xh = xslt_create();
@xslt_set_base($xh, file:// . $valid_base);
// the base is set to the directory of the xsl_file

$xml = @xslt_process($xh, arg:/_xml, arg:/_xsl,  NULL, $arguments);


Previous Comments:


[2003-09-24 09:41:38] [EMAIL PROTECTED]

Add the php script here too.




[2003-09-24 09:13:44] sparky_industries at mad dot scientist dot com

Description:

if i want to xsl:sort the elements of xsl:for-each and set data-type to
'text' (or drop data-type, which is the same), php crashes (windows
error-popup)!

Reproduce code:
---
XML:
?xml version=1.0 encoding=UTF-8?
root
   names
  namehansi/name
  namebergi/name
  namekrabi/name
  nametali/name
   /names
/root

XSL:
?xml version=1.0 encoding=UTF-8?
xsl:stylesheet version=1.0
xmlns:xsl=http://www.w3.org/1999/XSL/Transform;

xsl:template match=/root
xsl:apply-templates select=names /
/xsl:template

xsl:template match=names
xsl:for-each select=name
xsl:sort select=. order=descending data-type=text /
xsl:value-of select=. /
br /
/xsl:for-each
/xsl:template

/xsl:stylesheet

Expected result:

talibr /
krabibr /
hansibr /
bergibr /




Actual result:
--
PHP crashes ...

if i exclude the xsl:sort instruction, it works !

it also works, when data-type=number (this makes no sense here), but
if i drop it, or set data-type=text php crashes





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


#25644 [Opn]: xsl:sort with data-type='text' ... php crashes

2003-09-24 Thread sparky_industries at mad dot scientist dot com
 ID:   25644
 User updated by:  sparky_industries at mad dot scientist dot com
 Reported By:  sparky_industries at mad dot scientist dot com
 Status:   Open
 Bug Type: XSLT related
 Operating System: Windows 98
 PHP Version:  4.3.3
 New Comment:

Operating System:

i tried the same script (same configuration of apache2 and php) on
windows XP - IT WORKES !!!

so it has to do something with the operating system!


Previous Comments:


[2003-09-24 16:11:19] sparky_industries at mad dot scientist dot com

according to php script:

i would like to add the php script, but it is totally integrated into a
big framework, so it would not make sense to extract a few code-lines.

but it works like that:


$xml = function-to-generate-xml-document();
// xml-document is both WELLFORMED and VALID, i really checked that!

$xsl = implode(, file($xslfile));

$arguments = array
(   
   /_xml = $xml,
   /_xsl = $xsl
);

$xh = xslt_create();
@xslt_set_base($xh, file:// . $valid_base);
// the base is set to the directory of the xsl_file

$xml = @xslt_process($xh, arg:/_xml, arg:/_xsl,  NULL, $arguments);



[2003-09-24 09:41:38] [EMAIL PROTECTED]

Add the php script here too.




[2003-09-24 09:13:44] sparky_industries at mad dot scientist dot com

Description:

if i want to xsl:sort the elements of xsl:for-each and set data-type to
'text' (or drop data-type, which is the same), php crashes (windows
error-popup)!

Reproduce code:
---
XML:
?xml version=1.0 encoding=UTF-8?
root
   names
  namehansi/name
  namebergi/name
  namekrabi/name
  nametali/name
   /names
/root

XSL:
?xml version=1.0 encoding=UTF-8?
xsl:stylesheet version=1.0
xmlns:xsl=http://www.w3.org/1999/XSL/Transform;

xsl:template match=/root
xsl:apply-templates select=names /
/xsl:template

xsl:template match=names
xsl:for-each select=name
xsl:sort select=. order=descending data-type=text /
xsl:value-of select=. /
br /
/xsl:for-each
/xsl:template

/xsl:stylesheet

Expected result:

talibr /
krabibr /
hansibr /
bergibr /




Actual result:
--
PHP crashes ...

if i exclude the xsl:sort instruction, it works !

it also works, when data-type=number (this makes no sense here), but
if i drop it, or set data-type=text php crashes





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


#25647 [Opn-Bgs]: Date functions before 1970, after 2038

2003-09-24 Thread iliaa
 ID:   25647
 Updated by:   [EMAIL PROTECTED]
 Reported By:  jtucker at bsiweb dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Date/time related
 Operating System: Red Hat 9
 PHP Version:  4.3.3
 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

This is a glibc issue not a PHP one. glibc 2.3+ no longer supports
timestamps  1970 as it did before.


Previous Comments:


[2003-09-24 13:33:05] jtucker at bsiweb dot com

Description:

Hi,

We have a very troubling bug after upgrading Red Hat to 9.0 and PHP to
4.33. The problem is many of the date functions do not work with dates
before 1970 or after 2038. This is a result of the posix standard set
by glibc v2.3.

The major problem with this is this makes much of existing PHP code
broken. Red Hat 9 is dependent on this version of glibc, as well as
many libraries associated with PHP. A solution has been provided with
an adodb date library, but this breaks a large amount of existing
scripts including the Pear libraries and many pre-existing
applications.

Many users choices are grim, either lock themselves into earlier
versions of glibc, PHP, Linux, or be fored to update all their code to
use the adodb function calls, along with every application upgrade and
every update to Pear.

I strongly feel that support for date functions with glibc 2.3 should
be included in the next version of PHP. We can't all wait for PHP 5 to
support this functionality. Thank you.

Reproduce code:
---
getdate()
date() 
gmdate()
mktime()
gmmktime()
strtotime()

with any date before 1970 or after 2038 on a system compiled with glibc
2.3.






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


#25616 [Opn-Bgs]: stream-set_blocking() causes unexpected non erroneous exit from script.

2003-09-24 Thread iliaa
 ID:   25616
 Updated by:   [EMAIL PROTECTED]
 Reported By:  robert at interjinn dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Filesystem function related
 Operating System: Linux version 2.4.19-16mdk
 PHP Version:  4.3.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 bug #25575


Previous Comments:


[2003-09-21 10:22:03] robert at interjinn dot com

I just ran it with the -n flag and no change. Still exits seemingly
randomly :(



[2003-09-21 02:44:21] [EMAIL PROTECTED]

Works fine for me..I let your script run for few minutes and it works
just as expected.

Try running it without any php.ini loaded, like this:

# php -n test.php

(-n will make PHP not load any php.ini)




[2003-09-21 01:08:41] robert at interjinn dot com

I have downloaded and compiled the PHP package located at

http://snaps.php.net/php4-STABLE-latest.tar.gz

When I ran the script I got the same result as before. It still exits
successfully when it should be in an infinite loop.



[2003-09-20 17:46:37] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2003-09-20 17:23:27] robert at interjinn dot com

Description:

When I use stream_set_blocking() to make the standard input file handle
non-blocking the script exits seemingly random. For example the $count
output can have a last printed value anywhere from 200 to 3000.

Reproduce code:
---
?
  
if( ($stdin = fopen( 'php://stdin', 'r' )) === false )
{ 
echo 'Failed to open STDIN'.\n;
exit();
}  

stream_set_blocking( $stdin, false );  
   
$count = 0;
while( 1 ) 
{ 
echo 'Count: '.($count++).\n;

if( ($char = fread( $stdin, 1 )) != '' )
{
echo 'Char: '.$char.\n;
}
else
{
echo 'Fooo!'.\n;
}
}


Expected result:

Script should run forever since it is in a while( 1 ) loop. This was
done on purpose for testing purposes. At each pass of the loop it
should print the current $count index, then if data exist in $stdin
then it should print the character, otherwise print Fooo! to the
screen.

Actual result:
--
Script does not run forever. Script exits and the last count printed
can be anywhere from 200 to 3000 -- it seems kind of random. I ran the
script through gdb and gdb indicates that the program (PHP) exits
properly. Thus there is no backtrace to provide.





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


#25568 [Opn-Fbk]: feof is not working correctly with fsockopen

2003-09-24 Thread iliaa
 ID:   25568
 Updated by:   [EMAIL PROTECTED]
 Reported By:  svan at mailgate dot ru
-Status:   Open
+Status:   Feedback
 Bug Type: Filesystem function related
 Operating System: Linux
 PHP Version:  4.3.3
 New Comment:

Please try using this CVS snapshot:

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




Previous Comments:


[2003-09-18 01:28:40] svan at mailgate dot ru

No errors. error_reporting is set to E_ALL



[2003-09-17 19:38:15] [EMAIL PROTECTED]

Do you get any errors? (make sure error_reporting is set to E_ALL and
nothing else)




[2003-09-17 02:38:00] svan at mailgate dot ru

Possible workaround:
$fp = fsockopen(www.xx.xx, 80, $errno, $errstr, 30);
if(!$fp)
   exit;
fputs($fp, GET http://www.xx.xx/CENTER.GIF HTTP/1.0\n\n);
$qStr = ;
while(($tmpStr = fgets($fp, 255))) 
   if($tmpStr == \r\n) break;
   else if( !strncmp($tmpStr, Content-Length:,
strlen(Content-Length:)) ) $len = (int)substr($tmpStr,
strlen(Content-Length:));
while( true  ){
$rrr = stream_get_meta_data( $fp );
if( $rrr['eof'] == 1 ) break;
$qStr.=fread($fp, $len);
if( strlen( $qStr ) = $len ) break;
}
fclose($fp);



[2003-09-17 02:33:41] svan at mailgate dot ru

Description:

End of file is not detect coorectly when stream open with fsockopen().
When I read binary data from such stream the end of file detected
absolutely unexpected and before real end.

Reproduce code:
---
$fp = fsockopen(www.xx.xx, 80, $errno, $errstr, 30);
if(!$fp)
   exit;
fputs($fp, GET http://www.xx.xx/CENTER.GIF HTTP/1.0\n\n);
$qStr = ;
while(($tmpStr = fgets($fp, 255))) 
   if($tmpStr == \r\n) break;
   else if( !strncmp($tmpStr, Content-Length:,
strlen(Content-Length:)) ) $len = (int)substr($tmpStr,
strlen(Content-Length:));
$qStr=fread($fp, $len);
fclose($fp);
=== OR ==
$fp = fsockopen(www.xx.xx, 80, $errno, $errstr, 30);
if(!$fp) exit;
fputs($fp, GET http://www.xx.xx/CENTER.GIF HTTP/1.0\n\n);
$qStr = ;
while(($tmpStr = fgets($fp, 255))) if($tmpStr == \r\n) break;
while( !feof( $fp ) $qStr .= fread($fp, 1);
fclose($fp);


Expected result:

$qStr contain full content of CENTER.GIF

Actual result:
--
$qStr contain cutted content of CENTER.GIF





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


#25648 [Opn-Csd]: XSLT xslt_set_encoding() being detected as incorrectly missing

2003-09-24 Thread sniper
 ID:   25648
 Updated by:   [EMAIL PROTECTED]
 Reported By:  mloftis at wgops dot com
-Status:   Open
+Status:   Closed
 Bug Type: XSLT related
 Operating System: Linux 2.4
 PHP Version:  4.3.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.




Previous Comments:


[2003-09-24 14:59:27] mloftis at wgops dot com

Description:

As per my comment on #24786.  23148, 21427, 20640 may all also be
related.

This is with the current version.

The issue is this, the -ljs and other libs tested earlier by the
config.m4 file ARE NOT used during the calls to check teh Sablot libs
for SetEncoding and GetOptions calls.  Thsi bug STILL exists in 4.3.3
and is the reason why (on my system at atleast) they don't get
compiled
in unless i manually hit main/php_config.h with vi and change the
undef
to #define.







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


#25269 [NoF-Csd]: Output to mail ends with '/html' in mailform

2003-09-24 Thread sniper
 ID:   25269
 Updated by:   [EMAIL PROTECTED]
 Reported By:  otto at wikkelsoe dot dk
-Status:   No Feedback
+Status:   Closed
 Bug Type: Mail related
 Operating System: Windows 2000 Advanced Server
 PHP Version:  4.3.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.




Previous Comments:


[2003-09-24 16:10:07] php at grandriver dot net

I also have encountered this problem with the same config.

Using the text/html content-type and html tables with the mail function
sends emails with missing characters, including the  in /html.  The
character loss otherwise appears random, resulting in invalid tags,
misspellings, etc.



[2003-09-02 18:14:54] [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-08-27 17:25:21] [EMAIL PROTECTED]

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

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

Thank you for your interest in PHP.


And this time, READ the url.




[2003-08-27 06:45:54] otto at wikkelsoe dot dk

Description:

Upgrading from 4.3.2 results in following error:
Output to mail ends with '/html' visibile in mailform.
No errors in the phperror.log.







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


#25293 [Opn-Csd]: Error Reporting to file outputs wrong Windows Newline format

2003-09-24 Thread iliaa
 ID:   25293
 Updated by:   [EMAIL PROTECTED]
 Reported By:  duerra at yahoo dot com
-Status:   Open
+Status:   Closed
 Bug Type: *General Issues
 Operating System: Windows 2000
 PHP Version:  4.3.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.




Previous Comments:


[2003-08-28 09:21:17] duerra at yahoo dot com

Description:

When you turn error reporting on in php and set errors to output to a
file:
error_log = phperrors.txt
When there's a syntax error, php outputs the wrong newline format for
windows (\r\n) to the file, effectively causing all errors in php to
appear on a single line in the text file - with a little rectangle
(unknown character?) where the newline is supposed to be. 

In tests, using \n alone instead of \r\n in Windows when writing to
a file will cause this to happen.  

Reproduce code:
---
?php

echo Syntax error here... no semicolon
//When this is run repeatedly, each error should appear on a new line,
but only appears on one line in the .txt file because of the newline
format
?


Expected result:

[28-Aug-2003 09:17:51] PHP Parse error:  parse error, unexpected '}' in
C:\Documents and Settings\i1add01\Desktop\php\php-4.3.3-Win32\run.php
on line 13
[28-Aug-2003 09:18:05] PHP Parse error:  parse error, unexpected '}' in
C:\Documents and Settings\i1add01\Desktop\php\php-4.3.3-Win32\run.php
on line 13

Actual result:
--
[28-Aug-2003 09:17:51] PHP Parse error:  parse error, unexpected '}' in
C:\Documents and Settings\i1add01\Desktop\php\php-4.3.3-Win32\run.php
on line 13(newline without carriage return here)[28-Aug-2003 09:18:05]
PHP Parse error:  parse error, unexpected '}' in C:\Documents and
Settings\i1add01\Desktop\php\php-4.3.3-Win32\run.php on line 13





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


#25070 [Opn-Csd]: Apache is stopped on intesive session work

2003-09-24 Thread iliaa
 ID:   25070
 Updated by:   [EMAIL PROTECTED]
 Reported By:  akss at plesk dot ru
-Status:   Open
+Status:   Closed
 Bug Type: Session related
 Operating System: Windows
 PHP Version:  4.3.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.




Previous Comments:


[2003-08-25 23:18:08] akss at plesk dot ru

Unfortunatelly i can't give a code. It closed development. And i have
not time now for produce purified test example.

I try to describe

1 Create page with form with 2 input fields login  pass and submit
button (login page).

2 Create auto prepend file with session check. If no session go to
login page.

3 Change session parameters in auto prepend file
ini_set('session.gc_probability', 1-5);
session_save_path('deep 4-5');
ini_set('session.gc_maxlifetime', near 2);

4 On login submit create session. Put to her both parameter login and
pass. If session created (parameters setted) redirect to other pages
with 2-3 frames which check session settings too.

5 Made many quickly switchings over this frames. 1st, 2nd, 3d, again
1st.

6 Apache without patch hangs up.



[2003-08-25 22:02:42] [EMAIL PROTECTED]

I've been trying to reproduce this without luck..can you please give a
simple test case with which you have reproduced this reliably?




[2003-08-20 03:30:03] akss at plesk dot ru

Patch for fix ext/session/mod_files.c on windows:

--- mod_files.c.origTue May 20 20:01:54 2003
+++ mod_files.c Fri Aug 15 05:12:40 2003
@@ -124,6 +124,7 @@
 static void ps_files_close(ps_files *data)
 {
if (data-fd != -1) {
+   flock(data-fd, LOCK_UN);
close(data-fd);
data-fd = -1;
}
@@ -275,8 +276,10 @@
if (data-fd  0)
return FAILURE;

-   if (fstat(data-fd, sbuf))
+  if (fstat(data-fd, sbuf)) {
+flock(data-fd, LOCK_UN);
return FAILURE;
+  }

data-st_size = *vallen = sbuf.st_size;
*val = emalloc(sbuf.st_size);
@@ -287,6 +290,7 @@
lseek(data-fd, 0, SEEK_SET);
n = read(data-fd, *val, sbuf.st_size);
 #endif
+  flock(data-fd, LOCK_UN);

if (n != sbuf.st_size) {
if (n == -1)
@@ -325,6 +329,7 @@
lseek(data-fd, 0, SEEK_SET);
n = write(data-fd, val, vallen);
 #endif
+  flock(data-fd, LOCK_UN);

if (n != vallen) {
if (n == -1)

Other case apache hangs up.



[2003-08-13 04:16:44] akss at plesk dot ru

Description:

php-4.3.2

Windows hangs at frequent references to the pages using the sessions
mechanism. This is because too many locks are created for a session
file sess_xxx.






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


#24394 [Ver-Fbk]: Session feature unusable.

2003-09-24 Thread iliaa
 ID:   24394
 Updated by:   [EMAIL PROTECTED]
 Reported By:  hos dot endre at axelero dot hu
-Status:   Verified
+Status:   Feedback
 Bug Type: Session related
 Operating System: *
 PHP Version:  5CVS-2003-07-24 (dev)
 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-07-07 08:24:55] [EMAIL PROTECTED]

Works 'fine' in PHP_4_3 branch, segfaults with PHP 5:

#0  0x813de25 in fast_call_user_function (function_table=0x81c3338,
object_pp=0x4029b688, function_name=0xbfe021a8, 
retval_ptr_ptr=0xbfe02178, param_count=0, params=0x0,
no_separation=1, symbol_table=0x0, 
function_pointer=0xbfe020b4) at
/usr/src/web/php/php5/Zend/zend_execute_API.c:477
#1  0x813de10 in call_user_function_ex (function_table=0x81c3338,
object_pp=0x4029b688, function_name=0xbfe021a8, 
retval_ptr_ptr=0xbfe02178, param_count=0, params=0x0,
no_separation=1, symbol_table=0x0)
at /usr/src/web/php/php5/Zend/zend_execute_API.c:476
#2  0x80fdd63 in php_var_serialize_intern (buf=0xbfffd024,
struc=0x4029b688, var_hash=0xbfffd030)
at /usr/src/web/php/php5/ext/standard/var.c:555
#3  0x80fe90e in php_var_serialize_intern (buf=0xbfffd024,
struc=0x4029b5a0, var_hash=0xbfffd030)
at /usr/src/web/php/php5/ext/standard/var.c:620
#4  0x80fe90e in php_var_serialize_intern (buf=0xbfffd024,
struc=0x4029b688, var_hash=0xbfffd030)
at /usr/src/web/php/php5/ext/standard/var.c:620
#5  0x80fe90e in php_var_serialize_intern (buf=0xbfffd024,
struc=0x4029b5a0, var_hash=0xbfffd030)
at /usr/src/web/php/php5/ext/standard/var.c:620
#6  0x80fe90e in php_var_serialize_intern (buf=0xbfffd024,
struc=0x4029b688, var_hash=0xbfffd030)
at /usr/src/web/php/php5/ext/standard/var.c:620
.
.
.
.
Frame #6 is repeated couple of thousand times.. :)




[2003-07-06 06:56:32] hos dot endre at axelero dot hu

Okay: The subjected problem was solved by un-double-quoting the
session.save_path and remove the backslash from the end of line.
Anyway, until this the engine was able to create the file. After that I
had to get familiar with the new php_dom exension, which I think is
great, but not documented yet. So then comes a serialization problem:
objects in my project held reference to each other, and the
last-time-workin-good serialization crashed on this extra. Right now I
solved the problem by unbuilding theese references before
serialization, and rebuilding them on wakeup. Now I can test the ZE2
editions new features, thank you for the help!

Also, here is a sample script that doesn't work for me:

?

class a
{
var $b;

function a()
{
$this-b = new b;
}

function setupb()
{
$this-b-setupa($this);
}
}

class b
{
var $a;

function setupa($a)
{
$this-a = $a;
}
}

$a = new a;
$a-setupb();
echo preThis workx!\r\n;
echo serialize($a);

?



[2003-06-30 04:18:01] hos dot endre at dorsum dot hu

I've tryed the test script I provided yesterday on WinNT, Apache
1.3.12, PHP 5.0.0b1 with php4_apache.dll (configured as php5_module in
httpd.conf). Works well. This bug might be XP specific, or it might be
my own system's special. By the way, the XP was configued to use
php4_apache_hooks.dll, becase php4_apache.dll were missing from one of
the downloaded PHP distributions. I'm willing to figure out what the
hell going on with that stuff. I'll be back with further results.



[2003-06-29 20:04:05] [EMAIL PROTECTED]

Does this script work any better:

?php  
  
session_start();   
   
if (!isset($_SESSION[count])) {
$_SESSION['count'] = 1;
} else {
echo $_SESSION['count']++;
}
?





[2003-06-29 19:37:32] hos dot endre at axelero dot hu

Description:

On request shutdown session file is created, but stay locked with zero
size. CPU have no load, and nothing happens. No crash. I've tried older
5CVS bins, and it seems to be an older bug. Serialization and anything
else works well for me. 5.0.0-Beta1 also contains this bug. Leaving out
session_start  session_register. :)

Reproduce code:
---
?
session_start();
if (!isset($HTTP_SESSION_VARS[count]))
{
session_register(count);
$count = $HTTP_SESSION_VARS[count];
$count = 1;
} else
$count = $HTTP_SESSION_VARS[count];
echo $count++;
?



#22526 [Opn-Fbk]: session_start/popen hang

2003-09-24 Thread iliaa
 ID:   22526
 Updated by:   [EMAIL PROTECTED]
 Reported By:  iberry at raxnet dot net
-Status:   Open
+Status:   Feedback
 Bug Type: Session related
 Operating System: Windows 2000
 PHP Version:  4.3.3RC2-dev, 5.0.0b2-dev
 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-07-24 21:14:35] iberry at raxnet dot net

Not sure if my feedback is required or not but I was able to reproduce
the same problem using the latest PHP5 build under Windows 2000.



[2003-07-12 23:42:45] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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

And update the version if this still happens.




[2003-06-24 03:33:56] marcus at quintic dot co dot uk

I have exactly the same problem with fopen+fpassthru instead of popen
(just filed a bug that got closed as a duplicate #24295) on Windows XP.
It makes session-based authentication next to useless for an app we are
developing. CGI does not cure it, neither does disabling the trans_sid.
The bug is apparent in 4.2.x and upwards in our case (on Apache 1.3.27)



[2003-06-06 11:03:10] mobrien at milleker dot org

Same problem observed in 4.3.2 on Win2K with Apache 1.3.1

Benny - Read the section in the install.txt about running in CGI mode
(if you have not already): this is a completely unacceptable situation
for production environments, IMO.



[2003-06-02 06:21:56] bbubble622 at yahoo dot com

Finally I was able to switch to CGI based PHP.
Although it is (very) slow, it gives the right results !

-benny



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

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


#25644 [Opn-Fbk]: xsl:sort with data-type='text' ... php crashes

2003-09-24 Thread sniper
 ID:   25644
 Updated by:   [EMAIL PROTECTED]
 Reported By:  sparky_industries at mad dot scientist dot com
-Status:   Open
+Status:   Feedback
 Bug Type: XSLT related
 Operating System: Windows 98
 PHP Version:  4.3.3
 New Comment:

Works fine in Linux too. Are you sure you just don't have some old xslt
related dll in your win98 machine?



Previous Comments:


[2003-09-24 16:13:10] sparky_industries at mad dot scientist dot com

Operating System:

i tried the same script (same configuration of apache2 and php) on
windows XP - IT WORKES !!!

so it has to do something with the operating system!



[2003-09-24 16:11:19] sparky_industries at mad dot scientist dot com

according to php script:

i would like to add the php script, but it is totally integrated into a
big framework, so it would not make sense to extract a few code-lines.

but it works like that:


$xml = function-to-generate-xml-document();
// xml-document is both WELLFORMED and VALID, i really checked that!

$xsl = implode(, file($xslfile));

$arguments = array
(   
   /_xml = $xml,
   /_xsl = $xsl
);

$xh = xslt_create();
@xslt_set_base($xh, file:// . $valid_base);
// the base is set to the directory of the xsl_file

$xml = @xslt_process($xh, arg:/_xml, arg:/_xsl,  NULL, $arguments);



[2003-09-24 09:41:38] [EMAIL PROTECTED]

Add the php script here too.




[2003-09-24 09:13:44] sparky_industries at mad dot scientist dot com

Description:

if i want to xsl:sort the elements of xsl:for-each and set data-type to
'text' (or drop data-type, which is the same), php crashes (windows
error-popup)!

Reproduce code:
---
XML:
?xml version=1.0 encoding=UTF-8?
root
   names
  namehansi/name
  namebergi/name
  namekrabi/name
  nametali/name
   /names
/root

XSL:
?xml version=1.0 encoding=UTF-8?
xsl:stylesheet version=1.0
xmlns:xsl=http://www.w3.org/1999/XSL/Transform;

xsl:template match=/root
xsl:apply-templates select=names /
/xsl:template

xsl:template match=names
xsl:for-each select=name
xsl:sort select=. order=descending data-type=text /
xsl:value-of select=. /
br /
/xsl:for-each
/xsl:template

/xsl:stylesheet

Expected result:

talibr /
krabibr /
hansibr /
bergibr /




Actual result:
--
PHP crashes ...

if i exclude the xsl:sort instruction, it works !

it also works, when data-type=number (this makes no sense here), but
if i drop it, or set data-type=text php crashes





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


#25649 [NEW]: feof behavior changed - inconsistent!

2003-09-24 Thread lew at mailduct dot com
From: lew at mailduct dot com
Operating system: FreeBSD 4.8-RELEASE
PHP version:  4.3.3
PHP Bug Type: Filesystem function related
Bug description:  feof behavior changed - inconsistent!

Description:

The behavior of feof has changed with the newer versions of PHP (4.1.1
exhibited different behavior).  I believe 4.3.X has a problem with how it
handles feof under FreeBSD.

For example, suppose I want to tail a logfile that keeps growing, such
as maillog or even httpd-access.log.  In the old PHP, once I reached
the end of file, feof would become true.  If a process *added* to the
file, then feof would become false until I read to the end of the file
again.  This is consistent with tail behavior.  Under the new PHP
(4.3.X), once feof becomes true, it *never* goes false again.  Thus, it
is *impossible* to tail a file!!

Reproduce code:
---
?php

$fh = fopen( '/var/log/maillog' );

//  Endless loop, for testing purposes
while( TRUE ) {

  //  Perform a tail on a growing logfile
  while( !feof($fh) ) {
$log = fgets( $fh,512 );
print( $log );
  }

  //  We've hit the end, until more data ready
  print( EOF detected... sleeping\n );
  sleep( 1 );
}

?

Expected result:

I expect to see all the lines contained in maillog until we hit the EOF. 
Then I expect to see the EOF detected until more lines are added to
maillog via another process.  At that point, I expect to see the new lines
of data until we hit the new EOF point again.

If I replace fopen with popen like this:
  $fh = popen( 'tail -f /var/log/maillog','r' );
then it works.  But I shouldn't have to spawn off a tail to do what the
older 4.1.X version of PHP used to do.  Someone has changed something in
how EOF is detected (and reset). 

Can you please see if you can find the cause of this.

Thank you for listening.



Actual result:
--
test line 1
test line 2
test line 3
EOF detected... sleeping
EOF detected... sleeping
EOF detected... sleeping
... forever ...
EOF detected... sleeping

(even though maillog continues to have more lines appended to it, either
through a daemon or a simple cat more.txt  /var/log/maillog ).


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


#25649 [Opn]: feof behavior changed - inconsistent!

2003-09-24 Thread lew at mailduct dot com
 ID:   25649
 User updated by:  lew at mailduct dot com
 Reported By:  lew at mailduct dot com
 Status:   Open
 Bug Type: Filesystem function related
 Operating System: FreeBSD 4.8-RELEASE
 PHP Version:  4.3.3
 New Comment:

My typo.  Make that:  $fh = fopen( '/var/log/maillog','r' );


Previous Comments:


[2003-09-24 20:12:15] lew at mailduct dot com

Description:

The behavior of feof has changed with the newer versions of PHP
(4.1.1 exhibited different behavior).  I believe 4.3.X has a problem
with how it handles feof under FreeBSD.

For example, suppose I want to tail a logfile that keeps growing,
such as maillog or even httpd-access.log.  In the old PHP, once I
reached the end of file, feof would become true.  If a process
*added* to the file, then feof would become false until I read to the
end of the file again.  This is consistent with tail behavior.  Under
the new PHP (4.3.X), once feof becomes true, it *never* goes false
again.  Thus, it is *impossible* to tail a file!!

Reproduce code:
---
?php

$fh = fopen( '/var/log/maillog' );

//  Endless loop, for testing purposes
while( TRUE ) {

  //  Perform a tail on a growing logfile
  while( !feof($fh) ) {
$log = fgets( $fh,512 );
print( $log );
  }

  //  We've hit the end, until more data ready
  print( EOF detected... sleeping\n );
  sleep( 1 );
}

?

Expected result:

I expect to see all the lines contained in maillog until we hit the
EOF.  Then I expect to see the EOF detected until more lines are
added to maillog via another process.  At that point, I expect to see
the new lines of data until we hit the new EOF point again.

If I replace fopen with popen like this:
  $fh = popen( 'tail -f /var/log/maillog','r' );
then it works.  But I shouldn't have to spawn off a tail to do what the
older 4.1.X version of PHP used to do.  Someone has changed something
in how EOF is detected (and reset). 

Can you please see if you can find the cause of this.

Thank you for listening.



Actual result:
--
test line 1
test line 2
test line 3
EOF detected... sleeping
EOF detected... sleeping
EOF detected... sleeping
... forever ...
EOF detected... sleeping

(even though maillog continues to have more lines appended to it,
either through a daemon or a simple cat more.txt  /var/log/maillog
).






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


#3920 [Com]: core on start (PHP Warning: Function registration failed - duplicate name)

2003-09-24 Thread barryrs at yahoo dot com
 ID:   3920
 Comment by:   barryrs at yahoo dot com
 Reported By:  carlos dot dias at emerging-trade dot pt
 Status:   Closed
 Bug Type: Reproducible Crash
 Operating System: Linux RH
 PHP Version:  4.0 Beta 4 Patch Level 1
 New Comment:

Re: PHP Warning:  Function registration failed - duplicate name

I ran into this same problem while installing Horde, Imp and Pear.
RedHat 9.0 Apache 2.? Here was my solution:

/etc/php.ini (carries the following lines)
;Linux world
;
;extension=imap.so
;extension=ldap.so
;extension=mysql.so
;extension=odbc.so
;extension=pgsql.so
;extension=snmp.so
;extension=dbg.so

/etc/php.d (essentially carries the same lines)

I simply commented out the lines from /etc/php.ini
and restarted the server. No more errors. 

Hope to have helped!


Previous Comments:


[2000-07-30 12:19:03] [EMAIL PROTECTED]

Please try a recent release of PHP.  If the problem re-occurs, please
submit a new bug report.  Thank you



[2000-03-24 18:38:44] carlos dot dias at emerging-trade dot pt

Instalation of php4 looks fine with

./configure --with-apxs=/usr/local/apache/bin/apxs
--with-config-file-path=/usr/local/apache --with-oracle=/oracle/8.1.5
--enable-trans-id --without-gd
--enable-versioning

AFter instalation, the httpd cores on start. the backtrace is:

#0  0x406a867f in sapi_apache_send_headers (sapi_headers=0x4072fd28) at
mod_php4.c:227
#1  0x406824fb in sapi_send_headers () at SAPI.c:340
#2  0x406d58f9 in php_header () at head.c:86
#3  0x406ef6f1 in php_ub_body_write (str=0x406fad4a , str_length=0)
at output.c:348
#4  0x406ef370 in php_body_write (str=0x406fad4a , str_length=0) at
output.c:139
#5  0x4067bb75 in php_error (type=32, format=0x40701e00 Function
registration failed - duplicate name - %s) at main.c:395
#6  0x4069d8eb in zend_register_functions (functions=0x40226cc4,
function_table=0x0) at zend_API.c:766
#7  0x4069d9e0 in zend_register_module (module=0x40227620) at
zend_API.c:808
#8  0x4069d78a in zend_startup_module (module=0x40227620) at
zend_API.c:706
#9  0x4067c2dc in php_startup_extensions (ptr=0x4071a258, count=23) at
main.c:723
#10 0x4067cd1d in php_startup_internal_extensions () at
internal_functions.c:98
#11 0x4067c541 in php_module_startup (sf=0x4071a8c0) at main.c:865
#12 0x406a8798 in php_apache_startup (sapi_module=0x4071a8c0) at
mod_php4.c:266
#13 0x406a9089 in php_init_handler (s=0x80ad0e4, p=0x80ad0bc) at
mod_php4.c:641
#14 0x8056229 in ap_init_modules ()
#15 0x806008d in main ()
#16 0x4007ecb3 in __libc_start_main (main=0x805fd6c main, argc=1,
argv=0xbc94, init=0x804e884 _init, fini=0x8093d6c _fini,
rtld_fini=0x4000a350 _dl_fini, stack_end=0xbc8c) at
../sysdeps/generic/libc-start.c:78




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


#22526 [Fbk-Opn]: session_start/popen hang

2003-09-24 Thread iberry at raxnet dot net
 ID:   22526
 User updated by:  iberry at raxnet dot net
 Reported By:  iberry at raxnet dot net
-Status:   Feedback
+Status:   Open
 Bug Type: Session related
 Operating System: Windows 2000
 PHP Version:  4.3.3RC2-dev, 5.0.0b2-dev
 New Comment:

I tried both php4-win32-STABLE-200309250030 and
php5-win32-200309242230. Both still accuratly produce the same bug.


Previous Comments:


[2003-09-24 19:39:15] [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-07-24 21:14:35] iberry at raxnet dot net

Not sure if my feedback is required or not but I was able to reproduce
the same problem using the latest PHP5 build under Windows 2000.



[2003-07-12 23:42:45] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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

And update the version if this still happens.




[2003-06-24 03:33:56] marcus at quintic dot co dot uk

I have exactly the same problem with fopen+fpassthru instead of popen
(just filed a bug that got closed as a duplicate #24295) on Windows XP.
It makes session-based authentication next to useless for an app we are
developing. CGI does not cure it, neither does disabling the trans_sid.
The bug is apparent in 4.2.x and upwards in our case (on Apache 1.3.27)



[2003-06-06 11:03:10] mobrien at milleker dot org

Same problem observed in 4.3.2 on Win2K with Apache 1.3.1

Benny - Read the section in the install.txt about running in CGI mode
(if you have not already): this is a completely unacceptable situation
for production environments, IMO.



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

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


#25575 [Com]: stream_set_blocking with STDIN doesnt block

2003-09-24 Thread robert at interjinn dot com
 ID:   25575
 Comment by:   robert at interjinn dot com
 Reported By:  bill at baghead dot co dot uk
 Status:   Open
 Bug Type: Sockets related
 Operating System: Redhat 9
 PHP Version:  4CVS-2003-09-17 (stable)
 New Comment:

I've been directed here from bug #25616 with the indication that this
is the same bug. I read this bug before I posted bug #25616 and the
issues seems different. This one describes an issue with blocking mode,
my bug describes an issue whith the script exitting successfully while
in an infinite loop, which is contrary to the expected functionality of
a while( 1 ) loop. I'm not sure why I was pointed here. Albeit my bug
seemed to come into existence with the use of stream_set_blocking(
$stdin, FALSE )


Previous Comments:


[2003-09-18 04:15:44] bill at baghead dot co dot uk

The case is with the original code stated, the code loops, and does not
block on the fread - ie, it keeps returning instantly (even with
nothing), which seems to me to be non blocking eventhough I'd told it
to block..

If I remove the stream_set_blocking(STDIN,TRUE); altogether, fread
appears to block - but instead of returning after receiving a block of
data, it blocks until the buffer is filled up (in this case being 128
bytes) - *then* it returns..



[2003-09-17 18:37:38] [EMAIL PROTECTED]

What you have just described is blocking IO, and that is precisely what
I'd expect to happen when reading from STDIN.

Now, when reading from a socket, you would expect the call to return at
the end of a packet, but php doesn't yet have any idea that stdin is a
socket, and that sounds like the cause of your problems.

Can you confirm that this is the case, as your more recent comments
don't seem to match up to your original report?



[2003-09-17 18:35:41] [EMAIL PROTECTED]

Comment sent from user by mail;
please don't mail people directly; keep all info related to the bug in
the database unless requested to do otherwise.

--
What exactly was the workaround?

I did try removing the statement, and it kept reading the STDIN with
the
fread until the amount, in this case being 128 bytes is filled, rather
than
taking it to the end of the packet...




[2003-09-17 13:14:14] [EMAIL PROTECTED]

Will you please try the workaround I suggested?
I'm not saying it isn't a bug, I'm just suggesting something that might
help get your script working in the time it takes for this bug to get
fixed.



[2003-09-17 12:49:37] bill at baghead dot co dot uk

Surely it wouldnt matter if xinetd opened the socket blocking or
non-blocking, as the script opens STDIN which needs to be blocking
as php is talking to stdin, *not* the socket directly..



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

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


#25567 [Bgs]: The specified CGI application misbehaved by not returning a complete set of HTT

2003-09-24 Thread alex dot baron at tusk dot com dot au
 ID:   25567
 User updated by:  alex dot baron at tusk dot com dot au
 Reported By:  alex dot baron at tusk dot com dot au
 Status:   Bogus
 Bug Type: IIS related
 Operating System: Windows XP
 PHP Version:  4.3.3
 New Comment:

Well thanks For you help... not

Anyway the issue lies with using microsft proxy client on the machine
hosting the pages. This causes a CGI Header error. Removing the proxy
client fixes the issue but prvents the developer from being able to
access the outside via proxy.

I hope this helps other people.

A


Previous Comments:


[2003-09-18 03:58:05] alex dot baron at tusk dot com dot au

Sorry where are the error logs located?

thanks
A



[2003-09-18 03:28:31] [EMAIL PROTECTED]

That's access log, check the error log..




[2003-09-17 20:03:49] alex dot baron at tusk dot com dot au

#Software: Microsoft Internet Information Services 5.1
Here are some more.

#Version: 1.0
#Date: 2003-09-18 00:01:42
#Fields: time c-ip cs-method cs-uri-stem sc-status 
00:01:42 192.168.0.45 GET /news/style.css 304
00:01:42 192.168.0.45 GET /news/admin/images/poweredbymysql.gif 304
00:01:42 192.168.0.45 GET /news/admin/newslisting.php 200

just thought the 200 might be important.

Thanks Heaps
A



[2003-09-17 19:52:17] alex dot baron at tusk dot com dot au

Cool From C:\WINDOWS\system32\Logfiles\W3SVC1

These entries are me using that app this morning.

23:49:13 192.168.0.45 GET /news/admin/ 302
23:49:13 192.168.0.45 GET /news/admin/ 302
23:49:15 192.168.0.45 GET /news/admin/index.php 200
23:49:15 192.168.0.45 GET /news/admin/index.php 200
23:49:15 192.168.0.45 GET /news/style.css 304
23:49:15 192.168.0.45 GET /news/admin/images/poweredbymysql.gif 304
23:49:17 192.168.0.45 GET /news/admin/newslisting.php 200
23:49:21 192.168.0.45 GET /news/admin/DBdeletenews.php 200
23:50:13 192.168.0.45 GET /news/admin/createnews.php 200
23:50:13 192.168.0.45 GET /news/admin/popup.js 304
23:50:14 192.168.0.45 POST /news/admin/DBcreatenews.php 302
23:50:14 192.168.0.45 GET /news/admin/newslisting.php 502

is that what you are looking for?

Thanks
A



[2003-09-17 05:58:12] [EMAIL PROTECTED]

I meant your webserver's logs..




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

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


#24028 [Com]: Reading raw post message by php://input

2003-09-24 Thread me at mail dot com
 ID:   24028
 Comment by:   me at mail dot com
 Reported By:  xiongwei at aerafront dot com
 Status:   Closed
 Bug Type: CGI related
 Operating System: win32 only
 PHP Version:  4.3.2
 New Comment:

I found this in a news group and decided to try it. A little while
back, 
I was browsing through news groups, just like you are now and came 
across a message just like this, that said you could make thousands of

dollars within weeks with only an initial investment of $6.00!!! 

So I thought yeah right, this must be a scam!!! But like most of us, I

was curious, so I kept reading. Anyway, it said that you send $1.00 to

each of the 6 names and addresses stated in the message. You then place

your own name and address at the bottom of the list at #6 and post the

message in at least 200 news groups. (There are thousands). No catch, 
that was it. 

So after thinking it over, and talking to a few people first. I thought

about trying it. I figured, what have I got to lose except 6 stamps and

$6.00, right? So I invested the measly $6.00!!! Guess what? Within 7 
days I started getting money in the mail!!! I was shocked!!! I figured

it would end soon, but the money just kept coming in!!! In my first 
week, I had made about $25.00. By the end of the second week, I had
made 
a total of over $1,000.00!!! In the third week, I had over $10,000.00 
and it is still growing!!! This is now my fourth week and I have made a

total of just over $42,000.00 and it is still coming in rapidly!!! It's

certainly worth $6.00 and 6 stamps!!! I have spent more than that on
the 
Lottery!!! 

Let me tell you how this works and most importantly, why it works!!! 
Also, make sure you 
print a copy of this message now. So you can get the information off of

it as you need it. I promise you that if you follow the directions 
exactly, that you will start making more money than you thought
possible 
by doing something so easy!!! 

Suggestion: Read this entire message carefully!!! (Print it out or 
download it.) Follow the simple directions and watch the money come 
in!!! It's easy!!! It's legal!!! Your investment is only $6.00 (plus 
postage). 

IMPORTANT: This is not a rip-off!!! It is not 
illegal!!! ? It is almost entirely risk free and it really works!!! If

all of the following instructions are adhered to, you will receive 
extraordinary dividends!!! 

Please note: Follow these directions EXACTLY, and $60,000.00 or more
can 
be yours in 20 to 90 days!!! This program remains successful because of

the honesty and the integrity of the participants!!! Please continue
its 
success by carefully adhering to the instructions. 

You will now become part of the mail order business. In this business 
your product is not solid or tangible, it is a service. You are in the

business of developing mailing lists. Many large corporations are happy

to pay big bucks for 
quality lists. However, the money made from a mailing list is secondary

to the income which is made from people like you and me asking to be 
included on your mailing list!!! 

Here are the 4 easy steps to success: 

Step 1: Get 6 separate pieces of paper and write the following on each

piece of paper. 

PLEASE PUT ME ON YOUR MAILING LIST 

Now get 6 U.S. dollar bills and place ONE inside each of the 6 pieces
of 
paper so the bills will not be seen through the envelopes (to prevent 
mail theft). Next, place one paper in each of the 6 envelopes and seal

them, you should now have 6 sealed envelopes. Each with a piece of
paper 
stating the above phrase, your name and address, and a $1.00 bill. 
THIS IS ABSOLUTELY LEGAL!!! YOU ARE REQUESTING A LEGITIMATE SERVICE AND

YOU ARE PAYING FOR IT!!! 

Like most of us, I was a little skeptical and a little worried about
the 
legal aspect of it all. So I checked it out with the U.S. Postal
Service 
and they confirmed that it is indeed legal!!! 

Mail the 6 envelopes to the following addresses: 


R.Somerville 
2507-A Cypress Ln 
CEDAR PARK, TX 78613 
USA 

J.J. Maxey 
355 N. Manila Ave 
Fresno, Ca 93727 
USA 

Kyle Pate 
P.O. Box 2046 
Great Falls, MT 59403-2046 
USA 

Reggie Huffman 
P.O. Box 45914
Oklahoma City, OK 73145 
USA 

PS Jackson 
35 Princess Street 
Gananoque, ON K7G 2N2 
CANADA 

K.G. Christophe
50 Belhurst Lane
Willingboro, NJ 08046
USA

Step 2: Now take the #1 name off the list that you see above, move the

other names up (6 becomes 5, 5 becomes 4, etc.) and add your name as 
number 6 on the list. 

Step 3: Change anything you need to, but try to keep this message as 
close to what you see as possible. Now, post your amended message to at

least 200 news groups. I think there are close to 24,000 groups!!! All

you need is 200, but remember, the more you post, the more money you 
make!!! This is perfectly legal!! If you have any doubts, refer to 
Title18 sec. 1302  1341 of the postal lottery laws. Keep a copy of 
these steps for yourself and whenever you need money, you can use it 
again.