[PHP-DEV] PHP 4.0 Bug #9186: string compare with == does not work correctly

2001-02-09 Thread tom . anheyer

From: [EMAIL PROTECTED]
Operating system: any
PHP version:  4.0.4pl1
PHP Bug Type: Scripting Engine problem
Bug description:  string compare with "==" does not work correctly

First the test script:

?
$a = '012345678901234567';
$b = '012345678901234568';
echo ($a == $b) ? "a equal b\n" : "a not equal b\n";
echo ($a === $b) ? "a equal b\n" : "a not equal b\n";
printf ("as string: a=%s b=%s\n", $a, $b);
printf ("as float: a=%.0f b=%.0f\n", $a, $b);
printf ("as int: a=%d b=%d\n", $a, $b);
?

and its output:

a equal b
a not equal b
as string: a=012345678901234567 b=012345678901234568
as float: a=12345678901234567 b=12345678901234567
as int: a=2147483647 b=2147483647

Zend trys to convert the arguments to numbers if both 
arguments are strings. This is not good and its not a 
feature. 






-- 
Edit Bug report at: http://bugs.php.net/?id=9186edit=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] Why do we want to give YOU money?

2001-02-09 Thread justforyou

Simple answer, you were randomly selected from our recently purchased
opt-in lists. OK so why are we giving away money you ask?

Another simple answer. We want you to discover what 10,000's of other
people just like you already know... our Casino is fast-paced, interactive
and just plain old fun.

So if you like to gamble or if you've never tried but always wanted to
click on one of the links below now and collect your $25.00 in bonus
casino chips.

  *
  http://www.click-collect.com.com
  *

But that's not all, fabulous instaprizes and millions in bonus dollars will
also be won during the download. What if you were lucky enough to win a...

** Mercedes Benz **
 ** 3.5 Carat Diamond Ring **
   ** Rolex Oyster Watch **
** 25,000 cool cash **
** Porsche Boxster **

This could be your lucky day so don't wait... click now and win!!

  *
  http://www.click-collect.com
  *

*
Delivered to referrals and opt-ins *only*. All remove requests are honored. All 
players must be 21 years and over. Bonus dollars are only available to credit 
card depositors. We guarantee minimum wins. Good luck!

*
   
  REMOVE 
 mailto:[EMAIL PROTECTED]


-- 
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 4.0 Bug #9187: unable to use socket

2001-02-09 Thread floweb

From: [EMAIL PROTECTED]
Operating system: windows
PHP version:  4.0.4pl1
PHP Bug Type: Sockets related
Bug description:  unable to use socket

when trying to create a Socket i get a undefined function error

i think it has something to do with --enable-sockets 
and not being able to do the configure in windows

i used the windows binary precompiled version of php 4.04




-- 
Edit Bug report at: http://bugs.php.net/?id=9187edit=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] PHP 4.0 Bug #9188: it seems that mysql-module doesn't support any charsets except latin1

2001-02-09 Thread changx

From: [EMAIL PROTECTED]
Operating system: Linux (k:2.2.16)
PHP version:  4.0.4pl1
PHP Bug Type: MySQL related
Bug description:  it seems that mysql-module doesn't support any charsets except 
latin1 

./configure --with-mysql --with-apxs=/var/lib/apache/bin/apxs

make  make install were successed

mysql version is 3.23.32
===Error message
[Fri Feb  9 14:59:11 2001] [error] [client 202.112.216.5] File does not exist: 
/home/changx/public_html/test/phpinfo
File 'NONEXISTENT/charsets/?.conf' not found (Errcode: 2)
Character set '#24' is not a compiled character set and is not specified in the 
'NONEXISTENT/charsets/Index' file
=
after i change back the libphp4.so to 4.0.2, no errors!




-- 
Edit Bug report at: http://bugs.php.net/?id=9188edit=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] how-to get array[0] and array[name] to actually reference only 1 value?

2001-02-09 Thread Marc Boeren


What I'm trying to do is get the following php-script to work... (the only
thing about this that doesn't work is in the fourth 'echo' line...)

$db = dbx_connect("mysql", "localhost", "username", "password"); // works
$result = dbx_query($db, "use dbname"); // works
$q = dbx_query($db, "select id from tbl"); // works

// now I have the results in a 2D array, q-data[row][col]
// where col can be either an index or a fieldname
echo $q-data[0][0]; // works, displays first returned id, say 17
echo $q-data[0]["id"]; // works, displays first returned id (17)

// now I want to change the first returned id...
$q-data[0][0] = 12345;

// what I want is that the next two lines BOTH reflect the change
echo $q-data[0][0]; // works, displays changed id (12345)
echo $q-data[0]["id"]; // doesn't work like I would like, still displays
first returned id (17)

// This is the same behaviour that you get when you use the mysql-functions 
// directly, so no help there... (you can still combine these functions with
the 
// mysql-functions, if needed, like 
$fieldtype = mysql_field_type($q-handle, 0); 
// )

$result = dbx_close($db); // works ( $result = mysql_close($db-handle);
works too, BTW )


Currently I don't think this can be done the way I would like it to work.
Can anybody contradict me on this?

Cheerio, Marc.

-- 
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] ¯Â°Ó·~¿ì¤½«Ç¥X¯² ¡I¡I

2001-02-09 Thread b2xridlp1zo



  **
  ¯Â°Ó·~¿ì¤½«Ç¥X¯²  
  **
   
   ±MªùªA°È°Ó¥Î¿ì¤½«Ç¤§©Ó¯²¤H¡C

   ¥x¥_¦Uµ¥¯Å°Ó¥Î¿ì¤½«Ç®×¥ó¡A¾A¦X¦UºØ°Ó·~»Ý¨D¡I¡I

   §Ú­Ì¾Ö¦³ºZ³qªº¸ê°T¡B¦³«Ü¦h¥ß§Y­n¥X¯²ªº¿ì¤½«Ç¡A¥¿µ¥«ÝµÛ±zªº¬D¿ï¡A
   
   ¤@©w­n¬°±z§ä¨ì¤@³B³Ì¾A¦X±z¹ê²{±z¶¯¹Ï§§§Óªº³õ©Ò¡I¡I¡I¡I

  °Ï°ì¡G
  ¤j¦w°Ï   ¦p ¡G´°¤Æ«n¡B¥_¸ô¯Â¿ì¡A80¢w700©W¡I¡I   
  ªQ¤s°Ï   ¦p ¡G«n¨ÊªF¸ô ¤T¡B¥|¬q¯Â¿ì  50¢w250©W ¡I¡I
  «H¸q°Ï   ¦p ¡G°ò¶©¸ô¤G¬q¡A«H¸q¸ô¤T¬q¯Â¿ì¡A¬Á¼þ±c¹õ¤j¼Ó¡C 30-280©W¡I¡I
  ¤¤¤s°Ï   ¦p ¡Gªø¦wªF¸ô¡A¤¤¤s¥_¸ô¯Â¿ì  70¢w200©W  ¡I¡I
  
  

  ªA°È²Ä¤@¡A«~½è«OÃÒ¡CÅwªï¬¢¸ß.
 

  ·ç°T¤£°Ê²£ °Ó¥ò³¡
  Ápµ¸¤H¡G³³¤p©j 
  TeL¡]¥Nªí¸¹¡^¡G 02-27548587
  ¦æ°Ê¹q¸Ü¡G0937063831
  
  ±zªºº¡·N¡A¬O§Ú­Ìªº¦¨´N¡C




-- 
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 4.0 Bug #9076 Updated: GregorianToJD function returns incorrect values

2001-02-09 Thread basil . hussain

ID: 9076
User Update by: [EMAIL PROTECTED]
Status: Open
Bug Type: Calendar related
Description: GregorianToJD function returns incorrect values

I found more thoroughly-researched algorithms for 
calculating to and from Gregorian/Julian calender dates 
to Julian Day Count values:

http://www.capecod.net/~pbaum/date/date0.htm

I suggest that the PHP Calender functions be based 
upon the algorithms here, as meticulous care seems 
to have been taken to formulate and proof them.

In the meantime, I have written my own 
implementations of the GregorianToJD and 
JDToGregorian functions in PHP. I have tested them 
using the examples in Table 2 of Chapter 1 of Baum's 
work and they pass.

function php_gregoriantojd($input_year, $input_month, 
$input_day) {
// Make sure supplied arguments are of the correct 
form. Day may be a fractional value,
// but month and year must be integers.
$input_year = intval($input_year);
$input_month = intval($input_month);
$input_day = doubleval($input_day);

// Adjust the start of the year so that it is in March.
if($input_month  3) {
$input_month += 12;
$input_year -= 1;
}

// Calculate and return the Julian Day Count.
return $input_day + floor((153 * $input_month - 457) / 
5) + 365 * $input_year + floor($input_year / 4) - 
floor($input_year / 100) + floor($input_year / 400) + 
1721118.5;
}

