#22857 [NoF->Opn]: OCIExecute Hangs

2003-03-31 Thread dean at vipersoft dot co dot uk
 ID:   22857
 User updated by:  dean at vipersoft dot co dot uk
 Reported By:  dean at vipersoft dot co dot uk
-Status:   No Feedback
+Status:   Open
 Bug Type: OCI8 related
 Operating System: Linux 2.4
 PHP Version:  4.3.1
 New Comment:

Sorry for the lack of feedback - I was busy scratching my head! :)

The fix was a strange one.

I used to compile PHP with apache, then re-compile it for the CLI
version.  To fix the problem, I just compiled PHP with apache, and did
NOT build the CLI version.

Would that help explain why I have had *no* hangs since then?

Thanks

Dean


Previous Comments:


[2003-03-31 02:00:05] [EMAIL PROTECTED]

No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.





[2003-03-24 18:03:55] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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

First of all, those putenv()'s are useless, you need to set
them in the environment before starting Apache / running CLI.

It might help if you tried debugging this with gdb.

# gdb /opt/php/bin/php
(gdb) run yourtest.php

And do that as many times as required to get it fail..




[2003-03-24 14:06:01] dean at vipersoft dot co dot uk

Using the sample code below to submit a number of queries to an Oracle
database - about every 1 in 10 executions causes the OCIExecute
function to simple "hang" for about 10 minutes before timing out.

If more information is needed or any sorts of debugging is required, I
will follow up to this bug with the requested information.

Thanks

Dean

#!/opt/php/bin/php -q


sample output from above when "hung"
.
.
.
Iteration 2671
before execute
after execute
Iteration 2672
before execute
after execute
Iteration 2673
before execute



Notes:

* Doesn't happen every time
* Happens about 1 in every 10 runs of the above code
* Happens from both the CLI php and through Apache
* Eventually times out without finishing off its iteration






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



#22876 [Fbk->NoF]: Application Failure Apache.exe 0.0.0.0 in php4ts.dll 4.3.1.1 at offset 000b7bd4

2003-03-31 Thread sniper
 ID:   22876
 Updated by:   [EMAIL PROTECTED]
 Reported By:  dcmwai at amtb-m dot org dot my
-Status:   Feedback
+Status:   No Feedback
 Bug Type: Apache related
 Operating System: Win XP SP1 & Win2K SP3
 PHP Version:  4.3.1
 New Comment:

No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.




Previous Comments:


[2003-03-25 15:26:29] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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

And upgrade your apache too. Several security related issues have been
fixed.

Also, provide a reproduce script that is short but complete.
If it's more then 20 lines, put it on a site.



[2003-03-25 09:32:29] dcmwai at amtb-m dot org dot my

I'm not too sure how an I going to tell this problem and I'll try my
best.

This problem only happen with PHP 4.3.1 on Windows.
I'm using apache 1.3.20 + PHP 4.3.1(SAPI modules)

I'm developing a software called Arias.
http://sourceforge.net/projects/arias
The problem appear on login and after a few click on the different menu
the Application Failure happen.

and I swtich back to 4.2.2 and nothing happen again, similar Bug have
been report on our development maillisting.

This problem didn't seem to effect other platfrom
This is the error message that I can give.
Application Failure Apache.exe 0.0.0.0 in php4ts.dll 4.3.1.1 at offset
000b7bd4

I think that the main problem may be the php4ts.dll.




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



#22903 [Fbk->NoF]: when parsing xml php crashes

2003-03-31 Thread sniper
 ID:   22903
 Updated by:   [EMAIL PROTECTED]
 Reported By:  spoerri at duke dot edu
-Status:   Feedback
+Status:   No Feedback
 Bug Type: XML related
 Operating System: linux
 PHP Version:  4.3.1
 New Comment:

No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.




Previous Comments:


[2003-03-26 12:45:47] [EMAIL PROTECTED]

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

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

Thank you for your interest in PHP.


Please provide the shortest possible version of the code (that can be
ran as is) as well as the xml data that causes the problem. Without it
the problem cannot and will not be resolved.



[2003-03-26 12:30:33] spoerri at duke dot edu

I compiled php-4.3.1 with debugging enabled and got the 
following error: 
 
Warning: String is not zero-terminated 
(Z?Ì?*?*Z1 ) (source: 
/usr/src/php-4.3.1/Zend/zend_execute.c:446) in 
/var/www/obis_test/ims/phpConnector/phparcims.php on line 
1104



[2003-03-26 09:52:32] [EMAIL PROTECTED]

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

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

Thank you for your interest in PHP.


Unable to replicate the bug given the source code given.



[2003-03-26 09:41:26] spoerri at duke dot edu

I'm sending you here only code snippets, in case you need 
the rest of the code let me know. Note: the code is 
embedded in the code for an object. 
 
** here's the code used to setup the parser: *** 
  
$this->xml_parser=xml_parser_create($this->encode_type); 
  xml_set_object($this->xml_parser,&$this); 
  
xml_set_element_handler($this->xml_parser,"startElement","endElement");

  
xml_set_character_data_handler($this->xml_parser,"cdata"); 
  $this->depth=0; 
  $this->parent=array(); 
  $this->pobject=array(); 
$this->$IMSError=array(); 
  xml_parse($this->xml_parser,$XMLText); 
  xml_parser_free($this->xml_parser); 
 
 
** here's the code I use to parse the 'LAYERINFO' tag: ** 
 
case 'LAYERINFO': 
//parent tag is always RESPONSE 
$l = new arcLayer($attrs['ID'], 
$attrs['TYPE'], 
($attrs['NAME']?$attrs['NAME']:''),($attrs['MINSCALE']?$attrs['MINSCALE']:0),($attrs['MAXSCALE']?$attrs['MAXSCALE']:0),

(strtolower($attrs['VISIBLE'])=='true'?1:0), 1); 
if ($this->returnLayer($l->Name,$index)) { 
if ($this->Layers[$index]->Service) { 
$this->Layers[$index]=$l; 

$this->CurrentLayer=&$this->Layers[$index]; 
} 
}else{ 
$this->Layers[]=$l; 

$this->CurrentLayer=&$this->Layers[count($this->Layers)-1]; 
} 
break;



[2003-03-26 09:40:34] spoerri at duke dot edu

I'm sending you here only code snippets, in case you need 
the rest of the code let me know. Note: the code is 
embedded in the code for an object. 
 
** here's the code used to setup the parser: *** 
  
$this->xml_parser=xml_parser_create($this->encode_type); 
  xml_set_object($this->xml_parser,&$this); 
  
xml_set_element_handler($this->xml_parser,"startElement","endElement");

  
xml_set_character_data_handler($this->xml_parser,"cdata"); 
  $this->depth=0; 
  $this->parent=array(); 
  $this->pobject=array(); 
$this->$IMSError=array(); 
  xml_parse($this->xml_parser,$XMLText); 
  xml_parser_free($this->xml_parser); 
 
 
** here's the code I use to parse the 'LAYERINFO' tag: ** 
 
case 'LAYERINFO': 
//parent tag is always RESPONSE 
$l = new arcLayer($attrs['ID'], 
$attrs['TYPE'], 
($attrs['NAME']?$attrs['NAME']:''),($attrs['MINSCALE']?$attrs['MINSCALE']:0),($attrs['MAXSCALE']?$attrs['MAXSCALE']:0),

(strtolower($attrs['VISIBLE'])=='true'?1:0), 1); 
   

#22910 [Fbk->Bgs]: hoe

2003-03-31 Thread sniper
 ID:   22910
 Updated by:   [EMAIL PROTECTED]
 Reported By:  horst at d3x-designs dot de
-Status:   Feedback
+Status:   Bogus
 Bug Type: *General Issues
 Operating System: ms win2k
 PHP Version:  4.3.1
 New Comment:

Not bug.



Previous Comments:


[2003-03-26 15:43:48] [EMAIL PROTECTED]

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

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

Thank you for your interest in PHP.


This bug report is horribly incomplete.

1) Come up with a summary.  'hoe' describes nothing.  At best it could
qualify as an epithet, but I'm assuming that's not what your intent
was. :)

2) Describe your problem thoroughly.  Including what you expected to
get and what you actually got.

3) Provide a COMPLETE and self-contained script.  The few lines you
provided are only meaningful if the values of $file, $file1, $lu2, and
$muh are known.

4) If possible, find an english speaker to proofread your submission. 
This is a nice-to-have not a must-have obviously...   If you simply
can't convey some piece of information clearly, adding a note in german
(I'm assuming that's your native language from the .de suffix in your
email address) to clarify would provide more help than forcing us to
guess at your meaning.



[2003-03-26 12:59:02] horst at d3x-designs dot de

hello
since the new php version there's a big "bug" i think...

if I made something like this:

for($i=0;$ihttp://bugs.php.net/?id=22910&edit=1



#22950 [Opn->Fbk]: Stack overflow with IIS, ISAPI

2003-03-31 Thread sniper
 ID:   22950
 Updated by:   [EMAIL PROTECTED]
 Reported By:  heyjohnlim at yahoo dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Scripting Engine problem
 Operating System: Windows 2000
 PHP Version:  4.3.1
 New Comment:

Please try using this CVS snapshot:

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




Previous Comments:


[2003-03-29 03:36:25] heyjohnlim at yahoo dot com

>The second crash occurs when calling the editor object
>returned by GetEditor().
>
>$editor->Render(); ## crashes here...

I did a print_r($editor) just before the Render() call and it looked
normal. I also called method_exists($editor,'Render') and it returned
1. So the $editor is still in a sane state just before it crashes.



[2003-03-29 03:24:30] heyjohnlim at yahoo dot com

Hello,

I am testing some complicated scripts that use many classes and objects
and that connects to mysql. The scripts work fine on Windows with IIS
CGI and on Linux with Apache 1.3.

However it crashes with IIS, ISAPI with

  PHP has encountered a Stack Overflow

Tracing the code, it appears to crash in two different places in two
different scripts. The crashes are consistently reproducible.

(1) Once while including a file(!) and 
(2) When the script calls an object's method (the method is never
executed, so it is during the method invocation). 

There is some faint connection between the two crashes. The key code is
a factory class that creates an object that looks something like this,
and is where the first crash occurs:

function GetEditor()
{
static $editor;

if (empty($editor)) {
  include_once('editor.inc.php'); ## crashes here
  $editor = new editor();
}
return $editor;
}

The second crash occurs when calling the editor object returned by
GetEditor().

$editor->Render(); ## crashes here...


One suspicion was perhaps some extension was not thread-safe. I then
removed all extensions from my php.ini and restarted IIS. Only the
pre-compiled extensions from the standard PHP Windows distribution such
as mysql were installed, and also Zend Optimizer. It still crashed.

Because i suspected the problem might be mysql, so i switched to
querying mssql instead. The problem still occurs at the same places.

It is difficult for me to create a simple script to reproduce the
problem, because the bug only happens in my  very complicated script.

- John Lim





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



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

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

Still waiting for the feedback of more detailed information.



Previous Comments:


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

Gave it a try.

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

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

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

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

so long

mir



[2003-03-25 14:48:32] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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

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

Please give it a try.



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

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

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

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

Could someone measure this out?






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



#22857 [Opn->Csd]: OCIExecute Hangs

2003-03-31 Thread sniper
 ID:   22857
 Updated by:   [EMAIL PROTECTED]
 Reported By:  dean at vipersoft dot co dot uk
-Status:   Open
+Status:   Closed
 Bug Type: OCI8 related
 Operating System: Linux 2.4
 PHP Version:  4.3.1
 New Comment:

No idea, but you don't need to compile CLI separately anyway. 
But it works, so..



Previous Comments:


[2003-03-31 02:04:11] dean at vipersoft dot co dot uk

Sorry for the lack of feedback - I was busy scratching my head! :)

The fix was a strange one.

I used to compile PHP with apache, then re-compile it for the CLI
version.  To fix the problem, I just compiled PHP with apache, and did
NOT build the CLI version.

Would that help explain why I have had *no* hangs since then?

Thanks

Dean



[2003-03-31 02:00:05] [EMAIL PROTECTED]

No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.





[2003-03-24 18:03:55] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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

First of all, those putenv()'s are useless, you need to set
them in the environment before starting Apache / running CLI.

It might help if you tried debugging this with gdb.

# gdb /opt/php/bin/php
(gdb) run yourtest.php

And do that as many times as required to get it fail..




[2003-03-24 14:06:01] dean at vipersoft dot co dot uk

Using the sample code below to submit a number of queries to an Oracle
database - about every 1 in 10 executions causes the OCIExecute
function to simple "hang" for about 10 minutes before timing out.

If more information is needed or any sorts of debugging is required, I
will follow up to this bug with the requested information.

Thanks

Dean

#!/opt/php/bin/php -q


sample output from above when "hung"
.
.
.
Iteration 2671
before execute
after execute
Iteration 2672
before execute
after execute
Iteration 2673
before execute



Notes:

* Doesn't happen every time
* Happens about 1 in every 10 runs of the above code
* Happens from both the CLI php and through Apache
* Eventually times out without finishing off its iteration






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



#22638 [Opn->Bgs]: Using Horde/IMP to read an email causes a crash

2003-03-31 Thread sniper
 ID:   22638
 Updated by:   [EMAIL PROTECTED]
 Reported By:  dsilvers at pepperfish dot net
-Status:   Open
+Status:   Bogus
 Bug Type: IMAP related
 Operating System: Linux
 PHP Version:  4.3.2RC
 New Comment:

Can not reproduce with given information.
Update your c-client library first.



Previous Comments:


[2003-03-28 03:36:23] spamfree at orangechicken dot com

Please don't close this bug. It happens in 4.3.1 as well. Here's the
minimum code that causes a crash:

$inbox = imap_open( '{' . MAIL_SERVER . '/pop3:110}INBOX', MAIL_USER,
MAIL_PASS );

Here's the compile string:
'./configure' '--with-apxs=/usr/local/apache/bin/apxs' '--with-xml'
'--enable-bcmath' '--enable-calendar' '--with-curl' '--enable-ftp'
'--with-gd' '--with-jpeg-dir=/usr/local' '--with-png-dir=/usr'
'--with-xpm-dir=/usr/X11R6' '--with-imap' '--with-imap-ssl'
'--with-kerberos' '--with-mcrypt' '--enable-magic-quotes'
'--with-mysql' '--with-pear' '--enable-xslt' '--with-xslt-sablot'
'--enable-sockets' '--enable-track-vars' '--with-ttf'
'--with-freetype-dir=/usr' '--enable-gd-native-ttf'
'--enable-versioning' '--with-zlib'

What else do I need? It seems like the code is quite minimum to cause
the crash (1 line).



[2003-03-24 04:17:30] [EMAIL PROTECTED]

No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.





[2003-03-18 20:12:35] [EMAIL PROTECTED]

Reclassified, assuming the problem is caused by the imap functions.

What c-client version are you using??
(it's most likely that what is causing the crash, and not PHP code)

What part of IMP causes the crash?
Reading it from the imap server?
Processing the mail?

Please try and add some debug die() lines or something
to figure out what exactly causes the crash.




[2003-03-18 13:35:41] dsilvers at pepperfish dot net

Right. With the snapshot:

php4-STABLE-200303181830

I get exactly the same outward behaviour (I.E. PHP dies when I read a
message with a 'CC: <>' header in it.

This is the gdb:

Program received signal SIGSEGV, Segmentation fault.
0x402d29d1 in malloc () from /lib/libc.so.6
(gdb) bt
#0  0x402d29d1 in malloc () from /lib/libc.so.6
#1  0x402d2074 in malloc () from /lib/libc.so.6
#2  0x0811debc in _emalloc (size=12)
at
/home/dsilvers/new-webmail/php4-STABLE-200303181830/Zend/zend_alloc.c:158
#3  0x0813a1dd in execute (op_array=0x8334174)
at
/home/dsilvers/new-webmail/php4-STABLE-200303181830/Zend/zend_execute.c:1601
#4  0x0813a3b4 in execute (op_array=0x8406dcc)
at
/home/dsilvers/new-webmail/php4-STABLE-200303181830/Zend/zend_execute.c:1650
#5  0x0812af28 in zend_execute_scripts (type=8, retval=0x0,
file_count=3)
at
/home/dsilvers/new-webmail/php4-STABLE-200303181830/Zend/zend.c:864
#6  0x08108caa in php_execute_script (primary_file=0xbe48)
at
/home/dsilvers/new-webmail/php4-STABLE-200303181830/main/main.c:1647
#7  0x081454b3 in main (argc=1, argv=0xbec4)
at
/home/dsilvers/new-webmail/php4-STABLE-200303181830/sapi/cgi/cgi_main.c:1480

Any ideas?



[2003-03-11 20:44:08] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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


And what part of IMP causes the crash?
Reading it from the imap server?
Processing the mail?





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

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



#22948 [Opn->Bgs]: Register Globals And Session

2003-03-31 Thread sniper
 ID:   22948
 Updated by:   [EMAIL PROTECTED]
 Reported By:  Ryan at StealthTeck dot Net
-Status:   Open
+Status:   Bogus
-Bug Type: Unknown/Other Function
+Bug Type: Session related
 Operating System: Red Hat Linux 7.3 2.96-113
 PHP Version:  4.3.2RC1
 New Comment:

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

Thank you for your interest in PHP.

.


Previous Comments:


[2003-03-28 23:08:08] Ryan at StealthTeck dot Net

Hello i not sure but php.ini and only one on the box. Is configed for
Register Globals on for our customers scripts and a few clients say
there script cause a error stating Register globals ant on and to have
it turned on.. But it is on.. Well a client setup this phpinfo script
and it says the samething also most of the php values are not true.
Goto http://xtac.org/phpinfo.php for better explaining. Sendmail ant
correct path and etc.

Also on the side of Session i dont know how to fix and the script i got
is the lastest release. 

Warning: Unknown(): Your script possibly relies on a session
side-effect which existed until PHP 4.2.3. Please be advised that the
session extension does not consider global variables as a source of
data, unless register_globals is enabled. You can disable this
functionality and this warning by setting session.bug_compat_42 or
session.bug_compat_warn to off, respectively. in Unknown on line 0

This isfor the latest release and hasnot been fixed. i have not been
able to find any other bug that compares to the new vers.




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



#22857 [Csd]: OCIExecute Hangs

2003-03-31 Thread dean at vipersoft dot co dot uk
 ID:   22857
 User updated by:  dean at vipersoft dot co dot uk
 Reported By:  dean at vipersoft dot co dot uk
 Status:   Closed
 Bug Type: OCI8 related
 Operating System: Linux 2.4
 PHP Version:  4.3.1
 New Comment:

Ok - I am happy to mark this as closed, but if anyone else has the
same/similar problem, maybe my comment on the CLI version (and not
building it separately), might help.

Dean


Previous Comments:


[2003-03-31 02:14:10] [EMAIL PROTECTED]

No idea, but you don't need to compile CLI separately anyway. 
But it works, so..




[2003-03-31 02:04:11] dean at vipersoft dot co dot uk

Sorry for the lack of feedback - I was busy scratching my head! :)

The fix was a strange one.

I used to compile PHP with apache, then re-compile it for the CLI
version.  To fix the problem, I just compiled PHP with apache, and did
NOT build the CLI version.

Would that help explain why I have had *no* hangs since then?

Thanks

Dean



[2003-03-31 02:00:05] [EMAIL PROTECTED]

No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.





[2003-03-24 18:03:55] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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

First of all, those putenv()'s are useless, you need to set
them in the environment before starting Apache / running CLI.

It might help if you tried debugging this with gdb.

# gdb /opt/php/bin/php
(gdb) run yourtest.php

And do that as many times as required to get it fail..




[2003-03-24 14:06:01] dean at vipersoft dot co dot uk

Using the sample code below to submit a number of queries to an Oracle
database - about every 1 in 10 executions causes the OCIExecute
function to simple "hang" for about 10 minutes before timing out.

If more information is needed or any sorts of debugging is required, I
will follow up to this bug with the requested information.

Thanks

Dean

#!/opt/php/bin/php -q


sample output from above when "hung"
.
.
.
Iteration 2671
before execute
after execute
Iteration 2672
before execute
after execute
Iteration 2673
before execute



Notes:

* Doesn't happen every time
* Happens about 1 in every 10 runs of the above code
* Happens from both the CLI php and through Apache
* Eventually times out without finishing off its iteration






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



#22806 [Opn->Csd]: Autogenerated crypt salt is not random

2003-03-31 Thread sniper
 ID:   22806
 Updated by:   [EMAIL PROTECTED]
 Reported By:  anj at aps dot anl dot gov
-Status:   Open
+Status:   Closed
 Bug Type: *Encryption and hash functions
 Operating System: Solaris 8
 PHP Version:  4.3.1
 New Comment:

This bug has been fixed in CVS.

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

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




Previous Comments:


[2003-03-27 15:03:59] anj at aps dot anl dot gov

This bug is present when using php4-STABLE-200303202230.

main/php_config.h does have the line
  #define HAVE_RAND_R 1

As I said before, this only occurs when I use the nsapi interface from
Sun's iPlanet server (SERVER_SOFTWARE is
iPlanet-WebServer-Enterprise/4.1); with the command-line/cgi interface
to PHP the salt is always random.



[2003-03-24 03:38:35] [EMAIL PROTECTED]

And please check the line with HAVE_RAND_R in main/php_config.h, is it
defined to 1 ?





[2003-03-24 03:35:00] [EMAIL PROTECTED]

Set to 'Open' when you really give the feedback of whether the snapshot
works or not.




[2003-03-23 11:29:25] [EMAIL PROTECTED]

I cannot reproduce this. And: the nsapi module has nothing to do with
crypt.
The only difference is that PHP is always reinitialized when running as
cgi. Could be that it always uses same crypt salt since restarting the
webserver.



[2003-03-21 17:20:28] anj at aps dot anl dot gov

After further testing I note that I can only see this problem when
using the NSAPI interface; when run through the CGI (command-line)
version it doesn't occur.  I guess that indicates the problem is with
NSAPI, so I've changed the bug category to "iPlanet related".

As I said before I'm not the sysadmin for our webserver, but I am
trying to get the php4-STABLE-200303202230 version installed to test -
I'll report back if I succeed.

The configure line on the 4.3.1 install that definitely exhibits the
problem is reported by phpinfo() as this:
'./configure' '--prefix=/opt/local/php' '--with-mysql=/usr/local/mysql'
'--with-nsapi=/usr/local/iplanet/server4'
'--with-config-file-path=/etc' '--enable-libgcc'



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

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



#22921 [Fbk->Opn]: PHP EXE crashes with "could not read memory"

2003-03-31 Thread tohlow at novadys dot com
 ID:   22921
 User updated by:  tohlow at novadys dot com
 Reported By:  tohlow at novadys dot com
-Status:   Feedback
+Status:   Open
 Bug Type: COM related
 Operating System: win 2k
 PHP Version:  4.3.2RC1
 New Comment:

Hi guys,

I am REALLY sorry about this, I do need to apologise: Everything is
working fine in RC1!
Thanks for nudging to the sample script, as regards the crash, there
was a problem with the custom COM server we use when using enumeration
objects, this did not crash in PHP 4.23, but after... Apology for
this!

As regards the unfreed COM reference, this is working fine as well, the
problem was an uncleared subreference to this particular object...

Lads, sorry again and thanks a million for your fast reaction and help:
I am looking very forward to 4.32!
T


Previous Comments:


[2003-03-28 12:50:35] [EMAIL PROTECTED]

could you please provide a simple script to reproduce that. the problem
is known with 4.3.0 and 4.3.1 but should be fixed since then.

ps: magnus, please stop acting snotty like jani



[2003-03-27 17:05:34] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2003-03-27 05:03:56] tohlow at novadys dot com

I know this is a pain in the neck, because there already is a couple of
entries similar to this BUT I hope I can provide some extra info.

I am developing a DCOM based PHP application and have just tried with
4.32 RC1. PHP.EXE simply crashes, apparently when clearing up its
object tables (when PHP.EXE unloads from memory, it seems to try to
clear up too many object references, unfortunately I cannot be more
specific because I am no C++ developper). Actually, we had been in
contact with Harald Radi before and he found the problem, fixed it for
PHP 4.23, but it got back in in release 4.30 :(

In RC1 now, it crashes, same for all releases between 4.30 and 4.32 and
4.10 and 4.22.

One additional problem is, that in the only working release (4.23),
when clearing up the object references, apparently NOT all are being
cleared up, resulting in kept alive objects which - as a consequence in
my case - don't free the licenses to our DCOM server :(
The only PHP version that I found that BOTH does NOT crash AND frees
ALL references correctly is 4.06.

One last hint: 4.31 crashes BUT correctly frees the references...

Hope this is not all too confusing and that there will be a fix in the
final release of 4.32, it would be greatly appreciated by a lot of
people, I think, definetly by myself!
Thanks, T

P.S.: It seems to be the same for IIS and Apache...




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



#22724 [NoF->Opn]: OCIParse

2003-03-31 Thread admin at iut-info dot ens dot univ-reims dot fr
 ID:   22724
 User updated by:  admin at iut-info dot ens dot univ-reims dot fr
-Summary:  OCIParse: ORA-1
 Reported By:  admin at iut-info dot ens dot univ-reims dot fr
-Status:   No Feedback
+Status:   Open
 Bug Type: OCI8 related
 Operating System: HP-UX 11.11
 PHP Version:  4.3.2RC1
 New Comment:

No backtrace because no crash.
With OCIInternalDebug(1);

The first time the page is called (just after apache start)
the result is ok. Here is the output :
--
OCIDebug: _oci_open_server new conn=0 dname=bd8

OCIDebug: _oci_open_session new sess=3 user=collet

OCIDebug: oci_do_connect: id=4

OCILogon Ok
Server Version: Oracle8i Enterprise Edition Release 8.1.7.0.0 -
Production
JServer Release 8.1.7.0.0 - Production
OCIDebug: oci_parse "SELECT * FROM essai" id=5 conn=4


2 Records Selected

OCIDebug: START php_rshutdown_oci
OCIDebug: END php_rshutdown_oci
OCIDebug: START _oci_stmt_list_dtor: id=5 last_query="SELECT * FROM
essai"
OCIDebug: START _oci_column_hash_dtor: REF
OCIDebug: END _oci_column_hash_dtor: REF
OCIDebug: START _oci_column_hash_dtor: LIB
OCIDebug: END _oci_column_hash_dtor: LIB
OCIDebug: START _oci_conn_list_dtor: id=4
OCIDebug: nothing to do..
OCIDebug: END _oci_conn_list_dtor: id=4
OCIDebug: END _oci_stmt_list_dtor: id=5
OCIDebug: START _oci_close_session: logging-off sess=3
OCIDebug: START _oci_close_server: detaching conn=2 dbname=bd8
--
And the page still works for a while..
Here is the output of the error :
--
OCIDebug: _oci_open_server new conn=0 dname=bd8

OCIDebug: _oci_open_session new sess=3 user=collet

OCIDebug: oci_do_connect: id=4

OCILogon Ok
Server Version: Oracle8i Enterprise Edition Release 8.1.7.0.0 -
Production
JServer Release 8.1.7.0.0 - Production


Warning:  ociparse() [function.ociparse]: OCIParse: ORA-1: unique
constraint (%s.%s) violated
 in /home/prof/collet/public_html/testoci8.php on line 13



Warning:  ociexecute(): supplied argument is not a valid OCI8-Statement
resource in /home/prof/collet/public_html/testoci8.php on line 14

OCIDebug: START php_rshutdown_oci
OCIDebug: END php_rshutdown_oci
OCIDebug: START _oci_conn_list_dtor: id=4
OCIDebug: nothing to do..
OCIDebug: END _oci_conn_list_dtor: id=4
OCIDebug: START _oci_close_session: logging-off sess=3
OCIDebug: START _oci_close_server: detaching conn=2 dbname=bd8
--
It's very strange in fact.
When the error occurs one time, then
it's happen each time the page is call.

Cordially.
P.S. : sorry for the feedback time... (some holidays)


Previous Comments:


[2003-03-31 01:56:21] [EMAIL PROTECTED]

No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.





[2003-03-26 05:50:26] [EMAIL PROTECTED]

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

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

can you try to do the same test with the code that has
OCIInternalDebug(1); function on top. Please post the output here.



[2003-03-15 03:51:53] admin at iut-info dot ens dot univ-reims dot fr

- CONFIGURE --
./configure \
--with-oci8 \
--with-apache=../apache_1.3.27  \
--with-gd   \
--with-pdflib=/opt/pdflib   \
--with-jpeg-dir \
--with-png-dir  \
--with-tiff-dir \
--with-zlib \
--with-bz2  \
--enable-sigchild   \
--with-mysql=/opt/mysql4\
--with-pgsql=/opt/pgsql \
--with-tsrm-pthreads\
--with-dom  \
--enable-ftp\
--enable-sockets
- testoci8.php --
Test de connexion PHP - Oracle 8i

$nrows Records Selected\n";
}


