[PHP-DEV] Bug #6336 Updated: setting include_path breaks top index.php

2001-05-13 Thread sbergmann

ID: 6336
Updated by: sbergmann
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Feedback
Bug Type: Documentation problem
Operating system: 
PHP Version: 4.0 Latest CVS (24/08/2000)
Assigned To: jmoore
Comments:

Can we close this bug? Shall we change php.ini-dist?


Previous Comments:
---

[2000-08-30 21:05:23] [EMAIL PROTECTED]
FW On behalf of Peter Kocks:

Yes, .: does work in almost every case.  The case where it does not is when there is 
a chdir() in a auto prepend file.
 
However, the real point of this bug report has to do with backwards compatibility, 
documentation, and error messages.
 
Compatibility:  Changes in behavior should be announced in some formal place.  So, 
when people upgrade they can check for potential problems.
 
Documentation: the php.ini-dist should be changed to suggest you put in a .: in the 
include_path().
 
Error message: Should be more informative in the case where the script_name is not 
accessible via the include path.  If it is the script name, say something about . in 
path or something.

---

[2000-08-25 06:19:30] [EMAIL PROTECTED]
try putting . in your include path.

include_path= .:/usr/test/include

Please give feedback

James


---

[2000-08-24 12:29:22] [EMAIL PROTECTED]
php version php4.0.2RC1
solaris 7

Create this simplest of php scripts called index.php in your Document Root.

?
   echo hello worldbr;
?

in php.ini change include_path to whatever

include_path= /usr/test/include

Point your browser to the index.php.  I get the warning message:

Warning: Failed opening 'index.php' for inclusion (include_path='/usr/test/include') 
in Unknown on line 0

This is new behaviour that will cause problems when php is released.  

Details on my build:

./configure 
--with-apxs=/usr/local/apache/bin/apxs 
--with-config-file-path=/var/baygate/www/conf 
--enable-track-vars 
--enable-trans-sid 
--with-ndbm 
--with-informix=/opt/informix/prod 
--with-system-regex 
--enable-sysvsem 
--enable-sysvshm 

APACHE = apache_1.3.12
PHP = php-4.0.2RC1
MODSSL  = mod_ssl-2.6.6-1.3.12
Solaris 2.7



---



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=6336edit=2


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] php_domxml.c

2001-05-13 Thread Sebastian Bergmann

  What's the reason for

#if defined(LIBXML_XPATH_ENABLED)
/* PHP_FE(xpath_new_context, NULL)
   PHP_FE(xpath_eval, NULL)
   PHP_FE(xpath_eval_expression, NULL) */
#endif
#if defined(LIBXML_XPTR_ENABLED)
/* PHP_FE(xptr_new_context, NULL)
   PHP_FE(xptr_eval, NULL) */
#endif

  I'm curious, because I need xpath_new_context() for Ulf Wendel's
Menu_Browser class :-/

-- 
 sebastian bergmann[EMAIL PROTECTED]
   http://www.sebastian-bergmann.de

 bonn.phpug.de | www.php.net | www.phpOpenTracker.de | www.titanchat.de

-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] php_domxml.c

2001-05-13 Thread Sebastian Bergmann

Alexander Bokovoy wrote:
 Only reason I can imagine is that that part isn't finished yet.

   Okay, but it must have been working some weeks ago, since Ulf surely
has tested his class.

-- 
 sebastian bergmann[EMAIL PROTECTED]
   http://www.sebastian-bergmann.de

 bonn.phpug.de | www.php.net | www.phpOpenTracker.de | www.titanchat.de

-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #10837 Updated: The rand function doesn't work

2001-05-13 Thread derick

ID: 10837
Updated by: derick
Reported By: [EMAIL PROTECTED]
Status: Open
Bug Type: *Function Specific
Operating system: 
PHP Version: 4.0.5
Assigned To: 
Comments:

Works for me on Linux:

[derick@aarde seti]$ php -q
?php
echo rand(1,50)-1;
echo \n;
?
27

Did you use srand to seed the random number generator?
(www.php.net/srand)

regards,
Derick

Previous Comments:
---

[2001-05-12 23:48:43] [EMAIL PROTECTED]
calling: rand(1, 50)-1 will always get 1 !! try it for your self..this bug is only in 
4.05  ..i imediately rolled back to 4.04pl1 and it works perfect again.

I didn't compile my module..downloaded the win32 build.

---



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=10837edit=2


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #10837 Updated: The rand function doesn't work

2001-05-13 Thread derick

ID: 10837
Updated by: derick
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Feedback
Bug Type: *Function Specific
Operating system: 
PHP Version: 4.0.5
Assigned To: 
Comments:

Status: Feedback

Previous Comments:
---

[2001-05-13 04:48:20] [EMAIL PROTECTED]
Works for me on Linux:

[derick@aarde seti]$ php -q
?php
echo rand(1,50)-1;
echo n;
?
27

Did you use srand to seed the random number generator?
(www.php.net/srand)

regards,
Derick

---

[2001-05-12 23:48:43] [EMAIL PROTECTED]
calling: rand(1, 50)-1 will always get 1 !! try it for your self..this bug is only in 
4.05  ..i imediately rolled back to 4.04pl1 and it works perfect again.

I didn't compile my module..downloaded the win32 build.

---



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=10837edit=2


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] PHP modules ... ?

2001-05-13 Thread derick

On Sun, 13 May 2001, Harcharan Singh wrote:

 Dear frenz,
 I want to use functions in PHP in such a way that all functions will be
 kept in a central location : funcs.php like perl's .pm module.
 Then use this file and call whichever funtion I want by including this
 file.
 How can I do this ?

RTFM: www.php.net/include and please do not post support questions to this
list, use [EMAIL PROTECTED] This mailinglist is for developing
PHP, not developing with PHP.

Derick Rethans

-
PHP: Scripting the Web - www.php.net - [EMAIL PROTECTED]
 SRM: Site Resource Manager - www.vl-srm.net
-


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #10838 Updated: wierd problem concatenating global string vars

2001-05-13 Thread derick

ID: 10838
Updated by: derick
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Feedback
Bug Type: Unknown/Other Function
Operating system: 
PHP Version: 4.0.5
Assigned To: 
Comments:

This works fine for me, with Apache/1.3.12, php 4.0.3pl1 on Linux,
can you set-up the script that you can download at php.jdimedia.nl/bug10838.txt on 
your server so that we can see the problem?

regards,
Derick

Previous Comments:
---

[2001-05-13 01:47:42] [EMAIL PROTECTED]
the version is two back, but I would 
be hesitant to ask my ISP to change
to 4.0.5 after all the little problems 
I read about. Can you tell me if the following
is fixed in versions  4.0.3pl1 ?

If I do echo($HTTP_SERVER_VARS[SERVER_ADDR])
I get the expected server address ***WITHOUT A SLASH AT THE END***
eg. my.server.address
---
If I do echo($PHP_SELF)
I get the expeted URL relative the the server ***WITH  O-N-E  SLASH** at
beginning.
eg. /expected/url/relative/doc_name

---
If I do THIS:
  $this_page = http://; . $HTTP_SERVER_VARS[SERVER_ADDR] . $PHP_SELF;
  echo( $this_page );
I get, http://my.server.address//expected/url/relative/doc_name;

There is **ALWAYS** a double slash between the server address and the
doc path,
if the concatenation of those two variables occurs in the same
statement.

It works when used as an action for a form, but I don't think it should
do unexpected
results.

---
HOWEVER
If I do **THIS**:
  $this_page = http://;;
  $this_page .= $HTTP_SERVER_VARS[SERVER_ADDR];
  $this_page .= $PHP_SELF;
I get the correct results,
http://my.server.address/expected/url/relative/doc_name;

My provider is using PHP version 4.0.3pl1

---



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=10838edit=2


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] call_user_*()

2001-05-13 Thread Wez Furlong

On 2001-05-13 06:36:33, Sterling Hughes [EMAIL PROTECTED]
wrote:
 Stefan Livieratos wrote:
  Well, I thought that the function call_user_func_array() is supposed
to
  be called this way. What good is it anyway? I suggest
  'call_user_func_array' should be removed as it is not needed and also
  doesn't work with user functions that expect arguments by reference.
 
 Well it is needed...  If you need to decide how many arguments to pass 
 to a function at execution time then the call_user_func_array()
function
 is critical.

I'm using some PHP code that would not be possible to implement without
call_user_func_array and call_user_method_array.

Let's keep it...

--Wez.


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #8029 Updated: Session loses variables, zero length session file

2001-05-13 Thread derick

ID: 8029
Updated by: derick
Reported By: [EMAIL PROTECTED]
Old-Status: Suspended
Status: Closed
Bug Type: *Session related
Operating system: 
PHP Version: 4.0.3pl1
Assigned To: 
Comments:

Hello,

does this still happen with the latest release (4.0.5). If yes, please reopen this 
report.

regards,
Derick

Previous Comments:
---

[2000-12-02 08:58:52] [EMAIL PROTECTED]
Well, if it is impossible to reproduce, then I don't see how we can help you. 
Suspending bug report.

---

[2000-11-29 05:06:56] [EMAIL PROTECTED]
We stores some objects and variables into sessions.
Sessions are stored on disk in /tmp directory.
Sometimes (absloutly radnom situation) problem occures
with session. No objects are found in session. The
session file goes to zero lenght and no other error is
logged or displayed. It's impossible to reproduce this
error.



---



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=8029edit=2


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #8253 Updated: Cookies/Sessions under MacOS

2001-05-13 Thread derick

