[PHP-DEV] Bug #11919: bad return of yp_next

2001-07-06 Thread Bernard . Prevosto

From: [EMAIL PROTECTED]
Operating system: Solaris 5.5.1
PHP version:  4.0.6
PHP Bug Type: YP/NIS related
Bug description:  bad return of  yp_next

Hello,

the next script is OK with php4.0.5 but not with php4.0.6
---

?php
  $map = hosts.byname;
  $domain = yp_get_default_domain();
 echo Le domaine par défaut est :  . $domain . \n;
$order = yp_order($domain,$map);
  echo Le numéro d'ordre de cette carte est :  .
$order . \n;   
  $master = yp_master($domain, $map);
  echo Master for this map is:  . $master .\n;
$entry = yp_match($domain, $map, balanec);
echo La valeur trouvée est:  . $entry .\n;
  
$entry = yp_first($domain, $map);
print_r ($entry);
 $key = $entry [key];
  $value = $entry [value];
  
 echo La première entrée de cette carte est  . $key .
 et sa valeur est  . $value . \n;
 $first = $key;
  $entry = yp_next($domain, $map, $first);
  print_r ($entry);
  
  
if(!$entry) {
echo yp_errno() . :  . yp_err_string() . \n;
}
$key = key ($entry);

  

$value = $entry [$key];
   


echo L'entree suivante après $first a la cle   . $key
.  et sa valeur  . $value .\n;


with php4.0.5 the result is:
-

Le domaine par défaut est : brest.ifremer.fr
Le numéro d'ordre de cette carte est : 994254209
Master for this map is: brest
La valeur trouvée est: 134.246.166.3balanec

Array
(
[key] = cata3000gm611

[value] = 134.246.148.206  cata3000gm611

)
La première entrée de cette carte est cata3000gm611
 et sa valeur est 134.246.148.206   cata3000gm611

Array
(
[cata3000720def
] = 134.246.171.208cata3000720def

)
L'entree suivante après cata3000gm611
 a la cle  cata3000720def
 et sa valeur 134.246.171.208   cata3000720def


but whith php4.0.6 th result is:
--



Le domaine par défaut est : brest.ifremer.fr
Le numéro d'ordre de cette carte est : 994254209
Master for this map is: brest
La valeur trouvée est: 134.246.166.3balanec
Array
(
[cata3000gm611] = 134.246.148.206   cata3000gm611
[key] = cata3000gm611
[value] = 134.246.148.206  cata3000gm611
)
La première entrée de cette carte est cata3000gm611 et sa valeur est
134.246.148.206cata3000gm611
Array
(
[br166-156] = 134.246.166.156  br166-156
)
L'entree suivante après cata3000gm611 a la cle  br166-156 et sa valeur 

-

the last value is missing.

my configure line is:
./configure \
--with-apache=/home1/beniguet/tmsiric/bpre/anonymous/apache/apache_1.3.19 \
--with-ldap=/home/services/systeme/reseau/openldap \
--with-mysql=/home1/iletudy/www/httpd/mysql \
--with-pgsql=/home1/iletudy/www/httpd/pgsql \
--with-sybase=/home1/iletudy/www/httpd/sybase \
--with-oracle=/home1/iletudy/www/httpd/oracle \
--with-oci8=/home1/iletudy/www/httpd/oracle \
--with-gd=/home/services_SV/bibli/gdlib \
--with-zlib-dir=/home/services_SV/bibli/zlib \
--with-jpeg-dir=/home/services_SV/bibli/jpeglib \
--with-png-dir=/home/services_SV/bibli/pnglib \
--with-tiff-dir=/home/services_SV/bibli/tifflib \
--with-imap=/home1/iletudy/www/httpd/imap \
--with-snmp=/home/services_SV/systeme/reseau/ucd-snmp \
--with-mcrypt=/home/services_SV/bibli/mcryptlib \
--with-sablot=/home/services_SV/bibli/sablotlib \
--enable-yp \
--enable-ftp \
--enable-calendar \
--disable-pear \
--with-config-file-path=/home1/iletudy/www/httpd/php







-- 
Edit Bug report at: http://bugs.php.net/?id=11919edit=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] Transparent use of blobs in Interbase

2001-07-06 Thread derick

Hello,

On Thu, 5 Jul 2001, Jeremy Bettis wrote:

 This patch will make it so that no special effort is required to use blobs
 in interbase.  Since the blob functions don't seem to work right anyway, I
 see no reason that you should not include this patch.  (patch against
 current cvs)

Can you send this patch to the list as an attachment? It's a little messed
up due to line endings.

Derick



 Index: ext/interbase/interbase.c
 ===
 RCS file: /repository/php4/ext/interbase/interbase.c,v
 retrieving revision 1.58
 diff -u -r1.58 interbase.c
 --- ext/interbase/interbase.c 2001/06/09 09:30:42 1.58
 +++ ext/interbase/interbase.c 2001/07/05 19:12:46
 @@ -25,6 +25,15 @@

  /*
   Changes:
 + 2001-06-13: Jeremy Bettis [EMAIL PROTECTED]
 + - Return the text of blobs in _php_ibase_fetch_hash, not the blob
 +   handles, even if the BLOB is not of TEXT type
 +  2001-05-31: Jeremy Bettis [EMAIL PROTECTED]
 +   - If a blob handle was expected and something else was
 + received create a blob and add the value to it.
 +   - If the incoming argument to a bind parameter is NULL
 + then store a NULL in the database.
 +   - More verbose date errors.
1999-09-21: Ivo Panacek [EMAIL PROTECTED]
 - added COMPILE_DL section
 - more verbose php_info_ibase function
 @@ -1130,7 +1139,7 @@

  /* {{{ _php_ibase_bind()
 Bind parameter placeholders in a previously prepared query */
 -static int _php_ibase_bind(XSQLDA *sqlda, pval **b_vars, BIND_BUF *buf)
 +static int _php_ibase_bind(XSQLDA *sqlda, pval **b_vars, BIND_BUF *buf,
 ibase_query *ib_query)
  {
   XSQLVAR *var;
   pval *b_var;
 @@ -1143,6 +1152,15 @@
var-sqlind  = buf[i].sqlind;
b_var = b_vars[i];

 +  if (b_var-type == IS_NULL) {
 +   static char nothing[64];
 +   static short null_flag = -1;
 +   var-sqldata = nothing;
 +   var-sqltype |= 1;
 +   var-sqlind = null_flag;
 +   if (var-sqllen  64)
 +var-sqllen = 64;
 +  } else
switch(var-sqltype  ~1) {
 case SQL_TEXT:  /* direct to variable */
 case SQL_VARYING:
 @@ -1220,7 +1238,7 @@
   n = sscanf(b_var-value.str.val,%d%*[/]%d%*[/]%d %d%*[:]%d%*[:]%d,
   t.tm_mon, t.tm_mday, t.tm_year,  t.tm_hour, t.tm_min,
 t.tm_sec);
   if(n != 3  n != 6){
 -  _php_ibase_module_error(invalid date/time format);
 +  _php_ibase_module_error(invalid date/time format: Expected 3 or 6
 fields, got %d. Use format m/d/Y H:i:s. You gave '%s', n,
 b_var-value.str.val);
return FAILURE;
   }
   t.tm_year -= 1900;
 @@ -1278,12 +1296,36 @@
   if (b_var-type != IS_STRING
|| b_var-value.str.len != sizeof(ibase_blob_handle)
|| ((ibase_blob_handle *)(b_var-value.str.val))-bl_handle != 0) {
 +  IBLS_FETCH();
 +  ibase_blob_handle *ib_blob;
 +  ib_blob = (ibase_blob_handle *) emalloc(sizeof(ibase_blob_handle));
 +  ib_blob-trans_handle = ib_query-trans;
 +  ib_blob-link = ib_query-link;
 +  ib_blob-bl_handle = NULL;
 +  if (isc_create_blob(IB_STATUS, ib_blob-link,
 ib_blob-trans_handle, ib_blob-bl_handle, ib_blob-bl_qd)) {
 +   efree(ib_blob);
 +   _php_ibase_error();
 +   return FAILURE;
 +  }
 +  convert_to_string(b_var);
 +  if (isc_put_segment(IB_STATUS, ib_blob-bl_handle, (unsigned short)
 b_var-value.str.len, b_var-value.str.val)) {
 +   _php_ibase_error();
 +   return FAILURE;
 +  }
 +  if (isc_close_blob(IB_STATUS, ib_blob-bl_handle)) {
 +   _php_ibase_error();
 +   return FAILURE;
 +  }
 +  ib_blob_id = ib_blob;
 +  var-sqldata = (void ISC_FAR *)ib_blob_id-bl_qd;
 +/*
_php_ibase_module_error(invalid blob id string);
return FAILURE;
 +*/
 + } else {
 +  ib_blob_id = (ibase_blob_handle *)b_var-value.str.val;
 +  var-sqldata = (void ISC_FAR *)ib_blob_id-bl_qd;
   }
 - ib_blob_id = (ibase_blob_handle *)b_var-value.str.val;
 -
 - var-sqldata = (void ISC_FAR *)ib_blob_id-bl_qd;
  }
 break;
 case SQL_ARRAY:
 @@ -1395,7 +1437,7 @@
in_sqlda = emalloc(XSQLDA_LENGTH(ib_query-in_sqlda-sqld));
memcpy(in_sqlda, ib_query-in_sqlda,
 XSQLDA_LENGTH(ib_query-in_sqlda-sqld));
bind_buf = emalloc(sizeof(BIND_BUF) * ib_query-in_sqlda-sqld);
 -  if (_php_ibase_bind(in_sqlda, args, bind_buf) == FAILURE) {
 +  if (_php_ibase_bind(in_sqlda, args, bind_buf, ib_query) == FAILURE) {
 IBDEBUG(Could not bind input XSQLDA... (_php_ibase_exec));
 goto _php_ibase_exec_error;
}
 @@ -1961,7 +2003,7 @@
   _php_ibase_var_pval(tmp, var-sqldata, var-sqltype, var-sqllen,
 var-sqlscale, flag);
   break;
  case SQL_BLOB:
 - if (flag  PHP_IBASE_TEXT) { /* text ? */
 + if (1 /*flag  PHP_IBASE_TEXT*/) { /* text ? */
int stat;
isc_blob_handle bl_handle = NULL;
ISC_LONG max_len = 0, cur_len = 0;


 --
 Jeremy Bettis
 [EMAIL PROTECTED]



 --
 PHP Development Mailing List http://www.php.net/
 To 

[PHP-DEV] Bug #11914 Updated: Segmentation fault on Apache 1.3.20/1.3.19

2001-07-06 Thread derick

ID: 11914
Updated by: derick
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Feedback
Bug Type: Apache related
Operating system: 
PHP Version: 4.0.6
Assigned To: 
Comments:

What is your configure line? (To both Apache and PHP)

Derick

Previous Comments:
---

[2001-07-05 15:50:29] [EMAIL PROTECTED]


I was installing PHP support on my Apache 1.3.19 as Static Module, when 
after I done the
steps for installing and starting Apache daemon I was the following error 
messages on
apache's log:

[Thu Jul  5 15:44:43 2001] [notice] Apache/1.3.20 (Unix) PHP/4.0.6 
configured -- resuming
normal operations
[Thu Jul  5 15:45:31 2001] [notice] child pid 24328 exit signal 
Segmentation fault (11)
[Thu Jul  5 15:45:34 2001] [notice] child pid 24327 exit signal 
Segmentation fault (11)

And all requests I did to my webserver I received that messages and 
nothing was returned
back to my browser

After some tries to compile with different apache versions, I tried to 
compile a different
PHP version, 3.0.5, with my Apache on Static Mode, and I got it!

I don't know what is going on with PHP/4.0.6, but I couldn't install with 
Apache/1.3.20 on
a SuSE 7.0

p.s. - I tried once a installation as Dynamic Module and I hadn't sucessful too.
p.s. 2 - I used the following parameters to configure PHP, other parameters were 
default:
./configure --with-pgsql=/usr/lib/pgsql/ --with-apache=../apache_1.3.20
--enable-track-vars

---

[2001-07-05 15:38:30] [EMAIL PROTECTED]


I was installing PHP support on my Apache 1.3.19 as Static Module, when after I done 
the steps for installing and starting Apache daemon I was the following error messages 
on apache's log:

[Thu Jul  5 15:44:43 2001] [notice] Apache/1.3.20 (Unix) PHP/4.0.6 configured -- 
resuming normal operations
[Thu Jul  5 15:45:31 2001] [notice] child pid 24328 exit signal Segmentation fault 
(11)
[Thu Jul  5 15:45:34 2001] [notice] child pid 24327 exit signal Segmentation fault 
(11)

And all requests I did to my webserver I received that messages and nothing was 
returned back to my browser

After some tries to compile with different apache versions, I tried to compile a 
different PHP version, 3.0.5, with my Apache on Static Mode, and I got it!

I don't know what is going on with PHP/4.0.6, but I couldn't install with 
Apache/1.3.20 on a SuSE 7.0

p.s. I tried once a installation as Dynamic Module and I hadn't sucessful too.

---



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


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




[PHP-DEV] Bug #11915 Updated: path problems

2001-07-06 Thread derick

ID: 11915
Updated by: derick
Reported By: [EMAIL PROTECTED]
Old-Status: Closed
Status: Bogus
Bug Type: LDAP related
Operating system: 
PHP Version: Earlier? Upgrade first!
Assigned To: 
Comments:

Bogus

Previous Comments:
---

[2001-07-05 16:04:45] [EMAIL PROTECTED]

Where do you set the paths so that the library files can be found?

Syntax error on line 207 of /usr/local/apachessl/conf/httpd.conf:
Cannot load /usr/local/apachessl/libexec/libphp4.so into server: ld.so.1: 
/usr/local/apachessl/bin/httpd: fatal: libldapssl41.so: open failed: No such file or 
directory


---



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


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




[PHP-DEV] Bug #11917 Updated: imageDashedLine() only seems to draw vertical lines

2001-07-06 Thread derick

ID: 11917
Updated by: derick
Reported By: [EMAIL PROTECTED]
Status: Open
Bug Type: GD related
Operating system: 
PHP Version: 4.0.6
Assigned To: 
Comments:

I complained about this too, a while ago (bug 11663).

The way it works in 4.0.6 is using imagesetstyle
with imageline, this is in new documentation at
imagedashedline.

However, IMHO:

steam
A function should not suddenly stop working. It either
should be dropped, or should continue to work as before.
At least not between minor releases. At least not without
_any_ warnings in release notes. (A mention about GD library
version change is not enough)
_any_ warnings in release notes. (A mention about GD library
version change is not enough)
/steam

I worked around it with this (my client still has 4.0.5, I upgraded
to 4.0.6):

function MDashedLine($image, $x0, $y0, $x1, $y1, $fg, $bg)
{
if (PHP_VERSION == 4.0.5) {
ImageDashedLine($image, $x0, $y0, $x1, $y1, $fg);
}
else {
$st = array($fg, $fg, $fg, $fg, $bg, $bg, $bg, $bg);
ImageSetStyle($image, $st);
ImageLine($image, $x0, $y0, $x1, $y1, IMG_COLOR_STYLED);
}
} // MDashedLine

Previous Comments:
---

[2001-07-05 20:05:36] [EMAIL PROTECTED]

Using PHP 4.0.6, GD 2.0.1, Apache 1.3.19, and a TrueColor image, this code:

  $img = imageCreateTrueColor (64, 64);
  $wht = imageColorAllocate ($img, 255, 255, 255);
  imageFill ($img, 0, 0, $wht);
  $red = imageColorAllocate ($img, 255, 0, 0);
  $x1 = 16; $y1 = 16; $x2 = 48; $y2 = 48;
  imageDashedLine ($img, $x1, $y1, $x1, $y2, $red);
  imageDashedLine ($img, $x1, $y1, $x2, $y2, $red);
  imageDashedLine ($img, $x1, $y1, $x2, $y1, $red);
  imageDashedLine ($img, $x2, $y2, $x1, $y2, $red);
  imageDashedLine ($img, $x1, $y2, $x2, $y1, $red);
  imageDashedLine ($img, $x2, $y1, $x2, $y2, $red);
  header (Content-type: image/png);
  imagePNG ($img);

Should produce a red square with diagonal lines.  Instead it produces only the 
vertical lines, in a PNG found at 
  http://www.kyhm.com/gd/dashedline.png

Configure line:
./configure --with-apxs=/usr/local/sbin/apxs --with-config-file-path=/etc/httpd 
--enable-openssl=/usr/local --with-gd=/usr/local --with-jpeg-dir=/usr 
--with-tiff-dir=/usr --with-zlib=/usr --with-png-dir=/usr --with-xpm-dir=/usr/X11R6 
--with-freetype-dir=/usr/local --with-t1lib=/usr/local --with-mysql=/usr/local 
--with-pdflib --with-pgsql --enable-readline=/usr --enable-trans-sid --enable-sockets 
--enable-memory-limit --enable-shared --with-mcrypt=/usr/local --enable-ctype 
--enable-bcmath --enable-ftp --enable-shmop

---



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


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




[PHP-DEV] Bug #11917 Updated: imageDashedLine() only seems to draw vertical lines

2001-07-06 Thread derick

ID: 11917
Updated by: derick
Reported By: [EMAIL PROTECTED]
Status: Open
Old-Bug Type: GD related
Bug Type: Documentation problem
Operating system: 
PHP Version: 4.0.6
Assigned To: 
Comments:

I made this a documentation problem, because it's not really a bug in PHP.

derick

Previous Comments:
---

[2001-07-06 03:44:19] [EMAIL PROTECTED]

I complained about this too, a while ago (bug 11663).

The way it works in 4.0.6 is using imagesetstyle
with imageline, this is in new documentation at
imagedashedline.

However, IMHO:

steam
A function should not suddenly stop working. It either
should be dropped, or should continue to work as before.
At least not between minor releases. At least not without
_any_ warnings in release notes. (A mention about GD library
version change is not enough)
_any_ warnings in release notes. (A mention about GD library
version change is not enough)
/steam

I worked around it with this (my client still has 4.0.5, I upgraded
to 4.0.6):

function MDashedLine($image, $x0, $y0, $x1, $y1, $fg, $bg)
{
if (PHP_VERSION == 4.0.5) {
ImageDashedLine($image, $x0, $y0, $x1, $y1, $fg);
}
else {
$st = array($fg, $fg, $fg, $fg, $bg, $bg, $bg, $bg);
ImageSetStyle($image, $st);
ImageLine($image, $x0, $y0, $x1, $y1, IMG_COLOR_STYLED);
}
} // MDashedLine

---

[2001-07-05 20:05:36] [EMAIL PROTECTED]

Using PHP 4.0.6, GD 2.0.1, Apache 1.3.19, and a TrueColor image, this code:

  $img = imageCreateTrueColor (64, 64);
  $wht = imageColorAllocate ($img, 255, 255, 255);
  imageFill ($img, 0, 0, $wht);
  $red = imageColorAllocate ($img, 255, 0, 0);
  $x1 = 16; $y1 = 16; $x2 = 48; $y2 = 48;
  imageDashedLine ($img, $x1, $y1, $x1, $y2, $red);
  imageDashedLine ($img, $x1, $y1, $x2, $y2, $red);
  imageDashedLine ($img, $x1, $y1, $x2, $y1, $red);
  imageDashedLine ($img, $x2, $y2, $x1, $y2, $red);
  imageDashedLine ($img, $x1, $y2, $x2, $y1, $red);
  imageDashedLine ($img, $x2, $y1, $x2, $y2, $red);
  header (Content-type: image/png);
  imagePNG ($img);

Should produce a red square with diagonal lines.  Instead it produces only the 
vertical lines, in a PNG found at 
  http://www.kyhm.com/gd/dashedline.png

Configure line:
./configure --with-apxs=/usr/local/sbin/apxs --with-config-file-path=/etc/httpd 
--enable-openssl=/usr/local --with-gd=/usr/local --with-jpeg-dir=/usr 
--with-tiff-dir=/usr --with-zlib=/usr --with-png-dir=/usr --with-xpm-dir=/usr/X11R6 
--with-freetype-dir=/usr/local --with-t1lib=/usr/local --with-mysql=/usr/local 
--with-pdflib --with-pgsql --enable-readline=/usr --enable-trans-sid --enable-sockets 
--enable-memory-limit --enable-shared --with-mcrypt=/usr/local --enable-ctype 
--enable-bcmath --enable-ftp --enable-shmop

---



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


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




[PHP-DEV] Bug #11884 Updated: I cant print

2001-07-06 Thread derick

ID: 11884
Updated by: derick
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Assigned
Bug Type: Reproducible crash
Operating system: 
PHP Version: 4.0.4
Assigned To: daniel
Comments:

I'm assigning this to you Daniel, as you are the maintainer of this extension.

Derick

Previous Comments:
---

[2001-07-05 16:17:06] [EMAIL PROTECTED]

Hi Derick

Yes, it not works, now i trying without a argument in the printer_open() function, and 
i dont see the error again, but i see the following words

Warning: couldn't allocate the printerjob in c:archivos de programaapache 
groupapachehtdocsavances1porfetelimpresiones.php on line 9

and my program is :

$handle = printer_open(Epson);
$HOLA=Esta es una pryueba;

printer_start_doc($handle,$HOLA,$HOLA);
printer_start_page($handle);
echo hola;
printer_write($handle, Text to print);
printer_end_page($handle);
printer_end_doc($handle);
printer_close($handle);
   
Now, how you see i configurate the php.ini whit a printer.default_printer   =  
Epson

plase Helpme

---

[2001-07-04 15:36:54] [EMAIL PROTECTED]

So it works without a printername, like printer_open(); and it does not work like 
this: printer_open(HP Deskjet 840C); ?

Derick

---

[2001-07-04 15:30:32] [EMAIL PROTECTED]

Hi Derick

yes i´am very shure of that, i am really have a default printer instaled
in this php server..

When i put a invalid name in the printer_open(X), i mean a name thats no
exists how printer in my computer. i see a warning, but if i put a valid
name how HP804C my copmuter stop PHP, please helpme Derick, i need to
use this function in my aplication.

Sorry by my english, if you know who can help me in spanish please
contactme with he.


---

[2001-07-04 14:52:52] [EMAIL PROTECTED]

Are you sure you have a default printer installed?

Derick

---

[2001-07-04 14:10:45] [EMAIL PROTECTED]

I cant use the function printer_open, when i try that i see ¨PHP  fatal error in 
PHP4TS.DLL of 017f:100849DA ETC ETC

Please Help Me

---

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


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


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




[PHP-DEV] XMLRPC Error Returns Patch

2001-07-06 Thread Matt Allen

Hi All,

Attached is a patch that does the following:

- Allows *all* PHP Errors to be returned as a Valid XMLRPC Fault Packet (ie including 
parse errors).
- Allows the user to turn these errors on and off in php.ini
- Allows the user to set the faultCode (in the XMLRPC packet) via php.ini

Why is this important?

When using XMLRPC, anything at all that gets returned from the server needs to be a 
valid XMLRPC packet, either a Fault or a proper payload, if PHP dies with any sort of 
error or warning the XMLRPC client dies becasue it cant grok the returned payload.  
This limits PHP ever being used as an XMLRPC server.  With these patches the user can 
set the faultCode that gets returned to the client, so if im making an XMLRPC server 
that anyone can build a client that will access it I can make a statement like If you 
get a faulCode of 666, then something broke on the server, bail out nicely and let me 
know.

I was originally thinking that maybe we should write a generice Errorhandler, ie let 
it be set in the php.ini, the reason for this is with more and more web services 
coming out (XMLRPC,SOAP, etc) each one will need a specific error format.  This might 
be something that could be discussed, but XMLRPC has been around the longest and alot 
of these other protocols are based on it, so here it is :)

I didnt change the php.ini-dist as I didnt know the protocol, ie, since most people 
wont want this feature do we leave it out?

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


Index: main/main.c
===
RCS file: /repository/php4/main/main.c,v
retrieving revision 1.371
diff -r1.371 main.c
204a205,206
   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,   NULL,PHP_INI_ALL,   
 OnUpdateString,xmlrpc_error_number, 
php_core_globals,   core_globals)
397c399
   char *error_format;
---
   char error_format[1024];
399,401c401,411
   error_format = PG(html_errors) ?
   br\nb%s/b:  %s in b%s/b on line 
b%d/bbr\n
   : \n%s: %s in %s on line %d\n;
---
 if (PG(html_errors)) {
   strcpy(error_format , br\nb%s/b: %s in b%s/b oni line 
b%d/bbr\n);
 } else if (PG(xmlrpc_errors)) {
   snprintf(error_format, 1023 , ?xml
 
version=\1.0\?methodResponsefaultvaluestructmembernamefaultCode/namevalueint%d/int/value/membermembernamefaultString/namevaluestring%%s:%%s
 in %%s on line
 
%%d/string/value/member/struct/value/fault/methodResponse,PG(xmlrpc_error_number));
 } else {
 strcpy (error_format , \n%s: %s in %s on line
 %d\n);
 }
Index: main/php_globals.h
===
RCS file: /repository/php4/main/php_globals.h,v
retrieving revision 1.63
diff -r1.63 php_globals.h
125a126,129
   zend_bool xmlrpc_errors;
 
   short xmlrpc_error_number;
 



-- 
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 #11920: e.g. mysql_unbuffered_query doesn't function but throws no error to indicate

2001-07-06 Thread gwelters

From: [EMAIL PROTECTED]
Operating system: linux
PHP version:  4.0.5
PHP Bug Type: *General Issues
Bug description:  e.g. mysql_unbuffered_query doesn't function but throws no error to 
indicate


It's a BIG BIG Problem to find the reason why your application doesn't work when 
there's NO indication that a implemented php-function does NOT what it should do, 
without trowing any error!

Thats what happened as I tried to move back from 4.0.6 to 4.0.5 due to a BIG bug in 
the memory-management of 4.0.6:

for 4.0.6 I replaced mysql_query with mysql_unbuffered_query in one function. There 
was no Prob with that in 4.0.6...but after I had 4.0.5 back again my app didn't work 
anymore without giving any indication of the reason.

It would be great if the php-developers could provide a bit more error-messages for 
instance when mysql_unbuffered_query works only for SELECT's, not for INSERT's, why 
not throw a WARNING or ERROR if you try to use the wrong query.

this would avoid Days of debugging!





-- 
Edit Bug report at: http://bugs.php.net/?id=11920edit=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 #11818 Updated: Using the PDF functions after July1st triggers an internal PDFlib error

2001-07-06 Thread Joao Prado Maia


On Mon, 2 Jul 2001, Joey Smith wrote:

 Surely you are kidding.

 I cannot see in any of our packages where we bundle the PDF library with
 our release. If we are, we should probably remove it.

 In either case, there is no way we can compile an unencumbered version
 of PDFLib. That would be illegal. PDFLib is not free, in the
 gratis sense.

 This is like making the fact that Win32 does not come with a free C
 compiler PHP's problem, based on the fact that you need one to compile
 your own binary. It's absolutely ridiculous.


Ok, I must be missing something really bad here then. What is this
php_pdf.dll doing on my /extensions/ sub-directory ? Someone must have
compiled that, huh.

I can see from Pdflib.com that you can get the source code for all major
platforms, including Windows (which is what I'm talking about here after
all). Here is the URL for you :
http://www.pdflib.com/pdflib/download/pdflib-4.0.1.zip

I downloaded the latest version of the pre-compiled PDFlib which comes
with the compiled php_pdf.dll file, so it was just a matter of dropping
the file on the /extensions sub-directory, but now I get a huge water mark
with the 'www.pdflib.com' string in it.

Am I still missing something here that you guys could compile the PDF
extension from the Windows source code of PDFlib when making the Windows
binary release of PHP ? Why is this illegal anyway ? I even took my time
to open the license file of PDFlib source and it clearly stated on the
Alladin Free Public License that you can re-distribute PDFlib
non-commercially, which is what PHP is doing here.

Why would compiling from source and distributing a version of PDFlib
without that ridiculous water mark be such an issue ?

I might be missing something really bad here, so I apologize if there is
something really obvious that I'm overlooking.

Joao


-- 
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] Reentrant C scanners for PHP

2001-07-06 Thread Sascha Schumann

On Thu, 5 Jul 2001, Jason Greene wrote:

 Sascha,

 This looks good.
 Is this going to be brought into php, or is it going to remain
 a separate project?

There is a concrete need for this system, so I'll push for
the inclusion of those scanners into PHP.  Because the code
is still in sort of alpha state (after one and a half day of
development), this will be completely optional initially.
Making it available through the usual PHP snapshots/releases
will broaden the userbase, so that we get a reasonable amount
of feedback which helps us to improve the system.

- Sascha Experience IRCG
  http://schumann.cx/http://schumann.cx/ircg


-- 
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 #11921: Apache 1.3.20, mod_ssl 2.8.4, PHP 4.0.4 crashes in CGI mode

2001-07-06 Thread shinelight

From: [EMAIL PROTECTED]
Operating system: Windows 98
PHP version:  4.0.6
PHP Bug Type: Reproducible crash
Bug description:  Apache 1.3.20, mod_ssl 2.8.4, PHP 4.0.4 crashes in CGI mode

Using the default PHP 4.0.6 package for Win32 (downloaded straight from php.net), I 
have found an interesting combination that causes Apache 1.3.20 to core dump.  My 
objective was to set up an SSL server to seamlessly work with the Xitami webserver, 
Apache is the obvious choice here.

The first thing I did was download and install Apache 1.3.20 for Win32.  Then, I 
applied the patches located in Apache_1.3.20-Mod_SSL_2.8.4-OpenSSL_0.9.6a-WIN32.zip on 
the contributions page of the www.modssl.org site.  Finally, I configured and set up 
the SSL virtual server (both a self-signed and a CA-signed certificate work) and got 
everything working.  I wrote a short Perl script that would call XiFusion with the 
correct parameters:

#!c:/perl/bin/perl

$ENV{SCRIPT_NAME} = $ENV{REDIRECT_URL};
system c:\\xifusion\\xifusion.exe c:\\php4\\php.exe;

Side Note:  I am the author of XiFusion v2.5 (a wrapper for CGIs under the Xitami 
webserver for ColdFusion and PHP http://www.xitami.com/xifusion.zip).

This setup worked fine...sort of.  I have tried everything I can think of to prove 
that PHP isn't the culprit, but it is.  Here is what happens:

1)  The browser connects to the SSL server.
2)  The browser request a PHP page.  Apache sees that PHP extensions are aliased to a 
type, thus it checks out the action it should take.  It then executes the previously 
mentioned Perl script.
3)  The Perl script modifies an environment variable and calls XiFusion.
4)  XiFusion does its thing and executes PHP (I've checked to see if XiFusion or the 
Perl script were the problem and they are not).
5)  PHP then starts to process the page.
6)  ApacheCore.dll for some reason core dumps.  I have no idea why it does this (it is 
somewhat random, but *VERY* reproducible).
7)  The odd thing is is that when I click Close on the dialog box, Apache reloads 
and acts like nothing happened...weird (none of the log files show that an error 
occurred either...even weirder).