OCILogOff($conn);
}
elseecho " OCILogon ERREUR\n";
?>

 Result with PHP-4.3.0 ---
OCILogon Ok
Server Version: Oracle8i Enterprise Edition Release 8.1.7.0.0 -
Production
JServer Release 8.1.7.0.0 - Production

#20641 [Csd->Opn]: Numeric type returns invalid result using ibase_fetch_row/ibase_fetch_object

2003-03-31 Thread jear at aabc dot dk
 ID:   20641
 User updated by:  jear at aabc dot dk
 Reported By:  jear at aabc dot dk
-Status:   Closed
+Status:   Open
 Bug Type: InterBase related
 Operating System: Windows NT / Firebird 1.0
 PHP Version:  4.2.3
 New Comment:

I've tried current CVS and php_4_3 for Windows.

Unfortunately the numeric/decimal datatype beyond
the bounds of the PHP integer type (> 2147483647), still causes an
overflow.

Example:
InterBase 2303511415 (decimal 10,0) returns 2147483647


Previous Comments:


[2003-03-13 16:13:10] [EMAIL PROTECTED]

Fixed in current CVS and php_4_3



[2003-02-11 02:37:53] jear at aabc dot dk

I've tried the CVS snapshot for Windows:

  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip

Unfortunately the numeric/decimal datatype beyond
the bounds of the PHP integer type (> 2147483647), still causes an
overflow.


integer overflow is still there.



[2003-02-10 13:01:59] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2002-12-22 06:04:48] jear at aabc dot dk

The problem still exits after downloadning the latest PHP4 at
http://snaps.php.net/win32/php4-win32-latest.zip.



[2002-12-21 01:00:01] php-bugs at lists dot php dot net

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



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

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



#22975 [NEW]: PHP crashed at/after the 26 system-call

2003-03-31 Thread kju at arcor dot de
From: kju at arcor dot de
Operating system: Windows NT 4 SP 6a
PHP version:  4.3.1
PHP Bug Type: Reproducible crash
Bug description:  PHP crashed at/after the 26 system-call

After we have updated the PHP-Version from 4.1 to 4.3.1 we have
reproducable crashes...

In some of our scripts are exec-commands to use system-commands... With
version 4.1 all our scripts were ok...
But after updating the scripts crash at the 26. system-call...

I have a small example here:

--
n=30;
for ($i=0;$i<$n;$i++)
{
   exec("echo $i >> c:\test.log");
}
--

For any n<26 the script is running fine...
But when n=26 and above the script crashes and the last entry in the
test.log-file is "25" (the 26. system-call).

We have tested the system-calls with exec, system and passthru: same
results.
We also have tested many different commands also with commands who don't
use the filesystem, f.e. "ping $ip".

We also have increased the "set_time_limit" up to a very high  value (much
more than we need normally) but the problem is persistent... no "normal
ending"... 
-- 
Edit bug report at http://bugs.php.net/?id=22975&edit=1
-- 
Try a CVS snapshot: http://bugs.php.net/fix.php?id=22975&r=trysnapshot
Fixed in CVS:   http://bugs.php.net/fix.php?id=22975&r=fixedcvs
Fixed in release:   http://bugs.php.net/fix.php?id=22975&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=22975&r=needtrace
Try newer version:  http://bugs.php.net/fix.php?id=22975&r=oldversion
Not developer issue:http://bugs.php.net/fix.php?id=22975&r=support
Expected behavior:  http://bugs.php.net/fix.php?id=22975&r=notwrong
Not enough info:http://bugs.php.net/fix.php?id=22975&r=notenoughinfo
Submitted twice:http://bugs.php.net/fix.php?id=22975&r=submittedtwice
register_globals:   http://bugs.php.net/fix.php?id=22975&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=22975&r=php3
Daylight Savings:   http://bugs.php.net/fix.php?id=22975&r=dst
IIS Stability:  http://bugs.php.net/fix.php?id=22975&r=isapi
Install GNU Sed:http://bugs.php.net/fix.php?id=22975&r=gnused



#20641 [Opn->Fbk]: Numeric type returns invalid result using ibase_fetch_row/ibase_fetch_object

2003-03-31 Thread sniper
 ID:   20641
 Updated by:   [EMAIL PROTECTED]
 Reported By:  jear at aabc dot dk
-Status:   Open
+Status:   Feedback
 Bug Type: InterBase related
 Operating System: Windows NT / Firebird 1.0
 PHP Version:  4.2.3
 New Comment:

Make sure that you REALLY updated to the latest STABLE snaphot and ALL
the dlls. (and you might need to reboot even)
(don't install anything when your webserver is running)



Previous Comments:


[2003-03-31 03:08:09] jear at aabc dot dk

I've tried current CVS and php_4_3 for Windows.

Unfortunately the numeric/decimal datatype beyond
the bounds of the PHP integer type (> 2147483647), still causes an
overflow.

Example:
InterBase 2303511415 (decimal 10,0) returns 2147483647



[2003-03-13 16:13:10] [EMAIL PROTECTED]

Fixed in current CVS and php_4_3



[2003-02-11 02:37:53] jear at aabc dot dk

I've tried the CVS snapshot for Windows:

  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip

Unfortunately the numeric/decimal datatype beyond
the bounds of the PHP integer type (> 2147483647), still causes an
overflow.


integer overflow is still there.



[2003-02-10 13:01:59] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2002-12-22 06:04:48] jear at aabc dot dk

The problem still exits after downloadning the latest PHP4 at
http://snaps.php.net/win32/php4-win32-latest.zip.



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

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



#22975 [Opn->Fbk]: PHP crashed at/after the 26 system-call

2003-03-31 Thread sniper
 ID:   22975
 Updated by:   [EMAIL PROTECTED]
 Reported By:  kju at arcor dot de
-Status:   Open
+Status:   Feedback
 Bug Type: Reproducible crash
 Operating System: Windows NT 4 SP 6a
 PHP Version:  4.3.1
 New Comment:

Please try using this CVS snapshot:

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


Previous Comments:


[2003-03-31 03:30:31] kju at arcor dot de

After we have updated the PHP-Version from 4.1 to 4.3.1 we have
reproducable crashes...

In some of our scripts are exec-commands to use system-commands... With
version 4.1 all our scripts were ok...
But after updating the scripts crash at the 26. system-call...

I have a small example here:

--
n=30;
for ($i=0;$i<$n;$i++)
{
   exec("echo $i >> c:\test.log");
}
--

For any n<26 the script is running fine...
But when n=26 and above the script crashes and the last entry in the
test.log-file is "25" (the 26. system-call).

We have tested the system-calls with exec, system and passthru: same
results.
We also have tested many different commands also with commands who
don't use the filesystem, f.e. "ping $ip".

We also have increased the "set_time_limit" up to a very high  value
(much more than we need normally) but the problem is persistent... no
"normal ending"... 




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



#22950 [Fbk->Opn]: Stack overflow with IIS, ISAPI

2003-03-31 Thread heyjohnlim at yahoo dot com
 ID:   22950
 User updated by:  heyjohnlim at yahoo dot com
 Reported By:  heyjohnlim at yahoo dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Scripting Engine problem
 Operating System: Windows 2000
-PHP Version:  4.3.1
+PHP Version:  4.3.2-RC
 New Comment:

This problem happens still happens with 4.3.2-RC build Mar 31 2003
01:11:32

If you have a debug build i can download, i will be happy to try. I
have Visual C++ 6 and debugging facilities installed, but not the full
build environment for PHP.


Previous Comments:


[2003-03-31 02:11:30] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2003-03-29 03:36:25] heyjohnlim at yahoo dot com

>The second crash occurs when calling the editor object
>returned by GetEditor().
>
>$editor->Render(); ## crashes here...

I did a print_r($editor) just before the Render() call and it looked
normal. I also called method_exists($editor,'Render') and it returned
1. So the $editor is still in a sane state just before it crashes.



[2003-03-29 03:24:30] heyjohnlim at yahoo dot com

Hello,

I am testing some complicated scripts that use many classes and objects
and that connects to mysql. The scripts work fine on Windows with IIS
CGI and on Linux with Apache 1.3.

However it crashes with IIS, ISAPI with

  PHP has encountered a Stack Overflow

Tracing the code, it appears to crash in two different places in two
different scripts. The crashes are consistently reproducible.

(1) Once while including a file(!) and 
(2) When the script calls an object's method (the method is never
executed, so it is during the method invocation). 

There is some faint connection between the two crashes. The key code is
a factory class that creates an object that looks something like this,
and is where the first crash occurs:

function GetEditor()
{
static $editor;

if (empty($editor)) {
  include_once('editor.inc.php'); ## crashes here
  $editor = new editor();
}
return $editor;
}

The second crash occurs when calling the editor object returned by
GetEditor().

$editor->Render(); ## crashes here...


One suspicion was perhaps some extension was not thread-safe. I then
removed all extensions from my php.ini and restarted IIS. Only the
pre-compiled extensions from the standard PHP Windows distribution such
as mysql were installed, and also Zend Optimizer. It still crashed.

Because i suspected the problem might be mysql, so i switched to
querying mssql instead. The problem still occurs at the same places.

It is difficult for me to create a simple script to reproduce the
problem, because the bug only happens in my  very complicated script.

- John Lim





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



#22957 [Bgs]: Date output is not correct

2003-03-31 Thread jacques dot daguerre at st dot com
 ID:   22957
 User updated by:  jacques dot daguerre at st dot com
 Reported By:  jacques dot daguerre at st dot com
 Status:   Bogus
 Bug Type: Date/time related
 Operating System: Linux RedHat 6.2/7.3
 PHP Version:  4.3.1
 New Comment:

for the comment of [EMAIL PROTECTED] 

$lastmonth1 = mktime (0,0,0,(date('n')-1),date('j'),date('Y'));
$lastmonth2 = mktime (0,0,0,(date('m')-1),date('d'),date('Y'));

$lastmonth1 and $lastmonth2 are both set to the same value :
1046646000 for today Marh 31st, 2003.

The (date('m')-1) calculation works and mktime() doesn't seem to be
taking the leading 0's into consideration.


Previous Comments:


[2003-03-31 01:14:14] [EMAIL PROTECTED]

Using date('m') and date('d') are wrong as those have the leading zeros
in them. Not bug in PHP.





[2003-03-30 05:59:35] noel at crewe-it-nosp dot co dot uk

I've also hit the problem with mktime giving incorrect results. On
4.3.2-dev it atually returns -3662 as the date value.

Worse though, it returns the same value for 
31st March 2002
28th March 2004 
27th March 2005
26th March 2006

and so on.



[2003-03-30 03:25:45] jacques dot daguerre at st dot com

PHP Bug with mktime ???..
I just checked with 2 different versions of PHP :
PHP 4.1.2 and PHP 4.2.1...
Sorry I have not installed the latest version but I could not find
anything in the changelog either !..

The following code TODAY (only today March 30th, 2003) is not giving
the expected output .

$lastmonth1 = mktime (0,0,0,(date("m")-1),date("d"),date("Y"));
$lastmonth = date ("Y-m-d", $lastmonth1); 

The result of lastmonth should show "2003-02-28" and it shows
"2003-03-02"..

Looks like a bug to me !





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



#22975 [Fbk->Opn]: PHP crashed at/after the 26 system-call

2003-03-31 Thread kju at arcor dot de
 ID:   22975
 User updated by:  kju at arcor dot de
 Reported By:  kju at arcor dot de
-Status:   Feedback
+Status:   Open
 Bug Type: Reproducible crash
 Operating System: Windows NT 4 SP 6a
 PHP Version:  4.3.1
 New Comment:

we have installed the following version (win32):
PHP Version 4.3.2-RC 
Build Date  Mar 31 2003 09:11:59  

No improvements...


Previous Comments:


[2003-03-31 03:34:34] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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



[2003-03-31 03:30:31] kju at arcor dot de

After we have updated the PHP-Version from 4.1 to 4.3.1 we have
reproducable crashes...

In some of our scripts are exec-commands to use system-commands... With
version 4.1 all our scripts were ok...
But after updating the scripts crash at the 26. system-call...

I have a small example here:

--
n=30;
for ($i=0;$i<$n;$i++)
{
   exec("echo $i >> c:\test.log");
}
--

For any n<26 the script is running fine...
But when n=26 and above the script crashes and the last entry in the
test.log-file is "25" (the 26. system-call).

We have tested the system-calls with exec, system and passthru: same
results.
We also have tested many different commands also with commands who
don't use the filesystem, f.e. "ping $ip".

We also have increased the "set_time_limit" up to a very high  value
(much more than we need normally) but the problem is persistent... no
"normal ending"... 




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



#22957 [Bgs]: Date output is not correct

2003-03-31 Thread jacques dot daguerre at st dot com
 ID:   22957
 User updated by:  jacques dot daguerre at st dot com
 Reported By:  jacques dot daguerre at st dot com
 Status:   Bogus
 Bug Type: Date/time related
 Operating System: Linux RedHat 6.2/7.3
 PHP Version:  4.3.1
 New Comment:

It was probably not a bug after all and I probably had my code bugged
for many months without noticing it until yesterday...

I probably misunderstood the way mktime works.
If you a day that is greater than the maximum day of the month, then
mktime will go for the following month:

a date like :
mktime (0,0,0,2,31,2003) will be March 03, 2003 even the month entered
is February. Since Feb 31 doesn't exist it will consider the (31-28)th
day in the following month, and therefore the result of March 03.

The calculation of a date a month ago cannot just simply
be :
$lastmonth1 = mktime (0,0,0,(date('m')-1),date('d'),date('Y'));

I corrected my code to be :

$now1 = mktime (0,0,0,date("m"),date("d"),date("Y"));
$now = date ("Y-m-d", $now1);
$today_day= date ("d", $now1);


$lastmthday = mktime (0,0,0,date('m'),0,date('Y'));
$lastday = date ("d", $lastmthday);

if ( $today_day > $lastday) {$prevd = $lastday; }else{$prevd =
$today_day;}

$lastmonth1 = mktime (0,0,0,(date('m')-1),$prevd,date('Y'));
$lastmonth = date ("Y-m-d", $lastmonth1);

this will calculate also the last day of the previous month and make
the day date of the day will not be a higher number than the last of
the previous month.

This works fine.
I would suggest to post this on the mktime function page as I guess
other people could make the mistake as well.


Previous Comments:


[2003-03-31 04:27:00] jacques dot daguerre at st dot com

for the comment of [EMAIL PROTECTED] 

$lastmonth1 = mktime (0,0,0,(date('n')-1),date('j'),date('Y'));
$lastmonth2 = mktime (0,0,0,(date('m')-1),date('d'),date('Y'));

$lastmonth1 and $lastmonth2 are both set to the same value :
1046646000 for today Marh 31st, 2003.

The (date('m')-1) calculation works and mktime() doesn't seem to be
taking the leading 0's into consideration.



[2003-03-31 01:14:14] [EMAIL PROTECTED]

Using date('m') and date('d') are wrong as those have the leading zeros
in them. Not bug in PHP.





[2003-03-30 05:59:35] noel at crewe-it-nosp dot co dot uk

I've also hit the problem with mktime giving incorrect results. On
4.3.2-dev it atually returns -3662 as the date value.

Worse though, it returns the same value for 
31st March 2002
28th March 2004 
27th March 2005
26th March 2006

and so on.



[2003-03-30 03:25:45] jacques dot daguerre at st dot com

PHP Bug with mktime ???..
I just checked with 2 different versions of PHP :
PHP 4.1.2 and PHP 4.2.1...
Sorry I have not installed the latest version but I could not find
anything in the changelog either !..

The following code TODAY (only today March 30th, 2003) is not giving
the expected output .

$lastmonth1 = mktime (0,0,0,(date("m")-1),date("d"),date("Y"));
$lastmonth = date ("Y-m-d", $lastmonth1); 

The result of lastmonth should show "2003-02-28" and it shows
"2003-03-02"..

Looks like a bug to me !





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



#22976 [NEW]: gmdate()/gmmtime() and date()/mktime() not consistant

2003-03-31 Thread scochrane at mackaysstores dot co dot uk
From: scochrane at mackaysstores dot co dot uk
Operating system: NT4 Server
PHP version:  4.3.0
PHP Bug Type: Date/time related
Bug description:  gmdate()/gmmtime() and date()/mktime() not consistant

I have 2 Servers - 1 has Automatic Daylight Saving on, the other has it
off. Both Servers have same PHP version and O/S (NT4 Server).

When I use this:
echo gmdate("Y-m-d", mktime("last Sunday")); // gmdate

it returns:
2003-03-30 on Server 1 and
2003-03-31 on Server 2

---

when I use this:
echo date("Y-m-d", mktime("last Sunday")); // no gmdate!

it returns:
2003-03-31 on Server 1 and
2003-03-31 on Server 2

---

When I use this:
echo gmdate("Y-m-d", gmmktime("last Sunday")); // gmdate and gmtime!

it returns:
2003-03-31 on Server 1 and
2003-03-30 on Server 2

---

when I use this:
echo date("Y-m-d", gmmktime("last Sunday")); // gmmktime!

it returns:
2003-03-31 on Server 1 and
2003-03-30 on Server 2


So I have used every combination and cannot get both Servers to return the
correct date. I need it to return 2003-03-30 on both Servers - as it
should.

p.s. I cannot just change the 'Automatic Daylight' configuration as I need
it to run in over 250 seperate Servers (they may have different OS
settings)!

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



#22977 [NEW]: png.h

2003-03-31 Thread kuba at 3net dot pl
From: kuba at 3net dot pl
Operating system: RH Linux 7.3
PHP version:  4.3.1
PHP Bug Type: Compile Failure
Bug description:  png.h

confg line
./configure --prefix=/usr --with-config-file-path=/etc --disable-debug
--enable-shared --with-apxs=/usr/sbin/apxs --with-gd --with-jpeg-dir=/usr
--with-png --with-ttf --with-xpm-dir=/usr/lib --enable-gd-native-ttf
--with-zlib=/usr --enable-safe-mode --enable-track-vars --enable-ftp
--with-mysql=/usr/local/mysql --with-dbase --with-gettext

afetr make i got:
/usr/local/etc/php-4.3.1/ext/gd/libgd/gd_png.c:11:67: png.h: No such file
or directory
make: *** [ext/gd/libgd/gd_png.lo] B³¹d 1

i searched entire disk looking for png.h
and didn't find :(

what's the problem?







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



#22957 [Bgs]: Date output is not correct

2003-03-31 Thread mgf
 ID:   22957
 Updated by:   [EMAIL PROTECTED]
 Reported By:  jacques dot daguerre at st dot com
 Status:   Bogus
 Bug Type: Date/time related
 Operating System: Linux RedHat 6.2/7.3
 PHP Version:  4.3.1
 New Comment:

This behaviour is already fully documented at
http://www.php.net/manual/en/function.mktime.php, which also gives a
one-liner for finding the last day of any month (see Example 2).


Previous Comments:


[2003-03-31 05:16:32] jacques dot daguerre at st dot com

It was probably not a bug after all and I probably had my code bugged
for many months without noticing it until yesterday...

I probably misunderstood the way mktime works.
If you a day that is greater than the maximum day of the month, then
mktime will go for the following month:

a date like :
mktime (0,0,0,2,31,2003) will be March 03, 2003 even the month entered
is February. Since Feb 31 doesn't exist it will consider the (31-28)th
day in the following month, and therefore the result of March 03.

The calculation of a date a month ago cannot just simply
be :
$lastmonth1 = mktime (0,0,0,(date('m')-1),date('d'),date('Y'));

I corrected my code to be :

$now1 = mktime (0,0,0,date("m"),date("d"),date("Y"));
$now = date ("Y-m-d", $now1);
$today_day= date ("d", $now1);


$lastmthday = mktime (0,0,0,date('m'),0,date('Y'));
$lastday = date ("d", $lastmthday);

if ( $today_day > $lastday) {$prevd = $lastday; }else{$prevd =
$today_day;}

$lastmonth1 = mktime (0,0,0,(date('m')-1),$prevd,date('Y'));
$lastmonth = date ("Y-m-d", $lastmonth1);

this will calculate also the last day of the previous month and make
the day date of the day will not be a higher number than the last of
the previous month.

This works fine.
I would suggest to post this on the mktime function page as I guess
other people could make the mistake as well.



[2003-03-31 04:27:00] jacques dot daguerre at st dot com

for the comment of [EMAIL PROTECTED] 

$lastmonth1 = mktime (0,0,0,(date('n')-1),date('j'),date('Y'));
$lastmonth2 = mktime (0,0,0,(date('m')-1),date('d'),date('Y'));

$lastmonth1 and $lastmonth2 are both set to the same value :
1046646000 for today Marh 31st, 2003.

The (date('m')-1) calculation works and mktime() doesn't seem to be
taking the leading 0's into consideration.



[2003-03-31 01:14:14] [EMAIL PROTECTED]

Using date('m') and date('d') are wrong as those have the leading zeros
in them. Not bug in PHP.





[2003-03-30 05:59:35] noel at crewe-it-nosp dot co dot uk

I've also hit the problem with mktime giving incorrect results. On
4.3.2-dev it atually returns -3662 as the date value.

Worse though, it returns the same value for 
31st March 2002
28th March 2004 
27th March 2005
26th March 2006

and so on.



[2003-03-30 03:25:45] jacques dot daguerre at st dot com

PHP Bug with mktime ???..
I just checked with 2 different versions of PHP :
PHP 4.1.2 and PHP 4.2.1...
Sorry I have not installed the latest version but I could not find
anything in the changelog either !..

The following code TODAY (only today March 30th, 2003) is not giving
the expected output .

$lastmonth1 = mktime (0,0,0,(date("m")-1),date("d"),date("Y"));
$lastmonth = date ("Y-m-d", $lastmonth1); 

The result of lastmonth should show "2003-02-28" and it shows
"2003-03-02"..

Looks like a bug to me !





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



#22978 [NEW]: (openssl_pkcs7_verify) pem saved into variable

2003-03-31 Thread busia at tiscali dot it
From: busia at tiscali dot it
Operating system: Redhat 7.0
PHP version:  4.3.2RC1
PHP Bug Type: Feature/Change Request
Bug description:  (openssl_pkcs7_verify) pem saved into variable

Is it possible to add an option into "openssl_pkcs7_verify" to save the
store the certificate into a variable instead of into a file? 

I tried:
---
ob_start();
openssl_pkcs7_verify("/home/busia/mail_firmata_mittente_cambiato",
PKCS7_DETACHED, "php://stdout");
$pem=ob_get_contents();
ob_end_clean();
---

But I receive this warning:
---
PHP Warning:  openssl_pkcs7_verify() [function.openssl-pkcs7-verify]:
sign
ature OK, but cannot open php://stdout for writing in
/home/busia/prova2.php on
line 5
---

Writing the file and the reding it seems a waste of resources.

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



#22976 [Opn->Bgs]: gmdate()/gmmtime() and date()/mktime() not consistant

2003-03-31 Thread mgf
 ID:   22976
 Updated by:   [EMAIL PROTECTED]
 Reported By:  scochrane at mackaysstores dot co dot uk
-Status:   Open
+Status:   Bogus
 Bug Type: Date/time related
 Operating System: NT4 Server
 PHP Version:  4.3.0
 New Comment:

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

Thank you for your interest in PHP.

Neither mktime() nor gmmktime() understands arguments like "last
Sunday" -- please go and re-read the documentation for those functions.
 If you have any further questions, please ask them on the php-general
list.


Previous Comments:


[2003-03-31 05:39:46] scochrane at mackaysstores dot co dot uk

I have 2 Servers - 1 has Automatic Daylight Saving on, the other has it
off. Both Servers have same PHP version and O/S (NT4 Server).

When I use this:
echo gmdate("Y-m-d", mktime("last Sunday")); // gmdate

it returns:
2003-03-30 on Server 1 and
2003-03-31 on Server 2

---

when I use this:
echo date("Y-m-d", mktime("last Sunday")); // no gmdate!

it returns:
2003-03-31 on Server 1 and
2003-03-31 on Server 2

---

When I use this:
echo gmdate("Y-m-d", gmmktime("last Sunday")); // gmdate and gmtime!

it returns:
2003-03-31 on Server 1 and
2003-03-30 on Server 2

---

when I use this:
echo date("Y-m-d", gmmktime("last Sunday")); // gmmktime!

it returns:
2003-03-31 on Server 1 and
2003-03-30 on Server 2


So I have used every combination and cannot get both Servers to return
the correct date. I need it to return 2003-03-30 on both Servers - as
it should.

p.s. I cannot just change the 'Automatic Daylight' configuration as I
need it to run in over 250 seperate Servers (they may have different OS
settings)!

Cheers,
Stuart




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



#22978 [Opn]: (openssl_pkcs7_verify) pem saved into variable

2003-03-31 Thread busia at tiscali dot it
 ID:   22978
 User updated by:  busia at tiscali dot it
 Reported By:  busia at tiscali dot it
 Status:   Open
 Bug Type: Feature/Change Request
 Operating System: Redhat 7.0
 PHP Version:  4.3.2RC1
 New Comment:

The problem is also with the input data: I have input data (email
message) in a variable and i have to write them to a file to use this
function.


Previous Comments:


[2003-03-31 05:47:37] busia at tiscali dot it

Is it possible to add an option into "openssl_pkcs7_verify" to save the
store the certificate into a variable instead of into a file? 

I tried:
---
ob_start();
openssl_pkcs7_verify("/home/busia/mail_firmata_mittente_cambiato",
PKCS7_DETACHED, "php://stdout");
$pem=ob_get_contents();
ob_end_clean();
---

But I receive this warning:
---
PHP Warning:  openssl_pkcs7_verify() [function.openssl-pkcs7-verify]:
sign
ature OK, but cannot open php://stdout for writing in
/home/busia/prova2.php on
line 5
---

Writing the file and the reding it seems a waste of resources.

Thanks
Andrea Busia




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



#22358 [Asn->Csd]: it is not possible to open UDP UNIX domain socket using fsockopen()

2003-03-31 Thread wez
 ID:   22358
 Updated by:   [EMAIL PROTECTED]
 Reported By:  joe at ynet dot sk
-Status:   Assigned
+Status:   Closed
 Bug Type: Feature/Change Request
 Operating System: Linux 2.4.20
 PHP Version:  4.3.1
 Assigned To:  wez
 New Comment:

fsockopen("udg://path/to/sock") should work in PHP5 (try the latest
development snapshot if you want to evaluate this).




Previous Comments:


[2003-02-21 17:09:19] [EMAIL PROTECTED]

Status -> Assigned (so that I can find this report later)



[2003-02-21 15:40:21] joe at ynet dot sk

That should be ok ... I've already rewritten my sw using 
unix stream sockets. It would be great to have this stuff 
implemented, since this is the only one of four 
possibilities (tcp/inet, udp/inet, stream/unix, 
datagram/unix) that does not work in fsockopen() and as I 
found out going the other way - socket() - usually 
requires custom build :). 
 
Thnx for fast reply 
Joe



[2003-02-21 15:23:26] [EMAIL PROTECTED]

udp://filename doesn't make sense as udp:// implies a network
connection to a host.

I guess that you are making a feature request for datagram based unix
sockets.

I propose something like this:
// unix datagram socket
$sock = fsockopen("unixdg:///path/to/socket");
// unix stream socket
$sock = fsockopen("unix:///path/to/socket");
$sock = fsockopen("/path/to/socket");

I will implement this for PHP 5.



[2003-02-21 12:14:58] joe at ynet dot sk

I don't know whether this is really bug or "feature" - in later case it
*should* be mentioned in documentation, that unix domain sockets in
fsockopen() are *always* opened using TCP (SOCK_STREAM). I took a look
into sources:

in main/network.c, function _php_stream_sock_open_unix

socketd = socket(PF_UNIX, SOCK_STREAM, 0);

no chance for SOCK_DGRAM ... so something like "udp://filename" won't
work with fsockopen().






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



#22967 [Opn]: "gzuncompress data error" while trying to uncompress TRUE gzip data