function php_jdtogregorian($jdc) {
// Make sure that the Julian Day Count value is proper.
$jdc = doubleval($jdc);

$z = floor($jdc - 1721118.5);
$r = $jdc - 1721118.5 - $z;
$g = $z - 0.25;
$a = floor($g / 36524.25);
$b = $a - floor($a / 4);
$gregorian["year"] = floor(($b + $g) / 365.25);
$c = $b + $z - floor(365.25 * $gregorian["year"]);
$gregorian["month"] = floor((5 * $c + 456) / 153);
$gregorian["day"] = $c - floor((153 * 
$gregorian["month"] - 457) / 5) + $r;
if($gregorian["month"]  12) {
$gregorian["year"] += 1;
$gregorian["month"] -= 12;
}

return $gregorian;
}

The line breaks on all of that will probably be all 
mangled when I post, but it should make sense when 
straightened out...

Previous Comments:
---

[2001-02-02 11:05:26] [EMAIL PROTECTED]
The GregorianToJD Calender function returns incorrect 
results. As far as I can tell, this applies to the 
GregorianToSdn internal function in the PHP source.

There's not really any point putting a sample PHP script 
here, as it's the algorithm that seems to be at fault. I 
took two specific cases and worked through the 
algorithm by hand (i.e. pen and paper). Here are the 
results:

2nd February 2001 (2/2/2001) = 2451943
7th June 1980 (7/6/1980) = 2473618

As I understand it, the Julian Day Count is a uniform 
count of days from some time around 4714 BC. Now, 
how can 2/2/01 be a lesser number of days than 
7/6/80?

I have no idea what the correct results for these test 
cases are, nor any idea what particular part of the 
algorithm is wrong. It's just wrong somewhere!

---


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


-- 
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 4.0 Bug #9191: Problems when rejecting cookies

2001-02-09 Thread darren

From: [EMAIL PROTECTED]
Operating system: Linux Mandrake 7.2
PHP version:  4.0.4pl1
PHP Bug Type: *Session related
Bug description:  Problems when rejecting cookies

In all instances I am using a simple templete class that prints the html.

Instance 1
=
1 script which checks the username password, sets a session variable and displays a 
link. The link is coded in the html template with just the address being replaced 
dynamically. On successful login and rejection of the cookie the link is shown 
correctly with the session id attached.

Instance 2
=
2 scripts. On successful logon a session variable is registered and then a redirection 
(using header function). Again cookie is rejected but no session id is passed to the 
2nd script.

Instance 3
=
As instance 1 but html containing links is generated using php and added to the 
template. On successful login and rejection of the cookie the links appear but do not 
have the session id attached to their URLs.



-- 
Edit Bug report at: http://bugs.php.net/?id=9191edit=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] PHP 4.0 Bug #9192: configure script needs -lxml2 for XML-DOM

2001-02-09 Thread ivan

From: [EMAIL PROTECTED]
Operating system: Solaris (irrelevant)
PHP version:  4.0.4pl1
PHP Bug Type: *Install and Config
Bug description:  configure script needs "-lxml2" for XML-DOM

For XML-DOM support, the PHP docs say you need libxml 2.00. These are known as 
"libxml2", and you need to link against "-lxml2".

The current "configure" script for 4.0.4pl1 specifies "-lxml", which does not work.


-- 
Edit Bug report at: http://bugs.php.net/?id=9192edit=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] file upload

2001-02-09 Thread Manuele Ferraro

hi ng

For file upload i compare temp file with "none".
It's OK.

From yesterday, the string tha corresponding at null file is null string



? why ??

Manuele


-- 
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 4.0 Bug #9186 Updated: string compare with == does not work correctly

2001-02-09 Thread zak

ID: 9186
Updated by: zak
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Bogus
Bug Type: Scripting Engine problem
Assigned To: 
Comments:

Actually, this is a feature - it is described in the manual. Strings that look like 
numbers are converted to numbers. Large numbers - like the ones below may not convert 
perfectly from a string to a number.  Review the manual section on PHP types in 
general and strings in particular 
(http://uk.php.net/manual/en/language.types.string.php)

While this is a relatively subtle bug, you can ensure that you are dealing with 
strings by quoting the variables being compared or by using the === operator.  This 
behavior is exploited quite often in PHP scripts.  However, perhaps it would be nice 
if PHP generated an notice level error when it occured so that users have some 
recourse when it happens unexpectedly.

If you feel strongly about this, propose it to the developers as a feature request.  
Post your request on the [EMAIL PROTECTED] list (sub at 
[EMAIL PROTECTED]) - if you get no response, be polite but persistant. :)

Previous Comments:
---

[2001-02-09 03:25:24] [EMAIL PROTECTED]
First the test script:

?
$a = '012345678901234567';
$b = '012345678901234568';
echo ($a == $b) ? "a equal bn" : "a not equal bn";
echo ($a === $b) ? "a equal bn" : "a not equal bn";
printf ("as string: a=%s b=%sn", $a, $b);
printf ("as float: a=%.0f b=%.0fn", $a, $b);
printf ("as int: a=%d b=%dn", $a, $b);
?

and its output:

a equal b
a not equal b
as string: a=012345678901234567 b=012345678901234568
as float: a=12345678901234567 b=12345678901234567
as int: a=2147483647 b=2147483647

Zend trys to convert the arguments to numbers if both 
arguments are strings. This is not good and its not a 
feature. 





---



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=9186edit=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] how-to get array[0] and array[name] to actually reference only 1 value?

2001-02-09 Thread Zak Greant

This list is for discussing issues that relate to the development of the PHP
language.  For mailing lists that discuss development with PHP, see
www.php.net/support.php

Also, even though [0] and ['id'] initially contain the same value, they are
not bound together in any way.  You may be able to accomplish what you
desire by using references. (See the manual section on references for more
information.

ie.  $q-data[0]["id"] = $q-data[0][0];

--zak

- Original Message -
From: "Marc Boeren" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, February 09, 2001 2:37 AM
Subject: [PHP-DEV] how-to get array[0] and array["name"] to actually
reference only 1 value?



 What I'm trying to do is get the following php-script to work... (the only
 thing about this that doesn't work is in the fourth 'echo' line...)

 $db = dbx_connect("mysql", "localhost", "username", "password"); // works
 $result = dbx_query($db, "use dbname"); // works
 $q = dbx_query($db, "select id from tbl"); // works

 // now I have the results in a 2D array, q-data[row][col]
 // where col can be either an index or a fieldname
 echo $q-data[0][0]; // works, displays first returned id, say 17
 echo $q-data[0]["id"]; // works, displays first returned id (17)

 // now I want to change the first returned id...
 $q-data[0][0] = 12345;

 // what I want is that the next two lines BOTH reflect the change
 echo $q-data[0][0]; // works, displays changed id (12345)
 echo $q-data[0]["id"]; // doesn't work like I would like, still displays
 first returned id (17)

 // This is the same behaviour that you get when you use the
mysql-functions
 // directly, so no help there... (you can still combine these functions
with
 the
 // mysql-functions, if needed, like
 $fieldtype = mysql_field_type($q-handle, 0);
 // )

 $result = dbx_close($db); // works ( $result = mysql_close($db-handle);
 works too, BTW )


 Currently I don't think this can be done the way I would like it to work.
 Can anybody contradict me on this?

 Cheerio, Marc.

 --
 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 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 4.0 Bug #9194: Objects not properly stored as session variables

2001-02-09 Thread ltning

From: [EMAIL PROTECTED]
Operating system: Slackware Linux
PHP version:  4.0.4pl1
PHP Bug Type: Class/Object related
Bug description:  Objects not properly stored as session variables

Look at
http://mail2.anduin.net/index.phps for sourcecode of failing page.
http://mail2.anduin.net/index.php to test, use test/test as username/password.

Bug is as follows:
I define the class "user", call session_start(), create an instance of the object 
called $currentuser, register this variable using session_register() (i tried doing 
this both before and after the instancination). Upon creating, the object sets some 
internal variables in its constructor, like "fullname".
When loading the page again, having the session-id in PHPSESSID, the object shows up 
as existing, but trying to call a method or view a property fails with the message:
Fatal error: The script tried to execute a method or access a property of an 
incomplete object. Please ensure that the class definition user of the object you are 
trying to operate on was loaded _before_ the session was started in 
/home/ltning/webmail2/index.php on line 34

I see this bug has been reported before and considered fixed, but it doesn't seem to 
be. Running latest (4.04pl1) PHP.

best regards,
Eirik Overby


-- 
Edit Bug report at: http://bugs.php.net/?id=9194edit=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] PHP 4.0 Bug #9186 Updated: string compare with == does not work correctly

2001-02-09 Thread tom . anheyer

ID: 9186
User Update by: [EMAIL PROTECTED]
Status: Bogus
Bug Type: Scripting Engine problem
Description: string compare with "==" does not work correctly

I think there is no reason to convert any type if both 
operands of the comparision are of the same type. It costs 
time and it's completely not necessary. This is a bug.

I can not see any description of this behavior in the 
manual. The string type section descibes only what is 
happen if a string is converted.



Previous Comments:
---

