[PHP-DEV] Bug #12335 Updated: mail() function returns false but the email was sent.

2001-07-25 Thread sascha . winkler

ID: 12335
User updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
Status: Feedback
Bug Type: Mail related
Operating System: Sun Solaris 2.6
PHP Version: 4.0.6
New Comment:

I can't put this script to the internet, because I test it only on a fallback server 
that is currently not avaliable via the internet. On our live system that is in the 
internet we still use an older version (4.0.4), because of  the problem with the 
mail() function in version 4.0.4.

Some more information:
I use the sendmail wrapper from qmail.
In the php.ini file the I have made the following entry: 
sendmail_path   =   /usr/lib/sendmail -t
To update apache to the new php version I replaced only the libphp4.so file. 






Previous Comments:


[2001-07-24 17:41:53] [EMAIL PROTECTED]

Since everybody else that has tried this says it works fine,
can you put this script on the internet so that I can see
this happen?



[2001-07-24 08:49:13] [EMAIL PROTECTED]

works fine on RH Linux 7.  Can anybody with Solaris reproduce this?



[2001-07-24 08:03:30] [EMAIL PROTECTED]

I had first the bug with id 12024 and I have fixed it like described in the bug 
report.
Now I can send mails, but the mail() function returns false altough the mail was sent.
I use the following script to test the mail() function.
 

?php

$mail_to = [EMAIL PROTECTED];
$mail_subject = PHP test mail() gesendet obwohl failed gemeldet.;
$mail_body =  i hope that this mail() function works ! \n;
$mail_body .=  this is supposed to come on the second line \n;
$mail_body .=  and this on the third line \n;

if (mail($mail_to, $mail_subject, $mail_body))
echo Successfully sent the email \$mail_subject\ to $mail_to 
.;
else echo Failed to send the e-mail \$mail_subject\. ;
?





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


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




[PHP-DEV] Bug #12349 Updated: Broken PNG image

2001-07-25 Thread design

ID: 12349
User updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
Status: Feedback
Bug Type: GD related
Operating System: Windows 98
PHP Version: 4.0.6
New Comment:

I use standart version of PHP, downloaded from www.php.net

i think in PHP 4.0.5 and 4.0.6 used GD 1.8.4
but in PHP 4.0.6 ChangeLog file i see some GD 2.0.1 function

Previous Comments:


[2001-07-24 21:45:02] [EMAIL PROTECTED]

Which version of GD do you have?



[2001-07-24 21:43:36] [EMAIL PROTECTED]

No, only with PNG, with JPG format working fine,
and i dont install GIF support, only standart installation of PHP 4.0.6

And - i copy php_gd.dll from PHP 4.0.5 in to PHP 4.0.6 directory - CopyResized 
working, but some GD function not working - PHP crashed.

PS Sorry for bad english, im living in Ukraine and dont have big language practic



[2001-07-24 17:39:23] [EMAIL PROTECTED]

does this happen with jpgs or gifs (if you have support for
gifs)?



[2001-07-24 14:33:30] [EMAIL PROTECTED]

i have problem with create small copy of PNG transparent images:

Windows 98
apache 1.3.20
php 4.0.6

?
Header(Content-type: image/png);
$s = GetImageSize($rimg);
if ($s[0]$s[1])
$z = $s[0]/60;
else
$z = $s[1]/60;
$x = (int)($s[0]/$z);
$y = (int)($s[1]/$z);
$dst_img = ImageCreate($x,$y);
$src_img = ImageCreateFromPNG(../img/test.png);
$colT = ImageColorAllocate($dst_img,0,255,0);
ImageFill($dst_img,0,0,$colT);
ImageCopyResized($dst_img,$src_img,0,0,0,0,$x,$y,$s[0],$s[1]);
ImageColorTransparent($dst_img,$colT);
ImagePNG($dst_img);
ImageDestroy($src_img);
ImageDestroy($dst_img);
?

and i have broken fullcolored rectangle

BUT - with php 4.0.5 work all best





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


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




[PHP-DEV] Re: [PHP-QA] Re: HAL 2K1

2001-07-25 Thread Hellekin O. Wolf

At 18:29 24/07/2001 +,  wrote:
In article [EMAIL PROTECTED], Hellekin O. 
Wolf
wrote:
 As the Apache conference in Dublin is cancelled, I wanted to know if there
 is an alternative for meeting...
 
 Are there some PHPers going to to the Netherlands on August 10-12 ? =8)
 
 http://www.hal2001.org/

I know that some will attend. Be aware of all kinds of cops that will check
if you are trying to do something illegal.

Regards,

Hans

*** We're talking about a PHP meating (with an a ;-) which would be held 
during HAL2001, not talking about doing something illegal and I don't think 
most hackers would appreciate the amalgam with crackers =8)

Anyway, this would be the perfect place to talk about PHP security. I've 
heard rumors regarding possible buffer overflows in PHP but I didn't see 
anything published.
If such BOs exist, HAL may be a really good place to learn about it.

I received about 5 mails from different people who will attend. I'll 
continue centralizing information about this event, so please feel free to 
contact me off-list if you attend HAL2001 and wish to participate in some 
PHP-centered discussions. All suggestions are welcome of course =8)

hellekin


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




[PHP-DEV] Fwd: [PEAR] Help with pear/php module development

2001-07-25 Thread Jesus M. Castagnetto