2003-03-31 Thread wez
 ID:   22967
 Updated by:   [EMAIL PROTECTED]
 Reported By:  atz at atz dot msk dot ru
 Status:   Open
-Bug Type: Zlib Related
+Bug Type: Feature/Change Request
 Operating System: FreeBSD 5.0-RELEASE
 PHP Version:  4CVS-2003-03-30 (stable)
 New Comment:

the gzuncompress() function expects to decompress the header-less data
generated by gzcompress().

The workaround is to write to a temp file and read it in, or you could
just cut-off the gzip header and try gzuncompress. (the header is
usually 10 bytes in length, so gzuncompress(substr($Data,10)) might
work).

It looks like you need the opposite of gzencode(), which can will
correctly deal with this.


Previous Comments:


[2003-03-30 14:57:44] atz at atz dot msk dot ru

I'am trying to fetch data with fsockopen and etc.
from URL
http://suncity.combats.ru/inf.pl?login=atz
OR
http://capitalcity.combats.ru/inf.pl?login=atz

And as result in variable named $Data i have a compressed
gzip data from that url with "Content-encoding: gzip".

But! When i try to 
gzuncompress($Data) 
the php returns
Warning: gzuncompress(): data error 

gzinflate($Data)
Warning: gzinflate(): data error 

I'm try to do following:

$fp = fopen("gzipped","w");
fwrite($fp, $Data, strlen($Data));
fclose($fp);

$buffer = "";
$gzfp = gzopen("gzipped","r");
while (!gzeof($gzfp)) {
 $buffer .= gzread($gzfp, 1024);
}
gzclose($gzfp);

And as result i have normal UNCOMPRESSED data 
in varaiable named $buffer.

Why gzuncompress do not uncompress $Data while
gzopen do this success?

Is this a bug?





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



#22787 [Bgs->Opn]: Make fails after upgrading to mysql v4.0.12

2003-03-31 Thread gregory dot fennell at am dot sony dot com
 ID:   22787
 User updated by:  gregory dot fennell at am dot sony dot com
 Reported By:  gregory dot fennell at am dot sony dot com
-Status:   Bogus
+Status:   Open
 Bug Type: MySQL related
 Operating System: RedHat v8.0
 PHP Version:  4.3.1
 Assigned To:  sniper
 New Comment:

Since this has been confirmed by several of my colleges and the post
from "jbernier at dalcom dot ca" as a real issue, I have re-opened this
ticket.  Please see if there is a fix for this issue, or if we need to
change our config.  I have confirmed this with 5 of my colleges.


Previous Comments:


[2003-03-28 15:18:18] jbernier at dalcom dot ca

I have exactly the same problems. Is anybody found a solution. My
websites stop working after upgrading to MySQL 4.0.12. Please help.



[2003-03-21 14:25:51] gregory dot fennell at am dot sony dot com

I am using the same confige statement for the 4.0.12 installation as I
am for the 3.23.55-1 in my php config.  I am at a loss since I have
noticed this on 5 machines now all have different hardware, the only
thing that is similar is the kernel, php, openssl, and mysql.

When I install 4.0.12 (MySQL) i can't even use the natice mysql support
built into php.  Any ideas to see what's up?



[2003-03-21 14:16:03] paul at rydell dot com

PHP 4.3.1 works for me with MySQL 4.0.12. I have the RPMs of MySQL
installed and I compiled PHP 4.3.1 from source. No problems.

Maybe your --with-mysql path is wrong.



[2003-03-21 13:39:45] gregory dot fennell at am dot sony dot com

I find this really hard to believe since this has happened on several
of our test machines.  I am using the RPM distro of MySQL and simple
configs for PHP as you can see above.  So to call this ticket "bogus" I
think is premature, but your call.  Hope you don't see any more of
these issues in the future!

p.s.: I am not an amature in the Linux world and I know how to
configure a system so the statement "if everything is installed
correctly" wasn't really necessary.  I posted this to be a help, not to
be belittled.



[2003-03-20 17:04:54] [EMAIL PROTECTED]

Just tested this myself, if everything is installed correctly, PHP
4.3.x compiles and works fine with Mysql 4.0.x.





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

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



#15415 [Com]: [VOTE] case sensitive function/class names for PHP5

2003-03-31 Thread rich at kastle dot com
 ID:   15415
 Comment by:   rich at kastle dot com
 Reported By:  [EMAIL PROTECTED]
 Status:   Bogus
 Bug Type: Feature/Change Request
 Operating System: ANY
 PHP Version:  PHP 5.0
 New Comment:

NO


Previous Comments:


[2003-03-30 16:40:59] moxley at moxleydata dot com

YES



[2003-03-30 06:16:10] ondrej at kmit dot sk

YES



[2003-01-20 08:20:01] mex at ecstasy dot sk

NO



[2002-02-08 14:32:24] diogo at sphynx dot com dot br

Yes.



[2002-02-08 11:09:36] [EMAIL PROTECTED]

No



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

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



#22979 [NEW]: session index names and same name variables prob even with register_globals off

2003-03-31 Thread mailinglist dot phpnet at hydras-world dot com
From: mailinglist dot phpnet at hydras-world dot com
Operating system: *nix
PHP version:  4.3.1
PHP Bug Type: Variables related
Bug description:  session index names and same name variables prob even with 
register_globals off

I wasn't using session_register to register global variables in my code and
all session access was through $_SESSION[] so the "register_globals = off"
setting shouldn't affect my code, but it did!

I wrote all my code with the knowledge that register_globals defaults to
OFF on most web-servers and that having the setting off is also more
secure.

The problem comes about when having variable names the same as index names
in the $_SESSION array and when they're not supposed to be set to the same
thing.

e.g.

$ordernumber = $_SESSION['ordernumber'];
$ordernumber++;

This would have the effect of doing this too:
$_SESSION['ordernumber']++;

Not good!

The solution however was quite simple, and I just used upper case names as
my $_SESSION index names.

so $_SESSION['ordernumber'] now becomes $_SESSION['ORDERNUMBER'].

I've confirmed this to be a bug on the *nix webserver that my ISP uses,
but can't reproduce it with a default install in php 4.2.3 and 4.3.1 on my
WinXP IIS5.1 setup.

To help you out, I added a php script to a test site that shows the
problem, along with the output of a phpinfo() call.

Here's the script:

 SCRIPT START 




";

$_SESSION['ordernumber'] = 5;
$ordernumber = $_SESSION['ordernumber'];

echo "ordernumber = $ordernumber";
echo "Session Before: "; var_dump($_SESSION); echo "";

$ordernumber++;

echo "ordernumber = $ordernumber";
echo "Session After: "; var_dump($_SESSION); echo "";

?>
PhpInfo: 



 SCRIPT END 

When the script is run on the ISP's web server this is the output:

Session Now: array(1) { ["ordernumber"]=> &int(6) } 
ordernumber = 5
Session Before: array(1) { ["ordernumber"]=> &int(5) } 
ordernumber = 6
Session After: array(1) { ["ordernumber"]=> &int(6) } 

Notice the int(6) on the line above - BAD!

When the script is run on my system this is the output:

Session Now: array(1) { ["ordernumber"]=> int(5) } 
ordernumber = 5
Session Before: array(1) { ["ordernumber"]=> int(5) } 
ordernumber = 6
Session After: array(1) { ["ordernumber"]=> int(5) } 

Notice the int(5) on the line above! - CORRECT!

here's a link to the script, so you can test it for yourselves:

http://www.loudretail.com/sessionproblem.php


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



#22979 [Opn->Bgs]: session index names and same name variables prob even with register_globals off

2003-03-31 Thread rioter
 ID:   22979
 Updated by:   [EMAIL PROTECTED]
 Reported By:  mailinglist dot phpnet at hydras-world dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Variables related
 Operating System: *nix
 PHP Version:  4.3.1
 New Comment:

as you can see register globals is on in your php.ini
as its not a bug in php its self marking as bogus





Previous Comments:


[2003-03-31 07:22:37] mailinglist dot phpnet at hydras-world dot com

I wasn't using session_register to register global variables in my code
and all session access was through $_SESSION[] so the "register_globals
= off" setting shouldn't affect my code, but it did!

I wrote all my code with the knowledge that register_globals defaults
to OFF on most web-servers and that having the setting off is also more
secure.

The problem comes about when having variable names the same as index
names in the $_SESSION array and when they're not supposed to be set to
the same thing.

e.g.

$ordernumber = $_SESSION['ordernumber'];
$ordernumber++;

This would have the effect of doing this too:
$_SESSION['ordernumber']++;

Not good!

The solution however was quite simple, and I just used upper case names
as my $_SESSION index names.

so $_SESSION['ordernumber'] now becomes $_SESSION['ORDERNUMBER'].

I've confirmed this to be a bug on the *nix webserver that my ISP uses,
but can't reproduce it with a default install in php 4.2.3 and 4.3.1 on
my WinXP IIS5.1 setup.

To help you out, I added a php script to a test site that shows the
problem, along with the output of a phpinfo() call.

Here's the script:

 SCRIPT START 




";

$_SESSION['ordernumber'] = 5;
$ordernumber = $_SESSION['ordernumber'];

echo "ordernumber = $ordernumber";
echo "Session Before: "; var_dump($_SESSION); echo "";

$ordernumber++;

echo "ordernumber = $ordernumber";
echo "Session After: "; var_dump($_SESSION); echo "";

?>
PhpInfo: 



 SCRIPT END 

When the script is run on the ISP's web server this is the output:

Session Now: array(1) { ["ordernumber"]=> &int(6) } 
ordernumber = 5
Session Before: array(1) { ["ordernumber"]=> &int(5) } 
ordernumber = 6
Session After: array(1) { ["ordernumber"]=> &int(6) } 

Notice the int(6) on the line above - BAD!

When the script is run on my system this is the output:

Session Now: array(1) { ["ordernumber"]=> int(5) } 
ordernumber = 5
Session Before: array(1) { ["ordernumber"]=> int(5) } 
ordernumber = 6
Session After: array(1) { ["ordernumber"]=> int(5) } 

Notice the int(5) on the line above! - CORRECT!

here's a link to the script, so you can test it for yourselves:

http://www.loudretail.com/sessionproblem.php






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



#22979 [Bgs]: session index names and same name variables prob even with register_globals off

2003-03-31 Thread mailinglist dot phpnet at hydras-world dot com
 ID:   22979
 User updated by:  mailinglist dot phpnet at hydras-world dot com
 Reported By:  mailinglist dot phpnet at hydras-world dot com
 Status:   Bogus
 Bug Type: Variables related
 Operating System: *nix
 PHP Version:  4.3.1
 New Comment:

My ISP told my it was OFF, so i took them at their word.  I just
noticed this myself and was heading back here to cancel this bug
report.

Apologies


Previous Comments:


[2003-03-31 07:32:05] [EMAIL PROTECTED]

as you can see register globals is on in your php.ini
as its not a bug in php its self marking as bogus






[2003-03-31 07:22:37] mailinglist dot phpnet at hydras-world dot com

I wasn't using session_register to register global variables in my code
and all session access was through $_SESSION[] so the "register_globals
= off" setting shouldn't affect my code, but it did!

I wrote all my code with the knowledge that register_globals defaults
to OFF on most web-servers and that having the setting off is also more
secure.

The problem comes about when having variable names the same as index
names in the $_SESSION array and when they're not supposed to be set to
the same thing.

e.g.

$ordernumber = $_SESSION['ordernumber'];
$ordernumber++;

This would have the effect of doing this too:
$_SESSION['ordernumber']++;

Not good!

The solution however was quite simple, and I just used upper case names
as my $_SESSION index names.

so $_SESSION['ordernumber'] now becomes $_SESSION['ORDERNUMBER'].

I've confirmed this to be a bug on the *nix webserver that my ISP uses,
but can't reproduce it with a default install in php 4.2.3 and 4.3.1 on
my WinXP IIS5.1 setup.

To help you out, I added a php script to a test site that shows the
problem, along with the output of a phpinfo() call.

Here's the script:

 SCRIPT START 




";

$_SESSION['ordernumber'] = 5;
$ordernumber = $_SESSION['ordernumber'];

echo "ordernumber = $ordernumber";
echo "Session Before: "; var_dump($_SESSION); echo "";

$ordernumber++;

echo "ordernumber = $ordernumber";
echo "Session After: "; var_dump($_SESSION); echo "";

?>
PhpInfo: 



 SCRIPT END 

When the script is run on the ISP's web server this is the output:

Session Now: array(1) { ["ordernumber"]=> &int(6) } 
ordernumber = 5
Session Before: array(1) { ["ordernumber"]=> &int(5) } 
ordernumber = 6
Session After: array(1) { ["ordernumber"]=> &int(6) } 

Notice the int(6) on the line above - BAD!

When the script is run on my system this is the output:

Session Now: array(1) { ["ordernumber"]=> int(5) } 
ordernumber = 5
Session Before: array(1) { ["ordernumber"]=> int(5) } 
ordernumber = 6
Session After: array(1) { ["ordernumber"]=> int(5) } 

Notice the int(5) on the line above! - CORRECT!

here's a link to the script, so you can test it for yourselves:

http://www.loudretail.com/sessionproblem.php






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



#22976 [Bgs->Opn]: gmdate/date and strtotime/mktime not consistant

2003-03-31 Thread scochrane at mackaysstores dot co dot uk
 ID:   22976
 User updated by:  scochrane at mackaysstores dot co dot uk
-Summary:  gmdate()/gmmtime() and date()/mktime() not consistant
 Reported By:  scochrane at mackaysstores dot co dot uk
-Status:   Bogus
+Status:   Open
 Bug Type: Date/time related
 Operating System: NT4 Server
 PHP Version:  4.3.0
 New Comment:

By substituting mktime() with strtotime() has the same problem.

On the strtotime page of the manual - one of the examples given states
'echo strtotime ("last Monday"), "\n";' - so I beleave my sytax is
valid.

With my script ammended to be valid (as below) I think this is a bug.

function last_sunday() {
return gmdate("Y-m-d", strtotime("Last Sunday"));
}
echo "Last Sunday is returned as: ".last_sunday();

With Daylight saving on the above = 2003-03-29
With Daylight saving off the above = 2003-03-30

I have also use the GMT keyword with strtotime(), but this fails also.


Previous Comments:


[2003-03-31 05:51:58] [EMAIL PROTECTED]

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

Thank you for your interest in PHP.

Neither mktime() nor gmmktime() understands arguments like "last
Sunday" -- please go and re-read the documentation for those functions.
 If you have any further questions, please ask them on the php-general
list.



[2003-03-31 05:39:46] scochrane at mackaysstores dot co dot uk

I have 2 Servers - 1 has Automatic Daylight Saving on, the other has it
off. Both Servers have same PHP version and O/S (NT4 Server).

When I use this:
echo gmdate("Y-m-d", mktime("last Sunday")); // gmdate

it returns:
2003-03-30 on Server 1 and
2003-03-31 on Server 2

---

when I use this:
echo date("Y-m-d", mktime("last Sunday")); // no gmdate!

it returns:
2003-03-31 on Server 1 and
2003-03-31 on Server 2

---

When I use this:
echo gmdate("Y-m-d", gmmktime("last Sunday")); // gmdate and gmtime!

it returns:
2003-03-31 on Server 1 and
2003-03-30 on Server 2

---

when I use this:
echo date("Y-m-d", gmmktime("last Sunday")); // gmmktime!

it returns:
2003-03-31 on Server 1 and
2003-03-30 on Server 2


So I have used every combination and cannot get both Servers to return
the correct date. I need it to return 2003-03-30 on both Servers - as
it should.

p.s. I cannot just change the 'Automatic Daylight' configuration as I
need it to run in over 250 seperate Servers (they may have different OS
settings)!

Cheers,
Stuart




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



#19601 [Com]: snmp_set_quick_print doesn't work

2003-03-31 Thread domi at saargate dot de
 ID:   19601
 Comment by:   domi at saargate dot de
 Reported By:  cbowman at amtelecom dot ca
 Status:   No Feedback
 Bug Type: SNMP related
 Operating System: RedHat Linux 7.3
 PHP Version:  4.2.1
 New Comment:

I don't think this is a bug, neither in PHP or in the UCD SNMP library.
Maybe the behaviour of the latter has changed between 4.2.3 and 4.2.5 -
there were a lot of changes between the two versions, as far as I can
know.

Apart from the "quick print" option, the SNMP API supports another
option, which is described in the snmpcmd(1) manual page:

   -OvOutput only the variable value, not the OID:
  snmpget -c public -Ov localhost ip.ipForwarding.0
  forwarding(1)

Avoiding to print the OID is probably the problem stated in this case.

I managed to add two new functions to PHP 4.2.3 in order to toggle the
value of this options (internally it is called "bare value"). They can
be used just as snmp_[sg]et_quick_print() can be used:

diff -urN php-4.2.3.orig/ext/snmp/php_snmp.h
php-4.2.3/ext/snmp/php_snmp.h
--- php-4.2.3.orig/ext/snmp/php_snmp.h  Thu Feb 28 09:26:42 2002
+++ php-4.2.3/ext/snmp/php_snmp.h   Mon Mar 31 16:36:22 2003
@@ -34,6 +34,8 @@
 PHP_FUNCTION(snmpget);
 PHP_FUNCTION(snmpwalk);
 PHP_FUNCTION(snmprealwalk);
+PHP_FUNCTION(snmp_get_bare_value);
+PHP_FUNCTION(snmp_set_bare_value);
 PHP_FUNCTION(snmp_get_quick_print);
 PHP_FUNCTION(snmp_set_quick_print);
 PHP_FUNCTION(snmpset);
diff -urN php-4.2.3.orig/ext/snmp/snmp.c php-4.2.3/ext/snmp/snmp.c
--- php-4.2.3.orig/ext/snmp/snmp.c  Fri Mar  1 04:31:01 2002
+++ php-4.2.3/ext/snmp/snmp.c   Mon Mar 31 16:36:26 2003
@@ -88,6 +88,8 @@
PHP_FALIAS(snmpwalkoid, snmprealwalk, NULL)
PHP_FE(snmp_get_quick_print, NULL)
PHP_FE(snmp_set_quick_print, NULL)
+   PHP_FE(snmp_get_bare_value, NULL)
+   PHP_FE(snmp_set_bare_value, NULL)
PHP_FE(snmpset, NULL)
 {NULL,NULL,NULL}
 };
@@ -433,6 +435,32 @@
 }
 /* }}} */
 
+/* {{{ proto bool snmp_get_bare_value(void)
+   Return the current status of bare_value */
+PHP_FUNCTION(snmp_get_bare_value)
+{
+   if (ZEND_NUM_ARGS() != 0) {
+   WRONG_PARAM_COUNT;
+   }
+
+   RETURN_LONG(ds_get_boolean(DS_LIBRARY_ID, DS_LIB_PRINT_BARE_VALUE) ?
1 : 0);
+}
+/* }}} */
+
+/* {{{ proto void snmp_set_bare_value(int bare_value)
+   Set the current status of bare_value */
+PHP_FUNCTION(snmp_set_bare_value)
+{
+   int argc = ZEND_NUM_ARGS();
+   long a1;
+
+   if (zend_parse_parameters(argc TSRMLS_CC, "l", &a1) == FAILURE) {
+   return;
+   }
+
+   ds_set_boolean(DS_LIBRARY_ID, DS_LIB_PRINT_BARE_VALUE, (int)a1);
+}
+/* }}} */
 /* {{{ proto int snmpset(string host, string community, string
object_id, string type, mixed value [, int timeout [, int retries]]) 
Set the value of a SNMP object */
 PHP_FUNCTION(snmpset)


Previous Comments:


[2002-11-01 01:00:04] php-bugs at lists dot php dot net

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



[2002-10-16 21:53:54] [EMAIL PROTECTED]

Basically: snmp_set_quick_print(1) just makes the ucd-snmp library to
return less informative values, so the snmp_set_quick_print() obviously
works for you since the output changes. But there indeed might be some
bug in the ucd-snmp libs. At least ucd-snmp-4.2.6 and net-snmp-5.0.6
behave differently.

I suggest you try the latest CVS snapshot of PHP with net-snmp-5.0.6.




[2002-10-16 18:34:07] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2002-09-25 13:54:11] cbowman at amtelecom dot ca

OS:  RedHat Linux 7.3 (Linux version 2.4.18-10) i386
PHP RPM:  php-4.1.2-7.3.4
PHP SNMP RPM:  php-snmp-4.1.2-7.3.4
UCD SNMP RPM:  ucd-snmp-4.2.5-7.73.0


Basically, all this fuction will do is remove the "=" sign between the
OID & the value.

ie.. 
snmp_set_quick_print(0)
69.1.3.5.0 = "2.1.1.107.004"

OR

snmp_set_quick_print(1)
69.1.3.5.0 "2.1.1.107.004"

I'm not sure why this happens, perhaps it is a bug in UCD & not PHP.

Any help appreciated.






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



#22981 [NEW]: ] Problem with "=& new" and locally created instances

2003-03-31 Thread Jens dot Pilgrim at xx-well dot com
From: Jens dot Pilgrim at xx-well dot com
Operating system: Windows 2000
PHP version:  4.3.0
PHP Bug Type: Reproducible crash
Bug description:  ] Problem with "=& new" and locally created instances

Hi,

I've got a problem with the "=& new" construct. A code sample tells more
than 1000 words:



This code is running like that and demonstrates exactly the "weird"
behaviour.
Running this example, the variable $g_fooInstance is null in function
main(). But why? Is the reference to the constructed object descructed
after leaving the scope of function factory::factory()? Or in other words,
are locally created instances always destructed, regardless if there are
other references on the instance?

I've posted this bug as a question in the general mailing list (on Fr
03/28/2003), and others tested and reproduced this bug too...

Regards,

jens


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



#22858 [NoF->Opn]: file function fails to open relative file names...

2003-03-31 Thread excalibur at hub dot org
 ID:   22858
 User updated by:  excalibur at hub dot org
 Reported By:  excalibur at hub dot org
-Status:   No Feedback
+Status:   Open
 Bug Type: Filesystem function related
 Operating System: FreeBSD 4.8-RC
 PHP Version:  4.3.1
 New Comment:

Hi Guy's, 

 Sorry I was unavailable for a bit there, at this time I do not have
the option of testing with the RC version of PHP. I will see what I can
go about finding an alternative area to test this out.


Previous Comments:


[2003-03-31 02:00:17] [EMAIL PROTECTED]

No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.





[2003-03-24 17:37:06] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2003-03-24 14:38:34] excalibur at hub dot org

Hi Guy's, 


 Got an issue that appears to be related to some other functions but as
this one is specific to a function I figured it's due it's own bug
posting. Ran into an issue where file() does not open relative file
names, for instance:

$words_file = "./config/filter.txt";
if (@is_readable($words_file)) {
 /* Read the file and iterate through the lines. */
 $lines = file($words_file);
 foreach ($lines as $line) {
  print $line."";
 }
}

 I get:

 Warning: file(./config/filter.txt) [function.file]: failed to create
stream: No such file or directory in
/usr/local/www/test.com/horde/lib/Text.php on line 41

Warning: Invalid argument supplied for foreach() in
/usr/local/www/test.com/horde/lib/Text.php on line 42

 Yet if I specify the full path to the very same file, it works fine:

$words_file = "/usr/local/www/test.com/horde/imp/config/filter.txt";
if (@is_readable($words_file)) {
 /* Read the file and iterate through the lines. */
 $lines = file($words_file);
 foreach ($lines as $line) {
  print $line."";
 }
}

The is_readable sees the file fine, but file itself fails.





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



#22957 [Bgs]: Date output is not correct

2003-03-31 Thread rasmus
 ID:   22957
 Updated by:   [EMAIL PROTECTED]
 Reported By:  jacques dot daguerre at st dot com
 Status:   Bogus
 Bug Type: Date/time related
 Operating System: Linux RedHat 6.2/7.3
 PHP Version:  4.3.1
 New Comment:

There is no bug here.  You are asking for the timestamp for February
31st.  What is it supposed to do?  Read your mind and figure out you
want the last day of February?  That's impossible.  It does the only
sensible thing and gives you the actual date 31 days beyond Feb.1.  If
you want the last day of a month, get the 1st of the following month
and subtract a day.


Previous Comments:


[2003-03-31 05:43:38] [EMAIL PROTECTED]

This behaviour is already fully documented at
http://www.php.net/manual/en/function.mktime.php, which also gives a
one-liner for finding the last day of any month (see Example 2).



[2003-03-31 05:16:32] jacques dot daguerre at st dot com

It was probably not a bug after all and I probably had my code bugged
for many months without noticing it until yesterday...

I probably misunderstood the way mktime works.
If you a day that is greater than the maximum day of the month, then
mktime will go for the following month:

a date like :
mktime (0,0,0,2,31,2003) will be March 03, 2003 even the month entered
is February. Since Feb 31 doesn't exist it will consider the (31-28)th
day in the following month, and therefore the result of March 03.

The calculation of a date a month ago cannot just simply
be :
$lastmonth1 = mktime (0,0,0,(date('m')-1),date('d'),date('Y'));

I corrected my code to be :

$now1 = mktime (0,0,0,date("m"),date("d"),date("Y"));
$now = date ("Y-m-d", $now1);
$today_day= date ("d", $now1);


$lastmthday = mktime (0,0,0,date('m'),0,date('Y'));
$lastday = date ("d", $lastmthday);

if ( $today_day > $lastday) {$prevd = $lastday; }else{$prevd =
$today_day;}

$lastmonth1 = mktime (0,0,0,(date('m')-1),$prevd,date('Y'));
$lastmonth = date ("Y-m-d", $lastmonth1);

this will calculate also the last day of the previous month and make
the day date of the day will not be a higher number than the last of
the previous month.

This works fine.
I would suggest to post this on the mktime function page as I guess
other people could make the mistake as well.



[2003-03-31 04:27:00] jacques dot daguerre at st dot com

for the comment of [EMAIL PROTECTED] 

$lastmonth1 = mktime (0,0,0,(date('n')-1),date('j'),date('Y'));
$lastmonth2 = mktime (0,0,0,(date('m')-1),date('d'),date('Y'));

$lastmonth1 and $lastmonth2 are both set to the same value :
1046646000 for today Marh 31st, 2003.

The (date('m')-1) calculation works and mktime() doesn't seem to be
taking the leading 0's into consideration.



[2003-03-31 01:14:14] [EMAIL PROTECTED]

Using date('m') and date('d') are wrong as those have the leading zeros
in them. Not bug in PHP.





[2003-03-30 05:59:35] noel at crewe-it-nosp dot co dot uk

I've also hit the problem with mktime giving incorrect results. On
4.3.2-dev it atually returns -3662 as the date value.

Worse though, it returns the same value for 
31st March 2002
28th March 2004 
27th March 2005
26th March 2006

and so on.



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

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



#22976 [Opn->Bgs]: gmdate/date and strtotime/mktime not consistant

2003-03-31 Thread rasmus
 ID:   22976
 Updated by:   [EMAIL PROTECTED]
 Reported By:  scochrane at mackaysstores dot co dot uk
-Status:   Open
+Status:   Bogus
 Bug Type: Date/time related
 Operating System: NT4 Server
 PHP Version:  4.3.0
 New Comment:

strtotime() uses the local timezone adjusted time unless you stick
"GMT" at the end.  Try this:

echo date("H:i:s D M d, Y",strtotime("Last Sunday GMT"));
echo date("H:i:s D M d, Y",strtotime("Last Sunday"));

I am in PDT and right now this gives me:

16:00:00 Sat Mar 29, 2003
00:00:00 Sun Mar 30, 2003

which shows that strtotime adjusts for GMT correctly.  Midnight last
Sunday in GMT was actually Saturday in my timezone as GMT is 8 hours
ahead of me, so it gave me 4pm Saturday.  And when I pass it "Last
Sunday" without the GMT, which means I am asking for midnight last
sunday in my own timezone, I get exactly that.


Previous Comments:


[2003-03-31 08:21:28] scochrane at mackaysstores dot co dot uk

By substituting mktime() with strtotime() has the same problem.

On the strtotime page of the manual - one of the examples given states
'echo strtotime ("last Monday"), "\n";' - so I beleave my sytax is
valid.

With my script ammended to be valid (as below) I think this is a bug.

function last_sunday() {
return gmdate("Y-m-d", strtotime("Last Sunday"));
}
echo "Last Sunday is returned as: ".last_sunday();

With Daylight saving on the above = 2003-03-29
With Daylight saving off the above = 2003-03-30