[2001-02-09 10:27:46] [EMAIL PROTECTED]
Actually, this is a feature - it is described in the manual. Strings that look like 
numbers are converted to numbers. Large numbers - like the ones below may not convert 
perfectly from a string to a number.  Review the manual section on PHP types in 
general and strings in particular 
(http://uk.php.net/manual/en/language.types.string.php)

While this is a relatively subtle bug, you can ensure that you are dealing with 
strings by quoting the variables being compared or by using the === operator.  This 
behavior is exploited quite often in PHP scripts.  However, perhaps it would be nice 
if PHP generated an notice level error when it occured so that users have some 
recourse when it happens unexpectedly.

If you feel strongly about this, propose it to the developers as a feature request.  
Post your request on the [EMAIL PROTECTED] list (sub at 
[EMAIL PROTECTED]) - if you get no response, be polite but persistant. :)

---

[2001-02-09 03:25:24] [EMAIL PROTECTED]
First the test script:

?
$a = '012345678901234567';
$b = '012345678901234568';
echo ($a == $b) ? "a equal bn" : "a not equal bn";
echo ($a === $b) ? "a equal bn" : "a not equal bn";
printf ("as string: a=%s b=%sn", $a, $b);
printf ("as float: a=%.0f b=%.0fn", $a, $b);
printf ("as int: a=%d b=%dn", $a, $b);
?

and its output:

a equal b
a not equal b
as string: a=012345678901234567 b=012345678901234568
as float: a=12345678901234567 b=12345678901234567
as int: a=2147483647 b=2147483647

Zend trys to convert the arguments to numbers if both 
arguments are strings. This is not good and its not a 
feature. 





---


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


-- 
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 4.0 Bug #9186 Updated: string compare with == does not work correctly

2001-02-09 Thread zak

ID: 9186
Updated by: zak
Reported By: [EMAIL PROTECTED]
Old-Status: Bogus
Status: Open
Bug Type: Scripting Engine problem
Assigned To: 
Comments:

Incorrectly flagged as bogus.

Previous Comments:
---

[2001-02-09 10:59:10] [EMAIL PROTECTED]
I think there is no reason to convert any type if both 
operands of the comparision are of the same type. It costs 
time and it's completely not necessary. This is a bug.

I can not see any description of this behavior in the 
manual. The string type section descibes only what is 
happen if a string is converted.



---

[2001-02-09 10:27:46] [EMAIL PROTECTED]
Actually, this is a feature - it is described in the manual. Strings that look like 
numbers are converted to numbers. Large numbers - like the ones below may not convert 
perfectly from a string to a number.  Review the manual section on PHP types in 
general and strings in particular 
(http://uk.php.net/manual/en/language.types.string.php)

While this is a relatively subtle bug, you can ensure that you are dealing with 
strings by quoting the variables being compared or by using the === operator.  This 
behavior is exploited quite often in PHP scripts.  However, perhaps it would be nice 
if PHP generated an notice level error when it occured so that users have some 
recourse when it happens unexpectedly.

If you feel strongly about this, propose it to the developers as a feature request.  
Post your request on the [EMAIL PROTECTED] list (sub at 
[EMAIL PROTECTED]) - if you get no response, be polite but persistant. :)

---

[2001-02-09 03:25:24] [EMAIL PROTECTED]
First the test script:

?
$a = '012345678901234567';
$b = '012345678901234568';
echo ($a == $b) ? "a equal bn" : "a not equal bn";
echo ($a === $b) ? "a equal bn" : "a not equal bn";
printf ("as string: a=%s b=%sn", $a, $b);
printf ("as float: a=%.0f b=%.0fn", $a, $b);
printf ("as int: a=%d b=%dn", $a, $b);
?

and its output:

a equal b
a not equal b
as string: a=012345678901234567 b=012345678901234568
as float: a=12345678901234567 b=12345678901234567
as int: a=2147483647 b=2147483647

Zend trys to convert the arguments to numbers if both 
arguments are strings. This is not good and its not a 
feature. 





---



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=9186edit=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 4.0 Bug #9186 Updated: string compare with == does not work correctly

2001-02-09 Thread Zak Greant

Alan van den Bosch wrote:
[snip]
 This issue arises from the loose typing in PHP with the introduction of
 first class boolean type (the true and false keywords), from my
 understanding the sematics being applied here are as follows (poetic
license
 applied liberally);

 == is (has become?) a boolean logic operator, dealing in terms of  'true'
 and 'false' values, so its terms are type cast to either 'true' or
'false'.
 When applied to strings, a 'false' string is zero length or contains '0',
 all other strings are 'true'.
 [please dont ask 'what if the string is NULL... ;-)]

 If you dont want your terms to be treated as (type cast to) boolean values
 use the strict equallity operator ===

   I can not see any description of this behavior in the
   manual. The string type section descibes only what is
   happen if a string is converted.

 The manual doesnt seem very clear on this at all, but == behaves something
 like ^(A xor B)

While I certainly appreciate the support :) - I am not sure that this is a
correct appraisal of the situation.  We should take a look at the source
code and see what it actually does.  My impression is that it should cast
the values as strings and then compare the strings.

--zak






-- 
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 4.0 Bug #9186 Updated: string compare with == does not work correctly

2001-02-09 Thread Zeev Suraski

At 17:59 9/2/2001, [EMAIL PROTECTED] wrote:
ID: 9186
User Update by: [EMAIL PROTECTED]
Status: Bogus
Bug Type: Scripting Engine problem
Description: string compare with "==" does not work correctly

I think there is no reason to convert any type if both
operands of the comparision are of the same type. It costs
time and it's completely not necessary. This is a bug.

No, it's not a bug.  It's definitely an intended behavior.
PHP does it's best to do the 'right thing' in the most common 
cases.  Because of the way it works, effectively, comparing strings that 
'look like numbers' as if they were numbers makes life much, much easier.
If you want to enforce a string comparison, use strcmp().

Zeev


-- 
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 4.0 Bug #9186 Updated: string compare with == does not work correctly

2001-02-09 Thread Zeev Suraski

At 19:34 9/2/2001, Hartmut Holzgraefe wrote:
Alan van den Bosch wrote:
  == is (has become?) a boolean logic operator, dealing in terms of  'true'
  and 'false' values, so its terms are type cast to either 'true' or 'false'.
  When applied to strings, a 'false' string is zero length or contains '0',
  all other strings are 'true'.

the result of == is boolean, not the arguments

expected behaviour could be:
if left-hand-type != right-hand-type
   convert right-hand-argument to left-hand type
compare left-hand-argument to possibly converted right-hand-argument

There's no (and shouldn't be any) significance in the order of the arguments.

additionaly, IMHO,
as php has to deal with html forms a lot and html has no
input type=numeric there are a lot of places where a string
that qualifies as is_numeric is silently treated as a numeric argument

Right, that's why PHP automatically compares two string-like strings as if 
they were numbers.

Zeev


-- 
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 4.0 Bug #9186 Updated: string compare with == does not work correctly

2001-02-09 Thread Zak Greant

Zeev Suraski wrote:
 At 17:59 9/2/2001, [EMAIL PROTECTED] wrote:
 ID: 9186
 User Update by: [EMAIL PROTECTED]
 Status: Bogus
 Bug Type: Scripting Engine problem
 Description: string compare with "==" does not work correctly
 
 I think there is no reason to convert any type if both
 operands of the comparision are of the same type. It costs
 time and it's completely not necessary. This is a bug.
 
 No, it's not a bug.  It's definitely an intended behavior.
 PHP does it's best to do the 'right thing' in the most common 
 cases.  Because of the way it works, effectively, comparing strings that 
 'look like numbers' as if they were numbers makes life much, much easier.
 If you want to enforce a string comparison, use strcmp().

We should document this behavior then - it could lead to problems 
that are very hard to track down!

--zak


-- 
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 4.0 Bug #9186 Updated: string compare with == does not work correctly

2001-02-09 Thread Zeev Suraski

Yep, we should.  It came up many times over the years, this behavior 
haven't changed since early PHP 3.0.0...

Zeev

At 19:47 9/2/2001, Zak Greant wrote:
Zeev Suraski wrote:
  At 17:59 9/2/2001, [EMAIL PROTECTED] wrote:
  ID: 9186
  User Update by: [EMAIL PROTECTED]
  Status: Bogus
  Bug Type: Scripting Engine problem
  Description: string compare with "==" does not work correctly
  
  I think there is no reason to convert any type if both
  operands of the comparision are of the same type. It costs
  time and it's completely not necessary. This is a bug.
 
  No, it's not a bug.  It's definitely an intended behavior.
  PHP does it's best to do the 'right thing' in the most common
  cases.  Because of the way it works, effectively, comparing strings that
  'look like numbers' as if they were numbers makes life much, much easier.
  If you want to enforce a string comparison, use strcmp().

 We should document this behavior then - it could lead to problems
 that are very hard to track down!

 --zak

--
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]




[PHP-DEV] PHP 4.0 Bug #9195: Default class function arguments

