Re: [PHP-DEV] PHP 4.0 Bug #9253: Class constructors can't return values

2001-02-15 Thread Alan van den Bosch

If Nathan's suggestion is not just an unreliable side effect, maybe this
should be documented. (ie changed from Feature/Change request)

regards,

Alan.

- Original Message -
From: "Nathan Cassano" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Thursday, February 15, 2001 11:11 AM
Subject: RE: [PHP-DEV] PHP 4.0 Bug #9253: Class constructors can't return
values


> You can return a value from a class constructor. It's just not that
obvious.
>
> class myclass {
>
> function myclass() {
>
> if($err){
> $this = $err;
> return;
> }
> }
>
> }
>
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, February 14, 2001 2:23 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP-DEV] PHP 4.0 Bug #9253: Class constructors can't return
> values
>
>
> From: [EMAIL PROTECTED]
> Operating system: All
> PHP version:  4.0.4pl1
> PHP Bug Type: Feature/Change Request
> Bug description:  Class constructors can't return values
>
> Class constructors can't abort instance creation, for example by returning
> false...
> This leads to a lot of "if (! $newobj->status)" crap.
> Why is that ? I found a message on the PHP3 mailing list about this, but
> it's still not there.
>
>
> --
> Edit Bug report at: http://bugs.php.net/?id=9253&edit=1
>
>
>
>
> --
> 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]
>
>


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




[PHP-DEV] [patch]: satellite interface inheritance fix

2001-02-15 Thread Daniel Stodden

? class.slo
? common.slo
? corba.slo
? enum.slo
? findtype.slo
? hashtable.slo
? namedvalue_to_zval.slo
? object.slo
? php_orbit.slo
? struct.slo
? typecode.slo
? typemanager.slo
? zval_to_namedvalue.slo
? inherit.patch
Index: typemanager.c
===
RCS file: /repository/php4/ext/satellite/typemanager.c,v
retrieving revision 1.2
diff -u -r1.2 typemanager.c
--- typemanager.c	2000/09/01 22:29:00	1.2
+++ typemanager.c	2001/02/16 06:30:16
@@ -219,19 +219,63 @@
 	return pException;
 }
 
-/* find an operation in an interface based on case-insensitive name */
-OperationType * InterfaceType_FindOperation(InterfaceType * pInterface, 
-		const char * name)
+
+	
+/* 
+   find an operation in an interface tree, 
+   recursing into inherited interfaces  
+*/
+static CORBA_boolean
+findoperation_recurse( IDL_tree tree, const char *name,
+		   IdlInfo *pIdlInfo )
 {
-	OperationType * pOperation = orbit_new(OperationType);
-	CORBA_boolean success = orbit_find_type(
-			pInterface->mIdlInfo.mType, name, IDLN_OP_DCL, &pOperation->mIdlInfo);
-	if (!success)
-	{
-		orbit_delete(pOperation);
-		pOperation = NULL;
+	IDL_tree inherited;
+	CORBA_boolean success;
+
+	success = orbit_find_type( IDL_INTERFACE(tree).body,
+   name, IDLN_OP_DCL, 
+   pIdlInfo );
+	if ( success ) 
+		return CORBA_TRUE;
+
+	for ( inherited = IDL_INTERFACE(tree).inheritance_spec;
+	  inherited != NULL;
+	  inherited = IDL_LIST(inherited).next ) {
+		IDL_tree ident = IDL_LIST(inherited).data;
+		InterfaceType *iface;
+
+		iface = TypeManager_FindInterface( IDL_IDENT(ident).repo_id );
+		success = findoperation_recurse( iface->mIdlInfo.mType, 
+		 name, 
+		 pIdlInfo );
+		orbit_delete( iface );
+
+		if ( success )
+			return CORBA_TRUE;
+
+		zend_error( E_WARNING, "operation %s not found in iface %s\n", 
+			name, IDL_IDENT(ident).repo_id );
 	}
-	return pOperation;
+
+	return CORBA_FALSE;
+}
+
+/* find an operation in an interface based on case-insensitive name */
+OperationType * InterfaceType_FindOperation( InterfaceType * pInterface, 
+	 const char * name )
+{
+	OperationType *pOperation = orbit_new(OperationType);
+	IDL_tree tree = pInterface->mIdlInfo.mType;
+	CORBA_boolean success;
+
+	success = findoperation_recurse( tree, name, 
+	 &pOperation->mIdlInfo );
+	
+	if ( success )
+		return pOperation;
+
+	orbit_delete(pOperation);
+	return NULL;
 }
 
 /* find an attribute in an interface based on case-insensitive name */



-- 
___
 mailto:[EMAIL PROTECTED]



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


[PHP-DEV] CVS Account Request

2001-02-15 Thread CVS Account Request

Full name: Love Kumar
Email: [EMAIL PROTECTED]
ID: lovesehdev
Purpose: I have done lot of work in php, I want to use my php skills to enhance the 
features and capabelities of Php.

-- 
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] IMAP and the mail_parameters

2001-02-15 Thread Chuck Hagenbuch

Quoting Dan Kalowsky <[EMAIL PROTECTED]>:

>   The implementation of a universal function could potentially be
> extremely useful for controlling imap services.  But some advise on this
> would be welcome... or if there currently is such an ability that would
> be great to hear!  So.. any preference?

The other problem with universal is that what you get back from mail_parameters 
depends on what you're doing with it. For instance, if I remember correctly, 
calling mail_parameters to ask for NAMESPACE gives you back a funky data 
structure that c-client uses to define namespaces, while most things give you 
just an int return value.

So maybe we should have specialized functions, though universal would be great 
if we could manage it. The NAMESPACE example isn't incidental; we really should 
have access to that from php-space. I just haven't gotten around to 
implementing it yet. So if you want a hand with any of this, feel free to let 
me know.

-chuck

--
Charles Hagenbuch, <[EMAIL PROTECTED]>
"We have no fuel on board, plus or minus 8 kilograms." -A NASA scientist

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




[PHP-DEV] PHP 4.0 Bug #9293: Character 0x1A seems to be unbreakabe barrier for all functions reading files.

2001-02-15 Thread P . Stec

From: [EMAIL PROTECTED]
Operating system: Windows 2000 Proffesional
PHP version:  4.0.3pl1
PHP Bug Type: Filesystem function related
Bug description:  Character 0x1A seems to be unbreakabe barrier for all functions 
reading files.

Function readfile("filename") stops reading on character 0x1A. Exactly the same hapens 
with function fread ($f, $size); regardless of $size value. The filesystem is FAT32.

Regards,
Piotr

p.s.
My php.ini file:

[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  tags are recognized.
asp_tags=   Off ; 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 enable output 
buffering by in runtime by calling the output
; buffering functions, or 
enable output buffering for all files
; by setting this directive to 
On.
implicit_flush  = Off   ; Implicit flush tells PHP to tell the output layer to 
flush itself
; automatically after every 
output block.  This is equivalent to
; calling the PHP function 
flush() after each and every call to print()
; or echo() and each and every 
HTML block.
; Turning this option on has 
serious performance implications, and
; is generally recommended for 
debugging purposes only.
allow_call_time_pass_reference  = On; whether to enable the ability to force 
arguments to be 
; 
passed by reference at function-call time.  This method
; is 
deprecated, and is likely to be unsupported in future

[PHP-DEV] PHP 4.0 Bug #9185 Updated: postgresql backend process become stale after php page loads

2001-02-15 Thread tom

ID: 9185
User Update by: [EMAIL PROTECTED]
Status: Open
Bug Type: PostgreSQL related
Description: postgresql backend process become stale after php page loads

note that 'apachectl graceful' will get rid of the stale processes.

Previous Comments:
---

[2001-02-09 02:26:51] [EMAIL PROTECTED]
with persistent connection on, i notice that with a web page load, it starts a new 
postgresql backend and detaches from it. therefore, the postgresql backend becomes 
stale and just hangs there for hours and days.

upon reloading the page, a new pgsql backend starts. within a minute, all the pgsql 
connection is maxed out, because all the processes become stale and were never 
released. this is from just me pressing reload 15 or so times. no one else have access 
to this server.

if i do 'apachectl stop' then 'apachectl start' again, the stale pgsql processes do 
get freed up. i didn't compile pgql with php as a loadable module. though it's using 
pgsql's dynamic library:

./configure 
--with-apxs 
--with-sablot=/usr/local/install/Sablot-0.44 
--with-mnogosearch=/usr/local 
--with-pgsql=/usr/local 
--with-mysql=/usr/local 
--enable-libgcc 
--with-gnu-ld 
--with-zlib 
--with-system-regex 
--with-config-file-path=/usr/local/etc 
--enable-track-vars 
--enable-force-cgi-redirect 
--enable-discard-path 
--enable-memory-limit 
--enable-sysvsem 
--enable-sysvshm 
--enable-sockets 
--with-gd=/usr/pkg 
--with-ttf=/usr/pkg 
--enable-freetype-4bit-antialias-hack

# ldd /usr/pkg/lib/httpd/libphp4.so
/usr/pkg/lib/httpd/libphp4.so:
 -lz.0 => /usr/lib/libz.so.0
 -lxmltok => /usr/local/install/Sablot-0.44/lib/libxmltok.so
 -lxmlparse => /usr/local/install/Sablot-0.44/lib/libxmlparse.so
 -lsablot => /usr/local/install/Sablot-0.44/lib/libsablot.so
 -lcrypt.0 => /usr/lib/libcrypt.so.0
 -lpq.2 => /usr/local/lib/libpq.so.2
 -lmysqlclient => /usr/local/lib/mysql/libmysqlclient.so
 -ludmsearch => /usr/local/lib/libudmsearch.so
 -lm.0 => /usr/lib/libm.so.0
 -lc.12 => /usr/lib/libc.so.12
 -lintl.1 => /usr/pkg/lib/libintl.so.1
 -lttf.4 => /usr/pkg/lib/libttf.so.4
 -lpng.1 => /usr/pkg/lib/libpng.so.1
 -ljpeg.62 => /usr/pkg/lib/libjpeg.so.62
 -lXpm.4 => /usr/X11R6/lib/libXpm.so.4
 -lX11.6 => /usr/X11R6/lib/libX11.so.6
 -lgd.1 => /usr/pkg/lib/libgd.so.1
 -lresolv.1 => /usr/lib/libresolv.so.1

also note that the regular pgsql clients do release the backend postmaster right away 
after it quits.

there is a bug related to this one which showed similar symptoms: bug id# 8769

---


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


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




[PHP-DEV] CVS Account Request

2001-02-15 Thread CVS Account Request

Full name: Juhyon Kim
Email: [EMAIL PROTECTED]
ID: kjh90
Purpose: PHP Doc localization(kr) and comment

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




[PHP-DEV] PHP 4.0 Bug #9292 Updated: Odd behavior adding negative numbers.

2001-02-15 Thread jdj

ID: 9292
User Update by: [EMAIL PROTECTED]
Old-Status: Open
Status: Closed
Bug Type: Math related
Description: Odd behavior adding negative numbers.

Nevermind.. it's just the nature of the beast ;)

Previous Comments:
---

[2001-02-15 21:10:33] [EMAIL PROTECTED]
Ok guys.. I've looked everywhere and cannot find an explanation
for this behavior.  Could you guys explain it? :)

This script returns the same thing on 4.0.4p1 and 4.0.3p1.

/* Anything less than 3.2/-0.32 exhibits this behavior.  Anything above it doesn't */
$x = 0.1 * 3.2;
$y = -0.32;
print("$xt$ynn");

$a = $x - $y;
$b = $x + $y;

print("$at$bn");

I can increase the 3.2 and the -0.32 and the return is sane.. everything I've tried 
below 3.2 returns this oddity.
Output from above script..
0.32-0.32

0.645.5511151231258E-17

Any clues?

---


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


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




[PHP-DEV] PHP 4.0 Bug #9292: Odd behavior adding negative numbers.

2001-02-15 Thread jdj

From: [EMAIL PROTECTED]
Operating system: Linux, *BSD, no clue about win32
PHP version:  4.0.4pl1
PHP Bug Type: Math related
Bug description:  Odd behavior adding negative numbers.

Ok guys.. I've looked everywhere and cannot find an explanation
for this behavior.  Could you guys explain it? :)

This script returns the same thing on 4.0.4p1 and 4.0.3p1.

/* Anything less than 3.2/-0.32 exhibits this behavior.  Anything above it doesn't */
$x = 0.1 * 3.2;
$y = -0.32;
print("$x\t$y\n\n");

$a = $x - $y;
$b = $x + $y;

print("$a\t$b\n");

I can increase the 3.2 and the -0.32 and the return is sane.. everything I've tried 
below 3.2 returns this oddity.
Output from above script..
0.32-0.32

0.645.5511151231258E-17

Any clues?


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



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




[PHP-DEV] PHP 4.0 Bug #8905 Updated: libcore 4 library not found

2001-02-15 Thread sniper

ID: 8905
Updated by: sniper
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Closed
Bug Type: *Install and Config
Assigned To: 
Comments:

This should be fixed in CVS now. Please try the latest CVS snapshot from
http://snaps.php.net/ and reopen this bug report if it doesn't work as expected.

--Jani


Previous Comments:
---

[2001-01-25 08:59:24] [EMAIL PROTECTED]
I m trying to install apache + php4 + oci support for oracle 8.1.5 + ldap support + 
imap support on AIX4.3.3
I succeed configuring php4..but in config.log , i just have one error..and that make 
the apache configuration fails (when i try apache# ./configure 
--activate-module=src/modules/php4/libphp4.module )


I don't know where it comes from, if it s from imap support or sthg else..

Below the debug.log :

"debug.log" 16 lines, 1394 characters 
CONFIGURE:   './configure' '--without-mysql' '--with-apache=../apache_1.3.14' 
'--enable-track-vars' '--with-oci8=/home/oracle8/OraHo
me1' '--with-mod_charset' '--with-force-cgi-redirect' '--enable-session' '--enable-yp' 
'--enable-versionning' '--enable-trans-sid' '
--with-imap=../imap' '--with-ldap=../openldap-1.2.11' '--enable-sigchild'
CC: gcc
CFLAGS: -g -O2
CPPFLAGS:
CXX:
CXXFLAGS:
INCLUDES:-I/applis/compil/apache_1.3.14/src/include 
-I/applis/compil/apache_1.3.14/src/os/unix  -I$(top_builddir)/Zend -I/applis
/compil/imap/c-client -I/applis/compil/openldap-1.2.11/include 
-I/home/oracle8/OraHome1/rdbms/demo -I/home/oracle8/OraHome1/network/
public -I/home/oracle8/OraHome1/plsql/public
LDFLAGS: -L/applis/compil/imap/c-client -L/applis/compil/imap/c-client 
-L/home/oracle8/OraHome1/lib -L/home/oracle8/OraHome1/lib
LIBS:   -lclntsh -lpsa -lcore4 -lnlsrtl3 -lld -lbsd_r -lsvld -lm -lodm -lbind -lm 
-ldl -lcrypt
DLIBS:  -lc-client
SAPI:   apache
PHP_RPATHS:  /applis/compil/imap/c-client /home/oracle8/OraHome1/lib
uname -a:   AIX calypso 3 4 0041704A4C00

gcc -o conftest -g -O2   -L/applis/compil/imap/c-client -L/applis/compil/imap/c-client 
-L/home/oracle8/OraHome1/lib -L/home/oracle8/
OraHome1/lib conftest.c -lclntsh -lpsa -lcore4 -lnlsrtl3 -lld -lbsd_r -lsvld -lm -lodm 
-lbind -lm -ldl -lcrypt  1>&5
collect2: Library libcore4 not found
~
Tanks for your support
Tony

---



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


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




[PHP-DEV] PHP 4.0 Bug #9027 Updated: Reply to bug id #8905: libcore4 library not fond

2001-02-15 Thread sniper

ID: 9027
Updated by: sniper
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Closed
Bug Type: *Install and Config
Assigned To: 
Comments:

This should be fixed in CVS now. Please try the latest CVS snapshot from 
http://snaps.php.net/ and reopen this bug report if it doesn't work as expected.

--Jani


Previous Comments:
---

[2001-01-31 07:21:07] [EMAIL PROTECTED]
I have had the same problem as reported in bug id #8905.

To solve the problem modified line 26047 in configure-script as follows:
 
26047:  OCI8_VERSION=8.0  -->   OCI8_VERSION=8.1

Best regards

Max Zueger

---



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


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




[PHP-DEV] PHP 4.0 Bug #9147 Updated: bugs in post using multipart/form-data

2001-02-15 Thread sniper

ID: 9147
Updated by: sniper
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Feedback
Bug Type: Unknown/Other Function
Assigned To: 
Comments:

Please try the latest CVS snapshot from http://snaps.php.net/ as this 
works for me just fine. (you have to compile it yourself though)

--Jani


Previous Comments:
---

[2001-02-07 20:47:50] [EMAIL PROTECTED]
Hello!
I installed "php-4.0.4pl1-3.i386.rpm" which
can be obtained from "ftp://updates.redhat.com".

When one tries to send variables using multipart form,
one always get strings with additional CR LF
characters at the front.

Below I enclose two short files.
Please try them.

--- a.html --

Data:


--- b.php ---


--

When I submit the form (a.html) with
Data = 0, I get "0d0a3030303030".
Here I can see extra CR LF ("0d0a").

When I used older version ( 4.0.3),
I didn't experience such things.

Thank you.

Haewon Lee
Physics Dept.
Chunbuk Nat'l Univ., Korea



---

[2001-02-07 09:42:08] [EMAIL PROTECTED]
Hello!
I installed "php-4.0.4pl1-3.i386.rpm" which
can be obtained from "ftp://updates.redhat.com".

When one try to send variables using multipart form,
one always get strings with additional CR LF
characters at the front.

Below I enclose two short files.
Please try them.

--- a.html --

Data:


--- b.php ---


--

Where I submit the form (a.html) with
Data = 0, I get "0d0a3030303030".
Here I can see extra CR LF ("0d0a").

When I used older version ( 4.0.3),
I didn't experience such things.

Thank you.

Haewon Lee
Physics Dept.
Chunbuk Nat'l Univ., Korea


---



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


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




[PHP-DEV] PHP 4.0 Bug #9290 Updated: snmp+zlib does not work one without the other works

2001-02-15 Thread sniper

ID: 9290
Updated by: sniper
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Feedback
Bug Type: Compile Failure
Assigned To: 
Comments:

Use '--with-openssl' instead of --with-ssl..

--Jani


Previous Comments:
---

[2001-02-15 17:43:22] [EMAIL PROTECTED]
my configure arguments:

ernie# cat work/php-4.0.4pl1/config.nice
#! /bin/sh
#
# Created by configure

"./configure" 
"--with-apxs=/usr/local/sbin/apxs" 
"--with-ssl=/usr" 
"--enable-versioning" 
"--with-system-regex" 
"--with-config-file-path=/usr/local/etc" 
"--disable-debug" 
"--enable-track-vars" 
"--without-gd" 
"--disable-pear" 
"--with-zlib" 
"--with-mysql=/usr/local" 
"--with-snmp=/usr/local" 
"--enable-ucd-snmp-hack" 
"--prefix=/usr/local" 
"i386--freebsd4.2" 
"$@"
ernie#

the error:

configure:43839: checking for gzgets in -lz
configure:43858: cc -o conftest -O -pipe
-DHARD_SERVER_LIMIT=512
-DDOCUMENT_LOCATION="/usr/local/www/data/"
-DDEFAULT_PATH="/bin:/usr/bin:/usr/local/bin"
-DACCEPT_FILTER_NAME="httpready" -DUSE_EXPAT
-DXML_BYTE_ORDER=12 -L/usr/lib  -R/usr/local/lib/mysql
-L/usr/local/lib/mysql -R/usr/local/lib -L/usr/local/lib
conftest.c -lz  -lsnmp -lmysqlclient -lm -lcrypt  1>&5
/usr/local/lib/libsnmp.so: undefined reference to
`EVP_DigestInit'
/usr/local/lib/libsnmp.so: undefined reference to
`EVP_DigestFinal'
/usr/local/lib/libsnmp.so: undefined reference to `EVP_md5'
/usr/local/lib/libsnmp.so: undefined reference to `HMAC'
/usr/local/lib/libsnmp.so: undefined reference to `EVP_sha1'
/usr/local/lib/libsnmp.so: undefined reference to
`des_cbc_encrypt'
/usr/local/lib/libsnmp.so: undefined reference to
`des_key_sched'
/usr/local/lib/libsnmp.so: undefined reference to
`EVP_DigestUpdate'
/usr/local/lib/libsnmp.so: undefined reference to `RAND_bytes'
/usr/local/lib/libsnmp.so: undefined reference to
`des_ncbc_encrypt'



You can found the complete config.log under
http://www.pofo.de/config.log

I've located the OpenSSL includes under /usr/include/openssl

-- Olli


---



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


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




[PHP-DEV] PHP 4.0 Bug #9291: Simple misprint

2001-02-15 Thread regs

From: [EMAIL PROTECTED]
Operating system: Linux
PHP version:  4.0.4pl1
PHP Bug Type: Documentation problem
Bug description:  Simple misprint

On the mysql_result manual page, in the first paragraph "(fieldname.tablename)" should 
be "(tablename.fieldname)".  It might confuse someone.


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



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




[PHP-DEV] PHP 4.0 Bug #9291 Updated: Simple misprint

2001-02-15 Thread derick

ID: 9291
Updated by: derick
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Closed
Bug Type: Documentation problem
Assigned To: 
Comments:

Fixed in CVS

Previous Comments:
---

[2001-02-15 19:10:31] [EMAIL PROTECTED]
On the mysql_result manual page, in the first paragraph "(fieldname.tablename)" should 
be "(tablename.fieldname)".  It might confuse someone.

---



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


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




[PHP-DEV] PHP 4.0 Bug #9290: snmp+zlib does not work one without the other works

2001-02-15 Thread lehmann

From: [EMAIL PROTECTED]
Operating system: FreeBSD 4.2-STABLE
PHP version:  4.0.4pl1
PHP Bug Type: Compile Failure
Bug description:  snmp+zlib does not work one without the other works

my configure arguments:

ernie# cat work/php-4.0.4pl1/config.nice
#! /bin/sh
#
# Created by configure

"./configure" \
"--with-apxs=/usr/local/sbin/apxs" \
"--with-ssl=/usr" \
"--enable-versioning" \
"--with-system-regex" \
"--with-config-file-path=/usr/local/etc" \
"--disable-debug" \
"--enable-track-vars" \
"--without-gd" \
"--disable-pear" \
"--with-zlib" \
"--with-mysql=/usr/local" \
"--with-snmp=/usr/local" \
"--enable-ucd-snmp-hack" \
"--prefix=/usr/local" \
"i386--freebsd4.2" \
"$@"
ernie#

the error:

configure:43839: checking for gzgets in -lz
configure:43858: cc -o conftest -O -pipe
-DHARD_SERVER_LIMIT=512
-DDOCUMENT_LOCATION="/usr/local/www/data/"
-DDEFAULT_PATH="/bin:/usr/bin:/usr/local/bin"
-DACCEPT_FILTER_NAME="httpready" -DUSE_EXPAT
-DXML_BYTE_ORDER=12 -L/usr/lib  -R/usr/local/lib/mysql
-L/usr/local/lib/mysql -R/usr/local/lib -L/usr/local/lib
conftest.c -lz  -lsnmp -lmysqlclient -lm -lcrypt  1>&5
/usr/local/lib/libsnmp.so: undefined reference to
`EVP_DigestInit'
/usr/local/lib/libsnmp.so: undefined reference to
`EVP_DigestFinal'
/usr/local/lib/libsnmp.so: undefined reference to `EVP_md5'
/usr/local/lib/libsnmp.so: undefined reference to `HMAC'
/usr/local/lib/libsnmp.so: undefined reference to `EVP_sha1'
/usr/local/lib/libsnmp.so: undefined reference to
`des_cbc_encrypt'
/usr/local/lib/libsnmp.so: undefined reference to
`des_key_sched'
/usr/local/lib/libsnmp.so: undefined reference to
`EVP_DigestUpdate'
/usr/local/lib/libsnmp.so: undefined reference to `RAND_bytes'
/usr/local/lib/libsnmp.so: undefined reference to
`des_ncbc_encrypt'



You can found the complete config.log under
http://www.pofo.de/config.log

I've located the OpenSSL includes under /usr/include/openssl

-- Olli



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



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




[PHP-DEV] Re: PHP 4.0 Bug #9281 Updated: Using a dll

2001-02-15 Thread Dario Carnelutti


This is a complete code...
var WF = Server.CreateObject("mbwfeng.c_process");
WF.SessionID= Session.SessionID;
WF.CargarPendienteAlArrancar = false;
WF.EstablecerSesion(Usuario,Clave,"Ministerio");
// it works fine until this line
WF.Categorias.Filtro("","","",0,0);
WF.Categorias.Modalidad = 0;
"Categorias" is the object i receive and "Filtro" is a void
"CargarPendienteAlArrancar" is a property.
I see that my problems is when i try to use a object. I can use all
the properties and it works very fine.
Thanks
Dario
 
Bug Database wrote:
ID: 9281
Updated by: phanto
Reported By: [EMAIL PROTECTED]
Status: Open
Bug Type: COM related
Assigned To:
Comments:
user reply:
-
this is a custom object.
The problem i have is i programmed a web site in Jscript that uses
this dll, then i'm trying to program this site in PHP and i don't know
why i have this errors. Can you help me, maybe exists a function to retrieve
all the object properties or methods??
-
first:
please use the bugtracking system and don't reply directly to the notification
email.
could you send me a code snippet how you have done this using JScript
? I think it's impossible to use the object without having an IDispatch
interface of it.
harald
Previous Comments:
---
[2001-02-15 12:44:00] [EMAIL PROTECTED]
what kind of object is Cat ?
if it is another IDispatch interface all should work fine.
if it is a custom object php doesn't know the object structure, so how
should it determine the address to call when you do your method calls.
harald.
---
[2001-02-15 10:29:59] [EMAIL PROTECTED]
Hello, i'm using a dll that have this structure
 Class(Process)
   Object(CAT)
 void(Filter)
i'm doing this
$pro=new COM("ENGINE.Process");
 it works, and when i print the properties it is ok too, but when
i do this
$pro->Cat.Filter(XX);
it gives me a error that says that the memory cant be "read" ?
i dont know why?!
i tried this too
$pro->Cat->Filter(XXX);
and this
$cat=$pro->Cat // to catch the object returned but it falis too..
What can i do, many thanks
---
ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=9281&edit=2



[PHP-DEV] CVS Account Request

2001-02-15 Thread CVS Account Request

Full name: Luiz Augusto Gonçalves Flores
Email: [EMAIL PROTECTED]
ID: lagflores
Purpose: Translate PHP ODcumentation to Portuguese BR

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




[PHP-DEV] CVS Account Request

2001-02-15 Thread CVS Account Request

Full name: Luiz Augusto Gonçalves Flores
Email: lagflores2yahoo.com.br
ID: lagflores
Purpose: Translate PHP ODcumentation to Portuguese BR

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




[PHP-DEV] Re: PHP 4.0 Bug #9281 Updated: Using a dll

2001-02-15 Thread Dario Carnelutti


the dll have a IDispatch off course,
i do this with JSCript
var WF=Server.CreateObject("ENGINE.PROCESS"),
then i use this
Response.Write(WF.Status); //property
WF.Cate.Filter("","","");// void
and this works fine.
does exists any function for inheritance of a object?
or how can i get the collection of voids and objects of an class using
PHP?
Bug Database wrote:
ID: 9281
Updated by: phanto
Reported By: [EMAIL PROTECTED]
Status: Open
Bug Type: COM related
Assigned To:
Comments:
user reply:
-
this is a custom object.
The problem i have is i programmed a web site in Jscript that uses
this dll, then i'm trying to program this site in PHP and i don't know
why i have this errors. Can you help me, maybe exists a function to retrieve
all the object properties or methods??
-
first:
please use the bugtracking system and don't reply directly to the notification
email.
could you send me a code snippet how you have done this using JScript
? I think it's impossible to use the object without having an IDispatch
interface of it.
harald
Previous Comments:
---
[2001-02-15 12:44:00] [EMAIL PROTECTED]
what kind of object is Cat ?
if it is another IDispatch interface all should work fine.
if it is a custom object php doesn't know the object structure, so how
should it determine the address to call when you do your method calls.
harald.
---
[2001-02-15 10:29:59] [EMAIL PROTECTED]
Hello, i'm using a dll that have this structure
 Class(Process)
   Object(CAT)
 void(Filter)
i'm doing this
$pro=new COM("ENGINE.Process");
 it works, and when i print the properties it is ok too, but when
i do this
$pro->Cat.Filter(XX);
it gives me a error that says that the memory cant be "read" ?
i dont know why?!
i tried this too
$pro->Cat->Filter(XXX);
and this
$cat=$pro->Cat // to catch the object returned but it falis too..
What can i do, many thanks
---
ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=9281&edit=2



[PHP-DEV] IMAP and the mail_parameters

2001-02-15 Thread Dan Kalowsky

Hi,

  Recently came across a need for the ability to set quotas via the PHP
IMAP interface.  Currently it doesn't seem as if this is capable of
happening, so I've started looking into adding a bit of functionality.

  It seems that the c-client library has a function
mail_parameters(MAILSTREAM *stream, long function, void *value) function
that can accomplish this, where 'function' is the command you want
(defined in mail.h)

  The question becomes would this, would adding in a 'imap_parameters()'
function to PHP be advisable, leaving it open to extend to all of the
mail_parameter functions?  Or would it be better to just implement a
imap_setquota() function to handle what I need?

  The only big problem I can see with implementing a imap_parameter()
function is the lack of functionality documentation/support.  For
example, in the imap-2000c.tar dist, there are mentions of a
SET_RSHTIMEOUT including a mention in the mail.h file, but there is no
implementation in the mail_parameter function to handle such a flag. 
More so the 'value' to be passed into the function isn't always
defined/documented. 

  The disadvantage I see with just a imap_setquota function is if other
functionality is needed it would require re-implementing the function. 
The internals would be the same except for one variable (that could be a
possible parameter by the user) deciding what functionality to call.

  The implementation of a universal function could potentially be
extremely useful for controlling imap services.  But some advise on this
would be welcome... or if there currently is such an ability that would
be great to hear!  So.. any preference?

And yes, I'm planning on submitting all changes back to the project...


-- 
Dan Kalowsky  "Tonight I think I'll walk alone, 
Worldgate Communications   I'll find my soul as I go home."
Software Engineer - TICS Group  - Temptation

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




[PHP-DEV] CVS Account Request

2001-02-15 Thread CVS Account Request

Full name: Ernani Joppert Pontes Martins
Email: [EMAIL PROTECTED]
ID: ernani
Purpose: Translating PHP Manual for Portuguese

-- 
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 #9177 Updated: crypt problems with openssl

2001-02-15 Thread Jani Taskinen

On Thu, 15 Feb 2001, Stig Venaas wrote:

>> Well, I think it's just the link order of libraries. ie. the
>> openssl lib should be before libc..but is that even possible?
>> Or just add another entry for libc after ssl?
>
>Might be possible to do some kludge with the link order, I would prefer
>that OpenSSL changed a bit though, I'll probably have to go nag them
>again. OpenLDAP needs this to be fixed as well, and I'm sure there are
>other programs with the same problem.

In that case, let's nag the openssl people. And close the bug reports
regarding this as it clearly isn't our problem then? :)

--Jani


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




[PHP-DEV] PHP 4.0 Bug #4630 Updated: Segmentation fault(coredump) in apache startup

2001-02-15 Thread david-shafer

ID: 4630
User Update by: [EMAIL PROTECTED]
Old-Status: Feedback
Status: Open
Bug Type: Compile Failure
Description: Segmentation fault(coredump) in apache startup

The segfault still occurs as of php4-200102131445.

Previous Comments:
---

[2000-12-18 10:55:46] [EMAIL PROTECTED]
Could you try the latest snapshot from http://snaps.php.net/
to see if this is fixed now?

--Jani

---

[2000-09-08 19:42:47] [EMAIL PROTECTED]
After forwarding the issue to a compiler expert at IBM, I received the fix below, 
which I've tested and confirmed. Does anyone know how best to implement this fix?

-
The point where you found the segment fault was when php_create_dir attempted to call 
ap_register_cleanup. As it happens, php_create_dir is in libphp4.so and 
ap_register_cleanup is in httpd. In order to make this work on AIX, httpd has to be 
bound with an export list and
libphp4.so has to be bound with an import list.

Fortunately, the Apache part is already set up correctly.  When you install apache on 
AIX, $PREFIX/libexec/httpd.exp is a correctly formatted import/export file.

