Bug #16869: Squirrelmail, wrong directory

2002-04-27 Thread japs

From: [EMAIL PROTECTED]
Operating system: Linux Mandrake 8.2
PHP version:  4.2.0
PHP Bug Type: *Web Server problem
Bug description:  Squirrelmail, wrong directory

Use of Squirrelmail version 1.0.6 and 1.2.5 fails together with PHP 4.2.0.
Squirrelmail is installed at /usr/apache/htdocs/squirrelmail.

During the initial call of Squirrelmail (http://my.server/squirrelmail)
the Apache 1.3.24 error log says: 
File does not exist: /usr/apache/htdocs/src/login.php

PHP version 4.1.2 (and earlier) on the other hand works correctly, and
finds the requested document at the proper location:

/usr/apache/htdocs/squirrelmail/src/login.php

Jan P. Sorensen

--

PHP configuration:

  ./configure --with-apache=../apache_1.3.24 --enable-track-vars
--with-mysql



-- 
Edit bug report at http://bugs.php.net/?id=16869edit=1
-- 
Fixed in CVS:http://bugs.php.net/fix.php?id=16869r=fixedcvs
Fixed in release:http://bugs.php.net/fix.php?id=16869r=alreadyfixed
Need backtrace:  http://bugs.php.net/fix.php?id=16869r=needtrace
Try newer version:   http://bugs.php.net/fix.php?id=16869r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=16869r=support
Expected behavior:   http://bugs.php.net/fix.php?id=16869r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=16869r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=16869r=submittedtwice




Bug #16870: function is_a() inconsisten

2002-04-27 Thread dan

From: [EMAIL PROTECTED]
Operating system: Linux
PHP version:  4.2.0
PHP Bug Type: Feature/Change Request
Bug description:  function is_a() inconsisten

Is there any reason that this function is_a() does not work for php
classes?  If I create a domxml object $xml and do

is_a($xml, get_class($xml));

it returns false...something seems wrong about that.  This is not a
strtolower problem either...this function works fine for user defined
classes, but refused to even operate on objects created by php's
functions.
-- 
Edit bug report at http://bugs.php.net/?id=16870edit=1
-- 
Fixed in CVS:http://bugs.php.net/fix.php?id=16870r=fixedcvs
Fixed in release:http://bugs.php.net/fix.php?id=16870r=alreadyfixed
Need backtrace:  http://bugs.php.net/fix.php?id=16870r=needtrace
Try newer version:   http://bugs.php.net/fix.php?id=16870r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=16870r=support
Expected behavior:   http://bugs.php.net/fix.php?id=16870r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=16870r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=16870r=submittedtwice




Bug #15966 Updated: replace_node incorrect

2002-04-27 Thread dan

 ID:   15966
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Analyzed
 Bug Type: DOM XML related
 Operating System: Linux
 PHP Version:  4.1.2
 New Comment:

Now the implementation is even worse.  Here is the current state.  The
new node now replaces the old node and returns the new node, but it
DOES NOT update the pointer to the new node, so now you just lost your
pointer in the document.  This is just not acceptable because in xml
the pointer is probably the single most important concept.  If you
loose your pointer you don't know where you are anymore and you can't
get back there unless you know what the document looks like.  I think
that it is really necessary to update this pointer so that the new node
that you pass in is still a reference to the new location.


Previous Comments:


[2002-04-18 02:03:24] [EMAIL PROTECTED]

xmlReplaceNode replaces the node in the first argument,
which is the current node, by the new copied node.
Sounds reasonable to me. It returns the old node which we
don't care about. You should have a reference to the old
node anyway. Ok, the old node isn't deleted only unlinked
but that is the only way to go since the corresponding
PHP variable can't be deleted at this time.

Making a copy is actually a point to discuss. But currently
it needs to be done because if the same libxml node is returned you
will probably end up with two PHP variables
pointing to the same libxml node. If one is deleted the
other one will lose its libxml node as well. I guess this
could be solved with references but I don't know how yet.



[2002-03-08 20:39:22] [EMAIL PROTECTED]

When replace_node is used, if the new node being inserted already
exists in the xml document, it is to be first removed.  Thus, the
following lines in the C code are incorrect...

if (NULL == (new_repnode = xmlCopyNode(repnode, 1))) {
php_error(E_WARNING, %s(): unable to clone node,
get_active_function_name(TSRMLS_C));
RETURN_FALSE;
}

repnode = xmlReplaceNode(nodep, new_repnode);

This code is making a copy of the new node, and hence when the libxml2
function xmlReplaceNode is run, it does not remove the node already
existing in the document.  The call to xmlReplaceNode should be the
repnode, not the new_repnode.  As a matter of fact, I see no need to
even attempt to clone the node, unless it is to check that it is a true
node.

Thoughts?




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




Bug #15966 Updated: replace_node incorrect

2002-04-27 Thread dan

 ID:   15966
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Analyzed
 Bug Type: DOM XML related
 Operating System: Linux
 PHP Version:  4.1.2
 New Comment:

sorry, I meant to say it returns the old node, as it should according
to spec, that is fine, but not the point.


Previous Comments:


[2002-04-27 04:39:58] [EMAIL PROTECTED]

Now the implementation is even worse.  Here is the current state.  The
new node now replaces the old node and returns the new node, but it
DOES NOT update the pointer to the new node, so now you just lost your
pointer in the document.  This is just not acceptable because in xml
the pointer is probably the single most important concept.  If you
loose your pointer you don't know where you are anymore and you can't
get back there unless you know what the document looks like.  I think
that it is really necessary to update this pointer so that the new node
that you pass in is still a reference to the new location.



[2002-04-18 02:03:24] [EMAIL PROTECTED]

xmlReplaceNode replaces the node in the first argument,
which is the current node, by the new copied node.
Sounds reasonable to me. It returns the old node which we
don't care about. You should have a reference to the old
node anyway. Ok, the old node isn't deleted only unlinked
but that is the only way to go since the corresponding
PHP variable can't be deleted at this time.

Making a copy is actually a point to discuss. But currently
it needs to be done because if the same libxml node is returned you
will probably end up with two PHP variables
pointing to the same libxml node. If one is deleted the
other one will lose its libxml node as well. I guess this
could be solved with references but I don't know how yet.



[2002-03-08 20:39:22] [EMAIL PROTECTED]

When replace_node is used, if the new node being inserted already
exists in the xml document, it is to be first removed.  Thus, the
following lines in the C code are incorrect...

if (NULL == (new_repnode = xmlCopyNode(repnode, 1))) {
php_error(E_WARNING, %s(): unable to clone node,
get_active_function_name(TSRMLS_C));
RETURN_FALSE;
}

repnode = xmlReplaceNode(nodep, new_repnode);

This code is making a copy of the new node, and hence when the libxml2
function xmlReplaceNode is run, it does not remove the node already
existing in the document.  The call to xmlReplaceNode should be the
repnode, not the new_repnode.  As a matter of fact, I see no need to
even attempt to clone the node, unless it is to check that it is a true
node.

Thoughts?




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




Bug #14334 Updated: Bug in COM class

2002-04-27 Thread phanto

 ID:   14334
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Closed
 Bug Type: COM related
 Operating System: Windows 2000 Professional
 PHP Version:  4.0.6
 New Comment:

should be fixed in cvs now


Previous Comments:


[2002-04-02 06:47:13] [EMAIL PROTECTED]

I get the same error when I try to run the following code:
-
$af = new COM(AtheneFile.File);
$af-SetDatabaseDetails(server, database, user, pass);
$sti = $af-GetFile(295721, c:\\test.doc);
-
It is the last line that fails.

This is my system data:
PHP Version: 4.0.6
System: Windows NT 5.0 build 2195 
Build Date: Jun 22 2001 
Server API: CGI 
Virtual Directory Support: enabled 
Configuration File (php.ini) Path: C:\WINNT\php.ini 
ZEND_DEBUG: disabled 
Thread Safety: enabled



[2002-01-21 12:47:44] [EMAIL PROTECTED]

I am having the same problem which is a bit
stranger though.

One time my call is correct while done in another
place produces php_OLECHAR_to_char error message.

Working:
$pdflib = new COM(PDFlib_com.PDF);
print $pdflib-get_parameter(version,0);

Prints version string as expected.

Not working:
$pdflib = new COM(PDFlib_com.PDF);
print $pdflib-set_parameter(fontwarning,1);
print $pdflib-get_parameter(version,0);

Produces error message for the get_parameter line
and 0 (true !!! in php for PDFlib, -1 is false)
for the fontwarning line.

Also, to make it even stranger, at least to me:
When I switch the line in the non-working example,
I both get the version string and 0 for the 
fontwarning

Is there something wrong about the way I connect
to PDFLib ?

HTH

W.



[2001-12-06 22:09:09] [EMAIL PROTECTED]

If you mean php code, here goes:
-
$instance = new COM(WinampCOM.Application);
$title = $instance-CurrentSongTitle;
-
The $title line will produce the error if run via the httpd, but not if
pasted in the stdin of php.exe.  The WinampCOM.Application com requires
a winamp module, which can be found at
http://www.adcock8.freeserve.co.uk/gen_com.zip
If any more info is needed, please don't hesitate to ask.



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

If you mean php code, here goes:
-
$instance = new COM(WinampCOM.Application);
$title = $instance-CurrentSongTitle;
-
The $title line will produce the error if run via the httpd, but not if
pasted in the stdin of php.exe.  The WinampCOM.Application com requires
a winamp module, which can be found at
http://www.adcock8.freeserve.co.uk/gen_com.zip
If any more info is needed, please don't hesitate to ask.



[2001-12-06 12:13:41] [EMAIL PROTECTED]

please provide the shortest possible code that produces this error.



The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/14334

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




Bug #16567 Updated: out parameters unchanged in PHP

2002-04-27 Thread phanto

 ID:   16567
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Bogus
 Bug Type: COM related
 Operating System: Windows 2000
 PHP Version:  4.1.1
 New Comment:

you have to wrap the value into a variant object. see
http://www.php.net/variant


Previous Comments:


[2002-04-12 07:22:04] [EMAIL PROTECTED]

Calling a method with a parameter declared as out in automation (ex:
[out] long *code) doesn't update the PHP variable.




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




Bug #16649 Updated: Wrong object type returned

2002-04-27 Thread phanto

 ID:   16649
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Bogus
 Bug Type: COM related
 Operating System: WIN2K
 PHP Version:  4.1.2
 New Comment:

and the collection itself is an object, so nothing is wrong here.
you should be able to use $clnParameter-Next() to retrieve the next
element or $clnParameter-Next($clnParameter-Count()) to get an array
containing all parameters


Previous Comments:


[2002-04-17 00:46:42] [EMAIL PROTECTED]

I have the following code which tries to execute a stored procedure
using ADODB created using COM. The ad Constants and strConnect have
been defined in an include file.

$objCommand = new COM (ADODB.Command);
$objCommand - ActiveConnection = strConnect;
$objCommand - CommandText = someStoredProc;
$objCommand - CommandType = adCmdStoredProc;

$objParam = $objCommand - CreateParameter(strAction, adVarChar,
adParamInput, 1);
$objCommand - Parameters - Append($objParam);
$objParam = $objCommand - CreateParameter(intCategoryID, adInteger,
adParamInput, 4);
$objCommand - Parameters - Append($objParam);
$objParam = $objCommand - CreateParameter(strCategory, adVarChar,
adParamInput, 100);
$objCommand - Parameters - Append($objParam);

$clnParameter = $objCommand - Parameters;

echo gettype($clnParameter);

The display says $clnParameter is an object, while ADODB documentation
says Parameters is a collection of Parameter object.




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




Bug #16869 Updated: Squirrelmail, wrong directory

2002-04-27 Thread mfischer

 ID:   16869
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Bogus
 Bug Type: *Web Server problem
 Operating System: Linux Mandrake 8.2
 PHP Version:  4.2.0
 New Comment:

The bug system is not the appropriate forum for asking support
questions. For a list of a range of more appropriate places to ask
for help using PHP, please visit http://www.php.net/support.php


Previous Comments:


[2002-04-27 04:34:57] [EMAIL PROTECTED]

Use of Squirrelmail version 1.0.6 and 1.2.5 fails together with PHP
4.2.0. Squirrelmail is installed at /usr/apache/htdocs/squirrelmail.

During the initial call of Squirrelmail (http://my.server/squirrelmail)
the Apache 1.3.24 error log says: 
File does not exist: /usr/apache/htdocs/src/login.php

PHP version 4.1.2 (and earlier) on the other hand works correctly, and
finds the requested document at the proper location:

/usr/apache/htdocs/squirrelmail/src/login.php

Jan P. Sorensen

--

PHP configuration:

  ./configure --with-apache=../apache_1.3.24 --enable-track-vars
--with-mysql







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




Bug #16757 Updated: setting server_name to NULL doesn't work

2002-04-27 Thread phanto

 ID:   16757
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Closed
 Bug Type: COM related
 Operating System: Windows 2000
 PHP Version:  4.2.0
 New Comment:

This bug has been fixed in CVS.




Previous Comments:


[2002-04-23 11:20:24] [EMAIL PROTECTED]

In 4.2 you can no longer set server_name to NULL (which you need to do
if you just want to set the codepage).  The problem is the code that
was added to 4.2 to process server_name as an ARRAY.  In 4.1.2 the code
looked like this (COM.c, line 486):

if (server_name != NULL)
{
if (Z_TYPE_P(server_name) == IS_NULL) {
server_name = NULL;
} else {
if (!INI_INT(com.allow_dcom)) {
php_error(E_WARNING, DCOM is disabled);
RETURN_FALSE;
} else {
convert_to_string_ex(server_name);
}
}
}

In the 4.2.0 COM.c, the new flags variable set and IS_ARRAY check was
added before the IS_NULL check, instead of inside the else branch -
thus flags is set to remote invocation, even if server_name is NULL. 
To fix this I moved everything below if (server_name != NULL) and
above if (Z_TYPE_P(server_name) == IS_NULL) { to after } else {.




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




Bug #16828 Updated: Excel remains resident in memory after using it via PHP+COM

2002-04-27 Thread phanto

 ID:   16828
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Closed
 Bug Type: COM related
 Operating System: Win 2000
 PHP Version:  4.2.0
 New Comment:

yes. i only wasn't able to test it thus i left the bugreport open. but
seems you are quicker than i am ;)


Previous Comments:


[2002-04-26 17:12:58] [EMAIL PROTECTED]

I produced this with 4.1.1 and the shorter script of :
  $excel = new COM(Excel.Application);

  $excel-application-DisplayAlerts = False;
  $excel-Quit();
  $excel-Release();
  $excel=null;

In the current development cvs version ( 4.3.0-dev 26/04/02), once the
script execution is complete excel appears to be closed correctly. 
(maybe http://cvs.php.net/co.php/php4/ext/com/com.h?r=1.11 was the cvs
fix for this?)



[2002-04-25 14:32:28] [EMAIL PROTECTED]

When using Excel.Application via the COM interface with PHP version
(4.1.2 and 4.2.0), EXCEL.EXE stays resident in memory after script
execution.

To verify this is not an Excel issue, i created two separate scripts
that did the same thing; one in perl, and one in PHP.  

After execution of the perl script, no EXCEL.EXE is in the Task list;
yet after execution of the PHP script, EXCEL.EXE is in the Task list.

Some more info and test scripts are available at:
http://www.furt.com/code/php/com_issues/




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




Bug #16720 Updated: fatal error using MS ADOX-library

2002-04-27 Thread a . fakos

 ID:   16720
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Open
 Bug Type: COM related
 Operating System: Windows 2000 SP2 German
 PHP Version:  4.1.2
 New Comment:

unfortunately, defining $connection as a global or as local variable
won't work. the same error occured:(


Previous Comments:


[2002-04-27 06:04:19] [EMAIL PROTECTED]

can you try to define $connection as a global or local variable and not
as a class member. i don't thank that this causes the error but just
lets go for sure ..



[2002-04-21 09:53:18] [EMAIL PROTECTED]

php binary: v4.1.2 downloaded from www.php4win.de
adodb: ms activex data objects 2.7 library
adox : ms ado ext. 2.5 for dll and security
webserver: apache 1.3.20

..

a fatal error occured with following original message:
Die Anweisung in '0x100829c3' verweist auf Speicher in 0x0008. Der
Vorgang 'read' konnte nicht in den Speicher durchgeführt werden.

english (similar):
Statement at '0x100829c3' refers to memory 0x0008. memory-process
'read' could not be executed

error log: Premature end of script headers: path-to/php.exe

..

at the end of this bug-report i post a sample-script, which you can
test it. trivial: the fatal error occured always if the script is
finished.

please look in function tableExists, statement @$cat-ActiveConnection.

the supply of an adodb.connection object
occurs fatal error with an access oledb-provider as sql-server
oledb-provider.


..
?php


class test {

var $connection;
var $user   = Admin;
var $pw = ;
var $connstr= Provider=Microsoft.Jet.OLEDB.4.0;
   Data Source=path-to\Nordwind.mdb;
   Persist Security Info=False;

function test()
{
$this-connection = new COM(ADODB.Connection);

if (!$this-connection) {
die (print could not create an instance of
adodb.connection);
}
@$this-connection-Open($this-connstr, $this-user,
$this-pw);
}


function tableExists($value)
{
$ok = false;
$cat = new COM(ADOX.Catalog);

if ($cat) {
//@$cat-ActiveConnection = $this-connection; //-- with
this statement we receive a fatal error
@$cat-ActiveConnection =
$this-connection-ConnectionString; //-- but setting the conn-string
works fine

$tables = @$cat-Tables;
$count = $tables-Count();

for($i = 0; $i  $count; $i++) {
$table = $tables-Item($i);
if (strtolower($table-Type) != view 
strtolower($table-Name) == strtolower($value))
{
$ok = true;
break;
}
}
$table-Release(); $table = null; unset($table);
$tables-Release(); $tables = null; unset($tables);
$cat-Release();  $cat = null; unset($cat);
}
return $ok;
}

} // end class


$test = new test();
$ret = $test-tableExists(dummy_table);

echo (integer) ret;
?




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




Bug #16871: dump_node param error

2002-04-27 Thread dan

From: [EMAIL PROTECTED]
Operating system: Linux
PHP version:  4.0CVS-2002-04-27
PHP Bug Type: DOM XML related
Bug description:  dump_node param error

As of 2002-04-27 this function is requiring the first parameter to be the
node when used as

DomNode-dump_node(DomNode)

this is an error in the convention that if a Dom object is used as the
class instance, the first parameter should be passed as the first
parameter to the function.

-- 
Edit bug report at http://bugs.php.net/?id=16871edit=1
-- 
Fixed in CVS:http://bugs.php.net/fix.php?id=16871r=fixedcvs
Fixed in release:http://bugs.php.net/fix.php?id=16871r=alreadyfixed
Need backtrace:  http://bugs.php.net/fix.php?id=16871r=needtrace
Try newer version:   http://bugs.php.net/fix.php?id=16871r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=16871r=support
Expected behavior:   http://bugs.php.net/fix.php?id=16871r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=16871r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=16871r=submittedtwice




Bug #16822 Updated: 500 error in IE 6.0

2002-04-27 Thread redone

 ID:   16822
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Feedback
+Status:   Open
 Bug Type: Unknown/Other Function
 Operating System: Windows XP
 PHP Version:  4.2.0
 New Comment:

It is turned on.


Previous Comments:


[2002-04-26 20:55:28] [EMAIL PROTECTED]

Do you have 'register_globals' turned off/on in php.ini?

--Jani




[2002-04-26 04:02:46] [EMAIL PROTECTED]

I made a simple page and after installing PHP 4.2.0 I had a problem in
IE 6.0 it gives a 500 Internal Server Error. I'm running Apache 1.3.24
/ Apache 2.0.35 no not at the same
time.
No other browser has the problem. This is the source:

HTML
HEADTITLETest/TITLE/HEAD
BODY
?php
print  EOD
FORM ACTION=$PHP_SELF METHOD=post
INPUT TYPE=hidden NAME=Action VALUE=Search
EOD;
?
/FORM
/BODY
/HTML



[2002-04-25 21:37:59] [EMAIL PROTECTED]

Please add SHORT self-containing script which can be used to reproduce
this. Also, please use ENGLISH in the script..

--Jani





[2002-04-25 06:55:38] [EMAIL PROTECTED]

I made a simple page and after installing PHP 4.2.0 I had a problem in
IE 6.0 I'm running Apache 1.3.24 / Apache 2.0.35 no not at the same
time.
No other browser has the problem. This is the source:


index.php
?php
$Titel = Roostergenerator;
$CSSDir = /rooster/css;
$Images = /rooster/images;
$PHPBestanden = rooster;

require ($PHPBestanden/functies.php);
require (mainfuncties.php);

if ($Action) {
 require ($PHPBestanden/resultaat.php);
}
else {
 require ($PHPBestanden/keuzemenu.php);
}
mysql_close($MySQLServer);

?

resultaat.php
?php

$Dagen =
array('','Maandag','Dinsdag','Woensdag','Donderdag','Vrijdag','Zaterdag','Zondag');

if ($Docent) {
 Cel(docenten, Docent, ID, $Docent);
 $ZoekTekst = $Cel;
 $ZoekOptie = de docent;
 $Query = 
 SELECT rooster.WeekDag, rooster.Datum, studie.Studie, docenten.Docent,
rooster.Lokaal, rooster.Onderwerp, rooster.BeginTijd, rooster.EindTijd
 FROM rooster, docenten, studiegroep, studie
 WHERE docenten.ID = $Docent AND rooster.DocentID = docenten.ID AND
rooster.StudieGroepID = studiegroep.ID AND studiegroep.StudieID =
studie.ID
 ;
}
elseif ($WeekDag) {
 $ZoekOptie = de dag;
 $ZoekTekst = $Dagen[$WeekDag];
 $Query = 
 SELECT rooster.WeekDag, rooster.Datum, studie.Studie, docenten.Docent,
rooster.Lokaal, rooster.Onderwerp, rooster.BeginTijd, rooster.EindTijd
 FROM rooster, docenten, studiegroep, studie
 WHERE rooster.WeekDag = $WeekDag AND rooster.DocentID = docenten.ID
AND rooster.StudieGroepID = studiegroep.ID AND studiegroep.StudieID =
studie.ID
 ;
}
elseif ($Studie) {
 Cel(studie, Studie, ID, $Studie);
 $ZoekTekst = $Cel;
 $ZoekOptie = de studie;
 $Query = 
 SELECT rooster.WeekDag, rooster.Datum, studie.Studie, docenten.Docent,
rooster.Lokaal, rooster.Onderwerp, rooster.BeginTijd, rooster.EindTijd
 FROM rooster, docenten, studiegroep, studie
 WHERE studie.ID = $Studie AND rooster.DocentID = docenten.ID AND
rooster.StudieGroepID = studiegroep.ID AND studiegroep.StudieID =
studie.ID
 ;
}

printEOD
HTML
HEAD
TITLE$Titel/TITLE
LINK HREF=$CSSDir/main.css TYPE=text/css REL=StyleSheet
/HEAD
BODY
H1
U hebt gezocht op $ZoekOptie $ZoekTekst.BR
Dit zijn de resultaten:
/H1
PHRP
EOD;

$Resultaat = mysql_query($Query)
 or die(Query mislukt!);

while ($Record = mysql_fetch_object($Resultaat)) {
 print $Record-WeekDag - $Record-Datum - $Record-Studie -
$Record-Docent - $Record-Lokaal - $Record-Onderwerp -
$Record-BeginTijd - $Record-EindTijdBR\n;
}

?
/BODY
/HTML




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




Bug #16869 Updated: Squirrelmail, wrong directory

2002-04-27 Thread japs

 ID:   16869
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Bogus
 Bug Type: *Web Server problem
 Operating System: Linux Mandrake 8.2
 PHP Version:  4.2.0
 New Comment:

This was not meant as a support question.

It was intended to inform you that a change has occured from PHP 4.1.2
to 4.2.0 which causes identical versions of Squirrelmail to fail.

Jan P. Sorensen


Previous Comments:


[2002-04-27 06:03:33] [EMAIL PROTECTED]

The bug system is not the appropriate forum for asking support
questions. For a list of a range of more appropriate places to ask
for help using PHP, please visit http://www.php.net/support.php



[2002-04-27 04:34:57] [EMAIL PROTECTED]

Use of Squirrelmail version 1.0.6 and 1.2.5 fails together with PHP
4.2.0. Squirrelmail is installed at /usr/apache/htdocs/squirrelmail.

During the initial call of Squirrelmail (http://my.server/squirrelmail)
the Apache 1.3.24 error log says: 
File does not exist: /usr/apache/htdocs/src/login.php

PHP version 4.1.2 (and earlier) on the other hand works correctly, and
finds the requested document at the proper location:

/usr/apache/htdocs/squirrelmail/src/login.php

Jan P. Sorensen

--

PHP configuration:

  ./configure --with-apache=../apache_1.3.24 --enable-track-vars
--with-mysql







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




Bug #16822 Updated: 500 error in IE 6.0

2002-04-27 Thread redone

 ID:   16822
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Open
 Bug Type: Unknown/Other Function
 Operating System: Windows XP
 PHP Version:  4.2.0
 New Comment:

It is working now. I changed the way I parsed the PHP files in Apache.
With the dll it isn't working. With the exe it is.


#LoadModule php4_module C:/Program Files/php/sapi/php4apache.dll
ScriptAlias /php/ C:/Program Files/php/
Action application/x-httpd-php  /php/php.exe

AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps


Previous Comments:


[2002-04-27 06:43:54] [EMAIL PROTECTED]

It is turned on.



[2002-04-26 20:55:28] [EMAIL PROTECTED]

Do you have 'register_globals' turned off/on in php.ini?

--Jani




[2002-04-26 04:02:46] [EMAIL PROTECTED]

I made a simple page and after installing PHP 4.2.0 I had a problem in
IE 6.0 it gives a 500 Internal Server Error. I'm running Apache 1.3.24
/ Apache 2.0.35 no not at the same
time.
No other browser has the problem. This is the source:

HTML
HEADTITLETest/TITLE/HEAD
BODY
?php
print  EOD
FORM ACTION=$PHP_SELF METHOD=post
INPUT TYPE=hidden NAME=Action VALUE=Search
EOD;
?
/FORM
/BODY
/HTML



[2002-04-25 21:37:59] [EMAIL PROTECTED]

Please add SHORT self-containing script which can be used to reproduce
this. Also, please use ENGLISH in the script..

--Jani





[2002-04-25 06:55:38] [EMAIL PROTECTED]

I made a simple page and after installing PHP 4.2.0 I had a problem in
IE 6.0 I'm running Apache 1.3.24 / Apache 2.0.35 no not at the same
time.
No other browser has the problem. This is the source:


index.php
?php
$Titel = Roostergenerator;
$CSSDir = /rooster/css;
$Images = /rooster/images;
$PHPBestanden = rooster;

require ($PHPBestanden/functies.php);
require (mainfuncties.php);

if ($Action) {
 require ($PHPBestanden/resultaat.php);
}
else {
 require ($PHPBestanden/keuzemenu.php);
}
mysql_close($MySQLServer);

?

resultaat.php
?php

$Dagen =
array('','Maandag','Dinsdag','Woensdag','Donderdag','Vrijdag','Zaterdag','Zondag');

if ($Docent) {
 Cel(docenten, Docent, ID, $Docent);
 $ZoekTekst = $Cel;
 $ZoekOptie = de docent;
 $Query = 
 SELECT rooster.WeekDag, rooster.Datum, studie.Studie, docenten.Docent,
rooster.Lokaal, rooster.Onderwerp, rooster.BeginTijd, rooster.EindTijd
 FROM rooster, docenten, studiegroep, studie
 WHERE docenten.ID = $Docent AND rooster.DocentID = docenten.ID AND
rooster.StudieGroepID = studiegroep.ID AND studiegroep.StudieID =
studie.ID
 ;
}
elseif ($WeekDag) {
 $ZoekOptie = de dag;
 $ZoekTekst = $Dagen[$WeekDag];
 $Query = 
 SELECT rooster.WeekDag, rooster.Datum, studie.Studie, docenten.Docent,
rooster.Lokaal, rooster.Onderwerp, rooster.BeginTijd, rooster.EindTijd
 FROM rooster, docenten, studiegroep, studie
 WHERE rooster.WeekDag = $WeekDag AND rooster.DocentID = docenten.ID
AND rooster.StudieGroepID = studiegroep.ID AND studiegroep.StudieID =
studie.ID
 ;
}
elseif ($Studie) {
 Cel(studie, Studie, ID, $Studie);
 $ZoekTekst = $Cel;
 $ZoekOptie = de studie;
 $Query = 
 SELECT rooster.WeekDag, rooster.Datum, studie.Studie, docenten.Docent,
rooster.Lokaal, rooster.Onderwerp, rooster.BeginTijd, rooster.EindTijd
 FROM rooster, docenten, studiegroep, studie
 WHERE studie.ID = $Studie AND rooster.DocentID = docenten.ID AND
rooster.StudieGroepID = studiegroep.ID AND studiegroep.StudieID =
studie.ID
 ;
}

printEOD
HTML
HEAD
TITLE$Titel/TITLE
LINK HREF=$CSSDir/main.css TYPE=text/css REL=StyleSheet
/HEAD
BODY
H1
U hebt gezocht op $ZoekOptie $ZoekTekst.BR
Dit zijn de resultaten:
/H1
PHRP
EOD;

$Resultaat = mysql_query($Query)
 or die(Query mislukt!);

while ($Record = mysql_fetch_object($Resultaat)) {
 print $Record-WeekDag - $Record-Datum - $Record-Studie -
$Record-Docent - $Record-Lokaal - $Record-Onderwerp -
$Record-BeginTijd - $Record-EindTijdBR\n;
}

?
/BODY
/HTML




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




Bug #16869 Updated: Squirrelmail, wrong directory

2002-04-27 Thread mfischer

 ID:   16869
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Bogus
 Bug Type: *Web Server problem
 Operating System: Linux Mandrake 8.2
 PHP Version:  4.2.0
 New Comment:

Is saw your point, but you have to understand that this is rather
useless information as this is a bug system for PHP and not for every
piece of software out there written *in* PHP. If you want to report a
bug concerning PHP, you have to be specific about the actual problem,
give reproduceable examples, etc. and not just tell 'software xy
doesn't work anymoer after the upgrade'. Who says this software is 100%
error free? I hope you see the point of this bug reporting system.


Previous Comments:


[2002-04-27 06:45:11] [EMAIL PROTECTED]

This was not meant as a support question.

It was intended to inform you that a change has occured from PHP 4.1.2
to 4.2.0 which causes identical versions of Squirrelmail to fail.

Jan P. Sorensen



[2002-04-27 06:03:33] [EMAIL PROTECTED]

The bug system is not the appropriate forum for asking support
questions. For a list of a range of more appropriate places to ask
for help using PHP, please visit http://www.php.net/support.php



[2002-04-27 04:34:57] [EMAIL PROTECTED]

Use of Squirrelmail version 1.0.6 and 1.2.5 fails together with PHP
4.2.0. Squirrelmail is installed at /usr/apache/htdocs/squirrelmail.

During the initial call of Squirrelmail (http://my.server/squirrelmail)
the Apache 1.3.24 error log says: 
File does not exist: /usr/apache/htdocs/src/login.php

PHP version 4.1.2 (and earlier) on the other hand works correctly, and
finds the requested document at the proper location:

/usr/apache/htdocs/squirrelmail/src/login.php

Jan P. Sorensen

--

PHP configuration:

  ./configure --with-apache=../apache_1.3.24 --enable-track-vars
--with-mysql







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




Bug #16743 Updated: php_mysql.c:55: redefinition of `ushort'

2002-04-27 Thread mw

 ID:   16743
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Closed
 Bug Type: MySQL related
 Operating System: RedHat Linux 7.2
 PHP Version:  4.2.0
 New Comment:

Works fine by now ;-)


Previous Comments:


[2002-04-26 21:04:56] [EMAIL PROTECTED]

reclassified.




[2002-04-26 21:04:38] [EMAIL PROTECTED]

Fixed in CVS. Fix will be in PHP 4.2.1.

--Jani




[2002-04-23 03:42:50] [EMAIL PROTECTED]

Sorry for the german messages ;-)

Making all in mysql
make[2]: Wechsel in das Verzeichnis Verzeichnis
»/usr/src/php-4.2.0/ext/mysql«
make[3]: Wechsel in das Verzeichnis Verzeichnis
»/usr/src/php-4.2.0/ext/mysql«
gcc -I. -I/usr/src/php-4.2.0/ext/mysql -I/usr/src/php-4.2.0/main
-I/usr/src/php-4.2.0 -I/usr/src/php-4.2.0/Zend -I/usr//include
-I/usr//include/mysql -I/usr/src/php-4.2.0/ext/xml/expat 
-I/usr/src/php-4.2.0/TSRM -g -O2  -c php_mysql.c  touch php_mysql.lo
php_mysql.c:55: redefinition of `ushort'
/usr/include/sys/types.h:151: `ushort' previously declared here
make[3]: *** [php_mysql.lo] Fehler 1
make[3]: Verlassen des Verzeichnisses Verzeichnis
»/usr/src/php-4.2.0/ext/mysql«
make[2]: *** [all-recursive] Fehler 1
make[2]: Verlassen des Verzeichnisses Verzeichnis
»/usr/src/php-4.2.0/ext/mysql«
make[1]: *** [all-recursive] Fehler 1
make[1]: Verlassen des Verzeichnisses Verzeichnis
»/usr/src/php-4.2.0/ext«
make: *** [all-recursive] Fehler 1



[2002-04-23 02:53:22] [EMAIL PROTECTED]

The commandlines I've used for configure are:

./configure --prefix=/usr/server/php
--with-config-file-path/usr/server/config/--without-pear
--with-openssl=/usr/ --enable-bcmath --with-mysql=/usr/


After changing the source code of ext/mysql/php_mysql.c in line 55 it
worked then ;-)




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




Bug #14542 Updated: Apache Crash

2002-04-27 Thread rasmus

 ID:   14542
 Updated by:   [EMAIL PROTECTED]
-Summary:  connection_status() does not return 2 on timeout
-Reported By:  [EMAIL PROTECTED]
+Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Closed
 Bug Type: Unknown/Other Function
-Operating System: Solaris 7
+Operating System: Linux 2.4.5
-PHP Version:  4.1.0
+PHP Version:  4.1.1
 New Comment:

Fixed in CVS


Previous Comments:


[2002-04-25 16:07:25] [EMAIL PROTECTED]

The cause of the bug is that the following code is commented out in the
timeout handler (zend_timeout() in zend_execute_API):

/* is there any point in this?  we're terminating the request
anyway...
PG(connection_status) |= PHP_CONNECTION_TIMEOUT;
*/

In our case, we need this error status to be set correctly. We want to
be able to detect the error when a script is terminated due to timeout.



[2001-12-16 02:22:59] [EMAIL PROTECTED]

It seems that when a script terminates due to a
timeout connection_status() returns 0 (and
connection_timeout() no longer exists).

When aborted by a user connection_status() does return 1.

Sample script:

?PHP
set_time_limit(1);
register_shutdown_function(shutdown);

function shutdown(){
$status = connection_status();
$err = Connection status ($status).\n;
error_log($err, 3, /tmp/phpstatus.log);
}

while(true){
echo .;
}

?





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




Bug #16872: PHP crashes at session_start()

2002-04-27 Thread siebe_tolsma

From: [EMAIL PROTECTED]
Operating system: Win 98
PHP version:  4.2.0
PHP Bug Type: Session related
Bug description:  PHP crashes at session_start()

Hi,

I try to make a script with sessions, but when I use the command
session_start() in my script, PHP crashes. I don't know what causes it, so
please help me.
-- 
Edit bug report at http://bugs.php.net/?id=16872edit=1
-- 
Fixed in CVS:http://bugs.php.net/fix.php?id=16872r=fixedcvs
Fixed in release:http://bugs.php.net/fix.php?id=16872r=alreadyfixed
Need backtrace:  http://bugs.php.net/fix.php?id=16872r=needtrace
Try newer version:   http://bugs.php.net/fix.php?id=16872r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=16872r=support
Expected behavior:   http://bugs.php.net/fix.php?id=16872r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=16872r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=16872r=submittedtwice




Bug #16872 Updated: PHP crashes at session_start()

2002-04-27 Thread siebe_tolsma

 ID:   16872
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Bogus
 Bug Type: Session related
 Operating System: Win 98
 PHP Version:  4.2.0
 New Comment:

All right,

So I have the this script:

?php
session_start();

/*
phpTextEditor v1.0 (03/21/02)
http://php.rij73.com
Copyright (C) 2002  rij73

Please post in the forum at http://php.rij73.com if you have any
questions or comments.

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.
*/

include (config.inc);

//password check
if(($valid_pass != $editor_password) or ($valid_user !=
$editor_username)) {

echo htmlheadtitle$title/titlestyle type=\text/css\!--;

include (style.inc);

echo --/style/head;
echo body onload=\document.login.valid_user.focus()\table
align=center width=750 height=\90%\trtd align=center
valign=middleform name=\login\ method=\post\
action=\login.php\;
echo $userbrinput type=\text\
name=\valid_user\brbr$passbrinput type=\password\
name=\valid_pass\brbrinput type=\submit\ name=\submit\
value=\login\;
echo /form/td/tr/table/body;

} //end password check

//password okay, send to script!
elseif(($valid_pass == $editor_password) or ($valid_user ==
$editor_username)){
session_register('valid_user');
session_register('valid_pass');
header(Location: index.php);
}
?

I expect it to start a session, register the user and password and the
go to index.php.

Now when I run the script in the browser (I run under a Apache server),
PHP crashes.


Previous Comments:


[2002-04-27 10:31:06] [EMAIL PROTECTED]

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

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




[2002-04-27 10:29:02] [EMAIL PROTECTED]

Hi,

I try to make a script with sessions, but when I use the command
session_start() in my script, PHP crashes. I don't know what causes it,
so please help me.




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




Bug #16830 Updated: file_exists() returns TRUE instead of FALSE

2002-04-27 Thread sniper

 ID:   16830
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Analyzed
 Bug Type: Filesystem function related
-Operating System: Windows 2000 SP2
+Operating System: ANY
-PHP Version:  4.2.0
+PHP Version:  4.3.0-dev
 New Comment:

Duh. You're right, it's a bug. 

?php

$filename=;

$bb = is_file($filename);
var_dump($bb);

$aa = file_exists($filename);
var_dump($aa);

?

Outputs:

int(0)
bool(true)


--Jani



Previous Comments:


[2002-04-27 00:27:58] [EMAIL PROTECTED]

c:\winnt\system32\php4ts.dll matches the php4ts.dll from the php 4.2.0
package. All other PHP files are in php's own directory. When I install
a new version of PHP, I always delete the whole old PHP directory and
create a new one to prevent keeping rests from old versions. I also
always use the new php.ini-dist and modify it again instead of keeping
the old php.ini.

Additionally, in the last PHP version I had installed (4.1.2),
file_exists() DID work! It just stopped working with PHP 4.2.0, so I
doubt that error could be from forgetting to overwrite old DLLs with
new ones.

What does the script I posted before say for _you_, Jani?



[2002-04-26 22:11:06] [EMAIL PROTECTED]

Just in case..are you absolutely sure you have updated
all dlls related to PHP in your system? (I assume you had
some older PHP there before)

e.g. php4ts.dll is quite important to be new. Try searching
your filesystem for it. You might have many of them there.

--Jani




[2002-04-26 12:47:20] [EMAIL PROTECTED]

Sander, please tell me the Bug ID for it.

I did search the Bugs DB for open bugs with file_exists.
The bug I'm talking about was reported as bug for PHP 4.1.0 ( Bug ID:
15218 ) and it has actually been fixed in 4.1.2, but now it appeared
again in PHP 4.2.0 !!
So this is no duplicate bugreport, I think.