2001-02-09 Thread nathan

From: [EMAIL PROTECTED]
Operating system: Linux
PHP version:  4.0.2
PHP Bug Type: Feature/Change Request
Bug description:  Default class function arguments

I'm requesting that the default function arguments for a class method be able to 
reference the class variable members in it's definition. 

Here is an example of it's use:

class searchclass {

var $hits;
var $results;

function save($filename, $start = 0, $end = $this-hits){ /* - this returns 
Parse error: */
if($fp = @fopen($filename, "w")){
for($i = $start; $i  $end; $i++){
fwrite($fp, implode("|", $this-results[$i]));
}
}else{
return false;
}
}

function search(){
/* ... */
}

}


-- 
Edit Bug report at: http://bugs.php.net/?id=9195edit=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] Building stand-alone/built-in

2001-02-09 Thread Emiliano

Hi all,

I'm building a PHP extension that I'd like to be able to build both as
fully external and embedded into PHP. I include some apache headers
si I need the build environment to either tell me where apxs is
or have the include directories 'handed to me' in the php-provided
build environment. How can I tell how I'm being compiled?

Emile

-- 
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 4.0 Bug #9195: Default class function arguments

2001-02-09 Thread Zeev Suraski

Default function arguments have to be static, non dynamic values.  The way 
to do it is

function foo($bar=unset)
{
 if (!isset($bar)) {
 $bar = ...;
 }
}

At 20:00 9/2/2001, [EMAIL PROTECTED] wrote:
From: [EMAIL PROTECTED]
Operating system: Linux
PHP version:  4.0.2
PHP Bug Type: Feature/Change Request
Bug description:  Default class function arguments

I'm requesting that the default function arguments for a class method be 
able to reference the class variable members in it's definition.

Here is an example of it's use:

class searchclass {

 var $hits;
 var $results;

 function save($filename, $start = 0, $end = $this-hits){ /* - 
 this returns Parse error: */
 if($fp = @fopen($filename, "w")){
 for($i = $start; $i  $end; $i++){
 fwrite($fp, implode("|", 
 $this-results[$i]));
 }
 }else{
 return false;
 }
 }

 function search(){
 /* ... */
 }

}


--
Edit Bug report at: http://bugs.php.net/?id=9195edit=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]

--
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]




Re: [PHP-DEV] PHP 4.0 Bug #9195: Default class function arguments

2001-02-09 Thread Zak Greant

After doing a few tests and some reading, it looks like the rule is pretty
simple:

If either expression on either side of a == operator looks like a number,
then the value of the expression is converted to a number.

--zak

- Original Message -
From: "Zeev Suraski" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Friday, February 09, 2001 11:06 AM
Subject: Re: [PHP-DEV] PHP 4.0 Bug #9195: Default class function arguments


 Default function arguments have to be static, non dynamic values.  The way
 to do it is

 function foo($bar=unset)
 {
  if (!isset($bar)) {
  $bar = ...;
  }
 }

 At 20:00 9/2/2001, [EMAIL PROTECTED] wrote:
 From: [EMAIL PROTECTED]
 Operating system: Linux
 PHP version:  4.0.2
 PHP Bug Type: Feature/Change Request
 Bug description:  Default class function arguments
 
 I'm requesting that the default function arguments for a class method be
 able to reference the class variable members in it's definition.
 
 Here is an example of it's use:
 
 class searchclass {
 
  var $hits;
  var $results;
 
  function save($filename, $start = 0, $end = $this-hits){ /* -
  this returns Parse error: */
  if($fp = @fopen($filename, "w")){
  for($i = $start; $i  $end; $i++){
  fwrite($fp, implode("|",
  $this-results[$i]));
  }
  }else{
  return false;
  }
  }
 
  function search(){
  /* ... */
  }
 
 }
 
 
 --
 Edit Bug report at: http://bugs.php.net/?id=9195edit=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]

 --
 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]




-- 
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 4.0 Bug #9196: Cannot create ADO objects with MDAC 2.6

2001-02-09 Thread peter . johnson

From: [EMAIL PROTECTED]
Operating system: Win2K Winnt4
PHP version:  4.0.4pl1
PHP Bug Type: COM related
Bug description:  Cannot create ADO objects with MDAC 2.6

The code snippet below fails on the line which sets the Active Connection of the 
Command Object.  It works OK with MDAC 2.5 SP1, but not MDAC 2.6 - weird...

?
require "adovbs.php";
$conGFA = new COM("ADODB.Connection") or die("Unable to instantiate GFA DB 
Connection");

$conGFA - ConnectionString = "Provider=SQLOLEDB;OLE DB Services=0;Persist 
Security Info=False;User ID=UserID;Password=Password;Initial Catalog=gfa;Data 
Source=DBSERVER;";
$conGFA - Open;

$cmdGFA = new COM("ADODB.Command") or die("Unable to instantiate GFA DB 
Command Object");

$cmdGFA - ActiveConnection = $conGFA - ConnectionString;
?


-- 
Edit Bug report at: http://bugs.php.net/?id=9196edit=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] PHP 4.0 Bug #9195: Default class function arguments

2001-02-09 Thread Zeev Suraski

No, it's more complicated than that.  Actually, it's not that complicated 
if you explain it the other way around:

- The only case in which a char-by-char comparison is made, is if both 
arguments are strings, and at least one of them doesn't "look" like a number.

Or, in other words:

- If at least one of the arguments is not a string, a numeric comparison is 
made.
- If both arguments are strings, but both of them look like numbers, a 
numeric comparison is made.
- If both arguments are strings (and at least one of them doesn't look like 
a number), a string comparison is made.

Zeev


At 20:25 9/2/2001, Zak Greant wrote:
After doing a few tests and some reading, it looks like the rule is pretty
simple:

If either expression on either side of a == operator looks like a number,
then the value of the expression is converted to a number.

--zak

- Original Message -
From: "Zeev Suraski" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Friday, February 09, 2001 11:06 AM
Subject: Re: [PHP-DEV] PHP 4.0 Bug #9195: Default class function arguments


  Default function arguments have to be static, non dynamic values.  The way
  to do it is
 
  function foo($bar=unset)
  {
   if (!isset($bar)) {
   $bar = ...;
   }
  }
 
  At 20:00 9/2/2001, [EMAIL PROTECTED] wrote:
  From: [EMAIL PROTECTED]
  Operating system: Linux
  PHP version:  4.0.2
  PHP Bug Type: Feature/Change Request
  Bug description:  Default class function arguments
  
  I'm requesting that the default function arguments for a class method be
  able to reference the class variable members in it's definition.
  
  Here is an example of it's use:
  
  class searchclass {
  
   var $hits;
   var $results;
  
   function save($filename, $start = 0, $end = $this-hits){ /* -
   this returns Parse error: */
   if($fp = @fopen($filename, "w")){
   for($i = $start; $i  $end; $i++){
   fwrite($fp, implode("|",
   $this-results[$i]));
   }
   }else{
   return false;
   }
   }
  
   function search(){
   /* ... */
   }
  
  }
  
  
  --
  Edit Bug report at: http://bugs.php.net/?id=9195edit=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]
 
  --
  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]
 
 

--
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]




Re: [PHP-DEV] PHP 4.0 Bug #9186 Updated: string compare with == does not work correctly

2001-02-09 Thread Zak Greant

How is this? I modified what Zeev said a wee bit:

== is a 'loose' comparison operator [1].

In most cases, this is more convenient - the operator does the right thing
without needing any coaxing.  In some cases, things will happen that are
confusing - particularly when comparing values that have leading zeros (0)
or when comparing very long numbers that are inside a string.

The basic rule to follow is this:

Character-by-character comparison is performed only if both arguments are
strings and at least one of the strings does not look like a number [2].

Another way to state this rule is:

- If at least one of the arguments is not a string, a numeric comparison is
made.

- If both arguments are strings, but both of them look like numbers, a
numeric comparison is made.

- If both arguments are strings (and at least one of them doesn't look like
a number), a string comparison is made.

[1] If you need to perform an exact comparison between two values, take a
look at the 'strict' comparison operator (===) and the strcmp() function.

[2] See the manual section on types and strings to learn what rules PHP
follows for recognising numbers within strings.

(Thanks to Zeev for clarifying this issue.)

--zak


-- 
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 4.0 Bug #9079 Updated: PHP seg faults in alloca() at first PHP request to Apache

2001-02-09 Thread mchampagne

ID: 9079
User Update by: [EMAIL PROTECTED]
Old-Status: Open
Status: Closed
Bug Type: Scripting Engine problem
Description: PHP seg faults in alloca() at first PHP request to Apache

We undefined HAS_ALLOCA from all the makefiles, recompiled and this fixed our problem. 
 One of our compiler gurus here says we could add '-ma' to the compiler flags to get 
around this problem.  AIX 4.3.3 apparently does not have alloca() and the PHP 
configure script thinks it does.

Mike


Previous Comments:
---