I have also use the GMT keyword with strtotime(), but this fails also.



[2003-03-31 05:51:58] [EMAIL PROTECTED]

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

Thank you for your interest in PHP.

Neither mktime() nor gmmktime() understands arguments like "last
Sunday" -- please go and re-read the documentation for those functions.
 If you have any further questions, please ask them on the php-general
list.



[2003-03-31 05:39:46] scochrane at mackaysstores dot co dot uk

I have 2 Servers - 1 has Automatic Daylight Saving on, the other has it
off. Both Servers have same PHP version and O/S (NT4 Server).

When I use this:
echo gmdate("Y-m-d", mktime("last Sunday")); // gmdate

it returns:
2003-03-30 on Server 1 and
2003-03-31 on Server 2

---

when I use this:
echo date("Y-m-d", mktime("last Sunday")); // no gmdate!

it returns:
2003-03-31 on Server 1 and
2003-03-31 on Server 2

---

When I use this:
echo gmdate("Y-m-d", gmmktime("last Sunday")); // gmdate and gmtime!

it returns:
2003-03-31 on Server 1 and
2003-03-30 on Server 2

---

when I use this:
echo date("Y-m-d", gmmktime("last Sunday")); // gmmktime!

it returns:
2003-03-31 on Server 1 and
2003-03-30 on Server 2


So I have used every combination and cannot get both Servers to return
the correct date. I need it to return 2003-03-30 on both Servers - as
it should.

p.s. I cannot just change the 'Automatic Daylight' configuration as I
need it to run in over 250 seperate Servers (they may have different OS
settings)!

Cheers,
Stuart




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



#22957 [Bgs->Csd]: Date output is not correct

2003-03-31 Thread jacques dot daguerre at st dot com
 ID:   22957
 User updated by:  jacques dot daguerre at st dot com
 Reported By:  jacques dot daguerre at st dot com
-Status:   Bogus
+Status:   Closed
 Bug Type: Date/time related
 Operating System: Linux RedHat 6.2/7.3
 PHP Version:  4.3.1
 New Comment:

The case is closed


Previous Comments:


[2003-03-31 09:25:34] [EMAIL PROTECTED]

There is no bug here.  You are asking for the timestamp for February
31st.  What is it supposed to do?  Read your mind and figure out you
want the last day of February?  That's impossible.  It does the only
sensible thing and gives you the actual date 31 days beyond Feb.1.  If
you want the last day of a month, get the 1st of the following month
and subtract a day.



[2003-03-31 05:43:38] [EMAIL PROTECTED]

This behaviour is already fully documented at
http://www.php.net/manual/en/function.mktime.php, which also gives a
one-liner for finding the last day of any month (see Example 2).



[2003-03-31 05:16:32] jacques dot daguerre at st dot com

It was probably not a bug after all and I probably had my code bugged
for many months without noticing it until yesterday...

I probably misunderstood the way mktime works.
If you a day that is greater than the maximum day of the month, then
mktime will go for the following month:

a date like :
mktime (0,0,0,2,31,2003) will be March 03, 2003 even the month entered
is February. Since Feb 31 doesn't exist it will consider the (31-28)th
day in the following month, and therefore the result of March 03.

The calculation of a date a month ago cannot just simply
be :
$lastmonth1 = mktime (0,0,0,(date('m')-1),date('d'),date('Y'));

I corrected my code to be :

$now1 = mktime (0,0,0,date("m"),date("d"),date("Y"));
$now = date ("Y-m-d", $now1);
$today_day= date ("d", $now1);


$lastmthday = mktime (0,0,0,date('m'),0,date('Y'));
$lastday = date ("d", $lastmthday);

if ( $today_day > $lastday) {$prevd = $lastday; }else{$prevd =
$today_day;}

$lastmonth1 = mktime (0,0,0,(date('m')-1),$prevd,date('Y'));
$lastmonth = date ("Y-m-d", $lastmonth1);

this will calculate also the last day of the previous month and make
the day date of the day will not be a higher number than the last of
the previous month.

This works fine.
I would suggest to post this on the mktime function page as I guess
other people could make the mistake as well.



[2003-03-31 04:27:00] jacques dot daguerre at st dot com

for the comment of [EMAIL PROTECTED] 

$lastmonth1 = mktime (0,0,0,(date('n')-1),date('j'),date('Y'));
$lastmonth2 = mktime (0,0,0,(date('m')-1),date('d'),date('Y'));

$lastmonth1 and $lastmonth2 are both set to the same value :
1046646000 for today Marh 31st, 2003.

The (date('m')-1) calculation works and mktime() doesn't seem to be
taking the leading 0's into consideration.



[2003-03-31 01:14:14] [EMAIL PROTECTED]

Using date('m') and date('d') are wrong as those have the leading zeros
in them. Not bug in PHP.





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

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



#22957 [Csd->Bgs]: Date output is not correct

2003-03-31 Thread rasmus
 ID:   22957
 Updated by:   [EMAIL PROTECTED]
 Reported By:  jacques dot daguerre at st dot com
-Status:   Closed
+Status:   Bogus
 Bug Type: Date/time related
 Operating System: Linux RedHat 6.2/7.3
 PHP Version:  4.3.1
 New Comment:

"Closed" means we fixed something.  There was never anything to fix
here, hence Bogus.


Previous Comments:


[2003-03-31 09:43:18] jacques dot daguerre at st dot com

The case is closed



[2003-03-31 09:25:34] [EMAIL PROTECTED]

There is no bug here.  You are asking for the timestamp for February
31st.  What is it supposed to do?  Read your mind and figure out you
want the last day of February?  That's impossible.  It does the only
sensible thing and gives you the actual date 31 days beyond Feb.1.  If
you want the last day of a month, get the 1st of the following month
and subtract a day.



[2003-03-31 05:43:38] [EMAIL PROTECTED]

This behaviour is already fully documented at
http://www.php.net/manual/en/function.mktime.php, which also gives a
one-liner for finding the last day of any month (see Example 2).



[2003-03-31 05:16:32] jacques dot daguerre at st dot com

It was probably not a bug after all and I probably had my code bugged
for many months without noticing it until yesterday...

I probably misunderstood the way mktime works.
If you a day that is greater than the maximum day of the month, then
mktime will go for the following month:

a date like :
mktime (0,0,0,2,31,2003) will be March 03, 2003 even the month entered
is February. Since Feb 31 doesn't exist it will consider the (31-28)th
day in the following month, and therefore the result of March 03.

The calculation of a date a month ago cannot just simply
be :
$lastmonth1 = mktime (0,0,0,(date('m')-1),date('d'),date('Y'));

I corrected my code to be :

$now1 = mktime (0,0,0,date("m"),date("d"),date("Y"));
$now = date ("Y-m-d", $now1);
$today_day= date ("d", $now1);


$lastmthday = mktime (0,0,0,date('m'),0,date('Y'));
$lastday = date ("d", $lastmthday);

if ( $today_day > $lastday) {$prevd = $lastday; }else{$prevd =
$today_day;}

$lastmonth1 = mktime (0,0,0,(date('m')-1),$prevd,date('Y'));
$lastmonth = date ("Y-m-d", $lastmonth1);

this will calculate also the last day of the previous month and make
the day date of the day will not be a higher number than the last of
the previous month.

This works fine.
I would suggest to post this on the mktime function page as I guess
other people could make the mistake as well.



[2003-03-31 04:27:00] jacques dot daguerre at st dot com

for the comment of [EMAIL PROTECTED] 

$lastmonth1 = mktime (0,0,0,(date('n')-1),date('j'),date('Y'));
$lastmonth2 = mktime (0,0,0,(date('m')-1),date('d'),date('Y'));

$lastmonth1 and $lastmonth2 are both set to the same value :
1046646000 for today Marh 31st, 2003.

The (date('m')-1) calculation works and mktime() doesn't seem to be
taking the leading 0's into consideration.



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

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



#22957 [Bgs]: Date output is not correct

2003-03-31 Thread jacques dot daguerre at st dot com
 ID:   22957
 User updated by:  jacques dot daguerre at st dot com
 Reported By:  jacques dot daguerre at st dot com
 Status:   Bogus
 Bug Type: Date/time related
 Operating System: Linux RedHat 6.2/7.3
 PHP Version:  4.3.1
 New Comment:

Could you please stop adding to this !


Previous Comments:


[2003-03-31 09:44:08] [EMAIL PROTECTED]

"Closed" means we fixed something.  There was never anything to fix
here, hence Bogus.



[2003-03-31 09:43:18] jacques dot daguerre at st dot com

The case is closed



[2003-03-31 09:25:34] [EMAIL PROTECTED]

There is no bug here.  You are asking for the timestamp for February
31st.  What is it supposed to do?  Read your mind and figure out you
want the last day of February?  That's impossible.  It does the only
sensible thing and gives you the actual date 31 days beyond Feb.1.  If
you want the last day of a month, get the 1st of the following month
and subtract a day.



[2003-03-31 05:43:38] [EMAIL PROTECTED]

This behaviour is already fully documented at
http://www.php.net/manual/en/function.mktime.php, which also gives a
one-liner for finding the last day of any month (see Example 2).



[2003-03-31 05:16:32] jacques dot daguerre at st dot com

It was probably not a bug after all and I probably had my code bugged
for many months without noticing it until yesterday...

I probably misunderstood the way mktime works.
If you a day that is greater than the maximum day of the month, then
mktime will go for the following month:

a date like :
mktime (0,0,0,2,31,2003) will be March 03, 2003 even the month entered
is February. Since Feb 31 doesn't exist it will consider the (31-28)th
day in the following month, and therefore the result of March 03.

The calculation of a date a month ago cannot just simply
be :
$lastmonth1 = mktime (0,0,0,(date('m')-1),date('d'),date('Y'));

I corrected my code to be :

$now1 = mktime (0,0,0,date("m"),date("d"),date("Y"));
$now = date ("Y-m-d", $now1);
$today_day= date ("d", $now1);


$lastmthday = mktime (0,0,0,date('m'),0,date('Y'));
$lastday = date ("d", $lastmthday);

if ( $today_day > $lastday) {$prevd = $lastday; }else{$prevd =
$today_day;}

$lastmonth1 = mktime (0,0,0,(date('m')-1),$prevd,date('Y'));
$lastmonth = date ("Y-m-d", $lastmonth1);

this will calculate also the last day of the previous month and make
the day date of the day will not be a higher number than the last of
the previous month.

This works fine.
I would suggest to post this on the mktime function page as I guess
other people could make the mistake as well.



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

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



#22977 [Opn->Bgs]: png.h

2003-03-31 Thread magnus
 ID:   22977
 Updated by:   [EMAIL PROTECTED]
 Reported By:  kuba at 3net dot pl
-Status:   Open
+Status:   Bogus
 Bug Type: Compile Failure
 Operating System: RH Linux 7.3
 PHP Version:  4.3.1
 New Comment:

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

Thank you for your interest in PHP.

You need to install developement package for libpng.


Previous Comments:


[2003-03-31 05:42:10] kuba at 3net dot pl

confg line
./configure --prefix=/usr --with-config-file-path=/etc --disable-debug
--enable-shared --with-apxs=/usr/sbin/apxs --with-gd
--with-jpeg-dir=/usr --with-png --with-ttf --with-xpm-dir=/usr/lib
--enable-gd-native-ttf --with-zlib=/usr --enable-safe-mode
--enable-track-vars --enable-ftp --with-mysql=/usr/local/mysql
--with-dbase --with-gettext

afetr make i got:
/usr/local/etc/php-4.3.1/ext/gd/libgd/gd_png.c:11:67: png.h: No such
file or directory
make: *** [ext/gd/libgd/gd_png.lo] B³¹d 1

i searched entire disk looking for png.h
and didn't find :(

what's the problem?











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



#22976 [Bgs]: gmdate/date and strtotime/mktime not consistant

2003-03-31 Thread scochrane at mackaysstores dot co dot uk
 ID:   22976
 User updated by:  scochrane at mackaysstores dot co dot uk
 Reported By:  scochrane at mackaysstores dot co dot uk
 Status:   Bogus
 Bug Type: Date/time related
 Operating System: NT4 Server
 PHP Version:  4.3.0
 New Comment:

Thanks for your reply- that failed also though, I tracked down the
error - it seems that systems that have 'Automatically adjust Daylight
Saving' switch on will return the wrong date.

I managed to get both exceptions to work using:

if(date("I") == 1){
 // Daylight Saving is ON
 return gmdate("Y-m-d", mktime("Last Sunday"));
} else {
 // Daylight Saving is OFF
 return date("Y-m-d", strtotime("Last Sunday"));
}

echo last_sunday();


Previous Comments:


[2003-03-31 09:41:13] [EMAIL PROTECTED]

strtotime() uses the local timezone adjusted time unless you stick
"GMT" at the end.  Try this:

echo date("H:i:s D M d, Y",strtotime("Last Sunday GMT"));
echo date("H:i:s D M d, Y",strtotime("Last Sunday"));

I am in PDT and right now this gives me:

16:00:00 Sat Mar 29, 2003
00:00:00 Sun Mar 30, 2003

which shows that strtotime adjusts for GMT correctly.  Midnight last
Sunday in GMT was actually Saturday in my timezone as GMT is 8 hours
ahead of me, so it gave me 4pm Saturday.  And when I pass it "Last
Sunday" without the GMT, which means I am asking for midnight last
sunday in my own timezone, I get exactly that.



[2003-03-31 08:21:28] scochrane at mackaysstores dot co dot uk

By substituting mktime() with strtotime() has the same problem.

On the strtotime page of the manual - one of the examples given states
'echo strtotime ("last Monday"), "\n";' - so I beleave my sytax is
valid.

With my script ammended to be valid (as below) I think this is a bug.

function last_sunday() {
return gmdate("Y-m-d", strtotime("Last Sunday"));
}
echo "Last Sunday is returned as: ".last_sunday();

With Daylight saving on the above = 2003-03-29
With Daylight saving off the above = 2003-03-30

I have also use the GMT keyword with strtotime(), but this fails also.



[2003-03-31 05:51:58] [EMAIL PROTECTED]

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

Thank you for your interest in PHP.

Neither mktime() nor gmmktime() understands arguments like "last
Sunday" -- please go and re-read the documentation for those functions.
 If you have any further questions, please ask them on the php-general
list.



[2003-03-31 05:39:46] scochrane at mackaysstores dot co dot uk

I have 2 Servers - 1 has Automatic Daylight Saving on, the other has it
off. Both Servers have same PHP version and O/S (NT4 Server).

When I use this:
echo gmdate("Y-m-d", mktime("last Sunday")); // gmdate

it returns:
2003-03-30 on Server 1 and
2003-03-31 on Server 2

---

when I use this:
echo date("Y-m-d", mktime("last Sunday")); // no gmdate!

it returns:
2003-03-31 on Server 1 and
2003-03-31 on Server 2

---

When I use this:
echo gmdate("Y-m-d", gmmktime("last Sunday")); // gmdate and gmtime!

it returns:
2003-03-31 on Server 1 and
2003-03-30 on Server 2

---

when I use this:
echo date("Y-m-d", gmmktime("last Sunday")); // gmmktime!

it returns:
2003-03-31 on Server 1 and
2003-03-30 on Server 2


So I have used every combination and cannot get both Servers to return
the correct date. I need it to return 2003-03-30 on both Servers - as
it should.

p.s. I cannot just change the 'Automatic Daylight' configuration as I
need it to run in over 250 seperate Servers (they may have different OS
settings)!

Cheers,
Stuart




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



#22074 [Com]: Fix for "output line too long" problem

2003-03-31 Thread hson at ludd dot luth dot se
 ID:   22074
 Comment by:   hson at ludd dot luth dot se
 Reported By:  lhecking at nmrc dot ucc dot ie
 Status:   Closed
 Bug Type: Compile Failure
 Operating System: Solaris
 PHP Version:  4.3.0
 New Comment:

I'm running Solaris8 on x86, all the latest patches.

When compiling 4.3.1 I also encountered this problem.

But the problem is not sh(1) or sed(1), but both...

I had to install gnu sed and set SHELL='/bin/bash' when compiling to
get it to work.


Previous Comments:


[2003-03-09 13:31:26] reinpost at win dot tue dot nl

I have this problem (for the first time) with 4.3.1 and sed is not
involved.  THe culprit is /bin/sh.

Using

   make LIBTOOL='bash libtool' SHELL=`which bash`

solves it for me.



[2003-02-10 11:26:52] [EMAIL PROTECTED]

libtool in CVS is now 1.4.3. Snapshots might not get
it right yet as I can not update libtool on snaps.php.net
but this will be fixed soon too.





[2003-02-05 10:29:47] lhecking at nmrc dot ucc dot ie

Many users, including myself, have report compile failures on
Solaris due to the limitations of the native sed tool. All
reporters were pointed to GNU sed, but part of the problem is
that the sed test in php's configure is broken and declares
even the native Solaris sed "working".

Solution: upgrade to libtool 1.4.3, which includes a much
better test for sed. I.e. re-run aclocal, and copy ltmain.sh
over from PREFIX/share/libtool.

If this particular problem is the only reason of existence
for PHP_PROG_SED, this macro can safely be removed after
upgrading to libtool 1.4.3.





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



#22976 [Bgs]: gmdate/date and strtotime/mktime not consistant

2003-03-31 Thread rasmus
 ID:   22976
 Updated by:   [EMAIL PROTECTED]
 Reported By:  scochrane at mackaysstores dot co dot uk
 Status:   Bogus
 Bug Type: Date/time related
 Operating System: NT4 Server
 PHP Version:  4.3.0
 New Comment:

Your code makes no sense.  mktime() does not understand "Last Sunday",
so if this code fixed your problem, then you have a whole bunch of
other problems.


Previous Comments:


[2003-03-31 09:56:53] scochrane at mackaysstores dot co dot uk

Thanks for your reply- that failed also though, I tracked down the
error - it seems that systems that have 'Automatically adjust Daylight
Saving' switch on will return the wrong date.

I managed to get both exceptions to work using:

if(date("I") == 1){
 // Daylight Saving is ON
 return gmdate("Y-m-d", mktime("Last Sunday"));
} else {
 // Daylight Saving is OFF
 return date("Y-m-d", strtotime("Last Sunday"));
}

echo last_sunday();



[2003-03-31 09:41:13] [EMAIL PROTECTED]

strtotime() uses the local timezone adjusted time unless you stick
"GMT" at the end.  Try this:

echo date("H:i:s D M d, Y",strtotime("Last Sunday GMT"));
echo date("H:i:s D M d, Y",strtotime("Last Sunday"));

I am in PDT and right now this gives me:

16:00:00 Sat Mar 29, 2003
00:00:00 Sun Mar 30, 2003

which shows that strtotime adjusts for GMT correctly.  Midnight last
Sunday in GMT was actually Saturday in my timezone as GMT is 8 hours
ahead of me, so it gave me 4pm Saturday.  And when I pass it "Last
Sunday" without the GMT, which means I am asking for midnight last
sunday in my own timezone, I get exactly that.



[2003-03-31 08:21:28] scochrane at mackaysstores dot co dot uk

By substituting mktime() with strtotime() has the same problem.

On the strtotime page of the manual - one of the examples given states
'echo strtotime ("last Monday"), "\n";' - so I beleave my sytax is
valid.

With my script ammended to be valid (as below) I think this is a bug.

function last_sunday() {
return gmdate("Y-m-d", strtotime("Last Sunday"));
}
echo "Last Sunday is returned as: ".last_sunday();

With Daylight saving on the above = 2003-03-29
With Daylight saving off the above = 2003-03-30

I have also use the GMT keyword with strtotime(), but this fails also.



[2003-03-31 05:51:58] [EMAIL PROTECTED]

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

Thank you for your interest in PHP.

Neither mktime() nor gmmktime() understands arguments like "last
Sunday" -- please go and re-read the documentation for those functions.
 If you have any further questions, please ask them on the php-general
list.



[2003-03-31 05:39:46] scochrane at mackaysstores dot co dot uk

I have 2 Servers - 1 has Automatic Daylight Saving on, the other has it
off. Both Servers have same PHP version and O/S (NT4 Server).

When I use this:
echo gmdate("Y-m-d", mktime("last Sunday")); // gmdate

it returns:
2003-03-30 on Server 1 and
2003-03-31 on Server 2

---

when I use this:
echo date("Y-m-d", mktime("last Sunday")); // no gmdate!

it returns:
2003-03-31 on Server 1 and
2003-03-31 on Server 2

---

When I use this:
echo gmdate("Y-m-d", gmmktime("last Sunday")); // gmdate and gmtime!

it returns:
2003-03-31 on Server 1 and
2003-03-30 on Server 2

---

when I use this:
echo date("Y-m-d", gmmktime("last Sunday")); // gmmktime!

it returns:
2003-03-31 on Server 1 and
2003-03-30 on Server 2


So I have used every combination and cannot get both Servers to return
the correct date. I need it to return 2003-03-30 on both Servers - as
it should.

p.s. I cannot just change the 'Automatic Daylight' configuration as I
need it to run in over 250 seperate Servers (they may have different OS
settings)!

Cheers,
Stuart




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



#22969 [Bgs->Opn]: sent mail not received by some servers

2003-03-31 Thread yellowjacket at email dot com
 ID:   22969
 User updated by:  yellowjacket at email dot com
 Reported By:  yellowjacket at email dot com
-Status:   Bogus
+Status:   Open
 Bug Type: Mail related
 Operating System: apache
 PHP Version:  4.3.2RC1
 New Comment:

Since I can sent email to those servers using cgi script and from other
email accounts, there is something that PHP is or is not doing that is
causing the servers to reject the incoming email if you feel that is
"bogus" or not a bug fine but my definition of a bug is something that
does not work consistently and mail() does not.

thanks,

yellowjacket


Previous Comments:


[2003-03-31 01:35:45] [EMAIL PROTECTED]

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

Thank you for your interest in PHP.

.



[2003-03-30 20:53:34] yellowjacket at email dot com

the mail()function is sending mail but some addresses are not receiving
it.  What is the issue with mail() that causes some servers not to
deliver the mail?  For example
I can not send email to [EMAIL PROTECTED] or to my hotmail
account.  There is a lot of discussion about this problem on various
sites but no solution.  I tried adding the return-path as suggested by
several sites.

Do you have a fix?

thanks,

Yellowjacket




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



#22969 [Opn]: sent mail not received by some servers

2003-03-31 Thread yellowjacket at email dot com
 ID:   22969
 User updated by:  yellowjacket at email dot com
 Reported By:  yellowjacket at email dot com
 Status:   Open
 Bug Type: Mail related
 Operating System: apache
 PHP Version:  4.3.2RC1
 New Comment:

Please note that I am receiving an auto reply from you to
[EMAIL PROTECTED] which I am sure is being sent with PHP mail(). 
This would imply that you know what the problem is since your mail is
being received and mine is not.

If this is not a bug it is a least incomplete documentation of how to
use mail() to ensure delivery to all server types.

What is the appropriate syntax for mail() to ensure delivery?

Thank you.


Previous Comments:


[2003-03-31 10:03:06] yellowjacket at email dot com

Since I can sent email to those servers using cgi script and from other
email accounts, there is something that PHP is or is not doing that is
causing the servers to reject the incoming email if you feel that is
"bogus" or not a bug fine but my definition of a bug is something that
does not work consistently and mail() does not.

thanks,

yellowjacket



[2003-03-31 01:35:45] [EMAIL PROTECTED]

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

Thank you for your interest in PHP.

.



[2003-03-30 20:53:34] yellowjacket at email dot com

the mail()function is sending mail but some addresses are not receiving
it.  What is the issue with mail() that causes some servers not to
deliver the mail?  For example
I can not send email to [EMAIL PROTECTED] or to my hotmail
account.  There is a lot of discussion about this problem on various
sites but no solution.  I tried adding the return-path as suggested by
several sites.

Do you have a fix?

thanks,

Yellowjacket




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



#22977 [Bgs]: png.h

2003-03-31 Thread kuba at 3net dot pl
 ID:   22977
 User updated by:  kuba at 3net dot pl
 Reported By:  kuba at 3net dot pl
 Status:   Bogus
 Bug Type: Compile Failure
 Operating System: RH Linux 7.3
 PHP Version:  4.3.1
 New Comment:

Sorry, but what does my problem imply??
I tried to compile PHP - but didn't succed...

What is png.h file?
I guessed that PHP's 'make' is expecting that
file in php-4.3.1/ext/gd/libgd/
Am I wrong?

Is that file coming with libpng?


Previous Comments:


[2003-03-31 09:50:58] [EMAIL PROTECTED]

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

Thank you for your interest in PHP.

You need to install developement package for libpng.



[2003-03-31 05:42:10] kuba at 3net dot pl

confg line
./configure --prefix=/usr --with-config-file-path=/etc --disable-debug
--enable-shared --with-apxs=/usr/sbin/apxs --with-gd
--with-jpeg-dir=/usr --with-png --with-ttf --with-xpm-dir=/usr/lib
--enable-gd-native-ttf --with-zlib=/usr --enable-safe-mode
--enable-track-vars --enable-ftp --with-mysql=/usr/local/mysql
--with-dbase --with-gettext

afetr make i got:
/usr/local/etc/php-4.3.1/ext/gd/libgd/gd_png.c:11:67: png.h: No such
file or directory
make: *** [ext/gd/libgd/gd_png.lo] B³¹d 1

i searched entire disk looking for png.h
and didn't find :(

what's the problem?











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



#22902 [Bgs]: Crystal Reports 9 (RDC) and SelectPrinter error

2003-03-31 Thread andy at advancethermal dot com
 ID:   22902
 User updated by:  andy at advancethermal dot com
 Reported By:  andy at advancethermal dot com
 Status:   Bogus
 Bug Type: COM related
 Operating System: Windows XP Professional
 PHP Version:  4.3.1
 New Comment:

Crystal Decisions provided a resolution to the problem. The
PaperOrientation method must be specified if the SelectPrinter method
is used. Here is the code that works.

$crapp = new COM("CrystalDesignRunTime.Application");
$creport = $crapp->OpenReport("d:\\athermal\\reports\\backlog.rpt",
1);
$creport->SelectPrinter("winspool", "HP LaserJet 1200 Series PCL",
"Ne01:");
$creport->PaperOrientation = 0;
$creport->PrintOut(False);


Previous Comments:


[2003-03-27 02:48:12] [EMAIL PROTECTED]

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

Thank you for your interest in PHP.

that's not a php issue



[2003-03-26 09:03:47] andy at advancethermal dot com

Specifying a printer from the SelectPrinter method causes PHP to
crash.

The following code:
-
$crapp = new COM("CrystalDesignRunTime.Application");
$creport = $crapp->OpenReport("d:\\athermal\\reports\\backlog.rpt",
1);
$creport->SelectPrinter("winspool", "HP LaserJet 1200 Series PCL",
"Ne01:");
print
"DEBUG|".$creport->DriverName."|".$creport->PrinterName."|".$creport->PortName."|";
$creport->PrintOut(False);
-
Produces the following output:
-
Content-type: text/html
X-Powered-By: PHP/4.3.1

winspool|HP LaserJet 1200 Series PCL|Ne01:|
Warning:  (null)(): Invoke() failed: Exception occurred.
 Source: Crystal Reports ActiveX Designer Description:
Error start
ing print job. Please check your printer or network connection. in
d:\atherma
l\temp\test.php on line 7
-
Other items to note:
 - When the SelectPrinter line is commented out, the report prints fine
to the default printer and the DEBUG line prints "DEBUG|||".
 - If the PrintOut line is commented out, the DEBUG line prints
"DEBUG|winspool|HP LaserJet 1200 Series PCL|Ne01:|" without any error.
 - If the PortName is not specified, or specified incorrectly on the
SelectPrinter line, it is printed correctly on the DEBUG line. (i.e. if
"Ne00:" is specified on the SelectPrinter line, "Ne01:" is reported on
the DEBUG line.)

aap




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



#22983 [NEW]: Page Cannot Be Displayed

2003-03-31 Thread luke at cywh dot com
From: luke at cywh dot com
Operating system: Windows XP
PHP version:  4CVS-2003-03-31 (stable)
PHP Bug Type: Sockets related
Bug description:  Page Cannot Be Displayed

Numerous pages on my site are coming up as "page cannot be displayed". it
worked before i upgraded my php, but now its doing it. on my local network
it doesnt happen, but any computer outside my network it does happen.

http://www.cywh.com <--- thats my site
http://cytech.cywh.com <--- other site, happens on order