ID: 8253
Updated by: derick
Reported By: [EMAIL PROTECTED]
Old-Status: Suspended
Status: Closed
Bug Type: *Session related
Operating system: 
PHP Version: 4.0.3pl1
Assigned To: 
Comments:

As Sascha said, not a bug in PHP, so closing this report.

Previous Comments:
---

[2000-12-22 17:56:18] [EMAIL PROTECTED]
Perhaps you are going through a transparent HTTP proxy?

Anyway, this is unlikely to be a problem on our side. Please make sure that your 
client is indeed using the commonly-agreed on format (as per the Netscape cookie spec) 
and PHP will understand it.

---

[2000-12-14 07:21:56] [EMAIL PROTECTED]
This looks like the HTTP_X_FORWARDED_FOR change a gateway/proxy does. I don't know if 
it helps or anything. I think that the mac doesn't go through a proxy/gateway. 

---

[2000-12-14 07:08:38] [EMAIL PROTECTED]
Session don't work if you try to use them in macos. I think the issue is that MacOS 
(both IE and NS). Send cookies in the form of a X-okie variable but Windows/linux/* 
uses a Cookie variable. Therefore PHP doesn't detect the cookies/session id and sends 
out another one.

I've tried the latest snapshot (200012140245) and php-4.0.3pl1.

---



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=8253edit=2


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #6260 Updated: xor operator not working correctly

2001-05-13 Thread derick

ID: 6260
Updated by: derick
Reported By: [EMAIL PROTECTED]
Old-Status: Suspended
Status: Closed
Bug Type: Scripting Engine problem
Operating system: 
PHP Version: 4.0.1pl2
Assigned To: 
Comments:

This is not a bug in PHP, so closing.

Previous Comments:
---

[2000-08-20 09:50:47] [EMAIL PROTECTED]
PHP integers are signed longs. If you want to go outside signed long, you should use 
bcmath library.

I do not close it since PHP has showed some very strange behaviour on large numbers, 
which might be useful to investigate and decide what to do.

---

[2000-08-20 09:44:58] [EMAIL PROTECTED]
I Compiled php with MySQL and apxs.

php.ini shouldn't be relevant. It was not included in the install (btw. why?) and I've 
only created one with only session related stuff.

I found this thing on a newsgroup, alt.php, a new group not yet found on many servers, 
but you *can* find it on news.cis.dfn.de. The thread is named a little maths 
problem, started 08/15/00 11:07.

I've considered it for some time now, and I can't find any explanation:
the code snippet
?php
$val = 2634023077 ^ 407240870;
echo $val;
?
outputs -1740242778.

This can't to my knowledge be correct. I mean, 2634023077 would normally be an 
unsigned integer, but I haven't found any way to specify signed/unsigned integers. In 
addition, the answer should be 2235957251, and -1740242778 is not the signed 
representation of that number.

  1001 1101     1010 0101  -  2634023077
^ 0001 1000 0100 0110   1010 0110  -  0407240870
= 1000 0101 0100 0110    0011  -  2235957251

The result from an xor operation performed on these two integers in php is
-1740242778. 1740242778 (positive) is in binary:
0110 0111 1011 1001   0101 1010

Then the negative representation should be (negating each bit and adding one):
1001 1000 0100 0110   1010 0110

which unsigned is 2554724518, not 2235957251.

All this taken into consideration, is this a bug/flaw or am I wrong?


--Fredrik de Vibe

---



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=6260edit=2


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #7755 Updated: bitwise and misbehaving with 0xffffff00

2001-05-13 Thread derick

ID: 7755
Updated by: derick
Reported By: [EMAIL PROTECTED]
Old-Status: Suspended
Status: Closed
Bug Type: Math related
Operating system: 
PHP Version: 4.0.3pl1
Assigned To: 
Comments:

This is not a bug, so closing.

Previous Comments:
---

[2000-12-12 05:56:20] [EMAIL PROTECTED]
I suspend this bug since PHP has no good solution for it in
the foreseeable future. Please use GMP functions for this.

---

[2000-11-23 07:41:55] [EMAIL PROTECTED]
Still not working, possibly won't for some time - since PHP
numbers are 32-bits signed, so they don't work well as
32-bit unsigned.

---

[2000-11-14 12:04:03] [EMAIL PROTECTED]
Please try latest CVS version (also available from
snaps.php.net) and report if it works better.


---

[2000-11-10 22:29:04] [EMAIL PROTECTED]
I have the following snippet of code

$w = ip2long(192.168.2.35);
$x = $w  0xff00;
$y = $w  (0xff  8);
$z = ip2long(192.168.2.0);
printf (w = %sbr, dechex($w));
printf (x = %sbr, dechex($x));
printf (y = %sbr, dechex($y));
printf (z = %sbr, dechex($z));

which outputs this:

w = c0a80223
x = 8000
y = c0a80200
z = c0a80200

I can't come up with any reason why $x should be set as it is

---



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=7755edit=2


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] call_user_*()

2001-05-13 Thread Stefan Livieratos


Sterling Hughes [EMAIL PROTECTED] schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...

 
Whereas, replacing the call_user_func above with the following:
 
call_user_func($name, array($param1));
 
 
  Well, I thought that the function call_user_func_array() is supposed to
be
  called this way. What good is it anyway? I suggest
'call_user_func_array'
  should
  be removed as it is not needed and also doesn't work with user functions
  that
  expect arguments by reference.
 


 Well it is needed...  If you need to decide how many arguments to pass
 to a function at execution time then the call_user_func_array() function
 is critical.


But you said that 'call_user_func' can be also called like this:
call_user_func($function_name, array($arg1, arg2, arg3));

Where's the difference between call_user_func and call_user_func_array?

Regards,
Stefan Livieratos



-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #10836 Updated: German translation of chop()

2001-05-13 Thread j-f

ID: 10836
User Update by: [EMAIL PROTECTED]
Status: Closed
Bug Type: Documentation problem
Operating system: W2K
PHP Version: 4.0.5
Description: German translation of chop()

Verbose please...

Previous Comments:
---

[2001-05-13 01:21:57] [EMAIL PROTECTED]
Forgotten to close.

---

[2001-05-13 01:12:01] [EMAIL PROTECTED]
No comment!

---

[2001-05-12 22:33:28] [EMAIL PROTECTED]

The german translation of chop() is bullshit...
trailing whitespaces is translated as führende Leerzeichen, which is just the 
oppsosite thing (leading whitespaces)! The example shown is pure phantasy...

Grant me a cvs account and I will repair this; I may help also translate some other 
things (en - de) - Hartmut?

---


Full Bug description available at: http://bugs.php.net/?id=10836


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] call_user_*()

2001-05-13 Thread Sterling Hughes

Stefan Livieratos wrote:

 Sterling Hughes [EMAIL PROTECTED] schrieb im Newsbeitrag
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 
 
  Whereas, replacing the call_user_func above with the following:

  call_user_func($name, array($param1));


Well, I thought that the function call_user_func_array() is supposed to

 be
 
called this way. What good is it anyway? I suggest

 'call_user_func_array'
 
should
be removed as it is not needed and also doesn't work with user functions
that
expect arguments by reference.



Well it is needed...  If you need to decide how many arguments to pass
to a function at execution time then the call_user_func_array() function
is critical.


 
 But you said that 'call_user_func' can be also called like this:
 call_user_func($function_name, array($arg1, arg2, arg3));
 
 Where's the difference between call_user_func and call_user_func_array?
 


Right, that was a brain fart, I corrected that in the above message.

-Sterling



-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #10840: asp_tags = On is ignored, if apache is started with the php4_module

2001-05-13 Thread kzi

From: [EMAIL PROTECTED]
Operating system: win 98
PHP version:  4.0.5
PHP Bug Type: Scripting Engine problem
Bug description:  asp_tags = On  is ignored, if apache is started with the php4_module

asp_tags = on  in php.ini is ignored when  apache is started with
LoadModule php4_module c:/php/sapi/php4apache.dll
in httpd.conf.
It  works when apache is limited to work with the cgi binary



-- 
Edit Bug report at: http://bugs.php.net/?id=10840edit=1



-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #10838 Updated: wierd problem concatenating global string vars

2001-05-13 Thread derick

ID: 10838
Updated by: derick
Reported By: [EMAIL PROTECTED]
Old-Status: Feedback
Status: Closed
Bug Type: Unknown/Other Function
Operating system: 
PHP Version: 4.0.5
Assigned To: 
Comments:

user reports:
This is really weird,

IT WORKS, now! I went around and around with this before! I used the
exact same code and it performed the way I described. I had actually
highlighted the code and pasted it into the email.

Sorry to bug you guys.

The location is http://64.177.230.204/public/bug10838.php

Seems to be a user error or something, so closing.

Derick

Previous Comments:
---

[2001-05-13 04:59:29] [EMAIL PROTECTED]
This works fine for me, with Apache/1.3.12, php 4.0.3pl1 on Linux,
can you set-up the script that you can download at php.jdimedia.nl/bug10838.txt on 
your server so that we can see the problem?

regards,
Derick

---

[2001-05-13 01:47:42] [EMAIL PROTECTED]
the version is two back, but I would 
be hesitant to ask my ISP to change
to 4.0.5 after all the little problems 
I read about. Can you tell me if the following
is fixed in versions  4.0.3pl1 ?

If I do echo($HTTP_SERVER_VARS[SERVER_ADDR])
I get the expected server address ***WITHOUT A SLASH AT THE END***
eg. my.server.address
---
If I do echo($PHP_SELF)
I get the expeted URL relative the the server ***WITH  O-N-E  SLASH** at
beginning.
eg. /expected/url/relative/doc_name

---
If I do THIS:
  $this_page = http://; . $HTTP_SERVER_VARS[SERVER_ADDR] . $PHP_SELF;
  echo( $this_page );
I get, http://my.server.address//expected/url/relative/doc_name;

There is **ALWAYS** a double slash between the server address and the
doc path,
if the concatenation of those two variables occurs in the same
statement.

It works when used as an action for a form, but I don't think it should
do unexpected
results.

---
HOWEVER
If I do **THIS**:
  $this_page = http://;;
  $this_page .= $HTTP_SERVER_VARS[SERVER_ADDR];
  $this_page .= $PHP_SELF;
I get the correct results,
http://my.server.address/expected/url/relative/doc_name;

My provider is using PHP version 4.0.3pl1

---



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=10838edit=2


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: AW: [PHP-DEV] arrays

2001-05-13 Thread derick

On Sun, 13 May 2001, Zeev Suraski wrote:

 Why do you need it?  Nobody ever needed it until now.  It'll slightly slow
 down each and every hash update all over PHP, so unless it's really
 necessary, we should do without it...

The SRM extension would benefit from it too, we now need to loop trhough
the whole structure to decide if it's an real array, or an hash.

Derick


 Zeev

 At 19:40 13/5/2001, Harald Radi wrote:
 thanks, but wouldn't it desireable to have such a flag ? it wouldn't be a
 big effort, would it ?
 
   -Ursprungliche Nachricht-
   Von: Andrei Zmievski [mailto:[EMAIL PROTECTED]]
   Gesendet: Sonntag, 13. Mai 2001 18:34
   An: Harald Radi; [EMAIL PROTECTED]
   Betreff: Re: [PHP-DEV] arrays
  
  
   At 06:01 PM 5/13/01 +0200, Harald Radi wrote:
   hi,
   
   is there a simple way to determine if a pval of type IS_ARRAY contains
   non-interger indices (associative array) ?
   something like a flag in the pval structure that indicates that
   add_assoc_*
   was called on it.
  
   Nope, you pretty much have to walk through it and call
   zend_hash_get_current_key_type() until you find string key or
   encounter the
   end of the array.
  
   -Andrei
  
  
 
 
 --
 PHP Development Mailing List http://www.php.net/
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]

 --
 Zeev Suraski [EMAIL PROTECTED]
 CTO   co-founder, Zend Technologies Ltd. http://www.zend.com/


 --
 PHP Development Mailing List http://www.php.net/
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]


Derick Rethans

-
PHP: Scripting the Web - www.php.net - [EMAIL PROTECTED]
 SRM: Site Resource Manager - www.vl-srm.net
-


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #10574 Updated: Gets stuck on explode() when delimiter is not in the string

2001-05-13 Thread xyztheweb

ID: 10574
User Update by: [EMAIL PROTECTED]
Old-Status: Feedback
Status: Open
Bug Type: Arrays related
Operating system: WIN NT4
PHP Version: 4.0.5
Description: Gets stuck on explode() when delimiter is not in the string

You are right this is no bug on explode().

The problem is if you explode into a database (which PHP tends to get stuck on 
imploding bad queries).
Thanks for your time on this report, anyway.

Previous Comments:
---

[2001-05-07 12:42:38] [EMAIL PROTECTED]
Can't reproduce this with PHP 4.0.6-dev either, on Win2K. Tested it both from the 
command-line with 'php -q test.php', as via Apache.


---

[2001-05-03 15:08:34] [EMAIL PROTECTED]
I can't reproduce this on Windows either. Can you please try and run this from command 
line and see if it still creates problems? Without any prepends or anything

---

[2001-05-03 14:21:23] [EMAIL PROTECTED]
Maybe is a bug related to WIN NT ?
Do you need more info about the settings of my phpinfo() ?

---

[2001-05-02 23:19:23] [EMAIL PROTECTED]
I can't reproduce this with latest CVS on Linux using
the following test script:

?php

$str = this test string doesnt include the separator char;
$arr = explode(;, $str);

?

--Jani


---

[2001-05-01 06:23:12] [EMAIL PROTECTED]
If I perform an 
explode(,,$str);
on
$str = hi there this is a test;

Php gets stuck and can eventually bing the memroy of the server down.

---

The remainder of the comments for this report are too long.  To view the rest of the 
comments, please view the bug report online.

Full Bug description available at: http://bugs.php.net/?id=10574


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #10574 Updated: Gets stuck on explode() when delimiter is not in the string

2001-05-13 Thread derick

ID: 10574
Updated by: derick
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Closed
Bug Type: Arrays related
Operating system: 
PHP Version: 4.0.5
Assigned To: 
Comments:

User says it's not a bug in PHP

Previous Comments:
---

[2001-05-13 15:22:44] [EMAIL PROTECTED]
You are right this is no bug on explode().

The problem is if you explode into a database (which PHP tends to get stuck on 
imploding bad queries).
Thanks for your time on this report, anyway.

---

[2001-05-07 12:42:38] [EMAIL PROTECTED]
Can't reproduce this with PHP 4.0.6-dev either, on Win2K. Tested it both from the 
command-line with 'php -q test.php', as via Apache.


---

[2001-05-03 15:08:34] [EMAIL PROTECTED]
I can't reproduce this on Windows either. Can you please try and run this from command 
line and see if it still creates problems? Without any prepends or anything

---

[2001-05-03 14:21:23] [EMAIL PROTECTED]
Maybe is a bug related to WIN NT ?
Do you need more info about the settings of my phpinfo() ?

---

[2001-05-02 23:19:23] [EMAIL PROTECTED]
I can't reproduce this with latest CVS on Linux using
the following test script:

?php

$str = this test string doesnt include the separator char;
$arr = explode(;, $str);

?

--Jani


---

The remainder of the comments for this report are too long.  To view the rest of the 
comments, please view the bug report online.


ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=10574edit=2


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] ext/session broken in latest CVS?

2001-05-13 Thread Sebastian Bergmann

  Hey there,

  the latest CVS (built as CGI) crashes on Win32 with the following
simple script

?php
  session_start();
  session_register('foo');
  $foo = 'bar';
?

  It does not crash on the first request of a session, but on any
consecutive request to that file.

-- 
 sebastian bergmann[EMAIL PROTECTED]
   http://www.sebastian-bergmann.de

 bonn.phpug.de | www.php.net | www.phpOpenTracker.de | www.titanchat.de

-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] Bug #10836 Updated: German translation of chop()

2001-05-13 Thread eschmid+sic

On Sun, May 13, 2001 at 11:34:10AM -, [EMAIL PROTECTED] wrote:
 ID: 10836
 User Update by: [EMAIL PROTECTED]
 Status: Closed
 Bug Type: Documentation problem
 Operating system: W2K
 PHP Version: 4.0.5
 Description: German translation of chop()
 
 Verbose please...

Please look yourself who made the translation at cvs.php.net and speak
with him or her. All translators are in de/Translators.

-Egon

-- 
LinuxTag, Stuttgart, Germany: July 5-8 2001: http://www.linuxtag.de/
All known books about PHP and related books: http://php.net/books.php 
Concert Band of the University of Hohenheim: http://www.concert-band.de/
First and second bestselling book in German: http://www.php-buch.de/

-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] ext/session broken in latest CVS?

2001-05-13 Thread derick

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Sun, 13 May 2001, Sebastian Bergmann wrote:

   Hey there,

   the latest CVS (built as CGI) crashes on Win32 with the following
 simple script

 ?php
   session_start();
   session_register('foo');
   $foo = 'bar';
 ?

   It does not crash on the first request of a session, but on any
 consecutive request to that file.

Is this with the HEAD or the PHP_4_0_6 branch?

regards,
Derick

- -
PHP: Scripting the Web - www.php.net - [EMAIL PROTECTED]
 SRM: Site Resource Manager - www.vl-srm.net
- -
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.4 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE6/vJm86Enb7tfILgRAiZPAKDqnvC/Mj/dvq0VXgWWXMK5bMxxbACeL19B
hOT0rr7K/HcOx3CaxZetadE=
=BkNF
-END PGP SIGNATURE-


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #10790 Updated: Cannot redeclare function/class from included file

2001-05-13 Thread christian . huff

ID: 10790
User Update by: [EMAIL PROTECTED]
Status: Open
Bug Type: Scripting Engine problem
Operating system: Win2k,IIS5
PHP Version: 4.0.5
Description: Cannot redeclare function/class from included file

Shall I post my configuration files? Just in case it might help with the 
reconstruction of that error...

Previous Comments:
---

[2001-05-10 12:25:26] [EMAIL PROTECTED]
Using include_once() does not make any difference.

---

[2001-05-10 11:50:27] [EMAIL PROTECTED]
What if you use include_once() instead of include() ?
Does it make any difference?

--Jani


---

[2001-05-10 10:57:59] [EMAIL PROTECTED]
Now this is what happens: I include a .php-file for database access via ODBC. While I 
was trying to make things 'easier', I stumbled across a problem: Classes and functions 
declared in an included file seem to work at first glance, but when reloaded, the 
declaration fails: 

Fatal error: Cannot redeclare class odbc_obj in E:Web-ProjekteTestodbc.php on line 5

If I move the declaration of the class into the index.php, the script complains about 
being unable to redeclare connexecute(). Reloading again after the error, the script 
works, but thereafter, it refuses again and so on and on.


--- odbc.php ---

$conn_id = odbc_pconnect (TEST, , );
global $conn_id;

class odbc_obj {
var $result;
  
function set_rs ($res) {
$this-result = $res;
}

function out ($eingabe) {
$retval = odbc_result($this-result,$eingabe);
return $retval;
}
}

function ConnExecute($sql)
{
  global $conn_id,$did;
  $did = odbc_exec ($conn_id, $sql);

  $retval = new odbc_obj;
  $retval-set_rs ($did);
  return $retval;
}

--- index.php ---
include(odbc.php);

$sql = some sql query string;
$rs = ConnExecute($sql);


---


Full Bug description available at: http://bugs.php.net/?id=10790


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Question about form

2001-05-13 Thread ÕŕF

hi,
   In php3, you can use $xxx to get the value the the xxx's value in the
html form which has the name xxx on matter what the submit method is; in
php4, I get nothing through this method, here is the part of the source
code:

   form method=get action=?php echo $PHP_SELF; ? target=_self
   input type=text name=xxx


  ?php
echo $xxx;
  ?

My develop evironment:
Win2k Srv + PHP4 + Apache


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #10841: Only last(?) of multiple mysql_pconnect() connections get reused

2001-05-13 Thread Thomas . Lamy

From: [EMAIL PROTECTED]
Operating system: Linux 2.2.19
PHP version:  4.0.4
PHP Bug Type: MySQL related
Bug description:  Only last(?) of multiple mysql_pconnect() connections get reused

After doing multiple (say 3) mysql_pconnect() from within
one page, as suspected the number of mysql threads
increases, but only the last connection made is being reused
by subsequent calls to mysql_pconnect from other pages/requests.
This is a bit unconfirmed, since I don't have the time and
resources right now, but tests on a production site (which
has crashed very often the last time) showed that the
following code cut down the number of mysql threads at least
tenfold:

if (!@mysql_select_db (test)) {
  mysql_pconnect(db,user,pass) or die (No
DB:.mysql_error());
  mysql_select_db (test) or die (database does not exist:
.mysql_error());
}




-- 
Edit Bug report at: http://bugs.php.net/?id=10841edit=1



-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] Update of bundled packages

2001-05-13 Thread Michael Widenius


Hi!

 Andi == Andi Gutmans [EMAIL PROTECTED] writes:

Andi At 08:24 PM 5/12/2001 +0200, Sebastian Bergmann wrote:
 Alexander Bokovoy wrote:
 Another issue is the bundled mysql client library. phpinfo()
   currently shows 3.23.32 as its API version. Is this up-to-date?
  Latest version is 3.32.36 I think.
 
 Is an upgrade of the libmysql client that comes with php4 needed?

Andi I emailed Tim from the MySQL team a couple of times. There are two issues 
Andi that need to be resolved. One is a build fix (I think) one of the PHP 
Andi developers committed to the libmysql directory. This should obviously be 
Andi sync'ed with the MySQL team as they upgrade the client when needed. The 
Andi second issue is a missing configure directive which can break compilations 
Andi of MySQL on AIX (and possibly also other platforms).

Andi I think Tim was ill for a while so he probably didn't get around to it.
Andi Monty, Tim, can you please let us know what the status of these two issues 
Andi is? (I mailed Tim about them).

Tim is now back and he should be able to handle this during the
incomming week.  (Tim, email me if you can't do this...)

Regards,
Monty

-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #8722 Updated: non blocking sockets reading doesn't work on WIN32

2001-05-13 Thread jmoore

ID: 8722
Updated by: jmoore
Reported By: [EMAIL PROTECTED]
Old-Status: Assigned
Status: Closed
Bug Type: Sockets related
Operating system: 
PHP Version: 4.0.4pl1
Assigned To: 
Comments:

This appears to be fixed in latest CVS. (I cant reproduce this with or without your 
patch). Please try this with latest cvs and reopen if this is not the case.

- James

Previous Comments:
---

[2001-04-16 06:38:01] [EMAIL PROTECTED]
Ill test the patch and commit if it works well. It looks right to me.

-James

---

[2001-01-15 14:50:07] [EMAIL PROTECTED]
i have the following script:

  $g_ssock=fsockopen($server,$port,$errno,$errstr,30);
  socket_set_blocking($g_ssock,0);
  while(!feof($g_ssock))
echo fgets($g_ssock,4096);

if you uncomment the socket_set_blocking line it will work fine on win32, but with non 
blocking sockets,  feof will always return true. by digging through the code, it 
appears that fsock.c uses the errno() function for determining any socket error as 
seen in function php_sockread_internal:

} else if(nr_bytes == 0 || (nr_bytes  0  errno != EWOULDBLOCK)) {
sock-eof = 1;
}

the problem is that win32 doesn't report socket errors with _errno() but with 
WSAGetLastError() so here is my fix:

in fsock.c, line 46, replace:

#ifdef PHP_WIN32
#include winsock.h
#else

with:

#ifdef PHP_WIN32
#include winsock.h
#undef errno
#define errno (WSAGetLastError())
#else



---



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=8722edit=2


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] GD 2 support planned?

2001-05-13 Thread Al Maw

This doesn't strike me as a particularly difficult job, and would be most
beneficial as it has much better support for truecolour images and handles
resampling. Is anyone working on this?

--
Al



-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #10842: FAQ section 8.1 should mention input name=array[key] syntax

2001-05-13 Thread tim

From: [EMAIL PROTECTED]
Operating system: N/A
PHP version:  4.0.5
PHP Bug Type: Documentation problem
Bug description:  FAQ section 8.1 should mention lt;input name=array[key]gt; syntax

Section 8.1 of the FAQ linked from php.net talks about 
using HTML forms to create arrays in PHP. It describes
the input name=array[] syntax, but specifically 
mentions that you can't use array keys - which is wrong,
I'm not sure which version this was added in, but
you can happily do

input name=array[key1] ... 
input name=array[key2] ...  

and use $array in your target script.

I find this terribly useful, so I thought it should be in 
the FAQ.



-- 
Edit Bug report at: http://bugs.php.net/?id=10842edit=1



-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #10843: Function creates new array but does not reset pointer

2001-05-13 Thread peter

From: [EMAIL PROTECTED]
Operating system: NT 4.0 sp6
PHP version:  4.0.5
PHP Bug Type: ODBC related
Bug description:  Function creates new array but does not reset pointer

I tried odbc_fetch_into() in the enclosed loop. I had to inset the reset($array) to 
get the loop working. I figure the function is creating new content in the array but 
not resetting the array pointer back to the beginning. The function should either
1/ add to the end of the array and increment the pointer
or
2/ replace the contents and reset the pointer.

$sql = select * from stock;
$result = odbc_exec($connection[vitamins], $sql);
if($result)
   {
   print(brResult from odbc_fetch_into() );
   $array = ;
   while($result_all = odbc_fetch_into($result, 0, $array))
  {
  reset($array);
  print(br );
  while(list($k, $v) = each($array))
 {
 print($v . nbsp;nbsp;);
 }
  }
   }
else
   {
   print(brNo result );
   }



-- 
Edit Bug report at: http://bugs.php.net/?id=10843edit=1



-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] GD 2 support planned?

2001-05-13 Thread Sterling Hughes

Al Maw wrote:

 This doesn't strike me as a particularly difficult job, and would be most
 beneficial as it has much better support for truecolour images and handles
 resampling. Is anyone working on this?


Its already been updated :)))

-Sterling



-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] GD 2 support planned?

2001-05-13 Thread Wez Furlong

On 2001-05-14 01:04:24, Al Maw [EMAIL PROTECTED] wrote:
 This doesn't strike me as a particularly difficult job, and would be
most
 beneficial as it has much better support for truecolour images and
handles
 resampling. Is anyone working on this?

I implemented this a couple of weeks ago in CVS.

--Wez.


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #10844: OCI8 segmentation fault

2001-05-13 Thread ziembor-php

From: [EMAIL PROTECTED]
Operating system: Linux builder2 2.2.19-3.trust.zmb #12 SMP Mon Apr 9 12:24:26 CEST 
2001 i686 unknown
PHP version:  4.0.5
PHP Bug Type: Reproducible crash
Bug description:  OCI8 segmentation fault 

cite
php -a -e /home/httpd/html/p1000-ui/index.php3
Interactive mode enabled

X-Powered-By: PHP/4.0.5
Location: ui/
Content-type: text/html

Segmentation fault. 
/cite 
System Linux builder2 2.2.19-3.trust.zmb #12 SMP Mon Apr 9 12:24:26 CEST 2001 i686 
unknown 
(RedHat 6.2 with updates)

Build Date May 13 2001 
Configure Command './configure' '--prefix=/usr' '--with-config-file-path=/etc' 
'--disable-debug' '--enable-pic' '--enable-shared' '--enable-inline-optimization' 
'--with-apxs=/usr/sbin/apxs' '--with-exec-dir=/usr/bin' '--with-regex=system' 
'--with-gettext' '--with-gd' '--with-jpeg-dir=/usr' '--with-png' '--with-zlib' 
'--with-db2' '--with-gdbm' '--enable-debugger' '--enable-magic-quotes' 
'--enable-safe-mode' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' 
'--enable-track-vars' '--enable-yp' '--enable-ftp' '--enable-wddx' '--without-mysql' 
'--with-oci8=/usr/oracle/product/816' '--with-xml' 


Without export LD_PRELOAD=/usr/lib/libpthread.so in /etc/rc.d/init.d/httpd behave like 
described in 
Bug id #10339



-- 
Edit Bug report at: http://bugs.php.net/?id=10844edit=1



-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]