[2001-02-08 14:32:08] [EMAIL PROTECTED]
I see this snippet in my config.log where it's not finding alloca.h.  I did not find 
alloca.h in the PHP source tree or anywhere on my system.

configure:5777: checking for alloca.h
configure:5787: cc -E  -DAIX=43 -DMOD_SSL=204110 -DEAPI -DUSE_EXPAT conftest.c 
/dev/null 2conftest.out
"configure", line 5783.10: 1506-296 (S) #include file alloca.h not found.
configure: failed program was:
#line 5782 "configure"
#include "confdefs.h"
#include alloca.h
configure:5777: checking for arpa/inet.h
configure:5787: cc -E  -DAIX=43 -DMOD_SSL=204110 -DEAPI -DUSE_EXPAT conftest.c 
/dev/null 2conftest.out
configure:5777: checking for crypt.h

---

[2001-02-08 14:16:51] [EMAIL PROTECTED]
I see this snippet in my config.log where it's not finding alloca.h.  I did not find 
alloca.h in the PHP source tree or anywhere on my system.

configure:5777: checking for alloca.h
configure:5787: cc -E  -DAIX=43 -DMOD_SSL=204110 -DEAPI -DUSE_EXPAT conftest.c 
/dev/null 2conftest.out
"configure", line 5783.10: 1506-296 (S) #include file alloca.h not found.
configure: failed program was:
#line 5782 "configure"
#include "confdefs.h"
#include alloca.h
configure:5777: checking for arpa/inet.h
configure:5787: cc -E  -DAIX=43 -DMOD_SSL=204110 -DEAPI -DUSE_EXPAT conftest.c 
/dev/null 2conftest.out
configure:5777: checking for crypt.h

---

[2001-02-08 11:46:33] [EMAIL PROTECTED]
Do you guys have any ideas what this is?  I can keep trying different things on this 
but I don't have a direction.  We are desperate to run PHP.  I did try installing to 
our actual Apache directory instead of soft linking /usr/local and we came up with the 
same thing.

Mike


---

[2001-02-02 11:48:49] [EMAIL PROTECTED]
We are running Oracle IAS 1.0.0.0 on AIX 4.3.3.  Oracle's IAS runs Apache 1.3.9 and 
the root Apache directory is in /ias/Apache/Apache.  We have a soft link from 
/usr/local/apache - /ias/Apache.  We are installing our PHP source from 
/usr/tools/src/php-4.0.4pl1/ and I believe the config script uses /usr/local as it's 
prefix?  We ran make and make install and we bring up Apache with mod_php 
successfully.  At the first request however, php cores in the /ias/Apache/Apache 
directory.  The request is simply running phpinfo().  I see the following message in 
our httpds_error_log:

[Fri Feb  2 11:26:34 2001] [notice] Apache/1.3.9 (Unix) PHP/4.0.4pl1 mod_perl/1.21 
ApacheJServ/1.1 configured --
 resuming normal operations
[Fri Feb  2 11:26:58 2001] [notice] child pid 17026 exit signal Segmentation fault 
(11)

Here's what I see in the core file:

Segmentation fault in sig_coredump at 0x10003824
0x10003824 (sig_coredump+0x3c) 80410014  l   r2,0x14(r1)

(dbx) where
sig_coredump(0xb) at 0x10003824
alloca() at 0xd36ccef8
php_execute_script(0x2ff22530), line 1181 in "main.c"
apache_php_module_main(0x20255e30, 0x0), line 89 in "sapi_apache.c"
send_php(0x20255e30, 0x0, 0x20257dc0), line 516 in "mod_php4.c"
send_parsed_php(0x20255e30), line 527 in "mod_php4.c"
ap_invoke_handler(0x20255e30) at 0x100c3138
process_request_internal(0x20255e30) at 0x100edf8c
ap_process_request(0x20255e30) at 0x100ef4f8
child_main(0x0) at 0x10002058
make_child(0x2004ed20, 0x0, 0x3a7adfba) at 0x10001a18
startup_children(0x5) at 0x10001804
standalone_main(0x3, 0x2ff229e8) at 0x1d24
http_main.main(0x3, 0x2ff229e8) at 0x18c8

Our configure scripts is run with:
configure --with-apxs=/ias/Apache/Apache/bin/apxs --with-oci8=/ias/6iserver 
--without-mysql

We also made the modification to libtool in bug 4360 and tried again but we get the 
same as above.

---


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


-- 
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] NSAPI Modifications for iPlanet/NES 4.1

2001-02-09 Thread Andrew Johnson

I've been working on sapi/nsapi/nsapi.c to get it to work properly under
the iPlanet 4.1 server (there are several problems with the version
shipped with PHP 4.0.4pl1).  What should I do with my patch file (~300
lines long) to get these changes incorporated?

- Andrew
-- 
Every great idea appears crazy to start with.

-- 
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] NSAPI Modifications for iPlanet/NES 4.1

2001-02-09 Thread Chris Newbill

If you think you are going to be making more changes then you should
probably get CVS access.

http://bugs.php.net/cvs-php.php

Otherwise post the patch to the list, the maintainer will review it.
(eventually)

Chris Newbill

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 09, 2001 1:52 PM
To: PHP DEV
Subject: [PHP-DEV] NSAPI Modifications for iPlanet/NES 4.1


I've been working on sapi/nsapi/nsapi.c to get it to work properly under
the iPlanet 4.1 server (there are several problems with the version
shipped with PHP 4.0.4pl1).  What should I do with my patch file (~300
lines long) to get these changes incorporated?

- Andrew
--
Every great idea appears crazy to start with.

--
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 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] Function request

2001-02-09 Thread Thomas Deliduka

I think this would be nice. To be able to pull a multi-dimentional array
from a mysql result.

For instance, if I do this:

Select field1,field2 from mytable

Calling something like:

$alldata = mysql_fetch_all($dbpointer)

Would give me:

$alldata["field1"] as an array with values, i.e.:
$alldata["field1"][0] would be the first value, etc.
Also can be associative array for secondary value.

Perhaps as an nice added feature if you only select one field, i.e.:

Select field1 from mytable

The alldata value would automatically simply be an array with all the values
of field1.

I'm just no programmer, I can't code something like that. But if anyone
wants to do this, I think it'd be cool, and useful.


-- 

Thomas Deliduka
IT Manager
 -
New Eve Media
The Solution To Your Internet Angst
http://www.neweve.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]




[PHP-DEV] PHP 4.0 Bug #9198: ocassional session blackouts

2001-02-09 Thread jj

From: [EMAIL PROTECTED]
Operating system: Debian/GNU Linux 2.2
PHP version:  4.0.0
PHP Bug Type: *Session related
Bug description:  ocassional session blackouts

My application used to run PHPLIB for the sake of session variables. After migrating 
to PHP4, I made it use the PHP4 integreted session support (using cookies) and it 
seems to be working fine for most of the time.
Nevertheless, it will ocassionally loose the infromation contained within the session 
and get all active users disconnected and unable to log in again for a while.
I cannot say when it is going to happen again (it is unpredictable) but the fact is 
that it happens...

Thanks in advance,
Jakub Jermar




-- 
Edit Bug report at: http://bugs.php.net/?id=9198edit=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] PHP 4.0 Bug #9199: 'ld: No reference to __DYNAMIC' error

2001-02-09 Thread andrew

From: [EMAIL PROTECTED]
Operating system: OpenBSD 2.8
PHP version:  4.0.4pl1
PHP Bug Type: Compile Failure
Bug description:  'ld: No reference to __DYNAMIC' error

I configured with './configure --with-apxs --with-mysql' successfully.
I type 'gmake', and most of it builds.
Then I get:

Making all in .
gmake[1]: Entering directory `/usr/home/andrew/src/php-4.0.4pl1'

/bin/sh /usr/home/andrew/src/php-4.0.4pl1/libtool --silent --mode=compile gcc  -I. 
-I/usr/home/andrew/src/php-4.0.4pl1/ -I/usr/home/andrew/src/php-4.0.4pl1/main 
-I/usr/home/andrew/src/php-4.0.4pl1 -I/usr/lib/apache/include 
-I/usr/home/andrew/src/php-4.0.4pl1/Zend 
-I/usr/home/andrew/src/php-4.0.4pl1/ext/mysql/libmysql 
-I/usr/home/andrew/src/php-4.0.4pl1/ext/xml/expat/xmltok 
-I/usr/home/andrew/src/php-4.0.4pl1/ext/xml/expat/xmlparse 
-I/usr/home/andrew/src/php-4.0.4pl1/TSRM  -DDEV_RANDOM=/dev/arandom -DMOD_SSL=206106 
-DEAPI -DUSE_EXPAT -DXML_BYTE_ORDER=12 -g -O2  -c stub.c
/bin/sh /usr/home/andrew/src/php-4.0.4pl1/libtool --silent --mode=link gcc  -I. 
-I/usr/home/andrew/src/php-4.0.4pl1/ -I/usr/home/andrew/src/php-4.0.4pl1/main 
-I/usr/home/andrew/src/php-4.0.4pl1 -I/usr/lib/apache/include 
-I/usr/home/andrew/src/php-4.0.4pl1/Zend 
-I/usr/home/andrew/src/php-4.0.4pl1/ext/mysql/libmysql 
-I/usr/home/andrew/src/php-4.0.4pl1/ext/xml/expat/xmltok 
-I/usr/home/andrew/src/php-4.0.4pl1/ext/xml/expat/xmlparse 
-I/usr/home/andrew/src/php-4.0.4pl1/TSRM  -DDEV_RANDOM=/dev/arandom -DMOD_SSL=206106 
-DEAPI -DUSE_EXPAT -DXML_BYTE_ORDER=12 -g -O2   -o libphp4.la -rpath 
/usr/home/andrew/src/php-4.0.4pl1/libs -avoid-version   stub.lo  Zend/libZend.la 
sapi/apache/libsapi.la main/libmain.la regex/libregex.la ext/mysql/libmysql.la 
ext/pcre/libpcre.la ext/posix/libposix.la ext/session/libsession.la 
ext/standard/libstandard.la ext/xml/libxml.la TSRM/libtsrm.la -lresolv -lm -lresolv
ld: No reference to __DYNAMIC
collect2: ld returned 1 exit status
gmake[1]: *** [libphp4.la] Error 1
gmake[1]: Leaving directory `/usr/home/andrew/src/php-4.0.4pl1'
gmake: *** [all-recursive] Error 1