The PHP4 part, however was not set up correctly. In fact it was set up in the worst 
possible way under the circumstances. If you were to attempt to naively bind 
libphp4.so, the linker would produce a fatal error because ap_register_cleanup is 
undefined. $PHP4/libtool (which
I believe is generated by configure) gets around this inconvenience by adding a 
-berrok linker option. (It's called ${allow_undefined_flag}) So, the linker on AIX 
basically leaves the reference to ap_register_cleanup untouched so the call branches 
to a pseudo-random piece of code. After that, bad things happen.

I'm running now because I manually changed $PHP4/libtool so that it contains these 
lines:

# Commands used to build and install a shared archive.
archive_cmds="$CC ${wl}-bM:SRE -o $objdir/$soname $libobjs $deplibs $linkopts 
${wl}-bexpall ${wl}-bI:/usr/local/apache/libexec/httpd.exp 
${wl}-bnoentry${allow_undefined_flag}"
archive_expsym_cmds="$CC ${wl}-bM:SRE -o $objdir/$soname $libobjs $deplibs $linkopts 
${wl}-bI:/usr/local/apache/libexec/httpd.exp ${wl}-bE:$export_symbols 
${wl}-bnoentry${allow_undefined_flag}"

The bit I added (in both lines) is:
${wl}-bI:/usr/local/apache/libexec/httpd.exp

I have no idea what the ${wl} is; I just copied the existing pattern. I hard coded 
/usr/local/apache/libexec/httpd.exp. Obviously, the real export file should be 
identifed using something like apxs, but I don't know how to do that.

At any rate, httpd has now been running for a while on my machine.

---

[2000-08-24 00:02:42] [EMAIL PROTECTED]
Here are the results from the latest version. The following have changed:

PHP 4-28230945

export CFLAGS="-g -ma"

./configure --enable-c9x-inline 
--enable-debug 
--prefix=/local/www/php 
--with-apxs=/local/www/bin/apxs 
--with-config-file-path=/local/www/php/etc 
--without-mysql

bud # ./httpd -X
Segmentation fault(coredump)

bud # dbx httpd
Type 'help' for help.
reading symbolic information ...
[using memory image in core]

Segmentation fault in php_save_umask at line 121 in file "" ($t1)
could not read "mod_php4.c"
(dbx) where   
php_save_umask(), line 121 in "mod_php4.c"
php_create_dir(p = 0x2001ef28, dummy = (nil)), line 556 in "mod_php4.c"
ap_single_module_configure(0x2001ef28, 0x2001ef50, 0x200b9db8), line 1500 in 
"http_config.c"
load_module(0x2ff22948, 0x0, 0x200432d0, 0x200432e0), line 282 in "mod_so.c"
invoke_cmd(0x2000f5e0, 0x2ff22948, 0x0, 0x2ff20920), line 818 in "http_config.c"
unnamed block $b14, line 1008 in "http_config.c"
ap_handle_command(0x2ff22948, 0x2001f480, 0x2ff208f0), line 1008 in "http_config.c"
unnamed block $b16, line 1022 in "http_config.c"
ap_srm_command_loop(0x2ff22948, 0x2001f480), line 1022 in "http_config.c"
ap_process_resource_config(0x2001ef50, 0x2001f608, 0x2001ef28, 0x20022f68), line 1202 
in "http_config.c"
ap_read_config(0x2001ef28, 0x20022f68, 0x200052a0), line 1481 in "http_config.c"
http_main.main(argc = 2, argv = 0x2ff22b3c), line 4955 in "http_main.c"
(dbx) quit

bud # gdb httpd
GDB is free software and you are welcome to distribute copies of it
 under certain conditions; type "show copying" to see the conditions.
There is absolutely no warranty for GDB; type "show warranty" for details.
GDB 4.14 (rs6000-ibm-aix3.2.5), Copyright 1995 Free Software Foundation, Inc...
(gdb) run -X
Starting program: /local/www/bin/httpd -X
"/usr/lib/libpthreads.a": not in executable format: File format not recognized.
(gdb) continue
Continuing.

Program received signal SIGSEGV, Segmentation fault.
0xd176376c in __dbsubn ()
(gdb) bt
#0  0xd176376c in __dbsu

[PHP-DEV] PHP 4.0 Bug #9288 Updated: Math operations give wrong result under certain type-conversion circumstances

2001-02-15 Thread hholzgra

ID: 9288
Updated by: hholzgra
Reported By: [EMAIL PROTECTED]
Old-Status: Bogus
Status: Closed
Bug Type: Math related
Assigned To: 
Comments:

short answer: 
never use floats or doubles for financial data!

longer answer: 
the internal number format in modern computers
is binary (base 2) and not decimal (base 10) for performance
and complexity reasons
while it is possible to convert decimal numbers into binaries
and back this does not hold true for fractions
something like 0.3 (decimal) would be a periodic binary 
fraction like 10/3 is 0....
in decimal
this leads to loss of precision when calculation with
decimal fractions as you have when storing currency values

solution: 
if you just summ up values then you should store values in
the smalest unit your currency has (pennies?) instead of
what you are used to (Pounds?) to totally avoid fractions 

if you cannot avoid fractions (like when dealing with 
percentage calculations or currency conversions) you
should just be aware of the (usually very small) internal
conversion differences 
(0.27755575615629 in your example)
or use the bcmath extension, although for monetary 
values you should go perfectly fine with using round(...,2)
on your final results



Previous Comments:
---

[2001-02-15 14:51:28] [EMAIL PROTECTED]
This is very normal in the world of floating point math. All numbers you write and 
have a fraction are only very good approximations of a number.

---

[2001-02-15 14:29:53] [EMAIL PROTECTED]
Please, I believe I have found a serious bug.  I can reproduce it 100%.

Essentially I have a loop (I think this might be significant?) that checks through 
some rows in a database and if the value of a row (an amount of money) is less than 
the total ($total2pay) then the ID for that row is inserted into an array to be 
cancelled, and the total is reduced by the amount of that row.

The loop works fine, unless there are a number of items which add up exactly to the 
total.  Then, when subtracting the final item (so we get x - x) instead of 0 we get 
something like 2.7755575615629E-17.

Below is the problem script and underneath that is the output I get. The script has 
been expanded out to use more variables to make it clearer and prints some debugging 
stuff. It's not incredibly efficient on SQL requests, but that's irrelevant.
I will gladly give any more information or debug output on request if it's helpful.  
NB I do NOT have the Zend Optimiser running for this.

The database structure of table 'debts' is:
id int(10), owed_to varchar(20), owed_by varchar(20), amount decimal (10,2)

// Let there be initially 3 rows in the db which match the query below, // with amount 
= "0.71", "0.20" and "0.10" respectively
$res = db_query("SELECT * FROM debts WHERE owed_by='$who_is_paying' AND 
owed_to='$payee' ORDER BY amount DESC");
// Let $total2pay = 1.01
do {
  while ($row = mysql_fetch_array($res)) {
if ($row[amount] <= $total2pay) { // cancel item
  $cancel[] = $row[id]; 
  print "oldtotal:$total2pay,type ".gettype($total2pay)."";
  $new = $row[amount];
  print "amount2delete:$new, type ".gettype($new)."";
  // BELOW LINE IS THE PROBLEM ONE
  $fish= $total2pay - $new;// deduct it from the total owed
  print "newtotal:$fish,type ".gettype($fish)."";
  $total2pay = $fish;
}
  }
  // delete the marked items from the database
  if ($cancel) {
reset($cancel);
while ($item = each($cancel)) {
  db_query("DELETE FROM debts WHERE id='$item[value]'");
}
  }

  // retrieve the fresh, updated item list from the databas
mysql_free_result($res);
  $res = db_query("SELECT * FROM debts WHERE owed_by='$who_is_paying' AND 
owed_to='$payee' ORDER BY amount DESC");
  $rows = db_num_rows($res);
} while (($total2pay > 0) && ($rows > 0) && $cancel);


The output from this is:

oldtotal:1.01,type string
amount2delete:0.71, type string
newtotal:0.3,type double

oldtotal:0.3,type double
amount2delete:0.20, type string
newtotal:0.1,type double

oldtotal:0.1,type double
amount2delete:0.10, type string
newtotal:2.7755575615629E-17,type double

I have played a bit to try to fix it, and found that if I set $new explicitly to type 
double just before the problem line, the output is exactly the same, i.e. the output 
is:

oldtotal:1.01,type double
amount2delete:0.71, type double
newtotal:0.3,type double

oldtotal:0.3,type double
amount2delete:0.2, type double
newtotal:0.1,type double

oldtotal:0.1,type double
amount2delete:0.1, type double
newtotal:2.7755575615629E-17,type double

Another thing: if there is only one row in the database and this adds up to the total, 
it works fine:

oldtotal:1.01,type string
amount2

[PHP-DEV] PHP 4.0 Bug #9288 Updated: Math operations give wrong result under certain type-conversion circumstances

2001-02-15 Thread derick

ID: 9288
Updated by: derick
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Bogus
Bug Type: Math related
Assigned To: 
Comments:

This is very normal in the world of floating point math. All numbers you write and 
have a fraction are only very good approximations of a number.

Previous Comments:
---

[2001-02-15 14:29:53] [EMAIL PROTECTED]
Please, I believe I have found a serious bug.  I can reproduce it 100%.

Essentially I have a loop (I think this might be significant?) that checks through 
some rows in a database and if the value of a row (an amount of money) is less than 
the total ($total2pay) then the ID for that row is inserted into an array to be 
cancelled, and the total is reduced by the amount of that row.

The loop works fine, unless there are a number of items which add up exactly to the 
total.  Then, when subtracting the final item (so we get x - x) instead of 0 we get 
something like 2.7755575615629E-17.

Below is the problem script and underneath that is the output I get. The script has 
been expanded out to use more variables to make it clearer and prints some debugging 
stuff. It's not incredibly efficient on SQL requests, but that's irrelevant.
I will gladly give any more information or debug output on request if it's helpful.  
NB I do NOT have the Zend Optimiser running for this.

The database structure of table 'debts' is:
id int(10), owed_to varchar(20), owed_by varchar(20), amount decimal (10,2)

// Let there be initially 3 rows in the db which match the query below, // with amount 
= "0.71", "0.20" and "0.10" respectively
$res = db_query("SELECT * FROM debts WHERE owed_by='$who_is_paying' AND 
owed_to='$payee' ORDER BY amount DESC");
// Let $total2pay = 1.01
do {
  while ($row = mysql_fetch_array($res)) {
if ($row[amount] <= $total2pay) { // cancel item
  $cancel[] = $row[id]; 
  print "oldtotal:$total2pay,type ".gettype($total2pay)."";
  $new = $row[amount];
  print "amount2delete:$new, type ".gettype($new)."";
  // BELOW LINE IS THE PROBLEM ONE
  $fish= $total2pay - $new;// deduct it from the total owed
  print "newtotal:$fish,type ".gettype($fish)."";
  $total2pay = $fish;
}
  }
  // delete the marked items from the database
  if ($cancel) {
reset($cancel);
while ($item = each($cancel)) {
  db_query("DELETE FROM debts WHERE id='$item[value]'");
}
  }

  // retrieve the fresh, updated item list from the databas
mysql_free_result($res);
  $res = db_query("SELECT * FROM debts WHERE owed_by='$who_is_paying' AND 
owed_to='$payee' ORDER BY amount DESC");
  $rows = db_num_rows($res);
} while (($total2pay > 0) && ($rows > 0) && $cancel);


The output from this is:

oldtotal:1.01,type string
amount2delete:0.71, type string
newtotal:0.3,type double

oldtotal:0.3,type double
amount2delete:0.20, type string
newtotal:0.1,type double

oldtotal:0.1,type double
amount2delete:0.10, type string
newtotal:2.7755575615629E-17,type double

I have played a bit to try to fix it, and found that if I set $new explicitly to type 
double just before the problem line, the output is exactly the same, i.e. the output 
is:

oldtotal:1.01,type double
amount2delete:0.71, type double
newtotal:0.3,type double

oldtotal:0.3,type double
amount2delete:0.2, type double
newtotal:0.1,type double

oldtotal:0.1,type double
amount2delete:0.1, type double
newtotal:2.7755575615629E-17,type double

Another thing: if there is only one row in the database and this adds up to the total, 
it works fine:

oldtotal:1.01,type string
amount2delete:1.01, type double
newtotal:0,type double

I really hope someone can help me get to the bottom of this!

---



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


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




[PHP-DEV] PHP 4.0 Bug #9289: Command line argument list inaccurate

2001-02-15 Thread reinke

From: [EMAIL PROTECTED]
Operating system: Linux
PHP version:  4.0.4pl1
PHP Bug Type: Unknown/Other Function
Bug description:  Command line argument list inaccurate

PHP, when being run from the command line, has been mangling
the command line arguments badly for some while. It would be
nice if they mapped to the same usage as C programs.

PHP4.04pl1 is particularly bad - argc is completely broken:

Consider the script


Here's the output from php4.01, and then from php4.04pl1

$ php -f test.php
0
$ php -f test.php a
1
$ php -f test.php a b
2
$ php -f test.php a b c
3


$ /home/webapps/webserver/bin/php404pl1 -f test.php
2
$ /home/webapps/webserver/bin/php404pl1 -f test.php a
2
$ /home/webapps/webserver/bin/php404pl1 -f test.php a b
3
$ /home/webapps/webserver/bin/php404pl1 -f test.php a b c
4

As you can see, argc is never less than 2, and in fact is a value
of 2 with zero args or one arg (bad bad bad!).

Sort of important for us - we find PHP SO EASY to program in,
that we actually use it as the language of choice, even for batch
programming, when performance is not absolutely critical.
But it sort of makes it tough to pass in cmd line arguments...




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



-- 
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 #9177 Updated: crypt problems with openssl

2001-02-15 Thread Stig Venaas

On Thu, Feb 15, 2001 at 08:29:57PM +0100, Jani Taskinen wrote:
> On Thu, 15 Feb 2001, Stig Venaas wrote:
> >Are you sure? I haven't seen any fix. Could someone tell me what was
> 
> Oh? I remembered incorrectly then..I thought you were the one who
> fixed it.. :)

I don't mind the credit (:

> Well, I think it's just the link order of libraries. ie. the
> openssl lib should be before libc..but is that even possible?
> Or just add another entry for libc after ssl?

Might be possible to do some kludge with the link order, I would prefer
that OpenSSL changed a bit though, I'll probably have to go nag them
again. OpenLDAP needs this to be fixed as well, and I'm sure there are
other programs with the same problem.

Stig

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




[PHP-DEV] PHP 4.0 Bug #9288: Math operations give wrong result under certain type-conversion circumstances

2001-02-15 Thread tim

From: [EMAIL PROTECTED]
Operating system: Linux
PHP version:  4.0.4pl1
PHP Bug Type: Math related
Bug description:  Math operations give wrong result under certain type-conversion 
circumstances

Please, I believe I have found a serious bug.  I can reproduce it 100%.

Essentially I have a loop (I think this might be significant?) that checks through 
some rows in a database and if the value of a row (an amount of money) is less than 
the total ($total2pay) then the ID for that row is inserted into an array to be 
cancelled, and the total is reduced by the amount of that row.

The loop works fine, unless there are a number of items which add up exactly to the 
total.  Then, when subtracting the final item (so we get x - x) instead of 0 we get 
something like 2.7755575615629E-17.

Below is the problem script and underneath that is the output I get. The script has 
been expanded out to use more variables to make it clearer and prints some debugging 
stuff. It's not incredibly efficient on SQL requests, but that's irrelevant.
I will gladly give any more information or debug output on request if it's helpful.  
NB I do NOT have the Zend Optimiser running for this.

The database structure of table 'debts' is:
id int(10), owed_to varchar(20), owed_by varchar(20), amount decimal (10,2)

// Let there be initially 3 rows in the db which match the query below, // with amount 
= "0.71", "0.20" and "0.10" respectively
$res = db_query("SELECT * FROM debts WHERE owed_by='$who_is_paying' AND 
owed_to='$payee' ORDER BY amount DESC");
// Let $total2pay = 1.01
do {
  while ($row = mysql_fetch_array($res)) {
if ($row[amount] <= $total2pay) { // cancel item
  $cancel[] = $row[id]; 
  print "oldtotal:$total2pay,type ".gettype($total2pay)."";
  $new = $row[amount];
  print "amount2delete:$new, type ".gettype($new)."";
  // BELOW LINE IS THE PROBLEM ONE
  $fish= $total2pay - $new;// deduct it from the total owed
  print "newtotal:$fish,type ".gettype($fish)."";
  $total2pay = $fish;
}
  }
  // delete the marked items from the database
  if ($cancel) {
reset($cancel);
while ($item = each($cancel)) {
  db_query("DELETE FROM debts WHERE id='$item[value]'");
}
  }

  // retrieve the fresh, updated item list from the databas
mysql_free_result($res);
  $res = db_query("SELECT * FROM debts WHERE owed_by='$who_is_paying' AND 
owed_to='$payee' ORDER BY amount DESC");
  $rows = db_num_rows($res);
} while (($total2pay > 0) && ($rows > 0) && $cancel);


The output from this is:

oldtotal:1.01,type string
amount2delete:0.71, type string
newtotal:0.3,type double

oldtotal:0.3,type double
amount2delete:0.20, type string
newtotal:0.1,type double

oldtotal:0.1,type double
amount2delete:0.10, type string
newtotal:2.7755575615629E-17,type double

I have played a bit to try to fix it, and found that if I set $new explicitly to type 
double just before the problem line, the output is exactly the same, i.e. the output 
is:

oldtotal:1.01,type double
amount2delete:0.71, type double
newtotal:0.3,type double

oldtotal:0.3,type double
amount2delete:0.2, type double
newtotal:0.1,type double

oldtotal:0.1,type double
amount2delete:0.1, type double
newtotal:2.7755575615629E-17,type double

Another thing: if there is only one row in the database and this adds up to the total, 
it works fine:

oldtotal:1.01,type string
amount2delete:1.01, type double
newtotal:0,type double

I really hope someone can help me get to the bottom of this!


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



-- 
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 #9177 Updated: crypt problems with openssl

2001-02-15 Thread Jani Taskinen

On Thu, 15 Feb 2001, Stig Venaas wrote:

>On Thu, Feb 15, 2001 at 04:35:43PM -, [EMAIL PROTECTED] wrote:
>> ID: 9177
>> Updated by: sniper
>> Reported By: [EMAIL PROTECTED]
>> Old-Status: Open
>> Status: Feedback
>> Bug Type: *Install and Config
>> Assigned To:
>> Comments:
>>
>> IIRC this is fixed already in CVS so please try the latest CVS snapshot
>> from http://snaps.php.net/
>
>Are you sure? I haven't seen any fix. Could someone tell me what was

Oh? I remembered incorrectly then..I thought you were the one who
fixed it.. :)

It might have just been a discussion about it then.

>done? I've encountered this problem other places as well. The problem
>is that OpenSSL has its own crypt() that only supports DES. It's left
>out on FreeBSD and should also be left out on Linux I think. I've
>asked about this on the OpenSSL list but no response yet. If anyone
>knows a clever work around, please tell me (:

Well, I think it's just the link order of libraries. ie. the
openssl lib should be before libc..but is that even possible?
Or just add another entry for libc after ssl?

--Jani



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




[PHP-DEV] PHP 4.0 Bug #9286 Updated: fopen fails to open "http://...." requests.

2001-02-15 Thread andreas_gremm

ID: 9286
User Update by: [EMAIL PROTECTED]
Status: Open
Bug Type: Filesystem function related
Description: fopen fails to open "http://" requests.

Oh, Oh!

After reading some of the duplicate cases I went on testing (leaving the port-number 
off) etc.

Then I found out that without Port-Number I could read the pages.

Then I remarked that just http://nt-server:81/ also works.
Then I tested againg http://nt-server:81/tmp which does not work (although it did with 
php-versions before!!!)

Then I tested http://nt-server:81/tmp/ which works!!! (merde!) What a mess! 
Something is changed
 in APACHE which changes the 
ALIAS behavior or something else
In the Configuration of Apache I always had:
Alias /tmp "J:/bmc/control-d/tmp"

Which worked fine for   fopen("http://nt-server:81/tmp","r")  all the time!

Maybe all the other cases are the same because all the guys tried to build the new 
apache with the new
php 4.0.3 or 4.0.4 and got this error (due to a change in apaches behavior!?!).

So what to do now? For me this case could be closed but how to communicate and check 
it?

Regards,
Andreas

Previous Comments:
---

[2001-02-15 14:11:08] [EMAIL PROTECTED]
I saw that I tested some versions of:
allow_url_fopen 
and my php.ini I sent contained
allow_url_fopen = Off

But the Problem also persists with
allow_url_fopen = On

Regards,
Andreas


---

[2001-02-15 14:05:21] [EMAIL PROTECTED]
Hi

fopen fails to open files from an http: location  (mightbe an ftp: location fails 
too!)
I run Apache 1.3.17 on Windows-NT and PHP 4.0.4pl1.

I tested it with the Apache-Module and as a CGI Script: Both Versions fail.
I also disabled the rewrite module completely and the fopen fails.  
With pure PHP 4.0 everything works fine.

Regards,
Andreas


Short Script:


php test


php test
";


$fp=fopen("http://nt-server:81/tmp","r");

if ( $fp ){
while (! feof($fp)) {
$buffer=fgets($fp,256);
echo $buffer;echo "";
}
$fclstat=fclose($fp);
}

?>



- List of Modules
Apache Server Information
Server Settings, mod_jserv.c, mod_php4.c, mod_usertrack.c, mod_status.c, mod_info.c, 
mod_speling.c, mod_rewrite.c, mod_proxy.c, mod_headers.c, mod_expires.c, mod_digest.c, 
mod_cern_meta.c, mod_auth_digest.c, mod_auth_dbm.c, mod_auth_anon.c, mod_isapi.c, 
mod_setenvif.c, mod_actions.c, mod_imap.c, mod_asis.c, mod_log_config.c, mod_env.c, 
mod_alias.c, mod_userdir.c, mod_cgi.c, mod_dir.c, mod_autoindex.c, mod_include.c, 
mod_negotiation.c, mod_auth.c, mod_access.c, mod_mime.c, mod_so.c, http_core.c

Server Version: Apache/1.3.17 (Win32) ApacheJServ/1.1.2 PHP/4.0.4pl1
Server Built: Jan 29 2001 22:00:19
API Version: 19990320:10
Run Mode: standalone
User/Group: #-1(1)/1
Hostname/port: nt-server.gremm.de:81
Daemons: start: 5min idle: 5max idle: 10max: 1024
Max Requests: per child: 0keep alive: onmax per connection: 100
Threads: per child: 50
Excess requests: per child: 0
Timeouts: connection: 300keep-alive: 15
Server Root: g:/program files/apache group/apache
Config File: g:/program files/apache group/apache/conf/httpd.conf
PID File: logs/httpd.pid
Scoreboard File: logs/apache_status

- Error Message:
php test
Hello World

Warning: fopen("http://nt-server:81/tmp","r") - Invalid argument in g:/program 
files/apache group/apache/htdocs/testfopen.php on line 10

-PHP INI
[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. 

Re: [PHP-DEV] CVS Account Request

2001-02-15 Thread PHP development @echospace

 another one to add to a long list of "dont's" at /cvs-php.php? This is a particularly 
good one, and I bet more than one person will ask this.
:) Vlad




- Original Message -
From: CVS Account Request 
To: [EMAIL PROTECTED]
Sent: 15 Feb 2001 02:58:30 -
Subject: [PHP-DEV] CVS Account Request

Full name: Jacky Chou
Email: [EMAIL PROTECTED]
ID: bhchou
Purpose: Check PHP version frequently

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


Finally! Real applications on the web!
Free email, contacts, and file storage.
http://www.echospace.com


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




[PHP-DEV] PHP 4.0 Bug #9287: Stronghold only start one process when using DSO PHP4 with OCI8 support

2001-02-15 Thread javier . felip

From: [EMAIL PROTECTED]
Operating system: Tru64 5.0a
PHP version:  4.0.4pl1
PHP Bug Type: *Install and Config
Bug description:  Stronghold only start one process  when using DSO PHP4 with OCI8 
support

Hi,

we have compiled PHP as a DSO Module for Stronghold 3.0. We are working using Tru64 
5.0a 

It compiles fine but when starting the server for reload the new configuration it only 
start one process in memory and the server doesn't respond.

Of course we have, set up the environment variables for Oracle, etc.

Our configuration guide are:

./configure --without-mysql --with-oracle --with-oci8 
--with-apxs=/usr/local/stronghold/bin/apxs 
--with-perl=/usr/local/stronghold/perl/bin/

Thanks for all


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



-- 
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 #9253: Class constructors can't return values

2001-02-15 Thread Nathan Cassano

You can return a value from a class constructor. It's just not that obvious.

class myclass {

function myclass() {

if($err){
$this = $err;
return;
}
}

}

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 14, 2001 2:23 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DEV] PHP 4.0 Bug #9253: Class constructors can't return
values


From: [EMAIL PROTECTED]
Operating system: All
PHP version:  4.0.4pl1
PHP Bug Type: Feature/Change Request
Bug description:  Class constructors can't return values

Class constructors can't abort instance creation, for example by returning
false...
This leads to a lot of "if (! $newobj->status)" crap.
Why is that ? I found a message on the PHP3 mailing list about this, but
it's still not there.


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




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




[PHP-DEV] PHP 4.0 Bug #9286 Updated: fopen fails to open "http://...." requests.

2001-02-15 Thread andreas_gremm

ID: 9286
User Update by: [EMAIL PROTECTED]
Status: Open
Bug Type: Filesystem function related
Description: fopen fails to open "http://" requests.

I saw that I tested some versions of:
allow_url_fopen 
and my php.ini I sent contained
allow_url_fopen = Off

But the Problem also persists with
allow_url_fopen = On

Regards,
Andreas


Previous Comments:
---

[2001-02-15 14:05:21] [EMAIL PROTECTED]
Hi

fopen fails to open files from an http: location  (mightbe an ftp: location fails 
too!)
I run Apache 1.3.17 on Windows-NT and PHP 4.0.4pl1.

I tested it with the Apache-Module and as a CGI Script: Both Versions fail.
I also disabled the rewrite module completely and the fopen fails.  
With pure PHP 4.0 everything works fine.

Regards,
Andreas


Short Script:


php test


php test
";


$fp=fopen("http://nt-server:81/tmp","r");

if ( $fp ){
while (! feof($fp)) {
$buffer=fgets($fp,256);
echo $buffer;echo "";
}
$fclstat=fclose($fp);
}

?>



- List of Modules
Apache Server Information
Server Settings, mod_jserv.c, mod_php4.c, mod_usertrack.c, mod_status.c, mod_info.c, 
mod_speling.c, mod_rewrite.c, mod_proxy.c, mod_headers.c, mod_expires.c, mod_digest.c, 
mod_cern_meta.c, mod_auth_digest.c, mod_auth_dbm.c, mod_auth_anon.c, mod_isapi.c, 
mod_setenvif.c, mod_actions.c, mod_imap.c, mod_asis.c, mod_log_config.c, mod_env.c, 
mod_alias.c, mod_userdir.c, mod_cgi.c, mod_dir.c, mod_autoindex.c, mod_include.c, 
mod_negotiation.c, mod_auth.c, mod_access.c, mod_mime.c, mod_so.c, http_core.c

Server Version: Apache/1.3.17 (Win32) ApacheJServ/1.1.2 PHP/4.0.4pl1
Server Built: Jan 29 2001 22:00:19
API Version: 19990320:10
Run Mode: standalone
User/Group: #-1(1)/1
Hostname/port: nt-server.gremm.de:81
Daemons: start: 5min idle: 5max idle: 10max: 1024
Max Requests: per child: 0keep alive: onmax per connection: 100
Threads: per child: 50
Excess requests: per child: 0
Timeouts: connection: 300keep-alive: 15
Server Root: g:/program files/apache group/apache
Config File: g:/program files/apache group/apache/conf/httpd.conf
PID File: logs/httpd.pid
Scoreboard File: logs/apache_status

- Error Message:
php test
Hello World

Warning: fopen("http://nt-server:81/tmp","r") - Invalid argument in g:/program 
files/apache group/apache/htdocs/testfopen.php on line 10

-PHP INI
[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 

[PHP-DEV] PHP 4.0 Bug #9286: fopen fails to open "http://...." requests.

2001-02-15 Thread andreas_gremm

From: [EMAIL PROTECTED]
Operating system: NT 4.0
PHP version:  4.0.4pl1
PHP Bug Type: Filesystem function related
Bug description:  fopen fails to open "http://" requests.

Hi

fopen fails to open files from an http: location  (mightbe an ftp: location fails too!)
I run Apache 1.3.17 on Windows-NT and PHP 4.0.4pl1.

I tested it with the Apache-Module and as a CGI Script: Both Versions fail.
I also disabled the rewrite module completely and the fopen fails.  
With pure PHP 4.0 everything works fine.

Regards,
Andreas


Short Script:


php test


php test
";


$fp=fopen("http://nt-server:81/tmp","r");

if ( $fp ){
while (! feof($fp)) {
$buffer=fgets($fp,256);
echo $buffer;echo "";
}
$fclstat=fclose($fp);
}

?>



- List of Modules
Apache Server Information
Server Settings, mod_jserv.c, mod_php4.c, mod_usertrack.c, mod_status.c, mod_info.c, 
mod_speling.c, mod_rewrite.c, mod_proxy.c, mod_headers.c, mod_expires.c, mod_digest.c, 
mod_cern_meta.c, mod_auth_digest.c, mod_auth_dbm.c, mod_auth_anon.c, mod_isapi.c, 
mod_setenvif.c, mod_actions.c, mod_imap.c, mod_asis.c, mod_log_config.c, mod_env.c, 
mod_alias.c, mod_userdir.c, mod_cgi.c, mod_dir.c, mod_autoindex.c, mod_include.c, 
mod_negotiation.c, mod_auth.c, mod_access.c, mod_mime.c, mod_so.c, http_core.c

Server Version: Apache/1.3.17 (Win32) ApacheJServ/1.1.2 PHP/4.0.4pl1
Server Built: Jan 29 2001 22:00:19
API Version: 19990320:10
Run Mode: standalone
User/Group: #-1(1)/1
Hostname/port: nt-server.gremm.de:81
Daemons: start: 5min idle: 5max idle: 10max: 1024
Max Requests: per child: 0keep alive: onmax per connection: 100
Threads: per child: 50
Excess requests: per child: 0
Timeouts: connection: 300keep-alive: 15
Server Root: g:/program files/apache group/apache
Config File: g:/program files/apache group/apache/conf/httpd.conf
PID File: logs/httpd.pid
Scoreboard File: logs/apache_status

- Error Message:
php test
Hello World

Warning: fopen("http://nt-server:81/tmp","r") - Invalid argument in g:/program 
files/apache group/apache/htdocs/testfopen.php on line 10

-PHP INI
[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  tags are recognized.
asp_tags=   Off ; allow ASP-style <% %> tags
precision   =   14  ; number of significant digits displayed in 
f

[PHP-DEV] PHP 4.0 Bug #9281 Updated: Using a dll

2001-02-15 Thread phanto

ID: 9281
Updated by: phanto
Reported By: [EMAIL PROTECTED]
Status: Open
Bug Type: COM related
Assigned To: 
Comments:

user reply:
-
this is a custom object. 
The problem i have is i programmed a web site in Jscript that uses this dll, then i'm 
trying to program this site in PHP and i don't know why i have this errors. Can you 
help me, maybe exists a function to retrieve all the object properties or methods?? 
-

first:
please use the bugtracking system and don't reply directly to the notification email.

could you send me a code snippet how you have done this using JScript ? I think it's 
impossible to use the object without having an IDispatch interface of it.

harald

Previous Comments:
---

[2001-02-15 12:44:00] [EMAIL PROTECTED]
what kind of object is Cat ?

if it is another IDispatch interface all should work fine.

if it is a custom object php doesn't know the object structure, so how should it 
determine the address to call when you do your method calls.

harald.

---

[2001-02-15 10:29:59] [EMAIL PROTECTED]
Hello, i'm using a dll that have this structure
 Class(Process)
   Object(CAT)
 void(Filter)

i'm doing this
$pro=new COM("ENGINE.Process");
 it works, and when i print the properties it is ok too, but when i do this

$pro->Cat.Filter(XX);
it gives me a error that says that the memory cant be "read" ? i dont know why?!

i tried this too
$pro->Cat->Filter(XXX);

and this
$cat=$pro->Cat // to catch the object returned but it falis too..

What can i do, many thanks


---



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


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




[PHP-DEV] PHP 4.0 Bug #9181 Updated: curl_setopt options causes seg faults

2001-02-15 Thread wmartino

ID: 9181
User Update by: [EMAIL PROTECTED]
Status: Assigned
Bug Type: Reproduceable crash
Description: curl_setopt options causes seg faults

Looks like the typo is still there in the snapshot for Feb. 15, 2001 in curl.c
on line 143.
 REGISTER_LONG_CONSTANT("CURLOPT_HTTPHEADER", CURLOPT_HEADER, CONST_CS | 
CONST_PERSISTENT);

I changed this to :
 REGISTER_LONG_CONSTANT("CURLOPT_HTTPHEADER", CURLOPT_HTTPHEADER, CONST_CS | 
CONST_PERSISTENT);

and fixed the other bug for HTTPHEADER(see above comment) in the definition for 
curl_setopt.  And this seemed to give the desired functionality.

Also, a correction to the previous comment: the problems I noted were not in 
if_curl_setopt, but in the definition for the curl_setopt function in curl.c.

Previous Comments:
---

[2001-02-15 11:30:29] [EMAIL PROTECTED]
At least the typo is fixed in CVS. Could you please try the latest CVS snapshot
from http://snaps.php.net/  to see  which problems still are valid?

I assign this to Sterling who promised to fix the possible bugs in a 2 to 3 weeks.

--Jani


---

[2001-02-08 15:35:50] [EMAIL PROTECTED]
curl_setopt with the options CURLOPT_HTTPHEADER, CURLOPT_QUOTE, and CURLOPT_POSTQUOTE 
used with a scalar value cause php to seg fault.  In curl.c:149, there is a typo where 
the constant name CURLOPT_HTTPHEADER is assigned to CURLOPT_HTTP.  Also, in several 
places, the code for the function if_curl_setopt assumes that curl_value is an 
aggregate type, when it may be a single string.  (Notably in the case statements for 
CURLOPT_HTTPHEADER,CURLOPT_POSTQUOTE, and CURLOPT_QUOTE. )  Lastly, in some places 
where a curl_slist is being built, memory is allocated for the first node when it 
should not be.  (Memory is allocated inside of curl_slist_append).
If you write a script that uses the CURLOPT_HTTPHEADER, or the others, you can easily 
reproduce this.

---


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


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




[PHP-DEV] PHP 4.0 Bug #9161 Updated: Undefined symbols in static apache build using PHP 4.0.4pl1

2001-02-15 Thread tcyrus

ID: 9161
User Update by: [EMAIL PROTECTED]
Old-Status: Feedback
Status: Open
Bug Type: Apache related
Description: Undefined symbols in static apache build using PHP 4.0.4pl1

No help.  I even started totally from scratch (removing all apache and php files and 
re-untaring them) and I get the same error.  Unfortunatley when I build Apache to run 
PHP dynamically, when I run: ./apachectl configtest
the error I get is:

Syntax error on line 207 of /usr/local/apache17/conf/httpd.conf:
Cannot load /usr/local/apache17/libexec/libphp4.so into server: ld.so.1: 
/usr/local/apache17/bin/httpd: fatal: relocation error: file 
/usr/local/apache17/libexec/libphp4.so: symbol pcre_free: referenced symbol not found

So on Solaris 2.6 (gcc 2.95.2) I'm stuck either way (static or dynamic) since both 
give me undefines.

Any other suggestions?

Previous Comments:
---

[2001-02-14 14:11:33] [EMAIL PROTECTED]
Try doing 'make clean ; make install' for PHP 4 and then try making Apache 
again.

--Jani


---

[2001-02-07 13:18:52] [EMAIL PROTECTED]
apache_1.3.17 & php-4.0.4pl1 (Solaris 2.6 GCC 2.95.2) 

Atempting to static link php into apache.  Getting undefined symbols in apache 
(shown below).  config'd apache 1st, then config'd php using:
   ./configure --with-mysql --with-apache=../apache_1.3.17 --enable-track-vars
did a make and make install and all worked.  Then configured apache with:
./configure --prefix=/opt/apache --activate-module=src/modules/php4/libphp4.a
and make fails with the following.

Suggestions?

gcc  -DSOLARIS2=260 -I/opt/local/src/php-4.0.4pl1 -I/opt/local/src/php-4.0.4pl1/
main -I/opt/local/src/php-4.0.4pl1/main -I/opt/local/src/php-4.0.4pl1/Zend -I/op
t/local/src/php-4.0.4pl1/Zend -I/opt/local/src/php-4.0.4pl1/TSRM -I/opt/local/sr
c/php-4.0.4pl1/TSRM -I/opt/local/src/php-4.0.4pl1 -DUSE_EXPAT -I./lib/expat-lite
 -DNO_DL_NEEDED `./apaci`
  -o httpd buildmark.o modules.o modules/php4/libphp4.a modules/standard/lib
standard.a main/libmain.a ./os/unix/libos.a ap/libap.a  lib/expat-lite/libexpat.
a  -R/usr/ucblib -R/usr/local/lib/gcc-lib/sparc-sun-solaris2.6/2.95.2  -L/usr/uc
blib -L/usr/local/lib/gcc-lib/sparc-sun-solaris2.6/2.95.2 -Lmodules/php4 -L../mo
dules/php4 -L../../modules/php4 -lmodphp4  -lpam  -ldl -lresolv -lresolv -lm -ld
l -lcrypt -lnsl -lsocket  -lsocket -lgcc   -lsocket -lnsl
Undefined   first referenced
 symbol in file
php_register_variable   modules/php4/libphp4.a(mod_php4.o)
core_globalsmodules/php4/libphp4.a(mod_php4.o)
sapi_startupmodules/php4/libphp4.a(mod_php4.o)
sapi_shutdown   modules/php4/libphp4.a(mod_php4.o)
zend_ini_rshutdown  modules/php4/libphp4.a(mod_php4.o)
php_module_shutdown_for_execmodules/php4/libphp4.a(mod_php4.o)
apache_php_module_main  modules/php4/libphp4.a(mod_php4.o)
php_request_shutdown_for_exec   modules/php4/libphp4.a(mod_php4.o)
zend_hash_apply modules/php4/libphp4.a(mod_php4.o)
executor_globalsmodules/php4/libphp4.a(mod_php4.o)
zend_hash_destroy   modules/php4/libphp4.a(mod_php4.o)
_estrdupmodules/php4/libphp4.a(mod_php4.o)
zend_error  modules/php4/libphp4.a(mod_php4.o)
sapi_get_default_content_type   modules/php4/libphp4.a(mod_php4.o)
php_module_shutdown_wrapper modules/php4/libphp4.a(mod_php4.o)
sapi_globalsmodules/php4/libphp4.a(mod_php4.o)
zend_startup_module modules/php4/libphp4.a(mod_php4.o)
php_request_shutdownmodules/php4/libphp4.a(mod_php4.o)
php_handle_aborted_connection   modules/php4/libphp4.a(mod_php4.o)
zend_hash_add_or_update modules/php4/libphp4.a(mod_php4.o)
zend_alter_ini_entrymodules/php4/libphp4.a(mod_php4.o)
apache_module_entry modules/php4/libphp4.a(mod_php4.o)
zend_hash_merge_ex  modules/php4/libphp4.a(mod_php4.o)
zend_hash_init  modules/php4/libphp4.a(mod_php4.o)
empty_stringmodules/php4/libphp4.a(mod_php4.o)
_efree  modules/php4/libphp4.a(mod_php4.o)
php_module_startup  modules/php4/libphp4.a(mod_php4.o)
ld: fatal: Symbol referencing errors. No output written to httpd


---


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


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




[PHP-DEV] PHP 4.0 Bug #9279 Updated: Declarated fifth param apsent in mail.c

2001-02-15 Thread derick

ID: 9279
Updated by: derick
Reported By: [EMAIL PROTECTED]
Old-Status: Assigned
Status: Closed
Bug Type: Documentation problem
Assigned To: 
Comments:

Fixed in CVS

Previous Comments:
---

[2001-02-15 09:08:07] [EMAIL PROTECTED]
5th parameter was introduced after 4.0.4 release, documentation should mention that

---

[2001-02-15 08:55:15] [EMAIL PROTECTED]
Declarated fifth param ( )at http://www.php.net/manual/en/function.mail.php 
is apsent in mail.c from php-4.0.4pl1.tar.gz
;(

bool mail (string to, string subject, string message [, string additional_headers [, 
string additional_parameters]])

string additional_parameters - don't have any code in mail.c
And this example from http://www.php.net/manual/en/function.mail.php 
about using Return-path: dos'nt work!

Example 3. Sending mail with extra headers and setting an additional command line 
parameter.

mail("[EMAIL PROTECTED]", "the subject", $message,
 "From: webmaster@$SERVER_NAME", "-fwebmaster@$SERVERNAME");

such code give us error 
===
Warning: Wrong parameter count for mail() 
===
bcos, as i say, in mail.c don't present any code about 5'th param :(

--
Sorry for my bad english.
  
 


---



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


-- 
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 #9177 Updated: crypt problems with openssl

2001-02-15 Thread Stig Venaas

On Thu, Feb 15, 2001 at 04:35:43PM -, [EMAIL PROTECTED] wrote:
> ID: 9177
> Updated by: sniper
> Reported By: [EMAIL PROTECTED]
> Old-Status: Open
> Status: Feedback
> Bug Type: *Install and Config
> Assigned To: 
> Comments:
> 
> IIRC this is fixed already in CVS so please try the latest CVS snapshot 
> from http://snaps.php.net/

Are you sure? I haven't seen any fix. Could someone tell me what was
done? I've encountered this problem other places as well. The problem
is that OpenSSL has its own crypt() that only supports DES. It's left
out on FreeBSD and should also be left out on Linux I think. I've
asked about this on the OpenSSL list but no response yet. If anyone
knows a clever work around, please tell me (:

Stig

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




[PHP-DEV] Re: PHP 4.0 Bug #9281 Updated: Using a dll

2001-02-15 Thread Dario Carnelutti


this is a custom object.
The problem i have is i programmed a web site in Jscript that uses this
dll, then i'm trying to program this site in PHP and i don't know why i
have this errors. Can you help me, maybe exists a function to retrieve
all the object properties or methods??
Thanks
Dario Carnelutti
Bug Database wrote:
ID: 9281
Updated by: phanto
Reported By: [EMAIL PROTECTED]
Status: Open
Bug Type: COM related
Assigned To:
Comments:
what kind of object is Cat ?
if it is another IDispatch interface all should work fine.
if it is a custom object php doesn't know the object structure, so how
should it determine the address to call when you do your method calls.
harald.
Previous Comments:
---
[2001-02-15 10:29:59] [EMAIL PROTECTED]
Hello, i'm using a dll that have this structure
 Class(Process)
   Object(CAT)
 void(Filter)
i'm doing this
$pro=new COM("ENGINE.Process");
 it works, and when i print the properties it is ok too, but when
i do this
$pro->Cat.Filter(XX);
it gives me a error that says that the memory cant be "read" ?
i dont know why?!
i tried this too
$pro->Cat->Filter(XXX);
and this
$cat=$pro->Cat // to catch the object returned but it falis too..
What can i do, many thanks
---
ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=9281&edit=2



[PHP-DEV] BUG in sscanf - was -Re: [PHP-NOTES] note 11314 added to sscanf

2001-02-15 Thread Jesus M. Castagnetto

Lo mejor es que submitas este problema en
bugs.php.net, de otro modo los del equipo del
PHP-DEVEL no veran este problema. Estoy haciendo un
CC, pero submitelo de todas maneras.

[PHP-DEV team:]
This is a repeatable bug, tried the code included in
the msg below w/ the results mentioned. I am using PHP
4.0.4pl1

--- [EMAIL PROTECTED] wrote:
> Hay un error en la funcion sscanf ya que no realiza
> la lectura de datos segun el formato especificado.
> Por ejemplo, consideremos el siguiente codigo:
> 
>// este script es una prueba del scanf
>   $str="hola;esto;es;una;prueba";
>   $a="";
>   $b="";
>   $c="";
>   $d="";
>   $e="";
>   sscanf($str,"%s;%s;%s;%s;%s",&$a,&$b,&$c,&$d,&$e);
>   echo $a.$b.$c.$d.$e;
> ?>
> 
> La salida seria la siguiente:
> 
> hola;esto;es;una;prueba
> 
> Por el contrario si usamos el siguiente
> formato:
> 
>// este script es una prueba del scanf
>   $str="hola ; esto ; es ; una ; prueba";
>   $a="";
>   $b="";
>   $c="";
>   $d="";
>   $e="";
>   sscanf($str,"%s ; %s ; %s ; %s ;
> %s",&$a,&$b,&$c,&$d,&$e);
>   echo $a.$b.$c.$d.$e;
> ?>
> 
> la salida es correcta:
> 
> holaestoesunaprueba
> 
> Se ve que la funcion sólo respeta
> el formato si las zonas donde se
> indica que comienza una variable 
> (en el codigo %(tipo_de_variable))
> esta aislada, es decir, separada
> con espacios del resto de los
> caracteres del formato.
> 
> Saludos desde cordoba
> 
>  http://www.php.net/manual/en/function.sscanf.php 
> 
> 
> -- 
> PHP Notes 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]
> 


=
--- Jesus M. Castagnetto <[EMAIL PROTECTED]>

__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/

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




[PHP-DEV] PHP 4.0 Bug #9277 Updated: Bogus warning with rand(a,b) where a == b

2001-02-15 Thread derick

ID: 9277
Updated by: derick
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Closed
Bug Type: Math related
Assigned To: 
Comments:

It's not a bug, it's clear that this was supposed not to work. And if you try rand 
(1,1) it wont work either.
Another thing; I don't see why this would be usefull.

Previous Comments:
---

[2001-02-15 07:43:35] [EMAIL PROTECTED]
$value=rand(0,0);

Gives "Warning: rand(): Invalid range: 0..0 in ..." while there is nothing wrong with 
it. Value shouldn't be invalid.

I'm expecting a value of 0 with probability of 100% without any warnings or is this a 
feature?

---



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


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




[PHP-DEV] PHP 4.0 Bug #9285: Compile fails on scanf.h

2001-02-15 Thread twinders

From: [EMAIL PROTECTED]
Operating system: Compaq Tru64 5.1
PHP version:  4.0.4pl1
PHP Bug Type: Compile Failure
Bug description:  Compile fails on scanf.h

During an installation with Compaq Tru64 5.1 with a standard ./confiugre and using 
Compaq's cc compiler, the make dies with this error:

cc: Error: scanf.h, line 48: There is no definition for the inline function
named scan_set_error_return in this compilation unit. (noinlfunc)
inline void scan_set_error_return(int numVars,pval **return_value);
^

This error also occurs with the current 4.0.5-dev CVS version.

Tru64 5.1 has cc version 6.3.  This error does not occur with the Compaq cc comiler 
version 6.1.


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



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




[PHP-DEV] PHP 4.0 Bug #9132 Updated: 4.0.3pl1 takes too much memory (about 36 megs VSZ).

2001-02-15 Thread sniper

ID: 9132
Updated by: sniper
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Feedback
Bug Type: Performance problem
Assigned To: 
Comments:

Have you tried PHP 4.0.4pl1 (or preferrably the latest CVS snapshot from 
http://snaps.php.net/) to check if this is 'fixed' in them?

Does this happen with some specific script ?

--Jani


Previous Comments:
---

[2001-02-06 12:30:39] [EMAIL PROTECTED]
(And it does the same on debian-woody.)

ii  php4 4.0b3-6

  VSZ  RSS

 3632 1648

ii  php4 4.0.3pl1-0potato

36632 1964

---



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


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




[PHP-DEV] PHP 4.0 Bug #9184 Updated: compile failure w/ apache/ snmp

2001-02-15 Thread sniper

ID: 9184
Updated by: sniper
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Feedback
Bug Type: Apache related
Assigned To: 
Comments:

Your snmp lib is compiled with SSL support so try adding
--with-openssl=/path/to/openssl

into your configure line (assuming you have openssl libraries installed
in your system already)

Another reason for this to happen is that your header files for ucd-snmp
don't match the installed library.

Also, remember to do 'rm config.cache' before reconfiguring PHP
and do 'make clean ; make depend; make ; make install' after configure.

--Jani


Previous Comments:
---

[2001-02-08 22:31:56] [EMAIL PROTECTED]
php config:

./configure --with-mysql --with-apache=../apache_1.3.14 --with-imap=../imap-2000a 
--enable-track-vars --with-snmp --with-ucd-snmp-hack

php compiles and installs but i get the following attempting to compile apache:

./configure --prefix=/home/www --activate-module=src/modules/php4/libphp4.a
Configuring for Apache, Version 1.3.14
 + using installation path layout: Apache (config.layout)
 + activated php4 module (modules/php4/libphp4.a)
Creating Makefile
Creating Configuration.apaci in src
Creating Makefile in src
 + configured for FreeBSD 4.2 platform
 + setting C compiler to gcc
 + setting C pre-processor to gcc -E
 + checking for system header files
 + adding selected modules
o php4_module uses ConfigStart/End
 + checking sizeof various data types
 + doing sanity check on compiler and options
** A test compilation with your Makefile configuration
** failed.  The below error output from the compilation
** test will give you an idea what is failing. Note that
** Apache requires an ANSI C Compiler, such as gcc.

cd ..; gcc  -funsigned-char -I/usr/home/software/php-4.0.4pl1 
-I/usr/home/software/php-4.0.4pl1/main -I/usr/home/software/php-4.0.4pl1/main 
-I/usr/home/software/php-4.0.4pl1/Zend -I/usr/home/software/php-4.0.4pl1/Zend 
-I/usr/home/software/php-4.0.4pl1/TSRM -I/usr/home/software/php-4.0.4pl1/TSRM 
-I/usr/home/software/php-4.0.4pl1 -DUSE_EXPAT -I./lib/expat-lite -DNO_DL_NEEDED 
`./apaci` -o helpers/dummy helpers/dummy.c   
-R/usr/home/software/imap-2000a/c-client -R/usr/local/lib  -rdynamic 
-L/usr/home/software/imap-2000a/c-client -L/usr/local/lib -Lmodules/php4 
-L../modules/php4 -L../../modules/php4 -lmodphp4  -lpam -lc-client  -lsnmp -lm -lcrypt 
   -lcrypt
/usr/local/lib/libsnmp.so: undefined reference to `EVP_DigestInit'
/usr/local/lib/libsnmp.so: undefined reference to `EVP_DigestFinal'
/usr/local/lib/libsnmp.so: undefined reference to `EVP_md5'
/usr/local/lib/libsnmp.so: undefined reference to `HMAC'
/usr/local/lib/libsnmp.so: undefined reference to `EVP_sha1'
/usr/local/lib/libsnmp.so: undefined reference to `des_cbc_encrypt'
/usr/local/lib/libsnmp.so: undefined reference to `des_key_sched'
/usr/local/lib/libsnmp.so: undefined reference to `EVP_DigestUpdate'
/usr/local/lib/libsnmp.so: undefined reference to `RAND_bytes'
/usr/local/lib/libsnmp.so: undefined reference to `des_ncbc_encrypt'
*** Error code 1

Stop in /usr/home/software/apache_1.3.14/src/helpers.
 Error Output for sanity check 
= End of Error Report =

 Aborting!


---



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


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




[PHP-DEV] PHP 4.0 Bug #9263 Updated: COM returns bad characters

2001-02-15 Thread phanto

ID: 9263
Updated by: phanto
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Closed
Bug Type: COM related
Assigned To: 
Comments:

this has already be fixed in cvs, i thought it would be in 4.0.4pl1 too.

the conversion functions moved to conversion.c in the ext/com/ dir and dotnet uses 
them too, so they are not duplicate anymore.

i think adding an additional parameter for the codepage would be a good idea, i'll put 
it on my todo list.

harald.

Previous Comments:
---

[2001-02-15 08:31:52] [EMAIL PROTECTED]
I'm sorry, I forget break off string.
Right code:

static OLECHAR *php_char_to_OLECHAR(char *C_str, uint strlen)
{
OLECHAR *unicode_str = (OLECHAR *) emalloc(sizeof(OLECHAR)*(strlen+1));
/* OLECHAR *unicode_ptr = unicode_str; */
/*
while (*C_str) {
*unicode_ptr++ = (unsigned short) *C_str++;
}
*unicode_ptr = 0;
*/
//-- CORRECTED CONVERSION CODE
MultiByteToWideChar( CP_ACP, 0, C_str, strlen, unicode_str, strlen+1 );
unicode_str[strlen] = 0;
//-- CORRECTED CONVERSION CODE

return unicode_str;
}


char *php_OLECHAR_to_char(OLECHAR *unicode_str, uint *out_length, int persistent)
{
uint length = OLESTRLEN(unicode_str);
char *C_str = (char *) pemalloc(length+1, persistent)/*, *p = C_str*/;
/*
while (*unicode_str) {
*p++ = (char) *unicode_str++;
}
*p = 0;
*/
//-- CORRECTED CONVERSION CODE
WideCharToMultiByte( CP_ACP, 0, unicode_str, length, C_str, length+1, NULL, 
NULL );
C_str[length] = 0;
//-- CORRECTED CONVERSION CODE

if (out_length) {
*out_length = length;
}

return C_str;
}


---

[2001-02-15 07:51:14] [EMAIL PROTECTED]
Ok people.
I correct your COM code. Unicode isn't add zero to ASCII code.
MultiByteToWideChar and WideCharToMultiByte functions:
first parameter is code page - this must be adjustable value. Add parameter to
$com = new COM ( "class.interface", "remotecomputer", CODEPAGE DEAFULT CP_ACP )
See to MSDN for last two NULL parameter in WideCharToMultiByte - not specifed code 
page and for second parameter flag...

CP_ACP - ANSI code page 
CP_MACCP - Macintosh code page 
CP_OEMCP - OEM code page 
CP_SYMBOL - Windows 2000: Symbol code page (42) 
CP_THREAD_ACP - Windows 2000: Current thread's ANSI code page 
CP_UTF7 - Windows NT 4.0 and Windows 2000: Translate using UTF-7 
CP_UTF8 - Windows NT 4.0 and Windows 2000: Translate using UTF-8. When this is set, 
dwFlags must be zero. 



//--
COM.cpp
//--
static OLECHAR *php_char_to_OLECHAR(char *C_str, uint strlen)
{
OLECHAR *unicode_str = (OLECHAR *) emalloc(sizeof(OLECHAR)*(strlen+1));
/* OLECHAR *unicode_ptr = unicode_str; */
/*
while (*C_str) {
*unicode_ptr++ = (unsigned short) *C_str++;
}
*unicode_ptr = 0;
*/
MultiByteToWideChar( CP_ACP, 0, C_str, strlen, unicode_str, strlen+1 );

return unicode_str;
}
//--
char *php_OLECHAR_to_char(OLECHAR *unicode_str, uint *out_length, int persistent)
{
uint length = OLESTRLEN(unicode_str);
char *C_str = (char *) pemalloc(length+1, persistent)/*, *p = C_str*/;
/*
while (*unicode_str) {
*p++ = (char) *unicode_str++;
}
*p = 0;
*/
//-- CORRECTED CONVERSION CODE
WideCharToMultiByte( CP_ACP, 0, unicode_str, length, C_str, length+1, NULL, 
NULL );
//-- CORRECTED CONVERSION CODE

if (out_length) {
*out_length = length;
}

return C_str;

}
//--


Ave, GeniuZ

Note: php_char_to_OLECHAR function is placed in php_dotnet.dll too


---

[2001-02-15 03:37:56] [EMAIL PROTECTED]
Note: I use Czech language. I think there is missing choosing charset for COM for 
converting from unicode...


---

[2001-02-14 10:42:28] [EMAIL PROTECTED]
My COM returns characters from 1 to 255 (ASCII) converted to unicode ofcourse (VC++ 
macro A2OLE).
Calling COM from VC++ returns characters 1 to 255.
Calling COM from PHP returns characters 1 to 127 and next characters are different.

[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 o

[PHP-DEV] PHP 4.0 Bug #9284: odbc_execute , SQL state 07001 in SQLExecute

2001-02-15 Thread moisey . g . oysgelt

From: [EMAIL PROTECTED]
Operating system: Windows NT 4 SP 5
PHP version:  4.0.2
PHP Bug Type: ODBC related
Bug description:   odbc_execute , SQL state 07001 in SQLExecute

I tried to use this function with Microsoft Access Driver

 $values = array( $ApplicantId ,$AnsQuestionId[$i],$Answer[$i]);
$query = "INSERT INTO Responses ([PersonId], [QuestionId], [Response], [Date]) ";
$query .= "VALUES(?,?,?," . strftime("#%Y-%m-%d#") .") ";
$result = odbc_prepare($connection, $query);
odbc_execute($result, $values );
 and got error 
Warning: SQL error: [Microsoft][ODBC Microsoft Access Driver]COUNT field incorrect , 
SQL state 07001 in SQLExecute in D:/Xitami/webpages/moveit/index.php on line 46
 I've checked without  parameter. The statement worked fine.



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



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




[PHP-DEV] PHP 4.0 Bug #9281 Updated: Using a dll

2001-02-15 Thread phanto

ID: 9281
Updated by: phanto
Reported By: [EMAIL PROTECTED]
Status: Open
Bug Type: COM related
Assigned To: 
Comments:

what kind of object is Cat ?

if it is another IDispatch interface all should work fine.

if it is a custom object php doesn't know the object structure, so how should it 
determine the address to call when you do your method calls.

harald.

Previous Comments:
---

[2001-02-15 10:29:59] [EMAIL PROTECTED]
Hello, i'm using a dll that have this structure
 Class(Process)
   Object(CAT)
 void(Filter)

i'm doing this
$pro=new COM("ENGINE.Process");
 it works, and when i print the properties it is ok too, but when i do this

$pro->Cat.Filter(XX);
it gives me a error that says that the memory cant be "read" ? i dont know why?!

i tried this too
$pro->Cat->Filter(XXX);

and this
$cat=$pro->Cat // to catch the object returned but it falis too..

What can i do, many thanks


---



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


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




[PHP-DEV] PHP 4.0 Bug #9283: Serialized data gets corrupted in DBM

2001-02-15 Thread sam

From: [EMAIL PROTECTED]
Operating system: Windows 98
PHP version:  4.0.4pl1
PHP Bug Type: filePro related
Bug description:  Serialized data gets corrupted in DBM

I created a set of programs for maintaining userid and password information using the 
DBM functions. (dbmopen, dbminsert, etc).. I keep userid, password, effective date, 
expiry dates, etc... Hence I need to keep more than just name & password pairs... I 
use the userid as the name and the value is a serialized variable containing an 
associative array of the remaining fields... 

My PHP programs to add and display the user records works - unfortunately it works 
intermittently... Some time all records are written correctly and are displayed 
correctly.. but sometime several are written but when are displayed, the details of 
the serialized data are missing.. it seems to be corrupted...

I attach some code for the dbminsert and dbmfetch here...

Notes: $user is an associative array containing the password, start dates, etc.

function addUser( $dbName, &$dbStatus,  $userid, $user ) {
  $dbh = dbmopen( "$dbName", "w" )
 or die("Couldn't open $dbName database");
  $serial_user = serialize( $user );
  print "serial_user is equal to  $serial_user ";
  $dbStatus = dbminsert( $dbh, "$userid", "$serial_user" );
  dbmclose( $dbh );
  }

function getUser( $dbName, &$dbStatus, $userid ) {
  $dbh = dbmopen( "$dbName", "r" )  // --- read db 
 or die("Couldn't open $dbName database");
  if ( dbmexists( $dbh, $userid ) )
{
$serial_user = dbmfetch( $dbh, $userid );
print "serial_user is equal to  $serial_user ";
$user = unserialize( $serial_user );
}
  else
{ $dbStatus = -1; }
  dbmclose( $dbh );
  return $user;
  }

I looked at the dbm file itself using a text editor and all the data are present, even 
for those records that shows blanks for the details.

I opened 2 Internet Explorer windows side by side and ran the insert program on one 
and the display on the other. I displayed the serialized value (i.e. $serial_user) on 
both windows...

In the add window, the serialized data always looks like this:
a:5:{s:4:"name;s:1:"a";s:3:"pwd ETC ETC...

In the display window, the serialized data also looked as above when the data is 
displayed correctly... 

However, when the data is 'missing' the serialized data looks like this
:5:{s:4:"name;s:1:"a";s:3:"pwd ETC ETC...
(i.e. the 'a' is missing).

(you can see my debugging print statements in the code that I attached above).

I am running PHP on Apache Web Server (1.3.14) for Windows. Both the browser client 
and the Apache server are running on the same PC.

Thanks in advance for your help!





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



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




[PHP-DEV] PHP 4.0 Bug #9262 Updated: Inconsistency in the implementation of here-docs

2001-02-15 Thread andre

ID: 9262
Updated by: andre
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Analyzed
Old-Bug Type: Strings related
Bug Type: Feature/Change Request
Assigned To: 
Comments:

we only allow very simple assigments with var,
here docs is similar to '' and "" maybe we should allow this
too?

moving to feature/requests

Previous Comments:
---

[2001-02-14 10:09:49] [EMAIL PROTECTED]
Parse error: parse error in units.inc on line 11
When I try to instantiate this class I get the above error.
The same query strings work fine when I use them in a procedural context

$result = mysql_query($this->$sqlQueryByLocation1,$this->$db);
   }

   //Get revenue by location address2
   function 
rev_by_location2($day_start,$month_start,$year_start,$day_end,$month_end,$year_end)
   {

   $this->$result = mysql_query($sqlQuery,$this->$db);
   }
   //Get revenue by location address3
   function 
rev_by_location3($day_start,$month_start,$year_start,$day_end,$month_end,$year_end)
   {

   $this->$result = mysql_query($sqlQuery,$this->$db);
   }
   //Get revenue by location address4
   function 
rev_by_location4($day_start,$month_start,$year_start,$day_end,$month_end,$year_end)
   {

   $this->$result = mysql_query($sqlQuery,$this->$db);
   }







   //Get revenue by present for all units
   function rev_to_present()
   {
   $this->$result = mysql_query($sqlQuery,$this->$db);
   }
   //
   function last_opened($spreadsheet)
   {
   $this->$result = mysql_query($sqlQuery,$this->$db);
   }
   function rev_two_dates($spreadsheet)
   {
   $this->$result = mysql_query($sqlQuery,$this->$db);
   }

   function display()
   {

   }*/

}
?>


---



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


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




[PHP-DEV] PHP 4.0 Bug #9177 Updated: crypt problems with openssl

2001-02-15 Thread sniper

ID: 9177
Updated by: sniper
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Feedback
Bug Type: *Install and Config
Assigned To: 
Comments:

IIRC this is fixed already in CVS so please try the latest CVS snapshot 
from http://snaps.php.net/

--Jani


Previous Comments:
---

[2001-02-08 14:39:57] [EMAIL PROTECTED]
MD5 crypt fails if PHP is compiled with openssl (specifically with the -lcrypto)

If the .c file comes before the libraries, gcc won't recognize MD5 crypt:

- blah.c -
root# cat blah.c 
#include 

main() {
char salt[15], answer[40];

salt[0]='$'; salt[1]='1'; salt[2]='$'; 
salt[3]='r'; salt[4]='a'; salt[5]='s';
salt[6]='m'; salt[7]='u'; salt[8]='s';
salt[9]='l'; salt[10]='e'; salt[11]='$';
salt[12]='

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




[PHP-DEV] PHP 4.0 Bug #9181 Updated: curl_setopt options causes seg faults

2001-02-15 Thread sniper

ID: 9181
Updated by: sniper
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Assigned
Bug Type: Reproduceable crash
Assigned To: sterling
Comments:

At least the typo is fixed in CVS. Could you please try the latest CVS snapshot
from http://snaps.php.net/  to see  which problems still are valid?

I assign this to Sterling who promised to fix the possible bugs in a 2 to 3 weeks.

--Jani


Previous Comments:
---

[2001-02-08 15:35:50] [EMAIL PROTECTED]
curl_setopt with the options CURLOPT_HTTPHEADER, CURLOPT_QUOTE, and CURLOPT_POSTQUOTE 
used with a scalar value cause php to seg fault.  In curl.c:149, there is a typo where 
the constant name CURLOPT_HTTPHEADER is assigned to CURLOPT_HTTP.  Also, in several 
places, the code for the function if_curl_setopt assumes that curl_value is an 
aggregate type, when it may be a single string.  (Notably in the case statements for 
CURLOPT_HTTPHEADER,CURLOPT_POSTQUOTE, and CURLOPT_QUOTE. )  Lastly, in some places 
where a curl_slist is being built, memory is allocated for the first node when it 
should not be.  (Memory is allocated inside of curl_slist_append).
If you write a script that uses the CURLOPT_HTTPHEADER, or the others, you can easily 
reproduce this.

---



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


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




[PHP-DEV] CVS Account Request

2001-02-15 Thread CVS Account Request

Full name: Dmitri Dmitrienko
Email: [EMAIL PROTECTED]
ID: dmdmitry
Purpose: DBG debugger ZEND extension

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




[PHP-DEV] Re: [PHP-QA] Re: [PHP-DEV] PHP 4.0 Bug #9266 Updated: Unable to load 14 of php's extensions

2001-02-15 Thread Zak Greant

Hartmut Holzgraefe wrote:

> Zak Greant wrote:
> > Hartmut Holzgraefe wrote:
> > >  request for a new bug categorie: misleading error message
> > Are there enough of these to warrant a category?
>
> I think this a question of quality, not quantity.

I am just saying that if we have 4 or 5 bug reports on this, then maybe we
should not add a bug category... :)

--zak



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




[PHP-DEV] Can't built ext/gd from latest CVS on Win32

2001-02-15 Thread Sebastian Bergmann

gd.c
D:\Programme\MS Visual Studio\Projekte\php\php4\ext\gd\gd.c(85) : error
C2371: 'gdIOCtx' : Neudefinition; unterschiedliche Basistypen
D:\PROGRAMME\MS VISUAL
STUDIO\PROJEKTE\PHP\BUILD_PHP\INCLUDES\gd_io.h(18) : Siehe Deklaration von
'gdIOCtx'

-- 
 sebastian bergmann e-mail :  [EMAIL PROTECTED]
  homepage :  http://www.sebastian-bergmann.de
   make a gift : http://wishlist.sebastian-bergmann.de
 measure the usability of your web application -> http://phpOpenTracker.de


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




[PHP-DEV] PHP 4.0 Bug #9264 Updated: Using session_encode with user-level session storage functions causes a crash

2001-02-15 Thread lolo

ID: 9264
User Update by: [EMAIL PROTECTED]
Status: Open
Bug Type: Reproduceable crash
Description: Using session_encode with user-level session storage functions causes a 
crash

Oups, in the code before I omited to put the 'open session' function. Here it is:

function dbSessionOpen($savePath, $sessionName)
{
return true;
}


Previous Comments:
---

[2001-02-14 12:39:47] [EMAIL PROTECTED]
Hi!

Be indulgent for my poorly english level please...

To force session data to be saved when using a database based session storage system 
and 'register_globals' is set to off I've build this (very) simplified structure of 
script:

function dbSessionClose()
{
return true;
}

function dbSessionRead($id)
{
return true;
}

function dbSessionWrite($id, $data)
{
return true;
}

function dbSessionDestroy($id)
{
return true;
}

function dbSessionGarbageCollector($sessionLifeTime)
{
return true;
}

function dbSessionSave()
{
return dbSessionWrite(session_id(), session_encode());  // The note below is about 
this line
}

session_set_save_handler('dbSessionOpen', 'dbSessionClose', 'dbSessionRead', 
'dbSessionWrite', 'dbSessionDestroy', 'dbSessionGarbageCollector');


/**
 * Uses session
 */
session_start();
session_register('myVar');

$myVar = 'crash';

dbSessionSave();


Then each time I run it with the latest PHP 4.0.5dev loaded as an apache module, PHP 
crash and produces this error:

APACHE a causé une défaillance de page dans
 le module PHP4TS.DLL à 016f:008a533e.
Registres :
EAX= CS=016f EIP=008a533e EFLGS=00010246
EBX= SS=0177 ESP=01e2f274 EBP=007f7df0
ECX=007ee7a0 DS=0177 ESI=007ee164 FS=2217
EDX=007ee130 ES=0177 EDI=007f7c46 GS=
Octets à CS : EIP :
8b 00 8b 4c 24 0c 8b 54 24 08 51 8b 4c 24 08 42 
État de la pile :
008a57b4 007f7c40 0005 01e2f2a4 007ee7a0 007ee130 007dd720 0001  
007dd720 007f7b10 007f7c40   007ee7a0 007dd720


An amazing note: if...
- ... at the first run I replace the call to the session_encode() function by the 
string 'crash', fire the script...
- ... then resume to the original 'dbSessionSave()' function and run the script 
again...
... everything go right!

---


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


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




[PHP-DEV] PHP 4.0 Bug #9282 Updated: printint chr(0x0a) in a file generate 0x0d 0x0a

2001-02-15 Thread hholzgra

ID: 9282
Updated by: hholzgra
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Closed
Bug Type: Unknown/Other Function
Assigned To: 
Comments:

this is how windows (aka MS-DOS) works,
to write transparent binary to a file you have to 
open it with mode "wb" instead of "w"
(unix will accept the 'b' too although it has no effect there)

Previous Comments:
---

[2001-02-15 10:36:48] [EMAIL PROTECTED]
look at the following code :



the output on screen is 1(strlen($s)) but in my file, i get always 0x0d 0x0a.
With Unix, i get only 0x0a in my file.

---



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


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




[PHP-DEV] PHP 4.0 Bug #9282: printint chr(0x0a) in a file generate 0x0d 0x0a

2001-02-15 Thread Olivier . Ziller

From: [EMAIL PROTECTED]
Operating system: Win32
PHP version:  4.0.4pl1
PHP Bug Type: Unknown/Other Function
Bug description:  printint chr(0x0a) in a file generate 0x0d 0x0a

look at the following code :



the output on screen is 1(strlen($s)) but in my file, i get always 0x0d 0x0a.
With Unix, i get only 0x0a in my file.


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



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




[PHP-DEV] PHP 4.0 Bug #9281: Using a dll

2001-02-15 Thread dcsnfh

From: [EMAIL PROTECTED]
Operating system: Win nt 4.0  SP4
PHP version:  4.0.4pl1
PHP Bug Type: COM related
Bug description:  Using a dll

Hello, i'm using a dll that have this structure
 Class(Process)
   Object(CAT)
 void(Filter)

i'm doing this
$pro=new COM("ENGINE.Process");
 it works, and when i print the properties it is ok too, but when i do this

$pro->Cat.Filter(XX);
it gives me a error that says that the memory cant be "read" ? i dont know why?!

i tried this too
$pro->Cat->Filter(XXX);

and this
$cat=$pro->Cat // to catch the object returned but it falis too..

What can i do, many thanks



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



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




[PHP-DEV] PHP 4.0 Bug #9275 Updated: can't compile pdflib in php4.0.3pl1

2001-02-15 Thread support

ID: 9275
User Update by: [EMAIL PROTECTED]
Status: Open
Bug Type: Compile Problem
Description: can't compile pdflib in php4.0.3pl1

same problem..

even compiling pdflib with --prefix=/usr/local/pdflib-3.0.3 and configuring php with 
--with-pdflib=/usr&local/pdflib-3.0.3 results in the same error...

i am kinda lost with this

Previous Comments:
---

[2001-02-15 09:30:51] [EMAIL PROTECTED]
Could you try to configure PDFlib with --enable-shared-pdflib
If the configure finds tiff,png and zlib support, all is fine, else you might use 
--with-zlib=/usr/local ... in addition.

for configuring php --with-pdflib=/usr/local should be enough.
--with-zlib-dir --with-tiff-dir is normaly not neccesary.



---

[2001-02-15 07:44:48] [EMAIL PROTECTED]
Hi, 
some more information:

i've compiled libpng and tiff
loks fine

after that i've compiled and installed pdflib with:

./configure --with-tifflib=/usr/local  
--with-zlib=/usr/local 
--with-pnglib=/usr/local

make
make test
make install

everything looks fine, no errors were reported.

then i try to configure php with:

./configure --with-apache=../apache_1.3.14 
--with-mysql=/usr/local/mysql 
--with-dbase 
--enable-memory-limit=yes 
--enable-track-vars 
--enable-debug=no 
--with-gd 
--with-zlib-dir 
--with-tiff-dir 
--with-pdflib=/usr/local

and it results in the described error

problem persists with the latest snapshot


---

[2001-02-15 07:44:34] [EMAIL PROTECTED]
Hi, 
some more information:

i've compiled libpng and tiff
loks fine

after that i've compiled and installed pdflib with:

./configure --with-tifflib=/usr/local  
--with-zlib=/usr/local 
--with-pnglib=/usr/local

make
make test
make install

everything looks fine, no errors were reported.

then i try to configure php with:

./configure --with-apache=../apache_1.3.14 
--with-mysql=/usr/local/mysql 
--with-dbase 
--enable-memory-limit=yes 
--enable-track-vars 
--enable-debug=no 
--with-gd 
--with-zlib-dir 
--with-tiff-dir 
--with-pdflib=/usr/local

and it results in the described error

problem persists with the latest snapshot


---

[2001-02-15 07:36:42] [EMAIL PROTECTED]
Hi, 
some more information:

i've compiled libpng and tiff
loks fine

after that i've compiled and installed pdflib with:

./configure --with-tifflib=/usr/local  
--with-zlib=/usr/local 
--with-pnglib=/usr/local

make
make test
make install

everything looks fine, no errors were reported.

then i try to configure php with:

./configure --with-apache=../apache_1.3.14 
--with-mysql=/usr/local/mysql 
--with-dbase 
--enable-memory-limit=yes 
--enable-track-vars 
--enable-debug=no 
--with-gd 
--with-zlib-dir 
--with-tiff-dir 
--with-pdflib=/usr/local

and it results in the described error

problem persists with the latest snapshot


---

[2001-02-15 07:01:33] [EMAIL PROTECTED]
Can you check if this problem persists with the latest snapshot from snaps.php.net?

---

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=9275


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




[PHP-DEV] PHP 4.0 Bug #8807 Updated: readfile ignores output buffering setting

2001-02-15 Thread thies

ID: 8807
Updated by: thies
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Closed
Bug Type: Output Control
Assigned To: 
Comments:

fixed in CVS

Previous Comments:
---

[2001-01-19 12:11:09] [EMAIL PROTECTED]
ob_start();
readfile('foo');
header('X-Test: sdfsdfsd');
ob_end_flush();


---



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


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

2001-02-15 Thread Shaun Batterton

I am also looking into pooling options for the same
reasons.  Since we also will be using it for content management, we have 
a caching mechanism in place.  One of the options we thought of using was
having an second apache instance running that accepts all of the dynamic
requests and only has one process.  So the 75-100 processes would be
serving cached pages, but when a cache hit occured, it would pass it off
to the other apache instance running only one process.  

We probably won't do this, but it seems to be a viable option.  We are
looking into pooling applications as alternatives.

Shaun

On Fri, 9 Feb 2001, John Donagher wrote:

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


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




[PHP-DEV] PHP 4.0 Bug #9275 Updated: can't compile pdflib in php4.0.3pl1

2001-02-15 Thread rjs

ID: 9275
Updated by: rjs
Reported By: [EMAIL PROTECTED]
Status: Open
Bug Type: Compile Problem
Assigned To: 
Comments:

Could you try to configure PDFlib with --enable-shared-pdflib
If the configure finds tiff,png and zlib support, all is fine, else you might use 
--with-zlib=/usr/local ... in addition.

for configuring php --with-pdflib=/usr/local should be enough.
--with-zlib-dir --with-tiff-dir is normaly not neccesary.



Previous Comments:
---

[2001-02-15 07:44:48] [EMAIL PROTECTED]
Hi, 
some more information:

i've compiled libpng and tiff
loks fine

after that i've compiled and installed pdflib with:

./configure --with-tifflib=/usr/local  
--with-zlib=/usr/local 
--with-pnglib=/usr/local

make
make test
make install

everything looks fine, no errors were reported.

then i try to configure php with:

./configure --with-apache=../apache_1.3.14 
--with-mysql=/usr/local/mysql 
--with-dbase 
--enable-memory-limit=yes 
--enable-track-vars 
--enable-debug=no 
--with-gd 
--with-zlib-dir 
--with-tiff-dir 
--with-pdflib=/usr/local

and it results in the described error

problem persists with the latest snapshot


---

[2001-02-15 07:44:34] [EMAIL PROTECTED]
Hi, 
some more information:

i've compiled libpng and tiff
loks fine

after that i've compiled and installed pdflib with:

./configure --with-tifflib=/usr/local  
--with-zlib=/usr/local 
--with-pnglib=/usr/local

make
make test
make install

everything looks fine, no errors were reported.

then i try to configure php with:

./configure --with-apache=../apache_1.3.14 
--with-mysql=/usr/local/mysql 
--with-dbase 
--enable-memory-limit=yes 
--enable-track-vars 
--enable-debug=no 
--with-gd 
--with-zlib-dir 
--with-tiff-dir 
--with-pdflib=/usr/local

and it results in the described error

problem persists with the latest snapshot


---

[2001-02-15 07:36:42] [EMAIL PROTECTED]
Hi, 
some more information:

i've compiled libpng and tiff
loks fine

after that i've compiled and installed pdflib with:

./configure --with-tifflib=/usr/local  
--with-zlib=/usr/local 
--with-pnglib=/usr/local

make
make test
make install

everything looks fine, no errors were reported.

then i try to configure php with:

./configure --with-apache=../apache_1.3.14 
--with-mysql=/usr/local/mysql 
--with-dbase 
--enable-memory-limit=yes 
--enable-track-vars 
--enable-debug=no 
--with-gd 
--with-zlib-dir 
--with-tiff-dir 
--with-pdflib=/usr/local

and it results in the described error

problem persists with the latest snapshot


---

[2001-02-15 07:01:33] [EMAIL PROTECTED]
Can you check if this problem persists with the latest snapshot from snaps.php.net?

---

[2001-02-15 06:50:44] [EMAIL PROTECTED]
Hi,

problem:

can't compile pdflib-3.0.3 into php-4.0.3pl1

Configure reports the following:

checking whether to include Pdflib 3.x support... /usr/local
yes
checking for libz needed by pdflib 3.x... already zlib support
checking for jpeg_read_header in -ljpeg... yes
checking for png_create_info_struct in -lpng... yes
checking for TIFFOpen in -ltiff... yes
cd: can't cd to yes
checking for PDF_show_boxed in -lpdf... no
configure: error: pdflib extension requires pdflib 3.x.

any help??

---

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=9275&edit=2


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




[PHP-DEV] PHP 4.0 Bug #9280: HTTP/1.1 Expect: header not honoured

2001-02-15 Thread paulc

From: [EMAIL PROTECTED]
Operating system: Linux
PHP version:  4.0.4pl1
PHP Bug Type: Apache related
Bug description:  HTTP/1.1 Expect: header not honoured

When a PHP page is requested via HTTP/1.1, and the HTTP
header "Expect: 100-continue" is supplied, PHP does not
honour the request.  This is because it is failing
to call ap_should_client_block().

The file sapi/apache/mod_php4.c needs modification. The
following change has been tested and works. Hopefully
someone can make sense of this diff output:

--- sapi/apache/mod_php4.c   Wed Jan  3 22:07:59 2001
+++ sapi/apache_modified/mod_php4.c  Thu Feb 15 13:56:12 2001
@@ -159,14 +159,16 @@
void (*handler)(int);

handler = signal(SIGPIPE, SIG_IGN);
-   while (total_read_byteshttp://bugs.php.net/?id=9280&edit=1



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




[PHP-DEV] PHP 4.0 Bug #9279 Updated: Declarated fifth param apsent in mail.c

2001-02-15 Thread hholzgra

ID: 9279
Updated by: hholzgra
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Assigned
Old-Bug Type: Mail related
Bug Type: Documentation problem
Assigned To: 
Comments:

5th parameter was introduced after 4.0.4 release, documentation should mention that

Previous Comments:
---

[2001-02-15 08:55:15] [EMAIL PROTECTED]
Declarated fifth param ( )at http://www.php.net/manual/en/function.mail.php 
is apsent in mail.c from php-4.0.4pl1.tar.gz
;(

bool mail (string to, string subject, string message [, string additional_headers [, 
string additional_parameters]])

string additional_parameters - don't have any code in mail.c
And this example from http://www.php.net/manual/en/function.mail.php 
about using Return-path: dos'nt work!

Example 3. Sending mail with extra headers and setting an additional command line 
parameter.

mail("[EMAIL PROTECTED]", "the subject", $message,
 "From: webmaster@$SERVER_NAME", "-fwebmaster@$SERVERNAME");

such code give us error 
===
Warning: Wrong parameter count for mail() 
===
bcos, as i say, in mail.c don't present any code about 5'th param :(

--
Sorry for my bad english.
  
 


---



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


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




[PHP-DEV] PHP 4.0 Bug #9102 Updated: a possible bug in count_chars

2001-02-15 Thread thies

ID: 9102
Updated by: thies
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Closed
Bug Type: Strings related
Assigned To: 
Comments:

fixed in CVS

Previous Comments:
---

[2001-02-04 14:53:10] [EMAIL PROTECTED]
The following code stops at 254, whereas the documentation says count_chars ought to 
generate an array of 256 element.

var_dump($b) shows an array with 255 elements instead of 256.

$a = "a quick brown fox jumps over the lazy dog";
$b = count_chars($a, 0);
$m = 0;
foreach ($b as $n) {
 echo "Code $m was found $n times";
 $m++;
}


---



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


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




[PHP-DEV] PHP 4.0 Bug #9279: Declarated fifth param apsent in mail.c

2001-02-15 Thread serg

From: [EMAIL PROTECTED]
Operating system: Linux 
PHP version:  4.0.4pl1
PHP Bug Type: Mail related
Bug description:  Declarated fifth param apsent in mail.c

Declarated fifth param ( )at http://www.php.net/manual/en/function.mail.php 
is apsent in mail.c from php-4.0.4pl1.tar.gz
;(

bool mail (string to, string subject, string message [, string additional_headers [, 
string additional_parameters]])

string additional_parameters - don't have any code in mail.c
And this example from http://www.php.net/manual/en/function.mail.php 
about using Return-path: dos'nt work!

Example 3. Sending mail with extra headers and setting an additional command line 
parameter.

mail("[EMAIL PROTECTED]", "the subject", $message,
 "From: webmaster@$SERVER_NAME", "-fwebmaster@$SERVERNAME");

such code give us error 
===
Warning: Wrong parameter count for mail() 
===
bcos, as i say, in mail.c don't present any code about 5'th param :(

--
Sorry for my bad english.
  
 



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



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




[PHP-DEV] PHP 4.0 Bug #6146 Updated: xml_parse() passes character entities incorrectly

2001-02-15 Thread thies

ID: 6146
Updated by: thies
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Feedback
Bug Type: XML related
Assigned To: 
Comments:

what is wrong with the output?


Previous Comments:
---

[2000-08-14 07:45:20] [EMAIL PROTECTED]
Here are an example xml-file and php-script which demonstrates
this behaviour:
-



åäöÅÄÖ
åäöÅÄÖ


-

";
}

$xml_parser = xml_parser_create();
xml_set_character_data_handler($xml_parser, "characterData");

if (!($fp = fopen($file, "r"))) {
die("could not open XML input");
}

while ($data = fread($fp, 4096)) {

if (!xml_parse($xml_parser, $data, feof($fp))) {
die(sprintf("XML error: %s at line %d",
xml_error_string(xml_get_error_code($xml_parser)),
xml_get_current_line_number($xml_parser)));
}
}

?>

-

php configure line:

./configure 
--prefix=/data --with-config-file-path=/data/conf  
--with-mysql=/data/kolumbustori
--without-gd --disable-pear
--disable-debug

And the output with those files:
 
* *
* *
*åäöÅÄÖ*
* *
* *
*å*
*ä*
*ö*
*Å*
*Ä*
*Ö*
* *

--Jani

---



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


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




[PHP-DEV] PHP 4.0 Bug #6658 Updated: does not work on 4.02

2001-02-15 Thread thies

ID: 6658
Updated by: thies
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Closed
Bug Type: XML related
Assigned To: 
Comments:

try latest CVS. resubmit if the problem is still there!


Previous Comments:
---

[2000-09-11 14:31:30] [EMAIL PROTECTED]
I do not understand why the below script works on 4.01pl2 but does not work on 4.02, 
there are no php error message, but only the standart error "the page cannot be 
displayed"
I suspect i implement xml methods that does not being supported at 4.02
parser = xml_parser_create();
xml_set_object($this->parser,&$this);
$returntidak=xml_set_element_handler($this->parser,"tag_open","tag_close");
//echo $returntidak;
//xml_set_character_data_handler($this->parser,"cdata");
   
  }
  function parse($data){
 xml_parse($this->parser,$data);

  }
  
  function sethasil($hasil)
  {
$returntidak=$hasil;
  } 
  function gethasil()
  {
 echo $returntidak;
 return $returntidak;
  }  
  function parse($data) {
xml_parse($this->parser,$data);
  }   
  function tag_open($parser,$tag,$attributes){
$votetidak=0;
 while (list ($key, $val) = each ($attributes)) {

if (strcmp($tag,"TIDAKADA")==0)
   {
$votetidak=$val;
echo "".$val . " orang memilih Indonesia tidak bakal mendapatkan 
emas"; 
   }
if (strcmp($tag,"SATU")==0)
   {
$votesatu=$val;
echo "".$val . " orang memilih Indonesia bakal mendapatkan 1 emas"; 

   }   
if (strcmp($tag,"LEBIH")==0)
   {
$votelebih=$val;
echo "".$val . " orang memilih Indonesia bakal mendapatkan lebih 
dari 1 emas";
   }

  }
  
  }

  function cdata($parser,$cdata){
 //var_dump($parser,$cdata);
  }
  function tag_close ($parser,$tag){
 //var_dump($parser,$tag);
  }

}


function tag_open($parser,$tag,$attributes) {
var_dump($parser,$tag,$attributes);
}
function cdata($parser,$cdata) {
var_dump($parser,$cdata);
}

?>


---



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


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




[PHP-DEV] PHP 4.0 Bug #7186 Updated: class object variables get 'unset' when assigned within xml handlers

2001-02-15 Thread thies

ID: 7186
Updated by: thies
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Closed
Bug Type: XML related
Assigned To: 
Comments:

one bug has been fixed in regards to xml_set_object in CVS

you also need to say:
$o = &new __TestParser1();
instead of 
$o = new __TestParser1();

elsewise $this in the constructor won't be the same as vale of $o once new 
__TestParser1() has returned!
see:
http://viewcvs.php.net/viewcvs.cgi/php4/NEWS.diff?r1=1.532.2.2&r2=1.532.2.3




Previous Comments:
---

[2000-10-13 11:49:37] [EMAIL PROTECTED]
XML_Parser();
}
function startHandler($xp, $element, $attribs) {
}
function endHandler($xp, $element) {
}
function cdataHandler($xp, $cdata) {
  $this->data=$cdata;
}
function defaultHandler($xp, $cdata) {
 
}
}
$o = new __TestParser1();
$o->parseString("foo",
1);
echo $o->data;  // Should print 'foo', it does not print anything

?>

No php.ini used

EXTRA_LDFLAGS="-Wl,-s" 
CPPFLAGS=$CFLAGS 
./configure 
--with-regex=system 
--enable-shared 
--enable-track-vars 
--with-config-file-path=/usr/local/etc 
--with-mysql=/usr/local 
--enable-ftp 
--enable-xml 
--with-gd=no 
--with-db2=no 
--with-db3=no 
--with-zlib=no 


---



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


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




[PHP-DEV] PHP 4.0 Bug #9255 Updated: INSERT SQL command doesnt work

2001-02-15 Thread sniper

ID: 9255
Updated by: sniper
Reported By: [EMAIL PROTECTED]
Old-Status: Duplicate
Status: Bogus
Bug Type: ODBC related
Assigned To: 
Comments:



Previous Comments:
---

[2001-02-14 06:27:20] [EMAIL PROTECTED]
I§m using ODBC connection to Access (only for testing purposes, I§m not stupid :)).
SQL command¨SELECT work OK, but all updates doesnt work to me - last version I used 
was 4.0.1 and there it works perfectly.

---



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


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




[PHP-DEV] Bug #9278: mktime returns "valid" values (not -1) for dates like 2/31/2001, etc.

2001-02-15 Thread pnh102

From: [EMAIL PROTECTED]
Operating system: Mac OS X Server 1.2
PHP version:  3.0.16
PHP Bug Type: Misbehaving function
Bug description:  mktime returns "valid" values (not -1) for dates like 2/31/2001, etc.






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




[PHP-DEV] PHP 4.0 Bug #9263 Updated: COM returns bad characters

2001-02-15 Thread geniuz

ID: 9263
User Update by: [EMAIL PROTECTED]
Status: Open
Bug Type: COM related
Description: COM returns bad characters

I'm sorry, I forget break off string.
Right code:

static OLECHAR *php_char_to_OLECHAR(char *C_str, uint strlen)
{
OLECHAR *unicode_str = (OLECHAR *) emalloc(sizeof(OLECHAR)*(strlen+1));
/* OLECHAR *unicode_ptr = unicode_str; */
/*
while (*C_str) {
*unicode_ptr++ = (unsigned short) *C_str++;
}
*unicode_ptr = 0;
*/
//-- CORRECTED CONVERSION CODE
MultiByteToWideChar( CP_ACP, 0, C_str, strlen, unicode_str, strlen+1 );
unicode_str[strlen] = 0;
//-- CORRECTED CONVERSION CODE

return unicode_str;
}


char *php_OLECHAR_to_char(OLECHAR *unicode_str, uint *out_length, int persistent)
{
uint length = OLESTRLEN(unicode_str);
char *C_str = (char *) pemalloc(length+1, persistent)/*, *p = C_str*/;
/*
while (*unicode_str) {
*p++ = (char) *unicode_str++;
}
*p = 0;
*/
//-- CORRECTED CONVERSION CODE
WideCharToMultiByte( CP_ACP, 0, unicode_str, length, C_str, length+1, NULL, 
NULL );
C_str[length] = 0;
//-- CORRECTED CONVERSION CODE

if (out_length) {
*out_length = length;
}

return C_str;
}


Previous Comments:
---

[2001-02-15 07:51:14] [EMAIL PROTECTED]
Ok people.
I correct your COM code. Unicode isn't add zero to ASCII code.
MultiByteToWideChar and WideCharToMultiByte functions:
first parameter is code page - this must be adjustable value. Add parameter to
$com = new COM ( "class.interface", "remotecomputer", CODEPAGE DEAFULT CP_ACP )
See to MSDN for last two NULL parameter in WideCharToMultiByte - not specifed code 
page and for second parameter flag...

CP_ACP - ANSI code page 
CP_MACCP - Macintosh code page 
CP_OEMCP - OEM code page 
CP_SYMBOL - Windows 2000: Symbol code page (42) 
CP_THREAD_ACP - Windows 2000: Current thread's ANSI code page 
CP_UTF7 - Windows NT 4.0 and Windows 2000: Translate using UTF-7 
CP_UTF8 - Windows NT 4.0 and Windows 2000: Translate using UTF-8. When this is set, 
dwFlags must be zero. 



//--
COM.cpp
//--
static OLECHAR *php_char_to_OLECHAR(char *C_str, uint strlen)
{
OLECHAR *unicode_str = (OLECHAR *) emalloc(sizeof(OLECHAR)*(strlen+1));
/* OLECHAR *unicode_ptr = unicode_str; */
/*
while (*C_str) {
*unicode_ptr++ = (unsigned short) *C_str++;
}
*unicode_ptr = 0;
*/
MultiByteToWideChar( CP_ACP, 0, C_str, strlen, unicode_str, strlen+1 );

return unicode_str;
}
//--
char *php_OLECHAR_to_char(OLECHAR *unicode_str, uint *out_length, int persistent)
{
uint length = OLESTRLEN(unicode_str);
char *C_str = (char *) pemalloc(length+1, persistent)/*, *p = C_str*/;
/*
while (*unicode_str) {
*p++ = (char) *unicode_str++;
}
*p = 0;
*/
//-- CORRECTED CONVERSION CODE
WideCharToMultiByte( CP_ACP, 0, unicode_str, length, C_str, length+1, NULL, 
NULL );
//-- CORRECTED CONVERSION CODE

if (out_length) {
*out_length = length;
}

return C_str;

}
//--


Ave, GeniuZ

Note: php_char_to_OLECHAR function is placed in php_dotnet.dll too


---

[2001-02-15 03:37:56] [EMAIL PROTECTED]
Note: I use Czech language. I think there is missing choosing charset for COM for 
converting from unicode...


---

[2001-02-14 10:42:28] [EMAIL PROTECTED]
My COM returns characters from 1 to 255 (ASCII) converted to unicode ofcourse (VC++ 
macro A2OLE).
Calling COM from VC++ returns characters 1 to 255.
Calling COM from PHP returns characters 1 to 127 and next characters are different.

[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.
;
; Dir

[PHP-DEV] PHP 4.0 Bug #8435 Updated: trouble with xml_parse() function

2001-02-15 Thread thies

ID: 8435
Updated by: thies
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Closed
Bug Type: XML related
Assigned To: 
Comments:

fixed in 4.0.4pl1

Previous Comments:
---

[2000-12-27 07:58:26] [EMAIL PROTECTED]
I use PHP on Win98, installed with php-installer for CGI only. The server is Xitami.
The SAX parser for xml works fine with PHP 4.03p1, but a crash occurs with version 
4.0.4 on the first call to xml_parse(). Win98 complains with this message :
   PHP.EXE a provoqué l'erreur #c005 dans PHP4TS.DLL à l'adresse 0257 : 
1008e321

I encounter a similar problem on Linux (redhat 7.0 and apache 1.3.12).  Programs using 
xml_parse() work fine when apache uses module libphp4.so compiled from PHP 4.0.2 , but 
crash with libphp4.so compiled from PHP 4.0.4  

---



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


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




[PHP-DEV] PHP 4.0 Bug #8492 Updated: XML-functions segfault

2001-02-15 Thread thies

ID: 8492
Updated by: thies
Reported By: [EMAIL PROTECTED]
Old-Status: Feedback
Status: Closed
Bug Type: XML related
Assigned To: 
Comments:

fixed in cvs

Previous Comments:
---

[2001-01-02 18:36:03] [EMAIL PROTECTED]
I can not reproduce this crash with the latest CVS.
Please try the latest CVS snapshot from http://snaps.php.net/ 

--Jani

---

[2000-12-30 12:52:26] [EMAIL PROTECTED]
Hi!

I'm using PHP 4.0.4 on a SuSE Linux 7.0 (Kernel 2.2.16, Apache 1.3.12, expat 1.1 
release 113, libxml2-2.2.3)
I've confugired PHP with the options

--with-pgsql=/usr --with-mysql=yes --with-xml --with-dom --with-sablot 
--with-java=/usr/lib/java --with-bz2 --with-zlib --with-ttf --with-ftp 
--with-config-file-path=/etc/httpd --with-apxs=/usr/sbin/apxs 
--with-exec-dir=/usr/lib/apache/bin --enable-versioning --enable-yp --enable-trans-sid 
--enable-inline-optimization --enable-track-vars --enable-magic-quotes 
--enable-safe-mode --enable-sysvsem --enable-sysvshm --enable-memory-limit 
i386-suse-linux-gnu --enable-debug.

My php.ini is the php.ini-optimized with short-open-tags switched to Off.

Using the xml_* functions, I get a segfault with the following output by gdb:

Program recieved signal SIGSEV, Segmentation fault.
0x402d98bb in objects () at zend_execute_API.c:103
103 }

The minimal script with wich I could reproduce the error is like the following:

"  );
?>

If I take away any of the three xml_*-functions, everything works (well, generating an 
error message, if i take away xml_parser_create).

Good Luck! 


---



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


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




[PHP-DEV] PHP 4.0 Bug #9263 Updated: COM returns bad characters

2001-02-15 Thread geniuz

ID: 9263
User Update by: [EMAIL PROTECTED]
Status: Open
Bug Type: COM related
Description: COM returns bad characters

Ok people.
I correct your COM code. Unicode isn't add zero to ASCII code.
MultiByteToWideChar and WideCharToMultiByte functions:
first parameter is code page - this must be adjustable value. Add parameter to
$com = new COM ( "class.interface", "remotecomputer", CODEPAGE DEAFULT CP_ACP )
See to MSDN for last two NULL parameter in WideCharToMultiByte - not specifed code 
page and for second parameter flag...

CP_ACP - ANSI code page 
CP_MACCP - Macintosh code page 
CP_OEMCP - OEM code page 
CP_SYMBOL - Windows 2000: Symbol code page (42) 
CP_THREAD_ACP - Windows 2000: Current thread's ANSI code page 
CP_UTF7 - Windows NT 4.0 and Windows 2000: Translate using UTF-7 
CP_UTF8 - Windows NT 4.0 and Windows 2000: Translate using UTF-8. When this is set, 
dwFlags must be zero. 



//--
COM.cpp
//--
static OLECHAR *php_char_to_OLECHAR(char *C_str, uint strlen)
{
OLECHAR *unicode_str = (OLECHAR *) emalloc(sizeof(OLECHAR)*(strlen+1));
/* OLECHAR *unicode_ptr = unicode_str; */
/*
while (*C_str) {
*unicode_ptr++ = (unsigned short) *C_str++;
}
*unicode_ptr = 0;
*/
MultiByteToWideChar( CP_ACP, 0, C_str, strlen, unicode_str, strlen+1 );

return unicode_str;
}
//--
char *php_OLECHAR_to_char(OLECHAR *unicode_str, uint *out_length, int persistent)
{
uint length = OLESTRLEN(unicode_str);
char *C_str = (char *) pemalloc(length+1, persistent)/*, *p = C_str*/;
/*
while (*unicode_str) {
*p++ = (char) *unicode_str++;
}
*p = 0;
*/
//-- CORRECTED CONVERSION CODE
WideCharToMultiByte( CP_ACP, 0, unicode_str, length, C_str, length+1, NULL, 
NULL );
//-- CORRECTED CONVERSION CODE

if (out_length) {
*out_length = length;
}

return C_str;

}
//--


Ave, GeniuZ

Note: php_char_to_OLECHAR function is placed in php_dotnet.dll too


Previous Comments:
---

[2001-02-15 03:37:56] [EMAIL PROTECTED]
Note: I use Czech language. I think there is missing choosing charset for COM for 
converting from unicode...


---

[2001-02-14 10:42:28] [EMAIL PROTECTED]
My COM returns characters from 1 to 255 (ASCII) converted to unicode ofcourse (VC++ 
macro A2OLE).
Calling COM from VC++ returns characters 1 to 255.
Calling COM from PHP returns characters 1 to 127 and next characters are different.

[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 th

Re: [PHP-DEV] PHP 4.0 Bug #9276: ORA-00904

2001-02-15 Thread Thies C. Arntzen

On Thu, Feb 15, 2001 at 12:27:44PM -, [EMAIL PROTECTED] wrote:
> From: [EMAIL PROTECTED]
> Operating system: linux
> PHP version:  4.0.0
> PHP Bug Type: Oracle related
> Bug description:  ORA-00904

oerr ORA 00904:
invalid column name

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





[PHP-DEV] PHP 4.0 Bug #9275 Updated: can't compile pdflib in php4.0.3pl1

2001-02-15 Thread support

ID: 9275
User Update by: [EMAIL PROTECTED]
Status: Open
Bug Type: Compile Problem
Description: can't compile pdflib in php4.0.3pl1

Hi, 
some more information:

i've compiled libpng and tiff
loks fine

after that i've compiled and installed pdflib with:

./configure --with-tifflib=/usr/local  \
--with-zlib=/usr/local \
--with-pnglib=/usr/local

make
make test
make install

everything looks fine, no errors were reported.

then i try to configure php with:

./configure --with-apache=../apache_1.3.14 \
--with-mysql=/usr/local/mysql \
--with-dbase \
--enable-memory-limit=yes \
--enable-track-vars \
--enable-debug=no \
--with-gd \
--with-zlib-dir \
--with-tiff-dir \
--with-pdflib=/usr/local

and it results in the described error

problem persists with the latest snapshot


Previous Comments:
---

[2001-02-15 07:44:34] [EMAIL PROTECTED]
Hi, 
some more information:

i've compiled libpng and tiff
loks fine

after that i've compiled and installed pdflib with:

./configure --with-tifflib=/usr/local  
--with-zlib=/usr/local 
--with-pnglib=/usr/local

make
make test
make install

everything looks fine, no errors were reported.

then i try to configure php with:

./configure --with-apache=../apache_1.3.14 
--with-mysql=/usr/local/mysql 
--with-dbase 
--enable-memory-limit=yes 
--enable-track-vars 
--enable-debug=no 
--with-gd 
--with-zlib-dir 
--with-tiff-dir 
--with-pdflib=/usr/local

and it results in the described error

problem persists with the latest snapshot


---

[2001-02-15 07:36:42] [EMAIL PROTECTED]
Hi, 
some more information:

i've compiled libpng and tiff
loks fine

after that i've compiled and installed pdflib with:

./configure --with-tifflib=/usr/local  
--with-zlib=/usr/local 
--with-pnglib=/usr/local

make
make test
make install

everything looks fine, no errors were reported.

then i try to configure php with:

./configure --with-apache=../apache_1.3.14 
--with-mysql=/usr/local/mysql 
--with-dbase 
--enable-memory-limit=yes 
--enable-track-vars 
--enable-debug=no 
--with-gd 
--with-zlib-dir 
--with-tiff-dir 
--with-pdflib=/usr/local

and it results in the described error

problem persists with the latest snapshot


---

[2001-02-15 07:01:33] [EMAIL PROTECTED]
Can you check if this problem persists with the latest snapshot from snaps.php.net?

---

[2001-02-15 06:50:44] [EMAIL PROTECTED]
Hi,

problem:

can't compile pdflib-3.0.3 into php-4.0.3pl1

Configure reports the following:

checking whether to include Pdflib 3.x support... /usr/local
yes
checking for libz needed by pdflib 3.x... already zlib support
checking for jpeg_read_header in -ljpeg... yes
checking for png_create_info_struct in -lpng... yes
checking for TIFFOpen in -ltiff... yes
cd: can't cd to yes
checking for PDF_show_boxed in -lpdf... no
configure: error: pdflib extension requires pdflib 3.x.

any help??

---


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


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




[PHP-DEV] PHP 4.0 Bug #9275 Updated: can't compile pdflib in php4.0.3pl1

2001-02-15 Thread support

ID: 9275
User Update by: [EMAIL PROTECTED]
Status: Open
Bug Type: Compile Problem
Description: can't compile pdflib in php4.0.3pl1

Hi, 
some more information:

i've compiled libpng and tiff
loks fine

after that i've compiled and installed pdflib with:

./configure --with-tifflib=/usr/local  \
--with-zlib=/usr/local \
--with-pnglib=/usr/local

make
make test
make install

everything looks fine, no errors were reported.

then i try to configure php with:

./configure --with-apache=../apache_1.3.14 \
--with-mysql=/usr/local/mysql \
--with-dbase \
--enable-memory-limit=yes \
--enable-track-vars \
--enable-debug=no \
--with-gd \
--with-zlib-dir \
--with-tiff-dir \
--with-pdflib=/usr/local

and it results in the described error

problem persists with the latest snapshot


Previous Comments:
---

[2001-02-15 07:36:42] [EMAIL PROTECTED]
Hi, 
some more information:

i've compiled libpng and tiff
loks fine

after that i've compiled and installed pdflib with:

./configure --with-tifflib=/usr/local  
--with-zlib=/usr/local 
--with-pnglib=/usr/local

make
make test
make install

everything looks fine, no errors were reported.

then i try to configure php with:

./configure --with-apache=../apache_1.3.14 
--with-mysql=/usr/local/mysql 
--with-dbase 
--enable-memory-limit=yes 
--enable-track-vars 
--enable-debug=no 
--with-gd 
--with-zlib-dir 
--with-tiff-dir 
--with-pdflib=/usr/local

and it results in the described error

problem persists with the latest snapshot


---

[2001-02-15 07:01:33] [EMAIL PROTECTED]
Can you check if this problem persists with the latest snapshot from snaps.php.net?

---

[2001-02-15 06:50:44] [EMAIL PROTECTED]
Hi,

problem:

can't compile pdflib-3.0.3 into php-4.0.3pl1

Configure reports the following:

checking whether to include Pdflib 3.x support... /usr/local
yes
checking for libz needed by pdflib 3.x... already zlib support
checking for jpeg_read_header in -ljpeg... yes
checking for png_create_info_struct in -lpng... yes
checking for TIFFOpen in -ltiff... yes
cd: can't cd to yes
checking for PDF_show_boxed in -lpdf... no
configure: error: pdflib extension requires pdflib 3.x.

any help??

---


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


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




[PHP-DEV] PHP 4.0 Bug #9276 Updated: ORA-00904

2001-02-15 Thread hholzgra

ID: 9276
Updated by: hholzgra
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Bogus
Bug Type: Oracle related
Assigned To: 
Comments:



Previous Comments:
---

[2001-02-15 07:27:44] [EMAIL PROTECTED]


---



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


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




[PHP-DEV] PHP 4.0 Bug #9277: Bogus warning with rand(a,b) where a == b

2001-02-15 Thread jukkaho

From: [EMAIL PROTECTED]
Operating system: linux
PHP version:  4.0.4pl1
PHP Bug Type: Math related
Bug description:  Bogus warning with rand(a,b) where a == b

$value=rand(0,0);

Gives "Warning: rand(): Invalid range: 0..0 in ..." while there is nothing wrong with 
it. Value shouldn't be invalid.

I'm expecting a value of 0 with probability of 100% without any warnings or is this a 
feature?


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



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




[PHP-DEV] PHP 4.0 Bug #9275 Updated: can't compile pdflib in php4.0.3pl1

2001-02-15 Thread support

ID: 9275
User Update by: [EMAIL PROTECTED]
Old-Status: Feedback
Status: Open
Bug Type: Compile Problem
Description: can't compile pdflib in php4.0.3pl1

Hi, 
some more information:

i've compiled libpng and tiff
loks fine

after that i've compiled and installed pdflib with:

./configure --with-tifflib=/usr/local  \
--with-zlib=/usr/local \
--with-pnglib=/usr/local

make
make test
make install

everything looks fine, no errors were reported.

then i try to configure php with:

./configure --with-apache=../apache_1.3.14 \
--with-mysql=/usr/local/mysql \
--with-dbase \
--enable-memory-limit=yes \
--enable-track-vars \
--enable-debug=no \
--with-gd \
--with-zlib-dir \
--with-tiff-dir \
--with-pdflib=/usr/local

and it results in the described error

problem persists with the latest snapshot


Previous Comments:
---

[2001-02-15 07:01:33] [EMAIL PROTECTED]
Can you check if this problem persists with the latest snapshot from snaps.php.net?

---

[2001-02-15 06:50:44] [EMAIL PROTECTED]
Hi,

problem:

can't compile pdflib-3.0.3 into php-4.0.3pl1

Configure reports the following:

checking whether to include Pdflib 3.x support... /usr/local
yes
checking for libz needed by pdflib 3.x... already zlib support
checking for jpeg_read_header in -ljpeg... yes
checking for png_create_info_struct in -lpng... yes
checking for TIFFOpen in -ltiff... yes
cd: can't cd to yes
checking for PDF_show_boxed in -lpdf... no
configure: error: pdflib extension requires pdflib 3.x.

any help??

---


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


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




[PHP-DEV] PHP 4.0 Bug #9174 Updated: Core Dump

2001-02-15 Thread martin

ID: 9174
User Update by: [EMAIL PROTECTED]
Old-Status: Feedback
Status: Closed
Bug Type: Date/time related
Description: Core Dump

I have tried to replicate the problem for about an hour with no success. I will assume 
that this problem will only occur in extreme circumstances. 

Previous Comments:
---

[2001-02-14 14:19:49] [EMAIL PROTECTED]
Works for me just fine. Can you try latest CVS snapshot from 
http://snaps.php.net/ ?? And add some short example code into this 
bug report in case I misunderstood what you meant.

--Jani


---

[2001-02-08 11:01:00] [EMAIL PROTECTED]
Not so much a bug, more a lack of dieing gracefully. If the DATE function does not 
have quotes around the string format, is causes a core dump.

---


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


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




[PHP-DEV] PHP 4.0 Bug #9276: ORA-00904

2001-02-15 Thread hindau

From: [EMAIL PROTECTED]
Operating system: linux
PHP version:  4.0.0
PHP Bug Type: Oracle related
Bug description:  ORA-00904




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



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




[PHP-DEV] Re: PHP 4.0 Bug #9275 Updated: can't compile pdflib in php4.0.3pl1

2001-02-15 Thread Joachim Guettinger


>Can you check if this problem persists with the latest snapshot from 
>snaps.php.net?

Hi,

problem persists in the latest snapshot also...

thx anyway...

>Previous Comments:
>---
>
>[2001-02-15 06:50:44] [EMAIL PROTECTED]
>Hi,
>
>problem:
>
>can't compile pdflib-3.0.3 into php-4.0.3pl1
>
>Configure reports the following:
>
>checking whether to include Pdflib 3.x support... /usr/local
>yes
>checking for libz needed by pdflib 3.x... already zlib support
>checking for jpeg_read_header in -ljpeg... yes
>checking for png_create_info_struct in -lpng... yes
>checking for TIFFOpen in -ltiff... yes
>cd: can't cd to yes
>checking for PDF_show_boxed in -lpdf... no
>configure: error: pdflib extension requires pdflib 3.x.
>
>any help??
>
>---
>
>
>
>ATTENTION! Do NOT reply to this email!
>To reply, use the web interface found at http://bugs.php.net/?id=9275&edit=2


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




[PHP-DEV] PHP 4.0 Bug #9275 Updated: can't compile pdflib in php4.0.3pl1

2001-02-15 Thread derick

ID: 9275
Updated by: derick
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Feedback
Bug Type: Compile Problem
Assigned To: 
Comments:

Can you check if this problem persists with the latest snapshot from snaps.php.net?

Previous Comments:
---

[2001-02-15 06:50:44] [EMAIL PROTECTED]
Hi,

problem:

can't compile pdflib-3.0.3 into php-4.0.3pl1

Configure reports the following:

checking whether to include Pdflib 3.x support... /usr/local
yes
checking for libz needed by pdflib 3.x... already zlib support
checking for jpeg_read_header in -ljpeg... yes
checking for png_create_info_struct in -lpng... yes
checking for TIFFOpen in -ltiff... yes
cd: can't cd to yes
checking for PDF_show_boxed in -lpdf... no
configure: error: pdflib extension requires pdflib 3.x.

any help??

---



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


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




[PHP-DEV] PHP 4.0 Bug #9245 Updated: mysql_connect, mysql_pconnect do not report errors if there are any.

2001-02-15 Thread sniper

ID: 9245
Updated by: sniper
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Duplicate
Bug Type: MySQL related
Assigned To: 
Comments:



Previous Comments:
---

[2001-02-13 15:19:09] [EMAIL PROTECTED]
same situation as bug ID #9049

---



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


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




[PHP-DEV] PHP 4.0 Bug #9275: can't compile pdflib in php4.0.3pl1

2001-02-15 Thread support

From: [EMAIL PROTECTED]
Operating system: FreeBSD 3.3
PHP version:  4.0.3pl1
PHP Bug Type: Compile Problem
Bug description:  can't compile pdflib in php4.0.3pl1

Hi,

problem:

can't compile pdflib-3.0.3 into php-4.0.3pl1

Configure reports the following:

checking whether to include Pdflib 3.x support... /usr/local
yes
checking for libz needed by pdflib 3.x... already zlib support
checking for jpeg_read_header in -ljpeg... yes
checking for png_create_info_struct in -lpng... yes
checking for TIFFOpen in -ltiff... yes
cd: can't cd to yes
checking for PDF_show_boxed in -lpdf... no
configure: error: pdflib extension requires pdflib 3.x.

any help??


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



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




[PHP-DEV] PHP 4.0 Bug #9274: Error with inserting a binary data into database

2001-02-15 Thread mgx

From: [EMAIL PROTECTED]
Operating system: Win XX
PHP version:  4.0.4pl1
PHP Bug Type: MySQL related
Bug description:  Error with inserting a binary data into database

error occured only in PHP compiled as a module on WIn95,98
php from default win installation, no changes in php.ini
tested on many computers

problem occured while inserting images (binary data into database). Functional script 
under OS LINUX don't work, because process of importing a binary data (for example gif
image) is stopped when PHP detect some 'special' character.
the same thing happend while trying to open binary data with file functions

good code /tested on Linux and on cgi version of php under win/

 create database pokus;
create table pokus(pole blob);

insert.php - it doesnt import whole image!



script for showing image

 




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



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




[PHP-DEV] PHP 4.0 Bug #9273: feature request: pg_cancel()

2001-02-15 Thread hamann . w

From: [EMAIL PROTECTED]
Operating system: Linux
PHP version:  4.0.4pl1
PHP Bug Type: PostgreSQL related
Bug description:  feature request: pg_cancel()

Feature request: add pg_cancel() function

Background: although a database search script tries to
avoid "unwanted" queries, sometimes users manage to
do searches that will take considerable time, then press STOP
in their browser. With postgresql this means that the requesting
cgi process is stopped, but the actual database process
continues to run. If this happens a few times (same user requesting
slightly different data), there will be a couple of useless
processes hogging the database server.
Obvious solution (tested on tcl based cgi script) is to
use pg_cancel(), probably with a register_shutdown_function


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



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




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

2001-02-15 Thread tom . anheyer

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

The conversation is useful. I know this because HTML form 
parameters, MySQL result sets are strings even if they are 
represent numbers.

But there some cases for which the conversation is not 
useful. If the result is MAXINT, MININT or NaN, it would 
be better not converting the operands and making a 
string comparision. A warning message whould be also 
useful.



Previous Comments:
---

[2001-02-15 05:25:09] [EMAIL PROTECTED]
this autoconversion is usefull when dealing with html form input
(for which php is used every once in a while afaik :)
as html has no numric input elements, just text 

maybe it would make sense to have this behaviour configurable
in the ini file, but i'm afraid that this would only increase the WTF
factor even more

---

[2001-02-15 05:07:35] [EMAIL PROTECTED]
Ok, I accept this. But I don't think that is a good idea 
to compare apples with pears with the answer 'yes they are 
fruit' without any warning.


---

[2001-02-15 04:32:00] [EMAIL PROTECTED]
Ok, it should remain open as a documentation problem...

---

[2001-02-15 04:31:01] [EMAIL PROTECTED]
This is a defined behavior (and does have strong reasons).  It's not a bug.
If you're interested in a byte-by-byte string comparison, you should use strcmp().

---

[2001-02-09 11:10:17] [EMAIL PROTECTED]
Incorrectly flagged as bogus.

---

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=9186


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




[PHP-DEV] PHP 4.0 Bug #9272: odbc_close issues warning on persistent connection (includes patch)

2001-02-15 Thread marc

From: [EMAIL PROTECTED]
Operating system: WinNT4sp6
PHP version:  4.0.4pl1
PHP Bug Type: ODBC related
Bug description:  odbc_close issues warning on persistent connection (includes patch)

If I open a persistent odbc connection and close it later I
get a warning even though the function works correctly.

The following script reproduces this:
  $odbchandle = odbc_pconnect($dbname, "", "");
  echo odbc_tables($odbchandle) . "";
  echo odbc_close($odbchandle) . "";
result:
  Warning: Supplied resource is not a valid ODBC-Link
  resource in f:\home\dbx\html\dbx.php on line XXX

If I use odbc_connect in the same script it all works ok.

In the odbc source code I traced this to the following lines from php_odbc.c, in 
PHP_FUNCTION(odbc_close):

  conn = (odbc_connection *) zend_fetch_resource(pv_conn,
 -1, "ODBC-Link", NULL, 1, le_conn);
  if(!conn){
ZEND_FETCH_RESOURCE(conn, odbc_connection *, pv_conn,
 -1, "ODBC-Link", le_pconn);
is_pconn = 1;
  }

As you can see the first line will issue the warning, and if it fails it detects that 
it might be a persistent connection and continues correctly.

A replacement patch for these lines might be

  int found_resource_type = le_conn;
  conn = (odbc_connection *) zend_fetch_resource(pv_conn,
 -1, "ODBC-Link", &found_resource_type, 
 2, le_conn, le_pconn);
  if (found_resource_type==le_pconn) {
is_pconn = 1;
  }

but I don't know how to submit a patch/diff so here it is.

Cheerio, Marc.




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



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




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

2001-02-15 Thread hholzgra

ID: 9186
Updated by: hholzgra
Reported By: [EMAIL PROTECTED]
Status: Analyzed
Bug Type: Documentation problem
Assigned To: 
Comments:

this autoconversion is usefull when dealing with html form input
(for which php is used every once in a while afaik :)
as html has no numric input elements, just text 

maybe it would make sense to have this behaviour configurable
in the ini file, but i'm afraid that this would only increase the WTF
factor even more

Previous Comments:
---

[2001-02-15 05:07:35] [EMAIL PROTECTED]
Ok, I accept this. But I don't think that is a good idea 
to compare apples with pears with the answer 'yes they are 
fruit' without any warning.


---

[2001-02-15 04:32:00] [EMAIL PROTECTED]
Ok, it should remain open as a documentation problem...

---

[2001-02-15 04:31:01] [EMAIL PROTECTED]
This is a defined behavior (and does have strong reasons).  It's not a bug.
If you're interested in a byte-by-byte string comparison, you should use strcmp().

---

[2001-02-09 11:10:17] [EMAIL PROTECTED]
Incorrectly flagged as bogus.

---

[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.



---

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=9186&edit=2


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




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

2001-02-15 Thread tom . anheyer

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

Ok, I accept this. But I don't think that is a good idea 
to compare apples with pears with the answer 'yes they are 
fruit' without any warning.


Previous Comments:
---

[2001-02-15 04:32:00] [EMAIL PROTECTED]
Ok, it should remain open as a documentation problem...

---

[2001-02-15 04:31:01] [EMAIL PROTECTED]
This is a defined behavior (and does have strong reasons).  It's not a bug.
If you're interested in a byte-by-byte string comparison, you should use strcmp().

---

[2001-02-09 11:10:17] [EMAIL PROTECTED]
Incorrectly flagged as bogus.

---

[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. :)

---

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=9186


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




[PHP-DEV] PHP 4.0 Bug #9271 Updated: IE5 responce: "save on disk" or "open", not running.(apache+php4)

2001-02-15 Thread derick

ID: 9271
Updated by: derick
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Bogus
Bug Type: *Install and Config
Assigned To: 
Comments:

This is not a bug, just a mis configuration. Please ask for support on the 
[EMAIL PROTECTED] mailinglist.

Previous Comments:
---

[2001-02-15 05:02:26] [EMAIL PROTECTED]


---



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


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




[PHP-DEV] PHP 4.0 Bug #9271: IE5 responce: "save on disk" or "open", not running.(apache+php4)

2001-02-15 Thread sergei . ivanov

From: [EMAIL PROTECTED]
Operating system: Windows 98
PHP version:  4.0.4pl1
PHP Bug Type: *Install and Config
Bug description:  IE5 responce: "save on disk" or "open", not running.(apache+php4)




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



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




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

2001-02-15 Thread zeev

ID: 9186
Updated by: zeev
Reported By: [EMAIL PROTECTED]
Old-Status: Closed
Status: Analyzed
Bug Type: Documentation problem
Assigned To: 
Comments:

Ok, it should remain open as a documentation problem...

Previous Comments:
---

[2001-02-15 04:31:01] [EMAIL PROTECTED]
This is a defined behavior (and does have strong reasons).  It's not a bug.
If you're interested in a byte-by-byte string comparison, you should use strcmp().

---

[2001-02-09 11:10:17] [EMAIL PROTECTED]
Incorrectly flagged as bogus.

---

[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:



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. 





---

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=9186&edit=2


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




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

2001-02-15 Thread zeev

ID: 9186
Updated by: zeev
Reported By: [EMAIL PROTECTED]
Old-Status: Analyzed
Status: Closed
Bug Type: Documentation problem
Assigned To: 
Comments:

This is a defined behavior (and does have strong reasons).  It's not a bug.
If you're interested in a byte-by-byte string comparison, you should use strcmp().

Previous Comments:
---

[2001-02-09 11:10:17] [EMAIL PROTECTED]
Incorrectly flagged as bogus.

---

[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:



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=9186&edit=2


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




  1   2   >