What is even weirder than all that is if I switch from CGI mode to module mode (modify 
conf/httpd.conf), there is no problem...even under normal Apache 1.3 API.

I've scoured google.com as well as the PHP databases for any solution to this very 
interesting bug.  I've been re-building everything (Apache, OpenSSL, mod_ssl) from 
sources to see if I can improve the situation any.  So far, no luck (no, I didn't 
forget to replace the DLLs in the Windows\system directory).  I've seen references to 
the
-DEAPI compile option for PHP, so I will try that out tomorrow to see if that helps 
(but knowing my luck so far... :)

This bug is also in PHP v4.0.4.

Pertinent Machine Info.:
OS:  Win98
Dual PIII 500 mHz CPUs
384MB RAM (I try to maintain about 150MB free using RamIdle)
18GB HD (5 GB free on the Win98 partition)

I really want to use the XiFusion wrapper program rather than the module since I can 
get more control through XiFusion than I can through Apache.

Sorry, no gdb backtrace.  My debugging methods are usually lots of good ol' fashioned 
printf statements ;)

Thomas Hruska
Shining Light Productions
Meeting the Needs of Fellow Programmers



-- 
Edit Bug report at: http://bugs.php.net/?id=11921edit=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 #11922: Fatal error: Underlying object missing in test.php on line 12

2001-07-06 Thread amuller

From: [EMAIL PROTECTED]
Operating system: UNIX
PHP version:  4.0.6
PHP Bug Type: DOM XML related
Bug description:  Fatal error: Underlying object missing in test.php on line 12

Hello,

Since the new version is installed, open a xml file with the function xmldocfile() is 
impossible !

The error generated is : Fatal error: Underlying object missing in test.php on line 
12

I don't understang why because the function works perfectly before !

In the released 4.0.6, I see that Uwe rewrited the domxml. It's now mostly DOM Level 2 
conform. 

Can u solve the problem quickly please ? I really need this function !

Thanks,

Anthony, a french developer.



-- 
Edit Bug report at: http://bugs.php.net/?id=11922edit=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 #11921 Updated: Apache 1.3.20, mod_ssl 2.8.4, PHP 4.0.4 crashes in CGI mode

2001-07-06 Thread shinelight

ID: 11921
User Update by: [EMAIL PROTECTED]
Status: Open
Bug Type: Reproducible crash
Operating system: Windows 98
PHP Version: 4.0.6
Description: Apache 1.3.20, mod_ssl 2.8.4, PHP 4.0.4 crashes in CGI mode

The Short Description is supposed to be 4.0.6, although the bug is also in 4.0.4.  
4.0.5 is untested for the bug.

Previous Comments:
---

[2001-07-06 04:38:22] [EMAIL PROTECTED]

Using the default PHP 4.0.6 package for Win32 (downloaded straight from php.net), I 
have found an interesting combination that causes Apache 1.3.20 to core dump.  My 
objective was to set up an SSL server to seamlessly work with the Xitami webserver, 
Apache is the obvious choice here.

The first thing I did was download and install Apache 1.3.20 for Win32.  Then, I 
applied the patches located in Apache_1.3.20-Mod_SSL_2.8.4-OpenSSL_0.9.6a-WIN32.zip on 
the contributions page of the www.modssl.org site.  Finally, I configured and set up 
the SSL virtual server (both a self-signed and a CA-signed certificate work) and got 
everything working.  I wrote a short Perl script that would call XiFusion with the 
correct parameters:

#!c:/perl/bin/perl

$ENV{SCRIPT_NAME} = $ENV{REDIRECT_URL};
system c:\xifusion\xifusion.exe c:\php4\php.exe;

Side Note:  I am the author of XiFusion v2.5 (a wrapper for CGIs under the Xitami 
webserver for ColdFusion and PHP http://www.xitami.com/xifusion.zip).

This setup worked fine...sort of.  I have tried everything I can think of to prove 
that PHP isn't the culprit, but it is.  Here is what happens:

1)  The browser connects to the SSL server.
2)  The browser request a PHP page.  Apache sees that PHP extensions are aliased to a 
type, thus it checks out the action it should take.  It then executes the previously 
mentioned Perl script.
3)  The Perl script modifies an environment variable and calls XiFusion.
4)  XiFusion does its thing and executes PHP (I've checked to see if XiFusion or the 
Perl script were the problem and they are not).
5)  PHP then starts to process the page.
6)  ApacheCore.dll for some reason core dumps.  I have no idea why it does this (it is 
somewhat random, but *VERY* reproducible).
7)  The odd thing is is that when I click Close on the dialog box, Apache reloads 
and acts like nothing happened...weird (none of the log files show that an error 
occurred either...even weirder).

What is even weirder than all that is if I switch from CGI mode to module mode (modify 
conf/httpd.conf), there is no problem...even under normal Apache 1.3 API.

I've scoured google.com as well as the PHP databases for any solution to this very 
interesting bug.  I've been re-building everything (Apache, OpenSSL, mod_ssl) from 
sources to see if I can improve the situation any.  So far, no luck (no, I didn't 
forget to replace the DLLs in the Windowssystem directory).  I've seen references to 
the
-DEAPI compile option for PHP, so I will try that out tomorrow to see if that helps 
(but knowing my luck so far... :)

This bug is also in PHP v4.0.4.

Pertinent Machine Info.:
OS:  Win98
Dual PIII 500 mHz CPUs
384MB RAM (I try to maintain about 150MB free using RamIdle)
18GB HD (5 GB free on the Win98 partition)

I really want to use the XiFusion wrapper program rather than the module since I can 
get more control through XiFusion than I can through Apache.

Sorry, no gdb backtrace.  My debugging methods are usually lots of good ol' fashioned 
printf statements ;)

Thomas Hruska
Shining Light Productions
Meeting the Needs of Fellow Programmers


---


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


-- 
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 #11903 Updated: xpath_eval does not work with default namespace.

2001-07-06 Thread peter

ID: 11903
User Update by: [EMAIL PROTECTED]
Status: Open
Bug Type: DOM XML related
Operating system: FreeBSD 4.3
PHP Version: 4.0.6
Description: xpath_eval does not work with default namespace.

I forgot again

libxml version: 2.3.10
iconv version: 2.0

Previous Comments:
---

[2001-07-05 08:51:13] [EMAIL PROTECTED]

I forgot.

This namespace decleration will also work with xpath_eval
html xmlns:thisworks=http://www.w3.org/1999/xhtml;

---

[2001-07-05 08:44:09] [EMAIL PROTECTED]

Hi, When using default namespace in the XML (XHTML) source 
xpath_eval will not return any result except with the request //* whereby it will 
return the whole XML source.
When making another namespace than xmlns everything works fine.

// The xpaht_eval() will NOT work with this line
$xhtml = 'html 
xmlns=http://www.w3.org/1999/xhtml;headtitlehu../title/headbody/body/html';