--
This happens with 'gmake' and 'make' (bsd make).

This error did not occur with 4.0.2.


-- 
Edit Bug report at: http://bugs.php.net/?id=9199edit=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] PHP 4.0 Bug #9198 Updated: ocassional session blackouts

2001-02-09 Thread cnewbill

ID: 9198
Updated by: cnewbill
Reported By: [EMAIL PROTECTED]
Status: Open
Bug Type: *Session related
Assigned To: 
Comments:

Can you include the [Session] section from your php.ini file?

Previous Comments:
---

[2001-02-09 18:02:13] [EMAIL PROTECTED]
My application used to run PHPLIB for the sake of session variables. After migrating 
to PHP4, I made it use the PHP4 integreted session support (using cookies) and it 
seems to be working fine for most of the time.
Nevertheless, it will ocassionally loose the infromation contained within the session 
and get all active users disconnected and unable to log in again for a while.
I cannot say when it is going to happen again (it is unpredictable) but the fact is 
that it happens...

Thanks in advance,
Jakub Jermar



---



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=9198edit=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 4.0 Bug #9199 Updated: 'ld: No reference to __DYNAMIC' error

2001-02-09 Thread andrew

ID: 9199
User Update by: [EMAIL PROTECTED]
Status: Open
Bug Type: Compile Failure
Description: 'ld: No reference to __DYNAMIC' error

This also occurs with only './configure --with-apxs'.

Previous Comments:
---

[2001-02-09 18:04:27] [EMAIL PROTECTED]
I configured with './configure --with-apxs --with-mysql' successfully.
I type 'gmake', and most of it builds.
Then I get:

Making all in .
gmake[1]: Entering directory `/usr/home/andrew/src/php-4.0.4pl1'

/bin/sh /usr/home/andrew/src/php-4.0.4pl1/libtool --silent --mode=compile gcc  -I. 
-I/usr/home/andrew/src/php-4.0.4pl1/ -I/usr/home/andrew/src/php-4.0.4pl1/main 
-I/usr/home/andrew/src/php-4.0.4pl1 -I/usr/lib/apache/include 
-I/usr/home/andrew/src/php-4.0.4pl1/Zend 
-I/usr/home/andrew/src/php-4.0.4pl1/ext/mysql/libmysql 
-I/usr/home/andrew/src/php-4.0.4pl1/ext/xml/expat/xmltok 
-I/usr/home/andrew/src/php-4.0.4pl1/ext/xml/expat/xmlparse 
-I/usr/home/andrew/src/php-4.0.4pl1/TSRM  -DDEV_RANDOM=/dev/arandom -DMOD_SSL=206106 
-DEAPI -DUSE_EXPAT -DXML_BYTE_ORDER=12 -g -O2  -c stub.c
/bin/sh /usr/home/andrew/src/php-4.0.4pl1/libtool --silent --mode=link gcc  -I. 
-I/usr/home/andrew/src/php-4.0.4pl1/ -I/usr/home/andrew/src/php-4.0.4pl1/main 
-I/usr/home/andrew/src/php-4.0.4pl1 -I/usr/lib/apache/include 
-I/usr/home/andrew/src/php-4.0.4pl1/Zend 
-I/usr/home/andrew/src/php-4.0.4pl1/ext/mysql/libmysql 
-I/usr/home/andrew/src/php-4.0.4pl1/ext/xml/expat/xmltok 
-I/usr/home/andrew/src/php-4.0.4pl1/ext/xml/expat/xmlparse 
-I/usr/home/andrew/src/php-4.0.4pl1/TSRM  -DDEV_RANDOM=/dev/arandom -DMOD_SSL=206106 
-DEAPI -DUSE_EXPAT -DXML_BYTE_ORDER=12 -g -O2   -o libphp4.la -rpath 
/usr/home/andrew/src/php-4.0.4pl1/libs -avoid-version   stub.lo  Zend/libZend.la 
sapi/apache/libsapi.la main/libmain.la regex/libregex.la ext/mysql/libmysql.la 
ext/pcre/libpcre.la ext/posix/libposix.la ext/session/libsession.la 
ext/standard/libstandard.la ext/xml/libxml.la TSRM/libtsrm.la -lresolv -lm -lresolv
ld: No reference to __DYNAMIC
collect2: ld returned 1 exit status
gmake[1]: *** [libphp4.la] Error 1
gmake[1]: Leaving directory `/usr/home/andrew/src/php-4.0.4pl1'
gmake: *** [all-recursive] Error 1

--
This happens with 'gmake' and 'make' (bsd make).

This error did not occur with 4.0.2.

---


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


-- 
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] ReportLab

2001-02-09 Thread clayton collie

Has anyone had a change to check out ReportLab ( http://www.reportlab.com )
? what i wouldn't do to have this puppy ported to a PHP extension 

--
_
"Fried Ice-Cream is a reality !" - George Clinton



-- 
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 4.0 Bug #9197: crash in _efree

2001-02-09 Thread Zeev Suraski

Is there a short script (independent of other scripts) that reproduces this 
problem?  Can you try to cut it down to the smallest piece of code that 
still produces a crash?

Zeev

At 23:45 9/2/2001, [EMAIL PROTECTED] wrote:
From: [EMAIL PROTECTED]
Operating system: Linux
PHP version:  4.0.4pl1
PHP Bug Type: Reproduceable crash
Bug description:  crash in _efree

Getting periodic crashes in some of my templates. Crash is reproduceable 
using cgi or apache builds. Crash also occurs under solaris 2.7. Backtrace 
is from Linux RedHat 7.0

211 CALCULATE_REAL_SIZE_AND_CACHE_INDEX(p-size);
(gdb) bt
#0  0x80aaa14 in _efree (ptr=0x735740) at zend_alloc.c:211
#1  0x80b53bf in _zval_dtor (zvalue=0x81a44fc) at zend_variables.c:62
#2  0x80af555 in _zval_ptr_dtor (zval_ptr=0x81dd818) at zend_execute_API.c:261
#3  0x80b9198 in zend_hash_clean (ht=0x8153124) at zend_hash.c:590
#4  0x80d30b0 in execute (op_array=0x814e504) at ./zend_execute.c:1575
#5  0x80b637d in zend_execute_scripts (type=8, file_count=3) at zend.c:729
#6  0x805d733 in php_execute_script (primary_file=0xb6e0) at main.c:1221
#7  0x805bee8 in main (argc=3, argv=0xb784) at cgi_main.c:738
#8  0x40698b65 in __libc_start_main (main=0x805b77c main, argc=3,
 ubp_av=0xb784, init=0x805a0ec _init, fini=0x80d86cc _fini,
 rtld_fini=0x4000df24 _dl_fini, stack_end=0xb77c)
 at ../sysdeps/generic/libc-start.c:111


./configure --prefix=/var/mancala \
 #--with-apache=/src/linux/build/apache_1.3.17 \
 --with-oci8 \
 --without-mysql \
 --with-zlib=/usr/lib \
 --with-dom=/src/linux/build/libxml2-2.2.11 \
 --enable-sysvsem \
 --enable-sysvshm \
 --disable-xml

[PHP]