[2002-04-26 11:59:39] [EMAIL PROTECTED]

Plese, SEARCH the bugdb. There is a report about this. (sorry Jani ;)



[2002-04-25 16:39:58] [EMAIL PROTECTED]

file_exists() returns TRUE instead of FALSE

As per request, here are more details...

This:
?

$filename=;

if (is_file($filename))
{
print is_file sais, the file $filename bdoes exist/b.br;
}
else
{
print is_file sais, the file $filename bdid not exist/b.br;
}


if (file_exists($filename))
{
print file_exists sais, the file $filename bdoes exist/b.br;
}
else
{
print file_exists sais, the file $filename bdid not
exist/b.br;
}

?

will return:
is_file sais, the file did not exist.
file_exists sais, the file does exist.


Again, in other words:
If you give file_exists() an empty string as argument ( file_exists()
), it will return TRUE (saying the file existed, but it does not,
because  is no file.)

is_file() correctly returns FALSE if you give it an empty string as
argument and so should file_exists do, as it did in PHP 4.1.2


Further information:
I used to check my upload-scripts for uploaded files using
$file=$_FILES['datei']['tmp_name'];
if (file_exists($file)) { savefile($file); }
but I cannot use this anymore because when a user does not upload a
file, $filename becomes an empty string and file_exists returns TRUE,
so my function savefile($file) wants to save a non-uploaded file.



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

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