it happens on numerous links, like "get hosted" or "other plans" and
others.

im not sure whats causing it, but it happened before, you guys adviced me
to upgrade to a snapshot, that seemed to fix it, i upgraded again to
another snap shot, and it started happening again.

i believe it only happens only on IE because you guys said it worked and
you were using a different browser (proboly on linux). please test it on
an IE browser.

im using IE 6.0

i have php installed to apache 2.0.44 as a module. i have numerious
virtual hosts setup on apache.

i have saved html code that is "supposed" to be generated by the page and
it does come up fine. im very sure it is related to a php.
-- 
Edit bug report at http://bugs.php.net/?id=22983&edit=1
-- 
Try a CVS snapshot: http://bugs.php.net/fix.php?id=22983&r=trysnapshot
Fixed in CVS:   http://bugs.php.net/fix.php?id=22983&r=fixedcvs
Fixed in release:   http://bugs.php.net/fix.php?id=22983&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=22983&r=needtrace
Try newer version:  http://bugs.php.net/fix.php?id=22983&r=oldversion
Not developer issue:http://bugs.php.net/fix.php?id=22983&r=support
Expected behavior:  http://bugs.php.net/fix.php?id=22983&r=notwrong
Not enough info:http://bugs.php.net/fix.php?id=22983&r=notenoughinfo
Submitted twice:http://bugs.php.net/fix.php?id=22983&r=submittedtwice
register_globals:   http://bugs.php.net/fix.php?id=22983&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=22983&r=php3
Daylight Savings:   http://bugs.php.net/fix.php?id=22983&r=dst
IIS Stability:  http://bugs.php.net/fix.php?id=22983&r=isapi
Install GNU Sed:http://bugs.php.net/fix.php?id=22983&r=gnused



#22926 [Fbk->Opn]: Cannot call PHP from shell_exec

2003-03-31 Thread phpbugs at bob7 dot com
 ID:   22926
 User updated by:  phpbugs at bob7 dot com
 Reported By:  phpbugs at bob7 dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Program Execution
 Operating System: Windows 2000 server
 PHP Version:  4.3.1
 New Comment:

I repeated the test using the CLI interface and was able to get 'php
-h' to run.  

I also see that I can use the new streams functionality to create HTML
mail bodies. The problem with the streams approach is that (I believe)
the .php files need to be in the document tree, so if I go that route,
I have to add authentication. 

Perhaps there is or you guys may be planning a way that allows http
streams from outside the doc tree?

Thanks again,
-Bob


Previous Comments:


[2003-03-27 07:51:55] [EMAIL PROTECTED]

Could you please try CLI version of PHP.EXE? It comes in the cli
directory of the standard ZIP distribution.



[2003-03-27 07:45:40] phpbugs at bob7 dot com

The following does not work.  It spawns scores of processes, which
fortunately all die after 30 seconds.


I looked at the bug reports about possibly needing command.com but
these do not work either: (same result)



Why would I want to do this?  To send html email using the PEAR mime
mail class, i.e.


I downloaded and installed the standard windows installer, and the path
to php is C:\Inetpub\PHP

I have the same problem using back ticks as well.

Thanks very much for looking at this.




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



#22984 [NEW]: Date Function returning incorrect NAME of month

2003-03-31 Thread jeremyrimer at yahoo dot com
From: jeremyrimer at yahoo dot com
Operating system: win2kadvsrv
PHP version:  4.3.1
PHP Bug Type: Date/time related
Bug description:  Date Function returning incorrect NAME of month

So I have some code that prints out this and next month's calendar and
populates the cells with the day's events. Sometimes, and I can't find
root cause except to say that there MUST be a bug in the date() function
or the mktime() function because I have a line of code to produce
NEXTmonth's month name in text, and it is producing the month TWO months
later instead of 1, despite my +1 increment... 

$tyear = date("Y");
 // the year - 4 digit
$nyear = date("Y")+1;
$tmonth = date("n");// the 
month - no leading 0's
$nmonth = date("n")+1;
$tday = date("j"); 
 // the day as a number

date("F",mktime(0,0,0,$nmonth,$tday,$tyear));

This line can produce not the NEXT month, but TWO months later... Driving
me crazy...
-Jeremy
-- 
Edit bug report at http://bugs.php.net/?id=22984&edit=1
-- 
Try a CVS snapshot: http://bugs.php.net/fix.php?id=22984&r=trysnapshot
Fixed in CVS:   http://bugs.php.net/fix.php?id=22984&r=fixedcvs
Fixed in release:   http://bugs.php.net/fix.php?id=22984&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=22984&r=needtrace
Try newer version:  http://bugs.php.net/fix.php?id=22984&r=oldversion
Not developer issue:http://bugs.php.net/fix.php?id=22984&r=support
Expected behavior:  http://bugs.php.net/fix.php?id=22984&r=notwrong
Not enough info:http://bugs.php.net/fix.php?id=22984&r=notenoughinfo
Submitted twice:http://bugs.php.net/fix.php?id=22984&r=submittedtwice
register_globals:   http://bugs.php.net/fix.php?id=22984&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=22984&r=php3
Daylight Savings:   http://bugs.php.net/fix.php?id=22984&r=dst
IIS Stability:  http://bugs.php.net/fix.php?id=22984&r=isapi
Install GNU Sed:http://bugs.php.net/fix.php?id=22984&r=gnused



#18316 [Com]: DefaultType application/x-httpd-php problem

2003-03-31 Thread jm4n at yahoo dot com
 ID:   18316
 Comment by:   jm4n at yahoo dot com
 Reported By:  phpbug at botanicus dot net
 Status:   Bogus
 Bug Type: Apache2 related
 Operating System: l00nix
 PHP Version:  4CVS-2002-07-12
 New Comment:

I get similar results on a Raq4 (Apache 1.3.20 and PHP 4.1.2). If I
name a file "blah.html.php", I get a content-type of
"application/x-httpd-php" -- but the file is not parsed; the PHP script
is sent to the browser.

I suspect something in the PHP module is deciding not to parse the
file, even though it should (due to the .php extension and appropriate
content-type). The original reporter's problem is similar, in that he
is forcing the content-type on a non .php filename (in this case a
symlink). In my case, blah.php works fine, blah.html.php isn't parsed.

Does this make sense? I would have thought that any file extension you
set to "application/x-httpd-php" would be parsed as a PHP script, but
this doesn't appear to be the case.


Previous Comments:


[2002-07-12 14:56:28] [EMAIL PROTECTED]

It works fine with the CVS of both apache and php, so you are doing
something wrong somewhere, hence it's not a bug.
If you still think it's a bug, feel free to provide more information
(and it looks like a problem in apache anyway).

Derick



[2002-07-12 13:28:41] phpbug at botanicus dot net

I can't see how this is not a bug report. PHP isn't functioning on
Apache2
correctly (I know it is alpha). I'm just letting you guys know.



[2002-07-12 11:05:36] [EMAIL PROTECTED]

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

Thank you for your interest in PHP.



[2002-07-12 11:02:38] phpbug at botanicus dot net

.htaccess: DefaultType application/x-httpd-php
bleh:  

---
$ curl -sI host/bleh |grep Content-Type
Content-Type: application/x-httpd-php
$ ln -s bleh bleh.php
$ curl -sI host/bleh.php |grep Content-Type
Content-Type: text/html
---


In short, PHP doesn't seem to be used as the handler for
application/x-httpd-php when assumed file type is from a DefaultType or
ForceType statement. :{





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



#22985 [NEW]: max_input_time

2003-03-31 Thread excalibur at hub dot org
From: excalibur at hub dot org
Operating system: FreeBSD 4.8RC
PHP version:  4.3.1
PHP Bug Type: *Configuration Issues
Bug description:  max_input_time

Hi All, 

 Ok, been doing some testing in relation to the file uploads issue to help
a client of mine and found the following issue. With 4.3.x the
max_input_time definition in the php.ini file seems to be ignored.
Regardless of what I set it to in that file, phpinfo() only shows a -1 in
the field and subsequently I can not upload any files larger then about 32
Kbytes. Anything more then that and the upload completes and the file
disappears. 

 Doing a quick search around the net shows that the -1 was supposed to
define unlimited time??

 When I use a .htaccess file and set the value via:

  php_flag max_input_time 600

 phpinfo() shows the proper information, and that the 600 has taken
affect. At this time I can upload files upto the limits set via:

 upload_max_filesize = XXM

 I have a feeling that one of two things is happening, the "unlimited"
time is not being taken into account (if that is what the -1 denotes), or
the value is not being used at all via the php.ini settings, but forcing
it via a .htaccess file causes the value to be set properly..

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



#22940 [Opn->Fbk]: PHP Warning: Unknown(): Missing ] in x variable in Unknown on line 0

2003-03-31 Thread mj
 ID:   22940
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Feedback
 Bug Type: Unknown/Other Function
 Operating System: Slackware 8.1
 PHP Version:  4.3.0
 New Comment:

This error does not seem to occur with 4.3.2-dev. Could you please test
this yourself?


Previous Comments:


[2003-03-28 10:14:43] [EMAIL PROTECTED]

save a (empty) file.php and get in a browser 
http://host/file.php?x%5B
(%5B is the code for "[")

you'll get the warning below:
PHP Warning:  Unknown(): Missing ] in x variable in Unknown on line 0




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



#22986 [NEW]: Unhappily 'conection cache' handling

2003-03-31 Thread ray at unreal64 dot net
From: ray at unreal64 dot net
Operating system: Windows NT4.0
PHP version:  4CVS-2003-03-31 (stable)
PHP Bug Type: ODBC related
Bug description:  Unhappily 'conection cache' handling

Hi !

ODBC function "odbc_do_connect" caches connection. It setup
"hashed_details" variable and tries to reuse physical DB connection if new
PHP connection is being created.

It brings BIG problem while creating more complicated things. Imagine, you
have some long server side action over database running in transaction
(allready get point ? :) Thin client need to show procedure progress.
Details are not important, but client 'shows' progress bar. So, inside
'big' server side action, need to be updated 'progress' table which is
used by another HTTP request to show real progress to user (action can
take tenths seconds).

So, if I need to open 2 separate connections, I am in the trouble.
Ofcourse, the same user, the same password, the same cursor type. I think
it is ugly to create separate user do to this :) [even it is temporary
solcution ofcourse]

So, I suggest to add parameter to PHP's odbc_connect/pconnect - something
like "I am not soo stupid as I look and I really need 2 connections" or
add 'flag' to 'cursor type' (and declare this last parameter as
'connection flags' rather 'cursor type') - something like
SQL_FLG_NO_CONN_CACHE.

Would be nice feature :) If it is 'someway' possible, please, let me know.
I didn't find how.

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



#22986 [Com]: Unhappily 'conection cache' handling

2003-03-31 Thread why at email dot address dot com
 ID:   22986
 Comment by:   why at email dot address dot com
 Reported By:  ray at unreal64 dot net
 Status:   Open
 Bug Type: ODBC related
 Operating System: Windows NT4.0
 PHP Version:  4CVS-2003-03-31 (stable)
 New Comment:

Pgsql solves this trouble by 'connection flags' and
PGSQL_CONNECT_FORCE_NEW.


Previous Comments:


[2003-03-31 11:51:22] ray at unreal64 dot net

Hi !

ODBC function "odbc_do_connect" caches connection. It setup
"hashed_details" variable and tries to reuse physical DB connection if
new PHP connection is being created.

It brings BIG problem while creating more complicated things. Imagine,
you have some long server side action over database running in
transaction (allready get point ? :) Thin client need to show procedure
progress. Details are not important, but client 'shows' progress bar.
So, inside 'big' server side action, need to be updated 'progress'
table which is used by another HTTP request to show real progress to
user (action can take tenths seconds).

So, if I need to open 2 separate connections, I am in the trouble.
Ofcourse, the same user, the same password, the same cursor type. I
think it is ugly to create separate user do to this :) [even it is
temporary solcution ofcourse]

So, I suggest to add parameter to PHP's odbc_connect/pconnect -
something like "I am not soo stupid as I look and I really need 2
connections" or add 'flag' to 'cursor type' (and declare this last
parameter as 'connection flags' rather 'cursor type') - something like
SQL_FLG_NO_CONN_CACHE.

Would be nice feature :) If it is 'someway' possible, please, let me
know. I didn't find how.

Thank you,
Have a niceday
Ray




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



#22940 [Fbk]: PHP Warning: Unknown(): Missing ] in x variable in Unknown on line 0

2003-03-31 Thread moriyoshi
 ID:   22940
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Feedback
 Bug Type: Unknown/Other Function
 Operating System: Slackware 8.1
 PHP Version:  4.3.0
 New Comment:

And.. are you experiencing the problem with the CGI version? If so, it
seems that has already been fixed in CVS(4.3.2-dev).




Previous Comments:


[2003-03-31 11:46:55] [EMAIL PROTECTED]

This error does not seem to occur with 4.3.2-dev. Could you please test
this yourself?



[2003-03-28 10:14:43] [EMAIL PROTECTED]

save a (empty) file.php and get in a browser 
http://host/file.php?x%5B
(%5B is the code for "[")

you'll get the warning below:
PHP Warning:  Unknown(): Missing ] in x variable in Unknown on line 0




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



#22987 [NEW]: make crashes on dbug.c error

2003-03-31 Thread thickerson at e-guana dot net
From: thickerson at e-guana dot net
Operating system: FreeBSD
PHP version:  4.3.1
PHP Bug Type: Compile Failure
Bug description:  make crashes on dbug.c error

After running configure --with-java=, I try to make
and get the following error:

gcc -I/usr/home/eguana2/usr/local/php-4.3.1/ext/mysql/libmysql
-Iext/mysql/ -I/usr/home/eguana2/usr/local/php-4.3.1/ext/mysql/
-DPHP_ATOM_INC -I/usr/home/eguana2/usr/local/php-4.3.1/include
-I/usr/home/eguana2/usr/local/php-4.3.1/main
-I/usr/home/eguana2/usr/local/php-4.3.1
-I/usr/home/eguana2/usr/local/php-4.3.1/Zend
-I/usr/home/eguana2/usr/local/php-4.3.1/ext/xml/expat 
-I/usr/home/eguana2/usr/local/php-4.3.1/TSRM  -g -O2  -c
/usr/home/eguana2/usr/local/php-4.3.1/ext/mysql/libmysql/dbug.c -o
ext/mysql/libmysql/dbug.o  && echo > ext/mysql/libmysql/dbug.lo
In file included from
/usr/home/eguana2/usr/local/php-4.3.1/ext/mysql/libmysql/dbug.c:72:
/usr/home/eguana2/usr/local/php-4.3.1/ext/mysql/libmysql/global.h:260:
warning: redefinition of `uint'
/usr/include/sys/types.h:57: warning: `uint' previously declared here
/usr/home/eguana2/usr/local/php-4.3.1/ext/mysql/libmysql/global.h:261:
warning: redefinition of `ushort'
/usr/include/sys/types.h:56: warning: `ushort' previously declared here
/usr/home/eguana2/usr/local/php-4.3.1/ext/mysql/libmysql/dbug.c:1906:
warning: static declaration for `perror' follows non-static
/usr/home/eguana2/usr/local/php-4.3.1/ext/mysql/libmysql/dbug.c: In
function `perror':
/usr/home/eguana2/usr/local/php-4.3.1/ext/mysql/libmysql/dbug.c:1907:
argument `s' doesn't match prototype
/usr/include/stdio.h:227: prototype declaration
*** Error code 1

I've found several reports on this problem, but no answers.  What is the
nature of my problem?

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



#22988 [NEW]: I'm feeling lucky - rand() bug

2003-03-31 Thread vakmajom at freemail dot hu
From: vakmajom at freemail dot hu
Operating system: Windows 2000
PHP version:  4.3.2RC1
PHP Bug Type: Math related
Bug description:  I'm feeling lucky - rand() bug

The function rand() always returns an even number!
This bug appears when the parameters of rand() are near to the limits of
int (i.e. 2147483647)

Example:

Result: always an even number.

I'm using Apache 2.0.44 with PHP4.3.2RC1 (original Win32 binary) as an
apache module.

Tests with different systems:
Maybe this is a Windows bug, it still exists in Windows .Net server build
3718 with PHP 4.3.0 RC3
But everything is fine on a unix system with PHP 4.1.0

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



#22534 [Com]: Environment Variables not resolved

2003-03-31 Thread hosting at voodooweb dot com
 ID:   22534
 Comment by:   hosting at voodooweb dot com
 Reported By:  KTalleur at abics dot de
 Status:   Closed
 Bug Type: CGI related
 Operating System: SuSE Linux
 PHP Version:  4.3.1
 New Comment:

I have the same problem like "jeanfrancois dot lecam at altiplano dot
fr" reported but I don't use cgiwrap just standard apache suexec and
FreeBSD 4.5 as OS.
My script worked with 4.2.3 but crashed with 4.3.1 and the
CVS-snapshot.


Previous Comments:


[2003-03-04 10:39:30] KTalleur at abics dot de

It worked with the CMS-Snapshot (linux version).

Thanks!



[2003-03-04 10:11:05] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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



[2003-03-04 07:38:59] KTalleur at abics dot de

No, its not the same. In my environment, the script is executed. I
don't get any errors, except for the missing values / variables.



[2003-03-04 07:35:45] jeanfrancois dot lecam at altiplano dot fr

I guess my problem is the same :
using apache-1.3.27/suexec + cgiwrap-3.7.1 + php-4.3.1 as a CGI, I get
a "premature end of script headers" (used to work with php-4.2.3).
Using cgiwrapd and php.ini with 'log_errors = On', it says :

PHP Fatal error:  Unknown(): Unable to open
/home/websites/website1/web/ in Unknown on line 0

This is my doc_root, it lacks the script name !

Downgrading to 4.2.3...



[2003-03-04 06:05:27] KTalleur at abics dot de

I am using PHP 4.3.1 as a CGI with Apache 1.3.27. Using phpinfo(), i
found out that the variables

SCRIPT_NAME
PATH_INFO

are not shown in the environment section. Therefore, PHP_SELF is shown
empty in the PHP Variables section.

With PHP 4.2.2 (same Apache Config, just the php binary changed),
everything is fine - the two environment variables are shown, and the
php_self variable is set. So this is a feature of the current version!

I compiled PHP with  --enable-track-vars,--enable-force-cgi-redirect,
--with-gd=/usr.

Any suggestions?




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



#22989 [NEW]: mail() not discovered by configure

2003-03-31 Thread iguy at ionsphere dot org
From: iguy at ionsphere dot org
Operating system: Redhat 8.0
PHP version:  4.3.1
PHP Bug Type: *Compile Issues
Bug description:  mail() not discovered by configure 

On my RedHat 8.0 system I am running exim & apache 2.0 with the default
autoconf of 2.53-8.  

When issuing the ./buildconf, ./configure 
configure does not find sendmail in the path given to it.  That is because
of a bug in the autoconf 2.53 code base where AC_PROG_PATH does not
properly search through non-expanded parameters passed to the search
string.  ie.  
$PATH:/usr/sbin -> it will search through the properly expanded $PATH but
will not search in /usr/sbin.  

As such I would like ot recommend this patch which should work with 2.13 &
all versions of autoconf going forward.

diff -Naur php-4.3.1.org/aclocal.m4 php-4.3.1/aclocal.m4
--- php-4.3.1.org/aclocal.m42003-02-16 08:56:17.0 -0700
+++ php-4.3.1/aclocal.m42003-03-31 12:14:24.0 -0700
@@ -713,7 +713,8 @@
 ])
 
 AC_DEFUN([PHP_PROG_SENDMAIL],[
-AC_PATH_PROG(PROG_SENDMAIL, sendmail,[],
$PATH:/usr/bin:/usr/sbin:/usr/etc:/etc:/usr/ucblib:/usr/lib)
+PHP_ALT_PATH=/usr/bin:/usr/sbin:/usr/etc:/etc:/usr/ucblib:/usr/lib
+AC_PATH_PROG(PROG_SENDMAIL, sendmail,[], $PATH:$PHP_ALT_PATH)
 if test -n "$PROG_SENDMAIL"; then
   AC_DEFINE(HAVE_SENDMAIL,1,[whether you have sendmail])
 fi
-- 
Edit bug report at http://bugs.php.net/?id=22989&edit=1
-- 
Try a CVS snapshot: http://bugs.php.net/fix.php?id=22989&r=trysnapshot
Fixed in CVS:   http://bugs.php.net/fix.php?id=22989&r=fixedcvs
Fixed in release:   http://bugs.php.net/fix.php?id=22989&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=22989&r=needtrace
Try newer version:  http://bugs.php.net/fix.php?id=22989&r=oldversion
Not developer issue:http://bugs.php.net/fix.php?id=22989&r=support
Expected behavior:  http://bugs.php.net/fix.php?id=22989&r=notwrong
Not enough info:http://bugs.php.net/fix.php?id=22989&r=notenoughinfo
Submitted twice:http://bugs.php.net/fix.php?id=22989&r=submittedtwice
register_globals:   http://bugs.php.net/fix.php?id=22989&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=22989&r=php3
Daylight Savings:   http://bugs.php.net/fix.php?id=22989&r=dst
IIS Stability:  http://bugs.php.net/fix.php?id=22989&r=isapi
Install GNU Sed:http://bugs.php.net/fix.php?id=22989&r=gnused



#22990 [NEW]: spelling mistake in manual

2003-03-31 Thread Rene dot SAT at gmx dot de
From: Rene dot SAT at gmx dot de
Operating system: Win2K
PHP version:  4.3.1
PHP Bug Type: Unknown/Other Function
Bug description:  spelling mistake in manual

spelling mistake in the german version of the offline manual
(php_maual_de.chm)

in the topic Arrays:


CASE_UPPER (integer)
CASE_UPPER wird benützt mit array_change_key_case() um die Schlüssel von
Arrays in Kleinbuchstaben umzuwandeln. 

 there should stand "Großbuchstaben" instead of "Kleinbuchstaben"


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



#22991 [NEW]: PHP mail not being received by hotmail

2003-03-31 Thread rcflyer at myself dot com
From: rcflyer at myself dot com
Operating system: Liniux
PHP version:  4.3.2RC1
PHP Bug Type: Output Control
Bug description:  PHP mail not being received by hotmail

PHP mail() will not send to hotmail? how come?  


 
Ive tried several hotmail addresses and ive tried several normal ISP
addresses and nothing send to hotmail addresses but all messages goto
normal addresses, does anyone know how to solve this problem? 

This is the function im using. 

mail( '"' . $emailto . '" <' . $emailto1 . '>', 
$subject, $Body, 
'Return-Path: "' . $From . '" <' . $From1 . ">\n" 
. 'From: "' . $From . '" <' . $From1 . ">\n" 
. 'Reply-To: "' . $From . '" <' . $From1 . ">\n" 
. "MIME-Version: 1.0\n Content-Type: multipart/mixed;\nX-Mailer: PHP/" .
phpversion() . "\n" 
. "X-From-IP: " . $REMOTE_ADDR ); 

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



#22984 [Opn->Bgs]: Date Function returning incorrect NAME of month

2003-03-31 Thread tularis
 ID:   22984
 Updated by:   [EMAIL PROTECTED]
 Reported By:  jeremyrimer at yahoo dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Date/time related
 Operating System: win2kadvsrv
 PHP Version:  4.3.1
 New Comment:

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

Thank you for your interest in PHP.

I'm pretty sure this is NOT a bug


Previous Comments:


[2003-03-31 11:05:57] jeremyrimer at yahoo dot com

So I have some code that prints out this and next month's calendar and
populates the cells with the day's events. Sometimes, and I can't find
root cause except to say that there MUST be a bug in the date()
function or the mktime() function because I have a line of code to
produce NEXTmonth's month name in text, and it is producing the month
TWO months later instead of 1, despite my +1 increment... 

$tyear = date("Y");
 // the year - 4 digit
$nyear = date("Y")+1;
$tmonth = date("n");// the 
month - no leading 0's
$nmonth = date("n")+1;
$tday = date("j"); 
 // the day as a number

date("F",mktime(0,0,0,$nmonth,$tday,$tyear));

This line can produce not the NEXT month, but TWO months later...
Driving me crazy...
-Jeremy




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



#22991 [Opn]: PHP mail not being received by hotmail

2003-03-31 Thread rcflyer at myself dot com
 ID:   22991
 User updated by:  rcflyer at myself dot com
 Reported By:  rcflyer at myself dot com
 Status:   Open
 Bug Type: Output Control
 Operating System: Liniux
 PHP Version:  4.3.2RC1
 New Comment:

I found this information on the marcromedia site.  Using the FROM
doesn't solve the problem.  What else is needed? 

If you've ever sent an e-mail from PHP, you know what is required.
First, the mail server must be set up correctly on the PHP server.
Next, you have to know a little bit about what is required in your mail
headers. The PHP mail() function only takes four parameters—to,
subject, message, and header—but in many cases certain headers have to
be set or the mail will not go through. Some servers will reject an
email if the FROM field is not included. For that reason, the headers
have to be manually concatenated with line feeds. Knowledge of mail
headers is necessary. Alternately, you can use a pre-written script
that you might find on the web. The same simple e-mail sent from PHP
might look like this:


Previous Comments:


[2003-03-31 14:18:53] rcflyer at myself dot com

PHP mail() will not send to hotmail? how come?  


 
Ive tried several hotmail addresses and ive tried several normal ISP
addresses and nothing send to hotmail addresses but all messages goto
normal addresses, does anyone know how to solve this problem? 

This is the function im using. 

mail( '"' . $emailto . '" <' . $emailto1 . '>', 
$subject, $Body, 
'Return-Path: "' . $From . '" <' . $From1 . ">\n" 
. 'From: "' . $From . '" <' . $From1 . ">\n" 
. 'Reply-To: "' . $From . '" <' . $From1 . ">\n" 
. "MIME-Version: 1.0\n Content-Type: multipart/mixed;\nX-Mailer: PHP/"
. phpversion() . "\n" 
. "X-From-IP: " . $REMOTE_ADDR ); 





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



#22820 [Opn]: script kicks out to command prompt.

2003-03-31 Thread nick at axelis dot com
 ID:   22820
 User updated by:  nick at axelis dot com
 Reported By:  nick at axelis dot com
 Status:   Open
 Bug Type: Reproducible crash
 Operating System: Windows 2000 sp3
 PHP Version:  4.3.2-RC
 New Comment:

I think I've got something here that will work. I've reinstalled 4.2.3
and configured to run as CGI. This works. At this point I think it's
safe to assume that this is a problem with 4.3.X. I don't have a
linux/unix box with 4.3.x on it so I can't report anything there, but I
think this really narrows things down to where we should be able to
isolate the problem pretty effectively. I'm going to start doing that
and I'll let you know what, if anything, I come up with.


Previous Comments:


[2003-03-30 23:30:30] nick at axelis dot com

Ok, I got that snapshot and you're right, the apache problem is fixed.
In fact it works great. I've been trying to whiddle this down to 15-20
lines like you asked but I just can't pinpoint the problem. Given the
way this script works, it's impossible to make it do anything except
what it does. What I really need to know is, is this a problem with php
4.3.x? or with Windows? I was going to downgrade to 4.2.3 but I can't
do that with this version of apache, and I'd rather not go through the
trouble of downgrading that as well on a production server.



[2003-03-27 07:49:19] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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

Apache2 problems are fixed now.



[2003-03-26 19:16:25] nick at axelis dot com

Ok, let's try this again:

As stated in my original message, I already have Apache 2.0.44
installed. As far as sending a _SHORT_ chunck of code that will
reproduce this problem, I wouldn't know where to begin. The problem
happens at various locations in the code where different, unrelated,
stuff is happening. If I could isolate this to a specific subset of the
code I would have already fixed it. I'll try to put together something
that might reproduce this, but I can't be sure what will happen.



[2003-03-24 03:52:13] [EMAIL PROTECTED]

About the Apache2 sapi, you need Apache 2.0.44 installed.

About the cli problem, please provide a _SHORT_ example
script which we can use to test this. And I mean a script
that is max. 15-20 lines long and runs as-is.




[2003-03-23 19:35:43] nick at axelis dot com

Ok. I got the latest snapshot and applied it. The results where not
what I would expect. Wit the new snapshot I can't use the sapi mod for
apache 2, apache won't load when with it. I've now got it configured to
use the CGI, and that works. The problem, however, still remains, there
is no change.



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

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



#22991 [Opn->Bgs]: PHP mail not being received by hotmail

2003-03-31 Thread pollita
 ID:   22991
 Updated by:   [EMAIL PROTECTED]
 Reported By:  rcflyer at myself dot com
-Status:   Open
+Status:   Bogus
-Bug Type: Output Control
+Bug Type: *Mail Related
 Operating System: Liniux
 PHP Version:  4.3.2RC1
 New Comment:

Your first problem is that you're attempting to specify realname in the
$to parameter of mail().

Don't do that.

The first parameter of mail() should be an email address and ONLY an
email address.

That much aside everything you have (From/Return-Path/etc..) should be
enough, however, your mail server may be setup to not trust those
headers from the user.  Look for a setting of 'trusted-users' or
similar in your mail server configuration and make sure your webserver
user is listed in there.

All that said, any further comments on this 'bug' should be discussed
on [EMAIL PROTECTED] as this is not a bug, but rather a scripting
problem.

P.S. - 'Output Control' is not the correct category for this report
either.  This should have been submitted under 'Mail Related'.  I'm
changing that now so that our stats are keep consistent.


Previous Comments:


[2003-03-31 14:28:08] rcflyer at myself dot com

I found this information on the marcromedia site.  Using the FROM
doesn't solve the problem.  What else is needed? 

If you've ever sent an e-mail from PHP, you know what is required.
First, the mail server must be set up correctly on the PHP server.
Next, you have to know a little bit about what is required in your mail
headers. The PHP mail() function only takes four parameters—to,
subject, message, and header—but in many cases certain headers have to
be set or the mail will not go through. Some servers will reject an
email if the FROM field is not included. For that reason, the headers
have to be manually concatenated with line feeds. Knowledge of mail
headers is necessary. Alternately, you can use a pre-written script
that you might find on the web. The same simple e-mail sent from PHP
might look like this:



[2003-03-31 14:18:53] rcflyer at myself dot com

PHP mail() will not send to hotmail? how come?  


 
Ive tried several hotmail addresses and ive tried several normal ISP
addresses and nothing send to hotmail addresses but all messages goto
normal addresses, does anyone know how to solve this problem? 

This is the function im using. 

mail( '"' . $emailto . '" <' . $emailto1 . '>', 
$subject, $Body, 
'Return-Path: "' . $From . '" <' . $From1 . ">\n" 
. 'From: "' . $From . '" <' . $From1 . ">\n" 
. 'Reply-To: "' . $From . '" <' . $From1 . ">\n" 
. "MIME-Version: 1.0\n Content-Type: multipart/mixed;\nX-Mailer: PHP/"
. phpversion() . "\n" 
. "X-From-IP: " . $REMOTE_ADDR ); 





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



#22984 [Bgs]: Date Function returning incorrect NAME of month

2003-03-31 Thread pollita
 ID:   22984
 Updated by:   [EMAIL PROTECTED]
 Reported By:  jeremyrimer at yahoo dot com
 Status:   Bogus
 Bug Type: Date/time related
 Operating System: win2kadvsrv
 PHP Version:  4.3.1
 New Comment:

Today (and you did submit this bug today) is 3/31/2003

Your calculation of 'next month' produces 4/31/2003

April only has 30 days

See your problem? :)



Previous Comments:


[2003-03-31 14:20:16] [EMAIL PROTECTED]

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

Thank you for your interest in PHP.

I'm pretty sure this is NOT a bug



[2003-03-31 11:05:57] jeremyrimer at yahoo dot com

So I have some code that prints out this and next month's calendar and
populates the cells with the day's events. Sometimes, and I can't find
root cause except to say that there MUST be a bug in the date()
function or the mktime() function because I have a line of code to
produce NEXTmonth's month name in text, and it is producing the month
TWO months later instead of 1, despite my +1 increment... 

$tyear = date("Y");
 // the year - 4 digit
$nyear = date("Y")+1;
$tmonth = date("n");// the 
month - no leading 0's
$nmonth = date("n")+1;
$tday = date("j"); 
 // the day as a number

date("F",mktime(0,0,0,$nmonth,$tday,$tyear));

This line can produce not the NEXT month, but TWO months later...
Driving me crazy...
-Jeremy




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



#22939 [Opn->Fbk]: imap_header_info crashes a page when the from, cc or bcc field is () or <>

2003-03-31 Thread iliaa
 ID:   22939
 Updated by:   [EMAIL PROTECTED]
 Reported By:  simon dot wilmer at milestoneip dot com
-Status:   Open
+Status:   Feedback
 Bug Type: IMAP related
 Operating System: Red Hat 8.0
 PHP Version:  4.3.1
 New Comment:

Please try using this CVS snapshot:

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




Previous Comments:


[2003-03-28 09:53:17] simon dot wilmer at milestoneip dot com

Hi,

Using PHP 4.3.0 and 4.3.1 with IMAP_2001.RELEASE-CANDIDATE.1 and
IMAP_2003.DEV.SNAP-0303181124 and Apache 1.3.27. The imap_header_info
function returns an obkect with headers from an email, when trying to
read the ->to, ->toaddress, ->cc, ->ccaddress, ->bcc, ->bccaddress
values the page will crash if the from, cc or bcc field in the email
itself is "()" or "<>" in the headers. Any normal text is fine, but the
values above cause the page to crash. 

There is no error message returned unfortunately. Below is some sample
code to test this.

Also you will need to set the "from" in an email to () or <> to cause
the problem. If anyone thinks it's a good idea I might email
[EMAIL PROTECTED] as someone could "break" the mailbox of any web based
email system by mailing an email with a "broken" from field.

Sample code:
subject." ";

$var = $headers->from;

if (is_array($var))
{
//This line is where the script "hangs"
echo $var[0]->mailbox."@".$var[0]->host;
}
?>




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



#22968 [Opn->Bgs]: error with libmcal 0.7 & libmcal drivers 0.9

2003-03-31 Thread iliaa
 ID:   22968
 Updated by:   [EMAIL PROTECTED]
 Reported By:  magz at bop dot nu
-Status:   Open
+Status:   Bogus
 Bug Type: MCAL related
 Operating System: Redhat 7.3
 PHP Version:  4CVS-2003-03-30 (stable)
 New Comment:

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

Thank you for your interest in PHP.

This is an issue with the mcal library and not PHP.


Previous Comments:


[2003-03-30 16:09:54] magz at bop dot nu

I have just downloaded the latest libmcal v0.7 and libmcal drivers v0.9
and was trying to install them with php.

No errors occured until I was going to ./configure apache.

Using php4-STABLE-200303301630.

 Preparing libmcal 

tar zxfv mcaldrivers-0.9.tar.gz
tar zxfv libmcal-0.7.tar.gz

cd mcal-drivers
mv * ../libmcal
cd ../libmcal/mstore
make

cd ../icap
make

cd ..
chmod a+x configure
./configure --with-mstore --with-icap
make

mkdir /var/calendar
chmod 1777 /var/calendar

(Without any errors)

 compiling php-latest-stable 
./configure \
--with-apache=../apache_1.3.27 \
--with-config-file-path=/etc \
--enable-inline-optimization \
--enable-magic-quotes \
--enable-track-vars \
--with-xml \
--with-dom \
--with-xmlrpc \
--with-mysql=/usr/local/mysql \
--enable-sockets \
--with-ldap \
--with-imap=/usr/local/imap-2002b \
--with-imap-ssl=/usr/local \
--with-mm \
--enable-memory-limit \
--enable-bcmath \
--enable-sigchild \
--with-zlib=/usr \
--with-curl=/usr/local \
--with-dom=/usr/include/libxml2/libxml \
--enable-exif \
--enable-ftp \
--with-gettext=/usr/share \
--with-gd \
--with-ttf \
--with-freetype-dir=/usr/local/include/freetype2/freetype \
--enable-gd-imgstrttf \
--with-png-dir=/usr \
--with-jpeg-dir=/usr \
--with-tiff-lib=/usr \
--with-openssl=/usr/local/ssl \
--with-mcrypt \
--with-mhash \
--with-pspell \
--with-imagick \
--enable-mime-magic

make
make install

(Without any errors)


 compiling apache 
SSL_BASE=/usr/local/ssl ./configure \
> --enable-module=ssl \
> --activate-module=src/modules/php4/libphp4.a \
> --activate-module=src/modules/extra/mod_geoip.c \
> --enable-rule=eapi \
> --enable-module=define \
> --enable-module=headers \
> --enable-module=info \
> --enable-module=rewrite \
> --enable-module=unique_id \
> --enable-module=digest \
> --enable-module=expires \
> --enable-module=so \
> --enable-module=usertrack
Configuring for Apache, Version 1.3.27
 + using installation path layout: Apache (config.layout)
 + activated php4 module (modules/php4/libphp4.a)
 + activated geoip module (modules/extra/mod_geoip.c)
Creating Makefile
Creating Configuration.apaci in src
Creating Makefile in src
 + configured for Linux platform
 + setting C compiler to gcc
 + setting C pre-processor to gcc -E
 + checking for system header files
 + adding selected modules
o rewrite_module uses ConfigStart/End
 + using -lndbm for DBM support
  enabling DBM support for mod_rewrite
o ssl_module uses ConfigStart/End
  + SSL interface: mod_ssl/2.8.14
  + SSL interface build type: OBJ
  + SSL interface compatibility: enabled
  + SSL interface experimental code: disabled
  + SSL interface conservative code: disabled
  + SSL interface vendor extensions: disabled
  + SSL interface plugin: Built-in SDBM
  + SSL library path: /usr/local/ssl
  + SSL library version: OpenSSL 0.9.7a Feb 19 2003
  + SSL library type: installed package (stand-alone)
o php4_module uses ConfigStart/End
o geoip_module uses ConfigStart/End
 + using -L/usr/local/lib -lGeoIP for GeoIP support
 + enabling Extended API (EAPI)
 + using system Expat
 + using -ldl for vendor DSO support
 + checking sizeof various data types
 + doing sanity check on compiler and options
** A test compilation with your Makefile configuration
** failed.  The below error output from the compilation
** test will give you an idea what is failing. Note that
** Apache requires an ANSI C Compiler, such as gcc. 

 Error Output for sanity check 
cd ..; gcc  -DLINUX=22 -I/usr/include/db1 -DMOD_SSL=208114 -DEAPI
`./apaci`   -L/usr/local/ssl/lib  -o helpers/dummy helpers/dummy.c  
-Wl,-rpath,/usr/local/ssl/lib -Wl,-rpath,/usr/local/lib
-Wl,-rpath,/usr/local/imap-2002b/lib -Wl,-rpath,/usr/src/apache/libmcal
-Wl,-rpath,/usr/local/mysql/lib  -rdynamic -L/usr/local/ssl/lib
-L/usr/local/lib -L/usr/local/imap-2002b/lib -L/usr/src/apache/libmcal
-L/usr/local/mysql/lib -Lmodules/php4 -L../modules/php4
-L../../modules/php4 -lmodphp4-rdynamic -L/usr/local/ssl/lib
-L/usr/local/lib -L/usr/local/imap-2002b/lib -L/usr/src/apache/libmcal
-L/usr/local/mysql/lib -lcrypt  -lmcal -lc-client  -lssl -lcrypto
-lexpat -lcrypt -lmm -lpspell -lmysqlclient -lmhash -lmcrypt -lltdl

#22988 [Opn->Ana]: I'm feeling lucky - rand() bug

2003-03-31 Thread pollita
 ID:   22988
 Updated by:   [EMAIL PROTECTED]
 Reported By:  vakmajom at freemail dot hu
-Status:   Open
+Status:   Analyzed
 Bug Type: Math related
 Operating System: Windows 2000
 PHP Version:  4.3.2RC1
 New Comment:

This is being caused by a carryover (2147483647 + 1 == -2147483648).  

The short answer is: "If it hurts, don't do it!"

Of course that's not a proper answer.  The API Macro could probably use
some tweaking...


Previous Comments:


[2003-03-31 12:36:52] vakmajom at freemail dot hu

The function rand() always returns an even number!
This bug appears when the parameters of rand() are near to the limits
of int (i.e. 2147483647)

Example:

Result: always an even number.

I'm using Apache 2.0.44 with PHP4.3.2RC1 (original Win32 binary) as an
apache module.

Tests with different systems:
Maybe this is a Windows bug, it still exists in Windows .Net server
build 3718 with PHP 4.3.0 RC3
But everything is fine on a unix system with PHP 4.1.0

Strange... :))




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



#22985 [Opn->Bgs]: max_input_time

2003-03-31 Thread iliaa
 ID:   22985
 Updated by:   [EMAIL PROTECTED]
 Reported By:  excalibur at hub dot org
-Status:   Open
+Status:   Bogus
 Bug Type: *Configuration Issues
 Operating System: FreeBSD 4.8RC
 PHP Version:  4.3.1
 New Comment:

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

If max_input_time == -1, then the value of max_execution_time is used
in it's place.


Previous Comments:


[2003-03-31 11:25:33] excalibur at hub dot org

Hi All, 

 Ok, been doing some testing in relation to the file uploads issue to
help a client of mine and found the following issue. With 4.3.x the
max_input_time definition in the php.ini file seems to be ignored.
Regardless of what I set it to in that file, phpinfo() only shows a -1
in the field and subsequently I can not upload any files larger then
about 32 Kbytes. Anything more then that and the upload completes and
the file disappears. 

 Doing a quick search around the net shows that the -1 was supposed to
define unlimited time??

 When I use a .htaccess file and set the value via:

  php_flag max_input_time 600

 phpinfo() shows the proper information, and that the 600 has taken
affect. At this time I can upload files upto the limits set via:

 upload_max_filesize = XXM

 I have a feeling that one of two things is happening, the "unlimited"
time is not being taken into account (if that is what the -1 denotes),
or the value is not being used at all via the php.ini settings, but
forcing it via a .htaccess file causes the value to be set properly..





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



#22969 [Opn->Bgs]: sent mail not received by some servers

2003-03-31 Thread iliaa
 ID:   22969
 Updated by:   [EMAIL PROTECTED]
 Reported By:  yellowjacket at email dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Mail related
 Operating System: apache
 PHP Version:  4.3.2RC1
 New Comment:

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

Thank you for your interest in PHP.

your CGI is likely adding some additional headers, which is what allows
your e-mail to go through. The solution would be to see what headers
are sent when CGI is used and what headers are sent by PHP and use the
headers argument of the mail() function to add any missing headers.


Previous Comments:


[2003-03-31 10:21:45] yellowjacket at email dot com

Please note that I am receiving an auto reply from you to
[EMAIL PROTECTED] which I am sure is being sent with PHP mail(). 
This would imply that you know what the problem is since your mail is
being received and mine is not.

If this is not a bug it is a least incomplete documentation of how to
use mail() to ensure delivery to all server types.

What is the appropriate syntax for mail() to ensure delivery?

Thank you.



[2003-03-31 10:03:06] yellowjacket at email dot com

Since I can sent email to those servers using cgi script and from other
email accounts, there is something that PHP is or is not doing that is
causing the servers to reject the incoming email if you feel that is
"bogus" or not a bug fine but my definition of a bug is something that
does not work consistently and mail() does not.

thanks,

yellowjacket



[2003-03-31 01:35:45] [EMAIL PROTECTED]

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

Thank you for your interest in PHP.

.



[2003-03-30 20:53:34] yellowjacket at email dot com

the mail()function is sending mail but some addresses are not receiving
it.  What is the issue with mail() that causes some servers not to
deliver the mail?  For example
I can not send email to [EMAIL PROTECTED] or to my hotmail
account.  There is a lot of discussion about this problem on various
sites but no solution.  I tried adding the return-path as suggested by
several sites.

Do you have a fix?

thanks,

Yellowjacket




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



#22983 [Opn->Fbk]: Page Cannot Be Displayed

2003-03-31 Thread iliaa
 ID:   22983
 Updated by:   [EMAIL PROTECTED]
 Reported By:  luke at cywh dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Sockets related
 Operating System: Windows XP
 PHP Version:  4CVS-2003-03-31 (stable)
 New Comment:

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

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

Thank you for your interest in PHP.





Previous Comments:


[2003-03-31 10:46:25] luke at cywh dot com

Numerous pages on my site are coming up as "page cannot be displayed".
it worked before i upgraded my php, but now its doing it. on my local
network it doesnt happen, but any computer outside my network it does
happen.

http://www.cywh.com <--- thats my site
http://cytech.cywh.com <--- other site, happens on order

it happens on numerous links, like "get hosted" or "other plans" and
others.

im not sure whats causing it, but it happened before, you guys adviced
me to upgrade to a snapshot, that seemed to fix it, i upgraded again to
another snap shot, and it started happening again.

i believe it only happens only on IE because you guys said it worked
and you were using a different browser (proboly on linux). please test
it on an IE browser.

im using IE 6.0

i have php installed to apache 2.0.44 as a module. i have numerious
virtual hosts setup on apache.

i have saved html code that is "supposed" to be generated by the page
and it does come up fine. im very sure it is related to a php.




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



#22576 [Opn->Fbk]: include() or require() file via HTTP wrapper

2003-03-31 Thread iliaa
 ID:   22576
 Updated by:   [EMAIL PROTECTED]
 Reported By:  mav at alkar dot net
-Status:   Open
+Status:   Feedback
 Bug Type: Scripting Engine problem
 Operating System: FreeBSD 4.8-RC
 PHP Version:  4.3.2-dev
 New Comment:

Please try using this CVS snapshot:

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

Cannot replicate using latest stable snapshot.


Previous Comments:


[2003-03-22 12:30:48] dave at socrates dot thinkhost dot com

I am having the same problem, my O/S is FreeBSD 4.8-RC as well, and the
PHP versions I am using is 4.3.1. I am running 4.3.2-RC1 on my own box,
same problem seems to exist there:

I setup some example scripts to show what is happening, they are
below:

[file.inc]


[test.php]
http://pub.thinkhost.com/file.inc";);
?>

When I call test.php, I get this:

Warning: main() [function.main]: stream does not support seeking in
http://pub.thinkhost.com/file.inc on line 0

?php echo "Hello World!\n"; ?> 

An error message, and it appears that the first byte of the response
from the web server to fetch file.inv has been nibbled off. Any idea
why?



[2003-03-06 15:44:24] mav at alkar dot net

I do it. Now I have another warning message:
Warning: main() [function.main]: stream does not support seeking in
/www/clients/commerce/darknes/www.spooky.dp.ua/pages/news.html on line
6

news.html is a PHP script here that have include() on a line 6.



[2003-03-06 15:34:02] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2003-03-06 15:30:51] mav at alkar dot net

When I write:
http://www.spooky.dp.ua/test.html";;
?>
and that file are not empty I take message:
Warning: main() [function.main]: stream does not support seeking in
http://www.spooky.dp.ua/test.html on line 0

PHP 4.3.1 compiled with options:
./configure \
--prefix=/usr/local \
--with-apxs=/usr/local/apache/bin/apxs \
--with-config-file-path=/usr/local/apache/conf \
--enable-memory-limit \
--with-mysql=/usr/local/mysql \
--with-gd=/usr/local \
--enable-trans-sid \
--enable-inline-optimization \
--enable-ftp \
--enable-dbase \
--enable-gd-native-ttf \
--with-ttf \
--with-freetype-dir=/usr/local \
--with-iconv \
--with-ming=/usr/local \
--with-zlib





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



#22992 [NEW]: make test - Bus Error sparc64 - Stream

2003-03-31 Thread mlm at mm-network dot com
From: mlm at mm-network dot com
Operating system: NetBSD 1.6
PHP version:  4.3.2RC1
PHP Bug Type: Reproducible crash
Bug description:  make test - Bus Error sparc64 - Stream

I have been fighting to get ANY release of PHP4 to compile and work
properly on my Ultra10 Sparc64 platform.  So,
I have decided to debug the latest release.  I am willing to be a testbed
for the developers and run whatever tests you want.  

I downloaded 4.3.2RC1 and compiled it on NetBSD 1.6 sparc64 
with the following config line:

./configure --enable-debug --with-apxs
--with-session=shared,/usr/pkg/lib/php/20020429 
--with-gettext=shared,/usr/pkg/lib/php/20020429
--with-pcre=shared,/usr/pkg/lib/php/20020429

When I ran make test, one of the tests that failed produced the following
output:

Bus error - core dumped
FAIL File/Stream functions [ext/standard/tests/file/002.phpt]

I did the same thing using gdb and produced the followng backtrace:

squirrel# gdb
GNU gdb 5.0nb1
Copyright 2000 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for
details.
This GDB was configured as "sparc64--netbsd".
(gdb) file sapi/cli/php
Reading symbols from sapi/cli/php...done.
(gdb) r ext/standard/tests/file/002.phpt
Starting program: /usr/home/mlm/php-4.3.2RC1/sapi/cli/php
ext/standard/tests/fil
e/002.phpt
--TEST--
File/Stream functions
--POST--
--GET--
--FILE--

Program received signal SIGBUS, Bus error.
0x278478 in php_stdiop_cast (stream=0x450c40, castas=1,
ret=0xaf74)
at /usr/home/mlm/php-4.3.2RC1/main/streams.c:1535
1535*ret = (void*)fd;
(gdb) bt
#0  0x278478 in php_stdiop_cast (stream=0x450c40, castas=1, 
ret=0xaf74) at
/usr/home/mlm/php-4.3.2RC1/main/streams.c:1535
#1  0x279a34 in _php_stream_cast (stream=0x450c40, castas=1, 
ret=0xaf74, show_err=0)
at /usr/home/mlm/php-4.3.2RC1/main/streams.c:2041
#2  0x276928 in _php_stream_copy_to_mem (src=0x450c40,
buf=0xb0a8, 
maxlen=0, persistent=0, __php_stream_call_depth=0, 
__zend_filename=0x2f07b8
"/usr/home/mlm/php-4.3.2RC1/ext/standard/file.c", 
__zend_lineno=432, __zend_orig_filename=0x0, __zend_orig_lineno=0)
at /usr/home/mlm/php-4.3.2RC1/main/streams.c:1096
#3  0x19d85c in zif_file_get_contents (ht=1, return_value=0x4b41c0, 
this_ptr=0x0, return_value_used=1)
at /usr/home/mlm/php-4.3.2RC1/ext/standard/file.c:432
#4  0x2daabc in execute (op_array=0x4b7040)
at /usr/home/mlm/php-4.3.2RC1/Zend/zend_execute.c:1606
#5  0x2be5dc in zend_execute_scripts (type=8, retval=0x0, file_count=3)
at /usr/home/mlm/php-4.3.2RC1/Zend/zend.c:864
#6  0x261a14 in php_execute_script (primary_file=0xd950)
at /usr/home/mlm/php-4.3.2RC1/main/main.c:1636
#7  0x2e3f00 in main (argc=2, argv=0xdae8)
at /usr/home/mlm/php-4.3.2RC1/sapi/cli/php_cli.c:753
#8  0x12429c in ___start ()
(gdb) exit

Tell me what to do next,

Thank You,
Mike Marshall


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



#22993 [NEW]: Bug #21131 but with Bus Error - Sparc64

2003-03-31 Thread mlm at mm-network dot com
From: mlm at mm-network dot com
Operating system: NetBSD 1.6
PHP version:  4.3.2RC1
PHP Bug Type: Reproducible crash
Bug description:  Bug #21131 but with Bus Error - Sparc64

What I did:

Compiled 4.3.2RC1 with the following line:

./configure --enable-debug --with-apxs
--with-session=shared,/usr/pkg/lib/php/20020429 
--with-gettext=shared,/usr/pkg/lib/php/20020429
--with-pcre=shared,/usr/pkg/lib/php/20020429

Ran make test and one of the Bus Errors reported was the
following:

Bus error - core dumped
FAIL Bug #21131: fopen($filename, "a+") has broken position
[ext/standard/tests/
file/bug21131.phpt]

So, I ran gdb and got:
GNU gdb 5.0nb1
Copyright 2000 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for
details.
This GDB was configured as "sparc64--netbsd".
(gdb) file sapi/cli/php
Reading symbols from sapi/cli/php...done.
(gdb) r ext/standard/tests/file/bug21131.phpt
Starting program: /usr/home/mlm/php-4.3.2RC1/sapi/cli/php
ext/standard/tests/fil
e/bug21131.phpt
--TEST--
Bug #21131: fopen($filename, "a+") has broken position
--FILE--

Program received signal SIGBUS, Bus error.
0x278478 in php_stdiop_cast (stream=0x450a40, castas=1,
ret=0x8e2c)
at /usr/home/mlm/php-4.3.2RC1/main/streams.c:1535
1535*ret = (void*)fd;
(gdb) bt
#0  0x278478 in php_stdiop_cast (stream=0x450a40, castas=1, 
ret=0x8e2c) at
/usr/home/mlm/php-4.3.2RC1/main/streams.c:1535
#1  0x279a34 in _php_stream_cast (stream=0x450a40, castas=1, 
ret=0x8e2c, show_err=0)
at /usr/home/mlm/php-4.3.2RC1/main/streams.c:2041
#2  0x2764f0 in _php_stream_passthru (stream=0x450a40, 
__php_stream_call_depth=0, 
__zend_filename=0x2f07b8
"/usr/home/mlm/php-4.3.2RC1/ext/standard/file.c", 
__zend_lineno=1825, __zend_orig_filename=0x0, __zend_orig_lineno=0)
at /usr/home/mlm/php-4.3.2RC1/main/streams.c:1031
#3  0x1a3eb0 in zif_fpassthru (ht=1, return_value=0x4b41c0, this_ptr=0x0,

return_value_used=0) at
/usr/home/mlm/php-4.3.2RC1/ext/standard/file.c:1825
#4  0x2daabc in execute (op_array=0x4b7040)
at /usr/home/mlm/php-4.3.2RC1/Zend/zend_execute.c:1606
#5  0x2be5dc in zend_execute_scripts (type=8, retval=0x0, file_count=3)
at /usr/home/mlm/php-4.3.2RC1/Zend/zend.c:864
#6  0x261a14 in php_execute_script (primary_file=0xd940)
at /usr/home/mlm/php-4.3.2RC1/main/main.c:1636
#7  0x2e3f00 in main (argc=2, argv=0xdad8)
at /usr/home/mlm/php-4.3.2RC1/sapi/cli/php_cli.c:753
#8  0x12429c in ___start ()
(gdb) quit


What do I do next?

Mike Marshall

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



#22995 [NEW]: if ( $something == "NAME") { print $something } prints "0"

2003-03-31 Thread hermandepauw at hotmail dot com
From: hermandepauw at hotmail dot com
Operating system: Red Hat Linux
PHP version:  4.3.0
PHP Bug Type: Unknown/Other Function
Bug description:  if ( $something == "NAME") { print $something } prints "0"

if ( $something == "NAME") { print $something } prints "0"

the main problem is in the summary ... example code and source on
http://www.deparadox.be/php/ i don't know the explain it in words so get a
view ... code is only ~10 lines 
-- 
Edit bug report at http://bugs.php.net/?id=22995&edit=1
-- 
Try a CVS snapshot: http://bugs.php.net/fix.php?id=22995&r=trysnapshot
Fixed in CVS:   http://bugs.php.net/fix.php?id=22995&r=fixedcvs
Fixed in release:   http://bugs.php.net/fix.php?id=22995&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=22995&r=needtrace
Try newer version:  http://bugs.php.net/fix.php?id=22995&r=oldversion
Not developer issue:http://bugs.php.net/fix.php?id=22995&r=support
Expected behavior:  http://bugs.php.net/fix.php?id=22995&r=notwrong
Not enough info:http://bugs.php.net/fix.php?id=22995&r=notenoughinfo
Submitted twice:http://bugs.php.net/fix.php?id=22995&r=submittedtwice
register_globals:   http://bugs.php.net/fix.php?id=22995&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=22995&r=php3
Daylight Savings:   http://bugs.php.net/fix.php?id=22995&r=dst
IIS Stability:  http://bugs.php.net/fix.php?id=22995&r=isapi
Install GNU Sed:http://bugs.php.net/fix.php?id=22995&r=gnused



#22994 [NEW]: if ( $something == "NAME") { print $something } prints "0"

2003-03-31 Thread hermandepauw at hotmail dot com
From: hermandepauw at hotmail dot com
Operating system: Red Hat Linux
PHP version:  4.3.0
PHP Bug Type: Unknown/Other Function
Bug description:  if ( $something == "NAME") { print $something } prints "0"

if ( $something == "NAME") { print $something } prints "0"

the main problem is in the summary ... example code and source on
http://www.deparadox.be/php/ i don't know the explain it in words so get a
view ... code is only ~10 lines 
-- 
Edit bug report at http://bugs.php.net/?id=22994&edit=1
-- 
Try a CVS snapshot: http://bugs.php.net/fix.php?id=22994&r=trysnapshot
Fixed in CVS:   http://bugs.php.net/fix.php?id=22994&r=fixedcvs
Fixed in release:   http://bugs.php.net/fix.php?id=22994&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=22994&r=needtrace
Try newer version:  http://bugs.php.net/fix.php?id=22994&r=oldversion
Not developer issue:http://bugs.php.net/fix.php?id=22994&r=support
Expected behavior:  http://bugs.php.net/fix.php?id=22994&r=notwrong
Not enough info:http://bugs.php.net/fix.php?id=22994&r=notenoughinfo
Submitted twice:http://bugs.php.net/fix.php?id=22994&r=submittedtwice
register_globals:   http://bugs.php.net/fix.php?id=22994&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=22994&r=php3
Daylight Savings:   http://bugs.php.net/fix.php?id=22994&r=dst
IIS Stability:  http://bugs.php.net/fix.php?id=22994&r=isapi
Install GNU Sed:http://bugs.php.net/fix.php?id=22994&r=gnused



#22996 [NEW]: Bug #22510/Segfault, but in different place Sparc64

2003-03-31 Thread mlm at mm-network dot com
From: mlm at mm-network dot com
Operating system: NetBSD 1.6
PHP version:  4.3.2RC1
PHP Bug Type: Reproducible crash
Bug description:  Bug #22510/Segfault, but in different place Sparc64

What I did:

Compiled 4.3.2RC1 on my Sun Ultra10/Sparc64 NetBSD 1.6.

Used:
./configure --enable-debug --with-apxs
--with-session=shared,/usr/pkg/lib/php/20
020429  --with-gettext=shared,/usr/pkg/lib/php/20020429
--with-pcre=shared,/usr/
pkg/lib/php/20020429

Ran make test and one of the tests that failed follows:

Segmentation fault - core dumped
FAIL Bug #22510 (segfault among complex references)
[tests/lang/bug22510.phpt]

So, I ran gdb and the backtrace follows:

gdb
GNU gdb 5.0nb1
Copyright 2000 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for
details.
This GDB was configured as "sparc64--netbsd".
(gdb) file sapi/cli/php
Reading symbols from sapi/cli/php...done.
(gdb) r tests/lang/bug22510.phpt
Starting program: /usr/home/mlm/php-4.3.2RC1/sapi/cli/php
tests/lang/bug22510.ph
pt
--TEST--
Bug #22510 (segfault among complex references)
--FILE--
ok1
bar::run1
foo::method1
foo::method1
foo::finalize
done!
ok2
bar::run2
foo::method2
foo::method2
foo::finalize
done!
ok3
bar::run3
foo::method3
foo::method3
foo::finalize
done!
ouch
bar::run1
foo::method1
foo::method1
foo::finalize
[Mon Mar 31 19:20:58 2003]  Script:  'tests/lang/bug22510.phpt'
---
/usr/home/mlm/php-4.3.2RC1/Zend/zend_execute.c(271) : Block 0x00442140
status:
Beginning:  Overrun (magic=0x, expected=0x7312F8DC)

Program received signal SIGSEGV, Segmentation fault.
0x40779970 in bcopy () from /usr/lib/libc.so.12
(gdb) bt
#0  0x40779970 in bcopy () from /usr/lib/libc.so.12
#1  0x2a0c60 in _mem_block_check (ptr=0x442180, silent=0, 
__zend_filename=0x311e78
"/usr/home/mlm/php-4.3.2RC1/Zend/zend_execute.c", 
__zend_lineno=271, __zend_orig_filename=0x0, __zend_orig_lineno=0)
at /usr/home/mlm/php-4.3.2RC1/Zend/zend_alloc.c:649
#2  0x2a0c14 in _mem_block_check (ptr=0x442180, silent=1, 
__zend_filename=0x311e78
"/usr/home/mlm/php-4.3.2RC1/Zend/zend_execute.c", 
__zend_lineno=271, __zend_orig_filename=0x0, __zend_orig_lineno=0)
at /usr/home/mlm/php-4.3.2RC1/Zend/zend_alloc.c:641
#3  0x29f3cc in _efree (ptr=0x442180, 
__zend_filename=0x311e78
"/usr/home/mlm/php-4.3.2RC1/Zend/zend_execute.c", 
__zend_lineno=271, __zend_orig_filename=0x0, __zend_orig_lineno=0)
at /usr/home/mlm/php-4.3.2RC1/Zend/zend_alloc.c:217
#4  0x2d42d4 in zend_assign_to_variable_reference (result=0x4c0408, 
variable_ptr_ptr=0x4c7658, value_ptr_ptr=0x4ae658,
Ts=0xaa50)
at /usr/home/mlm/php-4.3.2RC1/Zend/zend_execute.c:271
#5  0x2d960c in execute (op_array=0x4b7c40)
at /usr/home/mlm/php-4.3.2RC1/Zend/zend_execute.c:1354
#6  0x2dae3c in execute (op_array=0x4b7040)
at /usr/home/mlm/php-4.3.2RC1/Zend/zend_execute.c:1650
#7  0x2be5dc in zend_execute_scripts (type=8, retval=0x0, file_count=3)
at /usr/home/mlm/php-4.3.2RC1/Zend/zend.c:864
#8  0x261a14 in php_execute_script (primary_file=0xd950)
---Type  to continue, or q  to quit---
at /usr/home/mlm/php-4.3.2RC1/main/main.c:1636
#9  0x2e3f00 in main (argc=2, argv=0xdae8)
at /usr/home/mlm/php-4.3.2RC1/sapi/cli/php_cli.c:753
#10 0x12429c in ___start ()
(gdb) quit

Trying desprately to find a release that works on Sparc64,

So, let me know what I can do to help debug this,

Thank You,
Mike Marshall

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



#22995 [Opn->Csd]: if ( $something == "NAME") { print $something } prints "0"

2003-03-31 Thread hermandepauw at hotmail dot com
 ID:   22995
 User updated by:  hermandepauw at hotmail dot com
 Reported By:  hermandepauw at hotmail dot com
-Status:   Open
+Status:   Closed
 Bug Type: Unknown/Other Function
 Operating System: Red Hat Linux
 PHP Version:  4.3.0
 New Comment:

Due to traffic probs this bug was submitted twice ... my excuses


Previous Comments:


[2003-03-31 16:47:37] hermandepauw at hotmail dot com

if ( $something == "NAME") { print $something } prints "0"

the main problem is in the summary ... example code and source on
http://www.deparadox.be/php/ i don't know the explain it in words so
get a view ... code is only ~10 lines 




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



#22992 [Opn->Fbk]: make test - Bus Error sparc64 - Stream

2003-03-31 Thread wez
 ID:   22992
 Updated by:   [EMAIL PROTECTED]
 Reported By:  mlm at mm-network dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Reproducible crash
 Operating System: NetBSD 1.6
 PHP Version:  4.3.2RC1
 New Comment:

Please try using this CVS snapshot:

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

This should have already been fixed in the stable snapshot.  Please
give it a try.


Previous Comments:


[2003-03-31 16:23:57] mlm at mm-network dot com

I have been fighting to get ANY release of PHP4 to compile and work
properly on my Ultra10 Sparc64 platform.  So,
I have decided to debug the latest release.  I am willing to be a
testbed for the developers and run whatever tests you want.  

I downloaded 4.3.2RC1 and compiled it on NetBSD 1.6 sparc64 
with the following config line:

./configure --enable-debug --with-apxs
--with-session=shared,/usr/pkg/lib/php/20020429 
--with-gettext=shared,/usr/pkg/lib/php/20020429
--with-pcre=shared,/usr/pkg/lib/php/20020429

When I ran make test, one of the tests that failed produced the
following output:

Bus error - core dumped
FAIL File/Stream functions [ext/standard/tests/file/002.phpt]

I did the same thing using gdb and produced the followng backtrace:

squirrel# gdb
GNU gdb 5.0nb1
Copyright 2000 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and
you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for
details.
This GDB was configured as "sparc64--netbsd".
(gdb) file sapi/cli/php
Reading symbols from sapi/cli/php...done.
(gdb) r ext/standard/tests/file/002.phpt
Starting program: /usr/home/mlm/php-4.3.2RC1/sapi/cli/php
ext/standard/tests/fil
e/002.phpt
--TEST--
File/Stream functions
--POST--
--GET--
--FILE--

Program received signal SIGBUS, Bus error.
0x278478 in php_stdiop_cast (stream=0x450c40, castas=1,
ret=0xaf74)
at /usr/home/mlm/php-4.3.2RC1/main/streams.c:1535
1535*ret = (void*)fd;
(gdb) bt
#0  0x278478 in php_stdiop_cast (stream=0x450c40, castas=1, 
ret=0xaf74) at
/usr/home/mlm/php-4.3.2RC1/main/streams.c:1535
#1  0x279a34 in _php_stream_cast (stream=0x450c40, castas=1, 
ret=0xaf74, show_err=0)
at /usr/home/mlm/php-4.3.2RC1/main/streams.c:2041
#2  0x276928 in _php_stream_copy_to_mem (src=0x450c40,
buf=0xb0a8, 
maxlen=0, persistent=0, __php_stream_call_depth=0, 
__zend_filename=0x2f07b8
"/usr/home/mlm/php-4.3.2RC1/ext/standard/file.c", 
__zend_lineno=432, __zend_orig_filename=0x0, __zend_orig_lineno=0)
at /usr/home/mlm/php-4.3.2RC1/main/streams.c:1096
#3  0x19d85c in zif_file_get_contents (ht=1, return_value=0x4b41c0, 
this_ptr=0x0, return_value_used=1)
at /usr/home/mlm/php-4.3.2RC1/ext/standard/file.c:432
#4  0x2daabc in execute (op_array=0x4b7040)
at /usr/home/mlm/php-4.3.2RC1/Zend/zend_execute.c:1606
#5  0x2be5dc in zend_execute_scripts (type=8, retval=0x0,
file_count=3)
at /usr/home/mlm/php-4.3.2RC1/Zend/zend.c:864
#6  0x261a14 in php_execute_script (primary_file=0xd950)
at /usr/home/mlm/php-4.3.2RC1/main/main.c:1636
#7  0x2e3f00 in main (argc=2, argv=0xdae8)
at /usr/home/mlm/php-4.3.2RC1/sapi/cli/php_cli.c:753
#8  0x12429c in ___start ()
(gdb) exit

Tell me what to do next,

Thank You,
Mike Marshall






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



#22993 [Opn->Fbk]: Bug #21131 but with Bus Error - Sparc64

2003-03-31 Thread wez
 ID:   22993
 Updated by:   [EMAIL PROTECTED]
 Reported By:  mlm at mm-network dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Reproducible crash
 Operating System: NetBSD 1.6
 PHP Version:  4.3.2RC1
 New Comment:

Please try using this CVS snapshot:

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




Previous Comments:


[2003-03-31 16:32:45] mlm at mm-network dot com

What I did:

Compiled 4.3.2RC1 with the following line:

./configure --enable-debug --with-apxs
--with-session=shared,/usr/pkg/lib/php/20020429 
--with-gettext=shared,/usr/pkg/lib/php/20020429
--with-pcre=shared,/usr/pkg/lib/php/20020429

Ran make test and one of the Bus Errors reported was the
following:

Bus error - core dumped
FAIL Bug #21131: fopen($filename, "a+") has broken position
[ext/standard/tests/
file/bug21131.phpt]

So, I ran gdb and got:
GNU gdb 5.0nb1
Copyright 2000 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and
you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for
details.
This GDB was configured as "sparc64--netbsd".
(gdb) file sapi/cli/php
Reading symbols from sapi/cli/php...done.
(gdb) r ext/standard/tests/file/bug21131.phpt
Starting program: /usr/home/mlm/php-4.3.2RC1/sapi/cli/php
ext/standard/tests/fil
e/bug21131.phpt
--TEST--
Bug #21131: fopen($filename, "a+") has broken position
--FILE--

Program received signal SIGBUS, Bus error.
0x278478 in php_stdiop_cast (stream=0x450a40, castas=1,
ret=0x8e2c)
at /usr/home/mlm/php-4.3.2RC1/main/streams.c:1535
1535*ret = (void*)fd;
(gdb) bt
#0  0x278478 in php_stdiop_cast (stream=0x450a40, castas=1, 
ret=0x8e2c) at
/usr/home/mlm/php-4.3.2RC1/main/streams.c:1535
#1  0x279a34 in _php_stream_cast (stream=0x450a40, castas=1, 
ret=0x8e2c, show_err=0)
at /usr/home/mlm/php-4.3.2RC1/main/streams.c:2041
#2  0x2764f0 in _php_stream_passthru (stream=0x450a40, 
__php_stream_call_depth=0, 
__zend_filename=0x2f07b8
"/usr/home/mlm/php-4.3.2RC1/ext/standard/file.c", 
__zend_lineno=1825, __zend_orig_filename=0x0,
__zend_orig_lineno=0)
at /usr/home/mlm/php-4.3.2RC1/main/streams.c:1031
#3  0x1a3eb0 in zif_fpassthru (ht=1, return_value=0x4b41c0,
this_ptr=0x0, 
return_value_used=0) at
/usr/home/mlm/php-4.3.2RC1/ext/standard/file.c:1825
#4  0x2daabc in execute (op_array=0x4b7040)
at /usr/home/mlm/php-4.3.2RC1/Zend/zend_execute.c:1606
#5  0x2be5dc in zend_execute_scripts (type=8, retval=0x0,
file_count=3)
at /usr/home/mlm/php-4.3.2RC1/Zend/zend.c:864
#6  0x261a14 in php_execute_script (primary_file=0xd940)
at /usr/home/mlm/php-4.3.2RC1/main/main.c:1636
#7  0x2e3f00 in main (argc=2, argv=0xdad8)
at /usr/home/mlm/php-4.3.2RC1/sapi/cli/php_cli.c:753
#8  0x12429c in ___start ()
(gdb) quit


What do I do next?

Mike Marshall





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



#22996 [Opn->Fbk]: Bug #22510/Segfault, but in different place Sparc64

2003-03-31 Thread wez
 ID:   22996
 Updated by:   [EMAIL PROTECTED]
 Reported By:  mlm at mm-network dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Reproducible crash
 Operating System: NetBSD 1.6
 PHP Version:  4.3.2RC1
 New Comment:

Please try using this CVS snapshot:

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




Previous Comments:


[2003-03-31 16:50:58] mlm at mm-network dot com

What I did:

Compiled 4.3.2RC1 on my Sun Ultra10/Sparc64 NetBSD 1.6.

Used:
./configure --enable-debug --with-apxs
--with-session=shared,/usr/pkg/lib/php/20
020429  --with-gettext=shared,/usr/pkg/lib/php/20020429
--with-pcre=shared,/usr/
pkg/lib/php/20020429

Ran make test and one of the tests that failed follows:

Segmentation fault - core dumped
FAIL Bug #22510 (segfault among complex references)
[tests/lang/bug22510.phpt]

So, I ran gdb and the backtrace follows:

gdb
GNU gdb 5.0nb1
Copyright 2000 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and
you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for
details.
This GDB was configured as "sparc64--netbsd".
(gdb) file sapi/cli/php
Reading symbols from sapi/cli/php...done.
(gdb) r tests/lang/bug22510.phpt
Starting program: /usr/home/mlm/php-4.3.2RC1/sapi/cli/php
tests/lang/bug22510.ph
pt
--TEST--
Bug #22510 (segfault among complex references)
--FILE--
ok1
bar::run1
foo::method1
foo::method1
foo::finalize
done!
ok2
bar::run2
foo::method2
foo::method2
foo::finalize
done!
ok3
bar::run3
foo::method3
foo::method3
foo::finalize
done!
ouch
bar::run1
foo::method1
foo::method1
foo::finalize
[Mon Mar 31 19:20:58 2003]  Script:  'tests/lang/bug22510.phpt'
---
/usr/home/mlm/php-4.3.2RC1/Zend/zend_execute.c(271) : Block 0x00442140
status:
Beginning:  Overrun (magic=0x, expected=0x7312F8DC)

Program received signal SIGSEGV, Segmentation fault.
0x40779970 in bcopy () from /usr/lib/libc.so.12
(gdb) bt
#0  0x40779970 in bcopy () from /usr/lib/libc.so.12
#1  0x2a0c60 in _mem_block_check (ptr=0x442180, silent=0, 
__zend_filename=0x311e78
"/usr/home/mlm/php-4.3.2RC1/Zend/zend_execute.c", 
__zend_lineno=271, __zend_orig_filename=0x0, __zend_orig_lineno=0)
at /usr/home/mlm/php-4.3.2RC1/Zend/zend_alloc.c:649
#2  0x2a0c14 in _mem_block_check (ptr=0x442180, silent=1, 
__zend_filename=0x311e78
"/usr/home/mlm/php-4.3.2RC1/Zend/zend_execute.c", 
__zend_lineno=271, __zend_orig_filename=0x0, __zend_orig_lineno=0)
at /usr/home/mlm/php-4.3.2RC1/Zend/zend_alloc.c:641
#3  0x29f3cc in _efree (ptr=0x442180, 
__zend_filename=0x311e78
"/usr/home/mlm/php-4.3.2RC1/Zend/zend_execute.c", 
__zend_lineno=271, __zend_orig_filename=0x0, __zend_orig_lineno=0)
at /usr/home/mlm/php-4.3.2RC1/Zend/zend_alloc.c:217
#4  0x2d42d4 in zend_assign_to_variable_reference (result=0x4c0408, 
variable_ptr_ptr=0x4c7658, value_ptr_ptr=0x4ae658,
Ts=0xaa50)
at /usr/home/mlm/php-4.3.2RC1/Zend/zend_execute.c:271
#5  0x2d960c in execute (op_array=0x4b7c40)
at /usr/home/mlm/php-4.3.2RC1/Zend/zend_execute.c:1354
#6  0x2dae3c in execute (op_array=0x4b7040)
at /usr/home/mlm/php-4.3.2RC1/Zend/zend_execute.c:1650
#7  0x2be5dc in zend_execute_scripts (type=8, retval=0x0,
file_count=3)
at /usr/home/mlm/php-4.3.2RC1/Zend/zend.c:864
#8  0x261a14 in php_execute_script (primary_file=0xd950)
---Type  to continue, or q  to quit---
at /usr/home/mlm/php-4.3.2RC1/main/main.c:1636
#9  0x2e3f00 in main (argc=2, argv=0xdae8)
at /usr/home/mlm/php-4.3.2RC1/sapi/cli/php_cli.c:753
#10 0x12429c in ___start ()
(gdb) quit

Trying desprately to find a release that works on Sparc64,

So, let me know what I can do to help debug this,

Thank You,
Mike Marshall





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



#22996 [Fbk->Bgs]: Bug #22510/Segfault, but in different place Sparc64

2003-03-31 Thread moriyoshi
 ID:   22996
 Updated by:   [EMAIL PROTECTED]
 Reported By:  mlm at mm-network dot com
-Status:   Feedback
+Status:   Bogus
 Bug Type: Reproducible crash
 Operating System: NetBSD 1.6
 PHP Version:  4.3.2RC1
 New Comment:

First thank you for helping our QA. But please put your comments and
backtraces at the relevant bug page or send them to
[EMAIL PROTECTED] directly rather than open a new report. Otherwise
it would definitely end up in a mess.



Previous Comments:


[2003-03-31 16:59:53] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2003-03-31 16:50:58] mlm at mm-network dot com

What I did:

Compiled 4.3.2RC1 on my Sun Ultra10/Sparc64 NetBSD 1.6.

Used:
./configure --enable-debug --with-apxs
--with-session=shared,/usr/pkg/lib/php/20
020429  --with-gettext=shared,/usr/pkg/lib/php/20020429
--with-pcre=shared,/usr/
pkg/lib/php/20020429

Ran make test and one of the tests that failed follows:

Segmentation fault - core dumped
FAIL Bug #22510 (segfault among complex references)
[tests/lang/bug22510.phpt]

So, I ran gdb and the backtrace follows:

gdb
GNU gdb 5.0nb1
Copyright 2000 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and
you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for
details.
This GDB was configured as "sparc64--netbsd".
(gdb) file sapi/cli/php
Reading symbols from sapi/cli/php...done.
(gdb) r tests/lang/bug22510.phpt
Starting program: /usr/home/mlm/php-4.3.2RC1/sapi/cli/php
tests/lang/bug22510.ph
pt
--TEST--
Bug #22510 (segfault among complex references)
--FILE--
ok1
bar::run1
foo::method1
foo::method1
foo::finalize
done!
ok2
bar::run2
foo::method2
foo::method2
foo::finalize
done!
ok3
bar::run3
foo::method3
foo::method3
foo::finalize
done!
ouch
bar::run1
foo::method1
foo::method1
foo::finalize
[Mon Mar 31 19:20:58 2003]  Script:  'tests/lang/bug22510.phpt'
---
/usr/home/mlm/php-4.3.2RC1/Zend/zend_execute.c(271) : Block 0x00442140
status:
Beginning:  Overrun (magic=0x, expected=0x7312F8DC)

Program received signal SIGSEGV, Segmentation fault.
0x40779970 in bcopy () from /usr/lib/libc.so.12
(gdb) bt
#0  0x40779970 in bcopy () from /usr/lib/libc.so.12
#1  0x2a0c60 in _mem_block_check (ptr=0x442180, silent=0, 
__zend_filename=0x311e78
"/usr/home/mlm/php-4.3.2RC1/Zend/zend_execute.c", 
__zend_lineno=271, __zend_orig_filename=0x0, __zend_orig_lineno=0)
at /usr/home/mlm/php-4.3.2RC1/Zend/zend_alloc.c:649
#2  0x2a0c14 in _mem_block_check (ptr=0x442180, silent=1, 
__zend_filename=0x311e78
"/usr/home/mlm/php-4.3.2RC1/Zend/zend_execute.c", 
__zend_lineno=271, __zend_orig_filename=0x0, __zend_orig_lineno=0)
at /usr/home/mlm/php-4.3.2RC1/Zend/zend_alloc.c:641
#3  0x29f3cc in _efree (ptr=0x442180, 
__zend_filename=0x311e78
"/usr/home/mlm/php-4.3.2RC1/Zend/zend_execute.c", 
__zend_lineno=271, __zend_orig_filename=0x0, __zend_orig_lineno=0)
at /usr/home/mlm/php-4.3.2RC1/Zend/zend_alloc.c:217
#4  0x2d42d4 in zend_assign_to_variable_reference (result=0x4c0408, 
variable_ptr_ptr=0x4c7658, value_ptr_ptr=0x4ae658,
Ts=0xaa50)
at /usr/home/mlm/php-4.3.2RC1/Zend/zend_execute.c:271
#5  0x2d960c in execute (op_array=0x4b7c40)
at /usr/home/mlm/php-4.3.2RC1/Zend/zend_execute.c:1354
#6  0x2dae3c in execute (op_array=0x4b7040)
at /usr/home/mlm/php-4.3.2RC1/Zend/zend_execute.c:1650
#7  0x2be5dc in zend_execute_scripts (type=8, retval=0x0,
file_count=3)
at /usr/home/mlm/php-4.3.2RC1/Zend/zend.c:864
#8  0x261a14 in php_execute_script (primary_file=0xd950)
---Type  to continue, or q  to quit---
at /usr/home/mlm/php-4.3.2RC1/main/main.c:1636
#9  0x2e3f00 in main (argc=2, argv=0xdae8)
at /usr/home/mlm/php-4.3.2RC1/sapi/cli/php_cli.c:753
#10 0x12429c in ___start ()
(gdb) quit

Trying desprately to find a release that works on Sparc64,

So, let me know what I can do to help debug this,

Thank You,
Mike Marshall





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



#22994 [Opn->Bgs]: if ( $something == "NAME") { print $something } prints "0"

2003-03-31 Thread rasmus
 ID:   22994
 Updated by:   [EMAIL PROTECTED]
 Reported By:  hermandepauw at hotmail dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Unknown/Other Function
 Operating System: Red Hat Linux
 PHP Version:  4.3.0
 New Comment:

Use === if you want to check both type and value.  The numerical value
of "NAME" is indeed 0, so if $something is 0 the condition will be
true.


Previous Comments:


[2003-03-31 16:45:16] hermandepauw at hotmail dot com

if ( $something == "NAME") { print $something } prints "0"

the main problem is in the summary ... example code and source on
http://www.deparadox.be/php/ i don't know the explain it in words so
get a view ... code is only ~10 lines 




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



#22921 [Opn->Bgs]: PHP EXE crashes with "could not read memory"

2003-03-31 Thread phanto
 ID:   22921
 Updated by:   [EMAIL PROTECTED]
 Reported By:  tohlow at novadys dot com
-Status:   Open
+Status:   Bogus
 Bug Type: COM related
 Operating System: win 2k
 PHP Version:  4.3.2RC1
 New Comment:

closing.


Previous Comments:


[2003-03-31 03:04:38] tohlow at novadys dot com

Hi guys,

I am REALLY sorry about this, I do need to apologise: Everything is
working fine in RC1!
Thanks for nudging to the sample script, as regards the crash, there
was a problem with the custom COM server we use when using enumeration
objects, this did not crash in PHP 4.23, but after... Apology for
this!

As regards the unfreed COM reference, this is working fine as well, the
problem was an uncleared subreference to this particular object...

Lads, sorry again and thanks a million for your fast reaction and help:
I am looking very forward to 4.32!
T



[2003-03-28 12:50:35] [EMAIL PROTECTED]

could you please provide a simple script to reproduce that. the problem
is known with 4.3.0 and 4.3.1 but should be fixed since then.

ps: magnus, please stop acting snotty like jani



[2003-03-27 17:05:34] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2003-03-27 05:03:56] tohlow at novadys dot com

I know this is a pain in the neck, because there already is a couple of
entries similar to this BUT I hope I can provide some extra info.

I am developing a DCOM based PHP application and have just tried with
4.32 RC1. PHP.EXE simply crashes, apparently when clearing up its
object tables (when PHP.EXE unloads from memory, it seems to try to
clear up too many object references, unfortunately I cannot be more
specific because I am no C++ developper). Actually, we had been in
contact with Harald Radi before and he found the problem, fixed it for
PHP 4.23, but it got back in in release 4.30 :(

In RC1 now, it crashes, same for all releases between 4.30 and 4.32 and
4.10 and 4.22.

One additional problem is, that in the only working release (4.23),
when clearing up the object references, apparently NOT all are being
cleared up, resulting in kept alive objects which - as a consequence in
my case - don't free the licenses to our DCOM server :(
The only PHP version that I found that BOTH does NOT crash AND frees
ALL references correctly is 4.06.

One last hint: 4.31 crashes BUT correctly frees the references...

Hope this is not all too confusing and that there will be a fix in the
final release of 4.32, it would be greatly appreciated by a lot of
people, I think, definetly by myself!
Thanks, T

P.S.: It seems to be the same for IIS and Apache...




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



#22510 [Ver]: Zend Engine crashes calling FREE_ZVAL from zend_assign_to_variable_reference

2003-03-31 Thread moriyoshi
 ID:   22510
 Updated by:   [EMAIL PROTECTED]
 Reported By:  php at codewhore dot org
 Status:   Verified
 Bug Type: Scripting Engine problem
 Operating System: Linux 2.4
 PHP Version:  4CVS-2003-03-04 (stable)
 New Comment:

(pasted from bug #22996) user supplied comment & backtrace

What I did:

Compiled 4.3.2RC1 on my Sun Ultra10/Sparc64 NetBSD 1.6.

Used:
./configure --enable-debug --with-apxs
--with-session=shared,/usr/pkg/lib/php/20
020429  --with-gettext=shared,/usr/pkg/lib/php/20020429
--with-pcre=shared,/usr/
pkg/lib/php/20020429

Ran make test and one of the tests that failed follows:

Segmentation fault - core dumped
FAIL Bug #22510 (segfault among complex references)
[tests/lang/bug22510.phpt]

So, I ran gdb and the backtrace follows:

gdb
GNU gdb 5.0nb1
Copyright 2000 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and
you
are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for
details.
This GDB was configured as "sparc64--netbsd".
(gdb) file sapi/cli/php
Reading symbols from sapi/cli/php...done.
(gdb) r tests/lang/bug22510.phpt
Starting program: /usr/home/mlm/php-4.3.2RC1/sapi/cli/php
tests/lang/bug22510.ph
pt
--TEST--
Bug #22510 (segfault among complex references)
--FILE--
ok1
bar::run1
foo::method1
foo::method1
foo::finalize
done!
ok2
bar::run2
foo::method2
foo::method2
foo::finalize
done!
ok3
bar::run3
foo::method3
foo::method3
foo::finalize
done!
ouch
bar::run1
foo::method1
foo::method1
foo::finalize
[Mon Mar 31 19:20:58 2003]  Script:  'tests/lang/bug22510.phpt'
---
/usr/home/mlm/php-4.3.2RC1/Zend/zend_execute.c(271) : Block 0x00442140
status:
Beginning:  Overrun (magic=0x, expected=0x7312F8DC)

Program received signal SIGSEGV, Segmentation fault.
0x40779970 in bcopy () from /usr/lib/libc.so.12
(gdb) bt
#0  0x40779970 in bcopy () from /usr/lib/libc.so.12
#1  0x2a0c60 in _mem_block_check (ptr=0x442180, silent=0, 
__zend_filename=0x311e78
"/usr/home/mlm/php-4.3.2RC1/Zend/zend_execute.c", 
__zend_lineno=271, __zend_orig_filename=0x0, __zend_orig_lineno=0)
at /usr/home/mlm/php-4.3.2RC1/Zend/zend_alloc.c:649
#2  0x2a0c14 in _mem_block_check (ptr=0x442180, silent=1, 
__zend_filename=0x311e78
"/usr/home/mlm/php-4.3.2RC1/Zend/zend_execute.c", 
__zend_lineno=271, __zend_orig_filename=0x0, __zend_orig_lineno=0)
at /usr/home/mlm/php-4.3.2RC1/Zend/zend_alloc.c:641
#3  0x29f3cc in _efree (ptr=0x442180, 
__zend_filename=0x311e78
"/usr/home/mlm/php-4.3.2RC1/Zend/zend_execute.c", 
__zend_lineno=271, __zend_orig_filename=0x0, __zend_orig_lineno=0)
at /usr/home/mlm/php-4.3.2RC1/Zend/zend_alloc.c:217
#4  0x2d42d4 in zend_assign_to_variable_reference (result=0x4c0408, 
variable_ptr_ptr=0x4c7658, value_ptr_ptr=0x4ae658,
Ts=0xaa50)
at /usr/home/mlm/php-4.3.2RC1/Zend/zend_execute.c:271
#5  0x2d960c in execute (op_array=0x4b7c40)
at /usr/home/mlm/php-4.3.2RC1/Zend/zend_execute.c:1354
#6  0x2dae3c in execute (op_array=0x4b7040)
at /usr/home/mlm/php-4.3.2RC1/Zend/zend_execute.c:1650
#7  0x2be5dc in zend_execute_scripts (type=8, retval=0x0,
file_count=3)
at /usr/home/mlm/php-4.3.2RC1/Zend/zend.c:864
#8  0x261a14 in php_execute_script (primary_file=0xd950)
---Type  to continue, or q  to quit---
at /usr/home/mlm/php-4.3.2RC1/main/main.c:1636
#9  0x2e3f00 in main (argc=2, argv=0xdae8)
at /usr/home/mlm/php-4.3.2RC1/sapi/cli/php_cli.c:753
#10 0x12429c in ___start ()
(gdb) quit

Trying desprately to find a release that works on Sparc64,

So, let me know what I can do to help debug this,

Thank You,
Mike Marshall



Previous Comments:


[2003-03-04 08:21:37] php at codewhore dot org

Here's another far more compact version:

list;
}

function method(&$controller)
{
  $controller->get();
}
  }

  class controller
  {
function &get()
{
  return @$this->foo;
}

function call()
{
  call_user_func_array($this->sym, array(&$this));
}

function load()
{
  $instance =& new module();
  $this->instance =& $instance;
  $this->sym = array(&$instance, 'method');
}

function run()
{
  $this->load();
  $this->call();
  $this->call();
}
  }

  class application
  {
function run(&$controller)
{
  $removing_this_global_usage_prevents_segv = @$_GET['x'];
  $controller->run();
}
  }

  $controller = new controller();
  application::run($controller);
  $controller->instance->finalize();

?>



[2003-03-03 15:35:00] php at codewhore dot org

Hi:

Thanks for waiting. Below is a test case which I've used to
reproducibly 

#22995 [Csd->Bgs]: if ( $something == "NAME") { print $something } prints "0"

2003-03-31 Thread pollita
 ID:   22995
 Updated by:   [EMAIL PROTECTED]
 Reported By:  hermandepauw at hotmail dot com
-Status:   Closed
+Status:   Bogus
 Bug Type: Unknown/Other Function
 Operating System: Red Hat Linux
 PHP Version:  4.3.0
 New Comment:

Both this and the original version qualify as bogus as it's a scripting
error and not a bug in PHP itself.


Previous Comments:


[2003-03-31 16:52:32] hermandepauw at hotmail dot com

Due to traffic probs this bug was submitted twice ... my excuses



[2003-03-31 16:47:37] hermandepauw at hotmail dot com

if ( $something == "NAME") { print $something } prints "0"

the main problem is in the summary ... example code and source on
http://www.deparadox.be/php/ i don't know the explain it in words so
get a view ... code is only ~10 lines 




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



#22970 [Opn->Csd]: ftp 'quote' command not available _exec & _site seem redundant

2003-03-31 Thread pollita
 ID:   22970
 Updated by:   [EMAIL PROTECTED]
 Reported By:  keith at ksmith dot com
-Status:   Open
+Status:   Closed
 Bug Type: Feature/Change Request
 Operating System: Linux
 PHP Version:  4.3.1
 New Comment:

Thanks for the request, but we're a step ahead of you.

ftp_raw() has already been added to the development branch of PHP (this
means it'll show up in PHP5) and does almost exactly what your proposed
ftp_quote would do (except for how it handles the response code).

The documentation for this function exists in CVS, but the online
manual hasn't been recompiled since its addition.


Previous Comments:


[2003-03-30 22:28:15] keith at ksmith dot com

No ability to send arbitrary commands to ftp server like 'quote'
command in ftp.  Trivial addition.  Also ftp_exec and ftp_site seem
redundant.  The former does a 'SITE EXEC' in front of command the
latter does 'SITE' in front of command.

The patch is trivial and available at:
http://linuxap.ksmith.com/archive/misc/php-4.3.1-ftp_quote.patch

I also include it here to 4.3.1.  It should probably patch other
versions as well:

diff -urN php-4.3.1/ext/ftp/ftp.c php-4.3.1.new/ext/ftp/ftp.c
--- php-4.3.1/ext/ftp/ftp.c 2002-10-12 18:40:46.0 -0700
+++ php-4.3.1.new/ext/ftp/ftp.c 2003-03-30 20:28:35.0 -0700
@@ -417,6 +417,22 @@
 }
 /* }}} */

+/* {{{ ftp_quote
+ */
+int
+ftp_quote(ftpbuf_t *ftp, const char *cmd)
+{
+   if (ftp == NULL)
+   return 0;
+   if (!ftp_putcmd(ftp, cmd, NULL))
+   return 0;
+   if (!ftp_getresp(ftp) || ftp->resp != 200)
+   return 0;
+
+   return 1;
+}
+/* }}} */
+
 /* {{{ ftp_chdir
  */
 int
diff -urN php-4.3.1/ext/ftp/ftp.h php-4.3.1.new/ext/ftp/ftp.h
--- php-4.3.1/ext/ftp/ftp.h 2002-10-03 05:16:44.0 -0700
+++ php-4.3.1.new/ext/ftp/ftp.h 2003-03-30 20:45:03.0 -0700
@@ -179,6 +179,9 @@
 /* sends a SITE command to the server */
 intftp_site(ftpbuf_t *ftp, const char *cmd);

+/* sends an arbitrary command string to the server */
+intftp_quote(ftpbuf_t *ftp, const char *cmd);
+
 /* retrieves part of a file and saves its contents to outfp
  * returns true on success, false on error
  */
diff -urN php-4.3.1/ext/ftp/php_ftp.c php-4.3.1.new/ext/ftp/php_ftp.c
--- php-4.3.1/ext/ftp/php_ftp.c 2002-12-05 23:08:21.0 -0700
+++ php-4.3.1.new/ext/ftp/php_ftp.c 2003-03-30 20:47:55.0
-0700
@@ -71,6 +71,7 @@
PHP_FE(ftp_rename,  NULL)
PHP_FE(ftp_delete,  NULL)
PHP_FE(ftp_site,NULL)
+   PHP_FE(ftp_quote,   NULL)
PHP_FE(ftp_close,   NULL)
PHP_FE(ftp_set_option,  NULL)
PHP_FE(ftp_get_option,  NULL)
@@ -1055,6 +1056,31 @@
 }
 /* }}} */

+/* {{{ proto bool ftp_quote(resource stream, string cmd)
+   Sends an arbitrary command to the server */
+PHP_FUNCTION(ftp_quote)
+{
+   zval*z_ftp;
+   ftpbuf_t*ftp;
+   char*cmd;
+   int cmd_len;
+
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rs",
&z_ftp, &cmd, &cmd_len) == FAILURE) {
+   return;
+   }
+
+   ZEND_FETCH_RESOURCE(ftp, ftpbuf_t*, &z_ftp, -1, le_ftpbuf_name,
le_ftpbuf);
+
+   /* send the command */
+   if (!ftp_quote(ftp, cmd)) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s",
ftp->inbuf);
+   RETURN_FALSE;
+   }
+
+   RETURN_TRUE;
+}
+/* }}} */
+
 /* {{{ proto void ftp_close(resource stream)
Closes the FTP stream */
 PHP_FUNCTION(ftp_close)
diff -urN php-4.3.1/ext/ftp/php_ftp.h php-4.3.1.new/ext/ftp/php_ftp.h
--- php-4.3.1/ext/ftp/php_ftp.h 2002-10-03 04:33:05.0 -0700
+++ php-4.3.1.new/ext/ftp/php_ftp.h 2003-03-30 20:48:15.0
-0700
@@ -58,6 +58,7 @@
 PHP_FUNCTION(ftp_rename);
 PHP_FUNCTION(ftp_delete);
 PHP_FUNCTION(ftp_site);
+PHP_FUNCTION(ftp_quote);
 PHP_FUNCTION(ftp_close);
 PHP_FUNCTION(ftp_set_option);
 PHP_FUNCTION(ftp_get_option);





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



#22970 [Csd]: ftp 'quote' command not available _exec & _site seem redundant

2003-03-31 Thread pollita
 ID:   22970
 Updated by:   [EMAIL PROTECTED]
 Reported By:  keith at ksmith dot com
 Status:   Closed
 Bug Type: Feature/Change Request
 Operating System: Linux
 PHP Version:  4.3.1
 New Comment:

P.S. - Some FTP servers treat SITE and SITE EXEC differently, thus the
presence of _site and _exec.


Previous Comments:


[2003-03-31 17:12:23] [EMAIL PROTECTED]

Thanks for the request, but we're a step ahead of you.

ftp_raw() has already been added to the development branch of PHP (this
means it'll show up in PHP5) and does almost exactly what your proposed
ftp_quote would do (except for how it handles the response code).

The documentation for this function exists in CVS, but the online
manual hasn't been recompiled since its addition.



[2003-03-30 22:28:15] keith at ksmith dot com

No ability to send arbitrary commands to ftp server like 'quote'
command in ftp.  Trivial addition.  Also ftp_exec and ftp_site seem
redundant.  The former does a 'SITE EXEC' in front of command the
latter does 'SITE' in front of command.

The patch is trivial and available at:
http://linuxap.ksmith.com/archive/misc/php-4.3.1-ftp_quote.patch

I also include it here to 4.3.1.  It should probably patch other
versions as well:

diff -urN php-4.3.1/ext/ftp/ftp.c php-4.3.1.new/ext/ftp/ftp.c
--- php-4.3.1/ext/ftp/ftp.c 2002-10-12 18:40:46.0 -0700
+++ php-4.3.1.new/ext/ftp/ftp.c 2003-03-30 20:28:35.0 -0700
@@ -417,6 +417,22 @@
 }
 /* }}} */

+/* {{{ ftp_quote
+ */
+int
+ftp_quote(ftpbuf_t *ftp, const char *cmd)
+{
+   if (ftp == NULL)
+   return 0;
+   if (!ftp_putcmd(ftp, cmd, NULL))
+   return 0;
+   if (!ftp_getresp(ftp) || ftp->resp != 200)
+   return 0;
+
+   return 1;
+}
+/* }}} */
+
 /* {{{ ftp_chdir
  */
 int
diff -urN php-4.3.1/ext/ftp/ftp.h php-4.3.1.new/ext/ftp/ftp.h
--- php-4.3.1/ext/ftp/ftp.h 2002-10-03 05:16:44.0 -0700
+++ php-4.3.1.new/ext/ftp/ftp.h 2003-03-30 20:45:03.0 -0700
@@ -179,6 +179,9 @@
 /* sends a SITE command to the server */
 intftp_site(ftpbuf_t *ftp, const char *cmd);

+/* sends an arbitrary command string to the server */
+intftp_quote(ftpbuf_t *ftp, const char *cmd);
+
 /* retrieves part of a file and saves its contents to outfp
  * returns true on success, false on error
  */
diff -urN php-4.3.1/ext/ftp/php_ftp.c php-4.3.1.new/ext/ftp/php_ftp.c
--- php-4.3.1/ext/ftp/php_ftp.c 2002-12-05 23:08:21.0 -0700
+++ php-4.3.1.new/ext/ftp/php_ftp.c 2003-03-30 20:47:55.0
-0700
@@ -71,6 +71,7 @@
PHP_FE(ftp_rename,  NULL)
PHP_FE(ftp_delete,  NULL)
PHP_FE(ftp_site,NULL)
+   PHP_FE(ftp_quote,   NULL)
PHP_FE(ftp_close,   NULL)
PHP_FE(ftp_set_option,  NULL)
PHP_FE(ftp_get_option,  NULL)
@@ -1055,6 +1056,31 @@
 }
 /* }}} */

+/* {{{ proto bool ftp_quote(resource stream, string cmd)
+   Sends an arbitrary command to the server */
+PHP_FUNCTION(ftp_quote)
+{
+   zval*z_ftp;
+   ftpbuf_t*ftp;
+   char*cmd;
+   int cmd_len;
+
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rs",
&z_ftp, &cmd, &cmd_len) == FAILURE) {
+   return;
+   }
+
+   ZEND_FETCH_RESOURCE(ftp, ftpbuf_t*, &z_ftp, -1, le_ftpbuf_name,
le_ftpbuf);
+
+   /* send the command */
+   if (!ftp_quote(ftp, cmd)) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s",
ftp->inbuf);
+   RETURN_FALSE;
+   }
+
+   RETURN_TRUE;
+}
+/* }}} */
+
 /* {{{ proto void ftp_close(resource stream)
Closes the FTP stream */
 PHP_FUNCTION(ftp_close)
diff -urN php-4.3.1/ext/ftp/php_ftp.h php-4.3.1.new/ext/ftp/php_ftp.h
--- php-4.3.1/ext/ftp/php_ftp.h 2002-10-03 04:33:05.0 -0700
+++ php-4.3.1.new/ext/ftp/php_ftp.h 2003-03-30 20:48:15.0
-0700
@@ -58,6 +58,7 @@
 PHP_FUNCTION(ftp_rename);
 PHP_FUNCTION(ftp_delete);
 PHP_FUNCTION(ftp_site);
+PHP_FUNCTION(ftp_quote);
 PHP_FUNCTION(ftp_close);
 PHP_FUNCTION(ftp_set_option);
 PHP_FUNCTION(ftp_get_option);





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



#22538 [Ana->Csd]: stream filter produces bogus output

2003-03-31 Thread moriyoshi
 ID:   22538
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Analyzed
+Status:   Closed
 Bug Type: Filesystem function related
 Operating System: RedHat Linux 8.0 (glibc-2.3.0)
 PHP Version:  5CVS-2003-03-04 (dev)
 Assigned To:  iliaa
 New Comment:

This bug has been fixed in CVS.

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

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




Previous Comments:


[2003-03-28 10:59:38] [EMAIL PROTECTED]

I made a patch for this issue. But not sure if this is the right fix..

Index: main/streams/streams.c
===
RCS file: /repository/php4/main/streams/streams.c,v
retrieving revision 1.14
diff -u -r1.14 streams.c
--- main/streams/streams.c  20 Mar 2003 01:23:04 -  1.14
+++ main/streams/streams.c  28 Mar 2003 16:50:31 -
@@ -829,7 +829,7 @@

/* Only screw with the buffer if we can seek, otherwise we lose
data
 * buffered from fifos and sockets */
-   if (stream->ops->seek && (stream->flags & 
PHP_STREAM_FLAG_NO_SEEK)
== 0 && !php_stream_is_filtered(stream)) {
+   if (stream->ops->seek && (stream->flags & 
PHP_STREAM_FLAG_NO_SEEK)
== 0) {
stream->position += justwrote;
}
} else {





[2003-03-17 14:58:15] [EMAIL PROTECTED]

And, hmm, here's another script to replicate with.
By this script, It turned out that the issue isn't
stream_copy_to_stream specific.



I don't have enough time to fix this right now, so I thank you for
taking your time to look at this one ;-)




[2003-03-17 14:34:13] [EMAIL PROTECTED]

Oops, I forgot to try this one...

script 4:



This results in the same output.




[2003-03-17 14:30:08] [EMAIL PROTECTED]

The bug still persists.

$ php script2.php < Zend/zend.c

is ok, but it doesn't work with piped stream. Please try the
following:

$ cat script2.php | php script2.php




[2003-03-17 12:33:46] [EMAIL PROTECTED]

This bug has been fixed in CVS.

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

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





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

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



#22989 [Opn->Csd]: mail() not discovered by configure

2003-03-31 Thread sniper
 ID:   22989
 Updated by:   [EMAIL PROTECTED]
 Reported By:  iguy at ionsphere dot org
-Status:   Open
+Status:   Closed
-Bug Type: *Compile Issues
+Bug Type: Compile Failure
 Operating System: Redhat 8.0
 PHP Version:  4.3.1
 New Comment:

This bug has been fixed in CVS.

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

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




Previous Comments:


[2003-03-31 13:27:14] iguy at ionsphere dot org

On my RedHat 8.0 system I am running exim & apache 2.0 with the default
autoconf of 2.53-8.  

When issuing the ./buildconf, ./configure 
configure does not find sendmail in the path given to it.  That is
because of a bug in the autoconf 2.53 code base where AC_PROG_PATH does
not properly search through non-expanded parameters passed to the
search string.  ie.  
$PATH:/usr/sbin -> it will search through the properly expanded $PATH
but will not search in /usr/sbin.  

As such I would like ot recommend this patch which should work with
2.13 & all versions of autoconf going forward.

diff -Naur php-4.3.1.org/aclocal.m4 php-4.3.1/aclocal.m4
--- php-4.3.1.org/aclocal.m42003-02-16 08:56:17.0 -0700
+++ php-4.3.1/aclocal.m42003-03-31 12:14:24.0 -0700
@@ -713,7 +713,8 @@
 ])
 
 AC_DEFUN([PHP_PROG_SENDMAIL],[
-AC_PATH_PROG(PROG_SENDMAIL, sendmail,[],
$PATH:/usr/bin:/usr/sbin:/usr/etc:/etc:/usr/ucblib:/usr/lib)
+PHP_ALT_PATH=/usr/bin:/usr/sbin:/usr/etc:/etc:/usr/ucblib:/usr/lib
+AC_PATH_PROG(PROG_SENDMAIL, sendmail,[], $PATH:$PHP_ALT_PATH)
 if test -n "$PROG_SENDMAIL"; then
   AC_DEFINE(HAVE_SENDMAIL,1,[whether you have sendmail])
 fi




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



#22926 [Opn->Bgs]: Cannot call PHP from shell_exec

2003-03-31 Thread pollita
 ID:   22926
 Updated by:   [EMAIL PROTECTED]
 Reported By:  phpbugs at bob7 dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Program Execution
 Operating System: Windows 2000 server
 PHP Version:  4.3.1
 New Comment:

Works w/ CLI, not PHP Bug => Bogus

As to using a stream to get the output of processing another PHP file: 
Unfortunately the document you want processed (using this method) MUST
be in a publicly accessable document tree.

All the php stream does is pretend its a browser making a page
request.

What you *can* do, if you want to be able to do this the easy way but
not have the document be publicly accessable is give it a password.

// In your main script:
http://localhost/generateemail.php?password=secret";);
?>


// In generateemail.php:



Hope that helps.


Previous Comments:


[2003-03-31 10:47:04] phpbugs at bob7 dot com

I repeated the test using the CLI interface and was able to get 'php
-h' to run.  

I also see that I can use the new streams functionality to create HTML
mail bodies. The problem with the streams approach is that (I believe)
the .php files need to be in the document tree, so if I go that route,
I have to add authentication. 

Perhaps there is or you guys may be planning a way that allows http
streams from outside the doc tree?

Thanks again,
-Bob



[2003-03-27 07:51:55] [EMAIL PROTECTED]

Could you please try CLI version of PHP.EXE? It comes in the cli
directory of the standard ZIP distribution.



[2003-03-27 07:45:40] phpbugs at bob7 dot com

The following does not work.  It spawns scores of processes, which
fortunately all die after 30 seconds.


I looked at the bug reports about possibly needing command.com but
these do not work either: (same result)



Why would I want to do this?  To send html email using the PEAR mime
mail class, i.e.


I downloaded and installed the standard windows installer, and the path
to php is C:\Inetpub\PHP

I have the same problem using back ticks as well.

Thanks very much for looking at this.




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



#22988 [Ana->Fbk]: I'm feeling lucky - rand() bug

2003-03-31 Thread sniper
 ID:   22988
 Updated by:   [EMAIL PROTECTED]
 Reported By:  vakmajom at freemail dot hu
-Status:   Analyzed
+Status:   Feedback
 Bug Type: Math related
 Operating System: Windows 2000
 PHP Version:  4.3.2RC1
 New Comment:

Please try using this CVS snapshot:

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


Previous Comments:


[2003-03-31 15:22:49] [EMAIL PROTECTED]

This is being caused by a carryover (2147483647 + 1 == -2147483648).  

The short answer is: "If it hurts, don't do it!"

Of course that's not a proper answer.  The API Macro could probably use
some tweaking...



[2003-03-31 12:36:52] vakmajom at freemail dot hu

The function rand() always returns an even number!
This bug appears when the parameters of rand() are near to the limits
of int (i.e. 2147483647)

Example:

Result: always an even number.

I'm using Apache 2.0.44 with PHP4.3.2RC1 (original Win32 binary) as an
apache module.

Tests with different systems:
Maybe this is a Windows bug, it still exists in Windows .Net server
build 3718 with PHP 4.3.0 RC3
But everything is fine on a unix system with PHP 4.1.0

Strange... :))




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



#22987 [Opn->Fbk]: make crashes on dbug.c error

2003-03-31 Thread sniper
 ID:   22987
 Updated by:   [EMAIL PROTECTED]
 Reported By:  thickerson at e-guana dot net
-Status:   Open
+Status:   Feedback
-Bug Type: Compile Failure
+Bug Type: MySQL related
 Operating System: FreeBSD
 PHP Version:  4.3.1
 New Comment:

Please try using this CVS snapshot:

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


If the snapshot fails too, check the line in main/php_config.h with
HAVE_PERROR.



Previous Comments:


[2003-03-31 12:15:45] thickerson at e-guana dot net

After running configure --with-java=, I try to
make and get the following error:

gcc -I/usr/home/eguana2/usr/local/php-4.3.1/ext/mysql/libmysql
-Iext/mysql/ -I/usr/home/eguana2/usr/local/php-4.3.1/ext/mysql/
-DPHP_ATOM_INC -I/usr/home/eguana2/usr/local/php-4.3.1/include
-I/usr/home/eguana2/usr/local/php-4.3.1/main
-I/usr/home/eguana2/usr/local/php-4.3.1
-I/usr/home/eguana2/usr/local/php-4.3.1/Zend
-I/usr/home/eguana2/usr/local/php-4.3.1/ext/xml/expat 
-I/usr/home/eguana2/usr/local/php-4.3.1/TSRM  -g -O2  -c
/usr/home/eguana2/usr/local/php-4.3.1/ext/mysql/libmysql/dbug.c -o
ext/mysql/libmysql/dbug.o  && echo > ext/mysql/libmysql/dbug.lo
In file included from
/usr/home/eguana2/usr/local/php-4.3.1/ext/mysql/libmysql/dbug.c:72:
/usr/home/eguana2/usr/local/php-4.3.1/ext/mysql/libmysql/global.h:260:
warning: redefinition of `uint'
/usr/include/sys/types.h:57: warning: `uint' previously declared here
/usr/home/eguana2/usr/local/php-4.3.1/ext/mysql/libmysql/global.h:261:
warning: redefinition of `ushort'
/usr/include/sys/types.h:56: warning: `ushort' previously declared
here
/usr/home/eguana2/usr/local/php-4.3.1/ext/mysql/libmysql/dbug.c:1906:
warning: static declaration for `perror' follows non-static
/usr/home/eguana2/usr/local/php-4.3.1/ext/mysql/libmysql/dbug.c: In
function `perror':
/usr/home/eguana2/usr/local/php-4.3.1/ext/mysql/libmysql/dbug.c:1907:
argument `s' doesn't match prototype
/usr/include/stdio.h:227: prototype declaration
*** Error code 1