;;;
; About this file ;
;;;
; This file controls many aspects of PHP's behavior.  In order for PHP to
; read it, it must be named 'php.ini'.  PHP looks for it in the current
; working directory, in the path designated by the environment variable
; PHPRC, and in the path that was defined in compile time (in that order).
; Under Windows, the compile-time path is the Windows directory.  The
; path in which the php.ini file is looked for can be overriden using
; the -c argument in command line mode.
;
; The syntax of the file is extremely simple.  Whitespace and Lines
; beginning with a semicolon are silently ignored (as you probably guessed).
; Section headers (e.g. [Foo]) are also silently ignored, even though
; they might mean something in the future.
;
; Directives are specified using the following syntax:
; directive = value
; Directive names are *case sensitive* - foo=bar is different from FOO=bar.
;
; The value can be a string, a number, a PHP constant (e.g. E_ALL or 
M_PI), one
; of the INI constants (On, Off, True, False, Yes, No and None) or an 
expression
; (e.g. E_ALL  ~E_NOTICE), or a quoted string ("foo").
;
; Expressions in the INI file are limited to bitwise operators and 
parentheses:
; | bitwise OR
;  bitwise AND
; ~ bitwise NOT
; ! boolean NOT
;
; Boolean flags can be turned on using the values 1, On, True or Yes.
; They can be turned off using the values 0, Off, False or No.
;
; An empty string can be denoted by simply not writing anything after the 
equal
; sign, or by using the None keyword:
;
;   foo =   ; sets foo to an empty string
;   foo = none  ; sets foo to an empty string
;   foo = "none"; sets foo to the string 'none'
;
; If you use constants in your value, and these constants belong to a 
dynamically
; loaded extension (either a PHP extension or a Zend extension), you may only
; use these constants *after* the line that loads the extension.
;
; All the values in the php.ini-dist file correspond to the builtin
; defaults (that is, if no php.ini is used, or if you delete these lines,
; the builtin defaults will be identical).



; Language Options ;


engine  =   On  ; Enable the PHP scripting 
language engine under Apache
short_open_tag  =   On  ; allow the ? tag.  otherwise, only ?php 
and script tags are recognized.
asp_tags=   On  ; allow ASP-style % % tags
precision   =   14  ; number of significant digits 
displayed in floating point numbers
y2k_compliance  =   Off ; whether to be year 2000 compliant (will 
cause problems with non y2k compliant browsers)
output_buffering= Off   ; Output buffering allows you to send 
header lines (including cookies)
 ; even after you 
 send body content, in the price of slowing PHP's
 ; output layer a bit.
 ; You can 

[PHP-DEV] PHP 4.0 Bug #9200: strtolower handle arrays in addition to strings

2001-02-09 Thread ben

From: [EMAIL PROTECTED]
Operating system: linux
PHP version:  4.0.4pl1
PHP Bug Type: Feature/Change Request
Bug description:  strtolower handle arrays in addition to strings

It would be nice to have strtolower() accept arrays as arguments (or just make a 
function such as ArrayToLower()).  For example:

$OUT["SomECapital"]="Whatever This Doesn't Matter";
echo $OUT["SomECapital"]; /* Works as expected */
$newOUT=strtolower($OUT);
/*

Currently the above line puts "Array" into $newOUT (like expected) , instead make this 
convert indexes with uppercase letters into lower case, so the line below would work 
and output the string "Whatever This Doesn't Matter"

*/
echo $newOUT["somecapital"];




-- 
Edit Bug report at: http://bugs.php.net/?id=9200edit=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] THTTPD

2001-02-09 Thread [EMAIL PROTECTED]

Hey, instead of putting patches in PHP for THTTPD, is there anything
against putting it into future builds?

Just curious...

-Szii


-- 
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] Database connection pooling

2001-02-09 Thread Mathijs Brands

Hi all,

This is my first post to this list, so please bear with me ;)

Anyway, I've been running/developing a PHP application (fairly simple
content management system) for some time now and it has been running
pretty well. I'm using Apache 1.3.14, PHP 3.0.16 and PostgreSQL 6.5.3.

The problem is that the increasing number of requests the application
needs to service requires me to increase the number of Apache processes,
which sometimes causes database problems. Originally I had about 10-20
running processes, but now I sometimes reach 75-100 or more. Since I'm
using persistant db connections, this means I can have 100 (or more)
open db connections; this is not something PostgreSQL really likes. 

If I use normal db connections, everything works ok, but the performance
is no longer acceptable. I suspect that I only need 2-3 db connections
for every 10 running processes.

On another server we're running several PHP/PostgreSQL and PHP/MySQL
based website, also using Apache 1.3. In this case I'm having similar
problems. In order to handle the amount of traffic this webserver needs
about 80-150 processes (I've seen up to 230 running httpd's). Some scripts
get quite a lot faster if I use persistant connections, but if I do, I
can be pretty sure that both MySQL (hangs after a while) and PostgreSQL
(dreadful performance, sometimes crashes) get into trouble. I currently
have 2 MySQL and 3 PostgreSQL databases, so if I have 150 running processes,
I could have 300 open MySQL and 450 open PostgreSQL connections. It's like
tinkering with explosives, since this is sure to cause a lot of trouble.

What I'd like is a way to have a small pool of database connections with
a fixed (configurable) size. When you request a persistant connection in
a PHP script, you would either get a connection from the pool or a new,
normal connection (if there are no more free connections in the pool).
Upon closing the connection moves back to the pool or is closed in case
of a normal connection.

I've done some searching in the mailinglist archives and on the net and I
haven't found a usable answer yet, so I'll probably look into implementing
something myself (using PHP 4.0.x and PostgreSQL 7.0/MySQL 3.23). I haven't
really looked at how complex this would be, but I am aware of the fact that
something like this is much easier to implement for a threaded webserver.

Any comments or suggestions would be really welcome,

Btw. Something I'll probably do until I come up with a solution is moving
all scripts requiring db access to another webserver (running on the same
machine) with a much lower number of Apache processes. It solves the
database problem, but introduces a whole range of new problems.

TIA,

Mathijs
-- 
ilse Technology B.V. - Postbus 542 5600 AM Eindhoven
Telefoon: 040 750 31 00 - Fax: 040 750 31 99
Web: http://www.ilse.nl/ - E-mail: [EMAIL PROTECTED]

-- 
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 4.0 Bug #9201: automatically inserted HTML with --trans-sid breaks page compliance to w3c std

2001-02-09 Thread lintec

From: [EMAIL PROTECTED]
Operating system: Linux 2.4
PHP version:  4.0.4pl1
PHP Bug Type: Feature/Change Request
Bug description:  automatically inserted HTML with --trans-sid breaks page compliance 
to w3c std

I'm trying to use the latest w3c recommendation (xhtml 1.0)
in building a new site, but the hidden form elements
inserted by --trans-sid break compliance.

Obviously not high priority, but perhaps a .ini option like
session.htmlver could be used to determine what sort of text
trans-sid spits out.

For a sample, hit http://clarkhall.ca/

An XHTML 1.0 compliant version of the item in question would be:
INPUT type="hidden" name="RegistryID
value="dfc59efe2f4f3fe82ca321c40a635f0b" /



-- 
Edit Bug report at: http://bugs.php.net/?id=9201edit=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] PHP 4.0 Bug #9202: Parse error when using terniary (?:) and unset()

2001-02-09 Thread mlr

From: [EMAIL PROTECTED]
Operating system: Linux 2.2.14-5.0smp
PHP version:  4.0.3pl1
PHP Bug Type: Scripting Engine problem
Bug description:  Parse error when using terniary (?:) and unset()

?
$avariable = "test";
$avariable=="test" ? $avariable .=" No problem with is_bool" : is_bool($avariable);
$avariable=="test" ? $avariable .=" No problem with isset" : isset($avariable);
$avariable=="test" ? $avariable .=" No problem with empty" : empty($avariable);
$avariable=="test" ? $avariable .=" Problem with unset" : unset($avariable);
echo $avariable;
?

Output is
Parse error: parse error in /home/httpd/html/mlr/unsetProblem.php on line 6


-- 
Edit Bug report at: http://bugs.php.net/?id=9202edit=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] FINANCIAL FREEDOM

2001-02-09 Thread [EMAIL PROTECTED]
Title: FOLLOW ME TO FINANCIAL FREEDOM






FOLLOW ME TO FINANCIAL FREEDOM!!



NO SPECIAL SKILLS OR EXPERIENCE 
REQUIRED






100% LIFE TIME SUPPORT AND TRAINING





LEGITIMATE HOME-BASED INCOME OPPORTUNITY


CALL 
1-800-587-9046
ext. 9160 
TO LISTEN TO A 1 MINUTE 
MESSAGE!

THIS IS DIFFERENT THEN ANYTHING ELSE YOU'VE 
SEEN!


NOT A GET RICH QUICK 
SCHEME!


NOT A MLM !! 




DONT GO TO SLEEP WITHOUT LISTENING TO 
THIS!




1-800-587-9046
ext. 9160


ALL
our dreams can come true- if we have the courage to pursue 
them -Walt 
Disney








DO NOT RESPOND BY 
EMAIL





This
message is sent in compliance with the new email bill section


301.PerSection
301, Paragraph (a)(2)(C) of S. 1618. We will comply with all 
removal


requests.
Just Put Remove in the subject line, without the 
quotations


using
the address below.


REMOVEME@netex
ecutive.com





Thank
You







-- 
PHP Development Mailing List 
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 4.0 Bug #9202: Parse error when using terniary (?:) and unset()