Bug #15940 Updated: Segmentation fault (11)

2002-04-27 Thread sniper

 ID:   15940
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Feedback
 Bug Type: Apache related
 Operating System: Linux
 PHP Version:  4.1.2
 New Comment:

Does this happen with PHP 4.2.0 ?



Previous Comments:


[2002-04-27 01:42:20] [EMAIL PROTECTED]

I've started experiencing something similar since I upgraded to 4.1.2.

The segfaults kept occuring during a POST operations, after enabling
debug and rebuilding my rpms I then noticed the following messages in
the apache error_log:

Unknown(0) : Warning - POST Content-Length of 75 bytes exceeds the
limit of 16 bytes.

This left me scratching my head until I skimmed through php.ini and
found the setting for post_max_size=16


comparison with another working php server that uses an older php.ini
file this var was set to 8M.


this has affected two of my servers at the same time.  The only
commonality that I have is that I use ZendIDE and recently updated from
2.0.0 to 2.0.1 on both machines.

The third machine (working) has no Zend installations on it.



[2002-04-11 02:18:47] [EMAIL PROTECTED]

It happens here also. I tried with several apache version, but the
error is the same. I have to restart apache on hourly basis. With 4.06
it worked for months.



[2002-03-19 10:04:41] [EMAIL PROTECTED]

Check out bug-report #14529, talking about propably the same problems
there



[2002-03-19 06:41:49] [EMAIL PROTECTED]

Had the same problems as described in first post in this thread. We
tried an older apache, 1.3.20. This doesn't help, same problems occur:
the stopping of php-parsing in the middle or end of an echo-command,
and the exited on signal 11 message in var/log/messages.

Our php 4.1.2 configuration:
'./configure' '--with-mysql=/usr/local'
'--with-postgres=/usr/local/pgsql' '--with-gnu-ld' '--with-libz'
'--with-bz2' '--with-gdbm' '--with-ndbm' '--with-gd' '--with-openssl'
'--with-mm' '--enable-sysvsem' '--enable-sysvshm' '--with-mhash'
'--with-mcrypt' '--with-apache=../apache_1.3.20'

We tried an older version of Apache, because this seemed the only
difference to another server where no exited-on-signal-11-messages were
found in the /var/log/messages-file.

Didn't look at the difference in load though, shall ask our
administrators about this.



[2002-03-13 06:12:16] [EMAIL PROTECTED]

I should mention that the problems occurs even if there is no call to
Interbase at all. In our case we saw it happen in an index.php file
which gets some session values and sets some constants base on the
environment. It then creates html/javascript to open a new browser
window. This didn't happen as the rendering ended inmidst the
javascript code. Only after this is Interbase involved.



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

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




Bug #16873: help me get rid of the internal server error

2002-04-27 Thread EVEMWALKER

From: [EMAIL PROTECTED]
Operating system: windows 98
PHP version:  4.2.0
PHP Bug Type: *Configuration Issues
Bug description:  help me get rid of the internal server error

hi every time i log into http://www.nitroclicks.com i can't get in because
screen says internal server error 500 on top 
this is the only site i am having problem with can you please help me and
email me back soon please thank you eve
-- 
Edit bug report at http://bugs.php.net/?id=16873edit=1
-- 
Fixed in CVS:http://bugs.php.net/fix.php?id=16873r=fixedcvs
Fixed in release:http://bugs.php.net/fix.php?id=16873r=alreadyfixed
Need backtrace:  http://bugs.php.net/fix.php?id=16873r=needtrace
Try newer version:   http://bugs.php.net/fix.php?id=16873r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=16873r=support
Expected behavior:   http://bugs.php.net/fix.php?id=16873r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=16873r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=16873r=submittedtwice




Bug #16873 Updated: help me get rid of the internal server error

2002-04-27 Thread mfischer

 ID:   16873
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Bogus
 Bug Type: *Configuration Issues
 Operating System: windows 98
 PHP Version:  4.2.0
 New Comment:

The bug system is not the appropriate forum for asking support
questions. For a list of a range of more appropriate places to ask
for help using PHP, please visit http://www.php.net/support.php


Previous Comments:


[2002-04-27 12:05:07] [EMAIL PROTECTED]

hi every time i log into http://www.nitroclicks.com i can't get in
because screen says internal server error 500 on top 
this is the only site i am having problem with can you please help me
and email me back soon please thank you eve




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




Bug #16874: php.exe not included with ZIP distribution

2002-04-27 Thread rcherry

From: [EMAIL PROTECTED]
Operating system: XP
PHP version:  4.2.0
PHP Bug Type: Unknown/Other Function
Bug description:  php.exe not included with ZIP distribution

php.exe not included with ZIP version of Windows distribution.
-- 
Edit bug report at http://bugs.php.net/?id=16874edit=1
-- 
Fixed in CVS:http://bugs.php.net/fix.php?id=16874r=fixedcvs
Fixed in release:http://bugs.php.net/fix.php?id=16874r=alreadyfixed
Need backtrace:  http://bugs.php.net/fix.php?id=16874r=needtrace
Try newer version:   http://bugs.php.net/fix.php?id=16874r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=16874r=support
Expected behavior:   http://bugs.php.net/fix.php?id=16874r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=16874r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=16874r=submittedtwice




Bug #16830 Updated: file_exists() returns TRUE instead of FALSE

2002-04-27 Thread cynic

 ID:   16830
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Analyzed
 Bug Type: Filesystem function related
 Operating System: ANY
 PHP Version:  4.3.0-dev
 New Comment:

Jani, the var_dump()s IMO show two bugs: the other is that is_file()
returned int(0), while it's documented to be a bool type. could you
check this too?



Previous Comments:


[2002-04-27 10:41:44] [EMAIL PROTECTED]

Duh. You're right, it's a bug. 

?php

$filename=;

$bb = is_file($filename);
var_dump($bb);

$aa = file_exists($filename);
var_dump($aa);

?

Outputs:

int(0)
bool(true)


--Jani




[2002-04-27 00:27:58] [EMAIL PROTECTED]

c:\winnt\system32\php4ts.dll matches the php4ts.dll from the php 4.2.0
package. All other PHP files are in php's own directory. When I install
a new version of PHP, I always delete the whole old PHP directory and
create a new one to prevent keeping rests from old versions. I also
always use the new php.ini-dist and modify it again instead of keeping
the old php.ini.

Additionally, in the last PHP version I had installed (4.1.2),
file_exists() DID work! It just stopped working with PHP 4.2.0, so I
doubt that error could be from forgetting to overwrite old DLLs with
new ones.

What does the script I posted before say for _you_, Jani?



[2002-04-26 22:11:06] [EMAIL PROTECTED]

Just in case..are you absolutely sure you have updated
all dlls related to PHP in your system? (I assume you had
some older PHP there before)

e.g. php4ts.dll is quite important to be new. Try searching
your filesystem for it. You might have many of them there.

--Jani




[2002-04-26 12:47:20] [EMAIL PROTECTED]

Sander, please tell me the Bug ID for it.

I did search the Bugs DB for open bugs with file_exists.
The bug I'm talking about was reported as bug for PHP 4.1.0 ( Bug ID:
15218 ) and it has actually been fixed in 4.1.2, but now it appeared
again in PHP 4.2.0 !!
So this is no duplicate bugreport, I think.



[2002-04-26 11:59:39] [EMAIL PROTECTED]

Plese, SEARCH the bugdb. There is a report about this. (sorry Jani ;)



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

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




Bug #16875: FILE Function Checks Wrong Path

2002-04-27 Thread tonicpeddler

From: [EMAIL PROTECTED]
Operating system: Windows XP
PHP version:  4.2.0
PHP Bug Type: Filesystem function related
Bug description:  FILE Function Checks Wrong Path

When I call:

$data = file( database.txt );

From my file c:\xitami\webpages\db\database.php, php doesn't check
c:\xitami\webpages\db\ for database.txt, instead it returns an error
saying that database.txt doesn't exist in the directory
c:\xitami\webpages\db\database.php  I beleive this may be a bug, since
it shouldn't be including the name of the php script in the directory.  In
the mean time I am specifying an absolute filename for database.txt,
however I'd much prefer the modularity of relative file access.

If you fix it, that's great, I hope someone contacts me.  In that case
could someone tell me where to download a prebuilt binary?  I'm on dialup
and a pretty slow machine, not very interested in downloading the source
code again, and building, again.
-- 
Edit bug report at http://bugs.php.net/?id=16875edit=1
-- 
Fixed in CVS:http://bugs.php.net/fix.php?id=16875r=fixedcvs
Fixed in release:http://bugs.php.net/fix.php?id=16875r=alreadyfixed
Need backtrace:  http://bugs.php.net/fix.php?id=16875r=needtrace
Try newer version:   http://bugs.php.net/fix.php?id=16875r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=16875r=support
Expected behavior:   http://bugs.php.net/fix.php?id=16875r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=16875r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=16875r=submittedtwice




Bug #16876: Static PHP Variables

2002-04-27 Thread tonicpeddler

From: [EMAIL PROTECTED]
Operating system: Windows XP
PHP version:  4.2.0
PHP Bug Type: Feature/Change Request
Bug description:  Static PHP Variables

I think some php users might find it useful if you could declare a variable
as a static variable.  When the script finishes executing, PHP rewrites
the original declaration of those variables to the values they had at the
end of script execution.

Maybe I'm wrong, or maybe there's a more effective way to accomplish this,
but there is certainly a very obvious and simple syntax for such a
feature.

static $var = value;

It would certainly simplify a lot for me, and probably at least a few
other people.
-- 
Edit bug report at http://bugs.php.net/?id=16876edit=1
-- 
Fixed in CVS:http://bugs.php.net/fix.php?id=16876r=fixedcvs
Fixed in release:http://bugs.php.net/fix.php?id=16876r=alreadyfixed
Need backtrace:  http://bugs.php.net/fix.php?id=16876r=needtrace
Try newer version:   http://bugs.php.net/fix.php?id=16876r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=16876r=support
Expected behavior:   http://bugs.php.net/fix.php?id=16876r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=16876r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=16876r=submittedtwice




Bug #1571 Updated: support for mknod(): pipe creation

2002-04-27 Thread jimw

 ID:   1571
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Closed
 Bug Type: Feature/Change Request
 Operating System: UNIX
 PHP Version:  4.0
 New Comment:

posix_mkfifo() allows making named pipes.


Previous Comments:


[2001-02-10 13:28:42] [EMAIL PROTECTED]

refiled against 4.0.



[1999-06-19 14:22:43] [EMAIL PROTECTED]

Message-passing between two php3 scripts can be useful under some
circumstances (example: implementation of PAM conversation functions).
Making pipe creation available directly to php3 scripts on systems
which support it provides a much more straightforward way to accomplish
this (currently, it appears that inter-script message passing is only
possible through either shared memory, or the use of an external
database, both of which include unnecessary overhead compared to a
pipe).




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




Bug #2107 Updated: Exec as TTY

2002-04-27 Thread jimw

 ID:   2107
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Closed
 Bug Type: Feature/Change Request
 Operating System: Linux
 PHP Version:  4.0
 New Comment:

proc_open (in cvs) allows this.


Previous Comments:


[2001-02-10 13:39:19] [EMAIL PROTECTED]

refiled against 4.0.



[1999-08-18 19:25:07] [EMAIL PROTECTED]

I want to execute passwd and change some passwords however PHP
doesn't allow the user to operate a TTY execute statement.  I can do
this in Perl!

Can PHP support ttyexec?

escapeshellcmd 
exec 
system 
passthru 





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




Bug #4223 Updated: PHP calls MySQL with apache user instead of connected user

2002-04-27 Thread jimw

 ID:   4223
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Analyzed
-Bug Type: Feature/Change Request
+Bug Type: MySQL related
 Operating System: RedHat 6.1
-PHP Version:  4.0 Release Candidate 1
+PHP Version:  4.0 Release Cand
 New Comment:

this isn't a feature request.


Previous Comments:


[2000-08-08 22:30:25] [EMAIL PROTECTED]

I don´t kwno any way, moving to feature request



[2000-07-30 17:07:23] [EMAIL PROTECTED]

User response:
As far as I can gather it has something to do with the
wait_timeout of MySQL.  This was set pretty low.  I think
the persistent connections outlived the connections on the
database side during quiet periods.  The error doesn't
seem to appear if I up this timeout or bring down the
life span of the apache child processes.  Is there a
way to set a timeout on the persistent connections
on the php side?  That would enable one to match it
against the MySQL timeout and make sure it never happens.





[2000-07-30 13:52:19] [EMAIL PROTECTED]

** Warning - uneducated guess **

This seems like it might be a mysql configuration issue.

Please review the MySQL documentation on performance - try increasing
the max number of connections, etc...

Also, what user does you web server run as - www by chance?



[2000-04-24 03:04:48] [EMAIL PROTECTED]

This is hard to reproduce, but every once in a while PHP tries to use
the
user running apache instead of the user specified in mysql_pconnect()
to
query MySQL.  So after a pconnect with user X, you get a access
denied
for user www from the query. Our config is a dual-processor webserver
and dual-processor MySQL machine.  With low traffic, it does not occur.
 