I've found several reports on this problem, but no answers.  What is
the nature of my problem?

Thanks,
Tom Hickerson, e-guana.net




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



#22983 [Fbk->Opn]: Page Cannot Be Displayed

2003-03-31 Thread luke at cywh dot com
 ID:   22983
 User updated by:  luke at cywh dot com
 Reported By:  luke at cywh dot com
-Status:   Feedback
+Status:   Open
-Bug Type: Sockets related
+Bug Type: HTTP related
 Operating System: Windows XP
 PHP Version:  4CVS-2003-03-31 (stable)
 New Comment:

alright...

i have this file which is the basic for my entire website.

i have it broken up with If statements, and use the $_GET statment to
determine what contents to display. in this file i have my header,
which is always displayed, and my footer.

the way i have it setup is i have my header... under it i have a table
with two columbs. the one of the left contains another table that has
my menu, and the columb on the right contains the php code. and under
that i have my footer.

the php code contains if statements such as this

$var=$_GET['action'];
if(!$var)
{
//displays contents for main page
}
if($var=="artic")
{
//displays contents for the articles section
}
if($var=="search")
{
//displays search results (code)
}
if($var=="wh")
{
//displays web hosting plans
}


basically something like that.

so the whole page is like


mypage


a { stuff for links }
a:hover { stuff for links when mouse is hovered over it }


















