#21092 [NEW]: No $_SESSION[] data saved

2002-12-19 Thread jeanfrederic
From: [EMAIL PROTECTED]
Operating system: Windows XP
PHP version:  4.2.3
PHP Bug Type: Session related
Bug description:  No $_SESSION[] data saved

I'm just wondering, why this code is not working



under Windows XP + Php 4.2.3 + Apache 1.3.24

session_start() return TRUE, and the session file is created with the
correct content, but this content stay at value 0 for 'toto' between
pages.

I have tried the same thing under linux... same issue...

Php Config :


Session Support enabled 

session.auto_start Off
session.cache_expire 180
session.cache_limiter nocache
session.cookie_domain no value
session.cookie_lifetime 0 
session.cookie_path / 
session.cookie_secure Off
session.entropy_file no value
session.entropy_length 0
session.gc_maxlifetime 1440
session.gc_probability 1 
session.name PHPSESSID
session.referer_check no value
session.save_handler files
session.save_path C:\winxp\temp
session.serialize_handler php
session.use_cookies On
session.use_trans_sid 0

Regards,

Jean-Frederic

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




#21093 [NEW]: PHPSESSID not being added to form action="" if input type="image" used

2002-12-19 Thread jc
From: [EMAIL PROTECTED]
Operating system: Red Hat Linux 7.2
PHP version:  4.2.3
PHP Bug Type: Session related
Bug description:  PHPSESSID not being added to form action="" if input type="image" 
used

I have session.auto_start = 1 in my php.ini. I find that the SID is not
being added to a form's action="" value if the form contains a  tag ...

This is a serious bug as it causes sessions to be lost if  buttons are used in a form.

Pasted below is the output of PHP for one of my page swhere I use a form
and in it there is an  tag. As you can see the SID is
added to the src="" of the image but not to the action="" field of the
form, where I believe it is the right place to put it ...

Jc






  
   
   
  
  Ì´Ãæ¤Ë¤Ê¤Ã¤Æ¸«¤Þ¤·¤¿¡£¤½¤ó¤Ê´¶Æ°¤ò¤¢¤Ê¤¿¤â¥«¥¹¥¿¥Þ¡¼¥ì¥Ó¥å¡¼¤Ø½ñ¤­¹þ¤ß¤Þ¤»¤ó¤«¡©¥«¥¹¥¿¥Þ¡¼¥ì¥Ó¥å¡¼¤Ç¤Ï¥æ¡¼¥¶¡¼¤ÎÀ¸¤ÎÈ¿±þ¤ò¤ªÅÁ¤¨¤¤¤¿¤·¤Þ¤¹¡£

  
 



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




#21092 [Com]: No $_SESSION[] data saved

2002-12-19 Thread jeanfrederic
 ID:   21092
 Comment by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Open
 Bug Type: Session related
 Operating System: Windows XP
 PHP Version:  4.2.3
 New Comment:

I have added 

echo "click here";

in order to try to pass info in URL in case of cookie issue, and SID
return... nothing... but !

echo "sessionid = ".session_id()."";
echo "sessionid = ".session_name()."";

return correct session id and correct session name !

So in order to replace the not working SID, I put

echo "click here";

Now the URL is showing the correct information, but still not working
for $_SESSION['toto'].

Jean-Frederic


Previous Comments:


[2002-12-19 03:26:50] [EMAIL PROTECTED]

I'm just wondering, why this code is not working



under Windows XP + Php 4.2.3 + Apache 1.3.24

session_start() return TRUE, and the session file is created with the
correct content, but this content stay at value 0 for 'toto' between
pages.

I have tried the same thing under linux... same issue...

Php Config :


Session Support enabled 

session.auto_start Off
session.cache_expire 180
session.cache_limiter nocache
session.cookie_domain no value
session.cookie_lifetime 0 
session.cookie_path / 
session.cookie_secure Off
session.entropy_file no value
session.entropy_length 0
session.gc_maxlifetime 1440
session.gc_probability 1 
session.name PHPSESSID
session.referer_check no value
session.save_handler files
session.save_path C:\winxp\temp
session.serialize_handler php
session.use_cookies On
session.use_trans_sid 0

Regards,

Jean-Frederic





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




#21092 [Opn->Bgs]: No $_SESSION[] data saved

2002-12-19 Thread derick
 ID:   21092
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Bogus
 Bug Type: Session related
 Operating System: Windows XP
 PHP Version:  4.2.3
 New Comment:

Of course...

if $_SESSION['toto'] is 0 then

if (!$_SESSION['toto']) $_SESSION['toto'] = 0
will evaluate to:

if (!0) $_SESSION['toto'] = 0;
which is:

if (TRUE) $_SESSION['toto'] = 0;

so it will always reset the session variable to 0.

Not a bug -> bogus



Previous Comments:


[2002-12-19 03:41:55] [EMAIL PROTECTED]

I have added 

echo "click here";

in order to try to pass info in URL in case of cookie issue, and SID
return... nothing... but !

echo "sessionid = ".session_id()."";
echo "sessionid = ".session_name()."";

return correct session id and correct session name !

So in order to replace the not working SID, I put

echo "click here";

Now the URL is showing the correct information, but still not working
for $_SESSION['toto'].

Jean-Frederic



[2002-12-19 03:26:50] [EMAIL PROTECTED]

I'm just wondering, why this code is not working



under Windows XP + Php 4.2.3 + Apache 1.3.24

session_start() return TRUE, and the session file is created with the
correct content, but this content stay at value 0 for 'toto' between
pages.

I have tried the same thing under linux... same issue...

Php Config :


Session Support enabled 

session.auto_start Off
session.cache_expire 180
session.cache_limiter nocache
session.cookie_domain no value
session.cookie_lifetime 0 
session.cookie_path / 
session.cookie_secure Off
session.entropy_file no value
session.entropy_length 0
session.gc_maxlifetime 1440
session.gc_probability 1 
session.name PHPSESSID
session.referer_check no value
session.save_handler files
session.save_path C:\winxp\temp
session.serialize_handler php
session.use_cookies On
session.use_trans_sid 0

Regards,

Jean-Frederic





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




#21092 [Com]: No $_SESSION[] data saved

2002-12-19 Thread JeanFrederic
 ID:   21092
 Comment by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Bogus
 Bug Type: Session related
 Operating System: Windows XP
 PHP Version:  4.2.3
 New Comment:

Sorry, you're right... but in fact in my script example I missed a
part, the correct used script is

if (!isset($_SESSION['toto'])) $_SESSION['toto']=0;