2001-02-09 Thread Zeev Suraski

unset() is not a function, but a statement.  It returns no value, and thus, 
you can't use it as an expression for the ? operator.

Zeev

At 03:29 10/2/2001, [EMAIL PROTECTED] wrote:
From: [EMAIL PROTECTED]
Operating system: Linux 2.2.14-5.0smp
PHP version:  4.0.3pl1
PHP Bug Type: Scripting Engine problem
Bug description:  Parse error when using terniary (?:) and unset()

?
$avariable = "test";
$avariable=="test" ? $avariable .=" No problem with is_bool" : 
is_bool($avariable);
$avariable=="test" ? $avariable .=" No problem with isset" : 
isset($avariable);
$avariable=="test" ? $avariable .=" No problem with empty" : 
empty($avariable);
$avariable=="test" ? $avariable .=" Problem with unset" : unset($avariable);
echo $avariable;
?

Output is
Parse error: parse error in /home/httpd/html/mlr/unsetProblem.php on line 6


--
Edit Bug report at: http://bugs.php.net/?id=9202edit=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]

--
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]




Re: [PHP-DEV] Database connection pooling

2001-02-09 Thread John Donagher


Mathijs-

It would seem that a better model is to simply state that there are resources
that would like to be persisted outside of PHP threads of execution, possibly
outside of a webserver's process space, perhaps even outside of a physical
machine or network. Many people will agree with you.

What you're looking for would fall under the scope of an application server.
You can find past discussions on this about that, from people who know far
more about it than I do :)

John

On Sat, 10 Feb 2001, Mathijs Brands wrote:

 Hi all,
 
 This is my first post to this list, so please bear with me ;)
 
 Anyway, I've been running/developing a PHP application (fairly simple
 content management system) for some time now and it has been running
 pretty well. I'm using Apache 1.3.14, PHP 3.0.16 and PostgreSQL 6.5.3.
 
 The problem is that the increasing number of requests the application
 needs to service requires me to increase the number of Apache processes,
 which sometimes causes database problems. Originally I had about 10-20
 running processes, but now I sometimes reach 75-100 or more. Since I'm
 using persistant db connections, this means I can have 100 (or more)
 open db connections; this is not something PostgreSQL really likes. 
 
 If I use normal db connections, everything works ok, but the performance
 is no longer acceptable. I suspect that I only need 2-3 db connections
 for every 10 running processes.
 
 On another server we're running several PHP/PostgreSQL and PHP/MySQL
 based website, also using Apache 1.3. In this case I'm having similar
 problems. In order to handle the amount of traffic this webserver needs
 about 80-150 processes (I've seen up to 230 running httpd's). Some scripts
 get quite a lot faster if I use persistant connections, but if I do, I
 can be pretty sure that both MySQL (hangs after a while) and PostgreSQL
 (dreadful performance, sometimes crashes) get into trouble. I currently
 have 2 MySQL and 3 PostgreSQL databases, so if I have 150 running processes,
 I could have 300 open MySQL and 450 open PostgreSQL connections. It's like
 tinkering with explosives, since this is sure to cause a lot of trouble.
 
 What I'd like is a way to have a small pool of database connections with
 a fixed (configurable) size. When you request a persistant connection in
 a PHP script, you would either get a connection from the pool or a new,
 normal connection (if there are no more free connections in the pool).
 Upon closing the connection moves back to the pool or is closed in case
 of a normal connection.
 
 I've done some searching in the mailinglist archives and on the net and I
 haven't found a usable answer yet, so I'll probably look into implementing
 something myself (using PHP 4.0.x and PostgreSQL 7.0/MySQL 3.23). I haven't
 really looked at how complex this would be, but I am aware of the fact that
 something like this is much easier to implement for a threaded webserver.
 
 Any comments or suggestions would be really welcome,
 
 Btw. Something I'll probably do until I come up with a solution is moving
 all scripts requiring db access to another webserver (running on the same
 machine) with a much lower number of Apache processes. It solves the
 database problem, but introduces a whole range of new problems.
 
 TIA,
 
 Mathijs
 

-- 

John Donagher
Application Engineer
Intacct Corp. - Powerful Accounting on the Web
408-395-0989
720 University Ave.
Los Gatos CA 95032
www.intacct.com

Public key available off http://www.keyserver.net
Key fingerprint = 4024 DF50 56EE 19A3 258A  D628 22DE AD56 EEBE 8DDD


-- 
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 4.0 Bug #9202 Updated: Parse error when using terniary (?:) and unset()

2001-02-09 Thread mlr

ID: 9202
User Update by: [EMAIL PROTECTED]
Status: Open
Old-Bug Type: Scripting Engine problem
Bug Type: Documentation problem
Description: Parse error when using terniary (?:) and unset()

The documentation for Unset() states:
Description
int unset (mixed var [, mixed var [, ...]])
unset() destroys the specified variables and returns true. 

I have changed the type of this bug report to "Documentation Problem", since I have 
been informed that Unset is not a function. 

?
$avariable = "test";
$avariable=="test" ? $avariable .=" No problem with is_bool" :
is_bool($avariable);
$avariable=="test" ? $avariable .=" No problem with isset" :
isset($avariable);
$avariable=="test" ? $avariable .=" No problem with empty" :
empty($avariable);
$avariable=="test" ? $avariable .=" Problem with unset" :
unset($avariable);
echo $avariable;
?

Output is
Parse error: parse error in /home/httpd/html/mlr/unsetProblem.php on line 6

Previous Comments:
---

[2001-02-09 20:29:34] [EMAIL PROTECTED]
?
$avariable = "test";
$avariable=="test" ? $avariable .=" No problem with is_bool" : is_bool($avariable);
$avariable=="test" ? $avariable .=" No problem with isset" : isset($avariable);
$avariable=="test" ? $avariable .=" No problem with empty" : empty($avariable);
$avariable=="test" ? $avariable .=" Problem with unset" : unset($avariable);
echo $avariable;
?

Output is
Parse error: parse error in /home/httpd/html/mlr/unsetProblem.php on line 6

---


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


-- 
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 4.0 Bug #9186 Updated: string compare with == does not work correctly

2001-02-09 Thread Alan van den Bosch


OK, I was way off base in my reasoning... :-)

Thanks for the clarification Zeev and Zak.

Alan.

 How is this? I modified what Zeev said a wee bit:

 == is a 'loose' comparison operator [1].

 In most cases, this is more convenient - the operator does the right thing
 without needing any coaxing.  In some cases, things will happen that are
 confusing - particularly when comparing values that have leading zeros (0)
 or when comparing very long numbers that are inside a string.

 The basic rule to follow is this:

 Character-by-character comparison is performed only if both arguments are
 strings and at least one of the strings does not look like a number [2].

 Another way to state this rule is:

 - If at least one of the arguments is not a string, a numeric comparison
is
 made.

 - If both arguments are strings, but both of them look like numbers, a
 numeric comparison is made.

 - If both arguments are strings (and at least one of them doesn't look
like
 a number), a string comparison is made.

 [1] If you need to perform an exact comparison between two values, take a
 look at the 'strict' comparison operator (===) and the strcmp() function.

 [2] See the manual section on types and strings to learn what rules PHP
 follows for recognising numbers within strings.

 (Thanks to Zeev for clarifying this issue.)

 --zak



-- 
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 4.0 Bug #9203: flock doesn't work properly on Windows 2000

2001-02-09 Thread davidspe

From: [EMAIL PROTECTED]
Operating system: NT
PHP version:  4.0.4pl1
PHP Bug Type: Scripting Engine problem
Bug description:  flock doesn't work properly on Windows 2000

#Dummy initial filehandle to obtain lock via 
$fd = fopen('c:/temp/php_flock_test', 'a'); 

$locked = flock($fd,2); #Exclusive blocking lock 
if (!$locked) { 
print "Error: timeout obtaining lock"; exit; 
} 

#Second (actually used) filehandle 
$fdsafe = fopen('c:/temp/php_flock_test', 'w'); 
fwrite($fdsafe,'Replacement text'); 
fclose($fdsafe); 

fclose($fd); 

//= 

// This will simply create the file but not put "Replacement text" in the file.



-- 
Edit Bug report at: http://bugs.php.net/?id=9203edit=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] PHP 4.0 Bug #9187 Updated: unable to use socket

2001-02-09 Thread chrisv

ID: 9187
Updated by: chrisv
Reported By: [EMAIL PROTECTED]
Status: Open
Old-Bug Type: Sockets related
Bug Type: Feature/Change Request
Assigned To: 
Comments:

The sockets extension is not currently supported on Win32 (9x/ME/NT/2k). Changing to 
feature request.

(Something to add to my to-do list: learn winsock.)


Previous Comments:
---

[2001-02-09 03:38:38] [EMAIL PROTECTED]
when trying to create a Socket i get a undefined function error

i think it has something to do with --enable-sockets 
and not being able to do the configure in windows

i used the windows binary precompiled version of php 4.04



---



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=9187edit=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]