and thats basicaly it. now what it should do is when a specified value
for 'action' is given, it should give me the information. like for
eaxmple if i clicked on a link and it took me to index.php?action=wh.
what that should give me is a table inside the body columb that lists
hosting prices for different plans and such. what it does is it loads
the header, and then all of a sudden goes blank and comes up with a
"Page Cannot Be Displayed".

some of the contents of the if statments have the actual html code in
it like





and some of them are like this...




here is my page... http://www.cywh.com/index.php
here is the source... http://www.cywh.com/index.phps


Previous Comments:


[2003-03-31 15:57:39] [EMAIL PROTECTED]

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

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

Thank you for your interest in PHP.






[2003-03-31 10:46:25] luke at cywh dot com

Numerous pages on my site are coming up as "page cannot be displayed".
it worked before i upgraded my php, but now its doing it. on my local
network it doesnt happen, but any computer outside my network it does
happen.

http://www.cywh.com <--- thats my site
http://cytech.cywh.com <--- other site, happens on order

it happens on numerous links, like "get hosted" or "other plans" and
others.

im not sure whats causing it, but it happened before, you guys adviced
me to upgrade to a snapshot, that seemed to fix it, i upgraded again to
another snap shot, and it started happening again.

i believe it only happens only on IE because you guys said it worked
and you were using a different browser (proboly on linux). please test
it on an IE browser.

im using IE 6.0

i have php installed to apache 2.0.44 as a module. i have numerious
virtual hosts setup on apache.

i have saved html code that is "supposed" to be generated by the page
and it does come up fine. im very sure it is related to a php.




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



  1   2   >