// The xpaht_eval() will work with this line
$xhtml = 'html 
BUGxmlns=http://www.w3.org/1999/xhtml;headtitlehu../title/headbody/body/html';

   
$doc = xmldoc($xhtml);
$ctx = xpath_new_context($doc); 
$node = xpath_eval_expression($ctx,//title);
var_dump($node-nodeset);

---


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


-- 
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 #11917 Updated: imageDashedLine() only seems to draw vertical lines

2001-07-06 Thread kyhm

ID: 11917
User Update by: [EMAIL PROTECTED]
Status: Open
Bug Type: Documentation problem
Operating system: Linux 2.2 SMP
PHP Version: 4.0.6
Description: imageDashedLine() only seems to draw vertical lines

Thanks for the prompt response, and I agree entirely about persistence of functions!  
Since I've now seen the deprecation notice under imageDashedLine() and know what to 
change in my code, should I marked this as closed?

Previous Comments:
---

[2001-07-06 03:45:16] [EMAIL PROTECTED]

I made this a documentation problem, because it's not really a bug in PHP.

derick

---

[2001-07-06 03:44:19] [EMAIL PROTECTED]

I complained about this too, a while ago (bug 11663).

The way it works in 4.0.6 is using imagesetstyle
with imageline, this is in new documentation at
imagedashedline.

However, IMHO:

steam
A function should not suddenly stop working. It either
should be dropped, or should continue to work as before.
At least not between minor releases. At least not without
_any_ warnings in release notes. (A mention about GD library
version change is not enough)
_any_ warnings in release notes. (A mention about GD library
version change is not enough)
/steam

I worked around it with this (my client still has 4.0.5, I upgraded
to 4.0.6):

function MDashedLine($image, $x0, $y0, $x1, $y1, $fg, $bg)
{
if (PHP_VERSION == 4.0.5) {
ImageDashedLine($image, $x0, $y0, $x1, $y1, $fg);
}
else {
$st = array($fg, $fg, $fg, $fg, $bg, $bg, $bg, $bg);
ImageSetStyle($image, $st);
ImageLine($image, $x0, $y0, $x1, $y1, IMG_COLOR_STYLED);
}
} // MDashedLine

---

[2001-07-05 20:05:36] [EMAIL PROTECTED]

Using PHP 4.0.6, GD 2.0.1, Apache 1.3.19, and a TrueColor image, this code:

  $img = imageCreateTrueColor (64, 64);
  $wht = imageColorAllocate ($img, 255, 255, 255);
  imageFill ($img, 0, 0, $wht);
  $red = imageColorAllocate ($img, 255, 0, 0);
  $x1 = 16; $y1 = 16; $x2 = 48; $y2 = 48;
  imageDashedLine ($img, $x1, $y1, $x1, $y2, $red);
  imageDashedLine ($img, $x1, $y1, $x2, $y2, $red);
  imageDashedLine ($img, $x1, $y1, $x2, $y1, $red);
  imageDashedLine ($img, $x2, $y2, $x1, $y2, $red);
  imageDashedLine ($img, $x1, $y2, $x2, $y1, $red);
  imageDashedLine ($img, $x2, $y1, $x2, $y2, $red);
  header (Content-type: image/png);
  imagePNG ($img);

Should produce a red square with diagonal lines.  Instead it produces only the 
vertical lines, in a PNG found at 
  http://www.kyhm.com/gd/dashedline.png

Configure line:
./configure --with-apxs=/usr/local/sbin/apxs --with-config-file-path=/etc/httpd 
--enable-openssl=/usr/local --with-gd=/usr/local --with-jpeg-dir=/usr 
--with-tiff-dir=/usr --with-zlib=/usr --with-png-dir=/usr --with-xpm-dir=/usr/X11R6 
--with-freetype-dir=/usr/local --with-t1lib=/usr/local --with-mysql=/usr/local 
--with-pdflib --with-pgsql --enable-readline=/usr --enable-trans-sid --enable-sockets 
--enable-memory-limit --enable-shared --with-mcrypt=/usr/local --enable-ctype 
--enable-bcmath --enable-ftp --enable-shmop

---


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


-- 
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 #11923 Updated: when you access char(2000),i only get 255 bytes data, why ?

2001-07-06 Thread chenwumail

ID: 11923
User Update by: [EMAIL PROTECTED]
Status: Open
Bug Type: MSSQL related
Operating system: Windows2000
PHP Version: 4.0.5
Description: when you access char(2000),i only get 255 bytes data, why ?

My SQL Server is SQL Server 2000,
My PHP is PHP 4.05
My OS is windows 2000
My table name is news,defined like:

keyword varchar(2000),
content text

I can save data to keyword but when i get is ,it only 255 bytes, I view database, data 
is true save in table.


example:

$result=mssql_query(select keyword from news);
print strlent(mssql_result($result,0,0));

---
255


Previous Comments:
---

[2001-07-06 05:14:23] [EMAIL PROTECTED]

when you access char(2000),i only get 255 bytes data, why ? 

---


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


-- 
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 #10229 Updated: buffer error in fread

2001-07-06 Thread apeeters

ID: 10229
User Update by: [EMAIL PROTECTED]
Old-Status: Closed
Status: Open
Bug Type: Filesystem function related
Operating system: linux 2.2.14C11
PHP Version: 4.0.3pl1 4.0.4pl1 4.0.5 4.0.6
Description: buffer error in fread

This error still exists, not de phpcode part, but the buffering errors, try this 
several times:

---start---
$fp = fopen(http://www.planetinternet.be/nl/vandaag/;, r);
$content = fread($fp, 10);
fclose($fp);

$fp = fopen(http://www.google.com/;, r);
$content = fread($fp, 10);

mail(me@host, topic, $content);
---stop---

This is an error in the buffer handling routines and should be eliminated.  It seems 
to occur at _every_ request with php4.0.6 !

Previous Comments:
---

[2001-04-27 15:34:42] [EMAIL PROTECTED]

I assume this is a dead issue.  If not reopen.

-Chris

---

[2001-04-08 05:04:10] [EMAIL PROTECTED]

I have only seen php code once, and I was't able to reproduce it.  I suppose it was a 
case where php code was stored in a variable (for online editing or something).  This 
is only a guess, as it's not my code that I see, but code from someone else on the 
same server.

---

[2001-04-07 20:51:58] [EMAIL PROTECTED]

I ran it through a couple hundred times and absolutely no PHP code whatsoever.

The only problem I see here is $content is never cleaned up properly and contains BOTH 
of the fread()s jumbled.  Which is very strange.

$fp = fopen(http://www.newsplanet.be/;, r);
while (!feof($fp)) $content .= fread($fp, 4000);
fclose($fp);

You would be better off using the above as it works properly.

Whomever is handling the fopen-wrappers should probably look at this.

-Chris

---

[2001-04-07 20:17:03] [EMAIL PROTECTED]

I've been testing a bit more and have a clear reproducible codesnippet, it yields the 
same results in php 4.0.4p1, so I changed the PHP version for this bugreport.

---start---
$fp = fopen(http://www.newsplanet.be/;, r);
$content = fread($fp, 10);
fclose($fp);

$fp = fopen(http://www.google.com/;, r);
$content = fread($fp, 10);

mail(me@host, topic, $content);
---stop---

In this mail, I see the sourcecode from google.com followed by the rest of the code 
from newsplanet.be.  This does occur in about 1/3 of the mails I try, although I'm 
unable to see why this isn't always the case.


---

[2001-04-07 19:46:47] [EMAIL PROTECTED]

Can't reproduce with CVS version.  Try upgrading to the newest release 4.04pl1 or grab 
a CVS snapshot from http://snaps.php.net/

What URL is it that is doing this? Or is it every URL?

-Chris

---

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

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


-- 
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 #11921 Updated: Apache 1.3.20, mod_ssl 2.8.4, PHP 4.0.4 crashes in CGI mode

2001-07-06 Thread shinelight

ID: 11921
User Update by: [EMAIL PROTECTED]
Status: Open
Bug Type: Reproducible crash
Operating system: Windows 98
PHP Version: 4.0.6
Description: Apache 1.3.20, mod_ssl 2.8.4, PHP 4.0.4 crashes in CGI mode

Seems like someone else has been having a similar problem (Bug #10904 - I got curious 
as to what the other reproducible bugs were).  My previous comments should help narrow 
this problem down further (and actually make it reproducible).  My guess is that it is 
not only Windows platforms, but possibly even Linux...but that has yet to be proven.  
Right now I'm not in the mood to log into Linux and give myself another headache.  One 
at a time is plenty for me :)

(XiFusion is also for Linux, so it would be interesting to see if Apache fails under 
Linux due to the
Apache-Perl-XiFusion-PHP combo).

Thomas Hruska


Previous Comments:
---

[2001-07-06 04:42:34] [EMAIL PROTECTED]

The Short Description is supposed to be 4.0.6, although the bug is also in 4.0.4.  
4.0.5 is untested for the bug.

---

[2001-07-06 04:38:22] [EMAIL PROTECTED]

Using the default PHP 4.0.6 package for Win32 (downloaded straight from php.net), I 
have found an interesting combination that causes Apache 1.3.20 to core dump.  My 
objective was to set up an SSL server to seamlessly work with the Xitami webserver, 
Apache is the obvious choice here.

The first thing I did was download and install Apache 1.3.20 for Win32.  Then, I 
applied the patches located in Apache_1.3.20-Mod_SSL_2.8.4-OpenSSL_0.9.6a-WIN32.zip on 
the contributions page of the www.modssl.org site.  Finally, I configured and set up 
the SSL virtual server (both a self-signed and a CA-signed certificate work) and got 
everything working.  I wrote a short Perl script that would call XiFusion with the 
correct parameters:

#!c:/perl/bin/perl

$ENV{SCRIPT_NAME} = $ENV{REDIRECT_URL};
system c:\xifusion\xifusion.exe c:\php4\php.exe;

Side Note:  I am the author of XiFusion v2.5 (a wrapper for CGIs under the Xitami 
webserver for ColdFusion and PHP http://www.xitami.com/xifusion.zip).

This setup worked fine...sort of.  I have tried everything I can think of to prove 
that PHP isn't the culprit, but it is.  Here is what happens:

1)  The browser connects to the SSL server.
2)  The browser request a PHP page.  Apache sees that PHP extensions are aliased to a 
type, thus it checks out the action it should take.  It then executes the previously 
mentioned Perl script.
3)  The Perl script modifies an environment variable and calls XiFusion.
4)  XiFusion does its thing and executes PHP (I've checked to see if XiFusion or the 
Perl script were the problem and they are not).
5)  PHP then starts to process the page.
6)  ApacheCore.dll for some reason core dumps.  I have no idea why it does this (it is 
somewhat random, but *VERY* reproducible).
7)  The odd thing is is that when I click Close on the dialog box, Apache reloads 
and acts like nothing happened...weird (none of the log files show that an error 
occurred either...even weirder).

What is even weirder than all that is if I switch from CGI mode to module mode (modify 
conf/httpd.conf), there is no problem...even under normal Apache 1.3 API.

I've scoured google.com as well as the PHP databases for any solution to this very 
interesting bug.  I've been re-building everything (Apache, OpenSSL, mod_ssl) from 
sources to see if I can improve the situation any.  So far, no luck (no, I didn't 
forget to replace the DLLs in the Windowssystem directory).  I've seen references to 
the
-DEAPI compile option for PHP, so I will try that out tomorrow to see if that helps 
(but knowing my luck so far... :)

This bug is also in PHP v4.0.4.

Pertinent Machine Info.:
OS:  Win98
Dual PIII 500 mHz CPUs
384MB RAM (I try to maintain about 150MB free using RamIdle)
18GB HD (5 GB free on the Win98 partition)

I really want to use the XiFusion wrapper program rather than the module since I can 
get more control through XiFusion than I can through Apache.

Sorry, no gdb backtrace.  My debugging methods are usually lots of good ol' fashioned 
printf statements ;)

Thomas Hruska
Shining Light Productions
Meeting the Needs of Fellow Programmers


---


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


-- 
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] Reentrant C scanners for PHP

2001-07-06 Thread Thies C. Arntzen

On Fri, Jul 06, 2001 at 01:08:03AM +0200, Sascha Schumann wrote:
 This is the first public release of fully reentrant C
 scanners for the PHP language and the INI system.  They
 can be used to replace the Flex-based implementations
 commonly found in the Zend Engine.
 
 Features:
 
 - Flexible I/O model; lays groundwork for fully supporting
   modern web-servers such as Apache 2.0;
 - uses portable C only; significantly improves portability by
   removing dependence on GNU extensions of C++;
 - fully thread-safe without loss of speed.
 
 The software is currently available in the form of three
 source files and a patch to the Zend Engine.

where are the .re2c files?

tc


-- 
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 #11923: when you access char(2000),i only get 255 bytes data, why ?

2001-07-06 Thread chenwumail

From: [EMAIL PROTECTED]
Operating system: Windows2000
PHP version:  4.0.5
PHP Bug Type: MSSQL related
Bug description:  when you access char(2000),i only get 255 bytes data, why ? 

when you access char(2000),i only get 255 bytes data, why ? 


-- 
Edit Bug report at: http://bugs.php.net/?id=11923edit=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] Reentrant C scanners for PHP

2001-07-06 Thread Rasmus Lerdorf

 Because software already exists to eliminate the scan/parse
 process, speed was not a main concern.  The new language
 scanner is faster than the old one in all tested scenarios
 though.

;)  This is so Sascha!

Looks very nice.  Do you think you could LGPL it instead of GPL?  Would be
tricky to use in conjunction with the QPL if it was GPL'ed.

This script:

This is a test
? $a = 1;
   $b = 'Hello';
   $c = $a $b;
   echo $a.$b.$c.\n;
?
And this is the last line

generates this overrun:

---
cgi_main.c(793) : Block 0x0835D7E8 status:
Beginning:  Overrun (magic=0x082F9BB8, expected=0x7312F8DC)
  End:  Unknown
---

And if I repeat the above code 1 times in a file, I get a segfault:

Program received signal SIGSEGV, Segmentation fault.
0x081439d4 in _efree (ptr=0x835d80c, __zend_filename=0x824a0c6 cgi_main.c, 
__zend_lineno=793, __zend_orig_filename=0x0,
__zend_orig_lineno=0) at zend_alloc.c:212
212 CALCULATE_REAL_SIZE_AND_CACHE_INDEX(p-size);
(gdb) bt
#0  0x081439d4 in _efree (ptr=0x835d80c, __zend_filename=0x824a0c6 cgi_main.c, 
__zend_lineno=793, __zend_orig_filename=0x0,
__zend_orig_lineno=0) at zend_alloc.c:212
#1  0x08078958 in main (argc=2, argv=0xb9c4) at cgi_main.c:793
#2  0x4040c177 in __libc_start_main (main=0x8077efc main, argc=2, ubp_av=0xb9c4, 
init=0x8075914 _init, fini=0x8249cc0 _fini,
rtld_fini=0x4000e184 _dl_fini, stack_end=0xb9bc) at
../sysdeps/generic/libc-start.c:129

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




Re: [PHP-DEV] Reentrant C scanners for PHP

2001-07-06 Thread Rasmus Lerdorf

  Looks very nice.  Do you think you could LGPL it instead of GPL?  Would be
  tricky to use in conjunction with the QPL if it was GPL'ed.

 As it's my intention that the code is linked against PHP/the
 Zend Engine, the GPL should be fine here (similar to the
 situation of the GPLed KDE project and the QPLed QT 1).
 Anyway, the license is subject to change.

Ok, but we still have a bit of work to do to make the Apache/PHP license
GPL-compatible.  Perhaps by the time ngscan is ready this
GPL-compatibility issues will have worked themselves out and the GPL would
be fine for ngscan.  Leave it GPL'ed and we will wait and see what
happens.

 Can you give http://schumann.cx/ngscan-0.2.tar.gz a try?  The
 example works fine here, regardless of the number of
 iterations.  Backquotes are supported now, too.

No, I still get a segfault:

Program received signal SIGSEGV, Segmentation fault.
0x081439d4 in _efree (ptr=0x835d7ac, __zend_filename=0x8249f46
cgi_main.c, __zend_lineno=793, __zend_orig_filename=0x0,
__zend_orig_lineno=0) at zend_alloc.c:212
212 CALCULATE_REAL_SIZE_AND_CACHE_INDEX(p-size);
(gdb) bt
#0  0x081439d4 in _efree (ptr=0x835d7ac, __zend_filename=0x8249f46
cgi_main.c, __zend_lineno=793, __zend_orig_filename=0x0,
__zend_orig_lineno=0) at zend_alloc.c:212
#1  0x08078958 in main (argc=2, argv=0xb9c4) at cgi_main.c:793
#2  0x4040c177 in __libc_start_main (main=0x8077efc main, argc=2,
ubp_av=0xb9c4, init=0x8075914 _init, fini=0x8249b40 _fini,
rtld_fini=0x4000e184 _dl_fini, stack_end=0xb9bc) at
../sysdeps/generic/libc-start.c:129

I will send you the exact script causing it (offline)

-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 #11926: precompiled php_pdf.dll does not work

2001-07-06 Thread rose

From: [EMAIL PROTECTED]
Operating system: windows 2000
PHP version:  4.0.6
PHP Bug Type: PDF related
Bug description:  precompiled php_pdf.dll does not work

Hi,

The pre-compiled php_pdf.dll included with 4.0.6 is based on PDFlib version 4.0.0 
($Revision: 1.79.2.1 $).

HOWEVER, according to pdflib.com, version 4.0.0 contains a datetime bomb and will not 
work past 2001-07-01.

Amusingly enough, PDFlib 4.0.0 was used for PHP4.0.6, released only shortly before 
this dll would cease to function forever...

An attempt to access pdf functions produces the following error: Fatal error: PDFlib 
error: Beta expired - retrieve new version from www.pdflib.com in [script] on line 
[number].

Since PDFlib 4.0.1 is available since 2001-05-18, perhaps the next release could 
include a php_pdf.dll based on 4.0.1?

OR, a fix could be made available on the site (please) because my c++ compiler chokes 
on 4.0.1, and the documentation included is obviously meant for people who are already 
experienced with compiling their own dlls...


-- 
Edit Bug report at: http://bugs.php.net/?id=11926edit=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 #11917 Updated: imageDashedLine() only seems to draw vertical lines

2001-07-06 Thread wez

ID: 11917
Updated by: wez
Reported By: [EMAIL PROTECTED]
Status: Open
Bug Type: Documentation problem
Operating system: 
PHP Version: 4.0.6
Assigned To: 
Comments:

It's a GD problem.
GD 2.0.1 is still BETA.
--Wez.

Previous Comments:
---

[2001-07-06 04:53:10] [EMAIL PROTECTED]

Thanks for the prompt response, and I agree entirely about persistence of functions!  
Since I've now seen the deprecation notice under imageDashedLine() and know what to 
change in my code, should I marked this as closed?

---

[2001-07-06 03:45:16] [EMAIL PROTECTED]

I made this a documentation problem, because it's not really a bug in PHP.

derick

---

[2001-07-06 03:44:19] [EMAIL PROTECTED]

I complained about this too, a while ago (bug 11663).

The way it works in 4.0.6 is using imagesetstyle
with imageline, this is in new documentation at
imagedashedline.

However, IMHO:

steam
A function should not suddenly stop working. It either
should be dropped, or should continue to work as before.
At least not between minor releases. At least not without
_any_ warnings in release notes. (A mention about GD library
version change is not enough)
_any_ warnings in release notes. (A mention about GD library
version change is not enough)
/steam

I worked around it with this (my client still has 4.0.5, I upgraded
to 4.0.6):

function MDashedLine($image, $x0, $y0, $x1, $y1, $fg, $bg)
{
if (PHP_VERSION == 4.0.5) {
ImageDashedLine($image, $x0, $y0, $x1, $y1, $fg);
}
else {
$st = array($fg, $fg, $fg, $fg, $bg, $bg, $bg, $bg);
ImageSetStyle($image, $st);
ImageLine($image, $x0, $y0, $x1, $y1, IMG_COLOR_STYLED);
}
} // MDashedLine

---

[2001-07-05 20:05:36] [EMAIL PROTECTED]

Using PHP 4.0.6, GD 2.0.1, Apache 1.3.19, and a TrueColor image, this code:

  $img = imageCreateTrueColor (64, 64);
  $wht = imageColorAllocate ($img, 255, 255, 255);
  imageFill ($img, 0, 0, $wht);
  $red = imageColorAllocate ($img, 255, 0, 0);
  $x1 = 16; $y1 = 16; $x2 = 48; $y2 = 48;
  imageDashedLine ($img, $x1, $y1, $x1, $y2, $red);
  imageDashedLine ($img, $x1, $y1, $x2, $y2, $red);
  imageDashedLine ($img, $x1, $y1, $x2, $y1, $red);
  imageDashedLine ($img, $x2, $y2, $x1, $y2, $red);
  imageDashedLine ($img, $x1, $y2, $x2, $y1, $red);
  imageDashedLine ($img, $x2, $y1, $x2, $y2, $red);
  header (Content-type: image/png);
  imagePNG ($img);

Should produce a red square with diagonal lines.  Instead it produces only the 
vertical lines, in a PNG found at 
  http://www.kyhm.com/gd/dashedline.png

Configure line:
./configure --with-apxs=/usr/local/sbin/apxs --with-config-file-path=/etc/httpd 
--enable-openssl=/usr/local --with-gd=/usr/local --with-jpeg-dir=/usr 
--with-tiff-dir=/usr --with-zlib=/usr --with-png-dir=/usr --with-xpm-dir=/usr/X11R6 
--with-freetype-dir=/usr/local --with-t1lib=/usr/local --with-mysql=/usr/local 
--with-pdflib --with-pgsql --enable-readline=/usr --enable-trans-sid --enable-sockets 
--enable-memory-limit --enable-shared --with-mcrypt=/usr/local --enable-ctype 
--enable-bcmath --enable-ftp --enable-shmop

---



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


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




[PHP-DEV] Bug #11927: php sapi servlet doesn't compile

2001-07-06 Thread daniel . dadusc

From: [EMAIL PROTECTED]
Operating system: Linux
PHP version:  4.0.6
PHP Bug Type: Compile Failure
Bug description:  php sapi servlet doesn't compile

Setup
Redhat 7.1
Jdk 1.31

The sapi servlet code doesn't compile because the code is in a terrible state. hacking 
the makefiles and some of the java code i managed to get it to compile correctly. i'm 
pretty much a newbie at this so i'm posting the tentative fixes here.

here are the changes i made to the makefile in sapi/servlet:

phpsrvlt.jar : servlet.java ../../ext/java/reflect.java
$(mkinstalldirs) net/php
@echo library=php4net/php/reflect.properties
@echo library=php4net/php/servlet.properties
@cp ../../ext/java/reflect.java .
javac ./reflect.java
@test ! -f reflect.class || mv reflect.class net/php 
javac ./servlet.java
@test ! -f servlet.class || mv servlet.class net/php
$(JAVA_JAR)v phpsrvlt.jar net/php/*.class net/php/*.properties
@rm -rf net

i removed the formatter servlet because it's useless



-- 
Edit Bug report at: http://bugs.php.net/?id=11927edit=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 #11917 Updated: imageDashedLine() only seems to draw vertical lines

2001-07-06 Thread derick

ID: 11917
Updated by: derick
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Closed
Bug Type: Documentation problem
Operating system: 
PHP Version: 4.0.6
Assigned To: 
Comments:

Not a PHP bug, so closing

Previous Comments:
---

[2001-07-06 07:44:58] [EMAIL PROTECTED]

It's a GD problem.
GD 2.0.1 is still BETA.
--Wez.

---

[2001-07-06 04:53:10] [EMAIL PROTECTED]

Thanks for the prompt response, and I agree entirely about persistence of functions!  
Since I've now seen the deprecation notice under imageDashedLine() and know what to 
change in my code, should I marked this as closed?

---

[2001-07-06 03:45:16] [EMAIL PROTECTED]

I made this a documentation problem, because it's not really a bug in PHP.

derick

---

[2001-07-06 03:44:19] [EMAIL PROTECTED]

I complained about this too, a while ago (bug 11663).

The way it works in 4.0.6 is using imagesetstyle
with imageline, this is in new documentation at
imagedashedline.

However, IMHO:

steam
A function should not suddenly stop working. It either
should be dropped, or should continue to work as before.
At least not between minor releases. At least not without
_any_ warnings in release notes. (A mention about GD library
version change is not enough)
_any_ warnings in release notes. (A mention about GD library
version change is not enough)
/steam

I worked around it with this (my client still has 4.0.5, I upgraded
to 4.0.6):

function MDashedLine($image, $x0, $y0, $x1, $y1, $fg, $bg)
{
if (PHP_VERSION == 4.0.5) {
ImageDashedLine($image, $x0, $y0, $x1, $y1, $fg);
}
else {
$st = array($fg, $fg, $fg, $fg, $bg, $bg, $bg, $bg);
ImageSetStyle($image, $st);
ImageLine($image, $x0, $y0, $x1, $y1, IMG_COLOR_STYLED);
}
} // MDashedLine

---

[2001-07-05 20:05:36] [EMAIL PROTECTED]

Using PHP 4.0.6, GD 2.0.1, Apache 1.3.19, and a TrueColor image, this code:

  $img = imageCreateTrueColor (64, 64);
  $wht = imageColorAllocate ($img, 255, 255, 255);
  imageFill ($img, 0, 0, $wht);
  $red = imageColorAllocate ($img, 255, 0, 0);
  $x1 = 16; $y1 = 16; $x2 = 48; $y2 = 48;
  imageDashedLine ($img, $x1, $y1, $x1, $y2, $red);
  imageDashedLine ($img, $x1, $y1, $x2, $y2, $red);
  imageDashedLine ($img, $x1, $y1, $x2, $y1, $red);
  imageDashedLine ($img, $x2, $y2, $x1, $y2, $red);
  imageDashedLine ($img, $x1, $y2, $x2, $y1, $red);
  imageDashedLine ($img, $x2, $y1, $x2, $y2, $red);
  header (Content-type: image/png);
  imagePNG ($img);

Should produce a red square with diagonal lines.  Instead it produces only the 
vertical lines, in a PNG found at 
  http://www.kyhm.com/gd/dashedline.png

Configure line:
./configure --with-apxs=/usr/local/sbin/apxs --with-config-file-path=/etc/httpd 
--enable-openssl=/usr/local --with-gd=/usr/local --with-jpeg-dir=/usr 
--with-tiff-dir=/usr --with-zlib=/usr --with-png-dir=/usr --with-xpm-dir=/usr/X11R6 
--with-freetype-dir=/usr/local --with-t1lib=/usr/local --with-mysql=/usr/local 
--with-pdflib --with-pgsql --enable-readline=/usr --enable-trans-sid --enable-sockets 
--enable-memory-limit --enable-shared --with-mcrypt=/usr/local --enable-ctype 
--enable-bcmath --enable-ftp --enable-shmop

---

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


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


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




[PHP-DEV] Bug #11928: dbase_replace_record writes (null) in .dbf

2001-07-06 Thread robin . marlow

From: [EMAIL PROTECTED]
Operating system: Win2k
PHP version:  4.0.6
PHP Bug Type: dBase related
Bug description:  dbase_replace_record writes (null) in .dbf

dbase_replace_record writes (null) string as field value. Identical bug with 
dbase_add_record was fixed in 4.02. See bug #6519 and #10984 (latter still open!!).
I need a version where this function worked, or a promise of a fix soon or I'm screwed 
:o)


-- 
Edit Bug report at: http://bugs.php.net/?id=11928edit=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 #11929: Can't get whether to enable truetype string function in gd... == yes

2001-07-06 Thread mleicher

From: [EMAIL PROTECTED]
Operating system: Linux; Slackware 8.0/2.4.5
PHP version:  4.0.6
PHP Bug Type: *Compile Issues
Bug description:  Can't get whether to enable truetype string function in gd... == 
yes

Hi,

My main problem is that I can't get the truetype string function into gd since version 
4.0.5 (4.0.4pl1 works for me). On our systems gd 184 is available and freetype 1.3 and 
2.x are installed. Our server park containts about 36 servers, all installed with 
apache1320/php404pl1.

I don't know if these problems are related, but I can't get 406 work on a new machine 
with slack80.

My error:
[quote]
root@s0048:/usr/src/php-4.0.6# apachectl start
Syntax error on line 205 of /usr/local/apache/conf/httpd.conf:
Cannot load /usr/local/apache/libexec/libphp4.so into server: 
/usr/local/apache/libexec/libphp4.so: undefined symbol: TT_Open_Face
/usr/local/apache/bin/apachectl start: httpd could not be started
[/quote]

My configstring:
[quote]
./configure --enable-versioning --with-apxs=/usr/local/apache/bin/apxs --with-gd 
--with-jpeg-dir=/usr/local --with-zlib --enable-track-vars --enable-ttf 
--with-mysql=/usr/local/mysql --enable-gd-native-ttf --with-png-dir=/usr/lib 
--with-freetype-dir=/usr/local --with-ttf-dir=/usr/local/include/freetype 
--with-xpm-dir=/usr/X11R6
[/quote]

These errors don't mean much to me. What I really would like to know is what version 
of freetype should I use (1.3 or 2.x). If I use 2.x gd won't compile afther I edited 
the Makefile.

Kind regards,

Marcel Leicher
Silverpoint IS


-- 
Edit Bug report at: http://bugs.php.net/?id=11929edit=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 #11930: better sapi/servlet support

2001-07-06 Thread daniel . dadusc

From: [EMAIL PROTECTED]
Operating system: Linux
PHP version:  4.0.6
PHP Bug Type: Feature/Change Request
Bug description:  better sapi/servlet support

I think that better java and sapi/servlet support are essential for the success of php 
in the ENTERPRISE environment. PHP is great at what it does, unfortunately is what not 
designed in mind with high reliability and scalability in mind. The j2ee platform 
defined on the other hand is, and already has many commercial implementations 
(Weblogic, Ipass, etc...) . Writing business logic, and handling critical resources is 
done better by java, but java solutions for easy dynamic web page creation such as jsp 
are horrid compared to php. Using sapi servlet under resin 2.0.0 i was able to get 
this code to run (albeit after only a few page views the sapi made the servlet runner 
crash):

?
$system = new Java(java.lang.System);
$start=$system-currentTimeMillis();
$context = new Java(javax.naming.InitialContext);
$ds = $context-lookup(java:comp/env/jdbc/manhattan);
$conn = $ds-getConnection();
$stmt = $conn-createStatement();
$rs = $stmt-executeQuery(select team_name from team);
while ($rs-next()) {
?
Team name ?=$rs-getString(1)?br
?
}
$rs-close();
$stmt-close();
$conn-close();
$end=$system-currentTimeMillis();
?
brTime taken: ?=$end-$start?

The example demonstrates a simple benchmark for a random query on one of my databases. 
The performance btw, was around 400ms, which in my opinion is unacceptably slow. This 
example while crude, does help show the potential of better sapi/servlet support. It 
will really get exciting once we see wider distribution of ejb 2.0 technology which 
would allow code like this to be run (even though the following example is fictitious, 
i have tested the ejb 2.0 tech and i know it works):

?
// The JNDI context containing EJBs
$context = new Java(javax.naming.InitialContext);

// get the home interface for the team cmp (container managed persistence) ejb
$team_home = $context.lookup(java:comp/env/cmp/squadra);

// call a standard finder method from the home interface which returns a java 
Collection of teams
$teams = $team-findAll();
while ($teams-hasNext()) {
$team = $teams-next();
echo Team Name . $team-getTeamName() .br;
}
?

With the all the database work abstracted by EJB it can be seen that the merging of 
php and java enables some incredibly elegant and efficient code to be written. Better 
sapi/servlet will allow this to happen. 


p.s. I'm not sure about this, but it may also help it if a native CORBA support is 
implemented by php. It may be possible to call the rmi.RemotePortableObject.narrow() 
through the java interface but i'm not sure how efficient that would be anyway.


-- 
Edit Bug report at: http://bugs.php.net/?id=11930edit=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 #11909 Updated: Object Copied By Reference!!

2001-07-06 Thread nassar

ID: 11909
User Update by: [EMAIL PROTECTED]
Status: Bogus
Bug Type: Scripting Engine problem
Operating system: Debian GNU/Linux (woody)
PHP Version: 4.0.6
Description: Object Copied By Reference!!

Yes.  PHP probably should make a new reference to a new
piece of data in this case.  It would seem to make more
sense to assign everything by value, since according to the
manual the assignment operator really means that the the
left operand gets set to the value of the expression on the
right

The current behavior is inconsistent. If $a is a variable
inside an object and I set $a by value, the = operator
copies it by value, but if I set $a by reference, the =
operator copies the reference.  Outside of an object, = will
copy a variable by value no matter how it is set.

In other words, references are treated like a different
data type in this case.  However, the programmer has no way
of determining this type(as far as I can tell).

If this behavior isn't changed, it should at least be
carefully documented, and there should be some way to
determine whether or not a variable is a reference variable.

For now, this will copy entirely by value:
$a = unserialize(serialize($b));


Previous Comments:
---

[2001-07-05 18:02:34] [EMAIL PROTECTED]

But, the object that you referenced in the share() call is still in existence.  And 
the reference to that object is still good.  All obj1 has is a reference to something 
in its a var.  It copies that reference to the new object.  I don't see where a copy 
should have been made here.

Are you wanting PHP to make a new reference to a new piece of data?


---

[2001-07-05 15:48:49] [EMAIL PROTECTED]

I think you misunderstood me. I'm not assuming that the
object in $obj2 should be gone after I copy something else
to this object. I AM assuming that the object in $obj is
that same object as was in $obj2 and that the object in
$obj2 is now a different object.

The issue is that the = operator does not create a complete
copy of the object referenced by $obj.  It instead creates
an object containing an object that is referenced by both
$obj and $obj2.

Maybe this will make it easier to see:

If you change $obj2 = $obj; to $obj3 = $obj; and echo
$obj2-get(); to echo $obj3-get(); in my code, you still
get the same results.

If you comment out $obj-share($obj2); the code returns 1,
which is what you would expect.

If this is the expected behavior, then it is not clearly
documented. If that is the case, this bug should probably be
changed to a documentation bug, and this example should be
added to the documentation with a detailed explanation.


---

[2001-07-05 15:05:26] [EMAIL PROTECTED]

This is expected behavior.  You are assuming that the object you had in $obj2 should 
be gone when you copy $obj to that var.  That is not the case.  It only changes what 
$obj2 points to.  Take this case:

$var=3;
$var2=$var;
unset($var);
echo $var2;

$var2 is still 3.  The reference is gone but not the value of the var.  That is what 
makes references nice.

Brian.

---

[2001-07-05 10:54:01] [EMAIL PROTECTED]

When objects that contain objects that are referenced
elsewhere, they are not correctly dereferenced, and strange
side effects result

class Foo{
  var $a;
  function Foo($value)
{
  $this-set($value);
}
  function set($value)
{
  $this-a = $value;
}
  function get()
{
  return $this-a;
}
}
class Bar{
  var $a;
  function Bar($value)
{
  $this-a = new Foo($value);
}
  function set($value)
{
  $this-a-set($value);
}
  function get()
{
  return $this-a-get();
}
  function share($other)
{
  $this-a =  $other-a;
}
}

//Objects are initialized
$obj = new Bar(1);
$obj2 = new Bar(2);

//$obj and $obj2 both contain an internal reference to the
//same Foo object, with a value of 2
$obj-share($obj2);

//$obj2 now references a new Bar object with a new
//Foo object containing a value of 3
$obj2 = new Bar(3);

//$obj2 should be a copy of $obj1 and contain a new
//Foo object with a value of 2
$obj2 = $obj;

//Somehow, this also changes the value in $obj2
$obj-set(4);

//In a sane world, this outputs 2
//In reality, we get a 4
echo $obj2-get();


---


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


-- 
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 #11931: When mb_send_mail function receive 5 argument, PHP doesn't show any screen.

2001-07-06 Thread yaemon

From: [EMAIL PROTECTED]
Operating system: FreeBSD 4.2-RELEASE
PHP version:  4.0.6
PHP Bug Type: Unknown/Other Function
Bug description:  When mb_send_mail function receive 5 argument, PHP doesn't show any 
screen.

patch is here
-
*** php-4.0.6.org/ext/mbstring/mbstring.c   Wed Jun 20
22:01:49 2001
--- php-4.0.6.new/ext/mbstring/mbstring.c   Fri Jul  6
17:09:41 2001
***
*** 2527,2531 
  {
int argc, n;
!   pval **argv[4];
char *to=NULL, *message=NULL, *headers=NULL,
*subject=NULL, *extra_cmd=NULL;
char *message_buf=NULL, *subject_buf=NULL, *p;
--- 2527,2531 
  {
int argc, n;
!   pval **argv[5];
char *to=NULL, *message=NULL, *headers=NULL,
*subject=NULL, *extra_cmd=NULL;
char *message_buf=NULL, *subject_buf=NULL, *p;
***
*** 2622,2626 
  #define PHP_MBSTR_MAIL_MIME_HEADER2 ; charset=
  #define PHP_MBSTR_MAIL_MIME_HEADER3
\nContent-Transfer-Encoding: 
!   if (argc == 4) {
convert_to_string_ex(argv[3]);
p = Z_STRVAL_PP(argv[3]);
--- 2622,2626 
  #define PHP_MBSTR_MAIL_MIME_HEADER2 ; charset=
  #define PHP_MBSTR_MAIL_MIME_HEADER3
\nContent-Transfer-Encoding: 
!   if (argc = 4) {
convert_to_string_ex(argv[3]);
p = Z_STRVAL_PP(argv[3]);



-- 
Edit Bug report at: http://bugs.php.net/?id=11931edit=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 #11932: When mb_send_mail function receive 5 argument, PHP doesn't show any screen.

2001-07-06 Thread yaemon

From: [EMAIL PROTECTED]
Operating system: FreeBSD 4.2-RELEASE
PHP version:  4.0.6
PHP Bug Type: Unknown/Other Function
Bug description:  When mb_send_mail function receive 5 argument, PHP doesn't show any 
screen.

patch is here
-
*** php-4.0.6.org/ext/mbstring/mbstring.c   Wed Jun 20
22:01:49 2001
--- php-4.0.6.new/ext/mbstring/mbstring.c   Fri Jul  6
17:09:41 2001
***
*** 2527,2531 
  {
int argc, n;
!   pval **argv[4];
char *to=NULL, *message=NULL, *headers=NULL,
*subject=NULL, *extra_cmd=NULL;
char *message_buf=NULL, *subject_buf=NULL, *p;
--- 2527,2531 
  {
int argc, n;
!   pval **argv[5];
char *to=NULL, *message=NULL, *headers=NULL,
*subject=NULL, *extra_cmd=NULL;
char *message_buf=NULL, *subject_buf=NULL, *p;
***
*** 2622,2626 
  #define PHP_MBSTR_MAIL_MIME_HEADER2 ; charset=
  #define PHP_MBSTR_MAIL_MIME_HEADER3
\nContent-Transfer-Encoding: 
!   if (argc == 4) {
convert_to_string_ex(argv[3]);
p = Z_STRVAL_PP(argv[3]);
--- 2622,2626 
  #define PHP_MBSTR_MAIL_MIME_HEADER2 ; charset=
  #define PHP_MBSTR_MAIL_MIME_HEADER3
\nContent-Transfer-Encoding: 
!   if (argc = 4) {
convert_to_string_ex(argv[3]);
p = Z_STRVAL_PP(argv[3]);



-- 
Edit Bug report at: http://bugs.php.net/?id=11932edit=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 #11931 Updated: When mb_send_mail function receive 5 argument, PHP doesn't show any screen.

2001-07-06 Thread derick

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

This was just fixed (by Riu)  in the CVS.

Previous Comments:
---

[2001-07-06 09:51:23] [EMAIL PROTECTED]

patch is here
-
*** php-4.0.6.org/ext/mbstring/mbstring.c   Wed Jun 20
22:01:49 2001
--- php-4.0.6.new/ext/mbstring/mbstring.c   Fri Jul  6
17:09:41 2001
***
*** 2527,2531 
  {
int argc, n;
!   pval **argv[4];
char *to=NULL, *message=NULL, *headers=NULL,
*subject=NULL, *extra_cmd=NULL;
char *message_buf=NULL, *subject_buf=NULL, *p;
--- 2527,2531 
  {
int argc, n;
!   pval **argv[5];
char *to=NULL, *message=NULL, *headers=NULL,
*subject=NULL, *extra_cmd=NULL;
char *message_buf=NULL, *subject_buf=NULL, *p;
***
*** 2622,2626 
  #define PHP_MBSTR_MAIL_MIME_HEADER2 ; charset=
  #define PHP_MBSTR_MAIL_MIME_HEADER3
nContent-Transfer-Encoding: 
!   if (argc == 4) {
convert_to_string_ex(argv[3]);
p = Z_STRVAL_PP(argv[3]);
--- 2622,2626 
  #define PHP_MBSTR_MAIL_MIME_HEADER2 ; charset=
  #define PHP_MBSTR_MAIL_MIME_HEADER3
nContent-Transfer-Encoding: 
!   if (argc = 4) {
convert_to_string_ex(argv[3]);
p = Z_STRVAL_PP(argv[3]);


---



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


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




[PHP-DEV] Bug #11932 Updated: When mb_send_mail function receive 5 argument, PHP doesn't show any screen.

2001-07-06 Thread derick

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

Submitted twice

Previous Comments:
---

[2001-07-06 09:52:31] [EMAIL PROTECTED]

patch is here
-
*** php-4.0.6.org/ext/mbstring/mbstring.c   Wed Jun 20
22:01:49 2001
--- php-4.0.6.new/ext/mbstring/mbstring.c   Fri Jul  6
17:09:41 2001
***
*** 2527,2531 
  {
int argc, n;
!   pval **argv[4];
char *to=NULL, *message=NULL, *headers=NULL,
*subject=NULL, *extra_cmd=NULL;
char *message_buf=NULL, *subject_buf=NULL, *p;
--- 2527,2531 
  {
int argc, n;
!   pval **argv[5];
char *to=NULL, *message=NULL, *headers=NULL,
*subject=NULL, *extra_cmd=NULL;
char *message_buf=NULL, *subject_buf=NULL, *p;
***
*** 2622,2626 
  #define PHP_MBSTR_MAIL_MIME_HEADER2 ; charset=
  #define PHP_MBSTR_MAIL_MIME_HEADER3
nContent-Transfer-Encoding: 
!   if (argc == 4) {
convert_to_string_ex(argv[3]);
p = Z_STRVAL_PP(argv[3]);
--- 2622,2626 
  #define PHP_MBSTR_MAIL_MIME_HEADER2 ; charset=
  #define PHP_MBSTR_MAIL_MIME_HEADER3
nContent-Transfer-Encoding: 
!   if (argc = 4) {
convert_to_string_ex(argv[3]);
p = Z_STRVAL_PP(argv[3]);


---



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


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




Re: [PHP-DEV] new/different problem in shutdown

2001-07-06 Thread Andi Gutmans

Thies,

I have thought about your problem.  Your patch fixed your test case but it 
won't fix all test cases. It is pretty much impossible to make sure on 
bailout (including exit() and errors) that all of the reference counts of 
the variables will go down to 0 even if we clean the call stack. This is 
due to necessary internal locking of variables in Zend.
I think we need to think of a better way to handle resource shutdowns 
(maybe with priorities).

Andi

At 01:17 PM 7/5/2001 +0200, Thies C. Arntzen wrote:
 zeev, andi

 please comment on my attached patch - it fixes my reported
 problem!

 have i overlooked something?

 thanx,
 tc

On Thu, Jul 05, 2001 at 11:35:15AM +0200, Thies C. Arntzen wrote:
 
  zeev,andi
 
  i have a problem with the oci-extension - it makes heaviy
  usage of ref-counting and creates dependices between resouces
  using refcounts. so i depend on a defined shutdown order and
  i also depend on the complete symbol-table to be destroyed
  before zend_destroy_rsrc_list is called as zend_destroy_rsrc_list
  won't work with my dependicies.
 
  i have created a small testcase that shows my problem without
  using the oci extension:
 
  the problem is that if a function calles exit the argumets
  for that function are _not_ destroyed in the shutdown
  mechanism of zend -
 
 
  ?
  function any($fh)
  {
  //exit(); // exit in a function is noo good...
  }
 
  $fp = fopen(/tmp/1,r);
  any($fp);
  ?
 
  if i set a breakpoint in _file_fopen_dtor (whic is the dtor
  for all fopen calls) i get these call frames
 
  _not_ calling exit in any($fh);
 
  #0  _file_fopen_dtor (rsrc=0x8420554) at 
 /home/thies/devel/php4/ext/standard/file.c:149
  #1  0x08190cbb in list_entry_destructor (ptr=0x8420554) at 
 ../../php4/Zend/zend_list.c:179
  #2  0x0818e65d in zend_hash_del_key_or_index (ht=0x83ae410, arKey=0x0, 
 nKeyLength=0, h=1, flag=1)
  at ../../php4/Zend/zend_hash.c:543
  #3  0x08190a25 in zend_list_delete (id=1) at ../../php4/Zend/zend_list.c:57
  #4  0x081a5d70 in _zval_dtor (zvalue=0x8420484, 
 __zend_filename=0x830aa40 ../../php4/Zend/zend_execute_API.c,
  __zend_lineno=260) at ../../php4/Zend/zend_variables.c:80
  #5  0x08193742 in _zval_ptr_dtor (zval_ptr=0x84205a0,
  __zend_filename=0x8316ce0 ../../php4/Zend/zend_variables.c, 
 __zend_lineno=169)
  at ../../php4/Zend/zend_execute_API.c:260
  #6  0x081a5fcb in _zval_ptr_dtor_wrapper (zval_ptr=0x84205a0) at 
 ../../php4/Zend/zend_variables.c:169
  #7  0x0818e789 in zend_hash_destroy (ht=0x83ae2ec) at 
 ../../php4/Zend/zend_hash.c:572
  #8  0x081934f2 in shutdown_executor () at 
 ../../php4/Zend/zend_execute_API.c:164
  #9  0x08195a70 in zend_deactivate () at ../../php4/Zend/zend.c:538
  #10 0x08089af9 in php_request_shutdown (dummy=0x0) at 
 /home/thies/devel/php4/main/main.c:692
  #11 0x08085bd3 in main (argc=2, argv=0xb7a4) at 
 /home/thies/devel/php4/sapi/cgi/cgi_main.c:790
  #12 0x409e3450 in __libc_start_main () from /lib/libc.so.6
 
  as you can see $fp is freed thru the call to
  zend_hash_destroy(EG(symbol_table)); in shutdown_executor.
 
 
  but not so if i'm _calling_  exit in any($fh);
 
  #0  _file_fopen_dtor (rsrc=0x84205cc) at 
 /home/thies/devel/php4/ext/standard/file.c:149
  #1  0x08190cbb in list_entry_destructor (ptr=0x84205cc) at 
 ../../php4/Zend/zend_list.c:179
  #2  0x0818ea00 in zend_hash_apply_deleter (ht=0x83ae410, p=0x8420574) 
 at ../../php4/Zend/zend_hash.c:627
  #3  0x0818ebae in zend_hash_graceful_destroy (ht=0x83ae410) at 
 ../../php4/Zend/zend_hash.c:678
  #4  0x08190e13 in zend_destroy_rsrc_list () at 
 ../../php4/Zend/zend_list.c:234
  #5  0x08193591 in shutdown_executor () at 
 ../../php4/Zend/zend_execute_API.c:178
  #6  0x08195a70 in zend_deactivate () at ../../php4/Zend/zend.c:538
  #7  0x08089af9 in php_request_shutdown (dummy=0x0) at 
 /home/thies/devel/php4/main/main.c:692
  #8  0x08085bd3 in main (argc=2, argv=0xb7a4) at 
 /home/thies/devel/php4/sapi/cgi/cgi_main.c:790
  #9  0x409e3450 in __libc_start_main () from /lib/libc.so.6
  (gdb) r
 
  as you see the resource is cleaned thru
  zend_destroy_rsrc_list which won't work with dependicies.
 
  again the problem is that the arguments on the stack do _not_
  get cleared if a function calls exit().
 
  what can be done?
 
  tc
 
  --
  PHP Development Mailing List http://www.php.net/
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 


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




[PHP-DEV] Bug #11933: array_map causes segfault

2001-07-06 Thread abk

From: [EMAIL PROTECTED]
Operating system: Debian GNU/Linux \sid\ (kernel 2.4.5)
PHP version:  4.0.6
PHP Bug Type: Reproducible crash
Bug description:  array_map causes segfault

I have a script which seems to arbitrarily crash. Removing
all uses of array_map corrects the problem, even though the
apparent point of crash isn't anywhere near a call to
array_map. I'd attach the script but it's rather long and I
don't have time to whittle it down to a minimum case.

gdb backtrace:

#0  0x4024e390 in call_user_function_ex () from
/usr/lib/apache/1.3/libphp4.so
#1  0x402967eb in php_if_array_map () from
/usr/lib/apache/1.3/libphp4.so
#2  0x40247d09 in execute () from /usr/lib/apache/1.3/libphp4.so
#3  0x40247f5c in execute () from /usr/lib/apache/1.3/libphp4.so
#4  0x40247f5c in execute () from /usr/lib/apache/1.3/libphp4.so
#5  0x4025654e in zend_execute_scripts () from
/usr/lib/apache/1.3/libphp4.so
#6  0x40268224 in php_execute_script () from
/usr/lib/apache/1.3/libphp4.so
#7  0x4026488f in apache_php_module_main () from
/usr/lib/apache/1.3/libphp4.so
#8  0x4026526e in php_restore_umask () from
/usr/lib/apache/1.3/libphp4.so
#9  0x402652aa in php_restore_umask () from
/usr/lib/apache/1.3/libphp4.so
#10 0x8054204 in ap_invoke_handler ()
#11 0x806306c in ap_some_auth_required ()
#12 0x80630c8 in ap_process_request ()
#13 0x805cc29 in ap_child_terminate ()
#14 0x805cdbc in ap_child_terminate ()
#15 0x805ced9 in ap_child_terminate ()
#16 0x805d395 in ap_child_terminate ()
#17 0x805da5d in main ()
#18 0x400e438b in __libc_start_main () from /lib/libc.so.6


-- 
Edit Bug report at: http://bugs.php.net/?id=11933edit=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] new/different problem in shutdown

2001-07-06 Thread Thies C. Arntzen

On Fri, Jul 06, 2001 at 05:12:07PM +0300, Andi Gutmans wrote:
 Thies,
 
 I have thought about your problem.  Your patch fixed your test case but it 
 won't fix all test cases. It is pretty much impossible to make sure on 
 bailout (including exit() and errors) that all of the reference counts of 
 the variables will go down to 0 even if we clean the call stack. This is 
 due to necessary internal locking of variables in Zend.

i don't understand why we cant go thru the call-stack and
del-ref all the arguments? we're shutting down anyhow -
right?

also i'm *not talking* about bail at all - bail dosn't work
anyhow - and there's no good way to fix it IMHO. but what
needs to work is calling exit() from a function if there are
resources somewhere on the stack.


 I think we need to think of a better way to handle resource shutdowns 
 (maybe with priorities).

this will be major headache, right?

don't get me wrong, but i need this to get fixed elsewise
using refcounts for dependicies is simply not working and i
would have to think of something different - which would be a
real shame.

tc

 
 Andi
 
 At 01:17 PM 7/5/2001 +0200, Thies C. Arntzen wrote:
 zeev, andi
 
 please comment on my attached patch - it fixes my reported
 problem!
 
 have i overlooked something?
 
 thanx,
 tc
 
 On Thu, Jul 05, 2001 at 11:35:15AM +0200, Thies C. Arntzen wrote:
 
  zeev,andi
 
  i have a problem with the oci-extension - it makes heaviy
  usage of ref-counting and creates dependices between resouces
  using refcounts. so i depend on a defined shutdown order and
  i also depend on the complete symbol-table to be destroyed
  before zend_destroy_rsrc_list is called as zend_destroy_rsrc_list
  won't work with my dependicies.
 
  i have created a small testcase that shows my problem without
  using the oci extension:
 
  the problem is that if a function calles exit the argumets
  for that function are _not_ destroyed in the shutdown
  mechanism of zend -
 
 
  ?
  function any($fh)
  {
  //exit(); // exit in a function is noo good...
  }
 
  $fp = fopen(/tmp/1,r);
  any($fp);
  ?
 
  if i set a breakpoint in _file_fopen_dtor (whic is the dtor
  for all fopen calls) i get these call frames
 
  _not_ calling exit in any($fh);
 
  #0  _file_fopen_dtor (rsrc=0x8420554) at 
 /home/thies/devel/php4/ext/standard/file.c:149
  #1  0x08190cbb in list_entry_destructor (ptr=0x8420554) at 
 ../../php4/Zend/zend_list.c:179
  #2  0x0818e65d in zend_hash_del_key_or_index (ht=0x83ae410, arKey=0x0, 
 nKeyLength=0, h=1, flag=1)
  at ../../php4/Zend/zend_hash.c:543
  #3  0x08190a25 in zend_list_delete (id=1) at 
 ../../php4/Zend/zend_list.c:57
  #4  0x081a5d70 in _zval_dtor (zvalue=0x8420484, 
 __zend_filename=0x830aa40 ../../php4/Zend/zend_execute_API.c,
  __zend_lineno=260) at ../../php4/Zend/zend_variables.c:80
  #5  0x08193742 in _zval_ptr_dtor (zval_ptr=0x84205a0,
  __zend_filename=0x8316ce0 ../../php4/Zend/zend_variables.c, 
 __zend_lineno=169)
  at ../../php4/Zend/zend_execute_API.c:260
  #6  0x081a5fcb in _zval_ptr_dtor_wrapper (zval_ptr=0x84205a0) at 
 ../../php4/Zend/zend_variables.c:169
  #7  0x0818e789 in zend_hash_destroy (ht=0x83ae2ec) at 
 ../../php4/Zend/zend_hash.c:572
  #8  0x081934f2 in shutdown_executor () at 
 ../../php4/Zend/zend_execute_API.c:164
  #9  0x08195a70 in zend_deactivate () at ../../php4/Zend/zend.c:538
  #10 0x08089af9 in php_request_shutdown (dummy=0x0) at 
 /home/thies/devel/php4/main/main.c:692
  #11 0x08085bd3 in main (argc=2, argv=0xb7a4) at 
 /home/thies/devel/php4/sapi/cgi/cgi_main.c:790
  #12 0x409e3450 in __libc_start_main () from /lib/libc.so.6
 
  as you can see $fp is freed thru the call to
  zend_hash_destroy(EG(symbol_table)); in shutdown_executor.
 
 
  but not so if i'm _calling_  exit in any($fh);
 
  #0  _file_fopen_dtor (rsrc=0x84205cc) at 
 /home/thies/devel/php4/ext/standard/file.c:149
  #1  0x08190cbb in list_entry_destructor (ptr=0x84205cc) at 
 ../../php4/Zend/zend_list.c:179
  #2  0x0818ea00 in zend_hash_apply_deleter (ht=0x83ae410, p=0x8420574) 
 at ../../php4/Zend/zend_hash.c:627
  #3  0x0818ebae in zend_hash_graceful_destroy (ht=0x83ae410) at 
 ../../php4/Zend/zend_hash.c:678
  #4  0x08190e13 in zend_destroy_rsrc_list () at 
 ../../php4/Zend/zend_list.c:234
  #5  0x08193591 in shutdown_executor () at 
 ../../php4/Zend/zend_execute_API.c:178
  #6  0x08195a70 in zend_deactivate () at ../../php4/Zend/zend.c:538
  #7  0x08089af9 in php_request_shutdown (dummy=0x0) at 
 /home/thies/devel/php4/main/main.c:692
  #8  0x08085bd3 in main (argc=2, argv=0xb7a4) at 
 /home/thies/devel/php4/sapi/cgi/cgi_main.c:790
  #9  0x409e3450 in __libc_start_main () from /lib/libc.so.6
  (gdb) r
 
  as you see the resource is cleaned thru
  zend_destroy_rsrc_list which won't work with dependicies.
 
  again the problem is that 

[PHP-DEV] Bug #11857 Updated: Access 2000 Bug - Insert statement does not work

2001-07-06 Thread kalowsky

ID: 11857
Updated by: kalowsky
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Closed
Bug Type: ODBC related
Operating system: 
PHP Version: 4.0.6
Assigned To: 
Comments:

resolved... problem was in use of odbc_pconnect instead of odbc_connect in CGI mode.  

Previous Comments:
---

[2001-07-03 11:21:29] [EMAIL PROTECTED]

Hi Folks,

we did implement a GPS Reference Station Webserver using Apache, PHP and ODBC 
Connectivity to MS Access Database files (found at http://www.virtualrtk.com). 
Currently we are using Apache 1.3.20, PHP 4.0.6 and the latest Version of  Microsoft 
Access mdb-Driver 4.00.5303.1 got from Office2000 Service Pack 2. And now since we 
using Access 2000 in the back we got serious problems regarding the database 
connectivity. In other words we are not able to write any data to the tables using PHP 
as we did before through Access 97 Driver (fetching tables still works fine). I'm 
pretty sure that this problem is related to Access 2000 because I switched back to 
Access 97 and it worked just fine. Does anyone know if the is any difference between 
Access 2000 and 97? 

Regards
Sebastian

---



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


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




[PHP-DEV] Bug #8941 Updated: Openlink/ODBC cannot parse complex queries

2001-07-06 Thread kalowsky

ID: 8941
Updated by: kalowsky
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Analyzed
Bug Type: ODBC related
Operating system: 
PHP Version: 4.0.2
Assigned To: 
Comments:

moving this to analyzed as hopefully once I work out this cursors patch it will be 
gone too!

Previous Comments:
---

[2001-05-09 16:32:57] [EMAIL PROTECTED]

this issue is specific to the interaction of the Progress database and the OpenLink 
Agent-based cursor library

once scrollable cursors are not used this is not a problem

---

[2001-04-02 17:01:59] [EMAIL PROTECTED]

According to openlink, the issue is caused by the dynamic cursors now used in the php 
odbc functions. 

remarking out the #define HAVE_SQL_EXTENDED_FETCH 1 entry in the iodbc section 
provides a temporary relief from the problem.

---

[2001-04-02 16:55:47] [EMAIL PROTECTED]

have you tried updating to the latest OpenLink libraries?  They have supposedly been 
better enhanced and unified with PHP.

---

[2001-02-05 10:36:30] [EMAIL PROTECTED]

problem still exists in PHP 404 sp1

---

[2001-01-26 12:27:51] [EMAIL PROTECTED]

Configuration above should show PHP4.0.2 not 4.0.1pl2

---

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


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


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




Re: [PHP-DEV] new/different problem in shutdown

2001-07-06 Thread Andi Gutmans

At 04:31 PM 7/6/2001 +0200, Thies C. Arntzen wrote:
On Fri, Jul 06, 2001 at 05:12:07PM +0300, Andi Gutmans wrote:
  Thies,
 
  I have thought about your problem.  Your patch fixed your test case but it
  won't fix all test cases. It is pretty much impossible to make sure on
  bailout (including exit() and errors) that all of the reference counts of
  the variables will go down to 0 even if we clean the call stack. This is
  due to necessary internal locking of variables in Zend.

 i don't understand why we cant go thru the call-stack and
 del-ref all the arguments? we're shutting down anyhow -
 right?

 also i'm *not talking* about bail at all - bail dosn't work
 anyhow - and there's no good way to fix it IMHO. but what
 needs to work is calling exit() from a function if there are
 resources somewhere on the stack.

Because as I mentioned there might be locked variables which aren't in the 
call stack. This is what I could think of right now but there might be 
other problems too.


  I think we need to think of a better way to handle resource shutdowns
  (maybe with priorities).

 this will be major headache, right?

 don't get me wrong, but i need this to get fixed elsewise
 using refcounts for dependicies is simply not working and i
 would have to think of something different - which would be a
 real shame.

Don't get me wrong. I really want to help you :) I just can't think of a 
great way right now. The only thing I could think of is making the resource 
shutdown smarter (will probably be quite a bit slower though).

Andi


-- 
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 #9738 Updated: odbc_prepare does implicit SQLSetStmtOption (6,2) (sets to dynamic cursor)

2001-07-06 Thread kalowsky

ID: 9738
Updated by: kalowsky
Reported By: [EMAIL PROTECTED]
Old-Status: Feedback
Status: Analyzed
Bug Type: ODBC related
Operating system: 
PHP Version: 4.0.4pl1
Assigned To: 
Comments:

marking this as analyzed as this will hopefully go away too with the cursor fix, but 
won't disappear until than...

Previous Comments:
---

[2001-06-10 16:05:30] [EMAIL PROTECTED]

patch sent to you for verification.  awaiting response :)
http://www.deadmime.org/~dank/odbc.c.diff
http://www.deadmime.org/~dank/odbc.h.diff

if you didn't get them AGAIN in email... i think it's your 
mail server btw.. ;-)



---

[2001-03-14 05:17:27] [EMAIL PROTECTED]

Since some drivers don't like to perform certain queries with the default setting of 
the dynamic cursor, it might be nice to use something like odbc_setoption to 
manually change the type of Statement that the SQL will be prepared on.  Problem is, 
currently when changing a statement option this way (argument of 2 for 
SQLSetStmtOption), you have to already have prepared a SQL statement:

$result = odbc_prepare ($conn, $sql);
odbc_setoption ($result, 2, 6, 3);
odbc_execute ($result);  

This implicitly sets the statement option to set a dynamic cursor first, as the 
following ODBC trace shows:

SQLAllocStmt hDbc=DBD0002
phstmt=40073138
SQLAllocStmt: returning SQL_SUCCESS

SQLGetInfo hDbc=DBD0002
fInfoType=8 rgbInfoValue=7B03CD68 cbInfoValueMax=4 pcbInfoValue=0
SQLGetInfo: returning SQL_SUCCESS

SQLSetStmtOption hStmt=DBD0003
fOption=6 vParam=0002
SQLSetStmtOption: returning SQL_SUCCESS_WITH_INFO

SQLPrepare hStmt=DBD0003
szSqlStr=400746F8 cbSqlStr=-3
  [SELECT target.description, target_data.layer1_key,target_data.layer2_key, 
target_data.layer3_key,target_data.layer4_key,target_data.layer5_key,target_data.layer6_key,target_data.company_code,target_data.location_code
 FROM dw_user_targets  JOIN target ON target.target_code = dw_user_targets.target_code 
JOIN target_data ON target_data.target_code = dw_user_targets.target_code AND 
target_data.company_code=2 AND target_data.year=1998 AND target_data.period_no=7 WHERE 
dw_user_targets.dw_userid='mark']
SQLPrepare: returning SQL_ERROR

Here's sample script that could reproduce the above.  (Just substitute the above query 
and connect to a Progress 8.3B database with a similar schema to get even closer)

?
putenv(ODBCINI=/usr/local/openlink/odbc.ini);
$dsn=DSN=OracleLocal; // this is a valid DSN set up in the above odbc.ini file, 
tested in odbctest
$user=scott; //default user for the demo Oracle database
$password=tiger; //default password for demo Oracle database
 
$sql=SELECT * FROM EMP;  
// directly execute mode 
if ($conn_id=odbc_connect($dsn,,)){
echo connected to DSN: $dsn;
if($result=odbc_prepare($conn_id, $sql)) {
 odbc_execute($result)
}else{
echo can not execute '$sql' ;
}
echo closing connection $conn_id;
odbc_close($conn_id);
}else{
echo cannot connect to DSN: $dsn ;
}
?

So, I propose making a new prepare function such as odbc_prepare_clean which doesn't 
do the implicit SetStmtOption(2,6) for the dynamic cursor.  There shouldn't be a 
problem without the implicit SetStmtOption as the driver will default to what it 
supports anyway.

E.g:
$result = odbc_prepare_clean ($conn, $sql);
odbc_setoption ($result, 2, 6, 3);
odbc_execute ($result);  



---



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


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




[PHP-DEV] Bug #11571 Updated: cannot insert data in msaccess

2001-07-06 Thread kalowsky

ID: 11571
Updated by: kalowsky
Reported By: [EMAIL PROTECTED]
Old-Status: Feedback
Status: Closed
Bug Type: ODBC related
Operating system: 
PHP Version: 4.0.5
Assigned To: 
Comments:

no user feedback.

Previous Comments:
---

[2001-06-21 11:11:58] [EMAIL PROTECTED]

script works fine for me.  are you sure you haven't given out your DSN in read only 
mode, or possibly requiring a user?

---

[2001-06-20 00:51:30] [EMAIL PROTECTED]

hello.

my script is :
-
?
   /* connect database */
   $dsn = nawa_dsn;
   $user = ;
   $pw = ;
   $conn = odbc_connect($dsn,$user,$pw);
   $sql = insert into TB_Login (UserID,Name) values ('002','Somphob');

   /* check for errors */ 
   if (!odbc_exec($conn,$sql)) { 
  /* error */ 
  echo Error;
   } 
   else {
  echo OK!;
   }

   /* close connection */ 
   odbc_close($conn);