I think this is more of interest of the php-dev list not of PEAR list
(CC'ing to the php-dev list)


--- PHP [EMAIL PROTECTED] wrote:
 Date: Tue, 24 Jul 2001 16:57:19 -0700
 From: PHP [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: [PEAR] Help with pear/php module development
 
 
 Hello,
  Something seems to have broken in pear that in-turn broke a php module I
 created.
 
  I developed a drop in module for php4 that worked great for PHP-4.0 to
 PHP-4.0.4.  As of 
 PHP-4.0.5 it broke and would no longer build properly.  At link time it is
 failing to link to the proper libraries.
 
 Here's a snippet of the make message.
 
  /bin/sh /root/tclink-3.2.2-php/php/libtool --mode=link gcc  -I.
 -I/root/tclink-3.2.2-php/php/ -I/root/tclink-3.2.2-php/php/main
 -I/root/tclink-3.2.2-php/php -I/usr/local/include/php
 -I/usr/local/include/php/main -I/usr/local/include/php/Zend
 -I/usr/local/include/php/TSRM  -DHAVE_CONFIG_H -g -O2   -o tclink.la
 -avoid-version -module -rpath /root/tclink-3.2.2-php/php/modules  tclink.lo 
 -L/usr/lib -Wl,lcrypto -Wl,lssl
  mkdir .libs
  (cd .  ln -s tclink.lo tclink.o)
  gcc -shared  tclink.lo  -L/usr/lib -lc  -Wl,-soname -Wl,tclink.so -o
 .libs/tclink.so
 
 There -- that last line should have a -lssl -lcrypto -ltclink but it does
 not and ends up not linking to the proper libraries.
 
 My config.m4 file worked fine for all the other versions of PHP so I am
 assuming that something in pear broke.  I found a fix on Usenet that worked
 for 4.0.5 but NOT 4.0.6.  The fix was to change this step in the install 
 
 ./configure --with-tclink=../C --with-ssl=/usr/lib
 
 to this ...
 
 CFLAGS=$CFLAGS -DHAVE_TCLINK=1 -DCOMPILE_DL_TCLINK=1 ./configure
 --with-tclink=../C --with-ssl=/usr/lib
 
 For anyone who wants to look at my package and try to help me find a
 workaround the package can be found here
 
 http://www.trustcommerce.com/tclink-3.2.2-php.tar.gz
 
 Also, here is my config.m4 file.  I have a feeling it can be a LOT simpler
 but just dont understand the tool well enough to know where to go.
 


 
 dnl $Id: config.m4,v 1.1 2001/03/26 23:26:19 adam Exp $
 dnl config.m4 for extension tclink
 dnl don't forget to call PHP_EXTENSION(tclink)
 
 PHP_ARG_WITH(ssl, for TCLink (SSL) support,
 [  --with-ssl[=DIR]Include TCLink (SSL) support. DIR is the OpenSSL
 base
   directory.], no)
 
 if test $PHP_SSL != no; then
   AC_MSG_CHECKING(for TCLink (SSL) libraries)
 
   for i in $PHP_SSL; do
 if test -r $i/libssl.a; then
   TCLINK_SSL_LIB_DIR=$i;
 fi
   done
 
   if test -z $TCLINK_SSL_LIB_DIR; then
 AC_MSG_ERROR(Cannot find SSL library files under $PHP_SSL)
   fi
 
   AC_MSG_RESULT($TCLINK_SSL_LIB_DIR)
 
   AC_ADD_LIBRARY_WITH_PATH(crypto, $TCLINK_SSL_LIB_DIR)
   AC_ADD_LIBRARY_WITH_PATH(ssl, $TCLINK_SSL_LIB_DIR)
 fi
 
 
 PHP_ARG_WITH(tclink, for TCLink support,
 [  --with-tclink[=DIR] Include TCLink support. DIR is the TCLink base
   directory.], no)
 
 if test $PHP_TCLINK != no; then
 
   if test $PHP_SSL = no; then
 AC_MSG_ERROR(Cannot enable support for TCLink without OpenSSL libraries)
   fi
 
   AC_MSG_CHECKING(for TCLink library)
 
   for i in $PHP_TCLINK; do
 if test -r $i/tclink.h; then
   TCLINK_INC_DIR=$i
 fi
 if test -r $i/libtclink.a; then
   TCLINK_LIB_DIR=$i
 fi
 if test -r $i/libtclink.so; then
   TCLINK_LIB_DIR=$i
 fi
   done
 
   if test -z $TCLINK_INC_DIR; then
 AC_MSG_ERROR(Cannot find header files under $PHP_TCLINK)
   fi
 
   if test -z $TCLINK_LIB_DIR; then
 AC_MSG_ERROR(Cannot find library files under $PHP_TCLINK)
   fi
 
   AC_MSG_RESULT($TCLINK_LIB_DIR)
 
   AC_ADD_LIBRARY_WITH_PATH(tclink, $TCLINK_LIB_DIR, TCLINK_SHARED_LIBADD)
   if test $ext_shared = yes; then
 TCLINK_SHARED_LIBADD=$TCLINK_SHARED_LIBADD -L$TCLINK_SSL_LIB_DIR
 -Wl,lcrypto -Wl,lssl
   fi
 
   AC_ADD_INCLUDE($TCLINK_INC_DIR)
 
   AC_DEFINE(HAVE_TCLINK, 1, [Whether you have TCLink])
   PHP_EXTENSION(tclink, $ext_shared)
   PHP_SUBST(TCLINK_SHARED_LIBADD)
 fi
 


 
 
 
 
 -- 
 PEAR General Mailing List (http://pear.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!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/

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




Re: [PHP-DEV] Bug #12350: Referencing multiple arrays in classes from inside methods doesn't work

2001-07-25 Thread teo

Hi m.stenzel!
On Tue, 24 Jul 2001, [EMAIL PROTECTED] wrote:

 From: [EMAIL PROTECTED]
 Operating system: W2K
 PHP version:  4.0.6
 PHP Bug Type: Class/Object related
 Bug description:  Referencing multiple arrays in classes from inside methods doesn't 
work
 
 Configuration: IIS 4 dll with Win32 binaries
 
 Okay I'm new to the game so forgive me a small mistake but I have tested
 and reproduced this weird behavior for more than 6 hours.
 
 A class wrapping multiple array variables doesn't allow to access both
 arrays as individual references from inside a function.
 
 The following code does not what I expected from the language:
 
 class test {
   VAR $firstarray;  // defining one array
   VAR $secondarray; // defining another array
   
   function testit () {
 $i = 0;
 while ($i  14) {
   $this-$firstarray[$i] = uniqid (test, false);
 $this-$secondarray[$i] = uniqid (different, false);
that should be $this-firstarray and $this-secondarray.
the manual (www.php.net/manual/ I guess) is quite clear about it.

   echo Set array #1, item $i to .$this-$firstarray[$i]. and array
 
 I think i read the manual thorougly and haven't found a hint about this
 behavior :(
 
Chapter 13. Classes and Objects
class Cart {
var $items; 
 ...

 function remove_item ($artnr, $num) {
 if ($this-items[$artnr]  $num) {
 $this-items[$artnr] -= $num;
^... no $ here



-- teodor

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




Re: [PHP-DEV] Bug #12325 Updated: Query_string not defined

2001-07-25 Thread teo

Hi danradigan!
On Tue, 24 Jul 2001, [EMAIL PROTECTED] wrote:

 ID: 12325
 User updated by: [EMAIL PROTECTED]
 Reported By: [EMAIL PROTECTED]
 Status: Feedback
 Bug Type: Unknown/Other Function
 Operating System: Win 2k
 PHP Version: 4.0.6
 New Comment:
 
 I think this is the relevant section:
well, how is your register_globals? If it's off, then that's it.

 However, since QUERY_STRING is a PHP variable, I think it should be defined as  if 
there is no querystring specified.
 
 
 Previous Comments:
 
 
 [2001-07-24 09:24:54] [EMAIL PROTECTED]
 
 Can you include a copy of your php.ini file?
 
 
 
 [2001-07-23 21:30:26] [EMAIL PROTECTED]
 
 Here is the code I am trying to run:
 
 if ($QUERY_STRING != ) {
 $insertFormAction .= ? . $QUERY_STRING;
 
 When I call the page from the browser with no querystring I get:
 
 Warning: Undefined variable: QUERY_STRING in
 c:\inetpub\wwwroot\gabe\deleteParam.php on line 3
 
 This only reproduces when using the installer for windows
 from the download section at php.net.  I cannot reproduce on
 Linux or OSX.  Also I installed the zip version and cannot
 reproduce it.  Only the installer.
 
-- teodor

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




[PHP-DEV] Bug #12350 Updated: Referencing multiple arrays in classes from inside methods doesn't work

2001-07-25 Thread cynic

ID: 12350
Updated by: cynic
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Bogus
Bug Type: Class/Object related
Operating System: W2K
PHP Version: 4.0.6
New Comment:

use $this-firstarray, not $this-$firstarray

Previous Comments:


[2001-07-24 16:13:07] [EMAIL PROTECTED]

Configuration: IIS 4 dll with Win32 binaries

Okay I'm new to the game so forgive me a small mistake but I have tested and 
reproduced this weird behavior for more than 6 hours.

A class wrapping multiple array variables doesn't allow to access both arrays as 
individual references from inside a function.

The following code does not what I expected from the language:

class test {
  VAR $firstarray;  // defining one array
  VAR $secondarray; // defining another array

  function testit () {
$i = 0;
while ($i  14) {
  $this-$firstarray[$i] = uniqid (test, false);
  $this-$secondarray[$i] = uniqid (different, false);
  echo Set array #1, item $i to .$this-$firstarray[$i]. and array #2 to 
.$this-$secondarray[$i].\n;
  $i++;
}
  }

  function doitlocal () {
$i = 0;
while ($i  14) {
  $firstarray[$i] = uniqid (test, false);
  $secondarray[$i] = uniqid (different, false);
  echo Set array #1, item $i to .$firstarray[$i]. and array #2 to 
.$secondarray[$i].\n;
  $i++;
}
  }
  
}

  $temp = new test;
  $temp-testit();
  echo The (wrong) result shows that both arrays contain the same data.\n\n;
  echo Now lets do it local:\n;
  $temp-doitlocal();
  echo With local variables everything works as expected.;

I expected the same result from both the testit() and doitlocal() methods and that 
would be creating two distinctive arrays and accessing them later in the script just 
with different values. This seems not to be possible if the array is capsulated in the 
class.

I think i read the manual thorougly and haven't found a hint about this behavior :(






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


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




[PHP-DEV] Bug #12358: CGI Error-CGI application misbehaved

2001-07-25 Thread suresh_inbox

From: [EMAIL PROTECTED]
Operating system: windows 98
PHP version:  4.0.6
PHP Bug Type: PWS related
Bug description:  CGI Error-CGI application misbehaved 

I has installed php4.0 from www.php.net.My os is windows 98 and i am using
PWS.when I run any php program in browser I am getting the following
error

CGI Error
The specified CGI application misbehaved by not returning a complete set of
HTTP headers. The headers it did return are:


whn I run php.exe in dos prompt I am getting the html file correctly.While
running in the browser,I am getting the above error.

Any body please help me
My email id is [EMAIL PROTECTED]
bye
suresh

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


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




[PHP-DEV] Bug #12359: Error

2001-07-25 Thread lai

From: [EMAIL PROTECTED]
Operating system: Win2000 adv. server
PHP version:  4.0.6
PHP Bug Type: IIS related
Bug description:  Error

This is my php file:

?php
/* A You have been here... script
   By Neil Edwards
   [EMAIL PROTECTED]
   */


if ($Test != '')   //if there is a cookie stored
{
$Test++;   //increase the value of $Test by 1
SetCookie(Test,$Test, time()+360);   //Set the cookie with the name
}
else  //else if the cookie does not exist
{
SetCookie(Test,1, time()+360);  //Create one with the value of 1
}
?

?php
// Put this somewhere else in your page
echo(You have been here );  //Display You have been here
echo $Test;   //$Test
echo ( times);   //times. This is all on one line
?

When I open any php file have this error:

Warning: Failed opening '\\laiserver\Web Space\Ronald\test.php' for
inclusion (include_path='') in Unknown on line 0

Where can I fix the problem
-- 
Edit bug report at: http://bugs.php.net/?id=12359edit=1


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




[PHP-DEV] extension not shutting down on each request

2001-07-25 Thread Gilles Koffmann

Hi,

I'm working on an extension with PHP 4.06, VC++6 and doing OO syntax
overloading.

It seems that on termination of a script the PHP_MSHUTDOWN_FUNCTION is not
called.

However the doc at www.zend.com says :

... As dynamic loadable modules are loaded only on page requests, the
request shutdown function is immediately followed by a call to the module
shutdown handler (both deinitialization events happen at the same time)... 

Did I miss something ?

Thank's

Gilles





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




Re: [PHP-DEV] extension not shutting down on each request

2001-07-25 Thread Stanislav Malyshev

GK It seems that on termination of a script the
GK PHP_MSHUTDOWN_FUNCTION is not called.

MSHUTDOWN is called on the module shutdown (i.e., engine shutdown),
RSHUTDOWN - on the request end.

GK However the doc at www.zend.com says :
GK
GK ... As dynamic loadable modules are loaded only on page
GK requests, the request shutdown function is immediately followed
GK by a call to the module shutdown handler (both deinitialization
GK events happen at the same time)... 

I guess this is related to modules loaded with dl() function.
-- 
Stanislav Malyshev, Zend Products Engineer
[EMAIL PROTECTED]  http://www.zend.com/ +972-3-6139665 ext.115



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




[PHP-DEV] Bug #12358 Updated: CGI Error-CGI application misbehaved

2001-07-25 Thread cynic

ID: 12358
Updated by: cynic
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Feedback
Bug Type: PWS related
Operating System: windows 98
PHP Version: 4.0.6
New Comment:

provide a short example script, and it's output when run from the command line. save 
this as test.php:

?php echo hello world!\n ?

and see what you get. it should be st. like this:

c:\tempphp test.php
X-Powered-By: PHP/4.0.7-dev
Content-type: text/html

hello world!

c:\temp

If that's ok (i. e. the first three lines are the same as shown above, I suggest you 
turn on logging errors in php.ini, request a PHP script thru PWS, and check the error 
log.

Previous Comments:


[2001-07-25 05:58:53] [EMAIL PROTECTED]

I has installed php4.0 from www.php.net.My os is windows 98 and i am using PWS.when I 
run any php program in browser I am getting the following error

CGI Error
The specified CGI application misbehaved by not returning a complete set of HTTP 
headers. The headers it did return are:


whn I run php.exe in dos prompt I am getting the html file correctly.While running in 
the browser,I am getting the above error.

Any body please help me
My email id is [EMAIL PROTECTED]
bye
suresh






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


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




[PHP-DEV] [PATCH] More error handling changes

2001-07-25 Thread Matt Allen

Hi All,

To carry on from the XMLRPC Error patch, here is another one that makes
PHP bork on parse errors as well as others from an INI directive called
break_on_parse.

The reason for this is if xmlrpc_errors is on, and PHP throws 2 errors,
2 xmlrpc error packets will be returned, making certain xmlrpc clients
(rightfully) spew becasue they have recieved 2 xmlrpc fault packets (xml
documents).

Cheerio,
Matta
-- 
Matt Allen
Technical Director
Investigation Marketplace
0413 777 771
[EMAIL PROTECTED]


Index: main.c
===
RCS file: /repository/php4/main/main.c,v
retrieving revision 1.383
diff -u -r1.383 main.c
--- main.c  23 Jul 2001 14:05:26 -  1.383
+++ main.c  25 Jul 2001 10:24:24 -
@@ -202,6 +202,7 @@
STD_PHP_INI_BOOLEAN(enable_dl,1,
PHP_INI_SYSTEM, OnUpdateBool,   enable_dl, 
 
php_core_globals,   core_globals)
STD_PHP_INI_BOOLEAN(expose_php,   1,
PHP_INI_SYSTEM, OnUpdateBool,   expose_php,
 
php_core_globals,   core_globals)
STD_PHP_INI_BOOLEAN(html_errors,  1,
PHP_INI_SYSTEM, OnUpdateBool,   html_errors,   
 
php_core_globals,   core_globals)
+   STD_PHP_INI_BOOLEAN(break_on_parse,   0,
+PHP_INI_SYSTEM, OnUpdateBool,   break_on_parse,   
+  php_core_globals,   core_globals)
STD_PHP_INI_BOOLEAN(xmlrpc_errors,0,
PHP_INI_SYSTEM, OnUpdateBool,   xmlrpc_errors, 
 php_core_globals,   core_globals)
STD_PHP_INI_ENTRY(xmlrpc_error_number,0,PHP_INI_ALL,   
 OnUpdateInt,xmlrpc_error_number,php_core_globals, 
  core_globals)
STD_PHP_INI_BOOLEAN(ignore_user_abort,0,PHP_INI_ALL,   
 OnUpdateBool,   ignore_user_abort,  
php_core_globals,   core_globals)
@@ -277,7 +278,7 @@
time_t error_time;
PLS_FETCH();
 
-   /* Try to use the specified logging location. */
+   
if (PG(error_log) != NULL) {
 #ifdef HAVE_SYSLOG_H
if (!strcmp(PG(error_log), syslog)) {
@@ -451,7 +452,6 @@
}
/* no break - intentionally */
case E_ERROR:
-   /*case E_PARSE: the parser would return 1 (failure), we can bail out 
nicely */
case E_COMPILE_ERROR:
case E_USER_ERROR:
if (module_initialized) {
@@ -459,6 +459,13 @@
return;
}
break;
+   case E_PARSE:
+   if (PG(break_on_parse)) {
+   if (module_initialized) {
+   zend_bailout();
+   return;
+   }
+   }
}
 
/* Log if necessary */
Index: php_globals.h
===
RCS file: /repository/php4/main/php_globals.h,v
retrieving revision 1.68
diff -u -r1.68 php_globals.h
--- php_globals.h   17 Jul 2001 16:46:07 -  1.68
+++ php_globals.h   25 Jul 2001 10:24:25 -
@@ -127,7 +127,7 @@
zend_bool xmlrpc_errors;
 
long xmlrpc_error_number;
-
+   zend_bool break_on_parse;
 
zend_bool modules_activated;
 



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


[PHP-DEV] problem with ressources on reload

2001-07-25 Thread Gilles Koffmann

Hi,

I'm writing an extension PHP 4.06, VC++6 and doing OO syntax overloading and
ZTS

I'm using a global struct that is defined as ZTS global

typedef struct {
 HashTable *array_dl_handle;
 HashTable *array_compiler;
} php_delphi_globals;


I'm using a ressource. This ressource is created as :
...
typedef struct {
 void * handle;
 CREATEOBJECT GetObject;
 GETCOMPILER GetCompiler;
 DESTROYOBJECT DestroyObject;
 char *module_name;
} php_delphi_user;

...
le_pdu = zend_register_list_destructors_ex(NULL, NULL, delphi_pdu,
module_number);
...

This ressource once created is added to the global Hashtable
array_dl_handle:

pdu =  emalloc(sizeof(php_delphi_user));
MAKE_STD_ZVAL(pdu_handle);
 ZVAL_LONG(pdu_handle, zend_list_insert(pdu, le_pdu));

 zend_hash_add(DG(array_dl_handle)
,module_name,strlen(module_name),pdu_handle,sizeof(zval *),NULL);


On first request everything goes fine. I can access my ressource.
On second request with the same script, when I do

if (zend_hash_find(DG(array_dl_handle), module_name,strlen(module_name),
(void **)value) == SUCCESS) {
pdu = zend_list_find((*value)-value.lval, type) ;
}
, pdu is false.

Does ressources survive between requests ?
Is it mandatory to use the ressource feature to create structures ?
What am I doing wrong ?

Thank's

Gilles






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




[PHP-DEV] Bug #12360: fsockopen timeout doesn't work

2001-07-25 Thread hordur

From: [EMAIL PROTECTED]
Operating system: RedHat 6.2
PHP version:  4.0.6
PHP Bug Type: Sockets related
Bug description:  fsockopen timeout doesn't work

When I try to connect to a port on a server that isn't reachable or the
packets are dropped the timeout doesn't work...

This worked when I was using PHP 4.0.4pl1

#!/usr/local/bin/php
?php

echo opening socket... \n;
fsockopen(microsoft.com, 12, $errno, $errstr, 5.0);
echo $errno\n$errstr\n;
echo done!\n;

?

I have also tried this on a Red Hat 7.1 machine and it's just the samee
there...


My configure line: './configure' '--with-zlib-dir=/usr/lib'
'--with-png-dir=/usr/local/lib' '--with-gd=/usr/local'
'--with-ttf=/software/freetype' '--with-apxs=/software/web/bin/apxs'
'--with-mysql=/software/mysql/'
-- 
Edit bug report at: http://bugs.php.net/?id=12360edit=1


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




[PHP-DEV] Bug #12361: zend_alloc.c fails to track AG(allocated_memory) properly

2001-07-25 Thread jonesd

From: [EMAIL PROTECTED]
Operating system: All
PHP version:  4.0.6
PHP Bug Type: *General Issues
Bug description:  zend_alloc.c fails to track AG(allocated_memory) properly

The shutdown_memory_manager function in 4.0.6 version of
zend_alloc.c produces a 'false' memory leak so that 
programs designed to handle multiple requests will
eventually get script failures due to emalloc failing
because it wrongly thinks you've reached your memory limit.





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


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




[PHP-DEV] Bug #12364: Uninstallation via Configuration screen

2001-07-25 Thread cheezycrust

From: [EMAIL PROTECTED]
Operating system: Windows [all]
PHP version:  4.0.6
PHP Bug Type: Feature/Change Request
Bug description:  Uninstallation via Configuration screen

Because I wasn't able to comment on an existing bug [ #12363 ], I'll open a
new bug with my comments to [ #11952 ], since I believe the reporter was
right.

I agree it isn't hard to uninstall PHP from a Windows PC (it doesn't change
anything in the registry or so) - if you know what files to delete. Most
Windows users like easy-to-use installers, so the .exe was a great idea.

However, if you use the .exe, you don't know which files are added, so
uninstalling them is hard to do. If there would be an uninstallation
utility (like most Windows programs have), people that used the installer
because they don't want to know about the technical stuff of PHP, don't
have to do so when the remove it.

Plus, and this is more personally, I prefer programs that come with an
uninstaller, because if I want to get rid of it, I know all traces of it
are removed with a single click (I know the all traces thing isn't
completely correct, but that's another issue). And I think other users also
think so.

Maybe one of your arguments would be if they don't know how to (un)install
from an archive, they shouldn't run a web server with PHP on it. Correct.
If that would be a live web server, and not like I use it, as a simulation
to build (and test) my site locally (with Apache, MySQL and PHP all running
from Windows 98), and then to upload it to a real server, that is
maintained by people who know what they are doing (at least, that's what I
pay them for).

So my suggestion is to look for someone who knows how to do it, and add
this feature to the Windows installer.
-- 
Edit bug report at: http://bugs.php.net/?id=12364edit=1


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




[PHP-DEV] Bug #12360 Updated: fsockopen timeout doesn't work

2001-07-25 Thread andy

ID: 12360
Updated by: andy
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Feedback
Bug Type: Sockets related
Operating System: RedHat 6.2
PHP Version: 4.0.6
New Comment:

are you saying that is eventually times out (but not a the
number you specified) or are you saying it never times out.


Previous Comments:


[2001-07-25 07:08:38] [EMAIL PROTECTED]

When I try to connect to a port on a server that isn't reachable or the packets are 
dropped the timeout doesn't work...

This worked when I was using PHP 4.0.4pl1

#!/usr/local/bin/php
?php

echo opening socket... \n;
fsockopen(microsoft.com, 12, $errno, $errstr, 5.0);
echo $errno\n$errstr\n;
echo done!\n;

?

I have also tried this on a Red Hat 7.1 machine and it's just the samee there...


My configure line: './configure' '--with-zlib-dir=/usr/lib' 
'--with-png-dir=/usr/local/lib' '--with-gd=/usr/local' '--with-ttf=/software/freetype' 
'--with-apxs=/software/web/bin/apxs' '--with-mysql=/software/mysql/'





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


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




[PHP-DEV] Bug #12360 Updated: fsockopen timeout doesn't work

2001-07-25 Thread hordur

ID: 12360
User updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
Status: Feedback
Bug Type: Sockets related
Operating System: RedHat 6.2
PHP Version: 4.0.6
New Comment:

it never times out...

Previous Comments:


[2001-07-25 09:24:26] [EMAIL PROTECTED]

are you saying that is eventually times out (but not a the
number you specified) or are you saying it never times out.




[2001-07-25 07:08:38] [EMAIL PROTECTED]

When I try to connect to a port on a server that isn't reachable or the packets are 
dropped the timeout doesn't work...

This worked when I was using PHP 4.0.4pl1

#!/usr/local/bin/php
?php

echo opening socket... \n;
fsockopen(microsoft.com, 12, $errno, $errstr, 5.0);
echo $errno\n$errstr\n;
echo done!\n;

?

I have also tried this on a Red Hat 7.1 machine and it's just the samee there...


My configure line: './configure' '--with-zlib-dir=/usr/lib' 
'--with-png-dir=/usr/local/lib' '--with-gd=/usr/local' '--with-ttf=/software/freetype' 
'--with-apxs=/software/web/bin/apxs' '--with-mysql=/software/mysql/'





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


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




[PHP-DEV] Bug #12360 Updated: fsockopen timeout doesn't work

2001-07-25 Thread hordur

ID: 12360
User updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
Status: Feedback
Bug Type: Sockets related
Operating System: RedHat 6.2
PHP Version: 4.0.6
New Comment:

or at least it doesn't time out until after a very long time

Previous Comments:


[2001-07-25 09:29:17] [EMAIL PROTECTED]

it never times out...



[2001-07-25 09:24:26] [EMAIL PROTECTED]

are you saying that is eventually times out (but not a the
number you specified) or are you saying it never times out.




[2001-07-25 07:08:38] [EMAIL PROTECTED]

When I try to connect to a port on a server that isn't reachable or the packets are 
dropped the timeout doesn't work...

This worked when I was using PHP 4.0.4pl1

#!/usr/local/bin/php
?php

echo opening socket... \n;
fsockopen(microsoft.com, 12, $errno, $errstr, 5.0);
echo $errno\n$errstr\n;
echo done!\n;

?

I have also tried this on a Red Hat 7.1 machine and it's just the samee there...


My configure line: './configure' '--with-zlib-dir=/usr/lib' 
'--with-png-dir=/usr/local/lib' '--with-gd=/usr/local' '--with-ttf=/software/freetype' 
'--with-apxs=/software/web/bin/apxs' '--with-mysql=/software/mysql/'





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


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




[PHP-DEV] Bug #12360 Updated: fsockopen timeout doesn't work

2001-07-25 Thread andy

ID: 12360
Updated by: andy
Reported By: [EMAIL PROTECTED]
Old Status: Feedback
Status: Analyzed
Bug Type: Sockets related
Operating System: RedHat 6.2
PHP Version: 4.0.6
New Comment:

I have reproduced this error.

When requesting an valid address, but a port that the server
does not listen on, the script hangs.

(*Andy*)


Previous Comments:


[2001-07-25 09:30:06] [EMAIL PROTECTED]

or at least it doesn't time out until after a very long time



[2001-07-25 09:29:17] [EMAIL PROTECTED]

it never times out...



[2001-07-25 09:24:26] [EMAIL PROTECTED]

are you saying that is eventually times out (but not a the
number you specified) or are you saying it never times out.




[2001-07-25 07:08:38] [EMAIL PROTECTED]

When I try to connect to a port on a server that isn't reachable or the packets are 
dropped the timeout doesn't work...

This worked when I was using PHP 4.0.4pl1

#!/usr/local/bin/php
?php

echo opening socket... \n;
fsockopen(microsoft.com, 12, $errno, $errstr, 5.0);
echo $errno\n$errstr\n;
echo done!\n;

?

I have also tried this on a Red Hat 7.1 machine and it's just the samee there...


My configure line: './configure' '--with-zlib-dir=/usr/lib' 
'--with-png-dir=/usr/local/lib' '--with-gd=/usr/local' '--with-ttf=/software/freetype' 
'--with-apxs=/software/web/bin/apxs' '--with-mysql=/software/mysql/'





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


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




[PHP-DEV] Bug #12365: Problems with classes and links to objects

2001-07-25 Thread vbv

From: [EMAIL PROTECTED]
Operating system: Linux
PHP version:  4.0.6
PHP Bug Type: Class/Object related
Bug description:  Problems with classes and links to objects

?
phpinfo();
class a {

function a ($obj) {
$this-h = $obj;
return true;
}
}

class b {
var $d=1;
var $item;

function b () {
$this-item = new a ($this);
$this-d++;
echo $this-d.'//'.$this-item-h-d.'br';}

function c () {
$this-item = new a ($this);
}
}

$b = new b ();
//$b-c (); //
$b-d++;
echo $b-d.'--'.$b-item-h-d;


/*
Try to comment and recomment line 
I see there is a bug with that sitution:
after finishing of object b constructor, link $a-h not linked to b
object and $a-h is a copy of object b.
I think, this is not right. In constructor $a-h is still link to b, but
after finishing the $a-h is a copy of b.
*/
-- 
Edit bug report at: http://bugs.php.net/?id=12365edit=1


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




Re: [PHP-DEV] PHP and WebDAV

2001-07-25 Thread Lukas Schroeder


On Wed, Jul 25, 2001 at 05:53:43AM +0100, Christoph Steinmann wrote:

 Are there any concrete plans to integrate functions or classes to access
 external WebDAV ressources? WebDAV seems to be used more and more to upload
 data, in replacement of FTP. It would be cool to have some functions to read
 and write files and directories over WebDAV.
 
 I don't know wheter WebDAV functions should be in a php extension (like file
 system and FTP) or in a PEAR class (HTTP). [EMAIL PROTECTED]
 has opened a project called phpdav on Sourceforge some months ago, but the
 files are not yet published.


Hello list(s),

some weeks ago i quickly wrote a simple php WebDAV module.  The module
does everything i need(ed), and i'll probably not invest too much time
in the next weeks / months.  Maybe someone is interested and wants to
take a look at it.

The download is available from http://www.azzit.de/phpwebdav/
The documentation can be found in the README file at that URL and in the
tarball.

I only tested / used it as a shared object/module under linux with
apache and PHP 404pl1, 405 and 406.


An example:

to list the files / collection in the dav-server's root:

?
header(Content-type: text/plain);
$c = phpwebdav_connect(http://dav.local/;); // my local WebDAV-Server
print_r(phpwebdav_list($c, /));
?



regards,
  lukas


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




Re: [PHP-DEV] Security Issues

2001-07-25 Thread Cynic

backwards compatibility

At 15:07 7/25/2001, Andy wrote the following:
-- 
If register_globals = off is highly recommended,
why does the default php.ini have
register_globals=on

Many people do not change this.




[EMAIL PROTECTED]
-
And the eyes of them both were opened and they saw that their files
were world readable and writable, so they chmoded 600 their files.
- Book of Installation chapt 3 sec 7 


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




[PHP-DEV] Bug #12354 Updated: getImageSize() fails for some JPEGs

2001-07-25 Thread matt

ID: 12354
User updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Closed
Bug Type: GetImageSize related
Operating System: linux
Old PHP Version: 4.0.6
PHP Version: 4.0.5
New Comment:

My initial report gave the wrong version -- this is indeed fixed in 4.0.6. Sorry for 
the misdirection; I thought one of my two test systems had already been upgraded.

Previous Comments:


[2001-07-24 22:54:07] [EMAIL PROTECTED]

works fine for me with 4.0.6 release.



[2001-07-24 20:12:15] [EMAIL PROTECTED]

... and checking the image you posted, it works fine for me with the current 
getimagesize() in CVS.  And I don't think it has changed since 4.0.6




[2001-07-24 20:04:05] [EMAIL PROTECTED]

Are you absolutely sure you are using PHP 4.0.6?  This was a bug in 4.0.5.



[2001-07-24 19:57:23] [EMAIL PROTECTED]

JPEGs saved directly from some digital cameras do not contain whatever data 
getImageSize relies on to produce an array of size and type data. Opening such an 
image and re-saving (even as JPEG) within an image editor (photoshop or equivalent) 
will 'fix' the image, allowing getImageSize() to read it.

Here's an image that causes getImageSize() to fail:
http://sitefoundry.com/php/DSC00021.JPG

Here's the same image after opening/saving; getImageSize() copes fine with this one:
http://sitefoundry.com/php/DSC00021fixed.jpg

Here's the output of ImageMagick's 'identify' utility for both images:
DSC00021fixed.jpg 640x480 DirectClass 81kb JPEG 1s
DSC00021.JPG[1] 640x480 DirectClass 88kb JPEG 2s

Here's the output of 'file':
DSC00021fixed.jpg: JPEG image data, JFIF standard
DSC00021.JPG:  JPEG image data






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


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




[PHP-DEV] Bug #12366: PHP-ISAPI Module hang

2001-07-25 Thread mbretter

From: [EMAIL PROTECTED]
Operating system: Windows 2000
PHP version:  4.0.6
PHP Bug Type: IIS related
Bug description:  PHP-ISAPI Module hang

I use PHP4.0.6 under Windows2000 on IIS 5 and ServicePack2 with the OCI8
(Oracle-Client 8.1.7) and gd -extensions.

At the first moment everything works fine, but after a few requests the
PHP-ISAPI-Module hang. After that, it's not possible to get any php-files,
static Documents are still working.

I have to stop the IIS-Admin via Services. Only stoping the Site with the
Internet-Services-Manager doesn't work.



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


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




Re: [PHP-DEV] Security Issues

2001-07-25 Thread Phil Driscoll

On Wednesday 25 July 2001 15:31, Rasmus Lerdorf wrote:

 The change I would rather see in php.ini would be to have the default
 error_level be set to E_ALL because then the above script would generate a
 warning complaining about the fact that $ok was not initialized.  Since
 PHP can determine when variables are not initialized the case for
 turning register_globals off in this example is rather weak.

+1

The security issue is poor coding rather than anything else. Using the 
various VAR arrays largely moves the problem sideways.

I took the liberty on the Windows installer of making the default route 
through the wizard set the error level to E_ALL. I am fed up that almost all 
the freely available PHP scripts out there just won't run at E_ALL because 
they either spew out so many warning messages that you can't see what's going 
on, and in many cases, the warning messages cause crucial headers not to be 
sent. My own rule of thumb is that if a script outputs any warnings during 
normal use, then it just can't be trusted to be secure.

-- 
Phil Driscoll

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




Re: [PHP-DEV] Security Issues

2001-07-25 Thread Zeev Suraski

For the obvious reason that this is a huge incompatibility change, which 
would break pretty much every application out there.
I discussed this with Kristian Koehntopp in LinuxTag, and he believes, and 
I tend to agree with him, that this issue is responsible for too many 
problems in PHP, that it probably should be changed not to be the 
default.  I will raise this issue soon, after making some improvements to 
PHP, which would make working with register_globals off a bit more easy 
than it is today.

Zeev

At 06:07 25/07/2001, Andy wrote:
If register_globals = off is highly recommended,
why does the default php.ini have
register_globals=on

Many people do not change this.

On Tue, 24 Jul 2001, Zeev Suraski wrote:
  Setting register_globals to off (which is highly recommended) would 
 prevent
  PHP from defining form variables as global variables.  For quite a while,
  since the PHP 3.0 times, PHP provided an alternative way of accessing
  variables - using special designated arrays - $HTTP_POST_VARS,
  $HTTP_GET_VARS, and so forth.  As of PHP 4.0.3 (IIRC), these variables are
  always defined, and are protected (to a degree) by PHP.  Setting
  register_globals to off effectively prevents any outer access to your
  namespace, outside $HTTP_*_VARS[].
 
  Zeev
 
  At 12:28 24/07/2001, PHP wrote:
 
  Hey all,
  
   I am new to this list so if this topic has already been 
 beaten to
   death let me know.
  
   I assume that many of you have already read this article
  
   http://lwn.net/2001/0704/a/study-in-scarlet.php3
  
  
   about many of the basic security risks you need to be aware of
   when developing in PHP.  I was curious what ideas have already been
   covered in the areas of stopping this.  I also wanted to offer up my own
   suggestion.
  
   It seems that all the issues arise from the feature that sets 
 PHP
   variable to be form variables.  The cleanest solution I can think of
   (albeit it breaks backward compatibility) would be to split the
   names-pace of form variables.  If normal or session variable stayed as
   $foo and $bar then form variables would be %foo and %bar, or something
   similar.   Breaking backward compatibility is bad but it would allow
   future applications to be free of these dangers and could be something
   set in the php.ini or rather a directive in the php script to allow old
   an new style scripts on the same server.
  
   If there is work already being done in this area please point me
   to where I can read more about it.  PHP is far and away the best web
   development language and is really only hindered by security issues 
 like this.
  
   Orion
  
  
  
  --
  PHP Development Mailing List http://www.php.net/
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
  --
  Zeev Suraski [EMAIL PROTECTED]
  CTO   co-founder, Zend Technologies Ltd. http://www.zend.com/
 
 
  --
  PHP Development Mailing List http://www.php.net/
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]

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


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




Re: [PHP-DEV] Security Issues

2001-07-25 Thread Cynic

I write all of my code with/for E_ALL as well. Plus, I consider
not relying on register_globals = on to be a crucial requirement
WRT portability.

At 17:04 7/25/2001, Phil Driscoll wrote the following:
-- 
On Wednesday 25 July 2001 15:31, Rasmus Lerdorf wrote:

 The change I would rather see in php.ini would be to have the default
 error_level be set to E_ALL because then the above script would generate a
 warning complaining about the fact that $ok was not initialized.  Since
 PHP can determine when variables are not initialized the case for
 turning register_globals off in this example is rather weak.

+1

The security issue is poor coding rather than anything else. Using the 
various VAR arrays largely moves the problem sideways.

I took the liberty on the Windows installer of making the default route 
through the wizard set the error level to E_ALL. I am fed up that almost all 
the freely available PHP scripts out there just won't run at E_ALL because 
they either spew out so many warning messages that you can't see what's going 
on, and in many cases, the warning messages cause crucial headers not to be 
sent. My own rule of thumb is that if a script outputs any warnings during 
normal use, then it just can't be trusted to be secure.

-- 
Phil Driscoll



[EMAIL PROTECTED]
-
And the eyes of them both were opened and they saw that their files
were world readable and writable, so they chmoded 600 their files.
- Book of Installation chapt 3 sec 7 


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




Re: [PHP-DEV] Security Issues

2001-07-25 Thread Peter Petermann

hi,

 If register_globals = off is highly recommended,
 why does the default php.ini have
 register_globals=on
 Many people do not change this.

this wouldnt realy help at all,
if you change this,
and you need those vars in a script, most people would do the same
like register_globals does.

the way to protect against this issue isnt switching this feature off,
it is writing code which protects against such attacks.

this is not a language issue, it is a
script-coder one,
if someone is not able to handle this, 
he is not able to write scripts if register_globals is turned off 
too

- Peter

-- 
*ZIMT - where PHP meets needs*
Homepage: www.cyberfly.net - [EMAIL PROTECTED]
PHP Usergroups: www.phpug.de - [EMAIL PROTECTED]
Just for Fun: www.fist-center.de - [EMAIL PROTECTED]

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




Re: [PHP-DEV] PHP and WebDAV

2001-07-25 Thread Peter Petermann

hey lukas, ho list,

  Are there any concrete plans to integrate functions or classes to access
  external WebDAV ressources? WebDAV seems to be used more and more to upload
  data, in replacement of FTP. It would be cool to have some functions to read
  and write files and directories over WebDAV.
  
  I don't know wheter WebDAV functions should be in a php extension (like file
  system and FTP) or in a PEAR class (HTTP). [EMAIL PROTECTED]
  has opened a project called phpdav on Sourceforge some months ago, but the
  files are not yet published.
 some weeks ago i quickly wrote a simple php WebDAV module.  The module
 does everything i need(ed), and i'll probably not invest too much time
 in the next weeks / months.  Maybe someone is interested and wants to
 take a look at it.
well, i just had a quick look on it,
it seems to give php the ability to work as WebDAV client, 
but real intresting would be the other way,
let handle the server part. Rasmus talked to me about
this on LinuxTag in Germany, maybe someone reading this has the
time doing that?

- Peter

-- 
*ZIMT - where PHP meets needs*
Homepage: www.cyberfly.net - [EMAIL PROTECTED]
PHP Usergroups: www.phpug.de - [EMAIL PROTECTED]
Just for Fun: www.fist-center.de - [EMAIL PROTECTED]

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




Re: [PHP-DEV] Security Issues

2001-07-25 Thread Zeev Suraski

I disagree here.  I believe that PHP, the way it is today, encourages 
people to write insecure code, even when they try to write secure 
code.  This is essentially what the article was saying, and I agree with 
it.  register_globals set to off won't solve the problem completely, and 
definitely not retroactively, but it'll be a big improvement step.

At 08:10 25/07/2001, Peter Petermann wrote:
hi,

  If register_globals = off is highly recommended,
  why does the default php.ini have
  register_globals=on
  Many people do not change this.

this wouldnt realy help at all,
if you change this,
and you need those vars in a script, most people would do the same
like register_globals does.

the way to protect against this issue isnt switching this feature off,
it is writing code which protects against such attacks.

this is not a language issue, it is a
script-coder one,
if someone is not able to handle this,
he is not able to write scripts if register_globals is turned off
too

- Peter

--
*ZIMT - where PHP meets needs*
Homepage: www.cyberfly.net - [EMAIL PROTECTED]
PHP Usergroups: www.phpug.de - [EMAIL PROTECTED]
Just for Fun: www.fist-center.de - [EMAIL PROTECTED]

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


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




[PHP-DEV] Bug #12367: array_diff don't work with array of array (it did with 4.0.4)

2001-07-25 Thread caugustin

From: [EMAIL PROTECTED]
Operating system: Linux Red hat 7.1 fr
PHP version:  4.0.6
PHP Bug Type: Arrays related
Bug description:  array_diff don't work with array of array (it did with 4.0.4)

Example of script
?
echo htmlbody\r\n;
echo h1Simple array : it works/h1\r\npre\r\n;
$array1 = array('a1' = 'toto', 'b1' = 'titi', 'b2' = 'tutu', 'b3' =
'rien', 'c1' = 'zone');
$array2 = array('a2' = 'adeux', 'b5' = 'titi');
var_dump(array_diff($array1, $array2));

echo \r\n/pre\r\nhr\r\nh1Array of array : it doesn't
work/h1\r\npre\r\n;
$array1 = array(
   array('a1' = 'toto', 'b1' = 'titi', 'b2' = 'tutu', 'b3' = 'rien',
'c1' = 'zone'),
   array('a2' = 'adeux', 'b5' = 'titi'), 
   array('a8' = 'ahuit', 'b12' = 'avion')
);
$array2 = array(
   array('a2' = 'adeux', 'b5' = 'titi'),
   array('a7' = 'asept', 'c5' = 'camion')
);
var_dump(array_diff($array1, $array2));
echo \r\n/pre/body/html\r\n;
?



Command line
 './configure' '--with-apache=../apache' '--with-zlib' '--with-bzip2'
'--enable-calendar' '--with-cybermut=../cybermut' '--enable-ftp'
'--with-gd=../gd' '--with-pgsql=/usr/local/psql' '--with-mysql'
'--with-sablot' '--with-xml'


Comment
I use array_diff with array of array comming from database since version
4.0.1 without any trouble. We just migrate to version 4.0.6 tree days ago
with apache 1.3.20.

Congratulation for PHP. I love it :o)

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


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




[PHP-DEV] Bug #12323 Updated: // comment tag does not work

2001-07-25 Thread lael

ID: 12323
User updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
Status: Feedback
Bug Type: Output Control
Operating System: Mac OS X
PHP Version: 4.0.6
New Comment:

The ## works just the same as the //

Also, for those that asked I try it in Netscape.  Netscape 
does the same thing.  The php is being processed, it's just 
that any line with a // or a ## will first be displayed 
up at the top of the page and then from the line after the 
comment the PHP will resume.



Previous Comments:


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

could you please check the source of the output (View - Page Source in Netscape 4.x, 
and View - Source in IE) to check that PHP scripts get actually executed?

(Sorry if this is dumb, but the example you provided really looks like this is the 
case.)



[2001-07-24 15:40:01] [EMAIL PROTECTED]

For those asking for an example of the script and the 
output.

Using the following:
code
?php
print(Working so far BR);
print(Still working next line is going to be a 
commentBR);
// This line should be a comment
print(This is the next line past the commentBR);
?
/code

I get the following result:
browser output
// This line should be a comment print(This is the next 
line past the comment
); Working so far 
Still working next line is going to be a comment
end of browser output

Thanking everyone for the help.  Greatly appreciate it.

Lael



[2001-07-24 14:28:59] [EMAIL PROTECTED]

Also in reply to the other suggestions regarding one liners 
vs multiple line comments:

The lines I have commented are all on their own line and 
are one liners.  More or less, anywhere I use a // to 
comment, the entire line is displayed to the user.  The 
following two scripts will give me the same result.

?php
// This comment will show on the web page
?

?php
print('// This comment will show on the web page');
?

I noticed in the documentation that the // was considered 
a C++ style of commenting.  Do I possibly need a particular 
module or directive to say that // is a comment?

Thanks,
Lael



[2001-07-24 14:27:13] [EMAIL PROTECTED]

I received an email stating that it could not be reproduced 
on a  RH Linux 7 machine.  This problem is specific to Mac 
OS X client, so I'm sure that you were unable to reproduce 
it on your box.

Either way, this is definately happening and is not bogus 
as you said.



[2001-07-24 14:16:26] [EMAIL PROTECTED]

unable to reproduce on RH Linux 7.

This sounds very 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 at
http://bugs.php.net/?id=12323


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


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




[PHP-DEV] Re: [PEAR-DEV] PHP and WebDAV

2001-07-25 Thread Stig S. Bakken

Christoph Steinmann wrote:
 
  DATE: 08/31/1999 06:57:01
  SUBJECT: RE:  [PHP3] WebDAV  PHP...
 
  We are not quite there with respect to integration of PHP with WebDAV, but
  Stig and I are actively looking at it, and you will soon be able to do
  some nifty things.  We are likely talking weeks here, not months.  Stay
  tuned.
 
  -Rasmus
 
 [...] For example, WebDAV support will play a big role in the future of web
 development, Sascha says. [...]
 
 zend.com  / hall of fame / sascha schumann
 
 Are there any concrete plans to integrate functions or classes to access
 external WebDAV ressources? WebDAV seems to be used more and more to upload
 data, in replacement of FTP. It would be cool to have some functions to read
 and write files and directories over WebDAV.
 
 I don't know wheter WebDAV functions should be in a php extension (like file
 system and FTP) or in a PEAR class (HTTP). [EMAIL PROTECTED]
 has opened a project called phpdav on Sourceforge some months ago, but the
 files are not yet published.

The immediately most useful stuff for PHP would be server functionality
in cooperation with mod_dav.  The client part seems to be much easier to
implement.  Both Rasmus and I fell off this project as you can see, so
if someone want to pick it up, that'd be awesome.

 - Stig

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




RE: [PHP-DEV] Security Issues

2001-07-25 Thread Brian Tanner

I'm gonna have to go ahead and agree with Peter.  As a relative Newbie to
PHP (1 year), I can tell you that when I switched from Perl to PHP, one of
the biggest Wow, this is great features was the easy variable access.  It
makes it fast for a newbie to hack something together that works -- which is
often all that is really needed.

Should the average script be coded better?  Yes.  However, you can't
legislate good coding by imposing sanctions on technique. (IMHO)

I agree with Peter that if someone is writing a script with security even in
the back corner of their mind, they will be initializing variables, and
grabbing them from the appropriate HTTP_*_VARS.

If someone has no clue about security, they are lost anyway.  You can't
*force* their script to be secure from the outside.  More likely, they are a
novice programmer and will give up on PHP just as they have on Perl --
because it is just too difficult for them to learn.

My .02

-Brian Tanner

this is not a language issue, it is a
script-coder one,
if someone is not able to handle this,
he is not able to write scripts if register_globals is turned off
too

- Peter


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




[PHP-DEV] Bug #12368: Regexp limit the string size

2001-07-25 Thread stefanbocskai

From: [EMAIL PROTECTED]
Operating system: Linux
PHP version:  4.0.4pl1
PHP Bug Type: *Regular Expressions
Bug description:  Regexp limit the string size

hi

I used the regexp functions (ereg and eregi) to split a file in blocks, the
delimiters are somthing like:
!-- BEGIN BLOCK: main --
!-- END BLOCK: main --

but the split operation failt if the file size is bigger then (aproximative
value) 11k

So, this is a bug or this was already specified in some place?

Stefan
 

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


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




[PHP-DEV] PHP Developers at OSCON in San Diego

2001-07-25 Thread Rasmus Lerdorf

If you are at OSCON, drop by and hang out in our hacker room today
(Wednesday).  We are in the east tower next to the Perl Gurus room.  I
think it is officially named Marina Room 2 or something similar to that.
There is a sign out front identifying the room.

-Rasmus


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




[PHP-DEV] Bug #11729 Updated: error in building zend

2001-07-25 Thread kalowsky

ID: 11729
Updated by: kalowsky
Reported By: [EMAIL PROTECTED]
Old Summary: 
Old Status: Feedback
Status: Closed
Bug Type: Compile Failure
Operating System: sgi
PHP Version: 4.0.6
New Comment:

no feedback from user.  if this bug continues please reopen the bug.

Previous Comments:


[2001-06-27 05:53:39] [EMAIL PROTECTED]

WHich compiler do you use? (And which version?)



[2001-06-27 04:53:53] [EMAIL PROTECTED]

(...)
zend_builtin_functions.c: In function `void zend_if_func_get_arg(int, struct zval *, 
struct zval *, int)':
zend_builtin_functions.c:182: warning: ANSI C++ forbids implicit conversion from `void 
*' in assignment
zend_builtin_functions.c: In function `void zend_if_get_class_methods(int, struct zval 
*, struct zval *, int)':
zend_builtin_functions.c:578: parse error before `;'
zend_builtin_functions.c:585: parse error before `=='
zend_builtin_functions.c:589: parse error before `.'
zend_builtin_functions.c:590: parse error before `.'
zend_builtin_functions.c:591: parse error before `.'
zend_builtin_functions.c:592: parse error before `;'
zend_builtin_functions.c:592: parse error before `)'
zend_builtin_functions.c:592: parse error before `)'
zend_builtin_functions.c:592: parse error before `='
zend_builtin_functions.c:592: `orig_ptr' undeclared (first use this function)
zend_builtin_functions.c:592: (Each undeclared identifier is reported only once
zend_builtin_functions.c:592: for each function it appears in.)
zend_builtin_functions.c:592: parse error before `)'
zend_builtin_functions.c:592: parse error before `)'
zend_builtin_functions.c:592: parse error before `)'
zend_builtin_functions.c:593: parse error before `.'
zend_builtin_functions.c:593: parse error before `.'
zend_builtin_functions.c:594: parse error before `.'
zend_builtin_functions.c:594: parse error before `.'
zend_builtin_functions.c: In function `void zend_if_restore_error_handler(int, struct 
zval *, struct zval *, int)':
*** Error code 1 (bu21)
*** Error code 1 (bu21)






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


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




[PHP-DEV] Bug #11734 Updated: crypt () seems to be gone...

2001-07-25 Thread kalowsky

ID: 11734
Updated by: kalowsky
Reported By: [EMAIL PROTECTED]
Old Status: Feedback
Status: Closed
Bug Type: *Encryption and hash functions
Operating System: MacOS X 10.0.3
PHP Version: 4.0.6
New Comment:

no feedback from user.  if this problem still persists please reopen.

Previous Comments:


[2001-06-27 13:20:49] [EMAIL PROTECTED]

Did it work in PHP 4.0.5? 

--Jani




[2001-06-27 09:34:26] [EMAIL PROTECTED]

Hi,

Is crypt () gone under darwin 1.3.3...? I compiled in 
libmcrypt but still no dice.


Cheers,


-Morten





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


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




Re: [PHP-DEV] Re: [PEAR-DEV] PHP and WebDAV

2001-07-25 Thread Rasmus Lerdorf

 The immediately most useful stuff for PHP would be server functionality
 in cooperation with mod_dav.  The client part seems to be much easier to
 implement.  Both Rasmus and I fell off this project as you can see, so
 if someone want to pick it up, that'd be awesome.

I may just be motivated enough to pick it back up.  It has annoyed me for
a while that we can't do all the cool things that are possible with being
a DAV server.  Just need the world to stop spinning for a week to free up
some time for this.

-Rasmus


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




[PHP-DEV] Bug #11710 Updated: library -lstdc++ / -lg++ not found

2001-07-25 Thread kalowsky

ID: 11710
Updated by: kalowsky
Reported By: [EMAIL PROTECTED]
Old Status: Feedback
Status: Closed
Bug Type: Compile Failure
Operating System: Solaris 2.7
PHP Version: 4.0.6
New Comment:

no feedback from user.  if this problem still persists please reopen the bug.

Previous Comments:


[2001-06-27 10:02:04] [EMAIL PROTECTED]

Which compiler you are using?




[2001-06-26 17:23:35] [EMAIL PROTECTED]

Look like it's a problem with Sun's ld not being knowing what rpath is. If I LD=c++ 
then configure then make. Everything seems fine.



[2001-06-26 16:34:58] [EMAIL PROTECTED]

Last linking of php fails. This appears to be a problem with the -rpath = 
/usr/local/homes/beacon/src/php-4.0.6/libs
when changed from -rpath to -R everything compiles fine.

bash-2,00$ /bin/sh /usr/local/homes/beacon/src/php-4.0.6/libtool --silent --mode=link 
c++  -I. -I/usr/local/homes/beacon/src/php-4.0.6/ 
-I/usr/local/homes/beacon/src/php-4.0.6/main -I/usr/local/homes/beacon/src/php-4.0.6 
-I/usr/local/netscape/plugins/include -I/usr/local/homes/beacon/src/php-4.0.6/Zend 
-I/usr/local/include -I/usr/local/homes/beacon/mysql/include 
-I/usr/local/homes/beacon/src/php-4.0.6/ext/xml/expat/xmltok 
-I/usr/local/homes/beacon/src/php-4.0.6/ext/xml/expat/xmlparse 
-I/usr/local/homes/beacon/src/php-4.0.6/TSRM  -D_POSIX_PTHREAD_SEMANTICS 
-D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT -DSUPPORT_UTF8 -DXML_BYTE_ORDER=21 -I../TSRM 
-g -O2   -o libphp4.la -rpath /usr/local/homes/beacon/src/php-4.0.6/libs 
-avoid-version -L/usr/ucblib -L/usr/gnu/lib/gcc-lib/sparc-sun-solaris2.6/2.8.1 
-L/usr/local/lib -L/usr/local/homes/beacon/mysql/lib  -R/usr/ucblib 
-R/usr/gnu/lib/gcc-lib/sparc-sun-solaris2.6/2.8.1 -R/usr/local/lib 
-R/usr/local/homes/beacon/mysql/lib stub.lo Zend/libZend.la sapi/nsapi/libsapi.la 
main/libmain.la regex/libregex.la ext/calendar/libcalendar.la ext/ctype/libctype.la 
ext/ftp/libftp.la ext/mhash/libmhash.la ext/mysql/libmysql.la ext/pcre/libpcre.la 
ext/posix/libposix.la ext/recode/librecode.la ext/session/libsession.la 
ext/standard/libstandard.la ext/xml/libxml.la TSRM/libtsrm.la -lpam -lrecode -lstdc++ 
-lg++ -ldl -lmysqlclient 
-lmhash -lcrypt -lresolv -lresolv -lm -ldl -lnsl -lsocket -lpthread -lsocket -lgcc
ld: fatal: library -lstdc++: not found
ld: fatal: library -lg++: not found
ld: fatal: library -lstdc++: not found
ld: fatal: library -lg++: not found
ld: fatal: File processing errors. No output written to .libs/libphp4.so






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


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




[PHP-DEV] Bug #11686 Updated: if configuring with db2 AND java-support, java will hang under apache

2001-07-25 Thread kalowsky

ID: 11686
Updated by: kalowsky
Reported By: [EMAIL PROTECTED]
Old Status: Feedback
Status: Closed
Bug Type: Java related
Operating System: linux redhat 7.1
PHP Version: 4.0.6
New Comment:

no user feedback.  if this problem still persists, please reopen the bug.

Previous Comments:


[2001-06-27 11:51:31] [EMAIL PROTECTED]

Please include the shortest possible script into this report
which can be used to reproduce this.




[2001-06-27 11:50:40] [EMAIL PROTECTED]

Please read the email to the end..and you will find
the URL which to use to reply. DO NOT REPLY VIA EMAIL!!!




[2001-06-26 08:45:57] [EMAIL PROTECTED]

One more thing, does db2 work if you leave java out?




[2001-06-26 08:45:02] [EMAIL PROTECTED]

I hope you're not using 'apachectl restart'? Use stop/start instead. If this wasn't 
the problem, please generate
a GDB backtrace of the crash. Instructions can be found here:

http://www.php.net/bugs-generating-backtrace.php





[2001-06-26 02:26:47] [EMAIL PROTECTED]

build php with db2-support, AND java, and ONLY when running it under APACHE (I tried 
several versions, but last time i used:1.3.20).

If i remove db2-support, it works ok, or run php standalone.

this bug exists in db2 7.1 (patchlevel 0,2,3 (latest)).

i have reproduced it under ibmjdk118, ibmjdk1.3, suns jdk1.2.2, suns jdk1.3.

workaround:  don't use db2 in php, do it from java instead.

cd /root
tar xvfz apache_1.3.20.tar.Z 
cd apache_1.3.20
./configure --prefix=/usr/local/apache --enable-module=so
make
make install

# 1.3
tcsh
setenv LD_ASSUME_KERNEL 2.2.5
setenv LD_LIBRARY_PATH 
/opt/jdk1.3/jre/lib/i386/client:/opt/jdk1.3/jre/lib/i386/classic:/opt/jdk1.3/jre/lib/i386

set path = ( /opt/jdk1.3/bin/ $path )
./configure --with-apxs=/usr/local/apache/bin/apxs --without-mysql --enable-sockets 
--with-java 
make
make install

restart apache)
(try run except.php to load java from apache).
now it works...

then:

add this line to php, (and make rm -rf on the php-directory, because of severe bugs in 
the configure/make process) (only configure from scratch work 100%).
--with-ibm-db2=/home/db2inst1/sqllib 
(also add /usr/Ibmdb2/V7.1/lib to LD_LIBRARY_PATH)

(restart apache)
(try run except.php (from netscape) to load java from apache).
now it does not work.
there will be NO response output.






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


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




[PHP-DEV] Bug #12369: mnoGoSearch extension

2001-07-25 Thread pele

From: [EMAIL PROTECTED]
Operating system: Windows
PHP version:  4.0.6
PHP Bug Type: Feature/Change Request
Bug description:  mnoGoSearch extension

Hi,

Can you please tell me if you, or any of other developers managed to port
mnoGoSearch extension to Windows (as dll).

Thanks in advance,
  Roman
-- 
Edit bug report at: http://bugs.php.net/?id=12369edit=1


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




[PHP-DEV] Re: [PEAR-DEV] PHP and WebDAV

2001-07-25 Thread Andrei Zmievski

On Wed, 25 Jul 2001, Stig S. Bakken wrote:
 The immediately most useful stuff for PHP would be server functionality
 in cooperation with mod_dav.  The client part seems to be much easier to
 implement.  Both Rasmus and I fell off this project as you can see, so
 if someone want to pick it up, that'd be awesome.

It's on my TODO list, but it requires sapi/embed first. So that's the
order of the things.

-Andrei

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




[PHP-DEV] Bug #12370: Feature suggestion

2001-07-25 Thread matthew

From: [EMAIL PROTECTED]
Operating system: Linux 2.4.3
PHP version:  4.0.6
PHP Bug Type: Variables related
Bug description:  Feature suggestion

After reading the documentation on integers, I found myself wondering why
PHP does not allow a 64-bit Long Integer type instead of converting
values that overflow 32bit Integers to Double?
-- 
Edit bug report at: http://bugs.php.net/?id=12370edit=1


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




Re: [PHP-DEV] PHP Developers at OSCON in San Diego

2001-07-25 Thread Andrei Zmievski

On Wed, 25 Jul 2001, Rasmus Lerdorf wrote:
 If you are at OSCON, drop by and hang out in our hacker room today
 (Wednesday).  We are in the east tower next to the Perl Gurus room.  I
 think it is officially named Marina Room 2 or something similar to that.
 There is a sign out front identifying the room.

Yes, don't mind that the sign currently says Private PHP Meeting
(Invitation Only).

-Andrei

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




Re: [PHP-DEV] cvs socket extension

2001-07-25 Thread Daniel Beulshausen

At 20:15 24.07.2001 +0200, Markus Fischer wrote:
I've come up with a patch based on the ideas and suggestion that
came up in this thread:

- Let the fd_set resource keep track of the highest socket; nuked
   _select() first parameter and determine it ourself
- Swapped _set(), _clear() and _isset() parameters and
   recognize plain sockets as well as array of sockets

The patch is against current CVS and only compiled unter linux
(debian unstable) so far.

Please everyone interested test and verify it and let me know
what you think. Due my lack of karma I can't commit it anyway,
feel free to do so if you find it appropriate.

please let me know wether the attached patch fixes your concerns.

daniel

/*--
daniel beulshausen - [EMAIL PROTECTED]
using php on windows? http://www.php4win.de

Index: php_sockets.h
===
RCS file: /repository/php4/ext/sockets/php_sockets.h,v
retrieving revision 1.10
diff -u -r1.10 php_sockets.h
--- php_sockets.h   21 May 2001 19:36:22 -  1.10
+++ php_sockets.h   25 Jul 2001 17:19:04 -
@@ -78,21 +78,30 @@
 PHP_FUNCTION(socket_shutdown);
 
 typedef struct php_iovec {
-   struct iovec *iov_array;
-   unsigned int count;
+   struct iovec*iov_array;
+   unsigned intcount;
 } php_iovec_t;
 
-typedef struct {
-#ifdef PHP_WIN32
-   SOCKET socket;
-#else
-   int socket;
+#ifndef PHP_WIN32
+typedef int SOCKET;
 #endif
-   int type;
+
+typedef struct {
+   SOCKET  socket;
+   int type;
 } php_socket;
 
 typedef struct {
-   zend_bool use_system_read;
+   fd_set  set;
+   SOCKET  max_fd;
+} php_fd_set;
+
+typedef struct {
+   unsigned char   info[256];
+} php_sockaddr_storage;
+
+typedef struct {
+   zend_bool   use_system_read;
 } php_sockets_globals;
 
 
Index: php_sockets_win.h
===
RCS file: /repository/php4/ext/sockets/php_sockets_win.h,v
retrieving revision 1.1
diff -u -r1.1 php_sockets_win.h
--- php_sockets_win.h   17 May 2001 17:02:37 -  1.1
+++ php_sockets_win.h   25 Jul 2001 17:19:05 -
@@ -41,7 +41,6 @@
 #define set_h_errno(a) WSASetLastError(a)
 #define close(a) closesocket(a)
 #define CMSG_DATA(cmsg) ((cmsg)-cmsg_data)
-#define IS_INVALID_SOCKET(a)  (a-socket == INVALID_SOCKET)
 
 typedef long ssize_t;
 
Index: sockets.c
===
RCS file: /repository/php4/ext/sockets/sockets.c,v
retrieving revision 1.56
diff -u -r1.56 sockets.c
--- sockets.c   16 Jul 2001 04:31:13 -  1.56
+++ sockets.c   25 Jul 2001 17:19:06 -
@@ -55,13 +55,14 @@
 # include fcntl.h
 # include signal.h
 # include sys/uio.h
-# define IS_INVALID_SOCKET(a)  (a-socket  0)
+# define IS_INVALID_SOCKET(a)  (a-socket  0)
 # define set_errno(a) (errno = a)
 # define set_h_errno(a) (h_errno = a)
 #else /* windows */
 # include winsock.h
 # include php_sockets.h
 # include php_sockets_win.h
+# define IS_INVALID_SOCKET(a)  (a-socket == INVALID_SOCKET)
 #endif
 
 #ifdef ZTS
@@ -91,10 +92,6 @@
 #define PHP_NORMAL_READ 0x0001
 #define PHP_BINARY_READ 0x0002
 
-typedef struct {
-   unsigned char info[256];
-} php_sockaddr_storage;
-
 
 static int le_iov;
 #define le_iov_name Socket I/O vector
@@ -178,8 +175,8 @@
 
 static void destroy_fd_sets(zend_rsrc_list_entry *rsrc)
 {
-   fd_set *set = (fd_set *) rsrc-ptr;
-   efree(set);
+   php_fd_set *php_fd = (php_fd_set*)rsrc-ptr;
+   efree(php_fd);
 }
 
 static void destroy_iovec(zend_rsrc_list_entry *rsrc)
@@ -338,7 +335,7 @@
struct protoent *pe;
 
le_socket   = zend_register_list_destructors_ex(destroy_socket, NULL, 
le_socket_name, module_number);
-   le_destroy  = zend_register_list_destructors_ex(destroy_fd_sets,NULL, 
le_destroy_name, module_number);
+   le_destroy  = zend_register_list_destructors_ex(destroy_fd_sets, NULL, 
+le_destroy_name, module_number);
le_iov  = zend_register_list_destructors_ex(destroy_iovec,  NULL, 
le_iov_name, module_number);
 
REGISTER_LONG_CONSTANT(AF_UNIX,   AF_UNIX,
CONST_CS | CONST_PERSISTENT);
@@ -397,13 +394,13 @@
Allocates a new file descriptor set */
 PHP_FUNCTION(socket_fd_alloc)
 {
-   fd_set *set;
+   php_fd_set *php_fd;
 
-   set = emalloc(sizeof *set);
-   
-   FD_ZERO(set);
+   php_fd = (php_fd_set*)emalloc(sizeof(php_fd_set));
+
+   FD_ZERO((php_fd-set));

-   ZEND_REGISTER_RESOURCE(return_value, set, le_destroy);
+   ZEND_REGISTER_RESOURCE(return_value, php_fd, le_destroy);
 }
 /* }}} */
 
@@ -412,75 +409,106 @@
 PHP_FUNCTION(socket_fd_free)
 {
zval **arg1;
-   fd_set *the_set;
+   php_fd_set *php_fd;

if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, arg1) == FAILURE) {
WRONG_PARAM_COUNT;
}

-   

[PHP-DEV] Bug #12371: SQLColumns Error when using odbc_columns on Oracle DB

2001-07-25 Thread john_tipton

From: [EMAIL PROTECTED]
Operating system: Win 2000
PHP version:  4.0.6
PHP Bug Type: ODBC related
Bug description:  SQLColumns Error when using odbc_columns on Oracle DB

I have tried all the different syntaxes I could think of and
can't get odbc_columns to work with ORACLE on Win 2000.

?php
  $cnx=odbc_connect(cpen_sds,$username,$password);
  $res=odbc_columns($cnx,cpen_sds,%,faqs);
  odbc_result_all($res, BGCOLOR='yellow' border=3
bordercolordark='#FF');
  odbc_close_all();
?

I get the following error:

Warning: SQL error: , SQL state 0 in SQLColumns in
E:\InetPub\websites\AMS\wwwroot\test3.php on line 11

Warning: Supplied argument is not a valid ODBC result
resource in E:\InetPub\websites\AMS\wwwroot\test3.php on line 12

Thanks,

John R. Tipton
-- 
Edit bug report at: http://bugs.php.net/?id=12371edit=1


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




[PHP-DEV] Bug #12372: LDAP calls within a function fail

2001-07-25 Thread Mike

From: [EMAIL PROTECTED]
Operating system: RedHat 7.0
PHP version:  4.0.6
PHP Bug Type: LDAP related
Bug description:  LDAP calls within a function fail

 When doing LDAP calls from within a function, it always returns 
'Warning: 1 is not a LDAP link index in blah.php on line 12'

 If I take the same code and put it in a .php file by itself it works
great.

?

$ds=ldap_connect(blah.com) || die('Connection Failed');

if ($ds) {
$dn = ou=people, o=blah.com;
$r=ldap_bind($ds);
$justthese = array( ou, sn, givenname, mail, telephonenumber,
mobile, title);
$filter = sn=*;

$sr=ldap_search($ds, $dn, $filter, $justthese);
$info = ldap_get_entries($ds, $sr);

for ($i=0; $i$info[count]; $i++) {
echo dn is: . $info[$i][dn] .br;
echo first name is: . $info[$i][givenname][0] .br;
echo lastname is: . $info[$i][sn][0] .br;
echo title is : . $info[$i][title][0] .br;
echo email is : . $info[$i][mail][0] .br;
echo telephone is : . $info[$i][telephonenumber][0] .p;
}

ldap_close($ds);
}

?

 I don't get the error at the ldap_connect line so it makes the connection.
But when it gets to the ldap_bind it bombs out. 

 Here is my config line

./configure  --with-apache=../apache_1.3.20 --with-gd
--with-pdflib=/usr/local --disable-debug --with-mnogosearch=/usr
/local/mnogosearch --with-mysql=/usr --with-zlib
--enable-inline-optimization --with-gnu-ld --enable-memory-limit --enab
le-track-vars --with-jpeg-dir=/usr --with-tiff-dir=/usr --with-ttf=/usr
--with-system-regex=yes --with-png-dir=/usr/lib 
--enable-trans-sid --enable-gd-imgstrttf --with-ldap=/usr/local/ldap

 Any help would be great.

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


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




[PHP-DEV] Bug #12374: PHP Manual

2001-07-25 Thread paul

From: [EMAIL PROTECTED]
Operating system: Linux 2.4.3
PHP version:  4.0.6
PHP Bug Type: Feature/Change Request
Bug description:  PHP Manual

The user comments at the bottom of each page are 
invaluable. Perhaps periodically, you could provide a 
gzipped mirror of these included in the manual. This 
would no doubt be very successful.

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


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




[PHP-DEV] Re: Bug #12374: PHP Manual

2001-07-25 Thread Paul J

[EMAIL PROTECTED] wrote:

 From: [EMAIL PROTECTED]
 Operating system: Linux 2.4.3
 PHP version:  4.0.6
 PHP Bug Type: Feature/Change Request
 Bug description:  PHP Manual
 
 The user comments at the bottom of each page are
 invaluable. Perhaps periodically, you could provide a
 gzipped mirror of these included in the manual. This
 would no doubt be very successful.
 

Sorry,

Should not have submitted that as a bug really. I have just found these 
newsgroups!!


Paul
-- 
web:  http://myitcv.org.uk/
email: [EMAIL PROTECTED]

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




[PHP-DEV] Bug #12374 Updated: PHP Manual

2001-07-25 Thread kalowsky

ID: 12374
Updated by: kalowsky
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Bogus
Bug Type: Feature/Change Request
Operating System: Linux 2.4.3
PHP Version: 4.0.6
New Comment:

bogus

Previous Comments:


[2001-07-25 13:36:31] [EMAIL PROTECTED]

The user comments at the bottom of each page are 
invaluable. Perhaps periodically, you could provide a 
gzipped mirror of these included in the manual. This 
would no doubt be very successful.






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


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




[PHP-DEV] PHP Manual

2001-07-25 Thread Paul J

Dear php.dev

The user comments at the bottom of each page are
invaluable. Perhaps periodically, you could provide a
gzipped mirror of these included in the manual. This
would no doubt be very successful.


Paul
-- 
web:  http://myitcv.org.uk/
email: [EMAIL PROTECTED]

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




[PHP-DEV] Re: [PEAR-DEV] PHP and WebDAV

2001-07-25 Thread yavo

 The immediately most useful stuff for PHP would be server functionality
 in cooperation with mod_dav.  The client part seems to be much easier to
 implement.  Both Rasmus and I fell off this project as you can see, so
 if someone want to pick it up, that'd be awesome.

  - Stig

If I'm not terribly mistaken WebDav requires some sort of a HTTP server to
work.

I started writing a HTTP::Server module recently. I wanted it so I could
provide XMLPRC interface for Pear enabled sites. Any way the idea is to
write a very basic HTTP server for PEAR (using the socket extension) and
make it extendable so it would be easy inherit it and overwrite some methods
and make it work as a proxy for XMLRPC. Maybe this could also be used for
WebDav.

For all those who are going to say that it's gona have lousy performance I
know

Yavor



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




[PHP-DEV] Bug #12372 Updated: LDAP calls within a function fail

2001-07-25 Thread Mike

ID: 12372
User updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
Status: Open
Bug Type: LDAP related
Operating System: RedHat 7.0
PHP Version: 4.0.6
New Comment:

 One other thingLdap calls seem to work when they are stand alone. Seems that with 
mysql_connect or mysql_pconnect the script goes to hell...

 

Previous Comments:


[2001-07-25 13:24:34] [EMAIL PROTECTED]

 When doing LDAP calls from within a function, it always returns 
'Warning: 1 is not a LDAP link index in blah.php on line 12'

 If I take the same code and put it in a .php file by itself it works great.

?

$ds=ldap_connect(blah.com) || die('Connection Failed');

if ($ds) {
$dn = ou=people, o=blah.com;
$r=ldap_bind($ds);
$justthese = array( ou, sn, givenname, mail, telephonenumber, mobile, 
title);
$filter = sn=*;

$sr=ldap_search($ds, $dn, $filter, $justthese);
$info = ldap_get_entries($ds, $sr);

for ($i=0; $i$info[count]; $i++) {
echo dn is: . $info[$i][dn] .br;
echo first name is: . $info[$i][givenname][0] .br;
echo lastname is: . $info[$i][sn][0] .br;
echo title is : . $info[$i][title][0] .br;
echo email is : . $info[$i][mail][0] .br;
echo telephone is : . $info[$i][telephonenumber][0] .p;
}

ldap_close($ds);
}

?

 I don't get the error at the ldap_connect line so it makes the connection. But when 
it gets to the ldap_bind it bombs out. 

 Here is my config line

./configure  --with-apache=../apache_1.3.20 --with-gd --with-pdflib=/usr/local 
--disable-debug --with-mnogosearch=/usr
/local/mnogosearch --with-mysql=/usr --with-zlib --enable-inline-optimization 
--with-gnu-ld --enable-memory-limit --enab
le-track-vars --with-jpeg-dir=/usr --with-tiff-dir=/usr --with-ttf=/usr 
--with-system-regex=yes --with-png-dir=/usr/lib 
--enable-trans-sid --enable-gd-imgstrttf --with-ldap=/usr/local/ldap

 Any help would be great.

 - Mike





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


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




[PHP-DEV] Sockets

2001-07-25 Thread colin mcdonald

Hey, I appologize ahead of time if this is the wrong forum for this 
question.

Are the php socket functions still as experimental as indicated in the 
manual?

Are they stable on windows and standard distros of linux?

tia,

colin


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




[PHP-DEV] Bug #12377: Socket error

2001-07-25 Thread kingj

From: [EMAIL PROTECTED]
Operating system: Linux 2.2.14
PHP version:  4.0.6
PHP Bug Type: Unknown/Other Function
Bug description:  Socket error 

While working with sockets, when returning a port from a function, you need
to do intvalue($myvariable) for bind() to accept the port.  It doesn't
error out, but just doesn't open the port.
-- 
Edit bug report at: http://bugs.php.net/?id=12377edit=1


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




[PHP-DEV] Bug #12378: checkdate returns TRUE on false date

2001-07-25 Thread webmaster

From: [EMAIL PROTECTED]
Operating system: linux
PHP version:  4.0.6
PHP Bug Type: Date/time related
Bug description:  checkdate returns TRUE on false date

The checkdate doesn't validate correcly on all dates. 

checkdate(2,29,2000); returns true even thoug the year 2000 was not a
leapyear.
-- 
Edit bug report at: http://bugs.php.net/?id=12378edit=1


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




[PHP-DEV] Bug #12376 Updated: PHP isn't loading the extension modules...

2001-07-25 Thread Sephiroth_Zeio

ID: 12376
User updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
Status: Open
Bug Type: GD related
Operating System: Win 98 Second Edition
Old PHP Version: 4.0.4pl1
PHP Version: 4.0.6
New Comment:

I use Apache 1.3.14.  I have specified that I wanted PHP to use ./extensions/ for the 
module extensions directory so I could build images with GD, but it still doesn't see 
the modules.  I even set the extension=php_gd.dll, and when I do a phpinfo(); it 
reports entension_dir as having no value.  Why won't it let me include the file so I 
can build images?

Previous Comments:


[2001-07-25 15:17:05] [EMAIL PROTECTED]

I use Apache 1.3.14.  I have specified that I wanted PHP to use ./extensions/ for the 
module extensions directory so I could build images with GD, but it still doesn't see 
the modules.  I even set the extension=php_gd.dll, and when I do a phpinfo(); it 
reports entension_dir as having no value.  Why won't it let me include the file so I 
can build images?





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


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




[PHP-DEV] Bug #12367 Updated: array_diff don't work with array of array (it did with 4.0.4)

2001-07-25 Thread venaas

ID: 12367
Updated by: venaas
Reported By: [EMAIL PROTECTED]
Status: Open
Bug Type: Arrays related
Operating System: Linux Red hat 7.1 fr
PHP Version: 4.0.6
New Comment:

When I wrote array_diff I didn't think of this use. It
worked by accident. array_diff was changed to avoid
some ordering problems. The way it was there was no well
defined ordering. Due to automatic type conversion, you
you would have 3d  99   370  3d. This made
array_diff fail, this was fixed by always using string
comparisons. That doesn't work for arrays though.

I'm not sure how you would like array_diff on arrays
of arrays work, and I don't plan to fix it. Maybe some-
one wants to, but first of all it must be clear how it
should work.

Could a work around for you be to serialize the arrays?
If $a is an array of arrays, you could perhaps do say
$a[0] = serialize($a[0]); $a[1] = serialize($a[1])...
and so on. One internal PHP solution could perhaps be
to serialize an array when comparing with scalars. Not
sure if I like it myself.


Previous Comments:


[2001-07-25 11:36:08] [EMAIL PROTECTED]

Example of script
?
echo htmlbody\r\n;
echo h1Simple array : it works/h1\r\npre\r\n;
$array1 = array('a1' = 'toto', 'b1' = 'titi', 'b2' = 'tutu', 'b3' = 'rien', 'c1' 
= 'zone');
$array2 = array('a2' = 'adeux', 'b5' = 'titi');
var_dump(array_diff($array1, $array2));

echo \r\n/pre\r\nhr\r\nh1Array of array : it doesn't work/h1\r\npre\r\n;
$array1 = array(
   array('a1' = 'toto', 'b1' = 'titi', 'b2' = 'tutu', 'b3' = 'rien', 'c1' = 
'zone'),
   array('a2' = 'adeux', 'b5' = 'titi'), 
   array('a8' = 'ahuit', 'b12' = 'avion')
);
$array2 = array(
   array('a2' = 'adeux', 'b5' = 'titi'),
   array('a7' = 'asept', 'c5' = 'camion')
);
var_dump(array_diff($array1, $array2));
echo \r\n/pre/body/html\r\n;
?



Command line
 './configure' '--with-apache=../apache' '--with-zlib' '--with-bzip2' 
'--enable-calendar' '--with-cybermut=../cybermut' '--enable-ftp' '--with-gd=../gd' 
'--with-pgsql=/usr/local/psql' '--with-mysql' '--with-sablot' '--with-xml'


Comment
I use array_diff with array of array comming from database since version 4.0.1 without 
any trouble. We just migrate to version 4.0.6 tree days ago with apache 1.3.20.

Congratulation for PHP. I love it :o)






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


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




[PHP-DEV] Bug #12372 Updated: LDAP calls within a function fail

2001-07-25 Thread venaas

ID: 12372
Updated by: venaas
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Feedback
Bug Type: LDAP related
Operating System: RedHat 7.0
PHP Version: 4.0.6
New Comment:

Are you sure the problem isn't simply that you do
$ds = ldap_connet outside the function, and are
not passing $ds as parameter to it? I'm not able to
reproduce this, could you perhaps give an example
script that fails?

Previous Comments:


[2001-07-25 15:14:55] [EMAIL PROTECTED]

 One other thingLdap calls seem to work when they are stand alone. Seems that with 
mysql_connect or mysql_pconnect the script goes to hell...

 



[2001-07-25 13:24:34] [EMAIL PROTECTED]

 When doing LDAP calls from within a function, it always returns 
'Warning: 1 is not a LDAP link index in blah.php on line 12'

 If I take the same code and put it in a .php file by itself it works great.

?

$ds=ldap_connect(blah.com) || die('Connection Failed');

if ($ds) {
$dn = ou=people, o=blah.com;
$r=ldap_bind($ds);
$justthese = array( ou, sn, givenname, mail, telephonenumber, mobile, 
title);
$filter = sn=*;

$sr=ldap_search($ds, $dn, $filter, $justthese);
$info = ldap_get_entries($ds, $sr);

for ($i=0; $i$info[count]; $i++) {
echo dn is: . $info[$i][dn] .br;
echo first name is: . $info[$i][givenname][0] .br;
echo lastname is: . $info[$i][sn][0] .br;
echo title is : . $info[$i][title][0] .br;
echo email is : . $info[$i][mail][0] .br;
echo telephone is : . $info[$i][telephonenumber][0] .p;
}

ldap_close($ds);
}

?

 I don't get the error at the ldap_connect line so it makes the connection. But when 
it gets to the ldap_bind it bombs out. 

 Here is my config line

./configure  --with-apache=../apache_1.3.20 --with-gd --with-pdflib=/usr/local 
--disable-debug --with-mnogosearch=/usr
/local/mnogosearch --with-mysql=/usr --with-zlib --enable-inline-optimization 
--with-gnu-ld --enable-memory-limit --enab
le-track-vars --with-jpeg-dir=/usr --with-tiff-dir=/usr --with-ttf=/usr 
--with-system-regex=yes --with-png-dir=/usr/lib 
--enable-trans-sid --enable-gd-imgstrttf --with-ldap=/usr/local/ldap

 Any help would be great.

 - Mike





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


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




[PHP-DEV] Re: Bug #12378: checkdate returns TRUE on false date

2001-07-25 Thread J Smith

[EMAIL PROTECTED] wrote:

 From: [EMAIL PROTECTED]
 Operating system: linux
 PHP version:  4.0.6
 PHP Bug Type: Date/time related
 Bug description:  checkdate returns TRUE on false date
 
 The checkdate doesn't validate correcly on all dates.
 
 checkdate(2,29,2000); returns true even thoug the year 2000 was not a
 leapyear.

Actually, 2000 was a leap year. 

If the year is not divisible by 100 but is divisible by 4, it is a leap 
year. (1900 is therefore not a leap year.)

If the year is divisible by 100 and is divisible by 400, it is a leap year. 
(2000 is therefore a leap year.)

There is a good FAQ on this at 
http://world.std.com/~dpbsmith/leapyearfaq.txt. 

There's also a good node on this stuff at http://www.everything2.com.

J

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




[PHP-DEV] Bug #12379: conversion from html entities to normal text

2001-07-25 Thread cwalstad

From: [EMAIL PROTECTED]
Operating system: linux
PHP version:  4.0.6
PHP Bug Type: Feature/Change Request
Bug description:  conversion from html entities to normal text

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

Essentially,
htmlentities or htmlspecialcharacters,
except in reverse.

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


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




[PHP-DEV] PHP Extensions: C or C++?

2001-07-25 Thread J Smith


I have a few PHP extensions that I'd be willing to share but I've never 
done this sort of thing before. I wrote a few extensions for work, and my 
company sees no problem in donating them to the open source world and to 
the PHP project, but I'm curious about something:

Are extensions for PHP required to be coded in C, or will C++ do? I'm a C++ 
guy myself, and since PHP is largely written in C, does this cause a huge 
problem? If there's enough interest in any of my extensions, I'd consider a 
re-write from C++ to C, but I don't want to do that if I don't have to.

The only extension really ready for prime-time right now is a rather simple 
Porter stemmer, written in ANSI/ISO C++ using things like the standard C++ 
string library and such. It's a simple extension that we're using to make 
the search engine we're building a bit easier to manage. Any future 
extensions are going to be focused on making search engines easier to 
implement in PHP. (We're building a search engine that uses PHP.)

Any interest in that sort of thing? And if so, C or C++?

J

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




Re: [PHP-DEV] cvs socket extension

2001-07-25 Thread Markus Fischer

On Wed, Jul 25, 2001 at 07:20:57PM +0200, Daniel Beulshausen wrote : 
 At 20:15 24.07.2001 +0200, Markus Fischer wrote:
 I've come up with a patch based on the ideas and suggestion that
 came up in this thread:
 
 - Let the fd_set resource keep track of the highest socket; nuked
_select() first parameter and determine it ourself
 - Swapped _set(), _clear() and _isset() parameters and
recognize plain sockets as well as array of sockets
 
 The patch is against current CVS and only compiled unter linux
 (debian unstable) so far.
 
 Please everyone interested test and verify it and let me know
 what you think. Due my lack of karma I can't commit it anyway,
 feel free to do so if you find it appropriate.
 
 please let me know wether the attached patch fixes your concerns.

It works fine!

I had another patch (which is obsolete now) which a) let the user
pass 0 (or NULL) for all fd set resources to socket_select()
(which is perfectly valid because that way you can wait a
specified amount of time in seconds and finer) and which also allowed
to zero an array of fd set resources.

Do you think you can take on that changes ?

- Markus

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




Re: [PHP-DEV] Sockets

2001-07-25 Thread Markus Fischer

On Wed, Jul 25, 2001 at 03:20:35PM -0400, colin mcdonald wrote : 
 Are the php socket functions still as experimental as indicated in the 
 manual?

They are still experimental and function names/parameter orders
is still subject to change.

Recently there was also a thread about some possible upcoming
changes, just read the archiv.

- Markus

-- 
Markus Fischer,  http://guru.josefine.at/~mfischer/
EMail: [EMAIL PROTECTED]
PGP Public  Key: http://guru.josefine.at/~mfischer/C2272BD0.asc
PGP Fingerprint: D3B0 DD4F E12B F911 3CE1  C2B5 D674 B445 C227 2BD0

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




Re: [PHP-DEV] Security Issues

2001-07-25 Thread PHP

On Tue, Jul 24, 2001 at 08:27:21PM -0700, Zeev Suraski wrote:
 Setting register_globals to off (which is highly recommended) would prevent 
 PHP from defining form variables as global variables.  For quite a while, 
 since the PHP 3.0 times, PHP provided an alternative way of accessing 
 variables - using special designated arrays - $HTTP_POST_VARS, 
 $HTTP_GET_VARS, and so forth.  As of PHP 4.0.3 (IIRC), these variables are 
 always defined, and are protected (to a degree) by PHP.  Setting 
 register_globals to off effectively prevents any outer access to your 
 namespace, outside $HTTP_*_VARS[].
 
 Zeev

But also remove one of the single most convenient features of php.
Having two namespaces... $var and %var for instance would keep that
very very convenient features and also solve the problem.

Orion


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




Re: [PHP-DEV] Security Issues

2001-07-25 Thread PHP

On Wed, Jul 25, 2001 at 07:31:59AM -0700, Rasmus Lerdorf wrote:
 Because not everyone agrees that this is actually highly recommended.
 Most third-party PHP code you may want to run will not work very well with
 register_globals off.  And turning register_globals off isn't actually as
 helpful from a security perspective as many people seem to think.
 
 The basic thing it would help would be in cases like this:
 
?
  if($user=='rasmus') {
$ok = true;
  }
 
  if($ok) {
... secure code ...
  }
?

Don't forget the use of session variables.
On one page you:

session_start();
session_register(user);
$user = 'admin';

And then on another page you:

session_start();
if ($user == 'admin')
{
}

If a malicious user goes to the second page first
they could overwrite $user and break security.


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




Re: [PHP-DEV] cvs socket extension

2001-07-25 Thread Daniel Beulshausen

At 23:25 25.07.2001 +0200, Markus Fischer wrote:
It works fine!

I had another patch (which is obsolete now) which a) let the user
pass 0 (or NULL) for all fd set resources to socket_select()
(which is perfectly valid because that way you can wait a

i don't think this is needed, it would behave like (u)sleep ( besides that 
it won't work under win32 :) )

specified amount of time in seconds and finer) and which also allowed
to zero an array of fd set resources.

not sure about this one, but if (we want to do this) we should determine 
for which fd functions it would make sense too (i.e. socket_fd_free)

daniel

/*--
daniel beulshausen - [EMAIL PROTECTED]
using php on windows? http://www.php4win.de


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




Re: [PHP-DEV] cvs socket extension

2001-07-25 Thread Markus Fischer

On Thu, Jul 26, 2001 at 12:12:43AM +0200, Daniel Beulshausen wrote : 
 At 23:25 25.07.2001 +0200, Markus Fischer wrote:
 It works fine!
 
 I had another patch (which is obsolete now) which a) let the user
 pass 0 (or NULL) for all fd set resources to socket_select()
 (which is perfectly valid because that way you can wait a
 
 i don't think this is needed, it would behave like (u)sleep ( besides that 
 it won't work under win32 :) )

Hehe, oh well 

 specified amount of time in seconds and finer) and which also allowed
 to zero an array of fd set resources.
 
 not sure about this one, but if (we want to do this) we should determine 
 for which fd functions it would make sense too (i.e. socket_fd_free)

I give a +1 for _zero() and _clear() for being the second
parameter an array of resources instead of just one.

- Markus (likes seeing this commited soon :)

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




Re: [PHP-DEV] Sockets

2001-07-25 Thread Markus Fischer

On Wed, Jul 25, 2001 at 11:32:24PM +0200, Markus Fischer wrote : 
 On Wed, Jul 25, 2001 at 03:20:35PM -0400, colin mcdonald wrote : 
  Are the php socket functions still as experimental as indicated in the 
  manual?
 
 They are still experimental and function names/parameter orders
 is still subject to change.
 
 Recently there was also a thread about some possible upcoming
 changes, just read the archiv.

GOD DAMMIT!

and use your fu@#$@# real email address 8=[

- Markus :)

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




[PHP-DEV] Bug #12380: very simple misstake in the configure-script

2001-07-25 Thread malte

From: [EMAIL PROTECTED]
Operating system: all
PHP version:  4.0.6
PHP Bug Type: *Compile Issues
Bug description:  very simple misstake in the configure-script

when you run the configurescript, if you want to use the ttf-string-stuff,
you must type
--enable-gd-native-tt
instead of
--enable-gd-native-ttf

due to a little misstake in the configurescript :)
or you can ofcourse edit the configurefile.


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


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




[PHP-DEV] Bug #12381: Data Structure Dumper Feature Needed

2001-07-25 Thread cdaveb

From: [EMAIL PROTECTED]
Operating system: Linux
PHP version:  4.0.6
PHP Bug Type: Feature/Change Request
Bug description:  Data Structure Dumper Feature Needed

I'd like to suggest that a built in function for dumping PHP data
structures (arrays, variables, etc.) into a string which could then be
exported to a file be created. This would work something like the Perl
Data::Dumper module.  This would be extremely useful for creation of
persistent datastructures, especially helpful for programs which include
web interfaces to edit settings which are used by another portion of the
program.

I find myself writing simple code to do this a lot, but it is something
that gets pretty  messy whenever I'm trying to recreate multidimensional
arrays and such so that they can later be required into a PHP page.  I'm
sure that a function of this type would be useful to a lot of PHP users and
I hope you'll consider adding it.

I've looked at a lot of the code repository sites by the way, and I haven't
found anything that seems to resemble what I'm looking for already
available, but I think it's the type of thing that should really be a part
of the base PHP.

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


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




RE: [PHP-DEV] Bug #12381: Data Structure Dumper Feature Needed

2001-07-25 Thread Brian Tanner

Actually its a great enough idea that its already there ;)

http://www.php.net/manual/en/function.serialize.php
Internal Format

XML Variant if you want to communicate between apps
http://www.php.net/manual/en/ref.wddx.php

:)

I think thats what you are looking for

Brian Tanner
Project Manager
Zaam Internet Solutions
Toll Free: 1-866-225-2675
[EMAIL PROTECTED]
http://www.zaam.com 


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: July 25, 2001 3:31 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DEV] Bug #12381: Data Structure Dumper Feature Needed


From: [EMAIL PROTECTED]
Operating system: Linux
PHP version:  4.0.6
PHP Bug Type: Feature/Change Request
Bug description:  Data Structure Dumper Feature Needed

I'd like to suggest that a built in function for dumping PHP data
structures (arrays, variables, etc.) into a string which could then be
exported to a file be created. This would work something like the Perl
Data::Dumper module.  This would be extremely useful for creation of
persistent datastructures, especially helpful for programs which include
web interfaces to edit settings which are used by another portion of the
program.

I find myself writing simple code to do this a lot, but it is something
that gets pretty  messy whenever I'm trying to recreate multidimensional
arrays and such so that they can later be required into a PHP page.  I'm
sure that a function of this type would be useful to a lot of PHP users and
I hope you'll consider adding it.

I've looked at a lot of the code repository sites by the way, and I haven't
found anything that seems to resemble what I'm looking for already
available, but I think it's the type of thing that should really be a part
of the base PHP.

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


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



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




RE: [PHP-DEV] Bug #12381: Data Structure Dumper Feature Needed

2001-07-25 Thread Cari D. Burstein

Wonderful! I couldn't find it before because I was looking under the 
terminology (export, dump, etc.). This will make my life a lot easier!

I've been looking at WDDX too, although not all the servers I work in have 
that module.

--On Wednesday, July 25, 2001 5:38 PM -0700 Brian Tanner [EMAIL PROTECTED] 
wrote:

: Actually its a great enough idea that its already there ;)
:
: http://www.php.net/manual/en/function.serialize.php
: Internal Format
:
: XML Variant if you want to communicate between apps
: http://www.php.net/manual/en/ref.wddx.php
:
:: )
:
: I think thats what you are looking for
:
: Brian Tanner
: Project Manager
: Zaam Internet Solutions
: Toll Free: 1-866-225-2675
: [EMAIL PROTECTED]
: http://www.zaam.com
:
:
: -Original Message-
: From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
: Sent: July 25, 2001 3:31 PM
: To: [EMAIL PROTECTED]
: Subject: [PHP-DEV] Bug #12381: Data Structure Dumper Feature Needed
:
:
: From: [EMAIL PROTECTED]
: Operating system: Linux
: PHP version:  4.0.6
: PHP Bug Type: Feature/Change Request
: Bug description:  Data Structure Dumper Feature Needed
:
: I'd like to suggest that a built in function for dumping PHP data
: structures (arrays, variables, etc.) into a string which could then be
: exported to a file be created. This would work something like the Perl
: Data::Dumper module.  This would be extremely useful for creation of
: persistent datastructures, especially helpful for programs which include
: web interfaces to edit settings which are used by another portion of the
: program.
:
: I find myself writing simple code to do this a lot, but it is something
: that gets pretty  messy whenever I'm trying to recreate multidimensional
: arrays and such so that they can later be required into a PHP page.  I'm
: sure that a function of this type would be useful to a lot of PHP users
: and I hope you'll consider adding it.
:
: I've looked at a lot of the code repository sites by the way, and I
: haven't found anything that seems to resemble what I'm looking for already
: available, but I think it's the type of thing that should really be a part
: of the base PHP.
:
: --
: Edit bug report at: http://bugs.php.net/?id=12381edit=1
:
:
: --
: PHP Development Mailing List http://www.php.net/
: To unsubscribe, e-mail: [EMAIL PROTECTED]
: For additional commands, e-mail: [EMAIL PROTECTED]
: To contact the list administrators, e-mail: [EMAIL PROTECTED]
:



-Cari D. Burstein
[EMAIL PROTECTED]

|Ye have enemies?  Good, good- that means ye've stood up for|
| something, sometime in thy life  -Elminster of Shadowdale |
|---|
| Cari D. Burstein[EMAIL PROTECTED] |
| http://www.anybrowser.org/cdaveb/ |

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




[PHP-DEV] Help with pear/php module development

2001-07-25 Thread PHP

Hello,
Something seems to have broken in pear that in-turn broke a php module I 
created.

I developed a drop in module for php4 that worked great for PHP-4.0 to 
PHP-4.0.4.  As of 
PHP-4.0.5 it broke and would no longer build properly.  At link time it is failing to 
link to the proper libraries.

Here's a snippet of the make message.

/bin/sh /root/tclink-3.2.2-php/php/libtool --mode=link gcc  -I. 
-I/root/tclink-3.2.2-php/php/ -I/root/tclink-3.2.2-php/php/main 
-I/root/tclink-3.2.2-php/php -I/usr/local/include/php -I/usr/local/include/php/main 
-I/usr/local/include/php/Zend -I/usr/local/include/php/TSRM  -DHAVE_CONFIG_H -g -O2   
-o tclink.la -avoid-version -module -rpath /root/tclink-3.2.2-php/php/modules  
tclink.lo  -L/usr/lib -Wl,lcrypto -Wl,lssl
mkdir .libs
(cd .  ln -s tclink.lo tclink.o)
gcc -shared  tclink.lo  -L/usr/lib -lc  -Wl,-soname -Wl,tclink.so -o 
.libs/tclink.so

There -- that last line should have a -lssl -lcrypto -ltclink but it does not and 
ends up not linking to the proper libraries.

My config.m4 file worked fine for all the other versions of PHP so I am assuming that 
something in pear broke.  I found a fix on Usenet that worked for 4.0.5 but NOT 4.0.6. 
 The fix was to change this step in the install 

./configure --with-tclink=../C --with-ssl=/usr/lib

to this ...

CFLAGS=$CFLAGS -DHAVE_TCLINK=1 -DCOMPILE_DL_TCLINK=1 ./configure --with-tclink=../C 
--with-ssl=/usr/lib

For anyone who wants to look at my package and try to help me find a workaround the 
package can be found here

http://www.trustcommerce.com/tclink-3.2.2-php.tar.gz

Also, here is my config.m4 file.  I have a feeling it can be a LOT simpler but just 
dont understand the tool well enough to know where to go.



dnl $Id: config.m4,v 1.1 2001/03/26 23:26:19 adam Exp $
dnl config.m4 for extension tclink
dnl don't forget to call PHP_EXTENSION(tclink)

PHP_ARG_WITH(ssl, for TCLink (SSL) support,
[  --with-ssl[=DIR]Include TCLink (SSL) support. DIR is the OpenSSL base
  directory.], no)

if test $PHP_SSL != no; then
  AC_MSG_CHECKING(for TCLink (SSL) libraries)

  for i in $PHP_SSL; do
if test -r $i/libssl.a; then
  TCLINK_SSL_LIB_DIR=$i;
fi
  done

  if test -z $TCLINK_SSL_LIB_DIR; then
AC_MSG_ERROR(Cannot find SSL library files under $PHP_SSL)
  fi

  AC_MSG_RESULT($TCLINK_SSL_LIB_DIR)

  AC_ADD_LIBRARY_WITH_PATH(crypto, $TCLINK_SSL_LIB_DIR)
  AC_ADD_LIBRARY_WITH_PATH(ssl, $TCLINK_SSL_LIB_DIR)
fi


PHP_ARG_WITH(tclink, for TCLink support,
[  --with-tclink[=DIR] Include TCLink support. DIR is the TCLink base
  directory.], no)

if test $PHP_TCLINK != no; then

  if test $PHP_SSL = no; then
AC_MSG_ERROR(Cannot enable support for TCLink without OpenSSL libraries)
  fi

  AC_MSG_CHECKING(for TCLink library)

  for i in $PHP_TCLINK; do
if test -r $i/tclink.h; then
  TCLINK_INC_DIR=$i
fi
if test -r $i/libtclink.a; then
  TCLINK_LIB_DIR=$i
fi
if test -r $i/libtclink.so; then
  TCLINK_LIB_DIR=$i
fi
  done

  if test -z $TCLINK_INC_DIR; then
AC_MSG_ERROR(Cannot find header files under $PHP_TCLINK)
  fi

  if test -z $TCLINK_LIB_DIR; then
AC_MSG_ERROR(Cannot find library files under $PHP_TCLINK)
  fi

  AC_MSG_RESULT($TCLINK_LIB_DIR)

  AC_ADD_LIBRARY_WITH_PATH(tclink, $TCLINK_LIB_DIR, TCLINK_SHARED_LIBADD)
  if test $ext_shared = yes; then
TCLINK_SHARED_LIBADD=$TCLINK_SHARED_LIBADD -L$TCLINK_SSL_LIB_DIR -Wl,lcrypto 
-Wl,lssl
  fi

  AC_ADD_INCLUDE($TCLINK_INC_DIR)

  AC_DEFINE(HAVE_TCLINK, 1, [Whether you have TCLink])
  PHP_EXTENSION(tclink, $ext_shared)
  PHP_SUBST(TCLINK_SHARED_LIBADD)
fi



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




[PHP-DEV] Bug #12382: F2S.COM SUX?

2001-07-25 Thread surfer182

From: [EMAIL PROTECTED]
Operating system: Windows
PHP version:  4.0.6
PHP Bug Type: MySQL related
Bug description:  F2S.COM SUX?

I want some information about the f2s.com's database service , because i'm
not getting a good connection ...  
And i want a suggestion about services that support php and database ...
-- 
Edit bug report at: http://bugs.php.net/?id=12382edit=1


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




[PHP-DEV] Bug #12383: $105.04 becomes $105.4!!!

2001-07-25 Thread giancarlo

From: [EMAIL PROTECTED]
Operating system: LINUX
PHP version:  4.0.6
PHP Bug Type: InterBase related
Bug description:  $105.04 becomes $105.4!!!

GGG!! Interbase module has this orrible bug. It 
transforms any BIG INTEGER (ISC_INT64) type with decimal 
points are stripped of it's zeroes between decimal point 
and the first non-zero decimal cipher

I.E. 150.0045 becomes 150.45.

This bug is very fast to find in the code, because the 
transformation from Interbase to PHP data is done with an 
instruction like

sprintf (buffer, %f.%f, [find integer part], [find 
fractional part]); and no control over the zeroes in the 
fractional part. Even wrose, this calculus are done with 2 
heavy double pow calls, divisions and modules (with an 
horrible waste of time...

Now, if I had done an error like that in a programming 
execice, my teacher would have given 2 to me, (that is, 
F), even if I have studied Economics, not IT. How could 
this error have survived since now? It could cost a very 
high price for users, if you think that all the 
transactions in dollars, euros, punds and any currency 
with a fractional part IS WRONG!

Now, I have patced the source; find the static int 
_php_ibase_var_pval function in the interbase.c file, ad 
substitute what is inside the #ifdef SQL_INT64 with the 
following code:

#ifdef SQL_INT64
case SQL_INT64:
/* Experimental section by Giancarlo 
Niccolai */
if (scale) {
int i, len;
sprintf (string_data, %Ld, 
(ISC_INT64) (*((ISC_INT64 *)data)));
len = strlen(string_data);
for (i = 0; i = -scale; i ++) 
string_data[len-i+1] = 
string_data[len-i]; 
string_data[len-i+1] = '.';
val-value.str.len = len+1;
val-value.str.val = 
estrdup(string_data);
}
else {
val-value.str.len = sprintf 
(string_data, %Ld, (ISC_INT64) (*((ISC_INT64 *)data)));
val-type = IS_STRING;
val-value.str.val = 
estrdup(string_data);
}
/* End of experimental section */
   val-type = IS_STRING;

/* OLD CODE */  
/*val-value.str.len =  
sprintf(string_data, %Ld.%Ld,

 (ISC_INT64) (*((ISC_INT64 *)data) 
/ (int) pow(10.0, (double) -scale)),

 (ISC_INT64) abs((int) 
(*((ISC_INT64 *)data) % (int) pow(10.0, (double) 
-scale;
val-value.str.val = 
estrdup(string_data);*/
break;
#endif

The code is faster (you'll have in the wrost case of all 
about 18 iterations on a char array), cleaner and work 
always.

Now, I hope you'll put this code in the PHP dists as soon 
as possible, and give a STRONG evidence of this problem in 
your site, possibily warining all PHP-INTERBASE users, 
that, as I know, are a LOT.

P.S. I found the same error in the PERL DBD::Interbase 
module; I will soon track it down and send a remark to the 
perl community.

Thanks in advance, 
Giancarlo Niccolai.



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


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




[PHP-DEV] Bug #12384: Can't connect to Ingres II

2001-07-25 Thread DwayneMcGarty

From: [EMAIL PROTECTED]
Operating system: Redhat Linux 6.2
PHP version:  4.0.6
PHP Bug Type: *Database Functions
Bug description:  Can't connect to Ingres II

PHP compiled as an APXS module into apache 1.3.14 with Ingres II v2.5. 
Although connecting through sql from the unix command line works, I can't
get a connect to the Ingres database through PHP.

ingtest.php

?

$dbname = kramer::imdb;
$dbuser = webmastr;
$dbpass = ;

ingres_connect($dbname, $dbuser, $dbpass);

?

The error returned always is:

Jul 25 18:36:38 zcalb00d httpd: PHP Warning:  Ingres II:  Server or API
error : Unable to authenticate client's user ID. in
/data/www/htdocs/mdq3/ingtest.php on line 7
Jul 25 18:36:38 zcalb00d httpd: PHP Warning:  Ingres II:  SQLSTATE : 08004
in /data/www/htdocs/mdq3/ingtest.php on line 7
Jul 25 18:36:38 zcalb00d httpd: PHP Warning:  Ingres II:  Unable to connect
to database (kramer::imdb) in /data/www/htdocs/mdq3/ingtest.php on line 7

Here is the configure line used to compile although I have tried shrinking
the enable list down to do without the java, oracle, ldap etc with no
change.

#!/bin/sh

CC=gcc
II_SYSTEM=/opt/ca/caingres
ORACLE_HOME=/u01/home/oracle/dist/8.1.5
LD_LIBRARY_PATH=/u01/home/oracle/dist/8.1.5/lib:$LD_LIBRARY_PATH
PATH=$PATH:/usr/java/jdk1.3.1/bin

export CC II_SYSTEM ORACLE_HOME LD_LIBRARY_PATH PATH


./configure --prefix=/local/apps/fw/php \
--exec-prefix=/local/apps/fw/php\
--with-apxs=/usr/sbin/apxs  \
--enable-track-vars \
--enable-yp \
--enable-sysvsem\
--enable-sysvshm\
--enable-sockets\
--enable-debug  \
--with-java=/usr/java/jdk1.3.1  \
--with-oci8 \
--with-oracle   \
--without-mysql \
--with-ldap \
--with-gd   \
--with-gdbm \
--enable-sigchild   \
--enable-versioning \
--with-ingres   \
--enable-ftp


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


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




Re: [PHP-DEV] Security Issues

2001-07-25 Thread Zeev Suraski

At 07:31 25/07/2001, Rasmus Lerdorf wrote:
Because not everyone agrees that this is actually highly recommended.
Most third-party PHP code you may want to run will not work very well with
register_globals off.  And turning register_globals off isn't actually as
helpful from a security perspective as many people seem to think.

The basic thing it would help would be in cases like this:

?
  if($user=='rasmus') {
$ok = true;
  }

  if($ok) {
... secure code ...
  }
?

Here if someone injected ?ok=1 in the URL then the secure code part would
be run regardless of the $user setting.  Obviously the fix here is to make
sure that $ok is initialized to false at the top of the script.  But since
many people forget to do that, turning off register_globals fixes the
problem.

I tend to agree with the advisory, in the sense that register_globals=on 
encourages insecure code, and it would in fact help to disable it by 
default.  It's true that some (many) people don't understand that they 
shouldn't 'trust' any data coming from POST or cookies anymore than they 
should trust GET (well, in practice - slightly more, as it takes slightly 
more advanced users to work around POST or cookies, than it does to add GET 
variables to the URL).  However, *lots* of pieces of code, probably even 
most of them, are vulnerable to logic bugs because of register_globals set 
to on, bugs that would have otherwise not exist.  Bugs which occur due to 
misunderstanding the 'reliability' of the form data sources are (much) more 
rare, and usually, if not always, involve basic misunderstanding of the Web 
environment.  Security issues that are a result of register_globals=on 
often occur even when the user is knowledgeable, and tries to avoid 
security bugs.  The WTF factor there is pretty high.

The change I would rather see in php.ini would be to have the default
error_level be set to E_ALL because then the above script would generate a
warning complaining about the fact that $ok was not initialized.  Since
PHP can determine when variables are not initialized the case for
turning register_globals off in this example is rather weak.

PHP does not require or even encourage initialization of variables - 
setting $ok to 1, and then checking it with empty() is considered 'clean' 
code, but it'd be equally insecure.


Many people also seem to think that it is somehow more secure if you know
exactly where data is coming from.  So that if you use
$HTTP_POST_VARS['var'] then somehow $var is not spoofable because if you
put ?var=foo in the URL it won't affect anything.  But injecting variables
into POST or Cookie data is trivial so I don't see this argument holding
much water either.

As I said, it's easy, but it is considerably less easy than it is to add 
GET variables.  Let alone the fact that we're also dealing with SERVER and 
ENV vars, which cannot be injected at all.  How about people who check 
server variables, such as HTTPS, using isset()?  register_globals *is* evil.

And the case for leaving register_globals on is that it is a whole lot
easier for people to figure out how to get started with PHP when the data
is just there and you don't have to do any strange array tricks to get at
your data.

I don't think that this arguments holds much water, as register_globals is 
the mother of many many security bugs, found in the most popular PHP apps 
out there.  We need to find a way to access form variables easily, but 
without encouraging insecure coding, the way we do now.

Zeev


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




RE: [PHP-DEV] Security Issues

2001-07-25 Thread Zeev Suraski

Guys, look back at the advisory.  Apps written by *GOOD* PHP coders who 
*ARE* aware of security issues were prone to register_globals=on attacks.

As the guy said in the advisory, it's arguable whether it's the language's 
responsibility to guide you to write a secure app, or whether it's the 
coder's responsibility.  He says, and I agree with him, that if the 
language 'encourages' you to write insecure apps, by providing and 
streamlining insecure ways of implementing functionality, the language is 
at fault.  If most of the PHP apps out there are or were vulnerable to 
register_globals=on attacks, we can't (shouldn't) blame the whole world, 
but fix the language instead.

Zeev

At 10:49 25/07/2001, Brian Tanner wrote:
I'm gonna have to go ahead and agree with Peter.  As a relative Newbie to
PHP (1 year), I can tell you that when I switched from Perl to PHP, one of
the biggest Wow, this is great features was the easy variable access.  It
makes it fast for a newbie to hack something together that works -- which is
often all that is really needed.

Should the average script be coded better?  Yes.  However, you can't
legislate good coding by imposing sanctions on technique. (IMHO)

I agree with Peter that if someone is writing a script with security even in
the back corner of their mind, they will be initializing variables, and
grabbing them from the appropriate HTTP_*_VARS.

If someone has no clue about security, they are lost anyway.  You can't
*force* their script to be secure from the outside.  More likely, they are a
novice programmer and will give up on PHP just as they have on Perl --
because it is just too difficult for them to learn.

My .02

-Brian Tanner

 this is not a language issue, it is a
 script-coder one,
 if someone is not able to handle this,
 he is not able to write scripts if register_globals is turned off
 too
 
 - Peter


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

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


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




Re: [PHP-DEV] Security Issues

2001-07-25 Thread Zeev Suraski

No obscure %$!@*% variables was one of our main design goals in PHP, only $ 
for denoting variables.  This one is here to stay :)

At 14:58 25/07/2001, PHP wrote:
On Tue, Jul 24, 2001 at 08:27:21PM -0700, Zeev Suraski wrote:
  Setting register_globals to off (which is highly recommended) would 
 prevent
  PHP from defining form variables as global variables.  For quite a while,
  since the PHP 3.0 times, PHP provided an alternative way of accessing
  variables - using special designated arrays - $HTTP_POST_VARS,
  $HTTP_GET_VARS, and so forth.  As of PHP 4.0.3 (IIRC), these variables are
  always defined, and are protected (to a degree) by PHP.  Setting
  register_globals to off effectively prevents any outer access to your
  namespace, outside $HTTP_*_VARS[].
 
  Zeev

But also remove one of the single most convenient features of php.
Having two namespaces... $var and %var for instance would keep that
very very convenient features and also solve the problem.

 Orion

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


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




Re: [PHP-DEV] cvs socket extension

2001-07-25 Thread Chris Vandomelen

 At 20:15 24.07.2001 +0200, Markus Fischer wrote:
 I've come up with a patch based on the ideas and suggestion that
 came up in this thread:
 
 - Let the fd_set resource keep track of the highest socket; nuked
_select() first parameter and determine it ourself
 - Swapped _set(), _clear() and _isset() parameters and
recognize plain sockets as well as array of sockets
 
 The patch is against current CVS and only compiled unter linux
 (debian unstable) so far.
 
 Please everyone interested test and verify it and let me know
 what you think. Due my lack of karma I can't commit it anyway,
 feel free to do so if you find it appropriate.

 please let me know wether the attached patch fixes your concerns.

Looks good. But it doesn't matter if someone passes no sets into select():
if there are no sets, it essentially becomes a usleep().

Chris


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




Re: [PHP-DEV] cvs socket extension

2001-07-25 Thread Markus Fischer

On Wed, Jul 25, 2001 at 06:37:25PM -0700, Chris Vandomelen wrote : 
  At 20:15 24.07.2001 +0200, Markus Fischer wrote:
  I've come up with a patch based on the ideas and suggestion that
  came up in this thread:
  
  - Let the fd_set resource keep track of the highest socket; nuked
 _select() first parameter and determine it ourself
  - Swapped _set(), _clear() and _isset() parameters and
 recognize plain sockets as well as array of sockets
  
  The patch is against current CVS and only compiled unter linux
  (debian unstable) so far.
  
  Please everyone interested test and verify it and let me know
  what you think. Due my lack of karma I can't commit it anyway,
  feel free to do so if you find it appropriate.
 
  please let me know wether the attached patch fixes your concerns.
 
 Looks good. But it doesn't matter if someone passes no sets into select():
 if there are no sets, it essentially becomes a usleep().

Yes I know, I had another patch which took care of this. But
Daniels latest commit took care of everything, looks very good
now :)

- Markus

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




Re: [PHP-DEV] cvs socket extension

2001-07-25 Thread Chris Vandomelen

  Looks good. But it doesn't matter if someone passes no sets into select():
  if there are no sets, it essentially becomes a usleep().

 Yes I know, I had another patch which took care of this. But
 Daniels latest commit took care of everything, looks very good
 now :)

I saw the patch :)

Just didn't get far enough through my inbox to notice that it had been
committed .. especially since it was buried in about 200 other messages.
:)

Chris


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




[PHP-DEV] Bug #12385: getmxrr returns an invalid false message when...

2001-07-25 Thread willwong

From: [EMAIL PROTECTED]
Operating system: FreeBSD
PHP version:  4.0.6
PHP Bug Type: Mail related
Bug description:  getmxrr returns an invalid false message when...

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

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

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

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

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

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

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


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


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




[PHP-DEV] Bug #12382 Updated: F2S.COM SUX?

2001-07-25 Thread zak

ID: 12382
Updated by: zak
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Bogus
Bug Type: MySQL related
Operating System: Windows
PHP Version: 4.0.6
New Comment:

Sorry - this is for bug reports only.

For the information you seek, visit http://www.php.net/links.php

Previous Comments:


[2001-07-25 19:24:50] [EMAIL PROTECTED]

I want some information about the f2s.com's database service , because i'm not getting 
a good connection ...  
And i want a suggestion about services that support php and database ...





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


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




[PHP-DEV] Bug #12386: Mac Carriage Returns cause PHP to choke

2001-07-25 Thread danradigan

From: [EMAIL PROTECTED]
Operating system: macintosh
PHP version:  4.0.4
PHP Bug Type: Unknown/Other Function
Bug description:  Mac Carriage Returns cause PHP to choke

When authoring php on the macintosh, php will not compile 
scripts when using macintosh native carriage returns.
-- 
Edit bug report at: http://bugs.php.net/?id=12386edit=1


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




Re: [PHP-DEV] Security Issues

2001-07-25 Thread Rasmus Lerdorf

 I tend to agree with the advisory, in the sense that register_globals=on
 encourages insecure code, and it would in fact help to disable it by
 default.  It's true that some (many) people don't understand that they
 shouldn't 'trust' any data coming from POST or cookies anymore than they
 should trust GET (well, in practice - slightly more, as it takes slightly
 more advanced users to work around POST or cookies, than it does to add GET
 variables to the URL).  However, *lots* of pieces of code, probably even
 most of them, are vulnerable to logic bugs because of register_globals set
 to on, bugs that would have otherwise not exist.  Bugs which occur due to
 misunderstanding the 'reliability' of the form data sources are (much) more
 rare, and usually, if not always, involve basic misunderstanding of the Web
 environment.  Security issues that are a result of register_globals=on
 often occur even when the user is knowledgeable, and tries to avoid
 security bugs.  The WTF factor there is pretty high.

But you don't acknowledge here that turning on E_NOTICE by default would
effectively eliminate this coding mistake.

 The change I would rather see in php.ini would be to have the default
 error_level be set to E_ALL because then the above script would generate a
 warning complaining about the fact that $ok was not initialized.  Since
 PHP can determine when variables are not initialized the case for
 turning register_globals off in this example is rather weak.

 PHP does not require or even encourage initialization of variables -
 setting $ok to 1, and then checking it with empty() is considered 'clean'
 code, but it'd be equally insecure.

Huh?  Please show a code example here.

 As I said, it's easy, but it is considerably less easy than it is to add
 GET variables.  Let alone the fact that we're also dealing with SERVER and
 ENV vars, which cannot be injected at all.  How about people who check
 server variables, such as HTTPS, using isset()?  register_globals *is* evil.

We are talking about default settings here.  You cannot spoof this script
using the current default:

? echo $REMOTE_ADDR ?

You can stick all the ?REMOTE_ADDR=foo you want in the URL and the server
var will always overwrite it in the default config due to the default
variables_order setting.

 And the case for leaving register_globals on is that it is a whole lot
 easier for people to figure out how to get started with PHP when the data
 is just there and you don't have to do any strange array tricks to get at
 your data.

 I don't think that this arguments holds much water, as register_globals is
 the mother of many many security bugs, found in the most popular PHP apps
 out there.  We need to find a way to access form variables easily, but
 without encouraging insecure coding, the way we do now.

I disagree.  Please show examples of this mother of all security bugs
here.  Examples of this not caught by E_NOTICE are difficult to come up
with.

-Rasmus


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




[PHP-DEV] Bug #12387: require_once doesn't support relative paths

2001-07-25 Thread willwong

From: [EMAIL PROTECTED]
Operating system: FreeBSD
PHP version:  4.0.6
PHP Bug Type: Feature/Change Request
Bug description:  require_once doesn't support relative paths

require_once doesn't support relative paths.

ie. require_once('../blah.php');

won't work.

Only absolute paths work and this makes the function very unuseful at
times.

Suggestion:

Make require_once support relative paths.
-- 
Edit bug report at: http://bugs.php.net/?id=12387edit=1


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




[PHP-DEV] Bug #12389: bad performance of odbc_free_memory with ibm db2

2001-07-25 Thread norbert . pomaroli

From: [EMAIL PROTECTED]
Operating system: SuSe 7.1
PHP version:  4.0.6
PHP Bug Type: ODBC related
Bug description:  bad performance of odbc_free_memory with ibm db2

calling odbc_free_memory frequently causes a delay of 0.3 secs when using
ibm db2 udb v7.1 (FP2)
when i do not use odbc_free_memory between calls of odbc_exec, then
submitting the query takes about 0.3 secs longer or returning from a
function which called odbc_exec causes the delay.

the time delay seems to be dependent on system memory, because with 384MB
(and a single processor system) it is much less then with 1GB (and a dual
processor system)

the same application using a mysql-database (which is identically to the
db2-database) does not suffer any performance problems (and takes some
1/100 secs for the same queries), so i think the problem may be in the
unified odbc-functions.
maybe this is related to the memory leak problem reported before, but i
thought this should be solved in 4.0.6

i applied the limit-memory-patch and configured php-4.0.6 with:
./configure '--enable-safe-mode' '--enable-sysvsem' '--enable-sysvshm'
'--enable-trans-sid' '--enable-magic-quotes' '--enable-memory-limit'
'--with-ttf' '--with-imap' '--with-gd=yes' '--enable-yp'
'--with-jpeg-dir=/usr' '--with-tiff-dir=/usr'
'--with-config-file-path=/etc/httpd' '--with-apxs=/usr/sbin/apxs -ltiff
-lnsl -lpdf -ljpeg' '--with-exec-dir=/usr/lib/apache/bin' --with-openssl
--with-mcrypt '--with-ibm-db2=/home/db2inst1/sqllib' --disable-debug

additionally i use a compiled version of the php-scripts, with the zend
optimizer 1.1.0, but without compiling the scripts, the problem still
persists.
-- 
Edit bug report at: http://bugs.php.net/?id=12389edit=1


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




[PHP-DEV] Bug #12390: Apache returns php pages with zero sized reply

2001-07-25 Thread agocs

From: [EMAIL PROTECTED]
Operating system: Suse linux 6.3
PHP version:  4.0.6
PHP Bug Type: Apache related
Bug description:  Apache returns php pages with zero sized reply

php pages work OK for some time, but after a while (from 1-2 hours to 1-2
days) i can get onyl zero sized replies from all kind of php pages.
Restarting apache helps in this case.

apache is 1.3.9-18
and
configure --with-apxs=/usr/sbin/apxs --with-ftp --with-gd=/usr
--with-png-dir=/usr --with-mysql --with-hyperwave --with-dbase
--with-filepro --enable-debug --enable-track-vars --enable-magic-quotes
--enable-force-cgi-redirect --enable-discard-path --enable-memory-limit
--disable-url-fopen-wrapper --enable-sysvsem --enable-sysvshm --with-zlib

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


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




[PHP-DEV] Bug #12378 Updated: checkdate returns TRUE on false date

2001-07-25 Thread andy

ID: 12378
Updated by: andy
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Bogus
Bug Type: Date/time related
Operating System: linux
PHP Version: 4.0.6
New Comment:

2000 is a leap year...

Previous Comments:


[2001-07-25 15:47:33] [EMAIL PROTECTED]

The checkdate doesn't validate correcly on all dates. 

checkdate(2,29,2000); returns true even thoug the year 2000 was not a leapyear.





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


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




[PHP-DEV] Bug #9906 Updated: Problems with result-set from temporary tables

2001-07-25 Thread andy

ID: 9906
Updated by: andy
Reported By: [EMAIL PROTECTED]
Old Status: Feedback
Status: Closed
Bug Type: Sybase-ct (ctlib) related
Operating System: Linux RedHat 7.0
PHP Version: 4.0.3pl1
New Comment:

no feedback...

Previous Comments:


[2001-06-26 17:07:51] [EMAIL PROTECTED]

Have you tried my example? If so, what results do you
have? It may very well be that I simply didn't create
a complex enough example, or something, but I don't
see a bug, so this'll be closed if you don't have
anything further to add.



[2001-03-22 10:36:57] [EMAIL PROTECTED]

I have a hard time believing that this is a PHP bug.

#1: Try upgrading to a newer release.
#2: Here is what I tried to test your bug:
 create proc phpb
 as
 begin
   create table #phpb (id int, foo varchar(255))
   insert into #phpb values (1, a)
   insert into #phpb values (1, a)
   insert into #phpb values (1, a)
   insert into #phpb values (1, a)
   insert into #phpb values (1, a)
   insert into #phpb values (1, a)
   insert into #phpb values (1, a)
   insert into #phpb values (1, a)

select * from #phpb

end

PHP script looks like:
?php

$db = sybase_connect(...);

$qu = sybase_query(phpb);

while ($a = sybase_fetch_array($qu)) {
var_dump($a);
}
?

I got the exact same result from both PHP and isql...



[2001-03-21 17:46:07] [EMAIL PROTECTED]

I have some stored procedures that return a result from a temporary table. When via 
ct-lib i try to get the rows it didn´t return anything.
I try with the function sybase_query , and when i get the resource handler none of 
this functions give me any result:
sybase_num_rows, sybase_fetch_array,sybase_fetch_row.

the reproduction is easy just create a stored procedure that create, fill and select a 
temporary table.

if you use the php ct-lib functions they didn´t return any result.







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


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




[PHP-DEV] Bug #11648 Updated: Configure fails to detect crypt()

2001-07-25 Thread andy

ID: 11648
Updated by: andy
Reported By: [EMAIL PROTECTED]
Old Status: Feedback
Status: Closed
Bug Type: *Encryption and hash functions
Operating System: Mac OS X 10.0.4 (Darwin 1.3.7)
PHP Version: 4.0.6
New Comment:

no feedback...

Previous Comments:


[2001-06-25 10:11:28] [EMAIL PROTECTED]

It also checks for unistd.h. But it doesn't affect whether
or not crypt() is found. The check for crypt() is later 
in the configure and it shouldn't matter if crypt.h is found 
or not. 

Please send me your config.log file so I can see what might
be the cause. I wonder if there is libcrypt in your system?
Or is crypt() provided by some other library?

--Jani






[2001-06-25 03:30:08] [EMAIL PROTECTED]

When I run configure, it says :
checking for crypt.h... no

And so disables crypt() function.

My system doesn't have crypt.h ; crypt() function is in unistd.h.

I've managed to compile a small C program which includes unistd.h, and then uses 
crypt(), and everything works properly.

Can configure check for crypt() in unistd.h ?





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


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