Sorry for confusion... (why I didn't used copy&paste ? :-))

Jean-Frederic


Previous Comments:


[2002-12-19 03:47:44] [EMAIL PROTECTED]

Of course...

if $_SESSION['toto'] is 0 then

if (!$_SESSION['toto']) $_SESSION['toto'] = 0
will evaluate to:

if (!0) $_SESSION['toto'] = 0;
which is:

if (TRUE) $_SESSION['toto'] = 0;

so it will always reset the session variable to 0.

Not a bug -> bogus




[2002-12-19 03:41:55] [EMAIL PROTECTED]

I have added 

echo "click here";

in order to try to pass info in URL in case of cookie issue, and SID
return... nothing... but !

echo "sessionid = ".session_id()."";
echo "sessionid = ".session_name()."";

return correct session id and correct session name !

So in order to replace the not working SID, I put

echo "click here";

Now the URL is showing the correct information, but still not working
for $_SESSION['toto'].

Jean-Frederic



[2002-12-19 03:26:50] [EMAIL PROTECTED]

I'm just wondering, why this code is not working



under Windows XP + Php 4.2.3 + Apache 1.3.24

session_start() return TRUE, and the session file is created with the
correct content, but this content stay at value 0 for 'toto' between
pages.

I have tried the same thing under linux... same issue...

Php Config :


Session Support enabled 

session.auto_start Off
session.cache_expire 180
session.cache_limiter nocache
session.cookie_domain no value
session.cookie_lifetime 0 
session.cookie_path / 
session.cookie_secure Off
session.entropy_file no value
session.entropy_length 0
session.gc_maxlifetime 1440
session.gc_probability 1 
session.name PHPSESSID
session.referer_check no value
session.save_handler files
session.save_path C:\winxp\temp
session.serialize_handler php
session.use_cookies On
session.use_trans_sid 0

Regards,

Jean-Frederic





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




#21094 [NEW]: set_error_handler not accepting methods

2002-12-19 Thread tater
From: [EMAIL PROTECTED]
Operating system: OS X 10.2
PHP version:  4CVS-2002-12-19 (dev)
PHP Bug Type: Zend Engine 2 problem
Bug description:  set_error_handler not accepting methods

The set_error_handler() function is not accepting class methods as of the
php4-ze2 CVS code from 19-Dec-2002.
It does work with php 4.3 and ZE1.
-- 
Edit bug report at http://bugs.php.net/?id=21094&edit=1
-- 
Try a CVS snapshot: http://bugs.php.net/fix.php?id=21094&r=trysnapshot
Fixed in CVS:   http://bugs.php.net/fix.php?id=21094&r=fixedcvs
Fixed in release:   http://bugs.php.net/fix.php?id=21094&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=21094&r=needtrace
Try newer version:  http://bugs.php.net/fix.php?id=21094&r=oldversion
Not developer issue:http://bugs.php.net/fix.php?id=21094&r=support
Expected behavior:  http://bugs.php.net/fix.php?id=21094&r=notwrong
Not enough info:http://bugs.php.net/fix.php?id=21094&r=notenoughinfo
Submitted twice:http://bugs.php.net/fix.php?id=21094&r=submittedtwice
register_globals:   http://bugs.php.net/fix.php?id=21094&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=21094&r=php3
Daylight Savings:   http://bugs.php.net/fix.php?id=21094&r=dst
IIS Stability:  http://bugs.php.net/fix.php?id=21094&r=isapi




#21092 [Bgs->Csd]: No $_SESSION[] data saved

2002-12-19 Thread jeanfrederic
 ID:   21092
 User updated by:  [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Bogus
+Status:   Closed
 Bug Type: Session related
 Operating System: Windows XP
 PHP Version:  4.2.3
 New Comment:

I found the issue... it was (it seems) a mixed between Php 4.2.3 and
4.3RC0 that made a mess... I'have completely delete Php directory and
re-install 4.2.3, and now it is working fine...

Sorry for the trouble if I cause any...

Jean-Frederic


Previous Comments:


[2002-12-19 03:53:14] [EMAIL PROTECTED]

Sorry, you're right... but in fact in my script example I missed a
part, the correct used script is

if (!isset($_SESSION['toto'])) $_SESSION['toto']=0;

Sorry for confusion... (why I didn't used copy&paste ? :-))

Jean-Frederic



[2002-12-19 03:47:44] [EMAIL PROTECTED]

Of course...

if $_SESSION['toto'] is 0 then

if (!$_SESSION['toto']) $_SESSION['toto'] = 0
will evaluate to:

if (!0) $_SESSION['toto'] = 0;
which is:

if (TRUE) $_SESSION['toto'] = 0;

so it will always reset the session variable to 0.

Not a bug -> bogus




[2002-12-19 03:41:55] [EMAIL PROTECTED]

I have added 

echo "click here";

in order to try to pass info in URL in case of cookie issue, and SID
return... nothing... but !

echo "sessionid = ".session_id()."";
echo "sessionid = ".session_name()."";

return correct session id and correct session name !

So in order to replace the not working SID, I put

echo "click here";

Now the URL is showing the correct information, but still not working
for $_SESSION['toto'].

Jean-Frederic



[2002-12-19 03:26:50] [EMAIL PROTECTED]

I'm just wondering, why this code is not working



under Windows XP + Php 4.2.3 + Apache 1.3.24

session_start() return TRUE, and the session file is created with the
correct content, but this content stay at value 0 for 'toto' between
pages.

I have tried the same thing under linux... same issue...

Php Config :


Session Support enabled 

session.auto_start Off
session.cache_expire 180
session.cache_limiter nocache
session.cookie_domain no value
session.cookie_lifetime 0 
session.cookie_path / 
session.cookie_secure Off
session.entropy_file no value
session.entropy_length 0
session.gc_maxlifetime 1440
session.gc_probability 1 
session.name PHPSESSID
session.referer_check no value
session.save_handler files
session.save_path C:\winxp\temp
session.serialize_handler php
session.use_cookies On
session.use_trans_sid 0

Regards,

Jean-Frederic





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




#21076 [Fbk->Opn]: ODBC_TABLES and ODBC_COLUMNS cannot be called together

2002-12-19 Thread heyjohnlim
 ID:   21076
 User updated by:  [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Feedback
+Status:   Open
 Bug Type: ODBC related
 Operating System: Win2000, IIS-CGI
 PHP Version:  4.2.3
 New Comment:

yes it still happens with 4.3.0 rc3.

Regards, John


Previous Comments:


[2002-12-18 14:00:48] [EMAIL PROTECTED]

Can you please try one of the RCs?



[2002-12-18 07:54:50] [EMAIL PROTECTED]

The following code:
";
print "ODBC_Tables"; 
$trs = odbc_tables($conn); 
odbc_free_result($trs);
print "ODBC_Columns"; 
$colrs = odbc_columns($conn); 
odbc_free_result($colrs);
print "Done";
?>

Will generate the output:

Connected 
ODBC_Tables
ODBC_Columns

Warning: SQL error: , SQL state 0 in SQLColumns in
d:\inetpub\wwwroot\php\hs~a.php on line 10

Warning: odbc_free_result(): supplied argument is not a valid ODBC
result resource in d:\inetpub\wwwroot\php\hs~a.php on line 11
Done

However, the following code with odbc_tables commented out:

";
/*print "ODBC_Tables"; 
$trs = odbc_tables($conn); 
odbc_free_result($trs);*/
print "ODBC_Columns"; 
$colrs = odbc_columns($conn); 
odbc_free_result($colrs);
print "Done";
?>

Works fine with the output:

Connected 
ODBC_Columns
Done

Hope this was clear.

Regards, John Lim




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




#21095 [NEW]: symlink and chroot

2002-12-19 Thread busia
From: [EMAIL PROTECTED]
Operating system: Redhat 7.2
PHP version:  4.3.0RC3
PHP Bug Type: Filesystem function related
Bug description:  symlink and chroot

if I use



the symlink that is created in /home/foo_alfa is 
bar -> /home/foo

ant not
bar -> ../foo

how expected

this is a problem because I use chroot jails for ftp and the file became
not accessible.

Andrea Busia

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




#21087 [Com]: Rewriting file no longer works

2002-12-19 Thread mira-junk
 ID:   21087
 Comment by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Open
 Bug Type: Filesystem function related
 Operating System: XP
 PHP Version:  4.3.0RC3
 New Comment:

I've read similar bug report from several of our users (we have free
hosting server with aprox. 60,000 users, currently running latest RC of
php-4.3.0 with apache-2.0.43), but I've not been able to reproduce it.
Can you please paste here part of your code ?


Previous Comments:


[2002-12-18 18:58:42] [EMAIL PROTECTED]

This is just a heads up.  I can reproduce it but can't figure out why. 
I have a guestbook script that I wrote (KISGB) and it works perfectly
under all prior to 4.3.x versions.  However, 4.3.0RC3 (don't know about
previous RC's) will not recreate the file.  Basically the script is
trying to rewrite a configuration file.  It fails every time (writing
out a file of zero length) but I can't find anything on the logs.  As
soon as I restore a previous non 4.2.3x release, it works flawlessly. 
I will continue to try to produce a smaller script to replicate it, but
it will fail 100% of the time under 4.3.0.  I will also add that the
script is a phpNUKE module, so it is operating within that framework. 
It is a flat file, not a MySQL table.




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




#21087 [Opn]: Rewriting file no longer works

2002-12-19 Thread gfraley5
 ID:   21087
 User updated by:  [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Open
 Bug Type: Filesystem function related
 Operating System: XP
 PHP Version:  4.3.0RC3
 New Comment:

I'm running Apache 1.3.27.  I haven't tested it under *nix.  As far as
a code snippet, I will assume that it is in this code, somewhere:

if ($admin_from_web==true) {
$row = 0;
$insert_msg = '';
$fp = fopen("$path_to_gb",'r') or die("$unable_to_access_file_msg
$path_to_gb");
set_file_buffer($fp,$buffersize);
flock($fp,1);
$num = 16;
for ($i=0;$i<$num;$i++) {
$j = $i+1;
$head_array[$i] = ${"col$j"};
}
while ($data = fgetcsv($fp,$csv_buffer_size,",")) {
$row++;
if ($row<2) continue;
$new_msg = "";
if ($data[0]==$msgid) {
if (!empty($update)) {
reset ($HTTP_POST_VARS);
while (list ($key, $val) = each ($HTTP_POST_VARS)) {   
 
$found=false;
for ($i=0;$i1) {
$rec[$c] = 
htmlspecialchars($rec[$c],ENT_QUOTES);
$rec[$c] = 
str_replace("&#","&#",$rec[$c]); 
$new_msg .= $comma."\"$rec[$c]\""; 
 
}
elseif ($c<4) $new_msg .= $comma."$rec[$c]";
else $new_msg .= $comma."\"$rec[$c]\"";
if (chop($data[$c])!=chop($rec[$c])) {
$msg .= "$head_array[$c]: 
[$data[$c]]\n\n$head_array[$c]:
[$rec[$c]]\n\n\n";
}
}
$new_msg .= "\n";
if ($admin_email_advice_on_gb_edit && 
!empty($admin_email_address))
{
$to = 
"$admin_email_address,$admin_email_address_addl";
$subject = "$admin_email_subject_on_gb_edit";
@mail($to, $subject, "$msg","From: 
$admin_email_address") ;
}
}
}
else {
for ($c=0;$c<$num;$c++) {
$val = $data[$c];
if ($c==0) $comma=""; 
else $comma=",";
if ($c==13&&$row>1) $new_msg .= $comma."\"$val\"";
elseif ($c<4&&$row>1) $new_msg .= $comma."$val";
else $new_msg .= $comma."\"$val\"";
}
$new_msg .= "\n";  
 
}
if (!empty($new_msg)) $newgb[] = $new_msg;
}
flock($fp,3);
fclose($fp);
unset($delete);
unset($update);
$buffersize = round(filesize($path_to_gb)*1.5); 
$fp = fopen("$path_to_gb",'w') or die("$unable_to_access_file_msg
$path_to_gb");
set_file_buffer($fp,$buffersize);
flock($fp,1);   
for ($i=0;$i\n";
else $prefx = "";
fwrite($fp,$prefx.$newgb[$i]);
}
flock($fp,3);
fclose($fp);
}


Previous Comments:


[2002-12-19 06:29:35] [EMAIL PROTECTED]

I've read similar bug report from several of our users (we have free
hosting server with aprox. 60,000 users, currently running latest RC of
php-4.3.0 with apache-2.0.43), but I've not been able to reproduce it.
Can you please paste here part of your code ?



[2002-12-18 18:58:42] [EMAIL PROTECTED]

This is just a heads up.  I can reproduce it but can't figure out why. 
I have a guestbook script that I wrote (KISGB) and it works perfectly
under all prior to 4.3.x versions.  However, 4.3.0RC3 (don't know about
previous RC's) will not recreate the file.  Basically the script is
trying to rewrite a configuration file.  It fails every time (writing
out a file of zero length) but I can't find anything on the logs.  As
soon as I restore a previous non 4.2.3x release, it works flawlessly. 
I will continue to try to produce a smaller script to replicate it, but
it will fail 100% of the time under 4.3.0.  I will also add that the
script is a phpNUKE module, so it is 

#16521 [Csd]: file() - incorrect behavior (line endings ignored) on files with Mac EOLN (CR)

2002-12-19 Thread wez
 ID:   16521
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Closed
 Bug Type: Filesystem function related
 Operating System: FreeBSD 4.5-Stable
 PHP Version:  4.1.2
 New Comment:

If you must use PHP < 4.3, you can do something like this:

$fp = fopen($filename, "r");
$data = fread($fp, filesize($filename));
fclose($fp);
$lines = explode("\r", $data);

BEWARE: file() keeps the \r at the end of each line,
whereas the code snippet above does not.



Previous Comments:


[2002-12-18 20:13:08] [EMAIL PROTECTED]

is there a work around for this? just some way to go 
through the array containing the file, line by line.

Im using PHP 4.2.2



[2002-09-23 13:36:48] [EMAIL PROTECTED]

Fixed in HEAD.
Please try a non-stable snapshot and set the new ini option
auto_detect_line_endings=on in your php.ini/apache.conf.
The fix will be in 4.3.

--Wez.
PS: You might have to wait a couple of hours for this
change to appear on http://snaps.php.net




[2002-06-14 13:46:42] [EMAIL PROTECTED]

This seems critical as this is such a commonly used function.  (and
Derick promised it would be fixed by 4.3.0 :)



[2002-04-09 23:13:59] [EMAIL PROTECTED]

In PHP 4.1.2 (and 4.2.0-dev) Calling file() on a 4-line 
text file with Macintosh line endings (CR) results in a 
1-element array:

file: (file.txt)

blah
test
three
four

Code:

$array = file( 'file.txt. );
echo count( $array );

>> Returns '1' (Verified by print_r)

file() is ignoring the line endings, but the correct result 
happens for files with Windows (CRLF) and Unix (LF) line 
endings.




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




#21087 [Opn->Fbk]: Rewriting file no longer works

2002-12-19 Thread wez
 ID:   21087
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Feedback
 Bug Type: Filesystem function related
 Operating System: XP
 PHP Version:  4.3.0RC3
 New Comment:

Please try and cut down the script to a complete self-contained example
that I can run here.
I'm not going to spend hours debugging a long, incomplete code
fragment.
What I'm looking for it something like this:

$fp = fopen($filename, "w");
$len = fwrite($fp, $data);
fclose($fp);
echo "Wrote $len bytes";

If that works, try adding in the flock calls.
If that works, try adding in those set_file_buffer calls
(NB: there does not seem to be a need to play with file
buffering in this case).

Please help me to help you.


Previous Comments:


[2002-12-19 07:16:01] [EMAIL PROTECTED]

I'm running Apache 1.3.27.  I haven't tested it under *nix.  As far as
a code snippet, I will assume that it is in this code, somewhere:

if ($admin_from_web==true) {
$row = 0;
$insert_msg = '';
$fp = fopen("$path_to_gb",'r') or die("$unable_to_access_file_msg
$path_to_gb");
set_file_buffer($fp,$buffersize);
flock($fp,1);
$num = 16;
for ($i=0;$i<$num;$i++) {
$j = $i+1;
$head_array[$i] = ${"col$j"};
}
while ($data = fgetcsv($fp,$csv_buffer_size,",")) {
$row++;
if ($row<2) continue;
$new_msg = "";
if ($data[0]==$msgid) {
if (!empty($update)) {
reset ($HTTP_POST_VARS);
while (list ($key, $val) = each ($HTTP_POST_VARS)) {   
 
$found=false;
for ($i=0;$i1) {
$rec[$c] = 
htmlspecialchars($rec[$c],ENT_QUOTES);
$rec[$c] = 
str_replace("&#","&#",$rec[$c]); 
$new_msg .= $comma."\"$rec[$c]\""; 
 
}
elseif ($c<4) $new_msg .= $comma."$rec[$c]";
else $new_msg .= $comma."\"$rec[$c]\"";
if (chop($data[$c])!=chop($rec[$c])) {
$msg .= "$head_array[$c]: 
[$data[$c]]\n\n$head_array[$c]:
[$rec[$c]]\n\n\n";
}
}
$new_msg .= "\n";
if ($admin_email_advice_on_gb_edit && 
!empty($admin_email_address))
{
$to = 
"$admin_email_address,$admin_email_address_addl";
$subject = "$admin_email_subject_on_gb_edit";
@mail($to, $subject, "$msg","From: 
$admin_email_address") ;
}
}
}
else {
for ($c=0;$c<$num;$c++) {
$val = $data[$c];
if ($c==0) $comma=""; 
else $comma=",";
if ($c==13&&$row>1) $new_msg .= $comma."\"$val\"";
elseif ($c<4&&$row>1) $new_msg .= $comma."$val";
else $new_msg .= $comma."\"$val\"";
}
$new_msg .= "\n";  
 
}
if (!empty($new_msg)) $newgb[] = $new_msg;
}
flock($fp,3);
fclose($fp);
unset($delete);
unset($update);
$buffersize = round(filesize($path_to_gb)*1.5); 
$fp = fopen("$path_to_gb",'w') or die("$unable_to_access_file_msg
$path_to_gb");
set_file_buffer($fp,$buffersize);
flock($fp,1);   
for ($i=0;$i\n";
else $prefx = "";
fwrite($fp,$prefx.$newgb[$i]);
}
flock($fp,3);
fclose($fp);
}



[2002-12-19 06:29:35] [EMAIL PROTECTED]

I've read similar bug report from several of our users (we have free
hosting server with aprox. 60,000 users, currently running latest RC of
php-4.3.0 with apache-2.0.43), but I've not been able to reproduce it.
Can you please paste here part of your code ?



[2002-12-18 18:58:42] [EMAIL PROTE

#21096 [NEW]: Segmentation fault when adding array element

2002-12-19 Thread scollo
From: [EMAIL PROTECTED]
Operating system: Linux, Win2K
PHP version:  4.2.3
PHP Bug Type: Reproducible crash
Bug description:  Segmentation fault when adding array element


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




#21096 [Opn->Csd]: Segmentation fault when adding array element

2002-12-19 Thread derick
 ID:   21096
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Closed
 Bug Type: Reproducible crash
 Operating System: Linux, Win2K
 PHP Version:  4.2.3
 New Comment:

This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

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


Previous Comments:


[2002-12-19 08:32:54] [EMAIL PROTECTED]






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




#21097 [NEW]: tsrm_virtual_cwd.c/virtual_file_ex handles ".." incorrectly for UNC paths

2002-12-19 Thread dwayne
From: [EMAIL PROTECTED]
Operating system: Win32
PHP version:  4.2.3
PHP Bug Type: *Directory/Filesystem functions
Bug description:  tsrm_virtual_cwd.c/virtual_file_ex handles ".." incorrectly for UNC 
paths

On Win32, the virtual_file_ex() function in TSRM/tsrm_virtual_cwd.c doesn't
handle ".." correctly when state->cwd is a UNC path.  

Basically, when state->cwd = "//hostname/foo/bar" and path_copy =
"../file.txt", the function sets the new state->cwd to
"//hostname/foo/bar/file.txt" rather than "//hostname/foo/file.txt".

This breaks any PHP functions that call virtual_file_ex(), including:

require "../config.inc.php";
require_once "../config.inc.php";
include "../config.inc.php";
include_once "../config.inc.php";
$f = fopen("../config.inc.php", "r");

The reason for this is that the IS_ABSOLUTE_PATH() macro returns false
when given a UNC path.  The following patch does not change this
behaviour, but it adds additional IS_UNC_PATH() checks where appropriate:



diff -bruN php-4.2.3/TSRM/tsrm_virtual_cwd.c
php-4.2.3-fixed/TSRM/tsrm_virtual_cwd.c
--- php-4.2.3/TSRM/tsrm_virtual_cwd.c   Thu Apr 25 08:52:46 2002
+++ php-4.2.3-fixed/TSRM/tsrm_virtual_cwd.c Thu Dec 19 08:33:28 2002
@@ -346,14 +346,25 @@
 
 #define PREVIOUS state->cwd[state->cwd_length - 1]
 
+#ifdef TSRM_WIN32
+   while ((IS_ABSOLUTE_PATH(state->cwd, state->cwd_length) ||
+   IS_UNC_PATH(state->cwd, state->cwd_length)) &&
+   !IS_SLASH(PREVIOUS)) {
+#else
while (IS_ABSOLUTE_PATH(state->cwd, state->cwd_length) &&
!IS_SLASH(PREVIOUS)) {
+#endif
save = PREVIOUS;
PREVIOUS = '\0';
state->cwd_length--;
}
 
+#ifdef TSRM_WIN32
+   if (!IS_ABSOLUTE_PATH(state->cwd, state->cwd_length) &&
+   !IS_UNC_PATH(state->cwd, state->cwd_length)) {
+#else
if (!IS_ABSOLUTE_PATH(state->cwd, state->cwd_length)) {
+#endif
state->cwd[state->cwd_length++] = save;
state->cwd[state->cwd_length] = '\0';
} else {




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




#21098 [NEW]: mktime crashes when certain parameters are passed

2002-12-19 Thread martin
From: [EMAIL PROTECTED]
Operating system: Windows 2000
PHP version:  4.3.0RC3
PHP Bug Type: Reproducible crash
Bug description:  mktime crashes when certain parameters are passed

The following code makes apache (?) crash.


I use Apache 2.0.43 under Windows2k SP3.
I have tested against PHP 4.2.3, 4.3.0RC3 and a couple of 4.3.x-dev
snapshots from snaps.php.net (from 16-18 dec 2002)
Script doesnt crash if either $m or $y is replaced with a 0 in the
mktime() call.

I found this problem after investigating why a certain script crashed, the
reason was some data that i've expected to be in the database actually
wasn't. In this case i'd expect to get a false back in $datestamp, or some
kind of error message.
I've searched the bug database but havent found any similar bug reports.

On Linux 2.4.14, PHP 4.2.3, Apache 1.3.27 i can NOT reproduce this
problem.
-- 
Edit bug report at http://bugs.php.net/?id=21098&edit=1
-- 
Try a CVS snapshot: http://bugs.php.net/fix.php?id=21098&r=trysnapshot
Fixed in CVS:   http://bugs.php.net/fix.php?id=21098&r=fixedcvs
Fixed in release:   http://bugs.php.net/fix.php?id=21098&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=21098&r=needtrace
Try newer version:  http://bugs.php.net/fix.php?id=21098&r=oldversion
Not developer issue:http://bugs.php.net/fix.php?id=21098&r=support
Expected behavior:  http://bugs.php.net/fix.php?id=21098&r=notwrong
Not enough info:http://bugs.php.net/fix.php?id=21098&r=notenoughinfo
Submitted twice:http://bugs.php.net/fix.php?id=21098&r=submittedtwice
register_globals:   http://bugs.php.net/fix.php?id=21098&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=21098&r=php3
Daylight Savings:   http://bugs.php.net/fix.php?id=21098&r=dst
IIS Stability:  http://bugs.php.net/fix.php?id=21098&r=isapi




#21098 [Opn]: mktime crashes when certain parameters are passed

2002-12-19 Thread martin
 ID:   21098
 User updated by:  [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Open
 Bug Type: Reproducible crash
 Operating System: Windows 2000
 PHP Version:  4.3.0RC3
 New Comment:

Last tested with php4-win32-STABLE-200212190930.zip
and the bug still occurs.
Also, Apache says the following in error.log:

[Thu Dec 19 17:02:56 2002] [notice] Parent: child process exited with
status 3221225477 -- Restarting.
[Thu Dec 19 17:02:56 2002] [notice] Parent: Created child process 2232
[Thu Dec 19 17:02:56 2002] [notice] Child 2232: Child process is
running
[Thu Dec 19 17:02:56 2002] [notice] Child 2232: Acquired the start
mutex.
[Thu Dec 19 17:02:56 2002] [notice] Child 2232: Starting 250 worker
threads.


Previous Comments:


[2002-12-19 09:57:34] [EMAIL PROTECTED]

The following code makes apache (?) crash.


I use Apache 2.0.43 under Windows2k SP3.
I have tested against PHP 4.2.3, 4.3.0RC3 and a couple of 4.3.x-dev
snapshots from snaps.php.net (from 16-18 dec 2002)
Script doesnt crash if either $m or $y is replaced with a 0 in the
mktime() call.

I found this problem after investigating why a certain script crashed,
the reason was some data that i've expected to be in the database
actually wasn't. In this case i'd expect to get a false back in
$datestamp, or some kind of error message.
I've searched the bug database but havent found any similar bug
reports.

On Linux 2.4.14, PHP 4.2.3, Apache 1.3.27 i can NOT reproduce this
problem.




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




#21098 [Opn->Ver]: mktime crashes when certain parameters are passed

2002-12-19 Thread edink
 ID:   21098
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Verified
 Bug Type: Reproducible crash
 Operating System: Windows 2000
 PHP Version:  4.3.0RC3
 New Comment:

Verified on Windows. Crash happens in ext/standard/datetime.c in
php_mktime() on line:

t2 = *localtime(&seconds);


Previous Comments:


[2002-12-19 10:04:24] [EMAIL PROTECTED]

Last tested with php4-win32-STABLE-200212190930.zip
and the bug still occurs.
Also, Apache says the following in error.log:

[Thu Dec 19 17:02:56 2002] [notice] Parent: child process exited with
status 3221225477 -- Restarting.
[Thu Dec 19 17:02:56 2002] [notice] Parent: Created child process 2232
[Thu Dec 19 17:02:56 2002] [notice] Child 2232: Child process is
running
[Thu Dec 19 17:02:56 2002] [notice] Child 2232: Acquired the start
mutex.
[Thu Dec 19 17:02:56 2002] [notice] Child 2232: Starting 250 worker
threads.



[2002-12-19 09:57:34] [EMAIL PROTECTED]

The following code makes apache (?) crash.


I use Apache 2.0.43 under Windows2k SP3.
I have tested against PHP 4.2.3, 4.3.0RC3 and a couple of 4.3.x-dev
snapshots from snaps.php.net (from 16-18 dec 2002)
Script doesnt crash if either $m or $y is replaced with a 0 in the
mktime() call.

I found this problem after investigating why a certain script crashed,
the reason was some data that i've expected to be in the database
actually wasn't. In this case i'd expect to get a false back in
$datestamp, or some kind of error message.
I've searched the bug database but havent found any similar bug
reports.

On Linux 2.4.14, PHP 4.2.3, Apache 1.3.27 i can NOT reproduce this
problem.




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




#21098 [Ver->Csd]: mktime crashes when certain parameters are passed

2002-12-19 Thread iliaa
 ID:   21098
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Verified
+Status:   Closed
 Bug Type: Reproducible crash
 Operating System: Windows 2000
 PHP Version:  4.3.0RC3
 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:


[2002-12-19 10:12:47] [EMAIL PROTECTED]

Verified on Windows. Crash happens in ext/standard/datetime.c in
php_mktime() on line:

t2 = *localtime(&seconds);



[2002-12-19 10:04:24] [EMAIL PROTECTED]

Last tested with php4-win32-STABLE-200212190930.zip
and the bug still occurs.
Also, Apache says the following in error.log:

[Thu Dec 19 17:02:56 2002] [notice] Parent: child process exited with
status 3221225477 -- Restarting.
[Thu Dec 19 17:02:56 2002] [notice] Parent: Created child process 2232
[Thu Dec 19 17:02:56 2002] [notice] Child 2232: Child process is
running
[Thu Dec 19 17:02:56 2002] [notice] Child 2232: Acquired the start
mutex.
[Thu Dec 19 17:02:56 2002] [notice] Child 2232: Starting 250 worker
threads.



[2002-12-19 09:57:34] [EMAIL PROTECTED]

The following code makes apache (?) crash.


I use Apache 2.0.43 under Windows2k SP3.
I have tested against PHP 4.2.3, 4.3.0RC3 and a couple of 4.3.x-dev
snapshots from snaps.php.net (from 16-18 dec 2002)
Script doesnt crash if either $m or $y is replaced with a 0 in the
mktime() call.

I found this problem after investigating why a certain script crashed,
the reason was some data that i've expected to be in the database
actually wasn't. In this case i'd expect to get a false back in
$datestamp, or some kind of error message.
I've searched the bug database but havent found any similar bug
reports.

On Linux 2.4.14, PHP 4.2.3, Apache 1.3.27 i can NOT reproduce this
problem.




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




#21087 [Fbk->Opn]: Rewriting file no longer works

2002-12-19 Thread gfraley5
 ID:   21087
 User updated by:  [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Feedback
+Status:   Open
 Bug Type: Filesystem function related
 Operating System: XP
 PHP Version:  4.3.0RC3
 New Comment:

Sorry for the misunderstanding.  First of all I did not know that you
were a developer working the problem. Nothing in your comment told me
that.  Secondly, I have already stated that I will try to produce a
smaller script (see my original post).  I just haven't had time to work
the problem.  As to the buffering, without it, the full text is not
written out.  It gets truncated.


Previous Comments:


[2002-12-19 07:43:14] [EMAIL PROTECTED]

Please try and cut down the script to a complete self-contained example
that I can run here.
I'm not going to spend hours debugging a long, incomplete code
fragment.
What I'm looking for it something like this:

$fp = fopen($filename, "w");
$len = fwrite($fp, $data);
fclose($fp);
echo "Wrote $len bytes";

If that works, try adding in the flock calls.
If that works, try adding in those set_file_buffer calls
(NB: there does not seem to be a need to play with file
buffering in this case).

Please help me to help you.



[2002-12-19 07:16:01] [EMAIL PROTECTED]

I'm running Apache 1.3.27.  I haven't tested it under *nix.  As far as
a code snippet, I will assume that it is in this code, somewhere:

if ($admin_from_web==true) {
$row = 0;
$insert_msg = '';
$fp = fopen("$path_to_gb",'r') or die("$unable_to_access_file_msg
$path_to_gb");
set_file_buffer($fp,$buffersize);
flock($fp,1);
$num = 16;
for ($i=0;$i<$num;$i++) {
$j = $i+1;
$head_array[$i] = ${"col$j"};
}
while ($data = fgetcsv($fp,$csv_buffer_size,",")) {
$row++;
if ($row<2) continue;
$new_msg = "";
if ($data[0]==$msgid) {
if (!empty($update)) {
reset ($HTTP_POST_VARS);
while (list ($key, $val) = each ($HTTP_POST_VARS)) {   
 
$found=false;
for ($i=0;$i1) {
$rec[$c] = 
htmlspecialchars($rec[$c],ENT_QUOTES);
$rec[$c] = 
str_replace("&#","&#",$rec[$c]); 
$new_msg .= $comma."\"$rec[$c]\""; 
 
}
elseif ($c<4) $new_msg .= $comma."$rec[$c]";
else $new_msg .= $comma."\"$rec[$c]\"";
if (chop($data[$c])!=chop($rec[$c])) {
$msg .= "$head_array[$c]: 
[$data[$c]]\n\n$head_array[$c]:
[$rec[$c]]\n\n\n";
}
}
$new_msg .= "\n";
if ($admin_email_advice_on_gb_edit && 
!empty($admin_email_address))
{
$to = 
"$admin_email_address,$admin_email_address_addl";
$subject = "$admin_email_subject_on_gb_edit";
@mail($to, $subject, "$msg","From: 
$admin_email_address") ;
}
}
}
else {
for ($c=0;$c<$num;$c++) {
$val = $data[$c];
if ($c==0) $comma=""; 
else $comma=",";
if ($c==13&&$row>1) $new_msg .= $comma."\"$val\"";
elseif ($c<4&&$row>1) $new_msg .= $comma."$val";
else $new_msg .= $comma."\"$val\"";
}
$new_msg .= "\n";  
 
}
if (!empty($new_msg)) $newgb[] = $new_msg;
}
flock($fp,3);
fclose($fp);
unset($delete);
unset($update);
$buffersize = round(filesize($path_to_gb)*1.5); 
$fp = fopen("$path_to_gb",'w') or die("$unable_to_access_file_msg
$path_to_gb");
set_file_buffer($fp,$buffersize);
flock($fp,1);   
for ($i=0;$i\n";
else $prefx = "";
fwrite($fp,$prefx.$newgb[$i]);
}
flock($fp,3);
fc

#21087 [Opn->Fbk]: Rewriting file no longer works

2002-12-19 Thread wez
 ID:   21087
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Feedback
 Bug Type: Filesystem function related
 Operating System: XP
 PHP Version:  4.3.0RC3
 New Comment:

Keep this at feedback.
(and note that I am not [EMAIL PROTECTED] and that my previous comment
on this was my first).


Previous Comments:


[2002-12-19 11:17:24] [EMAIL PROTECTED]

Sorry for the misunderstanding.  First of all I did not know that you
were a developer working the problem. Nothing in your comment told me
that.  Secondly, I have already stated that I will try to produce a
smaller script (see my original post).  I just haven't had time to work
the problem.  As to the buffering, without it, the full text is not
written out.  It gets truncated.



[2002-12-19 07:43:14] [EMAIL PROTECTED]

Please try and cut down the script to a complete self-contained example
that I can run here.
I'm not going to spend hours debugging a long, incomplete code
fragment.
What I'm looking for it something like this:

$fp = fopen($filename, "w");
$len = fwrite($fp, $data);
fclose($fp);
echo "Wrote $len bytes";

If that works, try adding in the flock calls.
If that works, try adding in those set_file_buffer calls
(NB: there does not seem to be a need to play with file
buffering in this case).

Please help me to help you.



[2002-12-19 07:16:01] [EMAIL PROTECTED]

I'm running Apache 1.3.27.  I haven't tested it under *nix.  As far as
a code snippet, I will assume that it is in this code, somewhere:

if ($admin_from_web==true) {
$row = 0;
$insert_msg = '';
$fp = fopen("$path_to_gb",'r') or die("$unable_to_access_file_msg
$path_to_gb");
set_file_buffer($fp,$buffersize);
flock($fp,1);
$num = 16;
for ($i=0;$i<$num;$i++) {
$j = $i+1;
$head_array[$i] = ${"col$j"};
}
while ($data = fgetcsv($fp,$csv_buffer_size,",")) {
$row++;
if ($row<2) continue;
$new_msg = "";
if ($data[0]==$msgid) {
if (!empty($update)) {
reset ($HTTP_POST_VARS);
while (list ($key, $val) = each ($HTTP_POST_VARS)) {   
 
$found=false;
for ($i=0;$i1) {
$rec[$c] = 
htmlspecialchars($rec[$c],ENT_QUOTES);
$rec[$c] = 
str_replace("&#","&#",$rec[$c]); 
$new_msg .= $comma."\"$rec[$c]\""; 
 
}
elseif ($c<4) $new_msg .= $comma."$rec[$c]";
else $new_msg .= $comma."\"$rec[$c]\"";
if (chop($data[$c])!=chop($rec[$c])) {
$msg .= "$head_array[$c]: 
[$data[$c]]\n\n$head_array[$c]:
[$rec[$c]]\n\n\n";
}
}
$new_msg .= "\n";
if ($admin_email_advice_on_gb_edit && 
!empty($admin_email_address))
{
$to = 
"$admin_email_address,$admin_email_address_addl";
$subject = "$admin_email_subject_on_gb_edit";
@mail($to, $subject, "$msg","From: 
$admin_email_address") ;
}
}
}
else {
for ($c=0;$c<$num;$c++) {
$val = $data[$c];
if ($c==0) $comma=""; 
else $comma=",";
if ($c==13&&$row>1) $new_msg .= $comma."\"$val\"";
elseif ($c<4&&$row>1) $new_msg .= $comma."$val";
else $new_msg .= $comma."\"$val\"";
}
$new_msg .= "\n";  
 
}
if (!empty($new_msg)) $newgb[] = $new_msg;
}
flock($fp,3);
fclose($fp);
unset($delete);
unset($update);
$buffersize = round(filesize($path_to_gb)*1.5); 
$fp = fopen("$path_to_gb",'w') or die("$unable_to_access_file_msg
$pat

#17959 [Fbk->Opn]: array reference problems

2002-12-19 Thread pkeshish
 ID:   17959
 User updated by:  [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Feedback
+Status:   Open
 Bug Type: Scripting Engine problem
 Operating System: linux
 PHP Version:  4.2.1
 New Comment:

I grabbed Apache/1.3.27 built and installed it.

Next I grabbed php4-STABLE-200212182230 built and
installed it.

The same test-case presented in this bug report failed.

I also grabbed php4-200212191630 a few minutes ago
built and installed it.

Again, the very same test-case in this bug report failed.

--patrick


Previous Comments:


[2002-12-07 01:46:07] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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

Could you confirm that the problem still exists in latest CVS and if it
does ,please provide a SMALL (10 or so) line script that could be used
to replicate the problem.



[2002-11-27 22:57:56] [EMAIL PROTECTED]

I have experienced similar problems with PHP on Linux 2.4.x.  It only
seems to occur in very weird circumstances where you have a reference
pointing (yes I know references are not pointers) to an array element. 
My only test cases are much larger that those presented by
"[EMAIL PROTECTED]" as they involve production code.  The one piece of
information I can offer which may be of some use is that in my case,
the problem can be eliminated by removing an uneeded "global" statement
(the reference was already in scope).  I realize that sounds absurd,
but I have a case where "global" actually breaks the reference.  When I
comment out the global statement, the reference doesn't get wiped out. 
I know the reference is global because it was created in $GLOBALS.  I
know this seems strange, but I can var_dump it before and after and the
only thing that changes is me commenting out the global statement.



[2002-07-29 06:50:20] [EMAIL PROTECTED]

 'top',
  'A' => array
  (
  'name' => 'A',
  'A_a' => array
(
'name' => 'A_a',
'fn_1' => 'Aa_fn_1',
'fn_2' => 'Aa_fn_2',
'fn_3' => 'Aa_fn_3',
'A_a_1' => array
(
'name' => 'A_a_1',
'fn_1' => 'Aa1_fn_1',
'fn_2' => 'Aa1_fn_2',
),
'A_a_2' => array
(
'name' => 'A_a_2',
'fn_1' => 'Aa2_fn_1',
'fn_2' => 'Aa2_fn_2',
),
),
  ),
  );

// setup "parent references" for each of the nodes.
$top['parent']  = null;
$top['A']['parent'] = &$top;
$top['A']['A_a']['parent']  = &$top['A'];
$top['A']['A_a']['A_a_1']['parent']  = &$top['A']['A_a'];
$top['A']['A_a']['A_a_2']['parent']  = &$top['A']['A_a'];
//$top['A']['A_a']['A_a_1']['parent']  = &$top['A']['A_a'];
  //
  // Note!
  // Here if we uncomment the above line the sample code will
  // magically WORK!
  //
  // Why does the order of initialization matter!?  And will the
  // code now break elsewhere?

// setup our reference to $top.  $ptr is what should change
// on every call to change_ptr(name).
$ptr  = &$top;

// change_ptr( name ) does the following w/some verbose
// messages to display the state of variables in question.
//
//if ( ptr[name] )
//  ptr = ptr[name];
//
function change_ptr( $name )
{
  printf( "  change_ptr($name) " );

  if ( $GLOBALS['ptr'][$name] ) {
// Setting up string for later printing.
$before_change =
sprintf( "before: \$GLOBALS['ptr']['name'] = %s",
   $GLOBALS['ptr']['name'] );

$GLOBALS['ptr'] = &$GLOBALS['ptr'][$name];

$after_change =
sprintf( "after: \$GLOBALS['ptr']['name'] = %s",
  $GLOBALS['ptr']['name'] );

printf( "CHANGED:\n" );
printf( "%s\n %s", $before_change, $after_change );
  }
  else
printf( "NO CHANGE!" );

  printf( "\n" );
}
?>






[2002-07-23 16:24:54] [EMAIL PROTECTED]

think of the "global $p;" construct as a shortcut for
"$p = &$GLOBALS['p'];" 

so by assigning a new reference you are breaking the one to the global
variable

so you have to explicitly assign to $GLOBALS["p"] here

(marked as documentation problem)



[2002-07-16 08:40:10] [

#21056 [Fbk->Opn]: PHP messes with virtual hosts

2002-12-19 Thread eugene
 ID:   21056
 User updated by:  [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Feedback
+Status:   Open
 Bug Type: Apache related
 Operating System: Mandrake 8.0
 PHP Version:  4.2.3
 New Comment:

We tried the CVS snaphsot, but with no avail... If anybody knows how to
beat this, please help.

Thanx :(


Previous Comments:


[2002-12-16 19:07:22] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2002-12-16 18:25:14] [EMAIL PROTECTED]

Eugene forgot to mention the following information on our little
error:

Apache 1.3.19 with DSO support enabled...

on every call to make install PHP changes the httpd.conf file, the
changes crash the server. we change them back and they crash. PHP 4.2.3
won't run, only PHP4.0.4pl4 will run



[2002-12-16 17:58:41] [EMAIL PROTECTED]

I've try to upgrade my standard Mandrake installation PHP 4.0.4pl1 to
PHP4.2.3 which compiled succesfully. The httpd.conf file still
reflected the old PHP4.0.4pl1 library. Now, whenever I change my
configuration to point to the new library, all my virtual hosts are
messed up and nothing works...

Here is some snippets of information:

-- Apache error with PHP4.2.3 loaded

[Tue Dec 17 02:03:00 2002] [warn] Loaded DSO libexec/libphp4.so uses
plain Apache 1.3 API, this module might crash under EAPI! (please
recompile it with -DEAPI)
[Tue Dec 17 02:03:00 2002] [error] VirtualHost x.x.x.x:80 -- mixing *
ports and non-* ports with a NameVirtualHost address is not supported,
proceeding with undefined results


-- httpd.conf (GOOD)


LoadModule php4_moduleextramodules/libphp4.so



-- httpd.conf (BAD)


LoadModule php4_modulelibexec/libphp4.so



-- PHP configure

./configure --disable-static --disable-debug --disable-rpath
--enable-pic --enable-inline-optimization --prefix=/usr --with-zlib
--with-config-file-path=/etc --enable-magic-quotes --enable-debugger
--enable-track-vars --enable-safe-mode --with-exec-dir=/usr/bin
--with-regex=system --with-versioning --enable-sysvsem
--with-mod_charset --enable-force-cgi-redirect --enable-trans-sid
--with-dbase --with-filepro --enable-yp --enable-ftp --with-xml
--with-gettext --with-mysql --with-bz2 --enable-calender --enable-xslt
--with-xslt-sablot --with-apxs=/etc/httpd/bin/apxs --with-deapi




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




#21099 [NEW]: Bundled GD library not reflected in php.ini

2002-12-19 Thread cg
From: [EMAIL PROTECTED]
Operating system: Win32
PHP version:  4.3.0RC3
PHP Bug Type: GD related
Bug description:  Bundled GD library not reflected in php.ini

In php.ini on Win32, in the extension section, there's only an entry for
php_gd.dll, php_gd2.dll (the bundled and proposed one) is missing.

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




#21077 [Ctl->Csd]: proc_open hangs

2002-12-19 Thread wez
 ID:   21077
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Critical
+Status:   Closed
 Bug Type: Filesystem function related
 Operating System: any BSD
 PHP Version:  4CVS-2002-12-18 (dev)
 Assigned To:  wez
 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:


[2002-12-18 08:50:25] [EMAIL PROTECTED]

assigning and marking on request



[2002-12-18 08:49:40] [EMAIL PROTECTED]

proc_open test in the testsuite fails.

Seems that proc_close fails now (returns -1).

Patch rev 1.85/1.86 on exec.c and related files triggered the bug.




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




#21100 [NEW]: php_value include_path does not work in httpd.conf/VirtualHost

2002-12-19 Thread robinot
From: [EMAIL PROTECTED]
Operating system: Linux  RH7.3
PHP version:  4.2.3
PHP Bug Type: *Configuration Issues
Bug description:  php_value include_path does not work in httpd.conf/VirtualHost

I cannot override the include_path setting while in VirtualHost while I can
do it in .htaccess files.
-- 
Edit bug report at http://bugs.php.net/?id=21100&edit=1
-- 
Try a CVS snapshot: http://bugs.php.net/fix.php?id=21100&r=trysnapshot
Fixed in CVS:   http://bugs.php.net/fix.php?id=21100&r=fixedcvs
Fixed in release:   http://bugs.php.net/fix.php?id=21100&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=21100&r=needtrace
Try newer version:  http://bugs.php.net/fix.php?id=21100&r=oldversion
Not developer issue:http://bugs.php.net/fix.php?id=21100&r=support
Expected behavior:  http://bugs.php.net/fix.php?id=21100&r=notwrong
Not enough info:http://bugs.php.net/fix.php?id=21100&r=notenoughinfo
Submitted twice:http://bugs.php.net/fix.php?id=21100&r=submittedtwice
register_globals:   http://bugs.php.net/fix.php?id=21100&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=21100&r=php3
Daylight Savings:   http://bugs.php.net/fix.php?id=21100&r=dst
IIS Stability:  http://bugs.php.net/fix.php?id=21100&r=isapi




#20583 [Fbk->Opn]: Variable values inconsistent with assignment statements.

2002-12-19 Thread jseverson
 ID:   20583
 User updated by:  [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Feedback
+Status:   Open
 Bug Type: Variables related
 Operating System: RedHat 7.2
 PHP Version:  4CVS-2002-11-22 (stable)
 New Comment:

Ok, I've been able to narrow this bug down to a much simpler PHP
script. We have also confirmed that it is definitely a problem with the
newer version of PHP since we are running an identical script on
production, with an older version of PHP, and it is error free.

The following script should allow you to recreate the problem. You
should disable cookies on the browser in order to have the error
recreated each subsequent refresh. Otherwise, the error will only
happen the first time you view the page, and will be gone on
refreshes.

__
";
print "Another = $another";
print "Obviously Messed Up = $obviously_messed_up";
?>


Output of Above Code:
SQL = Resource id #3
Another = Resource id #3
Obviously Messed Up = Resource id #3


Previous Comments:


[2002-12-11 01:03:31] [EMAIL PROTECTED]

Please provide us a complete, self-contained and short script which can
be used to reproduce this.
(you're most likely doing something wrong..)




[2002-12-10 19:12:37] [EMAIL PROTECTED]

We have upgraded our PHP to the version given below, and are still
experiencing the same problems. 

Thanks



[2002-12-07 15:41:30] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2002-11-22 12:58:04] [EMAIL PROTECTED]

I haven't been able to recreate this problem at all in a controlled
environment, but I can recreate it consistently where we originally
discovered it. 

Here is the snidbit of the function causing the erroneous output:
___
function do_mail_command($cmd,$server="morpheus.myersinternet.com") {

print "values prior to setting are: server => $servererrno =>
$errnoerrstr => $errstrwhoknows => $whoknows";

if(empty($server)) {
  print "server is empty, so changing values";
$server = "this is the first one";
$errno = "here is the second one";
$errstr = "but they will all be this";
$random_variable = "does this work";
print "values after setting: server => $servererrno =>
$errnoerrstr => $errstrwhoknows => $whoknows";
}

$fp = fsockopen($server, 5154, $errno, $errstr, 10);
_

Here is the output of that exact piece of code:

values prior to setting are:
server => morpheus.myersinternet.com
errno => morpheus.myersinternet.com
errstr => morpheus.myersinternet.com
whoknows => morpheus.myersinternet.com

server is empty, so changing values

values after setting:

server => does this work
errno => does this work
errstr => does this work
whoknows => does this work



There are three main problems I see occurring here.

1. The first print statement prints out a bunch of "random" variables,
$server being the only that has previously been given a value. However,
as the print statement shows, they ALL have values.

2. The empty($server) check returns true even though its obviously
clear that $server is NOT empty.

3. After performing variuos assignment statements within the if block,
and printing out the variable values, it's clear that ALL the variables
receive the value of the LAST assignment statement made.

We found this bug because when calling fsockopen, the $errno and
$errstr variables had values even though they were never assigned any
values and it was causing the function to fail when trying to open the
socket. This function was working fine prior to our upgrade to the
latest version.

Our configure line is:
LoadModule php4_module modules/libphp4.so

We are also heavily using session variables in case that helps to
recreate the bug.

Thanks




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




#20871 [Opn]: Apache restarts with no output

2002-12-19 Thread ctocopok
 ID:   20871
 User updated by:  [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Open
 Bug Type: IMAP related
 Operating System: win2K
 PHP Version:  4.3.0-dev
 New Comment:

Sorry for bothering. Any good news on the subject?


Previous Comments:


[2002-12-11 05:48:21] [EMAIL PROTECTED]

";

$totmsg=imap_num_msg($mbox); //still works
if ($totmsg>0) echo "some messages found";

$headers=imap_search($mbox, "FROM @", 0);//fails
$headers=imap_headers($mbox);//fails

//any of above would 'crash'.


if (is_array($headers))echo "Total messages found:
".count($headers)."/$totmsg";
?>



[2002-12-11 05:14:11] [EMAIL PROTECTED]

Please provide a short, complete and self-contained example
script which can be used to reproduce this.




[2002-12-11 04:22:02] [EMAIL PROTECTED]

I'd be glad to know if any measures are being taken in order to fix the
buggie. 
I hope that you at least succeeded reproduction of the bug.



[2002-12-06 20:38:06] [EMAIL PROTECTED]

Latest snapshot did not help. Actually, i fount the better place to
"breakpoint" - I did comment out the line containing
"$headers=imap_search($mbox, "FROM @");"

*perhaps* that is the point where a crash(?) occures.



[2002-12-06 20:25:45] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





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

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




#15302 [Com]: Warning: open_basedir restriction in effect. ... in Unknown on line 0

2002-12-19 Thread tonyhana_nospam_
 ID:   15302
 Comment by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Bogus
 Bug Type: Scripting Engine problem
 Operating System: FreeBSD 4.4
 PHP Version:  4.1.1
 New Comment:

Yeah Im getting the same internmittent problem here.. under

FreeBSD monster.phatservers.com 4.7-STABLE FreeBSD 4.7-STABLE #0: Sun
Nov 24 00:06:33 PST 2002 
PHP 4.2.3

Also using Plesk..and Zend optimizer

'./configure' '--with-apxs=/usr/local/psa/apache/bin/apxs'
'--prefix=/usr/local/psa/apache' '--with-system-regex'
'--with-config-file-path=/usr/local/psa/apache/conf' '--disable-debug'
'--enable-pear' '--enable-sockets' '--enable-track-vars' '--with-gd'
'--with-mysql=/usr/local/psa/mysql' '--with-iodbc' '--with-pam'
'--with-kerberos' '--with-zend' '--with-imap' '--with-curl'
'--with-freetype-dir=/usr/local/include/freetype2'


Previous Comments:


[2002-10-14 00:34:19] [EMAIL PROTECTED]

Note the original author said 'randomly' - I am also experiencing this
problem with some scripts under 4.2.3.  95% of the time they run fine
and echo text to the screen, but occasionally will fail with this
error:

Warning: open_basedir restriction in effect. File is in wrong directory
in Unknown on line 0



[2002-08-14 19:00:21] [EMAIL PROTECTED]

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

The 'problem', is that according to open_basedir limitations you do not
have permission to run your

script. Hence the error you are seeing.



[2002-03-23 12:53:21] [EMAIL PROTECTED]

Ive used php.ini-optimized from php-4.0.6 and it seems to work now.

obtw. it misbehaved also in php-4.1.2 with recommended php.ini



[2002-01-30 16:02:12] [EMAIL PROTECTED]

I have the same problem as in the closed bug #12995 so im opening a new
thread (if this is bad, let me know, it wouldnt happen anymore).
When i put just a file which contains:

i randomly get error message:

Warning: open_basedir restriction in effect. File is in wrong directory
in Unknown on line 0

Warning: Failed opening '/www/parba.cz/www/index.php' for inclusion
(include_path='.:/usr/local/lib/php') in Unknown on line 0

There is no include in that file ... just only echo.
Im using php-4.1.1 on FreeBSD4.4 and i didnt compile it from ports.


Im adding information from phpinfo that i think should be useful:

PHP Version 4.1.1
System: FreeBSD parba.cz 4.4-RELEASE FreeBSD 4.4-RELEASE #0: Tue Sep 18
11:57:08 PDT 2001
[EMAIL PROTECTED]:/usr/src/sys/compile/GENERIC  i386 
Build Date: Jan 30 2002 
Configure Command:  './configure'
'--with-apxs=/usr/local/apache/bin/apxs' '--enable-safe-mode'
'--with-openssl' '--with-zlib' '--enable-bcmath' '--with-bz2'
'--enable-calendar' '--enable-ctype' '--with-curl' '--with-db'
'--enable-dbase' '--enable-ftp' '--with-gd' '--enable-gd-native-ttf'
'--with-imap' '--with-mcal' '--with-mhash'
'--with-mysql=/usr/local/mysql/' '--with-pgsql' '--with-mm'
'--enable-trans-sid' '--with-snmp' '--enable-sockets'
'--enable-inline-optimization' '--with-md5' '--enable-md5' 
Server API: Apache 

And here is my phpinfo();
http://parba.mistral.cz/phpinfo.php
of course it sometimes work and sometimes not - just need some
refreshing




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




#21097 [Opn->Fbk]: tsrm_virtual_cwd.c/virtual_file_ex handles ".." incorrectly for UNC paths

2002-12-19 Thread iliaa
 ID:   21097
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Feedback
 Bug Type: *Directory/Filesystem functions
 Operating System: Win32
 PHP Version:  4.2.3
 New Comment:

Please try using this CVS snapshot:

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




Previous Comments:


[2002-12-19 09:17:27] [EMAIL PROTECTED]

On Win32, the virtual_file_ex() function in TSRM/tsrm_virtual_cwd.c
doesn't handle ".." correctly when state->cwd is a UNC path.  

Basically, when state->cwd = "//hostname/foo/bar" and path_copy =
"../file.txt", the function sets the new state->cwd to
"//hostname/foo/bar/file.txt" rather than "//hostname/foo/file.txt".

This breaks any PHP functions that call virtual_file_ex(), including:

require "../config.inc.php";
require_once "../config.inc.php";
include "../config.inc.php";
include_once "../config.inc.php";
$f = fopen("../config.inc.php", "r");

The reason for this is that the IS_ABSOLUTE_PATH() macro returns false
when given a UNC path.  The following patch does not change this
behaviour, but it adds additional IS_UNC_PATH() checks where
appropriate:



diff -bruN php-4.2.3/TSRM/tsrm_virtual_cwd.c
php-4.2.3-fixed/TSRM/tsrm_virtual_cwd.c
--- php-4.2.3/TSRM/tsrm_virtual_cwd.c   Thu Apr 25 08:52:46 2002
+++ php-4.2.3-fixed/TSRM/tsrm_virtual_cwd.c Thu Dec 19 08:33:28 2002
@@ -346,14 +346,25 @@
 
 #define PREVIOUS state->cwd[state->cwd_length - 1]
 
+#ifdef TSRM_WIN32
+   while ((IS_ABSOLUTE_PATH(state->cwd, state->cwd_length) ||
+   IS_UNC_PATH(state->cwd, state->cwd_length)) &&
+   !IS_SLASH(PREVIOUS)) {
+#else
while (IS_ABSOLUTE_PATH(state->cwd, state->cwd_length) &&
!IS_SLASH(PREVIOUS)) {
+#endif
save = PREVIOUS;
PREVIOUS = '\0';
state->cwd_length--;
}
 
+#ifdef TSRM_WIN32
+   if (!IS_ABSOLUTE_PATH(state->cwd, state->cwd_length) &&
+   !IS_UNC_PATH(state->cwd, state->cwd_length)) {
+#else
if (!IS_ABSOLUTE_PATH(state->cwd, state->cwd_length)) {
+#endif
state->cwd[state->cwd_length++] = save;
state->cwd[state->cwd_length] = '\0';
} else {








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




#21095 [Opn->Fbk]: symlink and chroot

2002-12-19 Thread iliaa
 ID:   21095
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Feedback
 Bug Type: Filesystem function related
 Operating System: Redhat 7.2
 PHP Version:  4.3.0RC3
 New Comment:

Are you using PHP with thread safety enabled?


Previous Comments:


[2002-12-19 06:11:44] [EMAIL PROTECTED]

if I use



the symlink that is created in /home/foo_alfa is 
bar -> /home/foo

ant not
bar -> ../foo

how expected

this is a problem because I use chroot jails for ftp and the file
became not accessible.

Andrea Busia





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




#21100 [Opn->Bgs]: php_value include_path does not work in httpd.conf/VirtualHost

2002-12-19 Thread iliaa
 ID:   21100
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Bogus
 Bug Type: *Configuration Issues
 Operating System: Linux  RH7.3
 PHP Version:  4.2.3
 New Comment:

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

Thank you for your interest in PHP.

Dupe of #20377


Previous Comments:


[2002-12-19 14:44:42] [EMAIL PROTECTED]

I cannot override the include_path setting while in VirtualHost while I
can do it in .htaccess files.




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




#21088 [Opn->Fbk]: Pspell breaks connecting to mysql using localhost

2002-12-19 Thread iliaa
 ID:   21088
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Feedback
 Bug Type: Pspell related
 Operating System: Linux 2.4
 PHP Version:  4.3.0RC3
 New Comment:

Which version of MySQL & Pspell are you using?


Previous Comments:


[2002-12-18 19:25:19] [EMAIL PROTECTED]

// Where it says:


On the other hand if I change the line to:
mysql_connect("66.139.73.7", "root", "x");
The error message is:

// it should say:

On the other hand if I change the line to:
mysql_connect("66.139.73.7", "root", "x");

I can connect to the database successfully...

The error message when using "localhost" is:

// Sorry for the mixup



[2002-12-18 19:22:26] [EMAIL PROTECTED]

Here is my configure line:

./configure --with-mysql=/usr/local/mysql \
--with-pspell \
--with-xml \
--with-apxs2=/usr/local/apache2/bin/apxs \
--enable-track-vars \
--with-gd \
--with-freetype-dir=/usr \
--enable-gd-native-ttf \
--enable-gd-imgstrttf \
--with-jpeg-dir=/usr \
--with-png-dir=/usr \
--with-zlib

The perpetrating line is :

mysql_connect("localhost", "root", "x");

// this is NOT my server password

On the other hand if I change the line to:

mysql_connect("66.139.73.7", "root", "x");

The error message is:

Warning: mysql_connect() [function.mysql-connect]: Can't connect to
local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in
/home/melwakil/web/QueryClass.php on line 9


After doing a make distclean and reinstalling php without with-pspell
on the command line, it connects fine.




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




php-bugs@lists.php.net

2002-12-19 Thread frdejesus
From: [EMAIL PROTECTED]
Operating system: Windows 2000 Server
PHP version:  4.2.3
PHP Bug Type: Scripting Engine problem
Bug description:  Does not recognized URL Query strings, and &php_self

I have install PHP version 4.2.3. I used the windows intallation version.
When I try to pass variables trought url, it does not pass any values. Is
not parsing url query string. Also $php_self does not return anything. I'm
trying to configure phpcollab on a windows 2000 server.

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




#21081 [Opn->Fbk]: SMTP set to localhost or 127.0.0.1 doesn't work.

2002-12-19 Thread iliaa
 ID:   21081
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Feedback
 Bug Type: Mail related
 Operating System: Windows 2000
 PHP Version:  4.2.2
 New Comment:

Please try using this CVS snapshot:

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

Is your SMTP server (local) using any sort of authentication scheme?


Previous Comments:


[2002-12-18 12:38:36] [EMAIL PROTECTED]

I am using PHP versio 4.2.2 on Windows 2000, installed with
php-4.2.2-installer.exe.

MS SMTP is running and works fine with CDONTS in ASP.

But PHP cannot send email if php.ini is set to SMTP =localhost or to
SMTP =127.0.0.1.

It does work if set to my ISP's SMTP server.




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




#21102 [NEW]: stat, lstat fail if filesize larger than 2 GB

2002-12-19 Thread bonebakker
From: [EMAIL PROTECTED]
Operating system: solaris
PHP version:  4.2.3
PHP Bug Type: *Directory/Filesystem functions
Bug description:  stat, lstat fail if filesize larger than 2 GB


~

if the file /tmp/very_large_file is larger than 2 GB, php reports the
error:

Warning: stat failed for /tmp/very_large_file (errno=79 - Value too large
for defined data type)


php_4.2.3 is compiled as an apache_1.3.27 module




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




#21093 [Opn->Fbk]: PHPSESSID not being added to form action="" if input type="image" used

2002-12-19 Thread iliaa
 ID:   21093
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Feedback
 Bug Type: Session related
 Operating System: Red Hat Linux 7.2
 PHP Version:  4.2.3
 New Comment:

Please try using this CVS snapshot:

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




Previous Comments:


[2002-12-19 03:28:17] [EMAIL PROTECTED]

I have session.auto_start = 1 in my php.ini. I find that the SID is not
being added to a form's action="" value if the form contains a  tag ...

This is a serious bug as it causes sessions to be lost if  buttons are used in a form.

Pasted below is the output of PHP for one of my page swhere I use a
form and in it there is an  tag. As you can see the
SID is added to the src="" of the image but not to the action="" field
of the form, where I believe it is the right place to put it ...

Jc






  
   
   
  
  Ì´Ãæ¤Ë¤Ê¤Ã¤Æ¸«¤Þ¤·¤¿¡£¤½¤ó¤Ê´¶Æ°¤ò¤¢¤Ê¤¿¤â¥«¥¹¥¿¥Þ¡¼¥ì¥Ó¥å¡¼¤Ø½ñ¤­¹þ¤ß¤Þ¤»¤ó¤«¡©¥«¥¹¥¿¥Þ¡¼¥ì¥Ó¥å¡¼¤Ç¤Ï¥æ¡¼¥¶¡¼¤ÎÀ¸¤ÎÈ¿±þ¤ò¤ªÅÁ¤¨¤¤¤¿¤·¤Þ¤¹¡£

  
 







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




#21070 [Opn->Bgs]: ftp_rawlist - Permissions on listing

2002-12-19 Thread iliaa
 ID:   21070
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Bogus
 Bug Type: FTP related
 Operating System: Win2k Advanced Server
 PHP Version:  4.3.0RC3
 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.

IIS/Win32 permission issue, not a PHP problem.


Previous Comments:


[2002-12-17 14:25:09] [EMAIL PROTECTED]

All,

Implemenation specifics.

OS: Win2k Advanced Server
PHP Version: 4.3.0RC3 AS CGI

I apologize for bringing this up again. I know everyone is tired of
seeing issues on ftp_*() functions. 

Here is my issue. I have a Web page running on IIS5 Win2k Advanced
Server. This page allows the user to enter hostname, username and
password. From this form I to the FTP using the standard command.

This script works great if I run under and admin level account. If I
run under a general user I am able to logon but nothing is reported to
the Web page. Funny thing still is if I run the script from a DOS
window the output is returned. 

This has got to be a permissions issue but I do not know where to
start. I have verified that everyone has PATH and permission to
php-cgi.exe.

Below is a snip of the FTP code I started with. And I did change the
hostname and password information;

");
ftp_login($conn, "", "");
$nlist = ftp_nlist($conn, "");
$rawlist = ftp_rawlist($conn, "");

echo "";
print_r($nlist);
print_r($rawlist);
echo "";
?>




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




php-bugs@lists.php.net

2002-12-19 Thread iliaa
 ID:   21101
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Bogus
 Bug Type: Scripting Engine problem
 Operating System: Windows 2000 Server
 PHP Version:  4.2.3
 New Comment:

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

Your register_globals are Off, either enable this option or use the
superglobals like $_GET, $_POST, $_REQUEST and so on.


Previous Comments:


[2002-12-19 18:50:13] [EMAIL PROTECTED]

I have install PHP version 4.2.3. I used the windows intallation
version. When I try to pass variables trought url, it does not pass any
values. Is not parsing url query string. Also $php_self does not return
anything. I'm trying to configure phpcollab on a windows 2000 server.

Any help!
???




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




#21060 [Opn->Bgs]: range() gives warning and returns false when low == high

2002-12-19 Thread iliaa
 ID:   21060
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Bogus
 Bug Type: Arrays related
 Operating System: Linux 2.4.18
 PHP Version:  4CVS-2002-12-16 (dev)
 New Comment:

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

Nothing wrong with this behaviour, the low & high point are the same,
hence the false output indicating failure.


Previous Comments:


[2002-12-17 01:13:37] [EMAIL PROTECTED]




Warning: range() [http://www.php.net/function.range]: 
step exceeds the specified range in - on line 3

Numerous scripts expect range() to return the low 
(or high) value (in this case 2 ) when low == high. 

This is useful in cases where the low and high values
are dynamically generated.

But since the default step is 1, there is a warning
and a FALSE returned when low == high.

http://freedomink.org/code/php/patches/array.c.patch

The above patch makes range return low when 
(low == high).

Please comment.

- Chandrashekhar





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




#20989 [Com]: URL variable without = affects other URL variable

2002-12-19 Thread bugs-php-net-2002-12-13
 ID:   20989
 Comment by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Feedback
 Bug Type: *URL Functions
 Operating System: Linux
 PHP Version:  4.2.2
 New Comment:

The bug has already been fixed, I checked 4.4.0-dev
(php4-200212191830).


Previous Comments:


[2002-12-13 08:17:47] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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



[2002-12-13 08:16:24] [EMAIL PROTECTED]

?a&b&c=3&d=4&e=5
This results in HTTP_GET_VARS:
a=
b=
c=3
The variables d and e are missing. For each variable without = it
deletes a variable at the end.




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




#20989 [Fbk->Csd]: URL variable without = affects other URL variable

2002-12-19 Thread iliaa
 ID:   20989
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Feedback
+Status:   Closed
 Bug Type: *URL Functions
 Operating System: Linux
 PHP Version:  4.2.2
 New Comment:

This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

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

User reports that the problem was fixed.


Previous Comments:


[2002-12-19 19:02:23] [EMAIL PROTECTED]

The bug has already been fixed, I checked 4.4.0-dev
(php4-200212191830).



[2002-12-13 08:17:47] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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



[2002-12-13 08:16:24] [EMAIL PROTECTED]

?a&b&c=3&d=4&e=5
This results in HTTP_GET_VARS:
a=
b=
c=3
The variables d and e are missing. For each variable without = it
deletes a variable at the end.




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




#21065 [Opn->Fbk]: shell_exec seems not to work properly if result was false.

2002-12-19 Thread iliaa
 ID:   21065
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Feedback
 Bug Type: Reproducible crash
 Operating System: Windows 2000 Server
 PHP Version:  4.2.3
 New Comment:

Please try using this CVS snapshot:

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




Previous Comments:


[2002-12-17 06:41:55] [EMAIL PROTECTED]

Running PHP 4.2.3 on Windows 2000 Server shell_exec works fine and
passes its output to the variable when the result of the executed
command is true. 
However, if the command fails and the DOS-shell returns an error the
result is no longer availiable in the variable but is passed directly
to the page.




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




#21103 [NEW]: conflicting types for gdIOCtx when re-compiling php 4.2.3

2002-12-19 Thread cash
From: [EMAIL PROTECTED]
Operating system: suse 8.0 
PHP version:  4.2.3
PHP Bug Type: GD related
Bug description:  conflicting types for gdIOCtx when re-compiling php 4.2.3

http://ronin.polarcom.com/phpinfo.php
for base config before loading gd

freetype2-devel-2.0.8-30
libpng-1.2.5
jpeg-6b

both modified and unmodified gd-2.0.1 makefile.unix  
LIBS= -lgd -> libgd.a 
give the same result

2 different configre options, same result
./configure --with-apxs=/www/bin/apxs --with-mysql
--with-gd=/usr/local/src/gd-2.0.1 --enable-gd-native-ttf --with-bz2
--with-zlib

./configure --with-apxs=/www/bin/apxs --with-mysql
--with-gd=/usr/local/src/gd-2.0.1 --enable-gd-native-ttf --with-bz2
--with-zlib  --with-freetype-dir=/usr --enable-gd-imgstrttf
--with-jpeg-dir=/usr --with-png-dir=/usr

configure works ok, doesn't give any errors,
but when I make:
>>Making all in gd
>>make[2]: Entering directory `/usr/local/src/php->>4.2.3/ext/gd'
>>make[3]: Entering directory `/usr/local/src/php->>4.2.3/ext/gd'
>>/bin/sh /usr/local/src/php-4.2.3/libtool --silent -->>mode=compile gcc 
-I. -I/usr/local/src/php-4.2.3/ext/gd ->>I/usr/local/src/php-4.2.3/main
-I/usr/local/src/php->>4.2.3 -I/www/include
-I/usr/local/src/php-4.2.3/Zend
->>I/usr/local/src/php-4.2.3/ext/mysql/libmysql
->>I/usr/local/src/php-4.2.3/ext/xml/expat  -DLINUX=22 ->>DUSE_HSREGEX
-DUSE_EXPAT -I/usr/local/src/php-4.2.3/TSRM ->>g -O2 -prefer-pic  -c gd.c
>>In file included from gd.c:36:
>>php_gd.h:69: warning: static declaration for >>`gdImageColorResolve'
follows non-static
>>gd.c:92: conflicting types for `gdIOCtx'
>>/usr/include/gd_io.h:18: previous declaration of `gdIOCtx'
>>make[3]: *** [gd.lo] Error 1
>>make[3]: Leaving directory `/usr/local/src/php->>4.2.3/ext/gd'
>>make[2]: *** [all-recursive] Error 1
>>make[2]: Leaving directory `/usr/local/src/php->>4.2.3/ext/gd'
>>make[1]: *** [all-recursive] Error 1
>>make[1]: Leaving directory `/usr/local/src/php-4.2.3/ext'
>>make: *** [all-recursive] Error 1

*This is my first bug report so I am not shure what more I could give... 
Feel free to e-mail me for more info or if you have anything you would
like my to try!

If this is a proper bug and It gets fixed THANK YOU VERY MUCH!
-- 
Edit bug report at http://bugs.php.net/?id=21103&edit=1
-- 
Try a CVS snapshot: http://bugs.php.net/fix.php?id=21103&r=trysnapshot
Fixed in CVS:   http://bugs.php.net/fix.php?id=21103&r=fixedcvs
Fixed in release:   http://bugs.php.net/fix.php?id=21103&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=21103&r=needtrace
Try newer version:  http://bugs.php.net/fix.php?id=21103&r=oldversion
Not developer issue:http://bugs.php.net/fix.php?id=21103&r=support
Expected behavior:  http://bugs.php.net/fix.php?id=21103&r=notwrong
Not enough info:http://bugs.php.net/fix.php?id=21103&r=notenoughinfo
Submitted twice:http://bugs.php.net/fix.php?id=21103&r=submittedtwice
register_globals:   http://bugs.php.net/fix.php?id=21103&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=21103&r=php3
Daylight Savings:   http://bugs.php.net/fix.php?id=21103&r=dst
IIS Stability:  http://bugs.php.net/fix.php?id=21103&r=isapi




#21103 [Opn->Csd]: conflicting types for gdIOCtx when re-compiling php 4.2.3

2002-12-19 Thread iliaa
 ID:   21103
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Closed
 Bug Type: GD related
 Operating System: suse 8.0
 PHP Version:  4.2.3
 New Comment:

This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

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




Previous Comments:


[2002-12-19 19:22:28] [EMAIL PROTECTED]

http://ronin.polarcom.com/phpinfo.php
for base config before loading gd

freetype2-devel-2.0.8-30
libpng-1.2.5
jpeg-6b

both modified and unmodified gd-2.0.1 makefile.unix  
LIBS= -lgd -> libgd.a 
give the same result

2 different configre options, same result
./configure --with-apxs=/www/bin/apxs --with-mysql
--with-gd=/usr/local/src/gd-2.0.1 --enable-gd-native-ttf --with-bz2
--with-zlib

./configure --with-apxs=/www/bin/apxs --with-mysql
--with-gd=/usr/local/src/gd-2.0.1 --enable-gd-native-ttf --with-bz2
--with-zlib  --with-freetype-dir=/usr --enable-gd-imgstrttf
--with-jpeg-dir=/usr --with-png-dir=/usr

configure works ok, doesn't give any errors,
but when I make:
>>Making all in gd
>>make[2]: Entering directory `/usr/local/src/php->>4.2.3/ext/gd'
>>make[3]: Entering directory `/usr/local/src/php->>4.2.3/ext/gd'
>>/bin/sh /usr/local/src/php-4.2.3/libtool --silent -->>mode=compile
gcc  -I. -I/usr/local/src/php-4.2.3/ext/gd
->>I/usr/local/src/php-4.2.3/main -I/usr/local/src/php->>4.2.3
-I/www/include -I/usr/local/src/php-4.2.3/Zend
->>I/usr/local/src/php-4.2.3/ext/mysql/libmysql
->>I/usr/local/src/php-4.2.3/ext/xml/expat  -DLINUX=22 ->>DUSE_HSREGEX
-DUSE_EXPAT -I/usr/local/src/php-4.2.3/TSRM ->>g -O2 -prefer-pic  -c
gd.c
>>In file included from gd.c:36:
>>php_gd.h:69: warning: static declaration for >>`gdImageColorResolve'
follows non-static
>>gd.c:92: conflicting types for `gdIOCtx'
>>/usr/include/gd_io.h:18: previous declaration of `gdIOCtx'
>>make[3]: *** [gd.lo] Error 1
>>make[3]: Leaving directory `/usr/local/src/php->>4.2.3/ext/gd'
>>make[2]: *** [all-recursive] Error 1
>>make[2]: Leaving directory `/usr/local/src/php->>4.2.3/ext/gd'
>>make[1]: *** [all-recursive] Error 1
>>make[1]: Leaving directory `/usr/local/src/php-4.2.3/ext'
>>make: *** [all-recursive] Error 1

*This is my first bug report so I am not shure what more I could
give...  Feel free to e-mail me for more info or if you have anything
you would like my to try!

If this is a proper bug and It gets fixed THANK YOU VERY MUCH!




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




#20583 [Opn->Fbk]: Variable values inconsistent with assignment statements.

2002-12-19 Thread msopacua
 ID:   20583
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Feedback
 Bug Type: Variables related
 Operating System: RedHat 7.2
 PHP Version:  4CVS-2002-11-22 (stable)
 New Comment:

you're focussing on the wrong issue. It should be *self-contained*. Can
you still reproduce the issue, when you strip the ora_* stuff and
without sessions? If not, add sessions back in, then the ora_*.

>From what you're reporting:

should result in 'one one'.

If this isn't the case, then it's not a variable issue, but specific to
some module. Unless we find out what module causes the behavior,
there's not much we can do.


Previous Comments:


[2002-12-19 15:25:15] [EMAIL PROTECTED]

Ok, I've been able to narrow this bug down to a much simpler PHP
script. We have also confirmed that it is definitely a problem with the
newer version of PHP since we are running an identical script on
production, with an older version of PHP, and it is error free.

The following script should allow you to recreate the problem. You
should disable cookies on the browser in order to have the error
recreated each subsequent refresh. Otherwise, the error will only
happen the first time you view the page, and will be gone on
refreshes.

__
";
print "Another = $another";
print "Obviously Messed Up = $obviously_messed_up";
?>


Output of Above Code:
SQL = Resource id #3
Another = Resource id #3
Obviously Messed Up = Resource id #3



[2002-12-11 01:03:31] [EMAIL PROTECTED]

Please provide us a complete, self-contained and short script which can
be used to reproduce this.
(you're most likely doing something wrong..)




[2002-12-10 19:12:37] [EMAIL PROTECTED]

We have upgraded our PHP to the version given below, and are still
experiencing the same problems. 

Thanks



[2002-12-07 15:41:30] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2002-11-22 12:58:04] [EMAIL PROTECTED]

I haven't been able to recreate this problem at all in a controlled
environment, but I can recreate it consistently where we originally
discovered it. 

Here is the snidbit of the function causing the erroneous output:
___
function do_mail_command($cmd,$server="morpheus.myersinternet.com") {

print "values prior to setting are: server => $servererrno =>
$errnoerrstr => $errstrwhoknows => $whoknows";

if(empty($server)) {
  print "server is empty, so changing values";
$server = "this is the first one";
$errno = "here is the second one";
$errstr = "but they will all be this";
$random_variable = "does this work";
print "values after setting: server => $servererrno =>
$errnoerrstr => $errstrwhoknows => $whoknows";
}

$fp = fsockopen($server, 5154, $errno, $errstr, 10);
_

Here is the output of that exact piece of code:

values prior to setting are:
server => morpheus.myersinternet.com
errno => morpheus.myersinternet.com
errstr => morpheus.myersinternet.com
whoknows => morpheus.myersinternet.com

server is empty, so changing values

values after setting:

server => does this work
errno => does this work
errstr => does this work
whoknows => does this work



There are three main problems I see occurring here.

1. The first print statement prints out a bunch of "random" variables,
$server being the only that has previously been given a value. However,
as the print statement shows, they ALL have values.

2. The empty($server) check returns true even though its obviously
clear that $server is NOT empty.

3. After performing variuos assignment statements within the if block,
and printing out the variable values, it's clear that ALL the variables
receive the value of the LAST assignment statement made.

We found this bug because when calling fsockopen, the $errno and
$errstr variables had values even though they were never assigned any
values and it was causing the function to fail when trying to open the
socket. This function was working fine prior to our upgrade to the
latest version.

Our configure line is:
LoadModule php4_module modules/libphp4.so

We are also heavily using session

#20928 [Fbk->Opn]: Static compile of PHP module with IBM DB2 doesn't work right with apache

2002-12-19 Thread truth
 ID:   20928
 User updated by:  [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Feedback
+Status:   Open
 Bug Type: ODBC related
 Operating System: RH 7.2
 PHP Version:  4.3.0RC2
 New Comment:

The latest snapshot yields this error when compiling PHP:

gcc  -Isapi/cli/
-I/usr/src/redhat/BUILD/php4-STABLE-200212200030/sapi/cli/ -DPH
P_ATOM_INC -I/usr/src/redhat/BUILD/php4-STABLE-200212200030/include
-I/usr/src/r
edhat/BUILD/php4-STABLE-200212200030/main
-I/usr/src/redhat/BUILD/php4-STABLE-20
0212200030 -I/usr/src/redhat/BUILD/php4-STABLE-200212200030/Zend
-I/usr/local/in
clude -I/usr/include/imap
-I/usr/src/redhat/BUILD/php4-STABLE-200212200030/ext/x
ml/expat  -I/usr/src/redhat/BUILD/php4-STABLE-200212200030/TSRM  -g -O2
 -c /usr
/src/redhat/BUILD/php4-STABLE-200212200030/sapi/cli/php_cli.c -o
sapi/cli/php_cl
i.o  && echo > sapi/cli/php_cli.lo
gcc  -Isapi/cli/
-I/usr/src/redhat/BUILD/php4-STABLE-200212200030/sapi/cli/ -DPH
P_ATOM_INC -I/usr/src/redhat/BUILD/php4-STABLE-200212200030/include
-I/usr/src/r
edhat/BUILD/php4-STABLE-200212200030/main
-I/usr/src/redhat/BUILD/php4-STABLE-20
0212200030 -I/usr/src/redhat/BUILD/php4-STABLE-200212200030/Zend
-I/usr/local/in
clude -I/usr/include/imap
-I/usr/src/redhat/BUILD/php4-STABLE-200212200030/ext/x
ml/expat  -I/usr/src/redhat/BUILD/php4-STABLE-200212200030/TSRM  -g -O2
 -c /usr
/src/redhat/BUILD/php4-STABLE-200212200030/sapi/cli/getopt.c -o
sapi/cli/getopt.
o  && echo > sapi/cli/getopt.lo
gcc  -Imain/ -I/usr/src/redhat/BUILD/php4-STABLE-200212200030/main/
-DPHP_ATOM_I
NC -I/usr/src/redhat/BUILD/php4-STABLE-200212200030/include
-I/usr/src/redhat/BU
ILD/php4-STABLE-200212200030/main
-I/usr/src/redhat/BUILD/php4-STABLE-2002122000
30 -I/usr/src/redhat/BUILD/php4-STABLE-200212200030/Zend
-I/usr/local/include -I
/usr/include/imap
-I/usr/src/redhat/BUILD/php4-STABLE-200212200030/ext/xml/expat
  -I/usr/src/redhat/BUILD/php4-STABLE-200212200030/TSRM  -g -O2  -c
main/interna
l_functions_cli.c -o main/internal_functions_cli.o  && echo >
main/internal_func
tions_cli.lo
/bin/sh libtool --silent --mode=link gcc -export-dynamic -g -O2 
-L/home/db2inst
1/lib -rdynamic -L/usr/local/lib -L/usr/local/Informix/lib
-L/usr/local/Informix
/lib/esql -L/usr/src/redhat/BUILD/php4-STABLE-200212200030/ext/informix
 -R /usr
/local/lib -R /usr/local/Informix/lib -R /usr/local/Informix/lib/esql
-R /usr/sr
c/redhat/BUILD/php4-STABLE-200212200030/ext/informix ext/zlib/zlib.lo
ext/zlib/z
lib_fopen_wrapper.lo ext/bcmath/bcmath.lo ext/bcmath/number.lo
ext/bcmath/libbcm
ath/src/add.lo ext/bcmath/libbcmath/src/div.lo
ext/bcmath/libbcmath/src/init.lo
ext/bcmath/libbcmath/src/neg.lo ext/bcmath/libbcmath/src/outofmem.lo
ext/bcmath/
libbcmath/src/raisemod.lo ext/bcmath/libbcmath/src/rt.lo
ext/bcmath/libbcmath/sr
c/sub.lo ext/bcmath/libbcmath/src/compare.lo
ext/bcmath/libbcmath/src/divmod.lo
ext/bcmath/libbcmath/src/int2num.lo
ext/bcmath/libbcmath/src/num2long.lo ext/bcm
ath/libbcmath/src/output.lo ext/bcmath/libbcmath/src/recmul.lo
ext/bcmath/libbcm
ath/src/sqrt.lo ext/bcmath/libbcmath/src/zero.lo
ext/bcmath/libbcmath/src/debug.
lo ext/bcmath/libbcmath/src/doaddsub.lo
ext/bcmath/libbcmath/src/nearzero.lo ext
/bcmath/libbcmath/src/num2str.lo ext/bcmath/libbcmath/src/raise.lo
ext/bcmath/li
bbcmath/src/rmzero.lo ext/bcmath/libbcmath/src/str2num.lo
ext/ctype/ctype.lo ext
/fdf/fdf.lo ext/imap/php_imap.lo ext/informix/ifx.lo ext/ldap/ldap.lo
ext/mysql/
php_mysql.lo ext/mysql/libmysql/libmysql.lo
ext/mysql/libmysql/errmsg.lo ext/mys
ql/libmysql/net.lo ext/mysql/libmysql/violite.lo
ext/mysql/libmysql/password.lo
ext/mysql/libmysql/my_init.lo ext/mysql/libmysql/my_lib.lo
ext/mysql/libmysql/my
_static.lo ext/mysql/libmysql/my_malloc.lo
ext/mysql/libmysql/my_realloc.lo ext/
mysql/libmysql/my_create.lo ext/mysql/libmysql/my_delete.lo
ext/mysql/libmysql/m
y_tempnam.lo ext/mysql/libmysql/my_open.lo
ext/mysql/libmysql/mf_casecnv.lo ext/
mysql/libmysql/my_read.lo ext/mysql/libmysql/my_write.lo
ext/mysql/libmysql/erro
rs.lo ext/mysql/libmysql/my_error.lo ext/mysql/libmysql/my_getwd.lo
ext/mysql/li
bmysql/my_div.lo ext/mysql/libmysql/mf_pack.lo
ext/mysql/libmysql/my_messnc.lo e
xt/mysql/libmysql/mf_dirname.lo ext/mysql/libmysql/mf_fn_ext.lo
ext/mysql/libmys
ql/mf_wcomp.lo ext/mysql/libmysql/typelib.lo
ext/mysql/libmysql/safemalloc.lo ex
t/mysql/libmysql/my_alloc.lo ext/mysql/libmysql/mf_format.lo
ext/mysql/libmysql/
mf_path.lo ext/mysql/libmysql/mf_unixpath.lo
ext/mysql/libmysql/my_fopen.lo ext/
mysql/libmysql/mf_loadpath.lo ext/mysql/libmysql/my_pthread.lo
ext/mysql/libmysq
l/my_thr_init.lo ext/mysql/libmysql/thr_mutex.lo
ext/mysql/libmysql/mulalloc.lo
ext/mysql/libmysql/string.lo ext/mysql/libmysql/default.lo
ext/mysql/libmysql/my
_compress.lo ext/mysql/libmysql/array.lo ext/mysql/libmysql/my_once.lo
ext/mysql
/libmysql/list.lo ext/mysql/libmysql/my_net.lo
ext/mysql/libmysql/dbug.lo ext/my
sql/libmysql/st

#21087 [Fbk->Opn]: Rewriting file no longer works

2002-12-19 Thread gfraley5
 ID:   21087
 User updated by:  [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Feedback
+Status:   Open
 Bug Type: Filesystem function related
 Operating System: XP
 PHP Version:  4.3.0RC3
 New Comment:

It appears to be the flock() call.  This fails.  However, if you
comment out the flock() calls it works.

$filename = "c:/phptest.txt";
$data = "This is test text";
$fp = fopen("$filename",'w');
flock($fp,1);
$len = fwrite($fp,$data);
flock($fp,3);
fclose($fp);
echo "Wrote $len bytes";


Previous Comments:


[2002-12-19 11:27:09] [EMAIL PROTECTED]

Keep this at feedback.
(and note that I am not [EMAIL PROTECTED] and that my previous comment
on this was my first).



[2002-12-19 11:17:24] [EMAIL PROTECTED]

Sorry for the misunderstanding.  First of all I did not know that you
were a developer working the problem. Nothing in your comment told me
that.  Secondly, I have already stated that I will try to produce a
smaller script (see my original post).  I just haven't had time to work
the problem.  As to the buffering, without it, the full text is not
written out.  It gets truncated.



[2002-12-19 07:43:14] [EMAIL PROTECTED]

Please try and cut down the script to a complete self-contained example
that I can run here.
I'm not going to spend hours debugging a long, incomplete code
fragment.
What I'm looking for it something like this:

$fp = fopen($filename, "w");
$len = fwrite($fp, $data);
fclose($fp);
echo "Wrote $len bytes";

If that works, try adding in the flock calls.
If that works, try adding in those set_file_buffer calls
(NB: there does not seem to be a need to play with file
buffering in this case).

Please help me to help you.



[2002-12-19 07:16:01] [EMAIL PROTECTED]

I'm running Apache 1.3.27.  I haven't tested it under *nix.  As far as
a code snippet, I will assume that it is in this code, somewhere:

if ($admin_from_web==true) {
$row = 0;
$insert_msg = '';
$fp = fopen("$path_to_gb",'r') or die("$unable_to_access_file_msg
$path_to_gb");
set_file_buffer($fp,$buffersize);
flock($fp,1);
$num = 16;
for ($i=0;$i<$num;$i++) {
$j = $i+1;
$head_array[$i] = ${"col$j"};
}
while ($data = fgetcsv($fp,$csv_buffer_size,",")) {
$row++;
if ($row<2) continue;
$new_msg = "";
if ($data[0]==$msgid) {
if (!empty($update)) {
reset ($HTTP_POST_VARS);
while (list ($key, $val) = each ($HTTP_POST_VARS)) {   
 
$found=false;
for ($i=0;$i1) {
$rec[$c] = 
htmlspecialchars($rec[$c],ENT_QUOTES);
$rec[$c] = 
str_replace("&#","&#",$rec[$c]); 
$new_msg .= $comma."\"$rec[$c]\""; 
 
}
elseif ($c<4) $new_msg .= $comma."$rec[$c]";
else $new_msg .= $comma."\"$rec[$c]\"";
if (chop($data[$c])!=chop($rec[$c])) {
$msg .= "$head_array[$c]: 
[$data[$c]]\n\n$head_array[$c]:
[$rec[$c]]\n\n\n";
}
}
$new_msg .= "\n";
if ($admin_email_advice_on_gb_edit && 
!empty($admin_email_address))
{
$to = 
"$admin_email_address,$admin_email_address_addl";
$subject = "$admin_email_subject_on_gb_edit";
@mail($to, $subject, "$msg","From: 
$admin_email_address") ;
}
}
}
else {
for ($c=0;$c<$num;$c++) {
$val = $data[$c];
if ($c==0) $comma=""; 
else $comma=",";
if ($c==13&&$row>1) $new_msg .= $comma."\"$val\"";
elseif ($c<4&&$row>1) $new_msg .= $comma."$val";
else $new_msg .= $comma."\"$val\"";
}

#17978 [Com]: Large file upload doesn't work remotely

2002-12-19 Thread xjpmauricio
 ID:   17978
 Comment by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Bogus
 Bug Type: HTTP related
 Operating System: Windows 2000 Server
 PHP Version:  4.2.1
 New Comment:

i used to have the same problem but now i receive 200M uploads on my
apache server running on php4.3orc3
I´ve changed my php.ini file like this:

;;;
; Resource Limits ;
;;;

max_execution_time = 0 
max_input_time = 0
memory_limit = 8M 

;Maximum size of POST data that PHP will accept.
post_max_size = 240M

file_uploads = On

; Maximum allowed size for uploaded files.
upload_max_filesize = 240M

it has been working fine 4 me!!! my server is in portugal and i have
received 200Mb file from a friend in Canada!
it shoul work 4 u!...


Previous Comments:


[2002-07-05 14:13:11] [EMAIL PROTECTED]

Sorry, but the bug system is not the appropriate forum for asking
support questions. 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

Thank you for your interest in PHP.


Not likely any problem with PHP but IIS/Windows..etc.




[2002-06-26 15:20:20] [EMAIL PROTECTED]

As I think it may happen, whan uploading a file bigger than 500k, the
web browser shows the URL:

res://C:\WINNT\System32\shdoclc.dll/dnserror.htm#http://192.168.0.15:1080/teste.php

Thanks in advance for any help.



[2002-06-25 14:52:11] [EMAIL PROTECTED]

I'm trying to make a page for file uploads. For small files, everything
goes ok, but doesn't work when I try to upload large files.

The limit size for uploading is suposed to be 100Mb. I've set up my
php.ini with this config:

post_max_size = 100M
memory_limit = 128M
upload_max_filesize = 100M

When I access through http://localhost/upload.htm, and post a large
file, Ok. But if I access the page remotely, or even locally, but using
my LAN IP Address (http://192.168.0.15/upload.htm) and post a large
file, either browser stays as is (hangs) or, most commonly, the browser
shows a "server not found"/"page cannot be displayed" page, instantly.
But, as I sad, this problem occurs only when posting large files.

Additional config:
Browsers: Internet Explorer 6 and Netscape 7 (netscape pops a "document
contained no data" message)
Server API: CGI
PHP Version: 4.2.1
Server Software: Microsoft-IIS/5.0

Here goes the scripts:

// - upload.htm -- //

   

  
   

  



// - upload.php -- //






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




#21087 [Opn->Ctl]: Rewriting file no longer works

2002-12-19 Thread iliaa
 ID:   21087
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Critical
 Bug Type: Filesystem function related
 Operating System: XP
 PHP Version:  4.3.0RC3
 New Comment:

Small note, the 2nd flock (flock($fp,3);) is entirely optional. The
problem is occures if prior to write the LOCK_SH is set on the file,
the problem does not happen if LOCK_EX is used.


Previous Comments:


[2002-12-19 21:21:56] [EMAIL PROTECTED]

It appears to be the flock() call.  This fails.  However, if you
comment out the flock() calls it works.

$filename = "c:/phptest.txt";
$data = "This is test text";
$fp = fopen("$filename",'w');
flock($fp,1);
$len = fwrite($fp,$data);
flock($fp,3);
fclose($fp);
echo "Wrote $len bytes";



[2002-12-19 11:27:09] [EMAIL PROTECTED]

Keep this at feedback.
(and note that I am not [EMAIL PROTECTED] and that my previous comment
on this was my first).



[2002-12-19 11:17:24] [EMAIL PROTECTED]

Sorry for the misunderstanding.  First of all I did not know that you
were a developer working the problem. Nothing in your comment told me
that.  Secondly, I have already stated that I will try to produce a
smaller script (see my original post).  I just haven't had time to work
the problem.  As to the buffering, without it, the full text is not
written out.  It gets truncated.



[2002-12-19 07:43:14] [EMAIL PROTECTED]

Please try and cut down the script to a complete self-contained example
that I can run here.
I'm not going to spend hours debugging a long, incomplete code
fragment.
What I'm looking for it something like this:

$fp = fopen($filename, "w");
$len = fwrite($fp, $data);
fclose($fp);
echo "Wrote $len bytes";

If that works, try adding in the flock calls.
If that works, try adding in those set_file_buffer calls
(NB: there does not seem to be a need to play with file
buffering in this case).

Please help me to help you.



[2002-12-19 07:16:01] [EMAIL PROTECTED]

I'm running Apache 1.3.27.  I haven't tested it under *nix.  As far as
a code snippet, I will assume that it is in this code, somewhere:

if ($admin_from_web==true) {
$row = 0;
$insert_msg = '';
$fp = fopen("$path_to_gb",'r') or die("$unable_to_access_file_msg
$path_to_gb");
set_file_buffer($fp,$buffersize);
flock($fp,1);
$num = 16;
for ($i=0;$i<$num;$i++) {
$j = $i+1;
$head_array[$i] = ${"col$j"};
}
while ($data = fgetcsv($fp,$csv_buffer_size,",")) {
$row++;
if ($row<2) continue;
$new_msg = "";
if ($data[0]==$msgid) {
if (!empty($update)) {
reset ($HTTP_POST_VARS);
while (list ($key, $val) = each ($HTTP_POST_VARS)) {   
 
$found=false;
for ($i=0;$i1) {
$rec[$c] = 
htmlspecialchars($rec[$c],ENT_QUOTES);
$rec[$c] = 
str_replace("&#","&#",$rec[$c]); 
$new_msg .= $comma."\"$rec[$c]\""; 
 
}
elseif ($c<4) $new_msg .= $comma."$rec[$c]";
else $new_msg .= $comma."\"$rec[$c]\"";
if (chop($data[$c])!=chop($rec[$c])) {
$msg .= "$head_array[$c]: 
[$data[$c]]\n\n$head_array[$c]:
[$rec[$c]]\n\n\n";
}
}
$new_msg .= "\n";
if ($admin_email_advice_on_gb_edit && 
!empty($admin_email_address))
{
$to = 
"$admin_email_address,$admin_email_address_addl";
$subject = "$admin_email_subject_on_gb_edit";
@mail($to, $subject, "$msg","From: 
$admin_email_address") ;
}
}
}
else {
for ($c=0;$c<$num;$c++) {
$val = $data[$c];
if ($c==0) $comma=""; 
   

#20529 [Opn->Fbk]: Bad subject line when using JIS encoding

2002-12-19 Thread iliaa
 ID:   20529
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Feedback
 Bug Type: mbstring related
 Operating System: red hat Linux 6.2
 PHP Version:  4.3.0RC1
 New Comment:

Please try using this CVS snapshot:

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




Previous Comments:


[2002-11-20 19:19:33] [EMAIL PROTECTED]

Hi Ya,
  Basically I am using
PHP 4.3.0RC1 (but I have also noticed the same thing with PHP 4.3.0PR2
)
on Red Hat Linux 6.2
with Sendmail 8.9.3

I am basically trying to send a mail in Japanese,
I first encode the text into JIS then simply send as normal,
i.e.
".$subjectja,"Content-Type:
text/plain;charset=\"iso-2022-jp\"\nContent-Transfer-Encoding: 7bit");
// mail
?>
however the subject line does not appear correctly. On viewing the
email source I noticed that it is seemingly removing some characters
from the Subject line JIS,
Subject:  $B%G%$%j!<%l%]!<%H (B <--- this is the resulting subject
line which is broken

test->$B%G%$%j!<%l%]!<%H(B<--- this is the email body which works
fine

 $B%G%$%j!<%l%]!<%H (B
$B%G%$%j!<%l%]!<%H(B

slightly different. Also if you take out the "test->" on the body part
the body of the email will not to work.

p.s. there is no problems with 4.0,4.1 or 4.2

thanks,
Malek




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




#20486 [Opn->Fbk]: register_tick_function crashes apache

2002-12-19 Thread iliaa
 ID:   20486
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Feedback
 Bug Type: Scripting Engine problem
 Operating System: win2k
 PHP Version:  4.4.0-dev
 New Comment:

Please try using this CVS snapshot:

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




Previous Comments:


[2002-12-08 10:56:56] [EMAIL PROTECTED]

Must be some win32 thing as I can not reproduce this within Linux (and
apache 1.3.27).




[2002-11-18 14:00:49] [EMAIL PROTECTED]

think it should be a scripting engine problem.. i dont know.. and its
reproduceble...



[2002-11-18 13:56:54] [EMAIL PROTECTED]

Register_tick_function crashes Apaches. These are the specs.

tried it on combinations of win2k with apache 1.3.22 and php as sapi
with versions 4.2.2 , 4.2.3 and 4.4.0-dev 
and tried it with apache 2.0.43 with 4.4.0-dev too

the scripts was the example code from the documentation. It worked on
our cobalt server but when i wanted to use it for real when working at
home it crashed apache. 

crashes an apache thread (probably) with a memory fault .. couldnt
read
from address 0x0etc . server does keep running though.

when commenting //register_tick_function() it works fine. 
even leaving declare(ticks=1) {..} in tact.

Vincent.




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




#20311 [Opn->Fbk]: Apachechild ends with Memory-Read-Error if using session.serialize_handler=wddx

2002-12-19 Thread iliaa
 ID:   20311
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Feedback
 Bug Type: WDDX related
 Operating System: Windows 2000
 PHP Version:  4.2.3/4.3.0-dev
 New Comment:

Please try using this CVS snapshot:

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




Previous Comments:


[2002-11-11 09:46:00] [EMAIL PROTECTED]

Status changed to OPEN.
I think that's right, isn't it?

If you call phpinfo() there's one little line not there where it should
be:

Section WDDX
WDDX Support: enabled
WDDX Session Serializer (this line is missing)

Michael



[2002-11-11 06:15:11] [EMAIL PROTECTED]

No changes with this version:

Downloaded 11/11/2002

PHP-4.3.0-dev
System: Windows NT localhost 5.0 build 2195 
Build Date: Nov 11 2002 12:13:03 
Server API: Apache 2.0 Filter 
PHP API 20020918
PHP Extension 20020429
Zend Extension 20021010

I used the link above to download the Win32-binaries.

Michael



[2002-11-08 08:51:41] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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



[2002-11-08 08:11:10] [EMAIL PROTECTED]

If your php.ini is set up like

session.serialize_handler = wddx

Apache's Child gets terminated and exits with an Memory-Read Error if
you want to start a session.

(Log: [notice] Parent: child process exited with status 3221225477 --
Restarting.)

Everything else is fine... except BUG#19122 is still there, too.

Configuration:
- Win 2000 SP2
- Apache 2.0.43
- PHP 4.2.3 (Apache 2 Filter DLL)

Bye,
Michael




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




#20232 [Opn->Fbk]: php.exe causes errors when using socket_create

2002-12-19 Thread iliaa
 ID:   20232
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Feedback
 Bug Type: Sockets related
 Operating System: Windows ME
 PHP Version:  4.3.0-dev
 New Comment:

Please try using this CVS snapshot:

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




Previous Comments:


[2002-11-12 22:33:55] [EMAIL PROTECTED]

ok, well, i have scontinued to test it, and it is not just the script i
wroe, I also changed the title to something that seems more descriptive
to the problem



[2002-11-08 16:49:25] [EMAIL PROTECTED]

How odd.

I have found some other interesiting tidbit. It will not accept any
string, but this does work...

$host=getenv("REMOTE_ADDR");



[2002-11-07 18:49:13] [EMAIL PROTECTED]

forget that last comment, I was just changing the PHP version
information..




[2002-11-07 18:48:38] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2002-11-04 18:09:16] [EMAIL PROTECTED]

I deleted everything form my PHP directory and replaced all the files.
All the librares are contained in one directory, and yes this is with
the same script, same everything, just a new place the error occurred



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

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




#17552 [Com]: PHP Apache DSO Compile Failure: Unresolved Symbol: pthread_getspecific

2002-12-19 Thread casey
 ID:   17552
 Comment by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   No Feedback
 Bug Type: Compile Failure
 Operating System: Linux 2.4.18 Glibc
 PHP Version:  4.2.1
 New Comment:

For FreeBSD, you can install either pth or ptl. Both are  
threading libraries, and are available in the fbsd ports  
collection. Then configure php w/ appropriate flag, e.g.  
for pth  --enable-tsrm-pth  
 
I had the exact error as above, with exactly the same 
versions. I installed pth, rebuilt php, and it works great 
now.


Previous Comments:


[2002-12-02 22:55:09] [EMAIL PROTECTED]

This occurs using apache-2.0.43 and php-4.2.3 on FreeBSD4.7 

Compiled with the following options:
./configure --with-mysql --with-apxs

When I run apache I get the following error:
Syntax error on line 230 of /usr/local/apache/conf/httpd.conf:
Cannot load /usr/local/apache/modules/libphp4.so into server:
/usr/local/apache/modules/libphp4.so: Undefined symbol
"pthread_getspecific"



[2002-11-21 06:33:36] [EMAIL PROTECTED]

The same error with me when I try to start Apache service.
the configure options that I used for PHP:

--with-mysql
--with-apxs2

SO: FreeBSD 4.7
Apache: 2.0.43
PHP: 4.2.3



[2002-11-15 10:33:11] [EMAIL PROTECTED]

This occurs using apache-1.3.26 and php-4.2.3 on SuSE7.1 when using
--with-apxs.

I've tried adding LDFLAGS="-lpthread" just to persuade it to link
against that library, but it still doesn't like me - ldd on libphp4.so
makes no difference that way.

Am reverting to --with-apache instead on the off-chance it works...



[2002-09-11 11:14:10] [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.





[2002-06-17 21:25:09] [EMAIL PROTECTED]

Can not reproduce this with. Please try this snapshot:

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




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

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




#20215 [Opn->Fbk]: fputs(); (Line Feed / Carriage Return)

2002-12-19 Thread iliaa
 ID:   20215
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Feedback
 Bug Type: Filesystem function related
 Operating System: Windows 2000
 PHP Version:  4.3RC1
 New Comment:

Please try using this CVS snapshot:

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




Previous Comments:


[2002-11-27 13:22:47] [EMAIL PROTECTED]

I had foreseen what it is necessary since the beginning on:
http://www.serveurperso.com/temp (fichier.txt and copy-paste from the
show_source("fputs.php");)

I send "fputs.php" script and "fichier.txt" sample text file to you
([EMAIL PROTECTED]) to make win you of the time.

I don't arrive determined of or come these 0D0A(hex) in too much. It
doubles has every writings.

(I am French sorry for my english)



[2002-11-27 06:09:24] [EMAIL PROTECTED]

Can you provide a link that will allow me to download the .txt and .php
files directly?
(or zip them up and mail them to me)



[2002-11-26 17:09:01] [EMAIL PROTECTED]

I meet the problem with - Windows 2000 Pro SP3 (FAT32) - Apache 1.3.27
- PHP 4.3RC1 *with php.ini-recommended*
(http://www.serveurperso.com/php.ini)
This small script bug (mini notepad for admin-zone...)
http://www.serveurperso.com/temp/fputs.php
! The bug with PhpMyExplorer text file editor is the same.
Is it can be an Apache problem in the interpretation of the form?



[2002-11-16 17:08:53] [EMAIL PROTECTED]

I can't reproduce the problem using PHP 4.3RC1 or the slightly more up
to date PHP 4.3 development branch and
the script that you provided, either under win XP with IIS
or linux.

I'm using php.ini-recommended, so please make sure that
you don't have any zany settings turned on in your php.ini or server
configuration.




[2002-11-16 06:22:55] [EMAIL PROTECTED]

The last PHP CVS snapshot (Win32) doesn't correct the bug  
Demo/Source :
http://www.serveurperso.com/temp/fputs.php
The function always adds some incorrects CRLF.



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

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




#19400 [Opn->Fbk]: Apache crash with w32api_register_function

2002-12-19 Thread iliaa
 ID:   19400
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Feedback
 Bug Type: Reproducible crash
 Operating System: Win98 Win2000
 PHP Version:  4.2.0
 New Comment:

Please try using this CVS snapshot:

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




Previous Comments:


[2002-12-06 07:38:54] [EMAIL PROTECTED]

Get same problem with all different version of PHP issue from
snaps.php.net.

I know that w32api is experimental.But I get this problem for several
month.A few time agon J.Moore tells me a new version is going to be
released.
Please could you tell me if w32api is really supported and if a new
version is available.
Please Help



[2002-10-17 01:00:03] [EMAIL PROTECTED]

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



[2002-10-01 18:03:35] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2002-09-14 03:57:02] [EMAIL PROTECTED]

Hi,
I am using w32api_register_function to call windows dll to access a
medicine database.
Php version is 4.2.0 and Apache 1.3.24 (in fact easyphp 1.6).

Each time I call W32api_register_fuction Apache crash and is
automaticly reload and the php script run well, but running it again
make the same Apache crash.

This problem occure even with standard window dll such as user32.dll.

What could be wrong?
Thanks in advance for your help
Michel




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




#17552 [Com]: PHP Apache DSO Compile Failure: Unresolved Symbol: pthread_getspecific

2002-12-19 Thread casey
 ID:   17552
 Comment by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   No Feedback
 Bug Type: Compile Failure
 Operating System: Linux 2.4.18 Glibc
 PHP Version:  4.2.1
 New Comment:

For FreeBSD, you can install either pth or ptl. Both are  
threading libraries, and are available in the fbsd ports  
collection. Then configure php w/ appropriate flag, e.g.  
for pth  --enable-tsrm-pth  
 
I had the exact error as above, with exactly the same 
versions. I installed pth, rebuilt php, and it works great 
now.


Previous Comments:


[2002-12-19 23:10:24] [EMAIL PROTECTED]

For FreeBSD, you can install either pth or ptl. Both are  
threading libraries, and are available in the fbsd ports  
collection. Then configure php w/ appropriate flag, e.g.  
for pth  --enable-tsrm-pth  
 
I had the exact error as above, with exactly the same 
versions. I installed pth, rebuilt php, and it works great 
now.



[2002-12-02 22:55:09] [EMAIL PROTECTED]

This occurs using apache-2.0.43 and php-4.2.3 on FreeBSD4.7 

Compiled with the following options:
./configure --with-mysql --with-apxs

When I run apache I get the following error:
Syntax error on line 230 of /usr/local/apache/conf/httpd.conf:
Cannot load /usr/local/apache/modules/libphp4.so into server:
/usr/local/apache/modules/libphp4.so: Undefined symbol
"pthread_getspecific"



[2002-11-21 06:33:36] [EMAIL PROTECTED]

The same error with me when I try to start Apache service.
the configure options that I used for PHP:

--with-mysql
--with-apxs2

SO: FreeBSD 4.7
Apache: 2.0.43
PHP: 4.2.3



[2002-11-15 10:33:11] [EMAIL PROTECTED]

This occurs using apache-1.3.26 and php-4.2.3 on SuSE7.1 when using
--with-apxs.

I've tried adding LDFLAGS="-lpthread" just to persuade it to link
against that library, but it still doesn't like me - ldd on libphp4.so
makes no difference that way.

Am reverting to --with-apache instead on the off-chance it works...



[2002-09-11 11:14:10] [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.





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

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




#18015 [Opn->Sus]: Printer Function printer_open, no default printer found

2002-12-19 Thread iliaa
 ID:   18015
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Suspended
 Bug Type: Unknown/Other Function
 Operating System: Win2000
 PHP Version:  4.2.1
 New Comment:

Appears to be an abandoned PECL extension.


Previous Comments:


[2002-06-27 09:25:39] [EMAIL PROTECTED]

array(7) { [0]=> array(3) { ["NAME"]=> string(16) "HP Mopier 320 PS"
["DESCRIPTION"]=> string(34) "HP Mopier 320 PS,HP Mopier 320 PS,"
["COMMENT"]=> string(109) "Diesen Kommentar hat Kurt remote von einem
Linux-Rechner aus auf dem win2K eingetragen. Methode: rpcclient..." }
[1]=> array(3) { ["NAME"]=> string(17) "HP Mopier 320 PCL"
["DESCRIPTION"]=> string(36) "HP Mopier 320 PCL,HP Mopier 320 PCL,"
["COMMENT"]=> string(0) "" } [2]=> array(3) { ["NAME"]=> string(16)
"FRITZfax Drucker" ["DESCRIPTION"]=> string(27) "FRITZfax
Drucker,FRITZ!fax," ["COMMENT"]=> string(0) "" } [3]=> array(3) {
["NAME"]=> string(22) "FRITZfax Color Drucker" ["DESCRIPTION"]=>
string(39) "FRITZfax Color Drucker,FRITZ!Fax Color," ["COMMENT"]=>
string(0) "" } [4]=> array(3) { ["NAME"]=> string
The output of

---
var_dump(printer_list(PRINTER_ENUM_LOCAL));
-
is,
(16) "DANKA InfoStream" ["DESCRIPTION"]=> string(34) "DANKA
InfoStream,DANKA InfoStream," ["COMMENT"]=> string(0) "" } [5]=>
array(3) { ["NAME"]=> string(17) "Acrobat PDFWriter" ["DESCRIPTION"]=>
string(36) "Acrobat PDFWriter,Acrobat PDFWriter," ["COMMENT"]=>
string(0) "" } [6]=> array(3) { ["NAME"]=> string(17) "Acrobat
Distiller" ["DESCRIPTION"]=> string(44) "Acrobat Distiller,AdobePS
Acrobat Distiller," ["COMMENT"]=> string(0) "" } } 

the problem is, that PHP 4.2.1 does not find the default printer in the
system. 
I tried this 
-
$handle = printer_open();
printer_write($handle, $text);
printer_close($handle);
---
with php 4.0.6 and it works well, also in PHP Info in section
"printers" there is my default printer listet,

with PHP 4.2.1 not



[2002-06-27 06:20:42] [EMAIL PROTECTED]

Can you do post the output of the following here:
var_dump(printer_list(PRINTER_ENUM_LOCAL));



[2002-06-27 06:15:49] [EMAIL PROTECTED]

Hello, 
i have some problem with the "printer" function. 
I have installed an WAMP system with, PHP 4.2.1 
i have added the "php_printer.dll". 
when i want to connect to a printer i receive the message, 

Warning: couldn't connect to the printer [h#Ž/htm] in
c:\apache\htdocs\printer_1.php on line 4 
--- 
if ($submit) { 

$handle = printer_open(); 
printer_write($handle, $text); 
printer_close($handle); 

} 
-- 
When i try to list the attached printers with 
-- 
if ($auflisten) { 
PRINTER_ENUM_SHARED); 
$var_dump = printer_list(PRINTER_ENUM_LOCAL); 
while(list($key, $value) = each($var_dump)) 
{ 
echo "$key, $value"; 
} 
} 
- 
i only receive 
0, Array1, Array2, Array3, Array4, Array5, Array6, Array 

what is the problem ? 

Is it a bug with PHP 4.2.1
In a older version of PHP i had no problems

thanks a lot 
Jack






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




#18412 [Opn->Sus]: PRINTER_ORIENTATION

2002-12-19 Thread iliaa
 ID:   18412
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Suspended
 Bug Type: Unknown/Other Function
 Operating System: win98
 PHP Version:  4.2.1
 New Comment:

Appears to be an abandoned PECL extension.


Previous Comments:


[2002-08-26 02:09:57] [EMAIL PROTECTED]

SUGGESTION
==

After looking in source code (printer.c) carefully, I beleive that
whatever you have set through has no effect. (I could be wrong if the
source code I saw is too old. Anyway, it is the only one I can find.)
The problem is that the steps of setting printing properties
recommended by Microsoft are not followed. The printer_open() simply
get current settings by calling DocumentProperties() with
DM_OUT_BUFFER. Subsequent setting using printer_set_option() simply
modifies these setting parameters in the buffer. Lacking of 2 steps in
order to make setting printing options working, 
(1) modify resource->device->dmFields bit to indicate which parameters
have been changed
(2) Call DocumentProperties() with DM_OUT_BUFFER | DM_IN_BUFFER. The
resource->device must be passed to the function also.

I suggest modify printer_set_option() to modify
resource->device->dmFields bit as well as resource->device->dmXXX and
create another option parameter - PRINTER_SET_OPTION_NOW that will call
DocumentProperties() with DM_OUT_BUFFER | DM_IN_BUFFER.

Regards,
Tanes Sriviroolchai



[2002-08-25 23:28:51] [EMAIL PROTECTED]

I have the same problem with Win2000/IIS too. There is no effect on
using printer_set_option with PRINTER_ORIENTATION_LANDSCAPE.

Regards.



[2002-07-18 09:15:39] [EMAIL PROTECTED]

I use

printer_set_option($handle, PRINTER_ORIENTATION,
PRINTER_ORIENTATION_LANDSCAPE);

to set the printer option and try to print some text in landscape
(value=2) but the output still shows up in portrait (value=1).

(printer_get_option($handle, PRINTER_ORIENTATION ) = 2);

Thanks.





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




#18408 [Opn->Sus]: printer_list crashes PHP

2002-12-19 Thread iliaa
 ID:   18408
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Suspended
 Bug Type: Unknown/Other Function
 Operating System: WinXP
 PHP Version:  4.2.1
 New Comment:

Appears to be an abandoned PECL extension.


Previous Comments:


[2002-07-18 05:57:50] [EMAIL PROTECTED]

Hi,

I'm having troubles using the printer_list function.
When I try to get a list of all the printers installed
on the machine where the script is running, php crashes.

When I use this code, PHP crashes:

  printer_list(PRINTER_ENUM_LOCAL);

When I use this codes, PHP does not crash, but it returns
a empty array.

  printer_list(PRINTER_ENUM_LOCAL|PRINTER_ENUM_SHARED);

  printer_list(PRINTER_ENUM_SHARED);

When I accessing the script with my browser (trough apache) apache
crashes, when I running it as an command line script, PHP.exe crashes.

Altough, printing to the default printer with the example listed at
'http://www.php.net/manual/en/function.printer-draw-text.php' works
fine.

I'm running PHP 4.2.1 (in apache it's the NON-CGI version running) on
windows XP Professional Dutch edition.

Microsoft Visual C++ tells me there is an access violation in php.exe
(php4ts.dll)

Is there a workaround for this problem?
If you need more information, than feel free to contact me.

With kind regards,

Franck Nijhof

PS: Sorry for my bad english.




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




#16772 [Opn->Sus]: printer_create_font does not properly resolve regular fonts nor opentype fonts

2002-12-19 Thread iliaa
 ID:   16772
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Suspended
 Bug Type: Unknown/Other Function
 Operating System: Windows 2000
 PHP Version:  4.2.0
 New Comment:

Appears to be an abandoned PECL extension.


Previous Comments:


[2002-04-23 18:10:43] [EMAIL PROTECTED]

OSes: Windows 2000 Professional / SP1 (English and German)
PHP: php 4.2.0 binary zip (non-install) from php.net
Fonts: all windows standard fonts are in opentype format (Arial, Times,
etc.)
 used custom fonts are in truetype format

$font =
printer_create_font('Arial',20,0,PRINTER_FW_REGULER,false,false,0)
does not give 'Arial' but some unknown serif type
this also happens with any installed opentype font !

given the installed fonts 'PaxSans', 'PaxSans Italic', 'PaxSans Bold'
and 'PaxSans Bold Italic' 
$font =
printer_create_font('PaxSans',20,0,PRINTER_FW_REGULER,false,false,0)
will resolve to 'PaxSans Italic' rather than 'PaxSans'





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




#20943 [Opn->Fbk]: header("HTTP/1.1 nnn xxx") not working under Apache

2002-12-19 Thread iliaa
 ID:   20943
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Feedback
 Bug Type: Output Control
 Operating System: WIN2K, Apache 1.3.x/2.0.x
 PHP Version:  4.2.3
 New Comment:

Please try using this CVS snapshot:

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

You may also want to try a latest Apache 2, many bugs were fixed
between 2.0.40 & 2.0.43, which is the current version.


Previous Comments:


[2002-12-14 05:19:07] [EMAIL PROTECTED]

Hi,

I just spent a while investigating a simular problem to this one:-

header("HTTP/1.0 403 Unauthorized");

Was sending a header through to my machine but it was not prompting my
browser to display the correct message (IE & Mozilla)

I also noted that 404's were not working either.

Cutting a long story short I manipulated my headers so they looked
simular to a good 404 & came up with the following which now has the
correct effect on my browser.



kkk

My environment is:
Redhat Linux 8.0 
Apache 2.0.40
PHP 4.2.2

I suspect this is an interaction problem between PHP 4.2.x and Apache
2.0.x .

This also started occurring on my home Linux machine after I upgraded
to apache 2.0.40 and I fixed it using the same method.

Hope this helps someone
Rob



[2002-12-12 03:49:58] [EMAIL PROTECTED]

Yes, by using this distrib it works. Hovever if I run php-cgi.exe from
command line I get this output:

---
Content-type: text/html
X-Powered-By: PHP/4.4.0-dev

Hello
---

so the HTTP header gets stripped. If I change the header in
header("HTTP/1.1 500 Server Error") I get this:

---
Status: 500
Content-type: text/html
X-Powered-By: PHP/4.4.0-dev

Hello
---

thus the HTTP Header is converted to a "Status:" header line. Fine, but
shouldn't Apache be able to handle "HTTP/1.1 nnn xxx" as well?

Michele



[2002-12-11 11:55:23] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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



[2002-12-11 11:48:52] [EMAIL PROTECTED]

Tried writing this script (PHP 4.2.3, Apache 1.3.x/2.0.x, not tried
under IIS):


Hello

If PHP is configured as a Module it works fine. If PHP is configured as
CGI Apache breaks the output and shows its own "Internal Server Error"
page. Apache was installed as out-of-the box, no special options apart
PHP/CGI configuration directives. Apache error log line is:

[Wed Dec 11 18:41:38 2002] [error] [client 127.0.0.1] malformed header
from script. Bad header=HTTP/1.1 200 OK: php-cgi.exe

Is this a correct behaviour? My config is broken? Is it a bug for
Apache
Thanks
Michele




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




#21105 [NEW]: Child segfault running mash()

2002-12-19 Thread ncsml
From: [EMAIL PROTECTED]
Operating system: Linux (Redhat 7.3)
PHP version:  4.3.0RC3
PHP Bug Type: Reproducible crash
Bug description:  Child segfault running mash()

PHP 4.3.0RC3 compiled --with-mhash (not dso) using mhash 
0.8.17 segfaults when running this script: 
 ";  
  
?>  
(Does not segfault with MHASH_SHA1)  
  
Apache 1.3.27   
mod_ssl 2.8.11   
PHP 4.3.0RC3   
glibc 2.2.25-40   
gcc-2.96-112   
mhash 0.8.17 (static)   
   
php ./configure:   
 ./configure --prefix=/usr --exec-prefix=/usr  
--bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc  
--datadir=/usr/share --includedir=/usr/include  
--libdir=/usr/lib --libexecdir=/usr/libexec  
--localstatedir=/var --sharedstatedir=/usr/com  
--mandir=/usr/share/man --infodir=/usr/share/info  
--with-config-file-path=/etc --with-dom=/usr  
--with-exec-dir=/usr/bin --with-gettext  
--with-regex=system --with-layout=GNU  
--enable-magic-quotes --without-oci8 --with-mhash  
--with-imap=shared --with-openssl --with-imap-ssl  
--with-kerberos=/usr/kerberos --with-ldap=shared  
--with-mysql=shared,/usr --with-apxs=/usr/sbin/apxs  
--enable-debug --with-zlib  
   
Backtrace:   
Program received signal SIGSEGV, Segmentation fault.  
0x4207af66 in chunk_free () from /lib/i686/libc.so.6  
(gdb) bt  
#0  0x4207af66 in chunk_free () from /lib/i686/libc.so.6  
#1  0x4207ad14 in free () from /lib/i686/libc.so.6  
#2  0x4033795a in mhash_free (ptr=0x81ca550) at  
mhash.c:548  
#3  0x4070dace in zif_mhash (ht=2, return_value=0x81d20bc,  
this_ptr=0x0,  
return_value_used=1) at  
/usr/src/redhat/php-4.3.0RC3/ext/mhash/mhash.c:185  
#4  0x4080a65b in execute (op_array=0x81cd79c)  
at  
/usr/src/redhat/php-4.3.0RC3/Zend/zend_execute.c:1596  
#5  0x407f879c in zend_execute_scripts (type=8,  
retval=0x0, file_count=3)  
at /usr/src/redhat/php-4.3.0RC3/Zend/zend.c:864  
#6  0x407c106b in php_execute_script  
(primary_file=0xb6f0)  
at /usr/src/redhat/php-4.3.0RC3/main/main.c:1552  
#7  0x4080f63a in apache_php_module_main (r=0x808ced8,  
display_source_mode=0)  
at  
/usr/src/redhat/php-4.3.0RC3/sapi/apache/sapi_apache.c:55  
#8  0x40810504 in send_php (r=0x808ced8,  
display_source_mode=0,  
filename=0x808e9e0  
"/var/www/modesmail/admin/phpcrash.php")  
at  
/usr/src/redhat/php-4.3.0RC3/sapi/apache/mod_php4.c:556  
#9  0x40810571 in send_parsed_php (r=0x808ced8)  
at  
/usr/src/redhat/php-4.3.0RC3/sapi/apache/mod_php4.c:571  
#10 0x080547dd in ap_invoke_handler ()  
#11 0x0806769c in process_request_internal ()  
#12 0x08067713 in ap_process_request ()  
#13 0x0805f867 in child_main ()  
#14 0x0805fa0a in make_child ()  
#15 0x0805fb4d in startup_children ()  
#16 0x080601a0 in standalone_main ()  
#17 0x08060aa3 in main ()  
#18 0x42017589 in __libc_start_main () from  
/lib/i686/libc.so.6  
  
-- 
Edit bug report at http://bugs.php.net/?id=21105&edit=1
-- 
Try a CVS snapshot: http://bugs.php.net/fix.php?id=21105&r=trysnapshot
Fixed in CVS:   http://bugs.php.net/fix.php?id=21105&r=fixedcvs
Fixed in release:   http://bugs.php.net/fix.php?id=21105&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=21105&r=needtrace
Try newer version:  http://bugs.php.net/fix.php?id=21105&r=oldversion
Not developer issue:http://bugs.php.net/fix.php?id=21105&r=support
Expected behavior:  http://bugs.php.net/fix.php?id=21105&r=notwrong
Not enough info:http://bugs.php.net/fix.php?id=21105&r=notenoughinfo
Submitted twice:http://bugs.php.net/fix.php?id=21105&r=submittedtwice
register_globals:   http://bugs.php.net/fix.php?id=21105&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=21105&r=php3
Daylight Savings:   http://bugs.php.net/fix.php?id=21105&r=dst
IIS Stability:  http://bugs.php.net/fix.php?id=21105&r=isapi




#6359 [Com]: PHP has encountered an Access Violation at 084A4E86

2002-12-19 Thread hchinhwa
 ID:   6359
 Comment by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Closed
 Bug Type: *General Issues
 Operating System: Windows 2000 Server
 PHP Version:  4.0.1pl2
 New Comment:

Hi,

I have similar problem. I am using IIS v5 and PHP v4.2.3. I discovered
I had alot of PHP.EXE files running in Windows (viewed from Task
Manager). I am not sure why there were PHP.EXE files appearing as I
thought there should not be any. Anyway HTML and ASP files were still
running fine when the PHP server was done.


Previous Comments:


[2002-12-12 22:48:02] [EMAIL PROTECTED]

Just restart IIS server. No need reboot server



[2000-10-28 23:49:35] [EMAIL PROTECTED]

No feedback. 



[2000-10-02 03:57:26] [EMAIL PROTECTED]

not enough information.
please supply a reproducing script.



[2000-08-25 15:32:44] [EMAIL PROTECTED]

Well, After installing PHP it was working fine. A day later I get the
following error:

PHP has encountered an Access Violation at 084A4E86

Any ideas?
I am running under Win2K and IIS5.

I rebooted the server and then it seemed to work...






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




#18744 [Fbk->NoF]: blob_add has max limit of 64k

2002-12-19 Thread php-bugs
 ID:   18744
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Feedback
+Status:   No Feedback
 Bug Type: InterBase related
 Operating System: Redhat 7.3
 PHP Version:  4.2.2
 New Comment:

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


Previous Comments:


[2002-12-04 22:52:20] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2002-08-05 14:42:22] [EMAIL PROTECTED]

The ibase_blob_add functionality wraps the Interbase blob add
functionality, which will only allow up to 64k of data to be added at
any one time dut to an unsigned short variable. This means that if a
chunk of data is > than 64k, you have to split it into < 64k chunks and
run multiple adds. While this is not a problem, it seems that this
functionality would be better used in the actual PHP source. It
shouldn't be too hard a fix - just split the incoming string into < 64k
chunks and run the add in a loop.

For example, we discovered that a 145k string was being truncated by
the ibase_blob_add function. At the very least, the ibase_blob_add
function should throw a warning if the data is > 64k.

This 64k limit is not documented, and has been a source of much
confusion. It would be very helpful if this change were implemented.




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




#20795 [Fbk->NoF]: Memory_limit not respected

2002-12-19 Thread php-bugs
 ID:   20795
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Feedback
+Status:   No Feedback
 Bug Type: Scripting Engine problem
 Operating System: Windows XP Pro/BSDi/FreeBSD
 PHP Version:  4.4CVS2002-12-03
 New Comment:

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


Previous Comments:


[2002-12-03 16:45:00] [EMAIL PROTECTED]

Oki, 
I have check (but i was sure):
Configuration File (php.ini) Path C:\WINDOWS\php.ini
And the file have the right name and the right location.

In all case, i suppose that normally, i should have a default value of
memory_limit and max_execution_time displayed by phpinfo(). And it's
not the case. 
(Note that this values are displayed under Linux with Apache/1.3.23,
PHP Version 4.1.2)



[2002-12-03 12:06:20] [EMAIL PROTECTED]

Please check (with phpinfo()) if the location of your php.ini file is
correct (and watch the troubles with the file extensions in windows,
the best thing to check if the file actually has the name 'php.ini'
(and not 'php.ini.ini') is to check it in a DOS prompt.

Derick



[2002-12-03 12:02:24] [EMAIL PROTECTED]

I know this is hard to believe, but the max_execution_time part is not
a bug. See the NOTE at:
http://www.php.net/set_time_limit

The larger part of the execution is done by MySQL. max_execution_time,
is the time that php keeps the processor busy - not the 'real' time.

Leaving open for the memory_limit, which I reported myself not to be
working in http://bugs.php.net/20738.

I'll add any comments on that here.
Updated summary and version.



[2002-12-03 11:36:21] [EMAIL PROTECTED]

Hi i'm using Apache/1.3.26 (Win32) PHP/4.2.3, with 
mysql.exe  Ver 11.18 Distrib 3.23.52, for Win95/Win98 (i32)

1) PhpInfo() don't give me the memory_limit that I set  on default
value.
Non memory_limit appear on the page even though the php.ini file
contain a definition.

2) PhpInfo() also don't give me the max_execution_time, witch is also
setted.

3) When I execute an big sql query (2 lines) (It was a mystake of
course!!!) the memory grow up and grow up ...
After more time than the max_execution_time, system blow up and apache
is killed !!!
I see in the task manager that memory in use by apache was up than
300Mo.
And before the execution it was 5 or 6 Mo.

4) I will complete this report with the sql request made, but i notice
that after stoping the html request mysqld-nt continue to work (100% of
CPU_1) more than 10 minutes and apache also. I stop the daemon before
they stop themself.

I hope i was clear (im french and my english is poor).




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




#20813 [Fbk->NoF]: opendir() returns errno22 with UNC path

2002-12-19 Thread php-bugs
 ID:   20813
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Feedback
+Status:   No Feedback
 Bug Type: Directory function related
 Operating System: NT4SP6 IIS
 PHP Version:  4.2.3
 New Comment:

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


Previous Comments:


[2002-12-04 17:53:46] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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



[2002-12-04 13:12:41] [EMAIL PROTECTED]

Just installed fresh 4.2.3 ISAPI on Win2000 and still produces same
error. Does this have something to do with the target UNC?



[2002-12-04 10:44:27] [EMAIL PROTECTED]

Bug #9354 also produces same result
Bug #6445 is the same problem
Bug #12699 is the same problem
Bug #12524 is the same problem

Is this only NT4???



[2002-12-04 10:34:08] [EMAIL PROTECTED]

if ($handle = opendir("//server/share")) {  
  while ($file = readdir($handle)) {
echo "$file";
  }
  closedir($handle);
}

produces:

Warning: OpenDir: Invalid argument (errno 22)

I have tried setting the UNC share permissions to both Everyone - Read
and Everyone - Full Control and it does not matter.




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




#20529 [Fbk->Opn]: Bad subject line when using JIS encoding

2002-12-19 Thread malek
 ID:   20529
 User updated by:  [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Feedback
+Status:   Open
 Bug Type: mbstring related
 Operating System: red hat Linux 6.2
 PHP Version:  4.3.0RC1
 New Comment:

Hi,
 Have just tried using the latest snapshot and the bug is still there,
no change,
thanks,
Malek


Previous Comments:


[2002-12-19 22:57:50] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2002-11-20 19:19:33] [EMAIL PROTECTED]

Hi Ya,
  Basically I am using
PHP 4.3.0RC1 (but I have also noticed the same thing with PHP 4.3.0PR2
)
on Red Hat Linux 6.2
with Sendmail 8.9.3

I am basically trying to send a mail in Japanese,
I first encode the text into JIS then simply send as normal,
i.e.
".$subjectja,"Content-Type:
text/plain;charset=\"iso-2022-jp\"\nContent-Transfer-Encoding: 7bit");
// mail
?>
however the subject line does not appear correctly. On viewing the
email source I noticed that it is seemingly removing some characters
from the Subject line JIS,
Subject:  $B%G%$%j!<%l%]!<%H (B <--- this is the resulting subject
line which is broken

test->$B%G%$%j!<%l%]!<%H(B<--- this is the email body which works
fine

 $B%G%$%j!<%l%]!<%H (B
$B%G%$%j!<%l%]!<%H(B

slightly different. Also if you take out the "test->" on the body part
the body of the email will not to work.

p.s. there is no problems with 4.0,4.1 or 4.2

thanks,
Malek




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