?
-

and result is :
-
Warning: SQL error: [Microsoft][ODBC Microsoft Access Driver] Operation must use an 
updateable query., SQL state S1000 in SQLExecDirect in 
c:inetpubwwwrootcustomersave.php on line 12

Error
-
please tell me. thank.


---



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


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




[PHP-DEV] Bug #11895 Updated: total crash of PHP

2001-07-06 Thread kalowsky

ID: 11895
Updated by: kalowsky
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Feedback
Bug Type: ODBC related
Operating system: 
PHP Version: 4.0.6
Assigned To: 
Comments:

any chance you can post a sample db (small schema), and a sample script for us to try?

Previous Comments:
---

[2001-07-05 03:12:00] [EMAIL PROTECTED]

After adding set_time_limit(60); the following is dumped to
the web browser.

Fatal error: Maximum execution time of 60 seconds exceeded
in c:websitestigsample_report2.php on line 49

and 'Program Error' box is popped up on the server (Dr
Watson) saying 'Apache.exe has generated errors and will be
 '

When php is run as a CGI the error msg says that 'php.exe
has generated...' 

Line 49 of the code is;

$RS = odbc_exec($CON,$query);

The weirdest bit is if I re-run the same query with the same
variables (after the restart of apache) the query is nice
and fast. I think SQL2000 is caching the results somehow. 