It also appears to occur only when using write locks on tables, but I 
can't positively verify that - only that I haven't seen it happen on
sites
not using table locks, yet.

PHP configured with:
./configure --with-apxs=/usr/local/apache/bin/apxs --with-mysql=/usr
--enable-track-vars --with-gd=../gd1.4 --with-ttf --without-pcre-regex
--with-mm=../mm-1.0.12 --enable-inline-optimization --disable-debug
--with-recode --with-t1lib --with-dbase

Also running the Zend optimizer for RC1.




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




Bug #5174 Updated: OCIBindByName doesn't need quoting in strings

2002-04-27 Thread jimw

 ID:   5174
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Closed
 Bug Type: Feature/Change Request
 Operating System: *
 PHP Version:  4.0.0 Release
 New Comment:

ocibindbyname can't know whether its parameters were magic-quoted or
not.


Previous Comments:


[2000-08-07 08:58:16] [EMAIL PROTECTED]

it is at least inconsistent when you have magic_quotes
enabled 'cause the 'magic' breaks here

i'll change this into a feature request to 'banish'
'magic' for database variable bindings




[2000-08-07 08:01:59] [EMAIL PROTECTED]

that's a feature -not- a bug!



[2000-06-21 18:24:16] [EMAIL PROTECTED]

when using magic_quotes and OCIBindByName
you'll end up with database entries containing
doubled quotes as OCIBindByName transparently
passes values without any parsing 




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




Bug #5311 Updated: implement checkdnsrr() and getmxrr() on windows

2002-04-27 Thread jimw

 ID:   5311
 Updated by:   [EMAIL PROTECTED]
-Summary:  Checkdnsrr
 Reported By:  [EMAIL PROTECTED]
 Status:   Analyzed
 Bug Type: Feature/Change Request
 Operating System: W2000
 PHP Version:  4.0.1
 New Comment:

just updating summary to be more informative.


Previous Comments:


[2001-02-24 13:47:02] [EMAIL PROTECTED]

Both of these are #Defined out in the source code.. someone needs too
look for a win32 implmentation of these at some point (dns.c:170 #if
HAVE_BINDLIB  !(defined(__BEOS__)||defined(PHP_WIN32))).

Changing to Feature Change Request.



[2000-11-18 22:21:30] [EMAIL PROTECTED]

reclassified



[2000-08-12 13:50:49] [EMAIL PROTECTED]

user comment:
Neither checkdnsrr nor getmxrr appear work under Windows NT
4/SP6a with IIS
4.

I'm running with the downloaded Windows binary 4.0.1pl2 and
the provided
.ini file. OS is NT 4.0/sp6a, IIS 4.

Under Windows, checkdnsrr always returns true (no matter
whether the
provided domain name could even possibly be valid) and
getmxrr returns 0
hosts.

(append ?domain=domaintotest.com to the URL when calling
this script)

?
echo(pcheckdnsrr:
.(checkdnsrr($domain,MX)?true:false));
getmxrr($domain,$mxhosts);
echo(pgetmxrr: [.count($mxhosts).] );
for ( $i = 0; $i  count ( $mxhosts ); $i++ ) {
echo($mxhosts[$i]. );
}
?




[2000-07-27 20:10:15] [EMAIL PROTECTED]

After correcting that typos in the script I found that it is still not
working on W2k while Linux works fine...

checkdnsrr() seems not even trying to connect elsewhere...



[2000-07-01 16:36:45] [EMAIL PROTECTED]

OS : Windows 2000 Pro
Server : Apache 1.3.12 Win32
PHP4 : PHP 4.01 Win32
Script : -
list($user,$domain)=split(@,$email,2);
echo P$user @ $domain
if (checkdnsrr($domain,MX)){
echo PValid Domain/P
}
else{
echo PUnValid Domain/P
}
---
Test is already Unvalid Domain, But split is OK.
I supposed that it's checkdnsrr not working.





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




Bug #5142 Updated: Allow properties and methods of a class to be declared as public or private

2002-04-27 Thread jimw

 ID:   5142
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Closed
 Bug Type: Feature/Change Request
 Operating System: Linux
 PHP Version:  4.0.0 Release
 New Comment:

implemented in ZE2.


Previous Comments:


[2000-06-20 11:33:17] [EMAIL PROTECTED]


This is just a simple feature request.

I would like to be able to define methods and properties of a class as
either public or private (public could be the default if not specified,
to maintain backwards compatibility with the current syntax).

Being able to declare methods/properties as private to a class makes a
lot of sense if many people are sharing the same codebase and use
classes they have not written themselves. If all properties and/or
methods of a class are public, then people could possibly set a
property or call a method that would cause the class to misbehave. I
know this can be guarded against by programming the class
defensively, and also that people could just read the class
definition to learn its proper use, but being able to just declare some
parts of the class as private solves the above problems nicely and
easily.

A syntax such as the following would make sense to me:

class myClass
{
public {
var $myPublicProperty;

function myPublicMethod()
{
}
}
private {
var $myPrivateProperty;

function myPrivateMethod()
{
}
}
}


Please consider this :-)

Best regards
Jesper Juhl
[EMAIL PROTECTED]





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




Bug #16876 Updated: Static PHP Variables

2002-04-27 Thread mfischer

 ID:   16876
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Bogus
 Bug Type: Feature/Change Request
 Operating System: Windows XP
 PHP Version:  4.2.0
 New Comment:

Please be more specific what you mean. There's already a 'static'
modifier for variables within function if you havent spotted it yet.
Feel free to re-open the report if you can provide a more clearer
description what the goal of your 'static' version should be.


Previous Comments:


[2002-04-27 13:19:40] [EMAIL PROTECTED]

I think some php users might find it useful if you could declare a
variable as a static variable.  When the script finishes executing, PHP
rewrites the original declaration of those variables to the values they
had at the end of script execution.

Maybe I'm wrong, or maybe there's a more effective way to accomplish
this, but there is certainly a very obvious and simple syntax for such
a feature.

static $var = value;

It would certainly simplify a lot for me, and probably at least a few
other people.




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




Bug #16876 Updated: Static PHP Variables

2002-04-27 Thread tonicpeddler

 ID:   16876
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Bogus
+Status:   Open
 Bug Type: Feature/Change Request
 Operating System: Windows XP
 PHP Version:  4.2.0
 New Comment:

My suggestion is a feature that could be used for instance, to remember
settings without accessing a file or a database to find out what those
settings are.  For instance, something like this:

example.php
?php
   STATIC VARIABLE $fontcolor = '#FF';

   echo EOT
html
body text=$fontcolor
Hello, this is the color


Previous Comments:


[2002-04-27 13:39:07] [EMAIL PROTECTED]

Please be more specific what you mean. There's already a 'static'
modifier for variables within function if you havent spotted it yet.
Feel free to re-open the report if you can provide a more clearer
description what the goal of your 'static' version should be.



[2002-04-27 13:19:40] [EMAIL PROTECTED]

I think some php users might find it useful if you could declare a
variable as a static variable.  When the script finishes executing, PHP
rewrites the original declaration of those variables to the values they
had at the end of script execution.

Maybe I'm wrong, or maybe there's a more effective way to accomplish
this, but there is certainly a very obvious and simple syntax for such
a feature.

static $var = value;

It would certainly simplify a lot for me, and probably at least a few
other people.




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




Bug #16876 Updated: Static PHP Variables

2002-04-27 Thread tonicpeddler

 ID:   16876
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Open
 Bug Type: Feature/Change Request
 Operating System: Windows XP
 PHP Version:  4.2.0
 New Comment:

My suggestion is a feature that could be used for instance, to remember
settings without accessing a file or a database to find out what those
settings are.  For instance, something like this:

example.php
?php
   STATIC VARIABLE $fontcolor = 'white';
   if ( $newcolor !=  ) {
   $fontcolor = $newcolor;
   $message = Congratulations on your new color!; }
   echo EOT
html
body text=$fontcolor
p align=center
Hello, this is the color.
You may choose a new color like 
a href=example.php?newcolor=redRed/a.
/p
/body
/html
EOT;

// end of script
?


Previous Comments:


[2002-04-27 13:49:56] [EMAIL PROTECTED]

My suggestion is a feature that could be used for instance, to remember
settings without accessing a file or a database to find out what those
settings are.  For instance, something like this:

example.php
?php
   STATIC VARIABLE $fontcolor = '#FF';

   echo EOT
html
body text=$fontcolor
Hello, this is the color



[2002-04-27 13:39:07] [EMAIL PROTECTED]

Please be more specific what you mean. There's already a 'static'
modifier for variables within function if you havent spotted it yet.
Feel free to re-open the report if you can provide a more clearer
description what the goal of your 'static' version should be.



[2002-04-27 13:19:40] [EMAIL PROTECTED]

I think some php users might find it useful if you could declare a
variable as a static variable.  When the script finishes executing, PHP
rewrites the original declaration of those variables to the values they
had at the end of script execution.

Maybe I'm wrong, or maybe there's a more effective way to accomplish
this, but there is certainly a very obvious and simple syntax for such
a feature.

static $var = value;

It would certainly simplify a lot for me, and probably at least a few
other people.




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




Bug #16876 Updated: Static PHP Variables

2002-04-27 Thread tonicpeddler

 ID:   16876
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Open
 Bug Type: Feature/Change Request
 Operating System: Windows XP
 PHP Version:  4.2.0
 New Comment:

I accidently pressed the submit button prematurely, one of those posts
is quite obviously incomplete, and repeats the beginning of the comment
directly after proceeding it.


Previous Comments:


[2002-04-27 13:53:34] [EMAIL PROTECTED]

My suggestion is a feature that could be used for instance, to remember
settings without accessing a file or a database to find out what those
settings are.  For instance, something like this:

example.php
?php
   STATIC VARIABLE $fontcolor = 'white';
   if ( $newcolor !=  ) {
   $fontcolor = $newcolor;
   $message = Congratulations on your new color!; }
   echo EOT
html
body text=$fontcolor
p align=center
Hello, this is the color.
You may choose a new color like 
a href=example.php?newcolor=redRed/a.
/p
/body
/html
EOT;

// end of script
?



[2002-04-27 13:49:56] [EMAIL PROTECTED]

My suggestion is a feature that could be used for instance, to remember
settings without accessing a file or a database to find out what those
settings are.  For instance, something like this:

example.php
?php
   STATIC VARIABLE $fontcolor = '#FF';

   echo EOT
html
body text=$fontcolor
Hello, this is the color



[2002-04-27 13:39:07] [EMAIL PROTECTED]

Please be more specific what you mean. There's already a 'static'
modifier for variables within function if you havent spotted it yet.
Feel free to re-open the report if you can provide a more clearer
description what the goal of your 'static' version should be.



[2002-04-27 13:19:40] [EMAIL PROTECTED]

I think some php users might find it useful if you could declare a
variable as a static variable.  When the script finishes executing, PHP
rewrites the original declaration of those variables to the values they
had at the end of script execution.

Maybe I'm wrong, or maybe there's a more effective way to accomplish
this, but there is certainly a very obvious and simple syntax for such
a feature.

static $var = value;

It would certainly simplify a lot for me, and probably at least a few
other people.




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




Bug #7765 Updated: not OO until automatic class destructor is added

2002-04-27 Thread jimw

 ID:   7765
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Closed
 Bug Type: Feature/Change Request
 Operating System: *
 PHP Version:  4.0.3pl1
 New Comment:

ZE2 has destructors.


Previous Comments:


[2001-10-23 14:42:22] [EMAIL PROTECTED]

Thank you for keeping my feature request alive.

If I remember the discussions correctly, the implementation issue
boiled down to the fact that PHP does not kill local variables at
function or block termination (for speed reasons I believe).  In order
to properly implement a destructor, the reference count for a variable
needs to be decremented as the block scope of the declaration is
exited.

I had suggested that this be a compile time flag, because correct
program behavior is to do the reference decrements on block exit.  For
those of us who want every possible tool to illuminate bugs (e.g.
error_reporting( E_ALL)), this just adds another level of error
checking on use of such constructs as global references on local
variables, etc.

Again, perhaps this is not the main focus of PHP, but nevertheless I
think it would be helpful option for developers who are writing huge OO
sites with PHP.  It seems the incidence of such has increased greatly
since I first made this report.

BTW, I do not know how my original comments got deleted.  I hope my
memory of the issues is correct herein.  Apologies if I am mistaken.

Please take my comments constructively.





[2001-10-23 13:54:34] [EMAIL PROTECTED]

Thank you for keeping my feature request alive.

If I remember the discussions correctly, the implementation issue
boiled down to the fact that PHP does not kill local variables at
function or block termination (for speed reasons I believe).  In order
to properly implement a destructor, the reference count for a variable
needs to be decremented as the block scope of the declaration is
exited.

I had suggested that this be a compile time flag, because correct
program behavior is to do the reference decrements on block exit.  For
those of us who want every possible tool to illuminate bugs (e.g.
error_reporting( E_ALL)), this just adds another level of error
checking on use of such constructs as global references on local
variables, etc.

Again, perhaps this is not the main focus of PHP, but nevertheless I
think it would be helpful option for developers who are writing huge OO
sites with PHP.  It seems the incidence of such has increased greatly
since I first made this report.

BTW, I do not know how my original comments got deleted.  I hope my
memory of the issues is correct herein.  Apologies if I am mistaken.

Please take my comments constructively.





[2001-10-21 19:10:19] [EMAIL PROTECTED]

Couldn't find the information about for which report 
this was duplicate. And this is feature reques.




[2000-11-12 03:20:26] [EMAIL PROTECTED]






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




Bug #7829 Updated: hex2bin()?

2002-04-27 Thread jimw

 ID:  7829
 Updated by:  [EMAIL PROTECTED]
 Reported By: [EMAIL PROTECTED]
-Status:  Open
+Status:  Closed
 Bug Type:Feature/Change Request