The variable is required and will be any number between 700
and 


---

[2001-07-05 02:52:39] [EMAIL PROTECTED]

Can you confirm that it crashes at around 60 seconds if you use set_time_limit(60); at 
the top of your script?

Derick

---

[2001-07-04 22:24:55] [EMAIL PROTECTED]

an ODBC query that takes a long time to excute ( 30 sec)
will crash php and requires apache to restart. This is when
loading php as an apache modual or as a CGI

apache 1.3.20 (win2k)
php 4.0.6 (win2k)
SQL2000 (win2k)

The SQL2000 database has over 30 million records and is
performing a scan (on indexed records)

I'm more than willing to test code or help out to fix this btw

---



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


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




[PHP-DEV] Bug #11932 Updated: When mb_send_mail function receive 5 argument, PHP doesn't show any screen.

2001-07-06 Thread hirokawa

ID: 11932
Updated by: hirokawa
Reported By: [EMAIL PROTECTED]
Old-Status: Bogus
Status: Closed
Bug Type: Unknown/Other Function
Operating system: 
PHP Version: 4.0.6
Assigned To: [EMAIL PROTECTED]
Comments:

I fixed on cvs using your patch.
It will be included in php-4.0.7.

Previous Comments:
---

[2001-07-06 09:54:09] [EMAIL PROTECTED]

Submitted twice

---

[2001-07-06 09:52:31] [EMAIL PROTECTED]

patch is here
-
*** php-4.0.6.org/ext/mbstring/mbstring.c   Wed Jun 20
22:01:49 2001
--- php-4.0.6.new/ext/mbstring/mbstring.c   Fri Jul  6
17:09:41 2001
***
*** 2527,2531 
  {
int argc, n;
!   pval **argv[4];
char *to=NULL, *message=NULL, *headers=NULL,
*subject=NULL, *extra_cmd=NULL;
char *message_buf=NULL, *subject_buf=NULL, *p;
--- 2527,2531 
  {
int argc, n;
!   pval **argv[5];
char *to=NULL, *message=NULL, *headers=NULL,
*subject=NULL, *extra_cmd=NULL;
char *message_buf=NULL, *subject_buf=NULL, *p;
***
*** 2622,2626 
  #define PHP_MBSTR_MAIL_MIME_HEADER2 ; charset=
  #define PHP_MBSTR_MAIL_MIME_HEADER3
nContent-Transfer-Encoding: 
!   if (argc == 4) {
convert_to_string_ex(argv[3]);
p = Z_STRVAL_PP(argv[3]);
--- 2622,2626 
  #define PHP_MBSTR_MAIL_MIME_HEADER2 ; charset=
  #define PHP_MBSTR_MAIL_MIME_HEADER3
nContent-Transfer-Encoding: 
!   if (argc = 4) {
convert_to_string_ex(argv[3]);
p = Z_STRVAL_PP(argv[3]);


---



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


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




[PHP-DEV] Bug #11932 Updated: When mb_send_mail function receive 5 argument, PHP doesn't show any screen.

2001-07-06 Thread derick

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

This was the double one Rui. I already closed the other one (11932).

Previous Comments:
---

[2001-07-06 10:50:31] [EMAIL PROTECTED]

I fixed on cvs using your patch.
It will be included in php-4.0.7.

---

[2001-07-06 09:54:09] [EMAIL PROTECTED]

Submitted twice

---

[2001-07-06 09:52:31] [EMAIL PROTECTED]

patch is here
-
*** php-4.0.6.org/ext/mbstring/mbstring.c   Wed Jun 20
22:01:49 2001
--- php-4.0.6.new/ext/mbstring/mbstring.c   Fri Jul  6
17:09:41 2001
***
*** 2527,2531 
  {
int argc, n;
!   pval **argv[4];
char *to=NULL, *message=NULL, *headers=NULL,
*subject=NULL, *extra_cmd=NULL;
char *message_buf=NULL, *subject_buf=NULL, *p;
--- 2527,2531 
  {
int argc, n;
!   pval **argv[5];
char *to=NULL, *message=NULL, *headers=NULL,
*subject=NULL, *extra_cmd=NULL;
char *message_buf=NULL, *subject_buf=NULL, *p;
***
*** 2622,2626 
  #define PHP_MBSTR_MAIL_MIME_HEADER2 ; charset=
  #define PHP_MBSTR_MAIL_MIME_HEADER3
nContent-Transfer-Encoding: 
!   if (argc == 4) {
convert_to_string_ex(argv[3]);
p = Z_STRVAL_PP(argv[3]);
--- 2622,2626 
  #define PHP_MBSTR_MAIL_MIME_HEADER2 ; charset=
  #define PHP_MBSTR_MAIL_MIME_HEADER3
nContent-Transfer-Encoding: 
!   if (argc = 4) {
convert_to_string_ex(argv[3]);
p = Z_STRVAL_PP(argv[3]);


---



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


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




Re: [PHP-DEV] Transparent use of blobs in Interbase

2001-07-06 Thread Jeremy Bettis

 Can you send this patch to the list as an attachment? It's a little messed
 up due to line endings.

Here you are.


Index: ext/interbase/interbase.c
===
RCS file: /repository/php4/ext/interbase/interbase.c,v
retrieving revision 1.58
diff -u -r1.58 interbase.c
--- ext/interbase/interbase.c   2001/06/09 09:30:42 1.58
+++ ext/interbase/interbase.c   2001/07/06 14:59:01
@@ -25,6 +25,15 @@
 
 /*
Changes:
+   2001-06-13: Jeremy Bettis [EMAIL PROTECTED]
+   - Return the text of blobs in _php_ibase_fetch_hash, not the blob
+ handles, even if the BLOB is not of TEXT type
+   2001-05-31: Jeremy Bettis [EMAIL PROTECTED]
+   - If a blob handle was expected and something else was
+ received create a blob and add the value to it.
+   - If the incoming argument to a bind parameter is NULL
+ then store a NULL in the database.
+   - More verbose date errors.
1999-09-21: Ivo Panacek [EMAIL PROTECTED]
- added COMPILE_DL section
- more verbose php_info_ibase function
@@ -1130,7 +1139,7 @@
 
 /* {{{ _php_ibase_bind()
Bind parameter placeholders in a previously prepared query */
-static int _php_ibase_bind(XSQLDA *sqlda, pval **b_vars, BIND_BUF *buf)
+static int _php_ibase_bind(XSQLDA *sqlda, pval **b_vars, BIND_BUF *buf, ibase_query 
+*ib_query)
 {
XSQLVAR *var;
pval *b_var;
@@ -1143,6 +1152,15 @@
var-sqlind  = buf[i].sqlind;
b_var = b_vars[i];

+   if (b_var-type == IS_NULL) {
+   static char nothing[64];
+   static short null_flag = -1;
+   var-sqldata = nothing;
+   var-sqltype |= 1;
+   var-sqlind = null_flag;
+   if (var-sqllen  64)
+   var-sqllen = 64;
+   } else
switch(var-sqltype  ~1) {
case SQL_TEXT: /* direct to variable */
case SQL_VARYING:
@@ -1220,7 +1238,7 @@
n = 
sscanf(b_var-value.str.val,%d%*[/]%d%*[/]%d %d%*[:]%d%*[:]%d,
   t.tm_mon, t.tm_mday, t.tm_year,  
t.tm_hour, t.tm_min, t.tm_sec);
if(n != 3  n != 6){
-   _php_ibase_module_error(invalid 
date/time format);
+   _php_ibase_module_error(invalid 
+date/time format: Expected 3 or 6 fields, got %d. Use format m/d/Y H:i:s. You gave 
+'%s', n, b_var-value.str.val);
return FAILURE;
}
t.tm_year -= 1900;
@@ -1278,12 +1296,36 @@
if (b_var-type != IS_STRING
|| b_var-value.str.len != 
sizeof(ibase_blob_handle)
|| ((ibase_blob_handle 
*)(b_var-value.str.val))-bl_handle != 0) {
+   IBLS_FETCH();
+   ibase_blob_handle *ib_blob;
+   ib_blob = (ibase_blob_handle *) 
+emalloc(sizeof(ibase_blob_handle));
+   ib_blob-trans_handle = 
+ib_query-trans;
+   ib_blob-link = ib_query-link;
+   ib_blob-bl_handle = NULL;
+   if (isc_create_blob(IB_STATUS, 
+ib_blob-link, ib_blob-trans_handle, ib_blob-bl_handle, ib_blob-bl_qd)) {
+   efree(ib_blob);
+   _php_ibase_error();
+   return FAILURE;
+   }
+   convert_to_string(b_var);
+   if (isc_put_segment(IB_STATUS, 
+ib_blob-bl_handle, (unsigned short) b_var-value.str.len, b_var-value.str.val)) {
+   _php_ibase_error();
+   return FAILURE;
+   }
+   if (isc_close_blob(IB_STATUS, 
+ib_blob-bl_handle)) {
+   _php_ibase_error();
+   return FAILURE;
+  

[PHP-DEV] Bug #11934: failure to configure --with-imap-ssl

2001-07-06 Thread darduini

From: [EMAIL PROTECTED]
Operating system: Solaris 8
PHP version:  4.0.6
PHP Bug Type: *Compile Issues
Bug description:  failure to configure --with-imap-ssl

==
my config.nice is:

#! /bin/sh
#
# Created by configure

CFLAGS='-O6 -fomit-frame-pointer -pipe' \
CXXFLAGS='-O6 -pipe' \
LDFLAGS='-s' \
CC='gcc' \
CXX='gcc' \
'./configure' \
'--prefix=/opt/php-2001-07-05' \
'--with-apxs=/opt/apache/bin/apxs' \
'--with-config-file-path=/opt/php-2001-07-05' \
'--enable-safe-mode' \
'--enable-memory-limit' \
'--with-exec-dir=/opt/php-2001-07-05/php-bin' \
'--enable-track-vars' \
'--disable-debug' \
'--enable-magic-quotes' \
'--enable-bcmath' \
'--enable-dbase' \
'--enable-filepro' \
'--enable-ftp' \
'--with-zlib' \
'--with-jpeg-dir=/usr,/usr/local,/opt' \
'--with-png-dir=/usr,/usr/local,/opt' \
'--with-tiff-dir=/usr,/usr/local,/opt' \
'--enable-sysvsem' \
'--enable-sysvshm' \
'--with-xml' \
'--enable-wddx' \
'--with-gdbm' \
'--enable-dbx' \
'--with-imap=/opt/imap' \
'--with-imap-ssl=/opt/openssl' \
'--with-openssl=/opt/openssl' \
'--with-ssl=/opt/openssl' \
'--with-pdflib=/opt/pdflib' \
'--with-mcrypt=/opt/mcrypt' \
'--with-mhash=/opt/mhash' \
'--with-ttf=/opt/freetype' \
'--with-gd=/opt/gd' \
'--enable-dba' \
'--with-db3=/opt/db-3' \
'--with-oci8=/opt/oracle/product/8.1.5' \
$@

==
my config.log ends with:

configure:23909: checking for SSL support in IMAP
configure:24030: gcc -o conftest -O6 -fomit-frame-pointer -pipe  
-D_POSIX_PTHREAD_SEMANTICS -DSOL
ARIS2=270 -DMOD_SSL=208104 -DEAPI -DUSE_EXPAT -DSHARED_CORE -s -R/usr/ucblib 
-L/usr/ucblib -R/opt
/openssl/lib -L/opt/openssl/lib -R/usr/local/lib/gcc-lib/sparc-sun-solaris2.7/2.95.2 
-L/usr/local
/lib/gcc-lib/sparc-sun-solaris2.7/2.95.2 -R/usr/local/lib -L/usr/local/lib 
-R/opt/db-3/lib -L/opt
/db-3/lib -R/opt/freetype/lib -L/opt/freetype/lib -R/opt/gd/lib -L/opt/gd/lib 
-R/opt/imap/c-clien
t -L/opt/imap/c-client conftest.c -lpam -lgd -lttf -lpng -lz -ljpeg -ldb -lgdbm -lz 
-lcrypt -lssl
 -lcrypto -lresolv -lresolv -lm -ldl -lnsl -lsocket  -lsocket -lgcc -lc-client 
-lcrypto -lssl 1
5
Undefined   first referenced
 symbol in file
EVP_md2 /opt/openssl/lib/libssl.a(ssl_algs.o)
EVP_md5 /opt/openssl/lib/libssl.a(ssl_algs.o)
COMP_CTX_free   /opt/openssl/lib/libssl.a(t1_enc.o)
EVP_des_ede3_cbc/opt/openssl/lib/libssl.a(ssl_algs.o)
EVP_enc_null/opt/openssl/lib/libssl.a(ssl_ciph.o)
EVP_des_cbc /opt/openssl/lib/libssl.a(ssl_algs.o)
EVP_rc2_cbc /opt/openssl/lib/libssl.a(ssl_algs.o)
HMAC_cleanup/opt/openssl/lib/libssl.a(t1_enc.o)
d2i_DHparams/opt/openssl/lib/libssl.a(ssl_cert.o)
EVP_rc4 /opt/openssl/lib/libssl.a(ssl_algs.o)
PEM_read_bio_RSAPrivateKey  /opt/openssl/lib/libssl.a(ssl_rsa.o)
PEM_read_bio_X509   /opt/openssl/lib/libssl.a(ssl_cert.o)
EVP_EncryptInit /opt/openssl/lib/libssl.a(s2_enc.o)
COMP_compress_block /opt/openssl/lib/libssl.a(s3_pkt.o)
BIO_f_buffer/opt/openssl/lib/libssl.a(ssl_lib.o)
COMP_expand_block   /opt/openssl/lib/libssl.a(s3_pkt.o)
HMAC_Update /opt/openssl/lib/libssl.a(t1_enc.o)
PEM_read_bio_PrivateKey /opt/openssl/lib/libssl.a(ssl_rsa.o)
EVP_DecryptInit /opt/openssl/lib/libssl.a(s2_enc.o)
X509_STORE_load_locations   /opt/openssl/lib/libssl.a(ssl_lib.o)
EVP_CipherInit  /opt/openssl/lib/libssl.a(t1_enc.o)
EVP_dss1/opt/openssl/lib/libssl.a(ssl_algs.o)
X509_STORE_set_default_paths/opt/openssl/lib/libssl.a(ssl_lib.o)
X509_certificate_type   /opt/openssl/lib/libssl.a(s3_srvr.o)
COMP_CTX_new/opt/openssl/lib/libssl.a(t1_enc.o)
EVP_idea_cbc/opt/openssl/lib/libssl.a(ssl_algs.o)
HMAC_Final  /opt/openssl/lib/libssl.a(t1_enc.o)
i2d_DHparams/opt/openssl/lib/libssl.a(ssl_cert.o)
EVP_CIPHER_CTX_init /opt/openssl/lib/libssl.a(t1_enc.o)
DSA_verify  /opt/openssl/lib/libssl.a(s3_srvr.o)
HMAC_Init   /opt/openssl/lib/libssl.a(t1_enc.o)
EVP_CIPHER_CTX_cleanup  /opt/openssl/lib/libssl.a(ssl_lib.o)
ld: fatal: Symbol referencing errors. No output written to conftest
collect2: ld returned 1 exit status
configure: failed program was:
#line 24005 configure
#include confdefs.h

  void mm_log(void){}
  void mm_dlog(void){}
  void mm_flags(void){}
  void mm_fatal(void){}
  void mm_critical(void){}
  void mm_nocritical(void){}
  void mm_notify(void){}
  

[PHP-DEV] Bug #11895 Updated: total crash of PHP

2001-07-06 Thread tigger

ID: 11895
User Update by: [EMAIL PROTECTED]
Old-Status: Feedback
Status: Open
Bug Type: ODBC related
Operating system: win2k
PHP Version: 4.0.6
Description: total crash of PHP

We played with the indexes and now the data is returning a
lot faster (2 seconds where it was over 60!) Someone who was
meant to have placed these indexes did not test for this
query :]

Anyway, you can still crash php/apache with the following
code IF you go beyond the script timeout limits. Apache
spawns an instance for each request so it only crashes
individual instances of apache, but its still not to good. I
think if you load php as a CGI you can run into bigger
problems. Here is some code;

html
body
?php

//change these to suit your set-up
//change $PC to any 4 numbers
$PC = 2000;
$DB_DSN = SomeDNS;
$DB_USR = SomeUser;
$DB_PWD = SomePass;

$query = SELECT TOP 500 PVMAL.STATE,  .
 PVMAL.POSTCODE,  .
 PVMAL.UNIT,  .
 PVMAL.UNIT_NO,  .
 PVMAL.HOUSE_NO,  .
 PVMAL.ST_NAME,  .
 PVMAL.ST_TY,  .
 PVSALES.SALE_PRICE,  .
 PVSALES.SALE_DATE,  .
 PVSUBURB.SUBURB  .
 FROM PVMAL  .
 JOIN PVSUBURB  .
 ON PVMAL.SUBURB_ID = PVSUBURB.SUBURB_ID  .
 JOIN PVSALES  .
 ON PVMAL.MALID = PVSALES.MALID  .
WHERE PVMAL.POSTCODE =  . $PC .  AND  .
PVSALES.SALE_DATE  '01-jan-2000'  .
ORDER BY PVSALES.SALE_DATE DESC;
$alt = 0;

$CON = odbc_connect($DB_DSN, $DB_USR, $DB_PWD);
$RS = odbc_exec($CON,$query);

if (odbc_num_rows($RS)  0) {

//echo($State .   . $PC);

?

table cellspacing=2 cellpadding=3 border=0
tr
td width=210bSales History With Valid Address/b/td
td width=65bSale Price/b/td
td width=65bSale Date/b/td
td width=55bType/b/td
td width=65bDetails/b/td
/tr
?

for ($i=1;odbc_fetch_row($RS,$i);$i++) {
$Address1 = xx  .
trim(odbc_result($RS,ST_NAME)) .   .
trim(odbc_result($RS,ST_TY)) . , ;

$Address2 = odbc_result($RS,SUBURB) . ,  .
odbc_result($RS,STATE) .   .
odbc_result($RS,POSTCODE);
if (odbc_result($RS,UNIT) == Y) {
$Address1 = x/ . $Address1;
$PropType = UNIT;
} else {
$PropType = HOUSE;
}

$SalePrice = \$ . xx;
$SD = explode(-,substr(odbc_result($RS,SALE_DATE),0,10));
$SaleDate = $SD[2]/$SD[1]/$SD[0];
$PropDetails = nbsp;;

if ($alt == 1) {
$bgcol = FF;
} else {
$bgcol = FFE2CC;
}
?
tr bgcolor=#? echo($bgcol); ? valign=top
td? echo($Address1 . br / . $Address2); ?/td
td? echo($SalePrice); ?/td
td? echo($SaleDate); ?/td
td? echo($PropType); ?/td
td? echo($PropDetails); ?/td
/tr
?
$alt = abs($alt - 1);
$Address = ;
$SalePrice= ;
$SaleDate = ;
odbc_fetch_row($RS); // MoveNext
}
}

odbc_close($CON);
if (($i == 1)  ($alt == 0)) {
?
tr
td colspan=5 bgcolor=#FFE2CCThere have been no sales
in your specified postcode in the last twelve months./td
/tr
?
}
?
/table
/body
/html

Previous Comments:
---

[2001-07-06 10:41:03] [EMAIL PROTECTED]

any chance you can post a sample db (small schema), and a sample script for us to try?

---

[2001-07-05 03:12:00] [EMAIL PROTECTED]

After adding set_time_limit(60); the following is dumped to
the web browser.

Fatal error: Maximum execution time of 60 seconds exceeded
in c:websitestigsample_report2.php on line 49

and 'Program Error' box is popped up on the server (Dr
Watson) saying 'Apache.exe has generated errors and will be
 '

When php is run as a CGI the error msg says that 'php.exe
has generated...' 

Line 49 of the code is;

$RS = odbc_exec($CON,$query);

The weirdest bit is if I re-run the same query with the same
variables (after the restart of apache) the query is nice
and fast. I think SQL2000 is caching the results somehow. 

The variable is required and will be any number between 700
and 


---

[2001-07-05 02:52:39] [EMAIL PROTECTED]

Can you confirm that it crashes at around 60 seconds if you use set_time_limit(60); at 
the top of your script?

Derick

---

[2001-07-04 22:24:55] [EMAIL PROTECTED]

an ODBC query that takes a long time to excute ( 30 sec)
will crash php and requires apache to restart. This is when
loading php as an apache modual or as a CGI

apache 1.3.20 (win2k)
php 4.0.6 (win2k)
SQL2000 (win2k)

The SQL2000 database has over 30 million records and is
performing a scan (on indexed records)

I'm more than willing to test code or help out to fix this btw

---


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


-- 
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] new/different problem in shutdown

2001-07-06 Thread Thies C. Arntzen

On Fri, Jul 06, 2001 at 05:39:18PM +0300, Andi Gutmans wrote:
 At 04:31 PM 7/6/2001 +0200, Thies C. Arntzen wrote:
 On Fri, Jul 06, 2001 at 05:12:07PM +0300, Andi Gutmans wrote:
  Thies,
 
  I have thought about your problem.  Your patch fixed your test case but 
 it
  won't fix all test cases. It is pretty much impossible to make sure on
  bailout (including exit() and errors) that all of the reference counts of
  the variables will go down to 0 even if we clean the call stack. This is
  due to necessary internal locking of variables in Zend.
 
 i don't understand why we cant go thru the call-stack and
 del-ref all the arguments? we're shutting down anyhow -
 right?
 
 also i'm *not talking* about bail at all - bail dosn't work
 anyhow - and there's no good way to fix it IMHO. but what
 needs to work is calling exit() from a function if there are
 resources somewhere on the stack.
 
 Because as I mentioned there might be locked variables which aren't in the 
 call stack. This is what I could think of right now but there might be 
 other problems too.

could you send me a php-snippet that shows this problem - i'd
like to dig.
re,
tc

-- 
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 #11935 Updated: php 4.0.6 doesn't work with solid option

2001-07-06 Thread kalowsky

ID: 11935
Updated by: kalowsky
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Feedback
Old-Bug Type: Apache related
Bug Type: ODBC related
Operating system: 
PHP Version: 4.0.6
Assigned To: 
Comments:

can you please provide more information?

what doesn't work?  and do please try 4.0.5, or even 4.0.6 as there have been changes 
for SOLID in both versions.

Previous Comments:
---

[2001-07-06 11:42:21] [EMAIL PROTECTED]

I've install php 4.0.4, but apache doesn't start with solid option --with-solid=[dir]

---



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


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




Re: [PHP-DEV] new/different problem in shutdown

2001-07-06 Thread Andi Gutmans

I haven't checked it but something like the following might give you a problem.

Andi

?
 function any($fh)
{
 exit(); // exit in a function is noo good...
}

 $fp = fopen(/tmp/1,r);
 $fp  any($fp);
?


At 05:35 PM 7/6/2001 +0200, Thies C. Arntzen wrote:
On Fri, Jul 06, 2001 at 05:39:18PM +0300, Andi Gutmans wrote:
  At 04:31 PM 7/6/2001 +0200, Thies C. Arntzen wrote:
  On Fri, Jul 06, 2001 at 05:12:07PM +0300, Andi Gutmans wrote:
   Thies,
  
   I have thought about your problem.  Your patch fixed your test case but
  it
   won't fix all test cases. It is pretty much impossible to make sure on
   bailout (including exit() and errors) that all of the reference 
 counts of
   the variables will go down to 0 even if we clean the call stack. This is
   due to necessary internal locking of variables in Zend.
  
  i don't understand why we cant go thru the call-stack and
  del-ref all the arguments? we're shutting down anyhow -
  right?
  
  also i'm *not talking* about bail at all - bail dosn't work
  anyhow - and there's no good way to fix it IMHO. but what
  needs to work is calling exit() from a function if there are
  resources somewhere on the stack.
 
  Because as I mentioned there might be locked variables which aren't in the
  call stack. This is what I could think of right now but there might be
  other problems too.

 could you send me a php-snippet that shows this problem - i'd
 like to dig.
 re,
 tc


-- 
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 #11936: php extension doe snot work

2001-07-06 Thread bp

From: [EMAIL PROTECTED]
Operating system: Win98se
PHP version:  4.0.5
PHP Bug Type: Unknown/Other Function
Bug description:  php extension doe snot work

I have submitted this once before to no avail.

When you install php on a win 98 se machine and use the *.php extension with the same 
extension in the registry, you get a 500 error.  Rename the file to *.php3 or *.php4 
or *.phpplussomereallystupidextension with an associated registry key and it will work.

The php extension does not work.  This is at least the 10th win98 sewith PWS  machine 
I have had this same problem on.  yes it is installed correctly.  I do not know if 
win98sewith PWS  has a special purpose already reserved for the *.php extension or 
what, but it will not work

And just so I do not get another silly response like, you have to add the *.php 
extension to the registry  the *.php extension has been added to the registry as has 
the *.php3 and *.php4 and the *.phtml extensions.

Therefore, following the documentation does not work.  Can you please either find a 
solution to getting the *.php extension to work in win98se with PWS of fix the 
documentation to alert people that on win98se with PWS the *.php extension will not 
work.

it really sucks when  large project with hundreds of files named *.php will not work 
on a local test environment

thank you

B.P.


-- 
Edit Bug report at: http://bugs.php.net/?id=11936edit=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 #11884 Updated: I cant print

2001-07-06 Thread dbeu

ID: 11884
Updated by: dbeu
Reported By: [EMAIL PROTECTED]
Old-Status: Assigned
Status: Closed
Bug Type: Reproducible crash
Operating system: 
PHP Version: 4.0.4
Assigned To: dbeu
Comments:

a crash bug (i could reproduce) is be fixed in cvs.
(please also check your printer driver setup!)
you should also consider using printer_draw_text instead of printer_write (which is 
used for raw printer data only), see 
http://php.net/manual/en/function.printer-select-font.php for an example.
if you need printer_write you may need to change the datatype:
printer_set_option($handle, PRINTER_MODE, RAW);

Previous Comments:
---

[2001-07-06 03:47:13] [EMAIL PROTECTED]

I'm assigning this to you Daniel, as you are the maintainer of this extension.

Derick

---

[2001-07-05 16:17:06] [EMAIL PROTECTED]

Hi Derick

Yes, it not works, now i trying without a argument in the printer_open() function, and 
i dont see the error again, but i see the following words

Warning: couldn't allocate the printerjob in c:archivos de programaapache 
groupapachehtdocsavances1porfetelimpresiones.php on line 9

and my program is :

$handle = printer_open(Epson);
$HOLA=Esta es una pryueba;

printer_start_doc($handle,$HOLA,$HOLA);
printer_start_page($handle);
echo hola;
printer_write($handle, Text to print);
printer_end_page($handle);
printer_end_doc($handle);
printer_close($handle);
   
Now, how you see i configurate the php.ini whit a printer.default_printer   =  
Epson

plase Helpme

---

[2001-07-04 15:36:54] [EMAIL PROTECTED]

So it works without a printername, like printer_open(); and it does not work like 
this: printer_open(HP Deskjet 840C); ?

Derick

---

[2001-07-04 15:30:32] [EMAIL PROTECTED]

Hi Derick

yes i´am very shure of that, i am really have a default printer instaled
in this php server..

When i put a invalid name in the printer_open(X), i mean a name thats no
exists how printer in my computer. i see a warning, but if i put a valid
name how HP804C my copmuter stop PHP, please helpme Derick, i need to
use this function in my aplication.

Sorry by my english, if you know who can help me in spanish please
contactme with he.


---

[2001-07-04 14:52:52] [EMAIL PROTECTED]

Are you sure you have a default printer installed?

Derick

---

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


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


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




Re: [PHP-DEV] POSIX ext. on Win32?

2001-07-06 Thread Daniel Beulshausen

At 03:39 06.07.2001 -0700, Lars Torben Wilson wrote:

Can someone clarify for me whether the POSIX extension is expected to
work on any Windows variants? Thanks...

we can't use the native nt posix subsystem as the interoperation between 
posix and win32 subsystem isn't transparent, so you'll need to use a 
library which runs posix in the win32 subsystem (cygwin, mingw, ...).
here could/will arise some serious issues as well, so i think a better 
approach would IMO be to create a win32 api interface (besides the .Net 
extension).

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] PSPELL with PHP

2001-07-06 Thread Lindsey Simon

 
 ? Finished versions of what? I wrote support for pspell library, it has 
 most of the functionality pspell provides. If you need anything else 
 that pspell can provide but I have not implemented, write to me and I'll 
 try to implement it. By the way, I do not work on development of pspell 
 itself...:(

Oh really all I meant was an application that actually spellchecks things in succesion,
like in Word, btu on an HTML page. Basically, you've provided all the hooks necessary
so I was just surprised that I hadn't yet found a mechanism yet, but once I've tested
mine I'll let you know...

 

-- 
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 #11897 Updated: Curl

2001-07-06 Thread webmaster

I ran ldconfig, reconfigured php and ran make/make install. The configure
and make processes ran fine but unfortunately the I received the same errors
for curl and libmcrypt.

Do you have any other suggestions?

Eric
- Original Message -
From: Bug Database [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, July 04, 2001 11:47 PM
Subject: Bug #11897 Updated: Curl


 ID: 11897
 Updated by: cmv
 Reported By: [EMAIL PROTECTED]
 Status: Open
 Bug Type: Apache related
 Operating system:
 PHP Version: 4.0.6
 Assigned To:
 Comments:

 This is the same problem you had with libmcrypt ...

 Sounds to me like you haven't run 'ldconfig' after installing mcrypt/curl.

 - Colin

 Previous Comments:
 --
-

 [2001-07-04 22:58:43] [EMAIL PROTECTED]

 I am writting you because I have compilled curl version 7.8 with the
following options
--disable-ipv6 --with-openssl=/usr/include/openssl --prefix=/usr/local/incl
ude/curl. I have also compilled PHP to have --with-openssl
and --with-curl=/urs/local/include/curl options as perscribed by
http://curl.haxx.se/libcurl/php/install.html.

 The configure, make and make install proccess goes fine but when I restart
Apache (version 1.3.14 rpm install) I get an error like this: cannot load
modual /lib/apache/libphp4.so can not find libcurl.so.1. I have tried many
differnt compille options to try working around this problem but nothing
works.

 Please help.










 Can you tell

 --
-



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




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




[PHP-DEV] Bug #11904 Updated: ext/standard/string.c patch for nl2br()

2001-07-06 Thread reaster

ID: 11904
User Update by: [EMAIL PROTECTED]
Status: Assigned
Bug Type: Unknown/Other Function
Operating system: Linux 2.4.6 Slackware
PHP Version: 4.0.6
Description: ext/standard/string.c patch for nl2br()

I see ... newline on Mac is just a carriage return '\r' 
(#000D). Newline on Unix is just line feed '\n' (#x000A).  
And then newline on Dos/Windows is carriage return line 
feed \r\n.  This is more complicated if a file is 
treated as 16-bit unicode instead of ascii 8-bit and I'm 
NOT an expert on character encodings - other systems like 
mainframes use something called NEL (#x0085) to represent 
endofline.  The general handling of all these sequences is 
to convert them all to a plain line feed '\n'.

\r\n - '\n'
'\r' - '\n'
'\r'NEL - '\n'
NEL - '\n'

In the nl2br() function, before newline 2 br substitution 
occurs, a newline normalization can be added to:

1) replace all \r\n to '\n' (#xA)
2) replace all '\r' followed by [NEL] (if unicode?) to 
'\n' (#x000A)
3) replace all remaining (Mac?) '\r' to '\n'

Then do the actual nl2br sub replacing all '\n' with 
\nbr (5 characters).

The general standard for a new line is '\n', too bad not 
all systems use just it.



Previous Comments:
---

[2001-07-05 12:56:36] [EMAIL PROTECTED]

Before committing it as it is, note that we are not using
br, but a br / now, and the patch seems to ignore that
fact. Aslo, shouldn't it be br /rn instead for that matter?

Shouldn't we define what 'nl' in 'nl2br()' stands for? r?
n? rn? If just n, then no patch needed. If any of the
three, then we need to handle rn properly, and also handle
r somehow (just a bit more code).

Just a thought... I want to be consistent, so mac users
won't be unhappy, like it happened recently...

---

[2001-07-05 10:41:45] [EMAIL PROTECTED]

I'll commit this after I check the patch.

Derick

---

[2001-07-05 08:56:03] [EMAIL PROTECTED]

I suggest the following patch for string.c to fix the 
nl2br() function.

Instead of replacing n with br /n, I think 
nbr is better.  For example, in a string, there might 
be a rn and when nl2br() is applied, it would become 
rbr /n.  Having a r by itself and not paired with 
a n causes problems for me because most programs afaik 
expect either just a n (unix systems) or rn 
(microsoft systems) and know how to deal with them.  But 
when a r is by itself, strange things sometimes happen 
and the file will print corrupted.  But applying the patch 
below, rn would become rnbr which keeps the 
carriage return and newline pair intact and adds the 
break... unix and windows programs understand the file 
still and html renderers don't care about formatting.

*** string.c.orig   Thu Jul  5 08:41:46 2001
--- string.cThu Jul  5 08:38:04 2001
***
*** 2511,2517 

convert_to_string_ex(str);

!   
php_char_to_str((*str)-value.str.val,(*str)-value.str.len,'n',br 
/n,7,return_value);
  }
  /* }}} */

--- 2511,2517 

convert_to_string_ex(str);

!   
php_char_to_str((*str)-value.str.val,(*str)-value.str.len,'n',nbr,5,return_value);

  }
  /* }}} */




---


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


-- 
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 #11937: Bug in array handling

2001-07-06 Thread phil3k

From: [EMAIL PROTECTED]
Operating system: Windows 98
PHP version:  4.0.5
PHP Bug Type: Unknown/Other Function
Bug description:  Bug in array handling

?php

//Two elements in an Array
$array[] = Maria;
$array[] = Lisa;

//just a test output
array_walk ($array, my_print);


//and then free the first element of the array
unset ($array[0]);

function my_print ($value)
{
print $value .  ;
}

print br /;
//The following dump will produce:
//array(1) { [1]= string(4) Lisa } 
//This means that the first element has the index 1 
//But it should have index 0
var_dump ($array);
?

If you have more than two elements, and you free one of them, you can just prevent 
this bug, by resorting the array with any sort function. But with only two elements, 
this won't work, and if you clear the first of these, you will get the same result as 
I have got, there was one element,  but with the wrong index.


-- 
Edit Bug report at: http://bugs.php.net/?id=11937edit=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 #11938: Bug in array handling

2001-07-06 Thread phil3k

From: [EMAIL PROTECTED]
Operating system: Windows 98
PHP version:  4.0.5
PHP Bug Type: Unknown/Other Function
Bug description:  Bug in array handling

?php

//Two elements in an Array
$array[] = Maria;
$array[] = Lisa;

//just a test output
array_walk ($array, my_print);


//and then free the first element of the array
unset ($array[0]);

function my_print ($value)
{
print $value .  ;
}

print br /;
//The following dump will produce:
//array(1) { [1]= string(4) Lisa } 
//This means that the first element has the index 1 
//But it should have index 0
var_dump ($array);
?

If you have more than two elements, and you free one of them, you can just prevent 
this bug, by resorting the array with any sort function. But with only two elements, 
this won't work, and if you clear the first of these, you will get the same result as 
I have got, there was one element,  but with the wrong index.


-- 
Edit Bug report at: http://bugs.php.net/?id=11938edit=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 #11938 Updated: Bug in array handling

2001-07-06 Thread kalowsky

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

Bug submitted twice...

Previous Comments:
---

[2001-07-06 14:54:17] [EMAIL PROTECTED]

?php

//Two elements in an Array
$array[] = Maria;
$array[] = Lisa;

//just a test output
array_walk ($array, my_print);


//and then free the first element of the array
unset ($array[0]);

function my_print ($value)
{
print $value .  ;
}

print br /;
//The following dump will produce:
//array(1) { [1]= string(4) Lisa } 
//This means that the first element has the index 1 
//But it should have index 0
var_dump ($array);
?

If you have more than two elements, and you free one of them, you can just prevent 
this bug, by resorting the array with any sort function. But with only two elements, 
this won't work, and if you clear the first of these, you will get the same result as 
I have got, there was one element,  but with the wrong index.

---



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


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




[PHP-DEV] Bug #11939: get HTML title

2001-07-06 Thread clownfighter

From: [EMAIL PROTECTED]
Operating system: redhat 7.1
PHP version:  4.0.4pl1
PHP Bug Type: Feature/Change Request
Bug description:  get HTML title

Get HTML title-
We have get_meta_tags, why not a function that retrieves the title from an HTML page?


-- 
Edit Bug report at: http://bugs.php.net/?id=11939edit=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 #11937 Updated: Bug in array handling

2001-07-06 Thread vlad

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

If you unset an element in the array, it does not make the whole array shift so it 
starts from index zero again. That's normal behaviour.

Previous Comments:
---

[2001-07-06 14:52:11] [EMAIL PROTECTED]

?php

//Two elements in an Array
$array[] = Maria;
$array[] = Lisa;

//just a test output
array_walk ($array, my_print);


//and then free the first element of the array
unset ($array[0]);

function my_print ($value)
{
print $value .  ;
}

print br /;
//The following dump will produce:
//array(1) { [1]= string(4) Lisa } 
//This means that the first element has the index 1 
//But it should have index 0
var_dump ($array);
?

If you have more than two elements, and you free one of them, you can just prevent 
this bug, by resorting the array with any sort function. But with only two elements, 
this won't work, and if you clear the first of these, you will get the same result as 
I have got, there was one element,  but with the wrong index.

---



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


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




[PHP-DEV] ngscan-0.3

2001-07-06 Thread Sascha Schumann

The Next Generation Scanners are now downloadble from
http://schumann.cx/ngscan-0.3.tar.gz

No real changes besides support for octal and exponential
numbers.  The scanners are feature-complete now.  As always,
your feedback is appreciated.

I'll now work on modularizing the changes by adding an API to
choose the scanner on run-time.

- Sascha Experience IRCG
  http://schumann.cx/http://schumann.cx/ircg


-- 
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 #11819 Updated: Bug with ibase_execute()

2001-07-06 Thread Jeremy Bettis

The patch that I just posted to the list fixes this problem.  Nulls passed
as ? parameters were being sent to interbase as 0's.

--
Jeremy Bettis
[EMAIL PROTECTED]

[EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]...
 ID: 11819
 User Update by: [EMAIL PROTECTED]
 Status: Bogus
 Bug Type: InterBase related
 Operating system: Windows 2000
 PHP Version: 4.0.6
 Description: Bug with ibase_execute()




-- 
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 #11941: Not checking allow_persistent

2001-07-06 Thread sthomas

From: [EMAIL PROTECTED]
Operating system: Linux
PHP version:  4.0.6
PHP Bug Type: PostgreSQL related
Bug description:  Not checking allow_persistent

Probably just an oversight, here's the patch:

355c355,356
   if (persistent) {
---

   if (persistent  PGG(allow_persistent)) {



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

2001-07-06 Thread drloh

From: [EMAIL PROTECTED]
Operating system: win98
PHP version:  4.0.6
PHP Bug Type: Scripting Engine problem
Bug description:  




-- 
Edit Bug report at: http://bugs.php.net/?id=11942edit=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 #11943: some problem with having a LINK string, it goes downcase..

2001-07-06 Thread string

From: [EMAIL PROTECTED]
Operating system: gnu/linux 2.4.5
PHP version:  4.0.6
PHP Bug Type: Strings related
Bug description:  some problem with having a lt;LINKgt; string, it goes downcase..

?
$a = LINK;
$b = $a;
echo $b;
?

the result of this script is: link
it changes to downcase, it only output's correct if i take off the 's or change $a 
to, for example LINKA.
i asked some friend of mine with php-4.0.4pl1 on windows and he got the same output.


 './configure' '--with-apache=../apache_1.3.20/' '--enable-magic-quotes' 
'--enable-calendar' '--enable-ctype' '--with-dom=/usr/local/' '--enable-ftp' 
'--with-mcrypt' '--with-mhash' '--with-mysql=/usr/local/mysql/' '--enable-trans-sid' 
'--with-sablot' '--enable-sockets' '--with-zlib' '--enable-bcmath' 
'--with-db3=/usr/local/BerkeleyDB.3.2/' '--with-pgsql=/usr/local/pgsql/'



-- 
Edit Bug report at: http://bugs.php.net/?id=11943edit=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 #11943 Updated: some problem with having a LINK string, it goes downcase..

2001-07-06 Thread string

ID: 11943
User Update by: [EMAIL PROTECTED]
Old-Status: Open
Status: Closed
Old-Bug Type: Strings related
Bug Type: *General Issues
Operating system: gnu/linux 2.4.5
PHP Version: 4.0.6
Description: some problem with having a LINK string, it goes downcase..

not a bug at all, it seams that mozilla shows link tag's that way.

Previous Comments:
---

[2001-07-06 21:30:13] [EMAIL PROTECTED]

?
$a = LINK;
$b = $a;
echo $b;
?

the result of this script is: link
it changes to downcase, it only output's correct if i take off the 's or change $a 
to, for example LINKA.
i asked some friend of mine with php-4.0.4pl1 on windows and he got the same output.


 './configure' '--with-apache=../apache_1.3.20/' '--enable-magic-quotes' 
'--enable-calendar' '--enable-ctype' '--with-dom=/usr/local/' '--enable-ftp' 
'--with-mcrypt' '--with-mhash' '--with-mysql=/usr/local/mysql/' '--enable-trans-sid' 
'--with-sablot' '--enable-sockets' '--with-zlib' '--enable-bcmath' 
'--with-db3=/usr/local/BerkeleyDB.3.2/' '--with-pgsql=/usr/local/pgsql/'


---


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


-- 
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 #11818 Updated: Using the PDF functions after July1st triggers an internal PDFlib error

2001-07-06 Thread Joey Smith

There are 2 parts that are required to make PDF's using pdflib. There is
the pdflib code, and the PHP code that makes calls to the pdflib
code. We can ship our own code, but not pdflib's.

On Fri, 6 Jul 2001, Joao Prado Maia wrote the following to Joey Smith :


 Ok, I must be missing something really bad here then. What is this
 php_pdf.dll doing on my /extensions/ sub-directory ? Someone must have
 compiled that, huh.
 
 I downloaded the latest version of the pre-compiled PDFlib which comes
 with the compiled php_pdf.dll file, so it was just a matter of dropping
 the file on the /extensions sub-directory, but now I get a huge water mark
 with the 'www.pdflib.com' string in it.
 
 Am I still missing something here that you guys could compile the PDF
 extension from the Windows source code of PDFlib when making the Windows
 binary release of PHP ? Why is this illegal anyway ? I even took my time
 to open the license file of PDFlib source and it clearly stated on the
 Alladin Free Public License that you can re-distribute PDFlib
 non-commercially, which is what PHP is doing here.
 
 Why would compiling from source and distributing a version of PDFlib
 without that ridiculous water mark be such an issue ?
 
 I might be missing something really bad here, so I apologize if there is
 something really obvious that I'm overlooking.
 
 Joao
 
 
 


-- 
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 #11940 Updated: ill side effect of open_basedir

2001-07-06 Thread jason

ID: 11940
Updated by: jason
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Closed
Old-Bug Type: PHP options/info functions
Bug Type: *General Issues
Operating system: 
PHP Version: 4.0.6
Assigned To: 
Comments:

Sorry, I wrote that in a hurry.

ANY file open operation performed by php has to be in open_basedir. ( Including your 
main script. ) 
This is actually by design.

-Jason

Previous Comments:
---

[2001-07-06 18:25:15] [EMAIL PROTECTED]

I may be missing something, but there is no include() or any other file-related 
operation in the sample script that I posted.  All it has is 'echo hello'.

---

[2001-07-06 17:43:40] [EMAIL PROTECTED]

This is not a bug, include calls a file open operation,
and as such must be in the open_basedir path

-Jason

---

[2001-07-06 17:36:45] [EMAIL PROTECTED]

safe_mode = On
doc_root = /homes/u0/apache
open_basedir = /var/www/htdocs/workathome:/var/www/secure:/var/www/tmp
(/var/www is a symlink for /homes/u0/apache)

In such a setting I should be able to execute PHP scripts from any directory under 
/homes/u0/apache, but not access any files unless they are under one of the 
directories in open_basedir.  However, I cannot place any scripts in, say, 
/homes/u0/apache/cdf/deadlines/.  A minimal file foo.php, saved there, containing 
only:

?php echo htmlbodyHello/body/html; ?

Results in the script not executed, with the following error messages:

[Fri Jul  6 17:24:53 2001] [error] PHP Warning:  open_basedir restriction in effect. 
File is in wrong directory in Unknown on line 0
[Fri Jul  6 17:24:53 2001] [error] PHP Warning:  Failed opening 
'/homes/u0/apache/htdocs/cdf/deadlines/foo.php' for inclusion (include_path='') in 
Unknown on line 0

open_basedir's documentation says that it should only restrict directories from where 
a file can be opened by a PHP script.
http://www.php.net/manual/en/configuration.php

Many thanks,
-- 
Arcady Genkin

---



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


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




[PHP-DEV] Bug #7744 Updated: safe mode php wrong script uid

2001-07-06 Thread jason

ID: 7744
Updated by: jason
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Closed
Old-Bug Type: Scripting Engine problem
Bug Type: *General Issues
Operating system: 
PHP Version: 4.0.3pl1
Assigned To: 
Comments:

Try a later version of php and reopen if still an issue.

Previous Comments:
---

[2000-12-08 11:11:50] [EMAIL PROTECTED]

On Solaris, safe mode only works if either the php script to be parsed or the 
directory it is in are owned by numerical uid 1 (note: this is neither the uid of the 
person writing the script nor the httpd uid). This is not the definition of safe 
mode...

Trying to narrow the problem down:

In safe_mode.c the function php_checkuid demands two uids to match:

uid = php_getuid() should be the php file currently parsed (but is always 1 on a 
solaris system)
duid = sb.st_uid is the file to be included (correct value)

It seems that php_getuid() is broken on solaris, always returning 1. Unfortunately 
now safe mode is unusable because all scripts and included files have to be readable 
by the http uid (e.g. world), writable by the script developer(e.g. group) and the 
owner must be uid 1 (daemon, bin, or whatever uid 1 is).

Note that this is even when a simple file is parsed where no other file is included 
(require()).

Testdrive 1
---
plain php file is parsed /www/php/test.php, owner 1331, group httpd
   HTMLBODY
   ?php echo phpinfo(); ?
   /BODY/HTML
Warning: SAFE MODE Restriction in effect. The script whose uid is 1 is not allowed to 
access /www/php/test.php owned by uid 1331 in Unknown on line 0
Warning: Failed opening '/www/php/test.php' for inclusion (include_path='.') in 
Unknown on line 0

To make it work, I must
chown 1 /www/php
or
chown 1 /www/php/test.php
which is not useful because the script uid should be the one of the owner of the file.
Seems that parsing a php file in safe mode is defined as including the file into 
itself in safe mode and the initial values are not correct but default to 1.

Testdrive 2
---
php file is parsed /www/php/test.php, owner now uid 1 (unfortunately), group httpd
   HTMLBODY
   ?require (/www/php/somefile.inc); ?
   /BODY/HTML
Warning: SAFE MODE Restriction in effect. The script whose uid is 1 is not allowed to 
access /www/php/include/somefile.inc owned by uid 1331 in /www/php/test.php on line 2
Fatal error: Failed opening required '/www/php/somefile.inc' (include_path='.') in 
/www/php/test.php on line 2

The base problem seems that when a php file is parsed in safe mode, it has to be uid 1 
or in a directory owned by uid 1 which is not desired...




---

[2000-11-10 05:54:27] [EMAIL PROTECTED]

in safe mode, the php script uid seems to default to 1 instead of the httpd uid (taken 
from apache httpd process)

case 1)
no safe mode: apache runs as http uid 11101 and a php script readable by uid 11101 can 
be accessed and is parsed - fine.

case 2)
now safe mode is enabled and a php script owned by uid 11101 or in a directory owned 
by 11101 is read but not parsed. Message is Warning: SAFE MODE Restriction in effect. 
The script whose uid is 1 is not allowed to access /path/script.php3 owned by uid 
11101 in Unknown on line 0.

I am sure that apache does not run with uid 1 but with uid 11101 because scripts 
readable by uid 1 but not 11101 are not even found by apache (403 forbidden).

Where does the php script uid 1 come from?

The only way to get php4 and safe mode working now is to have the directory or file 
owned by uid 1 which is neither apache's uid nor the user's uid - i can't imagine this 
is intentional?




---



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


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




Re: [PHP-DEV] Bug #11818 Updated: Using the PDF functions after July 1st triggers an internal PDFlib error

2001-07-06 Thread Daniel Beulshausen

At 21:18 06.07.2001 -0600, Joey Smith wrote:
There are 2 parts that are required to make PDF's using pdflib. There is
the pdflib code, and the PHP code that makes calls to the pdflib
code. We can ship our own code, but not pdflib's.

can someone add http://65.195.31.230/downloads/php-4.0.6-Win32-PDF.zip to 
the patches section for 4.0.6?
it updates the pdflib to 4.0.1, thus eliminating the timebomb.

daniel

On Fri, 6 Jul 2001, Joao Prado Maia wrote the following to Joey Smith :


  Ok, I must be missing something really bad here then. What is this
  php_pdf.dll doing on my /extensions/ sub-directory ? Someone must have
  compiled that, huh.
 
  I downloaded the latest version of the pre-compiled PDFlib which comes
  with the compiled php_pdf.dll file, so it was just a matter of dropping
  the file on the /extensions sub-directory, but now I get a huge water mark
  with the 'www.pdflib.com' string in it.
 
  Am I still missing something here that you guys could compile the PDF
  extension from the Windows source code of PDFlib when making the Windows
  binary release of PHP ? Why is this illegal anyway ? I even took my time
  to open the license file of PDFlib source and it clearly stated on the
  Alladin Free Public License that you can re-distribute PDFlib
  non-commercially, which is what PHP is doing here.
 
  Why would compiling from source and distributing a version of PDFlib
  without that ridiculous water mark be such an issue ?
 
  I might be missing something really bad here, so I apologize if there is
  something really obvious that I'm overlooking.
 
  Joao
 
 
 


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


/*--
daniel beulshausen - [EMAIL PROTECTED]
searching job: application development with php
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]




[PHP-DEV] Bug #8135 Updated: FTP_FPUT can't use a HTTP Filepointer

2001-07-06 Thread jason

ID: 8135
Updated by: jason
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Closed
Old-Bug Type: FTP related
Bug Type: *General Issues
Operating system: 
PHP Version: 4.0.3pl1
Assigned To: 
Comments:

HTTP fopens are read only.

-Jason

Previous Comments:
---

[2000-12-06 10:43:07] [EMAIL PROTECTED]

for example :

$fp = fopen(http://www.php.net;, r);

ftp_fput( $ftp_stream, remote, $fp, FTP_ASCII);

doesn't work.

But the following code-example :

$fp = fopen(file.txt, r);

ftp_fput( $ftp_stream, remote, $fp, FTP_ASCII);

works.

---



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


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




[PHP-DEV] Bug #11944: Scripting language features

2001-07-06 Thread dphillips

From:[EMAIL PROTECTED]
Operating system: Any
PHP version:  4.0.6
PHP Bug Type: Feature/Change Request
Bug description:  Scripting language features

I use PHP as a general scripting language, and some compile or runtime options would 
be very useful:

- A no-tags mode that would have the interpreter behave as if it were always inside a 
?php ? block

- Standard file handles predefined, similiar to $argc and $argv[]: $stdin, $stdout, 
$stderr

- Quiet mode always enabled

The following script is too complicated:

#!/usr/local/bin/php -q
?
$l = ;
$fp = fopen(php://stdin, r);
while (!feof($fp))
{
$s = fgets($fp, 5000);
if ($l != $s)
{
echo $s;
$l = $s;
}
}
?

It would be much nicer to write it as follows:

#!/usr/local/bin/php
$l = ;
while (!feof($stdin))
{
$s = fgets($stdin, 5000);
if ($l != $s)
{
echo $s;
$l = $s;
}
}



-- 
Edit Bug report at: http://bugs.php.net/?id=11944edit=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 #11566 Updated: It appears most functions don't check open_basedir

2001-07-06 Thread jason

ID: 11566
Updated by: jason
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Closed
Old-Bug Type: PHP options/info functions
Bug Type: *General Issues
Operating system: 
PHP Version: 4.0.5
Assigned To: 
Comments:

All of the safe_mode/open_basedir functionality will eventually be redesigned

-Jason

Previous Comments:
---

[2001-06-19 13:35:21] [EMAIL PROTECTED]

It appears most functions that accept path/filename args don't check open_basedir.  
The following code needs to be added to many functions after the convert_to_string_ex 
function call:

if (php_check_open_basedir((*filename)-value.str.val)) RETURN_FALSE;

where 'filename' could of course change.

(this check is typically inserted before the safe_mode check since safe_mode is often 
not used because of it's limiting factor for ISPs)



---



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


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




[PHP-DEV] Bug #11940 Updated: ill side effect of open_basedir

2001-07-06 Thread a . genkin

ID: 11940
User Update by: [EMAIL PROTECTED]
Old-Status: Closed
Status: Open
Old-Bug Type: *General Issues
Bug Type: Documentation problem
Operating system: Solaris 8/sparc
PHP Version: 4.0.6
Description: ill side effect of open_basedir

Jason, thanks for the clarification.  I apologize for persistence, but I'm re-opening 
the bug under the different category.  There are two issues here now:

1. The documentation does not describe this configuration
   option clearly.  It only talks about (quote)
   When a script tries to open a file  It should
   mention that the restriction applies to the script
   itself.  The first sentence may imply this, but only
   very vaguely.
   http://www.php.net/manual/en/configuration.php



2. The error message logged by PHP is not helpful.
   It talks about opening file for inclusion, which actually
   is probably what let into confusion even you when you
   replied to this bug in the first place.  Also, the
   words Unknown in both sentences of the error message
   are not very helpful, too.

Thanks again,
--
Arcady Genkin


Previous Comments:
---

[2001-07-06 23:26:52] [EMAIL PROTECTED]

Sorry, I wrote that in a hurry.

ANY file open operation performed by php has to be in open_basedir. ( Including your 
main script. ) 
This is actually by design.

-Jason

---

[2001-07-06 18:25:15] [EMAIL PROTECTED]

I may be missing something, but there is no include() or any other file-related 
operation in the sample script that I posted.  All it has is 'echo hello'.

---

[2001-07-06 17:43:40] [EMAIL PROTECTED]

This is not a bug, include calls a file open operation,
and as such must be in the open_basedir path

-Jason

---

[2001-07-06 17:36:45] [EMAIL PROTECTED]

safe_mode = On
doc_root = /homes/u0/apache
open_basedir = /var/www/htdocs/workathome:/var/www/secure:/var/www/tmp
(/var/www is a symlink for /homes/u0/apache)

In such a setting I should be able to execute PHP scripts from any directory under 
/homes/u0/apache, but not access any files unless they are under one of the 
directories in open_basedir.  However, I cannot place any scripts in, say, 
/homes/u0/apache/cdf/deadlines/.  A minimal file foo.php, saved there, containing 
only:

?php echo htmlbodyHello/body/html; ?

Results in the script not executed, with the following error messages:

[Fri Jul  6 17:24:53 2001] [error] PHP Warning:  open_basedir restriction in effect. 
File is in wrong directory in Unknown on line 0
[Fri Jul  6 17:24:53 2001] [error] PHP Warning:  Failed opening 
'/homes/u0/apache/htdocs/cdf/deadlines/foo.php' for inclusion (include_path='') in 
Unknown on line 0

open_basedir's documentation says that it should only restrict directories from where 
a file can be opened by a PHP script.
http://www.php.net/manual/en/configuration.php

Many thanks,
-- 
Arcady Genkin

---


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


-- 
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 #11940: ill side effect of open_basedir

2001-07-06 Thread a . genkin

From: [EMAIL PROTECTED]
Operating system: Solaris 8/sparc
PHP version:  4.0.6
PHP Bug Type: PHP options/info functions
Bug description:  ill side effect of open_basedir

safe_mode = On
doc_root = /homes/u0/apache
open_basedir = /var/www/htdocs/workathome:/var/www/secure:/var/www/tmp
(/var/www is a symlink for /homes/u0/apache)

In such a setting I should be able to execute PHP scripts from any directory under 
/homes/u0/apache, but not access any files unless they are under one of the 
directories in open_basedir.  However, I cannot place any scripts in, say, 
/homes/u0/apache/cdf/deadlines/.  A minimal file foo.php, saved there, containing only:

?php echo htmlbodyHello/body/html; ?

Results in the script not executed, with the following error messages:

[Fri Jul  6 17:24:53 2001] [error] PHP Warning:  open_basedir restriction in effect. 
File is in wrong directory in Unknown on line 0
[Fri Jul  6 17:24:53 2001] [error] PHP Warning:  Failed opening 
'/homes/u0/apache/htdocs/cdf/deadlines/foo.php' for inclusion (include_path='') in 
Unknown on line 0

open_basedir's documentation says that it should only restrict directories from where 
a file can be opened by a PHP script.
http://www.php.net/manual/en/configuration.php

Many thanks,
-- 
Arcady Genkin


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