-PHP Version: 4.0 Latest CVS (15/11/2000)
+PHP Version: 4.0 Latest CVS (
 New Comment:

pack() does this.


Previous Comments:


[2000-11-15 08:16:55] [EMAIL PROTECTED]

We have bin2hex(), how about adding hex2bin()?




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




Bug #8009 Updated: mysql_fetch_array and same Column Name

2002-04-27 Thread jimw

 ID:   8009
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Closed
 Bug Type: Feature/Change Request
 Operating System: All
 PHP Version:  4.0.3pl1
 New Comment:

mysql_fetch_array() just uses the names reported by the mysql client
library. use 'SELECT table.fieldname AS name' to given them different
names.


Previous Comments:


[2000-11-28 07:17:57] [EMAIL PROTECTED]

In the documentation it is said that if you use same column names the
last one will win. That is so far ok.

However I think the following statement could be correctly transferred
in an assoc. array:

SELECT tblOrderAddress.Street, tblDeliveryAdress.Street 
FROM tblCustomer AS tblOrderAddress, tblCustomer AS tblDeliveryAddress
WHERE .;

It is correct that Street occurs twice as an attribute, but it is
distinguishable by the preceding tablename.
Isn't it possible to change mysql_fetch_array, so that tablenames, if
stated, are included in the assoc Array building process?




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




Bug #8282 Updated: Is there a function for this?

2002-04-27 Thread jimw

 ID:   8282
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Closed
 Bug Type: Feature/Change Request
 Operating System: Linux
 PHP Version:  4.0.3pl1
 New Comment:

this is, indeed, exactly the sort of thing that output buffering is
for.


Previous Comments:


[2001-01-10 02:01:13] [EMAIL PROTECTED]

so why don't you have your own

function quiet_eval($code)
{
  ob_start();
  eval($code);
  $retval = ob_get_contents();
  ob_end_clean();
  return $retval;
}

as I understand it, zend output buffers can be nested, so no issues
with it interfering with existing buffers.



[2000-12-15 14:50:32] [EMAIL PROTECTED]

I guess this is more of a hack than anything, but I really needed
eval()'s code NOT to be displayed right away. So I used ob_start(),
ob_get_contents(), and ob_end_clean(). 

?php 

$stuff = Hello, ; 

ob_start(); // start buffer 
eval(print 'World!';); // execute code 
$retval = ob_get_contents(); // return executed code 
ob_end_clean(); // delete the buffer 

print $stuff.$retval; 

? 

This would print Hello, World! instead of World!Hello, .

Is there a function to do this already?

Thanks,
Chris




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




Bug #8577 Updated: i would kill for the ability to undefine()

2002-04-27 Thread jimw

 ID:   8577
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Closed
 Bug Type: Feature/Change Request
 Operating System: N/A
 PHP Version:  4.0.4
 New Comment:

if you could undefine, it wouldn't be constant.


Previous Comments:


[2001-01-07 13:22:50] [EMAIL PROTECTED]

I don't know if this is impossible or extremely difficult (I assume its
one of the two because this doesn't exist at the moment), but it would
be very handy. 






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




Bug #8860 Updated: variable array not working

2002-04-27 Thread jimw

 ID:   8860
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Closed
 Bug Type: Feature/Change Request
 Operating System: linux
 PHP Version:  4.0.4pl1
 New Comment:

you need to use eval() to make something like this unambiguous.


Previous Comments:


[2001-01-23 10:25:22] [EMAIL PROTECTED]

It is definitely not meant to work this way. 'test[2]' is
not a variable name. $test is the variable (array), and
$test[2] is second element of the array. So it belongs to
feature requests.



[2001-01-23 10:20:59] [EMAIL PROTECTED]

ah, sorry, should've read the report more carefully.



[2001-01-23 10:07:21] [EMAIL PROTECTED]

changed status



[2001-01-23 10:06:24] [EMAIL PROTECTED]

ok and that isn;t working either...
althoug i liked the first more (and still think it should be that way)

so this doesn't work either:

$three = G;

echo Test;
$test = Array(one,two,three,four); $var = 'test[2]'; echo
$$var; /* should echo three */




[2001-01-23 09:59:43] [EMAIL PROTECTED]

no. it will echo contents of $three. if you don't have that variable in
current scope, it'll echo null, and, depending on your settings, emit a
warning.



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

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




Bug #16877: socket_read() only gets one character (no matter what length set)

2002-04-27 Thread webmaster

From: [EMAIL PROTECTED]
Operating system: Windows 2000 Profesional
PHP version:  4.2.0
PHP Bug Type: Unknown/Other Function
Bug description:  socket_read() only gets one character (no matter what length set)

The socket_read() function does not work properly, say I do this:

$text = socket_read($message_socket, 2048);

It will only get 1 character even though I said 2048 characters.
-- 
Edit bug report at http://bugs.php.net/?id=16877edit=1
-- 
Fixed in CVS:http://bugs.php.net/fix.php?id=16877r=fixedcvs
Fixed in release:http://bugs.php.net/fix.php?id=16877r=alreadyfixed
Need backtrace:  http://bugs.php.net/fix.php?id=16877r=needtrace
Try newer version:   http://bugs.php.net/fix.php?id=16877r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=16877r=support
Expected behavior:   http://bugs.php.net/fix.php?id=16877r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=16877r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=16877r=submittedtwice




Bug #16877 Updated: socket_read() only gets one character (no matter what length set)

2002-04-27 Thread webmaster

 ID:   16877
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Open
-Bug Type: Unknown/Other Function
+Bug Type: Sockets related
 Operating System: Windows 2000 Profesional
 PHP Version:  4.2.0
 New Comment:

The socket_read() function does not work properly, say I do this:

$text = socket_read($message_socket, 2048);

It will only get 1 character even though I said 2048 characters.


Previous Comments:


[2002-04-27 14:41:29] [EMAIL PROTECTED]

The socket_read() function does not work properly, say I do this:

$text = socket_read($message_socket, 2048);

It will only get 1 character even though I said 2048 characters.




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




Bug #9155 Updated: set_error_handler() to accepts object/method tuple

2002-04-27 Thread jimw

 ID:   9155
 Updated by:   [EMAIL PROTECTED]
 Reported By:  Tomas V.V.Cox [EMAIL PROTECTED]
-Status:   Open
+Status:   Analyzed
-Bug Type: Feature/Change Request
+Bug Type: Scripting Engine problem
 Operating System: All
 PHP Version:  4.0.4pl1
 New Comment:

it certainly looks like this is coded so it should work, but it
doesn't. reclassifying as a bug.


Previous Comments:


[2001-02-07 12:37:48] Tomas V.V.Cox [EMAIL PROTECTED]

It could be very flexible if set_error_handler() can send error
parameters to an object method. Something like:

set_error_handler (function);
and
ser_error_handler (method, $object);

Thanks,

Tomas V.V.Cox




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




Bug #16842 Updated: header() function doesn`t work

2002-04-27 Thread wodzu

 ID:   16842
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Bogus
 Bug Type: HTTP related
 Operating System: Windows XP
 PHP Version:  4.2.0
 New Comment:

?php
header(Location: http://localhost/;);
?

WinXP/Apache1.3.22/Apache module/Standard setup, standard modules

On MSIE 6.0 and Netscape 6 nothings happen. Script start and normal end
without any error (error_reporting  =  E_ALL). But I'm still on testing
page. It seems just don't work and without any errors. I check
configuration hundred times but with nothing :(


Previous Comments:


[2002-04-26 02:25:16] [EMAIL PROTECTED]

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

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




[2002-04-26 02:03:12] [EMAIL PROTECTED]

You are supposed to search bug DB, first
There are sevral duplicated reports for this.



[2002-04-26 01:20:02] [EMAIL PROTECTED]

It seem that header() function doesn`t work. Test was quite simle
script with few lines of code (server-side redirection).



[2002-04-26 01:16:11] [EMAIL PROTECTED]

It seem that header() function doesn`t work. I`ve tested this in simle
script with few lines of code (server-side redirection).






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




Bug #9374 Updated: add an optional use_include_path to file_exists()

2002-04-27 Thread jimw

 ID:   9374
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Duplicate
 Bug Type: Feature/Change Request
 Operating System: n/a
 PHP Version:  4.0.4pl1
 New Comment:

this is a duplicate of #6932.


Previous Comments:


[2001-02-21 10:01:46] [EMAIL PROTECTED]

It would be good to have the optional use_include_path parameter with
file_exists, just as with fopen. 
To find out whether a file exists on the include_path, one will need to
explode the include_path and then check for each element separately
now, or attempt an fopen(,,1).






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




Bug #9440 Updated: Bug in php.ini parser

2002-04-27 Thread jimw

 ID:  9440
 Updated by:  [EMAIL PROTECTED]
 Reported By: [EMAIL PROTECTED]
 Status:  Open
-Bug Type:Feature/Change Request
+Bug Type:Scripting Engine problem
-PHP Version: 4.0 Latest CVS (25/02/2001)
+PHP Version: 4.0 Latest CVS (
 New Comment:

good grief, this isn't an enhancement request, it's a bug.


Previous Comments:


[2001-03-06 08:26:54] [EMAIL PROTECTED]

Moving to RFE.



[2001-02-25 07:29:21] [EMAIL PROTECTED]

extension = extension.dll (PHP Extension) works fine on Win32. As
reported by Klaus Reimer this isn't the case with *.so on *NIX.




[2001-02-25 07:21:13] [EMAIL PROTECTED]

Seems like I copied the spelling mistake from Klaus Reimer's mail on
the APL mailing-list, so here we go again:

  extension = my_extension.so

does not work, while 

  extension=my_extension.so

does.

Both PHP and Zend extensions are affected.





[2001-02-25 07:19:25] [EMAIL PROTECTED]

  extenstion = my_extension.so

does not work, while 

  extenstion=my_extension.so

does.

Both PHP and Zend extensions are affected.





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




Bug #16879: posix_getpwuid() fails incorrectly

2002-04-27 Thread solo

From: [EMAIL PROTECTED]
Operating system: RedHat Linux 2.2.5
PHP version:  4.0CVS-2002-04-27
PHP Bug Type: POSIX related
Bug description:  posix_getpwuid() fails incorrectly

I am not sure that this is a bug, but for some reason, when attempting to
get the file owner of a file getpwuid() fails (used in this context):

$uid = fileowner($path);
$owner = posix_getpwuid($uid);

Fileowner() returns either 0 or 1028, and getpwuid fails. The 0 of course
false would mean the file doesnt exist, but using the same variable
($path) in other functions such as fileperms() etc do not fail and return
the proper data. 

Situation:
$path = /home/;
$uid = fileowner($path);
$owner = posix_getpwuid($uid);
$owner_name = $owner['name'];

I have tried the same situation with valid filenames (instead of
directories).

all extensions are enabled and configure line is:
'./configure' '--target=i386-redhat-linux' '--prefix=/usr'
'--with-config-file-path=/etc' '--disable-debug' '--enable-pic'
'--enable-inline-optimization' '--with-apxs=/usr/sbin/apxs'
'--disable-static' '--with-exec-dir=/usr/bin' '--with-regex=system'
'--with-gettext' '--with-gd' '--with-jpeg-dir=/usr' '--with-png'
'--with-zlib' '--with-db2' '--with-db3' '--with-gdbm' '--enable-debugger'
'--enable-magic-quotes' '--enable-safe-mode' '--enable-sysvsem'
'--enable-sysvshm' '--enable-track-vars' '--enable-yp' '--enable-ftp'
'--without-mysql' '--with-xml'

(as phpinfo() says it is)
-- 
Edit bug report at http://bugs.php.net/?id=16879edit=1
-- 
Fixed in CVS:http://bugs.php.net/fix.php?id=16879r=fixedcvs
Fixed in release:http://bugs.php.net/fix.php?id=16879r=alreadyfixed
Need backtrace:  http://bugs.php.net/fix.php?id=16879r=needtrace
Try newer version:   http://bugs.php.net/fix.php?id=16879r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=16879r=support
Expected behavior:   http://bugs.php.net/fix.php?id=16879r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=16879r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=16879r=submittedtwice




Bug #12379 Updated: conversion from html entities to normal text

2002-04-27 Thread jimw

 ID:   12379
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Open
-Bug Type: Feature/Change Request
+Bug Type: Documentation problem
 Operating System: linux
 PHP Version:  4.0.6
 New Comment:

php.net/htmlentities documents how to do this. (in the notes, right
now. reclassifying as documentation problem so the notes get pulled
into the documentation proper.)


Previous Comments:


[2001-07-25 16:50:29] [EMAIL PROTECTED]

PHP needs a function to convert html entities to plain text,
such as quot; becomes a double quote character.  

Essentially,
htmlentities or htmlspecialcharacters,
except in reverse.





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




Bug #16877 Updated: socket_read() only gets one character (no matter what length set)

2002-04-27 Thread mfischer

 ID:   16877
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Feedback
 Bug Type: Sockets related
 Operating System: Windows 2000 Profesional
 PHP Version:  4.2.0
 New Comment:

Please include a short, self-contained sample script (it works for me
with cvs head).


Previous Comments:


[2002-04-27 14:43:10] [EMAIL PROTECTED]

The socket_read() function does not work properly, say I do this:

$text = socket_read($message_socket, 2048);

It will only get 1 character even though I said 2048 characters.



[2002-04-27 14:41:29] [EMAIL PROTECTED]

The socket_read() function does not work properly, say I do this:

$text = socket_read($message_socket, 2048);

It will only get 1 character even though I said 2048 characters.




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




Bug #9426 Updated: Form variables encoding problem

2002-04-27 Thread jimw

 ID:   9426
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Duplicate
 Bug Type: Feature/Change Request
 Operating System: Linux 2.0
 PHP Version:  4.0.4pl1
 New Comment:

duplicate of #7535.


Previous Comments:


[2001-04-29 11:31:49] [EMAIL PROTECTED]

feature/change request.





[2001-02-24 04:57:02] [EMAIL PROTECTED]

It turned out to be a problem with a:

META HTTP-EQUIV=Content-Type CONTENT=text/html;
charset=ISO-8859-1

header that caused encoding by the browser prior to sendind data to
PHP. Now there's another problem. The '’' doesn't get encoded by the
htmlentities() function. This char, and others, is an illegal char
according to the WDG html validator and should be encoded. I think an
extended version of the htmlentities() function, which encodes every
char that need encoding, not only the ones in the
get_html_translation_table(HTML_ENTITIES) table, should be considered.
Of course encoding should be performed in the '#;' form.



[2001-02-23 12:51:48] [EMAIL PROTECTED]

Sorry but everything gets screwed because of the mixture of html
entities and real chars. The char that gives problems is '’', the
corresponding html entitie is amp;#8217;, the html entitie provided by
FrontPage is amp;#146;. Looking directly at the html code make it
easier to understand what's going on.



[2001-02-23 12:45:17] [EMAIL PROTECTED]

When I enter some special chars in a textual form field (either 'INPUT
TYPE=text' or 'TEXTAREA') they get encoded like an html entitie. For
example this '’' gets encoded as '#8217;' in the variable of the form
handling script (I hope this won't trigger the bug, the first char is
like a '`' but reversed, almost like a superscript small '/'). No
coding happens for a plain typed '#8217;', so there's no way to
distinguish between the two cases in the form handling script and so
there's no way to safely reverse the encoding. Browser is IE 5.5 on
Windows 98.

This may happen for example doing cut  paste from WordPad, Word or
existing web pages. I tried the same thing pasting into FrontPage
Express. It encodes it as '#146;' instead of '#8217;', may be it's
just the encoding that's wrong.

P.S. Sorry for my poor English




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




Bug #9743 Updated: can exec() or system() return the pid ?

2002-04-27 Thread jimw

 ID:   9743
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Closed
 Bug Type: Feature/Change Request
 Operating System: linux
 PHP Version:  4.0.4pl1
 New Comment:

no, exec() and system() both only return when the process they spawn
exits.


Previous Comments:


[2001-03-14 13:00:25] [EMAIL PROTECTED]

hi,

its possible to implement, that exec saves the new pid of 
the executed external programm into another parameter?
(like the output)







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




Bug #9765 Updated: syntax request

2002-04-27 Thread jimw

 ID:   9765
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Closed
 Bug Type: Feature/Change Request
 Operating System: all
 PHP Version:  4.0.4
 New Comment:

not going to happen.


Previous Comments:


[2001-03-15 09:47:58] [EMAIL PROTECTED]

such a syntax would be nice:

if (getColor() == ['green'|'blue']) {
if (someFunction() != [truenull]) {
if (xy() = [$x$y]) {

which means

if ((getColor() == 'green') || (getColor() == 'blue')) {
but saves one call to the function
or

$myCol = getColor();
if (($myCol == 'green') || ($myCol == 'blue')) {
but looks better and saves a temp var.

$tmp = functionThatReturnsBool();
if ($tmp == true OR $tmp == null) {

sometimes it could be done with
if (in_array(getColor(), array('green', 'blue'))) { 
but not always.

fab





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




Bug #16877 Updated: socket_read() only gets one character (no matter what length set)

2002-04-27 Thread webmaster

 ID:   16877
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Feedback
+Status:   Open
 Bug Type: Sockets related
 Operating System: Windows 2000 Profesional
 PHP Version:  4.2.0
 New Comment:

Note this script was taken DIRECTLY from the PHP Manual (which you guys
have yet to update with the new socket fixes). And I used this in
Windows with a batch file (only one line on the batch file:
@c:\PHP\php-cli.exe -q c:\php\server.php )

Script:

error_reporting (E_ALL);

/* Allow the script to hang around waiting for connections. */
set_time_limit (0);

/* Turn on implicit output flushing so we see what we're getting
 * as it comes in. */
ob_implicit_flush ();

$address = 'xxx.xxx.x.xxx;
$port = 1;

if (($sock = socket_create (AF_INET, SOCK_STREAM, 0))  0) {
echo socket_create() failed: reason:  . socket_strerror ($sock) .
\n;
}

if (($ret = socket_bind ($sock, $address, $port))  0) {
echo socket_bind() failed: reason:  . socket_strerror ($ret) .
\n;
}

if (($ret = socket_listen ($sock, 5))  0) {
echo socket_listen() failed: reason:  . socket_strerror ($ret) .
\n;
}

do {
if (($msgsock = socket_accept($sock))  0) {
echo socket_accept() failed: reason:  . socket_strerror
($msgsock) . \n;
break;
}
/* Send instructions. */
$msg = \nWelcome to the PHP Test Server. \n .
To quit, type 'quit'. To shut down the server type
'shutdown'.\n;
socket_write($msgsock, $msg, strlen($msg));

do {
if (FALSE === ($buf = socket_read ($msgsock, 2048))) {
echo socket_read() failed: reason:  . socket_strerror
($ret) . \n;
break 2;
}
if (!$buf = trim ($buf)) {
continue;
}
if ($buf == 'quit') {
break;
}
if ($buf == 'shutdown') {
socket_close ($msgsock);
break 2;
}
$talkback = PHP: You said '$buf'.\n;
socket_write ($msgsock, $talkback, strlen ($talkback));
echo $buf\n;
} while (true);
socket_close ($msgsock);
} while (true);

socket_close ($sock);


Previous Comments:


[2002-04-27 14:57:44] [EMAIL PROTECTED]

Please include a short, self-contained sample script (it works for me
with cvs head).



[2002-04-27 14:43:10] [EMAIL PROTECTED]

The socket_read() function does not work properly, say I do this:

$text = socket_read($message_socket, 2048);

It will only get 1 character even though I said 2048 characters.



[2002-04-27 14:41:29] [EMAIL PROTECTED]

The socket_read() function does not work properly, say I do this:

$text = socket_read($message_socket, 2048);

It will only get 1 character even though I said 2048 characters.




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




Bug #9823 Updated: srand() -- seed should default to (double)microtime()*1000000

2002-04-27 Thread jimw

 ID:   9823
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Closed
 Bug Type: Feature/Change Request
 Operating System: all
 PHP Version:  4.0.4pl1
 New Comment:

the seed is optional and php generates a 'good' one.


Previous Comments:


[2001-03-18 16:25:03] [EMAIL PROTECTED]

In the user notes for srand(), [EMAIL PROTECTED] said:

*ALWAYS* use (double)microtime()*100 as your seed. 
Do *NOT* just use time(). Do not add an extra 0 to make it bigger. 
...
Anything else is sub-standard.

If so, why not make the seed argument optional, and make the default
(double)microtime()*100 when the argument is absent? Save me a
few keystrokes, anyway, and help make sure people don't do it in a 
sub-standard fashion...  :)




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




Bug #9752 Updated: Auto Table Generation (ifx_htmltbl_result)

2002-04-27 Thread jimw

 ID:   9752
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Closed
 Bug Type: Feature/Change Request
 Operating System: Linux
 PHP Version:  4.0.4pl1
 New Comment:

doesn't belong in the engine.


Previous Comments:


[2001-03-14 11:48:22] [EMAIL PROTECTED]

One feature I *REALLY* love that I've only seen under Informix is the
ifx_htmltbl_result function, which makes a table out of the results --
this is a GREAT timesaver when debugging select statements!

My co-workers get very envious when they see me hack away on the SQL
and not have to touch any display loops to get my results.

I'd love to be able to do this under MySQL and Oracle, as well. 

Thanks a lot -- I really love this language! :)

Michael




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




Bug #9900 Updated: sem_remove or similar missing

2002-04-27 Thread jimw

 ID:   9900
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Closed
 Bug Type: Feature/Change Request
 Operating System: all
 PHP Version:  4.0.4pl1
 New Comment:

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




Previous Comments:


[2001-03-21 11:06:26] [EMAIL PROTECTED]

I miss a function sem_remove or similar which i can use to remove a
semaphore completely. 






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




Bug #10160 Updated: Unix timestamp doesnt go over Tuesday 19 January 2038 05:11

2002-04-27 Thread jimw

 ID:   10160
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Closed
 Bug Type: Feature/Change Request
 Operating System: RedHat Linux
 PHP Version:  4.0.4pl1
 New Comment:

use a c library with a 64-bit time_t.


Previous Comments:


[2001-04-04 11:00:07] [EMAIL PROTECTED]

As you know, most of PHP's date and time functions use the unix
timestamp, which wont go past Tuesday 19 January 2038 05:11,
numberically represented by 2147483648 (ie 30 bits) 

Surely PHP can get clever and work around this? (ie allow bigger values
which will translate back and forth properly up to the year ?)  
Otherwise we will all find outselves with a Y2K-like date nightmare!

eg:  currently:  echo mktime(0,0,0,1,1,2099);  outputs -1
and putting any number past 2147483648 into date() wont give you
anything past Tuesday 19 January 2038 05:11

Thanks!
regards,
Keith







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




Bug #10344 Updated: in memory container for each machine user

2002-04-27 Thread jimw

 ID:   10344
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Closed
 Bug Type: Feature/Change Request
 Operating System: any
 PHP Version:  4.0.4pl1
 New Comment:

there are extensions that provide this sort of functionality. (sysvshm,
at least).


Previous Comments:


[2001-04-16 09:37:43] [EMAIL PROTECTED]

Perhaps there is already something for this, but it hasn't jumped out
at me and no-one on the coding forum on phpbuilder replied to my thread
with anything useful.

What would be nice is for php to have a 'session' of sorts for each
UNIX/WINDOWS user who has php files running on the server. Then each
user on the machine can have quick memory access to frequently used
data.

For example, imagine an online election system. The dates people are
allowed to vote are semi-static, they change yearly, but you don't want
to monkey with code to change them so they would probably be in the db.
On each page hit, you must verify these dates vs the current date to
allow access.  This would involve hitting the db to get the dates on
each hit.  Having them in memory would be a significant improvement.

I'd imagine an interface similar to the 'session_*' would be suffice.




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




Bug #10351 Updated: Parsing problem with nested ? : structures

2002-04-27 Thread jimw

 ID:   10351
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Closed
 Bug Type: Feature/Change Request
 Operating System: Sun OS 5.7
 PHP Version:  4.0.3pl1
 New Comment:

it does execute correctly, given the relative precedence of the '' and
'?:' operators.


Previous Comments:


[2001-04-16 16:14:48] [EMAIL PROTECTED]

The following statement does not execute correctly:

 $departmeals = $dHour  10.5 ? $dHour  6.0 ? 3 : 2 
:
   $dHour  18.0 ? 1 : 0;

No error message--it just returns the wrong result.  It does execute
correctly if parentheses are added:

 $departmeals = $dHour  10.5 ? ($dHour  6.0 ? 3 : 2)
:
   ($dHour  18.0 ? 1 : 0);

The original is not ambiguous; it should parse and execute correctly.





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




Bug #8577 Updated: i would kill for the ability to undefine()

2002-04-27 Thread voudras

 ID:   8577
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Closed
 Bug Type: Feature/Change Request
 Operating System: N/A
 PHP Version:  4.0.4
 New Comment:

I have to admit that the above comment comes off as an
insulting wisecrack. like im a moron for suggesting such
a feature. what would KR say to that?

Anyway - i found a way around this PHP deficiency for now,
and i did that by creating a set of functions which maintain
an array of defined variables and respond accordinly to my
own undefine, ifdefine, constant and define functions.

cd /web/src/php4; grep -nir undef *;

hmm, looks like the php developers found it useful in C


Previous Comments:


[2002-04-27 14:15:52] [EMAIL PROTECTED]

if you could undefine, it wouldn't be constant.



[2001-01-07 13:22:50] [EMAIL PROTECTED]

I don't know if this is impossible or extremely difficult (I assume its
one of the two because this doesn't exist at the moment), but it would
be very handy. 






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




Bug #11004 Updated: Allow ini_set() of magic_quotes_sybase to have effect

2002-04-27 Thread jimw

 ID:  11004
 Updated by:  [EMAIL PROTECTED]
 Reported By: [EMAIL PROTECTED]
-Status:  Open
+Status:  Closed
 Bug Type:Feature/Change Request
 PHP Version: 4.0.5
 New Comment:

as the referenced bug indicates, it is too late to change it once the
script has begun executing.


Previous Comments:


[2001-05-21 16:45:38] [EMAIL PROTECTED]

See http://bugs.php.net/?id=11001

I am running PHP/MYSQL and PHP/MSSQL apps on the same server which will
not work because I have to set a global value in the PHP.ini file or
have multiple copies of PHP on the server.

thanks!




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




Bug #11282 Updated: dBase3 support needed (MIVA uses it)

2002-04-27 Thread jimw

 ID:   11282
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Closed
 Bug Type: Feature/Change Request
 Operating System: FreeBSD
 PHP Version:  4.0.5
 New Comment:

ext/dbase does support dbase iii files. file bugs against specific
failures.


Previous Comments:


[2001-06-05 03:22:04] [EMAIL PROTECTED]

Hi, I was recently forced to do a project using Miva Merchant, i know
it sucks compared to PHP, and it uses some really old dbase3 format.  I
thought i'd be able to make some things with PHP's dbase3 support so i
wouldn't have to do much scripting in miva.. but the support isn't good
enough.  I think it would be a good idea to include more dbase3 support
in PHP since Miva doesn't support Oracle yet, and who knows when that
would come!.. lots of people use miva.. a more robust dbase3 support in
php




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




Bug #11567 Updated: True Dynamic Binding and Public/Private

2002-04-27 Thread jimw

 ID:   11567
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Analyzed
+Status:   Closed
 Bug Type: Feature/Change Request
 Operating System: Linux
 PHP Version:  4.0.5
 New Comment:

multiple dispatch is not going to happen. ZE2 has private member
values.


Previous Comments:


[2001-06-20 11:54:35] [EMAIL PROTECTED]

I disagree with your comment on how dynamic bindings are used.  The
whole purpose of dynamic binding is give a function whose purpose could
be asked for in many different ways yet is asking to do the same thing
the ability to hide how it works from the programmer using it.  In C++,
there is a function of exp, which could be sent four different
methods:

int exp (int base, int exponent)
double exp (int base, double exponent)
double exp (double base, int exponent)
double exp (double base, double exponent)

If anything, it makes the programmers job easier to utilize this
function because they only have to remember ONE function, not four
different ones accomplishing the same task.

Admittedly, PHP doesn't have data types in the traditional sense,
however it should have Dynamic Binding because one of the most
fundamental rules of Object Oriented Programming is the idea of hiding
the how and just utilizing the functions and classes.

The same argument can be made for the public/private distinction. 
Adding this feature is an excellent way to make sure that programmers
do not mess with the logical code that you worked so hard on.  Also, it
forces programmers to use the functions of the class, as the orginal
programmer percieved it.

I want to see PHP become the best Web Programming Language out there,
and proper OOD techniques is fundamental to getting there.



[2001-06-20 00:42:51] [EMAIL PROTECTED]

I completely disagree with the concept of dynamic binding.
Calling different functions based on the number of arguments
is spaghetti code waiting to happen.  PHP supports default
values for arguments which makes them optional.  Your 
would be much cleaner if written with defaulted x and y 
arguments which you then check and if you have the default
value for x and/or y you would calculate the center value.
Or alternatively use func_num_args to see how many args were
passed.  To me it is cleaner to collect the functionality for a
function in a single function instead of splitting it 
out over multiple functions.  Imagine trying to debug some
code and you end up looking at the wrong function just
because you counted 17 arguments instead of 18.

As for the public/private issue.  Sure, from an OO purity
perspective it would be nice.  But it is functionally irrelevant.  ie.
your code would not work any better or
worse by having the public/private differentiation.



[2001-06-19 22:05:53] [EMAIL PROTECTED]

function drawMe()
{
if( 2 == func_num_args() ) {
doStuff( func_get_arg(0) , func_get_arg(1) ) ;
} else {
doStuff( $defaultX , $defaultY ) ;
}
}

private vars/methods would be good... :)



[2001-06-19 15:10:06] [EMAIL PROTECTED]

Ok Folks.  I am really happy with PHP thus far.  However to make it a
true Object Oriented Language you absolutly need Dynamic binding.  This
would be such a huge boon for us developers who love to work within
classes.  Such as:

// Inside the class Circle

function DrawMe() {
// Getting Ceter Coords..
DrawMe($centX, $centY);
}

function DrawMe($x, $y) {
// Draws the circle at $x, $y
}

// End of code demo

This kind of ability can be extremely huge, if you use it right.  Also,
it allows for developers to make a module extremely flexiable and
powerful.

Secondly, I think that we are missing public and private sections of
the OOP world.  In the above example, I would have the functions
public, and the data structures inside of it totally hidden (or
private) so the programmer who is using my include just has to deal
with the interface, and can't touch the actual data.  That is strength
and beauty of encapsulation.

I just thought you may want to hear this, and I am hoping to hear from
you guys (and gals) that you are hard at work to implement it and it is
coming soon.

Thanks for reading my rant!!

Mike Eggleston
AmeriGroup
[EMAIL PROTECTED]




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




Bug #11756 Updated: Private, Protected variables in classes

2002-04-27 Thread jimw

 ID:   11756
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Analyzed
+Status:   Closed
 Bug Type: Feature/Change Request
 Operating System: Linux
 PHP Version:  4.0.6
 New Comment:

implemented in ZE2.


Previous Comments:


[2001-06-28 06:30:13] [EMAIL PROTECTED]

This will be dealt with with the new version of the Zend engine. The
timeframe is a few months... so please stay tuned...



[2001-06-27 18:05:08] [EMAIL PROTECTED]

for example:
class 
{
private:
var $myvar;
var $myvar2:
public:
var $myvar3;

function myfoo()
{
print the variable is :  . $myvar
}
}

will be converted on the fly by PHP interpreter to 
class
{
var $myvar_993679346;
var $myvar2_993679346:
var $myvar3;

function myfoo()
{
print the variable is :  . $myvar_993679346;
}
}

Note that 993679346 is the time stamp got by time(). PHP interpreter
when it starts up will store this
timestamp value in a global var and use it throught to mangle all the
private variables declared in
all the classes in all the files..




[2001-06-27 17:47:52] [EMAIL PROTECTED]

I have a good idea. It is extremely easy to implement private,
protected variables in classes.

PHP can use the name mangling of variables to implement private
variables in classes. This technique is used by python language.

What you do is - PHP will read the class and simply change the variable
names to variablename_timestamp. Where timestamp is unique id got by
time() function.

Classes need private, protected variables. What do you say??






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




Bug #11798 Updated: svar_dump() wanted

2002-04-27 Thread jimw

 ID:   11798
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Closed
 Bug Type: Feature/Change Request
 Operating System: any
-PHP Version:  4.0 Latest CVS (2001-06-29)
+PHP Version:  4.0 Latest CVS (
 New Comment:

use output buffering.


Previous Comments:


[2001-12-11 16:19:30] [EMAIL PROTECTED]

var_export does not do this, it merely has a different format then
var_dump, so that it is correct PHP code.

Derick



[2001-12-09 07:33:44] [EMAIL PROTECTED]

Derick just added a new function called var_export which does exactly
what you want. It will be in PHP-4.2.0.



[2001-06-29 05:54:42] [EMAIL PROTECTED]

It would be very nice to have a var_dump() that returns the variable
dump as a string instead of printing it.  Using var_dump() for verbose
logging is mighty handy, but having to (ab)use output buffering to
catch the var dump feels bad.

(I looked briefly at the implementation of var_dump(), and making a
svar_dump() seemed out of my C league, unfortunately.)





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




Bug #11878 Updated: __DATE__ /__TIME__ constants

2002-04-27 Thread jimw

 ID:   11878
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Closed
 Bug Type: Feature/Change Request
 Operating System: any
 PHP Version:  4.0.6
 New Comment:

or getlastmod().


Previous Comments:


[2001-07-04 17:07:18] [EMAIL PROTECTED]

What's wrong with using filemtime(__FILE__) ?

You can also use fileatime() and filectime().



[2001-07-04 09:51:49] [EMAIL PROTECTED]

Could it be possible to add __DATE__ and __TIME__ 
constants ?
They could containt the last modified date/time of the 
calling script.

Thank you for your great job!





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




Bug #11939 Updated: get HTML title

2002-04-27 Thread jimw

 ID:   11939
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Closed
 Bug Type: Feature/Change Request
 Operating System: redhat 7.1
 PHP Version:  4.0.4pl1
 New Comment:

not going to happen.


Previous Comments:


[2001-07-09 05:49:43] [EMAIL PROTECTED]

i'd suggest to go the other way round, 
deprecating get_meta_tags()  and encouraging
the use of expat for tasks like this instead ...

(even if we stay with get_meta_tags(), we should
 re-implement it using expat internally instead of
 the hand-written code it uses right now
 this would, for example, have prevented the
 single-quote bug we had recently ... )



[2001-07-06 15:00:02] [EMAIL PROTECTED]

Get HTML title-
We have get_meta_tags, why not a function that retrieves the title from
an HTML page?




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




Bug #11944 Updated: Scripting language features

2002-04-27 Thread jimw

 ID:   11944
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Closed
 Bug Type: Feature/Change Request
 Operating System: Any
 PHP Version:  4.0.6
 New Comment:

the cli version of php does most of this.


Previous Comments:


[2001-07-07 00:21:30] [EMAIL PROTECTED]

I use PHP as a general scripting language, and some compile or runtime
options would be very useful:

- A no-tags mode that would have the interpreter behave as if it were
always inside a ?php ? block

- Standard file handles predefined, similiar to $argc and $argv[]:
$stdin, $stdout, $stderr

- Quiet mode always enabled

The following script is too complicated:

#!/usr/local/bin/php -q
?
$l = ;
$fp = fopen(php://stdin, r);
while (!feof($fp))
{
$s = fgets($fp, 5000);
if ($l != $s)
{
echo $s;
$l = $s;
}
}
?

It would be much nicer to write it as follows:

#!/usr/local/bin/php
$l = ;
while (!feof($stdin))
{
$s = fgets($stdin, 5000);
if ($l != $s)
{
echo $s;
$l = $s;
}
}





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




Bug #12385 Updated: getmxrr returns an invalid false message when...

2002-04-27 Thread jimw

 ID:   12385
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Closed
 Bug Type: Feature/Change Request
 Operating System: FreeBSD
 PHP Version:  4.0.6
 New Comment:

getmxrr() returns mx records. the standards simply indicate where to
send mail when there is no mx record, which is outside the scope of
what this function does.


Previous Comments:


[2001-07-26 02:25:01] [EMAIL PROTECTED]

reclassified



[2001-07-25 22:27:09] [EMAIL PROTECTED]

getmxrr is designed to return a list of mx records found for a host.

According to smtp rfcs, if no mx records are found, then the hostname's
A record is considered to be the lowest mx.

Take for example the following hostname:
genet.sickkids.on.ca

This is a separate zone which does not have any MX records.  It has an
A record and that suffices for people to receive email on that
hostname.

getmxrr should be changed so that it should also return true if:

no mx records are found, BUT an A record exists for the hostname.

Why?
Because smtp rfc's state that if there are no mx records, the A record
should be considered to be the lowest priority mx record.






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




Bug #12428 Updated: I want 'echoln'

2002-04-27 Thread jimw

 ID:   12428
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Closed
 Bug Type: Feature/Change Request
 Operating System: any
 PHP Version:  4.0.6
 New Comment:

not going to happen.


Previous Comments:


[2001-07-27 11:04:33] [EMAIL PROTECTED]

Is there something like an 'echoln'? 

I use echo $var,'\n' quite often, 
so an 'echoln' would be very handy. 

Or even better would be macros:

#define echoln echo $, 'n'

Thanks, Ruud





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




Bug #12513 Updated: Automatic Rollback of open transactions in persistent links

2002-04-27 Thread jimw

 ID:   12513
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Open
-Bug Type: Feature/Change Request
+Bug Type: MySQL related
 Operating System: Linux
 PHP Version:  4.0.6
 New Comment:

this is a bug, not a feature request.


Previous Comments:


[2001-08-01 09:07:32] [EMAIL PROTECTED]

reclassified



[2001-08-01 09:06:41] [EMAIL PROTECTED]

When using mysql_pconnect() the connection to the database (abviously)
persists.

This has the site-effect that open transactions at the end of the page
request remain open if you do not explicitly commit/rollback the
transaction.

This can happen very easily if you have an error in your script.

The Postgres driver does an automatic rollback at request shutdown, the
mysql driver should do the same.




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




Bug #12530 Updated: Shuffle shouldn't use the least significant bit of rand()

2002-04-27 Thread jimw

 ID:   12530
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Open
-Bug Type: Feature/Change Request
+Bug Type: Arrays related
 Operating System: Solaris (most unices)
 PHP Version:  4.0.6
 New Comment:

this is a bug, not a feature request.


Previous Comments:


[2001-08-04 18:12:31] [EMAIL PROTECTED]

reclassified



[2001-08-02 07:24:41] [EMAIL PROTECTED]

In ext/standard/array.c, the sorting algorithm of shuffle 
is defined as

(php_rand() % 2) ? 1 : -1

This is fine for rand algorithms in which all bits are 
random but with Solaris and other unices this is not so. 
Quoting man random():

The difference is that rand(3C) produces  a  much  less  
random sequence-in fact, the low dozen bits generated by 
rand go through a cyclic pattern. All the bits generated by 
random() are usable.

This is not true however - the LSB of random() calls are 
predictable on some systems.

You can verify if your system is affected by running this:

?PHP
$a = array();
$b = array();

for($i=0; $i1000; $i++)  // iterate 1000 times
{
$foo = ;
// initialize random seq with new seed
srand ($i); 
// create a string with the LSB of first 24 random numbers
for($j=0; $j24; $j++) {
$c = rand();
// $c = rand(0,32000); works on all systems
// store the random number so we can check how many 
different
// numbers were really generated
$b[$c]= 1;
// append the least signicant bit to the string
$foo .= ($c % 2);
}
// store the parity string
$a[$foo]= 1;
}

echo Parity string count:  . count($a), BR;
echo Random number count:  . count($b), BR;
?

If the counts are 1000/24000 you're fine. Affected systems 
I've tried this on return 4/24000.

Proposed fix: change shuffle to call PHP's own rand 
function with limits, ie, rand(0,32000). This introduces 
randomness into the LSB and fixes shuffle.





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




Bug #12554 Updated: switch() bug

2002-04-27 Thread jimw

 ID:   12554
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Closed
 Bug Type: Feature/Change Request
 Operating System: linux
 PHP Version:  4.0.6
 New Comment:

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




Previous Comments:


[2001-08-03 14:48:36] [EMAIL PROTECTED]

Ignore my comments, I misread it. Sorry



[2001-08-03 14:46:26] [EMAIL PROTECTED]

error_reporting has been set to E_ALL in your config.

Set to E_ALL  ~E_NOTICE to prevent this warning, but the point is that
$search has no value in your script!

Always var_dump your variables to see what they are first.

Not a bug - bogus



[2001-08-03 11:42:34] [EMAIL PROTECTED]

reclassified (This is not a bug)



[2001-08-03 10:15:28] [EMAIL PROTECTED]

?
 switch($search)
 {
  case 'date':
   echo 'date';
   break;
  case 'people':
   echo 'people';
   break;
  case 'keyword':
   echo 'keyword';
   break;
  default:
   echo 'default';
   break;
 }
?

Warning:  Undefined variable:  search in
/home/httpd/vhosts/mediawaveonline/test2.php on line 4
Warning:  Undefined variable:  search in
/home/httpd/vhosts/mediawaveonline/test2.php on line 7
Warning:  Undefined variable:  search in
/home/httpd/vhosts/mediawaveonline/test2.php on line 10

if you ask me, I should get a warning on line 2 where the switch is,
not on
4, 7, 10 where the case statements are.

php 4.0.5 cgi does not do this.

  Chris Lee
  [EMAIL PROTECTED]






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




Bug #12713 Updated: felix

2002-04-27 Thread jimw

 ID:   12713
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Bogus
 Bug Type: Feature/Change Request
 Operating System: linux
 PHP Version:  4.0.6
 New Comment:

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

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





Previous Comments:


[2001-08-13 23:02:57] [EMAIL PROTECTED]

some information can be seen at here:
http://www.windrose-cn.com/error.txt

sanx. :)



[2001-08-13 09:58:22] [EMAIL PROTECTED]

More information is required here. Can we see some output
data? ie, echo your sql query string. (It looks like this
might be quite large. Best idea would be to output to a
text file and give a URL.)



[2001-08-13 06:12:23] [EMAIL PROTECTED]

It seems that the function addslashes() donesn't work correctly now. I
write a program with the sql:
insert into member(membername,photo)
values('$membername','.addslashes($picdata).')
It worked correctly on php 4.02,but now cannt.so I want know what
happened and how to correct it.

sorry for my poor english.




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




Bug #12930 Updated: request for = and ||= operators

2002-04-27 Thread jimw

 ID:   12930
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Closed
 Bug Type: Feature/Change Request
 Operating System: FreeBSD
 PHP Version:  4.0.6
 New Comment:

because  and || always return boolean values, this wouldn't do what
you want. (and suggestions to make  and || be value-preserving
instead of returning booleans has been shot down already.)


Previous Comments:


[2001-08-23 12:40:06] [EMAIL PROTECTED]

Just a feature request for = and ||= operators as shortcuts for the
logical equivalent of $var  $var = 'val'.

eg:

?
$a = '';
$a ||= default;
print $a;
?




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




Bug #13216 Updated: Removal of redundant function call

2002-04-27 Thread jimw

 ID:   13216
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Closed
 Bug Type: Feature/Change Request
 Operating System: Debian GNU/Linux
 PHP Version:  4.0.6
 New Comment:

this bit of code has been rewritten.


Previous Comments:


[2001-09-08 22:41:35] [EMAIL PROTECTED]

Grr idiot at keyboard. (That other patch is for #13217)
http://www.bubblesworth.com/php4.cvs1.diff



[2001-09-08 22:38:45] [EMAIL PROTECTED]

Grr web interface:
http://www.bubblesworth.com/php4.cvs2.diff



[2001-09-08 22:38:10] [EMAIL PROTECTED]

Since the webform saw fit to mangle my patch, it's available at a
href=http://www.bubblesworth.com/php4.cvs1.diff;http://www.bubblesworth.com/php4.cvs1.diff/a





[2001-09-08 22:31:18] [EMAIL PROTECTED]

Since encoded_value is set depending only on whether z_value is NULL(0)
or not, surely there's no need to check Z_STRVAL_PP(z_value) before
using encoded_value, and it just adds stuff to the normal execution
path. At this point, we know either z_value is null, or
Z_STRLEN_PP(z_value) is not 0.

--- ext/standard/head.c.cvs Sun Sep  9 12:13:27 2001
+++ ext/standard/head.c.new Sun Sep  9 12:32:00 2001
@@ -142,7 +142,7 @@
sprintf(cookie, Set-Cookie: %s=deleted; expires=%s,
Z_STRVAL_PP(z_name), dt);
efree(dt);
} else {
-   sprintf(cookie, Set-Cookie: %s=%s,
Z_STRVAL_PP(z_name), (z_value  Z_STRVAL_PP(z_value)) ? encoded_value
: );
+   sprintf(cookie, Set-Cookie: %s=%s,
Z_STRVAL_PP(z_name), z_value ? encoded_value : );
if (expires  0) {
strcat(cookie, ; expires=);
dt = php_std_date(expires);

--
Paul TBBle Hampson




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




Bug #13217 Updated: Removal of unneeded code from execution flow.

2002-04-27 Thread jimw

 ID:   13217
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Closed
 Bug Type: Feature/Change Request
 Operating System: Debian GNU/Linux
 PHP Version:  4.0.6
 New Comment:

this bit of code has been rewritten.


Previous Comments:


[2001-09-08 22:39:56] [EMAIL PROTECTED]

Grr web interface:
http://www.bubblesworth.com/php4.cvs2.diff



[2001-09-08 22:37:15] [EMAIL PROTECTED]

If (z_value  ZZ_STRLEN_PP(z_value) == 0) then encoded_value isn't
used. So no need to generate it, surely?

This patch'll be mangled by the wrapping in the window, so it's
available at a
href=http://www.bubblesworth.com/php4.cvs2.diff;http://www.bubblesworth.com/php4.cvs2.diff/a


--- ext/standard/head.c.cvs Sun Sep  9 12:13:27 2001
+++ ext/standard/head.c.new Sun Sep  9 12:39:47 2001
@@ -118,7 +118,7 @@
if (z_name) {
len += Z_STRLEN_PP(z_name);
}
-   if (z_value) {
+   if (z_value  Z_STRLEN_PP(z_value) != 0) {
int encoded_value_len;
 
encoded_value = php_url_encode(Z_STRVAL_PP(z_value),
Z_STRLEN_PP(z_value), encoded_value_len);




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




Bug #13363 Updated: variable variables with arrays

2002-04-27 Thread jimw

 ID:   13363
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Closed
 Bug Type: Feature/Change Request
 Operating System: all
 PHP Version:  4.0.6
 New Comment:

indeed, use eval() when this level of indirection is necessary.


Previous Comments:


[2001-09-18 08:24:53] [EMAIL PROTECTED]

$$ is just a shortcut for a lookup in the variable hashtable
of the current namespace ($GLOABLS if outside a function)

so you end up with the equivalent of
$GLOBALS[GLOBALS[first][second]]
which is obviously not supposed to work as a multidimensional array
access

IMHO $$ should *not* become to clever aka. complicated

moved to feature requests for now although the amount of
exclamation marks used almost justified bogusification



[2001-09-18 07:50:44] [EMAIL PROTECTED]

$dynvar = GLOBALS[first][second];
echo $$dynvar;

result : nothing , no error and no output!

for arrays stored in variables only to ways are working:

$dynvar = GLOBALS;
echo ${$dynvar[first][second]};

or more dynamic but more slower!

$dynvar = .?PHP echo \$GLOBALS[first][second]; ?.;
eval $dynvar;

you can use a variable to store instead of echo!

I think this breaks the rules of assigning variable variables . It must
be possible to store the complete call of the array in a variable. 

The Way implemented jet is not praktical! Real World Tested! There
are so much postings in many Forums and Mailinglist with no suggestion
. I can't understand this! So i must think this is a BUG! or was
forgotten to realize!





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




Bug #13756 Updated: exponential ** operator

2002-04-27 Thread jimw

 ID:   13756
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Closed
 Bug Type: Feature/Change Request
 Operating System: n/a
 PHP Version:  4.0.6
 New Comment:

not going to happen. just suck it up and use pow().


Previous Comments:


[2001-10-19 18:51:47] [EMAIL PROTECTED]

I proposed that earlier (along with ^^) [ZendEnginge ML, june 27th 
july 3rd].

Anyway, I think it should be added, there is simply no power operator
now, and pow() is both a bit bugly and overloaded (both ^^ and ** at
the same time).



[2001-10-19 11:24:28] [EMAIL PROTECTED]

** is Pascal, not C



[2001-10-19 10:36:03] [EMAIL PROTECTED]

It would be nice to have an exponential operator. ** would be a logical
choice, just like in C.

Example:
echo 2**3; // prints 8

I know we have pow(), but an operator for this would be nice...




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




Bug #7923 Updated: htmlentities doesn't work for ISO 8859-2

2002-04-27 Thread jimw

 ID:   7923
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Analyzed
 Bug Type: Feature/Change Request
 Operating System: N/A
 PHP Version:  4.0.3pl1
 New Comment:

for most if the iso 8859-2 charset, there are no standard html
entities, and the current behavior of htmlentities() is to leave such
characters unconverted.

the real problem is that the current behavior of htmlentities() when
passed an unknown charset is to use the iso 8859-1 mapping. it
shouldn't try to use a charset mapping in that case.


Previous Comments:


[2000-11-23 07:40:20] [EMAIL PROTECTED]

BTW: you can use recode(ISO8859-2..h4,$text) for this
purpose. See GNU recode extension and recode docs for more
information.




[2000-11-22 08:17:01] [EMAIL PROTECTED]

From PHP Manual: ... htmlentities... At present, the ISO-8859-1
character set is used. 

I feel there is strong need to make htmlentities to support other
charsets than ISO 8859-1. We, here in Poland for instance, use ISO
8859-2. Many Western/USA freeware programs use (as they of course
should) htmlentities. Proper display of our diacritic chars is then
impossible. We have to modify sources, removing htmlentities or
defining own functions. It's a waste of time and resources. May I ask
PHP developers to consider this issue?

Maciek




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




Bug #14967 Updated: The php_printer.dll is missing in the ZIP distribution

2002-04-27 Thread jimw

 ID:   14967
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Closed
 Bug Type: Unknown/Other Function
 Operating System: windows
 PHP Version:  4.1.1
 New Comment:

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




Previous Comments:


[2002-01-10 10:07:53] [EMAIL PROTECTED]

The file php_printer.dll is missing in Windows binary distribution.





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




Bug #16874 Updated: php.exe not included with ZIP distribution

2002-04-27 Thread jimw

 ID:   16874
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Closed
 Bug Type: Unknown/Other Function
 Operating System: XP
 PHP Version:  4.2.0
 New Comment:

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

(it is in the sapi directory.)


Previous Comments:


[2002-04-27 13:00:55] [EMAIL PROTECTED]

php.exe not included with ZIP version of Windows distribution.




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




Bug #12379 Updated: conversion from html entities to normal text

2002-04-27 Thread alindeman

 ID:   12379
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Closed
 Bug Type: Documentation problem
 Operating System: linux
 PHP Version:  4.0.6
 New Comment:

This bug has been fixed in CVS.




Previous Comments:


[2002-04-27 14:55:47] [EMAIL PROTECTED]

php.net/htmlentities documents how to do this. (in the notes, right
now. reclassifying as documentation problem so the notes get pulled
into the documentation proper.)



[2001-07-25 16:50:29] [EMAIL PROTECTED]

PHP needs a function to convert html entities to plain text,
such as quot; becomes a double quote character.  

Essentially,
htmlentities or htmlspecialcharacters,
except in reverse.





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




Bug #8577 Updated: i would kill for the ability to undefine()

2002-04-27 Thread mfischer

 ID:   8577
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Closed
 Bug Type: Feature/Change Request
 Operating System: N/A
 PHP Version:  4.0.4
 New Comment:

You're on the wrong track comparing C #defines and define() in PHP. C
is about compiling and running executables whereas PHP is about
interpreting.


Previous Comments:


[2002-04-27 15:24:12] [EMAIL PROTECTED]

I have to admit that the above comment comes off as an
insulting wisecrack. like im a moron for suggesting such
a feature. what would KR say to that?

Anyway - i found a way around this PHP deficiency for now,
and i did that by creating a set of functions which maintain
an array of defined variables and respond accordinly to my
own undefine, ifdefine, constant and define functions.

cd /web/src/php4; grep -nir undef *;

hmm, looks like the php developers found it useful in C



[2002-04-27 14:15:52] [EMAIL PROTECTED]

if you could undefine, it wouldn't be constant.



[2001-01-07 13:22:50] [EMAIL PROTECTED]

I don't know if this is impossible or extremely difficult (I assume its
one of the two because this doesn't exist at the moment), but it would
be very handy. 






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




Bug #7535 Updated: Entities missing in get_html_translation_table ( HTML_ENTITIES );

2002-04-27 Thread jimw

 ID:   7535
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Analyzed
 Bug Type: Feature/Change Request
 Operating System: FreeBSD
 PHP Version:  4.0.3pl1
 New Comment:

yuml; and euro; are implemented. (euro; when using the iso-8859-15
charset.)

the other entities are not included because htmlentities() does not
handle entities outside of the 8-bit character range.


Previous Comments:


[2000-10-30 13:26:39] [EMAIL PROTECTED]

These are the entities not listed in this function.

Character entity references in HTML 4
(http://www.w3.org/TR/html4/sgml/entities.html)

yuml; = #255;
fnof; = #402;
Alpha; = #913;
Beta; = #914;
Gamma; = #915;
Delta; = #916;
Epsilon; = #917;
Zeta; = #918;
Eta; = #919;
Theta; = #920;
Iota; = #921;
Kappa; = #922;
Lambda; = #923;
Mu; = #924;
Nu; = #925;
Xi; = #926;
Omicron; = #927;
Pi; = #928;
Rho; = #929;
Sigma; = #931;
Tau; = #932;
Upsilon; = #933;
Phi; = #934;
Chi; = #935;
Psi; = #936;
Omega; = #937;
alpha; = #945;
beta; = #946;
gamma; = #947;
delta; = #948;
epsilon; = #949;
zeta; = #950;
eta; = #951;
theta; = #952;
iota; = #953;
kappa; = #954;
lambda; = #955;
mu; = #956;
nu; = #957;
xi; = #958;
omicron; = #959;
pi; = #960;
rho; = #961;
sigmaf; = #962;
sigma; = #963;
tau; = #964;
upsilon; = #965;
phi; = #966;
chi; = #967;
psi; = #968;
omega; = #969;
thetasym; = #977;
upsih; = #978;
piv; = #982;
bull; = #8226;
hellip; = #8230;
prime; = #8242;
Prime; = #8243;
oline; = #8254;
frasl; = #8260;
weierp; = #8472;
image; = #8465;
real; = #8476;
trade; = #8482;
alefsym; = #8501;
larr; = #8592;
uarr; = #8593;
rarr; = #8594;
darr; = #8595;
harr; = #8596;
crarr; = #8629;
lArr; = #8656;
uArr; = #8657;
rArr; = #8658;
dArr; = #8659;
hArr; = #8660;
forall; = #8704;
part; = #8706;
exist; = #8707;
empty; = #8709;
nabla; = #8711;
isin; = #8712;
notin; = #8713;
ni; = #8715;
prod; = #8719;
sum; = #8721;
minus; = #8722;
lowast; = #8727;
radic; = #8730;
prop; = #8733;
infin; = #8734;
ang; = #8736;
and; = #8743;
or; = #8744;
cap; = #8745;
cup; = #8746;
int; = #8747;
there4; = #8756;
sim; = #8764;
cong; = #8773;
asymp; = #8776;
ne; = #8800;
equiv; = #8801;
le; = #8804;
ge; = #8805;
sub; = #8834;
sup; = #8835;
nsub; = #8836;
sube; = #8838;
supe; = #8839;
oplus; = #8853;
otimes; = #8855;
perp; = #8869;
sdot; = #8901;
lceil; = #8968;
rceil; = #8969;
lfloor; = #8970;
rfloor; = #8971;
lang; = #9001;
rang; = #9002;
loz; = #9674;
spades; = #9824;
clubs; = #9827;
hearts; = #9829;
diams; = #9830;
OElig; = #338;
oelig; = #339;
Scaron; = #352;
scaron; = #353;
Yuml; = #376;
circ; = #710;
tilde; = #732;
ensp; = #8194;
emsp; = #8195;
thinsp; = #8201;
zwnj; = #8204;
zwj; = #8205;
lrm; = #8206;
rlm; = #8207;
ndash; = #8211;
mdash; = #8212;
lsquo; = #8216;
rsquo; = #8217;
sbquo; = #8218;
ldquo; = #8220;
rdquo; = #8221;
bdquo; = #8222;
dagger; = #8224;
Dagger; = #8225;
permil; = #8240;
lsaquo; = #8249;
rsaquo; = #8250;
euro; = #8364;




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




Bug #16870 Updated: function is_a() inconsisten

2002-04-27 Thread sniper

 ID:   16870
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Assigned
 Bug Type: Feature/Change Request
 Operating System: Linux
 PHP Version:  4.2.0
-Assigned To:  
+Assigned To:  andrei
 New Comment:

Assigned to Andrei who added is_a()



Previous Comments:


[2002-04-27 04:35:16] [EMAIL PROTECTED]

Is there any reason that this function is_a() does not work for php
classes?  If I create a domxml object $xml and do

is_a($xml, get_class($xml));

it returns false...something seems wrong about that.  This is not a
strtolower problem either...this function works fine for user defined
classes, but refused to even operate on objects created by php's
functions.




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




Bug #14542 Updated: Apache Crash

2002-04-27 Thread sniper

 ID:   14542
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Closed
+Status:   Open
 Bug Type: Unknown/Other Function
 Operating System: Linux 2.4.5
 PHP Version:  4.1.1
 New Comment:

It's not fixed..



Previous Comments:


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

Fixed in CVS



[2002-04-25 16:07:25] [EMAIL PROTECTED]

The cause of the bug is that the following code is commented out in the
timeout handler (zend_timeout() in zend_execute_API):

/* is there any point in this?  we're terminating the request
anyway...
PG(connection_status) |= PHP_CONNECTION_TIMEOUT;
*/

In our case, we need this error status to be set correctly. We want to
be able to detect the error when a script is terminated due to timeout.



[2001-12-16 02:22:59] [EMAIL PROTECTED]

It seems that when a script terminates due to a
timeout connection_status() returns 0 (and
connection_timeout() no longer exists).

When aborted by a user connection_status() does return 1.

Sample script:

?PHP
set_time_limit(1);
register_shutdown_function(shutdown);

function shutdown(){
$status = connection_status();
$err = Connection status ($status).\n;
error_log($err, 3, /tmp/phpstatus.log);
}

while(true){
echo .;
}

?





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




Bug #16875 Updated: FILE Function Checks Wrong Path

2002-04-27 Thread tonicpeddler

 ID:   16875
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Feedback
+Status:   Open
 Bug Type: Filesystem function related
 Operating System: Windows XP
 PHP Version:  4.2.0
 New Comment:

I use include() and require() all the time, it works just fine.  So the
problem is probably specific to file()


Previous Comments:


[2002-04-27 19:35:21] [EMAIL PROTECTED]

Can you test if the same thing happens with include() ?




[2002-04-27 13:12:09] [EMAIL PROTECTED]

When I call:

$data = file( database.txt );

From my file c:\xitami\webpages\db\database.php, php doesn't check
c:\xitami\webpages\db\ for database.txt, instead it returns an error
saying that database.txt doesn't exist in the directory
c:\xitami\webpages\db\database.php  I beleive this may be a bug,
since it shouldn't be including the name of the php script in the
directory.  In the mean time I am specifying an absolute filename for
database.txt, however I'd much prefer the modularity of relative file
access.

If you fix it, that's great, I hope someone contacts me.  In that case
could someone tell me where to download a prebuilt binary?  I'm on
dialup and a pretty slow machine, not very interested in downloading
the source code again, and building, again.




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




Bug #16830 Updated: file_exists() returns TRUE instead of FALSE

2002-04-27 Thread yohgaki

 ID:   16830
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Analyzed
 Bug Type: Filesystem function related
 Operating System: ANY
 PHP Version:  4.3.0-dev
 New Comment:

Just curious, is this fixed?
(I was about to commit test case for this bug)

[yohgaki@dev HEAD]$ ./cli-php ext/standard/tests/file/003.inc 
bool(false)
bool(false)





Previous Comments:


[2002-04-27 13:09:43] [EMAIL PROTECTED]

Jani, the var_dump()s IMO show two bugs: the other is that is_file()
returned int(0), while it's documented to be a bool type. could you
check this too?




[2002-04-27 10:41:44] [EMAIL PROTECTED]

Duh. You're right, it's a bug. 

?php

$filename=;

$bb = is_file($filename);
var_dump($bb);

$aa = file_exists($filename);
var_dump($aa);

?

Outputs:

int(0)
bool(true)


--Jani




[2002-04-27 00:27:58] [EMAIL PROTECTED]

c:\winnt\system32\php4ts.dll matches the php4ts.dll from the php 4.2.0
package. All other PHP files are in php's own directory. When I install
a new version of PHP, I always delete the whole old PHP directory and
create a new one to prevent keeping rests from old versions. I also
always use the new php.ini-dist and modify it again instead of keeping
the old php.ini.

Additionally, in the last PHP version I had installed (4.1.2),
file_exists() DID work! It just stopped working with PHP 4.2.0, so I
doubt that error could be from forgetting to overwrite old DLLs with
new ones.

What does the script I posted before say for _you_, Jani?



[2002-04-26 22:11:06] [EMAIL PROTECTED]

Just in case..are you absolutely sure you have updated
all dlls related to PHP in your system? (I assume you had
some older PHP there before)

e.g. php4ts.dll is quite important to be new. Try searching
your filesystem for it. You might have many of them there.

--Jani




[2002-04-26 12:47:20] [EMAIL PROTECTED]

Sander, please tell me the Bug ID for it.

I did search the Bugs DB for open bugs with file_exists.
The bug I'm talking about was reported as bug for PHP 4.1.0 ( Bug ID:
15218 ) and it has actually been fixed in 4.1.2, but now it appeared
again in PHP 4.2.0 !!
So this is no duplicate bugreport, I think.



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

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




Bug #16830 Updated: file_exists() returns TRUE instead of FALSE

2002-04-27 Thread yohgaki

 ID:   16830
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Analyzed
 Bug Type: Filesystem function related
 Operating System: ANY
 PHP Version:  4.3.0-dev
 New Comment:

I added following test case (ext/standard/tests/file/003.phpt)

?php

$filename=;

$bb = is_file($filename);
var_dump($bb);

$aa = file_exists($filename);
var_dump($aa);

$filename=php.ini-dist;

$bb = is_file($filename);
var_dump($bb);

$aa = file_exists($filename);
var_dump($aa);

?

Result:
[yohgaki@dev HEAD]$ cat ext/standard/tests/file/003.out
bool(false)
bool(false)
int(1)
bool(true)




Previous Comments:


[2002-04-27 19:57:58] [EMAIL PROTECTED]

Just curious, is this fixed?
(I was about to commit test case for this bug)

[yohgaki@dev HEAD]$ ./cli-php ext/standard/tests/file/003.inc 
bool(false)
bool(false)






[2002-04-27 13:09:43] [EMAIL PROTECTED]

Jani, the var_dump()s IMO show two bugs: the other is that is_file()
returned int(0), while it's documented to be a bool type. could you
check this too?




[2002-04-27 10:41:44] [EMAIL PROTECTED]

Duh. You're right, it's a bug. 

?php

$filename=;

$bb = is_file($filename);
var_dump($bb);

$aa = file_exists($filename);
var_dump($aa);

?

Outputs:

int(0)
bool(true)


--Jani




[2002-04-27 00:27:58] [EMAIL PROTECTED]

c:\winnt\system32\php4ts.dll matches the php4ts.dll from the php 4.2.0
package. All other PHP files are in php's own directory. When I install
a new version of PHP, I always delete the whole old PHP directory and
create a new one to prevent keeping rests from old versions. I also
always use the new php.ini-dist and modify it again instead of keeping
the old php.ini.

Additionally, in the last PHP version I had installed (4.1.2),
file_exists() DID work! It just stopped working with PHP 4.2.0, so I
doubt that error could be from forgetting to overwrite old DLLs with
new ones.

What does the script I posted before say for _you_, Jani?



[2002-04-26 22:11:06] [EMAIL PROTECTED]

Just in case..are you absolutely sure you have updated
all dlls related to PHP in your system? (I assume you had
some older PHP there before)

e.g. php4ts.dll is quite important to be new. Try searching
your filesystem for it. You might have many of them there.

--Jani




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

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




Bug #16830 Updated: file_exists() returns TRUE instead of FALSE

2002-04-27 Thread cynic

 ID:   16830
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Analyzed
 Bug Type: Filesystem function related
 Operating System: ANY
 PHP Version:  4.3.0-dev
 New Comment:

something stinks here:

[2002-04-27 10:41:44] [EMAIL PROTECTED]  

$filename=;
$bb = is_file($filename);
var_dump($bb); 


int(0)

yohgaki:

$filename=;
   
$bb = is_file($filename);
var_dump($bb); 


bool(false)  


so does is_file() return false or 0? plus it returned int(1) for you,
which it shouldn't either (should return bool(true) instead). WTF?




Previous Comments:


[2002-04-27 20:09:29] [EMAIL PROTECTED]

I added following test case (ext/standard/tests/file/003.phpt)

?php

$filename=;

$bb = is_file($filename);
var_dump($bb);

$aa = file_exists($filename);
var_dump($aa);

$filename=php.ini-dist;

$bb = is_file($filename);
var_dump($bb);

$aa = file_exists($filename);
var_dump($aa);

?

Result:
[yohgaki@dev HEAD]$ cat ext/standard/tests/file/003.out
bool(false)
bool(false)
int(1)
bool(true)





[2002-04-27 19:57:58] [EMAIL PROTECTED]

Just curious, is this fixed?
(I was about to commit test case for this bug)

[yohgaki@dev HEAD]$ ./cli-php ext/standard/tests/file/003.inc 
bool(false)
bool(false)






[2002-04-27 13:09:43] [EMAIL PROTECTED]

Jani, the var_dump()s IMO show two bugs: the other is that is_file()
returned int(0), while it's documented to be a bool type. could you
check this too?




[2002-04-27 10:41:44] [EMAIL PROTECTED]

Duh. You're right, it's a bug. 

?php

$filename=;

$bb = is_file($filename);
var_dump($bb);

$aa = file_exists($filename);
var_dump($aa);

?

Outputs:

int(0)
bool(true)


--Jani




[2002-04-27 00:27:58] [EMAIL PROTECTED]

c:\winnt\system32\php4ts.dll matches the php4ts.dll from the php 4.2.0
package. All other PHP files are in php's own directory. When I install
a new version of PHP, I always delete the whole old PHP directory and
create a new one to prevent keeping rests from old versions. I also
always use the new php.ini-dist and modify it again instead of keeping
the old php.ini.

Additionally, in the last PHP version I had installed (4.1.2),
file_exists() DID work! It just stopped working with PHP 4.2.0, so I
doubt that error could be from forgetting to overwrite old DLLs with
new ones.

What does the script I posted before say for _you_, Jani?



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

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




Bug #16867 Updated: wrong $_SERVER['SERVER_NAME' contents

2002-04-27 Thread sniper

 ID:   16867
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Feedback
 Bug Type: Apache related
 Operating System: SuSE 7.0
 PHP Version:  4.2.0
 New Comment:

What exactly are you expecting it to be? 
Please look in the phpinfo() output, especially the Apache
sections. 

--Jani



Previous Comments:


[2002-04-27 04:17:35] [EMAIL PROTECTED]

Hi,

It seems that the contents of the var $_SERVER['SERVER_NAME'] is not
set correct. I'm using apache 1.3.23 and PHP 4.2.0 with virtual hosts
with servernames and serveraliases. $_SERVER['SERVER_NAME'] apparantly
can also return the serveralias name instead of the servername, which
is not expected behaviour.

Please check the following urls to see what I mean:
http://broodjekaas.nl/test.php
And
http://www.broodjekaas.nl/test.php

Hope this helps,

Erik





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




Bug #16882: HTML Help crashes opening php_manual_en.chm

2002-04-27 Thread andre

From: [EMAIL PROTECTED]
Operating system: Win XP
PHP version:  4.2.0
PHP Bug Type: Documentation problem
Bug description:  HTML Help crashes opening php_manual_en.chm

HTML Help (latest version) crashes when opening php_manual_en.chm under
Windows XP Pro. hh.exe opens other documents (not from php document page)
correctly.

AppName: hh.exe  AppVer: 4.74.9273.0 ModName: itss.dll
ModVer: 4.72.8085.0  Offset: 252c

My preferred editor could open context sensitive help for a keyword (e.g.
PHP function) with one keystroke - so I consider properly working HTML
help a tremendous help in coding and debugging - compared to the other
available formats.
-- 
Edit bug report at http://bugs.php.net/?id=16882edit=1
-- 
Fixed in CVS:http://bugs.php.net/fix.php?id=16882r=fixedcvs
Fixed in release:http://bugs.php.net/fix.php?id=16882r=alreadyfixed
Need backtrace:  http://bugs.php.net/fix.php?id=16882r=needtrace
Try newer version:   http://bugs.php.net/fix.php?id=16882r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=16882r=support
Expected behavior:   http://bugs.php.net/fix.php?id=16882r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=16882r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=16882r=submittedtwice




Bug #16823 Updated: checking native iconv support failed on Solaris 8

2002-04-27 Thread sniper

 ID:   16823
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Closed
 Bug Type: ICONV related
 Operating System: Solaris 8
 PHP Version:  4.2.0
 New Comment:

There indeed was a bug in this. Fixed now for PHP 4.2.1.
(4.3.0-dev didn't have this bug)

--Jani



Previous Comments:


[2002-04-27 03:16:44] [EMAIL PROTECTED]

I've used native iconv with PHP 4.1.2 on Solaris 8 for monthes without
any problem. (--with-iconv=/usr)

Also, the perl iconv module works fine on my solaris 8 too.

my config.log
---
  $ ./configure --with-mysql=/usr/local/mysql
--with-openssl=/usr/local/ssl --en
able-libgcc --with-gd=/usr/local --with-jpeg-dir=/usr/local
--with-png-dir=/usr/
local --with-iconv --with-zlib-dir=/usr/local

php -m
--
Running PHP 4.2.0
Zend Engine v1.2.0, Copyright (c) 1998-2002 Zend Technologies

[PHP Modules]
xml
standard
session
posix
pcre
openssl
mysql
gd
ctype
zlib

[Zend Modules]

php -m (4.1.2)
---
aurora:~/temp/php-4.1.2-myhsu- ./php -m
Running PHP 4.1.2
Zend Engine v1.1.1, Copyright (c) 1998-2001 Zend Technologies

[PHP Modules]
xml
standard
session
posix
pcre
openssl
mysql
iconv
gd
zlib

[Zend Modules]
Not Implemented



[2002-04-26 11:24:52] [EMAIL PROTECTED]

What does 'php -m' output? No iconv extension?
Does any other iconv function work?

--Jani




[2002-04-25 23:36:06] [EMAIL PROTECTED]

The configure works fine with --with-iconv only, however, the binary I
made (cgi mode) will complain about Fatal
error: Call to undefined function: iconv()

the phpinfo() doesn't show any information about iconv.



[2002-04-25 22:28:57] [EMAIL PROTECTED]

This check was changed so that it's possible to link
with external library even if the iconv functions are
found in libc. Using --with-iconv (without any path)
should work fine.

--Jani




[2002-04-25 22:19:22] [EMAIL PROTECTED]

The native iconv support on Solaris is in libc. I saw the configure
will check /usr/include/iconv.h and iconv in libc, c_r, pthread in PHP
4.1.2, but doesn't
find the same code in the configure of 4.2.0.

It seems there is no libiconv.a on Solaris 8.



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

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




Bug #12445 Updated: ./configure suxx

2002-04-27 Thread php-bugs

 ID:   12445
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Feedback
+Status:   No Feedback
 Bug Type: Compile Failure
 Operating System: Linux 2.2.19
 PHP Version:  4.0.6
 New Comment:

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


Previous Comments:


[2002-03-22 15:53:10] [EMAIL PROTECTED]

I hope you updated your php version already? 4.0.6 is too old.



[2002-03-22 09:44:56] [EMAIL PROTECTED]

This problem still exists.

Here is my configure, and the end of config.log.

*** configure
./configure \
  --with-apxs \
  --enable-sigchild \
  --enable-wddx \
  --with-oci8=/home/oracle/OraHome1 \
  --enable-ftp \
  --with-exif \
  --with-expat=/usr/src/redhat/SOURCES/expat-1.95.1 \
  --with-openssl=/usr/local/ssl/ \
  --without-mysql \
  --enable-sockets \
  --with-gd=/usr/src/redhat/SOURCES/gd-2.0.1 \
  --with-t1lib=/usr/src/redhat/SOURCES/t1lib-1.3.1 \
  --with-png-dir \
  --with-zlib-dir


*** config.log
configure:8892: checking whether to enable php streams
configure:8942: checking for crypt in -lcrypt
configure:8961: gcc -o conftest -g -O2  -DLINUX=22 -DEAPI -DEAPI_MM
-DUSE_EXPAT
configure:9023: checking if the location of ZLIB install directory is
defined
configure:9068: checking whether to include ZLIB support
configure:9309: checking for gzgets in -lz
configure:9328: gcc -o conftest -g -O2  -DLINUX=22 -DEAPI -DEAPI_MM
-DUSE_EXPAT
/usr/i386-glibc-2.1-linux/i386-glibc21-linux/bin/ld: cannot find -lz
collect2: ld returned 1 exit status
configure: failed program was:
#line 9317 configure
#include confdefs.h
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply.  */
char gzgets();

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



[2001-08-20 10:33:20] [EMAIL PROTECTED]

No feedback. Reopen if you still have this problem
with PHP 4.0.7 (soon to be released) or with latest CVS 
snapshot from http://snaps.php.net/




[2001-07-30 06:32:03] [EMAIL PROTECTED]

What is the complete configure line you use?
And what does config.log have about this?




[2001-07-28 04:45:17] [EMAIL PROTECTED]

./configure [...] --with-zlib [...] does not work. i have zlib 1.1.3
installed in /usr/local/zlib but it always says zlib =1.0.9
required

i think this is a general configuration script bug, so please fix it.
got no problems with 4.0.4p1 ...




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




Bug #8744 Updated: call to header() causes CGI error

2002-04-27 Thread php-bugs

 ID:   8744
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Feedback
+Status:   No Feedback
 Bug Type: IIS related
 Operating System: Windows 2000
 PHP Version:  4.1.1
 New Comment:

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


Previous Comments:


[2002-03-25 09:11:00] [EMAIL PROTECTED]

Guys try 4.1.2 

I think this is just the 1000th duplicate of the header bug.



[2002-03-25 02:57:10] [EMAIL PROTECTED]

Hi to all,

I have one Point to add. I use two copies of a WebSite on a Server
running IIS (Test  Real). One of them dosn't have this Problem at all,
but the Second one Produces this error. Both use the same Database
Server. I compared the IIS Web Configuration, but both are the same! I
can not find the error!

Kiumars Ansari / Hamburg



[2002-03-18 17:15:58] [EMAIL PROTECTED]

I read your errors and found:

FATAL:  erealloc():  Unable to allocate 1043162510 bytes

this seems to me like a MSSQL-PHP issue which comes along with the use
of MSSQLs NTEXT and NVARCHAR Fields, after connecting to the
MSSQL-database you must launch a SQL statement which limits the
returning size fo this fields eg. 'SET TEXTSIZE 10'.

hope this helps

Gustav Graf



[2002-03-14 06:52:39] [EMAIL PROTECTED]

i noticed various problem working on header() function.
in the worst case i get out a segmentation fault on my linux 2.4.4
running apache 1.3.22 + php 4.1.1

i will post a new bug thread about it in few minutes...

bye, stain



[2002-03-12 15:41:15] [EMAIL PROTECTED]

Hi All,

I also have this problem and it is definately related to MSSQL because
I also used the same code with a MySQL database and the error doesn't
exist.

Thanks,

Steve



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

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




  1   2   >