RE: [PHP-DEV] How do I register a constructor in PHP (C code)

2001-09-25 Thread Emanuel Dejanu


I have put zend_class_entry variabiles global and still
no success in having my constructor called.

You PHP guru do not have any ideea what is the problem.

Best regards,

Emanuel Dejanu

> -Original Message-
> From: Jeff Hughes [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, September 25, 2001 9:23 PM
> To: Emanuel Dejanu
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP-DEV] How do I register a constructor in PHP (C code)
> 
> 
> I believe the problem you are having is that the 
> zend_class_entry structure
> destroyed as you leave the scope of the MINIT function.  This 
> is definitely
> going to have undefined behavior.  Move the zend_class_entry 
> so that it is
> global and you should be good to go.
> 
> Jeff Hughes
> [EMAIL PROTECTED]
> 
> On Tue, Sep 25, 2001 at 05:12:37PM +0300, Emanuel Dejanu wrote:
> > 
> > I write an extension and I want to register a new class
> > but I can not get my function to be registered as a constructor.
> > 
> > ex:
> > PHP_FUNCTION(rt66class_constructor);
> > static zend_function_entry php_rt66class_class_functions[] =
> > {
> > PHP_FALIAS(RT66Class,  rt66class_constructor,  NULL)
> > };
> > 
> > PHP_MINIT_FUNCTION(rt66util)
> > {
> > zend_class_entry rt66class_class_entry;
> > INIT_CLASS_ENTRY(rt66class_class_entry, "RT66Class",
> > php_rt66class_class_functions);
> > RT66Class_class_entry_ptr =
> > zend_register_internal_class(&rt66class_class_entry);
> > 
> > return SUCCESS;
> > }
> > 
> > PHP_FUNCTION(rt66class_constructor)
> > {
> > ZEND_PUTS("RT66Class Contructor");
> > }
> > 
> > 
> > -
> >  > dl(myext.so);
> > $myvar = RT66Class();
> > ?>
> > 
> > nothing appear on the screen.
> > 
> > Please tell me how can I make it to work.
> > 
> > Many thanks,
> > 
> > Emanuel Dejanu
> > 
> > > -Original Message-
> > > From: Andy [mailto:[EMAIL PROTECTED]]
> > > Sent: Wednesday, August 01, 2001 3:27 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: Fwd: FW: [PHP-DEV] print_r
> > >
> > >
> > >
> > >
> > > --  Forwarded Message  --
> > > Subject: FW: [PHP-DEV] print_r
> > > Date: Wed, 1 Aug 2001 08:19:09 +0300
> > > From: "Emanuel Dejanu" <[EMAIL PROTECTED]>
> > >
> > >
> > > Sorry to forward this to you but I really have problems in
> > > printing a doubled linked class.
> > > Can you take a look at the following message and give me
> > > an answer.
> > >
> > > Thanks,
> > >
> > > Emanuel Dejanu
> > >
> > > -Original Message-
> > > From: Emanuel Dejanu [mailto:[EMAIL PROTECTED]]
> > > Sent: Tuesday, July 31, 2001 9:22 AM
> > > To: [EMAIL PROTECTED]
> > > Subject: [PHP-DEV] print_r
> > >
> > >
> > >
> > > Hi,
> > >
> > > Is there a posibility to print an object but to not print 
> some fields.
> > >
> > > If I use print_r he will print all variabiles from my object,
> > > but I want on
> > > variabile to not be printed. I do not want to write my 
> own function.
> > > Ex.
> > >
> > > class Node {
> > >   var $name;
> > >   var $parent = '/'
> > >   var $children = array();
> > >   function Node($name, &$parent) {
> > >   $this->parent = &$parent;
> > >   $this->name = $name;
> > >   }
> > > }
> > >
> > > $rootNode = new Node('root', '');
> > > array_push($rootNode->children, new Node('child1', $rootNode));
> > > $child1Node = &$rootNode->children[0];
> > > array_push($child1Node->children, new Node('child1', 
> $child1Node));
> > >
> > > print_r($rootNode);
> > >
> > > will print make a recursivity. What will be nice is to 
> allow that some
> > > variabiles to not
> > > be printed like this:
> > >
> > > class Node {
> > >   var $name;
> > >   var $__parent = '/'
> > >   var $children = array();
> > >   function Node($name, &$parent) {
> > >   $this->__parent = &$parent;
> > >   $this->name = $name;
> > >   }
> > > }
> > >
> > > . /* add the root and childrens */
> > >
> > > print_r($rootNode);
> > >
> > > will print now the corret tree.
> > >
> > > Bellow you find the only modification that need to be done
> > > for this to work.
> > >
> > > Best regards,
> > >
> > > Emanuel Dejanu
> > >
> > >
> > > File: Zend/zend.c
> > >
> > > static void print_hash(HashTable *ht, int indent)
> > > {
> > >   zval **tmp;
> > >   char *string_key;
> > >   HashPosition iterator;
> > >   unsigned long num_key, str_len;
> > >   int i, key_type;  /** HERE */
> > >
> > >   for (i=0; i > >   ZEND_PUTS(" ");
> > >   }
> > >   ZEND_PUTS("(\n");
> > >   indent += PRINT_ZVAL_INDENT;
> > >   zend_hash_internal_pointer_reset_ex(ht, &iterator);
> > >   while (zend_hash_get_current_data_ex(ht, (void **)
> > > &tmp, &iterator) ==
> > > SUCCESS) {
> > >
> > >
> > > / HERE **/
> > >
> > >   key_type = zend_hash_get_current_key_ex(ht,
> > > &string_key, &str_len,
> > > &num_key, 0, &iterator);
> > >   if (key_type == HASH_KEY_IS_STRING)
> > >   if (string_key[0] == '_' &&
> > > string_key[1] == '_') continue;
> > >
> > >
> > > /*** HERE 

[PHP-DEV] RE: Re: How do I register a constructor in PHP (C code)

2001-09-25 Thread Emanuel Dejanu

I have write using the init but still do not work.

Any other ideea.

Best regards,

Emanuel Dejanu


> -Original Message-
> From: Hansuck Jo [mailto:""sizer"@.php.net]
> Sent: Tuesday, September 25, 2001 6:31 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP-DEV] Re: How do I register a constructor in PHP (C code)
> 
> 
> You use rt66clsss_init() instead of rt66class_contstructor().
> may be, it's will work. :)
> 
> 
> Emanuel Dejanu wrote:
> 
> > I write an extension and I want to register a new class
> > but I can not get my function to be registered as a constructor.
> > 
> > ex:
> > PHP_FUNCTION(rt66class_constructor);
> > static zend_function_entry php_rt66class_class_functions[] =
> > {
> > PHP_FALIAS(RT66Class,  rt66class_constructor,  NULL)
> > };
> > 
> > PHP_MINIT_FUNCTION(rt66util)
> > {
> > zend_class_entry rt66class_class_entry;
> > INIT_CLASS_ENTRY(rt66class_class_entry, "RT66Class",
> > php_rt66class_class_functions);
> > RT66Class_class_entry_ptr =
> > zend_register_internal_class(&rt66class_class_entry);
> > 
> > return SUCCESS;
> > }
> > 
> > PHP_FUNCTION(rt66class_constructor)
> > {
> > ZEND_PUTS("RT66Class Contructor");
> > }
> > 
> > 
> > -
> >  > dl(myext.so);
> > $myvar = RT66Class();
> > ?>
> > 
> > nothing appear on the screen.
> > 
> > Please tell me how can I make it to work.
> > 
> > Many thanks,
> > 
> > Emanuel Dejanu
> > 
> > 
> >>-Original Message-
> >>From: Andy [mailto:[EMAIL PROTECTED]]
> >>Sent: Wednesday, August 01, 2001 3:27 PM
> >>To: [EMAIL PROTECTED]
> >>Subject: Fwd: FW: [PHP-DEV] print_r
> >>
> >>
> >>
> >>
> >>--  Forwarded Message  --
> >>Subject: FW: [PHP-DEV] print_r
> >>Date: Wed, 1 Aug 2001 08:19:09 +0300
> >>From: "Emanuel Dejanu" <[EMAIL PROTECTED]>
> >>
> >>
> >>Sorry to forward this to you but I really have problems in
> >>printing a doubled linked class.
> >>Can you take a look at the following message and give me
> >>an answer.
> >>
> >>Thanks,
> >>
> >>Emanuel Dejanu
> >>
> >>-Original Message-
> >>From: Emanuel Dejanu [mailto:[EMAIL PROTECTED]]
> >>Sent: Tuesday, July 31, 2001 9:22 AM
> >>To: [EMAIL PROTECTED]
> >>Subject: [PHP-DEV] print_r
> >>
> >>
> >>
> >>Hi,
> >>
> >>Is there a posibility to print an object but to not print 
> some fields.
> >>
> >>If I use print_r he will print all variabiles from my object,
> >>but I want on
> >>variabile to not be printed. I do not want to write my own function.
> >>Ex.
> >>
> >>class Node {
> >>var $name;
> >>var $parent = '/'
> >>var $children = array();
> >>function Node($name, &$parent) {
> >>$this->parent = &$parent;
> >>$this->name = $name;
> >>}
> >>}
> >>
> >>$rootNode = new Node('root', '');
> >>array_push($rootNode->children, new Node('child1', $rootNode));
> >>$child1Node = &$rootNode->children[0];
> >>array_push($child1Node->children, new Node('child1', $child1Node));
> >>
> >>print_r($rootNode);
> >>
> >>will print make a recursivity. What will be nice is to 
> allow that some
> >>variabiles to not
> >>be printed like this:
> >>
> >>class Node {
> >>var $name;
> >>var $__parent = '/'
> >>var $children = array();
> >>function Node($name, &$parent) {
> >>$this->__parent = &$parent;
> >>$this->name = $name;
> >>}
> >>}
> >>
> >>. /* add the root and childrens */
> >>
> >>print_r($rootNode);
> >>
> >>will print now the corret tree.
> >>
> >>Bellow you find the only modification that need to be done
> >>for this to work.
> >>
> >>Best regards,
> >>
> >>Emanuel Dejanu
> >>
> >>
> >>File: Zend/zend.c
> >>
> >>static void print_hash(HashTable *ht, int indent)
> >>{
> >>zval **tmp;
> >>char *string_key;
> >>HashPosition iterator;
> >>unsigned long num_key, str_len;
> >>int i, key_type;  /** HERE */
> >>
> >>for (i=0; i >>ZEND_PUTS(" ");
> >>}
> >>ZEND_PUTS("(\n");
> >>indent += PRINT_ZVAL_INDENT;
> >>zend_hash_internal_pointer_reset_ex(ht, &iterator);
> >>while (zend_hash_get_current_data_ex(ht, (void **)
> >>&tmp, &iterator) ==
> >>SUCCESS) {
> >>
> >>
> >>/ HERE **/
> >>
> >>key_type = zend_hash_get_current_key_ex(ht,
> >>&string_key, &str_len,
> >>&num_key, 0, &iterator);
> >>if (key_type == HASH_KEY_IS_STRING)
> >>if (string_key[0] == '_' &&
> >>string_key[1] == '_') continue;
> >>
> >>
> >>/*** HERE **/
> >>
> >>
> >>for (i=0; i >>ZEND_PUTS(" ");
> >>}
> >>ZEND_PUTS("[");
> >>switch (key_type) {
> >>case HASH_KEY_IS_STRING:
> >>ZEND_PUTS(string_key);
> >>break;
> >>case HASH_KEY_IS_LONG:
> >>zend_printf("%ld",num_key);
> >>break;
> >>}
> >>ZEND_PUTS("] => ");

Re: [PHP-DEV] I desperately need help!!!!!!!!!!!!!1

2001-09-25 Thread derick

Hello,

the is the wrong list, ask on [EMAIL PROTECTED] for support
questions.

Derick

On Tue, 25 Sep 2001, ewunia wrote:

> Hello,
>
> I need some help with checkboxes and multiple arrays,
>
> Here is the peace of code I am working with, and it gives me a list of
> products.
>
> This is the while statement which grabs information from the database:
> $tplv .= "";
> $P.=" if($id == $select[$auctions_count])
>   $P .= " CHECKED";
> $P .= ">";
>
> $tplv .= "$P";
> $tplv .= " value=\"$q[id]\">". $actual."";
> $tplv .= " value=\"$q[price]\">". $actual."";
> $tplv .= " value=\"\" size=\"10\">";
> $tplv .= " value=\"$q[status]\">$stat1";
> $tplv .= "";
>
> and creates someing like this
> checkboxesidpriceshippingstatus
> 11 4.99 1.99 0
> 245.99   2.990
>
> As you can see I have 5 arrays. one is select /checkbox, id, price, shipping
> and status.
> What I am trying to do is search through the array of checkboxes and if the
> checkbox is checked I want the information in arrays id, price, shipping,
> status be added to the database.
>
> Ale there need to be a check if the status[] == 0;
> then add the information to a table.
> Can anyone help me to resolve the problem.
>
> Thanks
>
>
>
> --
> PHP Development Mailing List 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>

Derick Rethans

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


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] [PATCH] fix gethostbyname() to return false when hostname not resolved

2001-09-25 Thread Stig Venaas

On Wed, Sep 26, 2001 at 01:17:55AM +0200, Markus Fischer wrote:
> On Tue, Sep 25, 2001 at 01:56:28PM -0700, Jim Winstead wrote : 
> > here's a patch to fix bug #13423. think anyone is relying on the
> > current (vastly lame, imho) behavior?
> 
> Because this was the behaviour for a long time now its obvious
> that this will break all scripts ;-)
> 
> But of course it should be changed. Better earlier than later
> 'til never.

Yes, I'm afraid existing scripts will do something like:

$address = gethostbyname($hostname);
if ($address == $hostname) {
echo "Error";
...
} 
ok...

I think perhaps the reason for current behavior is that gethostbyname()
on some systems may not return the IP address when called with an IP
address, the current PHP code would hide that bug. Well, just a theory
I don't like the current code either.

Stig

-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #13445: odbc_execute gives "SQL data type out of range" error for store procedure

2001-09-25 Thread gordonl

From: [EMAIL PROTECTED]
Operating system: mandrake linux 2.15
PHP version:  4.0.4pl1
PHP Bug Type: ODBC related
Bug description:  odbc_execute gives "SQL data type out of range" error for store 
procedure

I am going to an informix 9.3 server and the following code works:

$ce_notes ="sfasdfasdfsadfsadfasdfasdf";
$sql = "insert into call_extension(ce_activity,ce_callresult,ce_notes)
values (" . $ce_activity . ",3211664,?);";
   $stmt = odbc_prepare ($crs,$sql );
   $sqldata = array ($ce_notes);
   $r = odbc_execute ($stmt, $sqldata);

they following code fails:

$sql = "execute procedure
web_cr_update(?,'ADD',1312,4748999,17057,'2001-09-25
15:34:16.000','2001-09-25 15:34:16',0,277,null,0,null,14999)";
   $stmt = odbc_prepare ($crs,$sql );
   $sqldata = array ($ce_notes);
   $r = odbc_execute ($stmt, $sqldata);

with the following error:

Warning: SQL error: [Informix][Informix ODBC Driver]SQL data type out of
range., SQL state S1004 in SQLExecute in
/home/httpd/html/followup/calladd.php on line 65

Note: The value in $ce_notes is the same in each case and the line number
refers to odbc_execute line.

It also fails when I try:

$sql = "execute procedure web_filter_modify(?,14999,1312)";


Both stored procedures work within a c++ program.

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


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] mod_php4 question...

2001-09-25 Thread Andy Sautins


   I posted a previous message that, I must admit, was probably not that
well thought out.
I've looked a little further and I'm getting a better feel for what is going
on, but I was wondering
if someone in the know would be able to clarify.

  I'm using php with Apache.  When I truss a simple file, I see the majority
of the system calls
in stat calls.  It tracks down to a getcwd ( defined with VCWD_GETCWD ),
which seems to
do alot of I/O on solaris.  Given that on a heavily loaded box, avoid that
much I/O ( especially if
it is just checking the same filepath that was checked previously), seems
wasteful and can lead
to high I/O waits.  The call stack is something along the lines of:

  1 send_php
  2 zend_execute_scripts
  3 zend_compile_file
  4 complie_file
  5 open_file_for_scanning
  6 zend_fopen
  7 php_fopen_wrapper_for_zend
  8 php_fopen_wrapper
  9 php_fopen_url_wrapper
10 php_fopen_with_path
11 php_fopen_and_set_opened_path
12 expand_filepath
13 vcwd_getcwd

   It seems to me that the path is available from apache ( either through
the request structure or as part of
the filename ).  My question is, what would be the harm in doing something
like have mod_php4.c open
the file and set file_handle->handle.fp and close it ( or some other
mechanism from having to call the whole
php_fopen_and_set_opened_path ) to avoid the getcwd?

   Any thoughts?  I'll do some more testing, but I wanted to get some expert
feedback before I went too far
down the wrong path.

   Thanks

   Andy





-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] I desperately need help!!!!!!!!!!!!!1

2001-09-25 Thread ewunia

Hello,

I need some help with checkboxes and multiple arrays,

Here is the peace of code I am working with, and it gives me a list of
products.

This is the while statement which grabs information from the database:
$tplv .= "";
$P.="$P";
$tplv .= "". $actual."";
$tplv .= "". $actual."";
$tplv .= "";
$tplv .= "$stat1";
$tplv .= "";

and creates someing like this
checkboxesidpriceshippingstatus
11 4.99 1.99 0
245.99   2.990

As you can see I have 5 arrays. one is select /checkbox, id, price, shipping
and status.
What I am trying to do is search through the array of checkboxes and if the
checkbox is checked I want the information in arrays id, price, shipping,
status be added to the database.

Ale there need to be a check if the status[] == 0;
then add the information to a table.
Can anyone help me to resolve the problem.

Thanks



-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] [RFC] Versioning rules for PHP/Zend/PEAR/Extensions

2001-09-25 Thread Zeev Suraski

Just to make it clear, I think that currently, we're doing fairly 
well.  Releasing a new version every month or two, which we used to do, was 
too often.

Zeev

At 19:56 25-09-01, Andrei Zmievski wrote:
>On Tue, 25 Sep 2001, Jani Taskinen wrote:
> > Like Zeev said, we release new versions too often anyway.
>
>I think we're doing just fine.
>
>-Andrei
>
>The main reason Santa is so jolly is because he knows where
>all the bad girls live.  -- George Carlin
>
>--
>PHP Development Mailing List 
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] [RFC] Versioning rules for PHP/Zend/PEAR/Extensions

2001-09-25 Thread Zeev Suraski

At 21:12 25-09-01, Stig Sæther Bakken wrote:
>[Zeev Suraski <[EMAIL PROTECTED]>]
> > At 03:12 25-09-01, Jim Winstead wrote:
> > >and i do question, a little bit, how successful our new release
> > >strategy is when we only seem to be able to muster a new release every
> > >three months. but maybe that's a pace we're happy with. and of course,
> > >that has way more to do with a great many more issues than how we
> > >number the releases. :)
> >
> > As a matter of fact, one of the most serious complaints I've been
> > hearing from people is that we release way too often.  Among others,
> > that makes ISPs mad at us, since it's a logistical nightmare to keep
> > current.
>
>And guess why?  Because a new PHP release also carries with it a whole
>Tampa-load of new or changed extensions.  Some of these extensions
>have non-BC changes (as with the recent domxml bruhaha), others have
>bugs fixed while some just rot.  That's your logistical nightmare
>right there. :-)

Very true, but that's just a partial part of the problem.  It implies that 
if it wasn't for those BC breaking changes, it would have been easy, but 
that's true only if you have one or two servers.  With lots of servers, 
it's a big headache even if backwards compatibility is, God forbid, kept. :)

>One of the reasons Jani went ahead and proposed the versioning
>standard is to prepare ourselves for "operation extension detach".
>How do you version extensions that we bundle today?  The only way
>right now is to use the PHP version.  So we should start versioning
>each extension preparing for independent existence.  Then we need a
>ruleset like Jani proposes.

I think that regardless of anything, adding a standard version information 
to the extension structure is a good idea.  It's a pity we haven't done 
that in 4.0.7, as this is a version where we put in *lots* compatibility 
breaking changes in the module API.

>But just to get back to release frequency, I do think we release too
>seldom.  There's a lot of process in place now, with a QA branch and
>all.  I think this process is good, but it's congesting.  At this
>point we're almost ready to start the 4.0.8 release before 4.0.7 is
>through the needle's eye.  There's simply too much weight.  For every
>extension we shake off, it the release process gets lighter, and some
>ISP sysadmins may even get their hair back.

My bottom line is that I don't think we release too seldom - a release 
every 3 months is a fairly good pace in my opinion.  I do think that the RC 
cycle may be taking too long, and in this particular case, I think I bare 
most of the fault.  I lost most of my focus ever since the WTC went up in 
flames. However, note that a huge bug was found only after RC2, weeks into 
the RC process - completely broken thread safety mode, thanks to yours 
truly...

Zeev


--
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #13444: OpenProcessError

2001-09-25 Thread deyth

From: [EMAIL PROTECTED]
Operating system: Windows 2000
PHP version:  4.0.6
PHP Bug Type: Unknown/Other Function
Bug description:  OpenProcessError

No visible result I can detect except for filling up the application log
with errors within 2 days resulting from each call to php.exe.  I'm running
Windows 2000 server.  Here is the text straight from the log:

Source: True Vector Service
The description for Event ID ( 1 ) in Source ( True Vector Service ) cannot
be found. The local computer may not have the necessary registry
information or message DLL files to display messages from a remote
computer. The following information is part of the event:

: 4f 70 65 6e 50 72 6f 63   OpenProc
0008: 65 73 73 45 72 72 6f 72   essError
0010: 20 35 3a 20 6f 6e 20 705: on p
0018: 72 6f 63 65 73 73 20 49   rocess I
0020: 44 20 33 32 34 30 2c 20   D 3240, 
0028: 6e 61 6d 65 64 20 45 3a   named E:
0030: 5c 50 48 50 5c 70 68 70   \PHP\php
0038: 2e 65 78 65 00.exe.
-- 
Edit bug report at: http://bugs.php.net/?id=13444&edit=1


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] [PATCH] fix gethostbyname() to return false when hostname not resolved

2001-09-25 Thread Markus Fischer

On Tue, Sep 25, 2001 at 01:56:28PM -0700, Jim Winstead wrote : 
> here's a patch to fix bug #13423. think anyone is relying on the
> current (vastly lame, imho) behavior?

Because this was the behaviour for a long time now its obvious
that this will break all scripts ;-)

But of course it should be changed. Better earlier than later
'til never.

- Markus

-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] Re: 403 on www.php.net (fwd)

2001-09-25 Thread Stig Sæther Bakken

[[EMAIL PROTECTED]]
> Derick Rethans <[EMAIL PROTECTED]> wrote:
> > I get a 403 (Permission denied) on bugs and www.php.net from home... any
> > idea's? Works fine from my work location.
> 
> you didn't happen to have something that hit lstats.php every minute,
> did you? i blocked a machine within chello.nl that was doing that.

Hehe, that's Bugstah, an IRC robot that updates the subject of
#php.bugs with the number of open bugs.  It's a sobering experience,
btw. :-P

 - Stig

-- 
  Stig Sæther Bakken <[EMAIL PROTECTED]>
  Fast Search & Transfer ASA, Trondheim, Norway

-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] Bug #13443 Updated: gethostbyname returns the name not the IP addr.

2001-09-25 Thread jimw

Kevin Brooks <[EMAIL PROTECTED]> wrote:
> I completely agree with you.  I just think we're talking about 2 different
> things.  I agree that the php_gethostbyname call should NOT return the
> hostname if it fails.  My problem is that it is failing for no good
> reason, as it seems others have reported.  My server is a production 4.1
> BSDI system with perfectly functioning resolver libraries.

your example works fine for me. it sounds like you may have some sort
of local configuration problem. does gethostbyname() ever work? does
it only fail on particular domain names? php's gethostbyname() is a
very thin wrapper over the C gethostbyname(), so it seems extremely
unlikely that any failure to resolve is going to be in the php code.

jim

-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] [PATCH] fix gethostbyname() to return false when hostname not resolved

2001-09-25 Thread Jim Winstead

it will send you to the right place once the site updates from cvs.

jim

On Tue, Sep 25, 2001 at 02:21:13PM -0700, Rasmus Lerdorf wrote:
> Yes, but that's not where http://bugs.php.net/search.php sends you when
> you put a bug id number in the form.
> 
> 
> On Tue, 25 Sep 2001, Jim Winstead wrote:
> 
> > On Tue, Sep 25, 2001 at 02:00:56PM -0700, Rasmus Lerdorf wrote:
> > > > here's a patch to fix bug #13423. think anyone is relying on the
> > > > current (vastly lame, imho) behavior?
> > >
> > > Did you break the bug system somehow?  I am having no luck looking up
> > > individual bugs, including this one.
> > > http://bugs.php.net/search.php?id=13423 doesn't work.
> >
> > try http://bugs.php.net/?id=13423.
> >
> > jim
> >
> 

-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] Bug #13443 Updated: gethostbyname returns the namenot the IP addr.

2001-09-25 Thread Kevin Brooks


On Tue, 25 Sep 2001, Sterling Hughes wrote:

> On 25 Sep 2001 [EMAIL PROTECTED] wrote:
> 
> > ID: 13443
> > User updated by: [EMAIL PROTECTED]
> > Reported By: [EMAIL PROTECTED]
> > Status: Duplicate
> > Bug Type: Unknown/Other Function
> > Operating System: BSDI 4.1
> > PHP Version: 4.0.6
> > New Comment:
> >
> > IMHO this is not the same as #13423, which is why I didn't list it in the original 
>report.  Although the data returned is the same (hostname instead of IP address) the 
>reason for the failure is seems very different.
> >
> 
> your humble opinion is wrong ;), PHP's gethostbyname() call's the
> low-level C gethostbyname(), if that doesn't resolve, it will return
> NULL, and PHP will return the original hostname.  There would be no way
> that the C level gethostbyname() would return the original hostname.
> 
> -Sterling

I completely agree with you.  I just think we're talking about 2 different
things.  I agree that the php_gethostbyname call should NOT return the
hostname if it fails.  My problem is that it is failing for no good
reason, as it seems others have reported.  My server is a production 4.1
BSDI system with perfectly functioning resolver libraries.

vp3: {225} % dig vp3.netgate.net

; <<>> DiG 8.2 <<>> vp3.netgate.net 
;; res options: init recurs defnam dnsrch
;; got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 4
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 2
;; QUERY SECTION:
;;  vp3.netgate.net, type = A, class = IN

;; ANSWER SECTION:
vp3.netgate.net.12H IN A205.214.170.247


Yet, this fails:

$sitename = "vp3.netgate.net";
$ipadres = gethostbynamel($sitename);
$count = count($ipadres);
echo "$count";
for ($i=0; $i<$count; $i++) {
echo("
$ipadres[$i]
");
}

With this output:

Text generated by PHP
0Open Connection Failed 0 


I'm in complete agreement with you that gethostbyname should not return
the hostname, gethostbynamel seems to work correctly.  But, why is it
failing?  If I fall back to a 3.0.14 things work perfectly.  Let me know
what I can do to help track this down.

Kevin


> 
> > Previous Comments:
> > 
> >
> > [2001-09-25 16:45:51] [EMAIL PROTECTED]
> >
> > duplicate of 13423, among the others listed in the report. gethostbyname() returns 
>the hostname it is passed when the C-level gethostbyname() call fails.
> >
> > 
> >
> > [2001-09-25 16:22:34] [EMAIL PROTECTED]
> >
> > This is basically the same report as 8754, 12678, and 8856.  The gethostbyname 
>function returns the name instead of the IP address.  The host is configured 
>correctly and names can be resolved from the shell using nslookup, dig, etc.  This 
>bug first appeared in 4.0.4 (although I didn't know it until now) and is present in 
>4.0.6 and 4.0.8-dev (php4-200109251335.tar.gz - latest from the snapshots dir as of 
>9/26/01).  I regressed the bug back to my previous version of 3.0.14 and the bug is 
>not present in that version.  I have tried both gethostbyname (returns the name) and 
>gethostbynamel (returns 0 items in the array).
> >
> > 
> >
> >
> >
> > Edit this bug report at http://bugs.php.net/?id=13443&edit=1
> >
> >
> >
> 


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] [PATCH] fix gethostbyname() to return false whenhostname not resolved

2001-09-25 Thread Rasmus Lerdorf

Yes, but that's not where http://bugs.php.net/search.php sends you when
you put a bug id number in the form.


On Tue, 25 Sep 2001, Jim Winstead wrote:

> On Tue, Sep 25, 2001 at 02:00:56PM -0700, Rasmus Lerdorf wrote:
> > > here's a patch to fix bug #13423. think anyone is relying on the
> > > current (vastly lame, imho) behavior?
> >
> > Did you break the bug system somehow?  I am having no luck looking up
> > individual bugs, including this one.
> > http://bugs.php.net/search.php?id=13423 doesn't work.
>
> try http://bugs.php.net/?id=13423.
>
> jim
>


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] Bug #13443 Updated: gethostbyname returns the namenot the IP addr.

2001-09-25 Thread Sterling Hughes

On 25 Sep 2001 [EMAIL PROTECTED] wrote:

> ID: 13443
> User updated by: [EMAIL PROTECTED]
> Reported By: [EMAIL PROTECTED]
> Status: Duplicate
> Bug Type: Unknown/Other Function
> Operating System: BSDI 4.1
> PHP Version: 4.0.6
> New Comment:
>
> IMHO this is not the same as #13423, which is why I didn't list it in the original 
>report.  Although the data returned is the same (hostname instead of IP address) the 
>reason for the failure is seems very different.
>

your humble opinion is wrong ;), PHP's gethostbyname() call's the
low-level C gethostbyname(), if that doesn't resolve, it will return
NULL, and PHP will return the original hostname.  There would be no way
that the C level gethostbyname() would return the original hostname.

-Sterling

> Previous Comments:
> 
>
> [2001-09-25 16:45:51] [EMAIL PROTECTED]
>
> duplicate of 13423, among the others listed in the report. gethostbyname() returns 
>the hostname it is passed when the C-level gethostbyname() call fails.
>
> 
>
> [2001-09-25 16:22:34] [EMAIL PROTECTED]
>
> This is basically the same report as 8754, 12678, and 8856.  The gethostbyname 
>function returns the name instead of the IP address.  The host is configured 
>correctly and names can be resolved from the shell using nslookup, dig, etc.  This 
>bug first appeared in 4.0.4 (although I didn't know it until now) and is present in 
>4.0.6 and 4.0.8-dev (php4-200109251335.tar.gz - latest from the snapshots dir as of 
>9/26/01).  I regressed the bug back to my previous version of 3.0.14 and the bug is 
>not present in that version.  I have tried both gethostbyname (returns the name) and 
>gethostbynamel (returns 0 items in the array).
>
> 
>
>
>
> Edit this bug report at http://bugs.php.net/?id=13443&edit=1
>
>
>


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] [PATCH] fix gethostbyname() to return false when hostname not resolved

2001-09-25 Thread Jim Winstead

On Tue, Sep 25, 2001 at 02:00:56PM -0700, Rasmus Lerdorf wrote:
> > here's a patch to fix bug #13423. think anyone is relying on the
> > current (vastly lame, imho) behavior?
> 
> Did you break the bug system somehow?  I am having no luck looking up
> individual bugs, including this one.
> http://bugs.php.net/search.php?id=13423 doesn't work.

try http://bugs.php.net/?id=13423.

jim

-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #13443 Updated: gethostbyname returns the name not the IP addr.

2001-09-25 Thread brooks

ID: 13443
User updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
Status: Duplicate
Bug Type: Unknown/Other Function
Operating System: BSDI 4.1
PHP Version: 4.0.6
New Comment:

IMHO this is not the same as #13423, which is why I didn't list it in the original 
report.  Although the data returned is the same (hostname instead of IP address) the 
reason for the failure is seems very different.

Previous Comments:


[2001-09-25 16:45:51] [EMAIL PROTECTED]

duplicate of 13423, among the others listed in the report. gethostbyname() returns the 
hostname it is passed when the C-level gethostbyname() call fails.



[2001-09-25 16:22:34] [EMAIL PROTECTED]

This is basically the same report as 8754, 12678, and 8856.  The gethostbyname 
function returns the name instead of the IP address.  The host is configured correctly 
and names can be resolved from the shell using nslookup, dig, etc.  This bug first 
appeared in 4.0.4 (although I didn't know it until now) and is present in 4.0.6 and 
4.0.8-dev (php4-200109251335.tar.gz - latest from the snapshots dir as of 9/26/01).  I 
regressed the bug back to my previous version of 3.0.14 and the bug is not present in 
that version.  I have tried both gethostbyname (returns the name) and gethostbynamel 
(returns 0 items in the array).





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


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #13435 Updated: fileupload and filedownload

2001-09-25 Thread sniper

ID: 13435
Updated by: sniper
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Assigned
Bug Type: HTTP related
Operating System: windows 2000 pro
PHP Version: 4.0.6
Old Assigned To: 
Assigned To: sniper
New Comment:

I'm working on this..


Previous Comments:


[2001-09-25 13:43:00] [EMAIL PROTECTED]

Ahhm forgot the environment:

Win2kPro, Apache (latest),MySQL,RAID-System for IDE, 128MB of ram and about 40 GB free 
harddisk. The php.ini was configured for 100mb posts and 100mb files, using 64 MB of 
memory for each script.



[2001-09-25 13:37:15] [EMAIL PROTECTED]

While uploading thru intranet, the PHP-process uses 99% of CPU, lots of memory (up to 
twice as much as the file itself) and takes 3/4 hour for 40 MB. While sending this 
file back using fopen/passthru, it takes a lot time until the browsers download-dialog 
opens. Then the transfer itself ist very quick !

That's why I guess it is not a http-problem, but a problem in handling files or 
handling memory ! Another hint on this is, that large files seem to get back corrupt, 
as testing a large and downloaded file resulted in some crc-errors. On small files all 
works fine.

This one might be relatet to the bug 10800 (or 10080 %o),
so have a look at that.





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


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] [PATCH] fix gethostbyname() to return false whenhostname not resolved

2001-09-25 Thread Rasmus Lerdorf

> here's a patch to fix bug #13423. think anyone is relying on the
> current (vastly lame, imho) behavior?

Did you break the bug system somehow?  I am having no luck looking up
individual bugs, including this one.
http://bugs.php.net/search.php?id=13423 doesn't work.

-Rasmus


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] [PATCH] fix gethostbyname() to return false when hostname not resolved

2001-09-25 Thread Jim Winstead

here's a patch to fix bug #13423. think anyone is relying on the
current (vastly lame, imho) behavior?

jim

Index: ext/standard/dns.c
===
RCS file: /repository/php4/ext/standard/dns.c,v
retrieving revision 1.35
diff -u -r1.35 dns.c
--- ext/standard/dns.c  19 Sep 2001 18:08:15 -  1.35
+++ ext/standard/dns.c  25 Sep 2001 20:54:06 -
@@ -135,6 +135,7 @@
 PHP_FUNCTION(gethostbyname)
 {
zval **arg;
+   char *host;

if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &arg) == FAILURE) {
ZEND_WRONG_PARAM_COUNT();
@@ -142,7 +143,12 @@
 
convert_to_string_ex(arg);
 
-   RETVAL_STRING(php_gethostbyname(Z_STRVAL_PP(arg)), 0);
+   if ((host = php_gethostbyname(Z_STRVAL_PP(arg {
+   RETVAL_STRING(host, 0);
+   }
+   else {
+   RETURN_FALSE;
+   }
 }
 /* }}} */
 
@@ -186,7 +192,7 @@
hp = gethostbyname(name);
 
if (!hp || !hp->h_addr_list) {
-   return estrdup(name);
+   return NULL;
}
 
memcpy(&in.s_addr, *(hp->h_addr_list), sizeof(in.s_addr));

-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #12678 Updated: gethostbyname returns hostname instead of adresss

2001-09-25 Thread jimw

ID: 12678
Updated by: jimw
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Duplicate
Bug Type: Network related
Operating System: Linux 2.2.16-22
PHP Version: 4.0.6
New Comment:

duplicate of 13243. (yes, that's a later bug. but it documents the problem more 
concisely.)

Previous Comments:


[2001-08-10 13:06:52] [EMAIL PROTECTED]

\n";
  print_r (gethostbynamel($domain));
?> 

www.yahoo.com
Array ()


As I've thought about this some, I believe I started having problems with this only 
after upgrading to 4.06.  It may have worked with 4.05 and I know it was working for 
me with 4.04plx   Maybe this has something to do with my Linux Disto?  I'm using 
RedHat 7.0

Thanks for your thoughts.  For now, I'm just hard coding the ip address I need, so 
it's not like this is bogging me down.

Adam




[2001-08-09 21:51:12] [EMAIL PROTECTED]

Could you please try gethostbynamel() with the same 
hostname? 

(these both work for me just fine..)

--Jani




[2001-08-09 16:13:52] [EMAIL PROTECTED]

> Can you access the internet from a browser?

Yes, I can resolve any hostname using nslookup, host, etc.  This machine accesses the 
internet just fine.

ie.  from the command line:

[hydro@mail htdocs]$ host calc.intershipper.net
calc.intershipper.net is a nickname for www.intershipper.net
www.intershipper.net has address 216.58.153.11
[hydro@mail htdocs]$ 

but from PHP


calc.intershipper.net



> Make sure your nameserver's are setup correctly.

To the best of my knowledge, they are.





[2001-08-09 16:02:33] [EMAIL PROTECTED]

Can you access the internet from a browser?

gethostbyname() returns the hostname when it can't find the 
IP (invalid address.)

Make sure your nameserver's are setup correctly.



[2001-08-09 15:57:51] [EMAIL PROTECTED]

I'm having a problem where gethostbyname is returning the hostname not the IP address. 
 Resolving hosts works fine on the command line with nslookup, host, etc.

This is the exact problem as bug #8856.  Andy said it should be resolved in 4.06, but 
I'm having problems.

Thanks.

Adam





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


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #13441 Updated: Evaluation of {$ in strings

2001-09-25 Thread derick

ID: 13441
Updated by: derick
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Bogus
Bug Type: Scripting Engine problem
Operating System: linux
PHP Version: 4.0.5
New Comment:

Not a bug:
Steve writes:
This behavior is clearly documented in the manual under "Migrating from PHP
3.0 to PHP 4.0"

http://www.php.net/manual/en/migration4.strings.php

Previous Comments:


[2001-09-25 15:26:43] [EMAIL PROTECTED]

$x="hello";
echo "1={$x} 2=\{$x}" -> 1=hello 2={hello}

It "should" have produced -> 1={hello} 2=\{hello}

No doubt this is related to evaluation of variable variables
but the behavior has certainly changed since PHP3 and I
think it deserves to be called a bug?





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


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #13443 Updated: gethostbyname returns the name not the IP addr.

2001-09-25 Thread jimw

ID: 13443
Updated by: jimw
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Duplicate
Bug Type: Unknown/Other Function
Operating System: BSDI 4.1
PHP Version: 4.0.6
New Comment:

duplicate of 13423, among the others listed in the report. gethostbyname() returns the 
hostname it is passed when the C-level gethostbyname() call fails.

Previous Comments:


[2001-09-25 16:22:34] [EMAIL PROTECTED]

This is basically the same report as 8754, 12678, and 8856.  The gethostbyname 
function returns the name instead of the IP address.  The host is configured correctly 
and names can be resolved from the shell using nslookup, dig, etc.  This bug first 
appeared in 4.0.4 (although I didn't know it until now) and is present in 4.0.6 and 
4.0.8-dev (php4-200109251335.tar.gz - latest from the snapshots dir as of 9/26/01).  I 
regressed the bug back to my previous version of 3.0.14 and the bug is not present in 
that version.  I have tried both gethostbyname (returns the name) and gethostbynamel 
(returns 0 items in the array).





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


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Re: Bug #13441: Evaluation of {$ in strings

2001-09-25 Thread Steve Meyers

This behavior is clearly documented in the manual under "Migrating from PHP
3.0 to PHP 4.0"

http://www.php.net/manual/en/migration4.strings.php

<[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> From: [EMAIL PROTECTED]
> Operating system: linux
> PHP version:  4.0.5
> PHP Bug Type: Scripting Engine problem
> Bug description:  Evaluation of {$ in strings
>
> $x="hello";
> echo "1={$x} 2=\{$x}" -> 1=hello 2={hello}
>
> It "should" have produced -> 1={hello} 2=\{hello}
>
> No doubt this is related to evaluation of variable variables
> but the behavior has certainly changed since PHP3 and I
> think it deserves to be called a bug?
> --
> Edit bug report at: http://bugs.php.net/?id=13441&edit=1
>



-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #13443: gethostbyname returns the name not the IP addr.

2001-09-25 Thread brooks

From: [EMAIL PROTECTED]
Operating system: BSDI 4.1
PHP version:  4.0.6
PHP Bug Type: Unknown/Other Function
Bug description:  gethostbyname returns the name not the IP addr.

This is basically the same report as 8754, 12678, and 8856.  The
gethostbyname function returns the name instead of the IP address.  The
host is configured correctly and names can be resolved from the shell using
nslookup, dig, etc.  This bug first appeared in 4.0.4 (although I didn't
know it until now) and is present in 4.0.6 and 4.0.8-dev
(php4-200109251335.tar.gz - latest from the snapshots dir as of 9/26/01). 
I regressed the bug back to my previous version of 3.0.14 and the bug is
not present in that version.  I have tried both gethostbyname (returns the
name) and gethostbynamel (returns 0 items in the array).
-- 
Edit bug report at: http://bugs.php.net/?id=13443&edit=1


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Re: 403 on www.php.net (fwd)

2001-09-25 Thread jimw

Derick Rethans <[EMAIL PROTECTED]> wrote:
> I get a 403 (Permission denied) on bugs and www.php.net from home... any
> idea's? Works fine from my work location.

you didn't happen to have something that hit lstats.php every minute,
did you? i blocked a machine within chello.nl that was doing that.

jim

-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #13442 Updated: Php

2001-09-25 Thread jan

ID: 13442
Updated by: jan
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Bogus
Bug Type: Scripting Engine problem
Operating System: Windows
PHP Version: 4.0.6
New Comment:

This is no support form. For questions on the development with PHP ask 
[EMAIL PROTECTED] or a support forum at your favour. (www.phpbuilder.com e.g.)



Previous Comments:


[2001-09-25 15:34:55] [EMAIL PROTECTED]

How i make a random banner's system on PHP ?





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


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #13442: Php

2001-09-25 Thread surfer182

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

How i make a random banner's system on PHP ?
-- 
Edit bug report at: http://bugs.php.net/?id=13442&edit=1


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #13441: Evaluation of {$ in strings

2001-09-25 Thread john

From: [EMAIL PROTECTED]
Operating system: linux
PHP version:  4.0.5
PHP Bug Type: Scripting Engine problem
Bug description:  Evaluation of {$ in strings

$x="hello";
echo "1={$x} 2=\{$x}" -> 1=hello 2={hello}

It "should" have produced -> 1={hello} 2=\{hello}

No doubt this is related to evaluation of variable variables
but the behavior has certainly changed since PHP3 and I
think it deserves to be called a bug?
-- 
Edit bug report at: http://bugs.php.net/?id=13441&edit=1


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] Feature?

2001-09-25 Thread Stig Sæther Bakken

[Hartmut Holzgraefe <[EMAIL PROTECTED]>]
> Andy wrote:
> 
> >In the case when I've few parameters I've to remember their order, so why not
> >$bar=foo('par2'=>10);
> >I want to pass value to only one or more but not to all params.
> >Also this will make the code clearer I think.
> >
> you can use arrays to mimic this behavior
> 
>   function foo($bar) {
>  ...
>  if(isset($bar['par2'])) 
>  ...
>   }
> 
>   foo(array('par2'=>10));

Or even less:

function foo($bar) {
extract($bar);
...
if (isset($par2)) 
...
}

It needs a defaulting mechanism though.

 - Stig

-- 
  Stig Sæther Bakken <[EMAIL PROTECTED]>
  Fast Search & Transfer ASA, Trondheim, Norway

-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] [RFC] Versioning rules for PHP/Zend/PEAR/Extensions

2001-09-25 Thread Stig Sæther Bakken

[[EMAIL PROTECTED]]
> Stig Sæther Bakken <[EMAIL PROTECTED]> wrote:
> > Huh?  Does strnatcmp() know the that 2.0RC4 is newer than 2.0b2? :-)
> 
> probably not. i've always thought that the change needed to make php's
> version numbers make more sense is relatively small -- stop ignoring
> the middle digit, and use it to signify releases. so instead of
> 4.0.7RC1, you'd get 4.1.0 (on BRANCH_4_1 or whatever). if bugs were
> found, 4.1.1 would get released. when one of those releases is deemed
> stable (what would be just 4.0.7 in our current scheme), make it
> available for download on the download page. (meanwhile, head
> development is on 4.2.0-dev.)
> 
> this also avoids the '4.0.6pl1' nonsense we've had to do before, too.
> just release a new version in that 4.x branch.
> 
> (and the number of cases where people should need to check version
> numbers for functionality should be vanishingly small. that's why we
> have things like function_exists().)

Oh, but there are differences a lot more subtle than whether a
function exists.  That's the whole point of having a version numbering
scheme that represents an API.

> i think tying the numbers to some definition of feature additions and
> bug fixes only provides fodder for rules lawyers. i believe the
> versioning scheme should be firmly rooted in the development process
> that actually exists, not some ideal of what it should be.

I think it has to be something in between.  For example, the major
number should be rooted in the architecture, technical design and
development process.  But as a user of some piece of software I want
version numbers to be more meaningful than Microsoft's.

 - Stig

-- 
  Stig Sæther Bakken <[EMAIL PROTECTED]>
  Fast Search & Transfer ASA, Trondheim, Norway

-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] [RFC] Versioning rules for PHP/Zend/PEAR/Extensions

2001-09-25 Thread Stig Sæther Bakken

[Zeev Suraski <[EMAIL PROTECTED]>]
> At 03:12 25-09-01, Jim Winstead wrote:
> >and i do question, a little bit, how successful our new release
> >strategy is when we only seem to be able to muster a new release every
> >three months. but maybe that's a pace we're happy with. and of course,
> >that has way more to do with a great many more issues than how we
> >number the releases. :)
> 
> As a matter of fact, one of the most serious complaints I've been
> hearing from people is that we release way too often.  Among others,
> that makes ISPs mad at us, since it's a logistical nightmare to keep
> current.

And guess why?  Because a new PHP release also carries with it a whole
Tampa-load of new or changed extensions.  Some of these extensions
have non-BC changes (as with the recent domxml bruhaha), others have
bugs fixed while some just rot.  That's your logistical nightmare
right there. :-)

One of the reasons Jani went ahead and proposed the versioning
standard is to prepare ourselves for "operation extension detach".
How do you version extensions that we bundle today?  The only way
right now is to use the PHP version.  So we should start versioning
each extension preparing for independent existence.  Then we need a
ruleset like Jani proposes.


But just to get back to release frequency, I do think we release too
seldom.  There's a lot of process in place now, with a QA branch and
all.  I think this process is good, but it's congesting.  At this
point we're almost ready to start the 4.0.8 release before 4.0.7 is
through the needle's eye.  There's simply too much weight.  For every
extension we shake off, it the release process gets lighter, and some
ISP sysadmins may even get their hair back.

 - Stig

-- 
  Stig Sæther Bakken <[EMAIL PROTECTED]>
  Fast Search & Transfer ASA, Trondheim, Norway

-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #13440 Updated: PHP

2001-09-25 Thread jan

ID: 13440
Updated by: jan
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Bogus
Bug Type: Scripting Engine problem
Operating System: Windows
PHP Version: 4.0.6
New Comment:

No Bug. Please ask such questions on [EMAIL PROTECTED]

Previous Comments:


[2001-09-25 14:42:06] [EMAIL PROTECTED]

How i make a random banners in PHP ?





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


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Re: Bug #13426 Updated: fread not work

2001-09-25 Thread Cesare Quadalti

with only 'r' mode fread() doesn't work: instead of 3kbyte for my image, are
sent 60 byte.
But if I use 'rb' mode browser give me a memory error. So, also fopen()
doesn't work correctly.

the error tell that the memory couldn't be 'read' and give me a memory
address..

it may be an Apache error, i don't know!

I use apache 1.3.20 and php 4.0.6 with module for apache.

Thanks

Cesare Quadalti

- Original Message -
From: "Bug Database" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, September 25, 2001 3:58 PM
Subject: Bug #13426 Updated: fread not work


> ID: 13426
> Updated by: sniper
> Reported By: [EMAIL PROTECTED]
> Old Status: Open
> Status: Feedback
> Bug Type: Filesystem function related
> Operating System: Windows 2000 Professional
> PHP Version: 4.0.6
> New Comment:
>
> So what you're saying is that using fopen with 'rb' which is
> the only way to open files (on windows) in binary mode,
> does not work? Is this the problem?
>
> Because using 'r' only won't work with binary files, such
> as .gif's.
>
> --Jani
>
>
>
>
> Previous Comments:
> 
>
> [2001-09-25 06:14:09] [EMAIL PROTECTED]
>
> function encode_file($sourcefile) {
>  if (is_readable($sourcefile)) {
> $fd = fopen($sourcefile, "r");
> $contents = fread($fd,filesize($sourcefile));
> $encoded = chunk_split(base64_encode($contents));
> fclose($fd);
>  }
>  return $encoded;
> }
>
> $source = $DOCUMENT_ROOT."/IMAGES/titolomail.gif";
>
> encode_file($source);
>
> fopen also don't work with "rb" option and system return a memory
violation
> error
>
> 
>
> [2001-09-25 04:54:16] [EMAIL PROTECTED]
>
> function encode_file($sourcefile) {
>  if (is_readable($sourcefile)) {
> $fd = fopen($sourcefile, "r");
> $contents .= fread($fd,filesize($sourcefile));
> $encoded = chunk_split(base64_encode($contents));
> fclose($fd);
>  }
>  return $encoded;
> }
>
> $source = $DOCUMENT_ROOT."/IMAGES/titolomail.gif";
>
> encode_file($source);
>
> fopen also don't work with "rb" option and system return a memory
violation error
>
> 
>
>
>
> ATTENTION! Do NOT reply to this email!
> To reply, use the web interface found at
http://bugs.php.net/?id=13426&edit=2
>
>


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #13440: PHP

2001-09-25 Thread surfer182

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

How i make a random banners in PHP ?
-- 
Edit bug report at: http://bugs.php.net/?id=13440&edit=1


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #13439: unbound .* patterns don't work properly

2001-09-25 Thread john

From: [EMAIL PROTECTED]
Operating system: 
PHP version:  4.0.5
PHP Bug Type: *Regular Expressions
Bug description:  unbound .* patterns don't work properly

These 2 are OK:

ereg_replace('..','b','aa') -> b
ereg_replace('.+','b','aa') -> b

But this is wrong:

ereg_replace('.*','b','aa') -> bb

You can "fix" it by binding to the beginning:

ereg_replace('^.*','b','aa') -> b

but not by binding to the end:

ereg_replace('.*$','b','aa') -> bb

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


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] Bug in autoconf report

2001-09-25 Thread Jeroen van Wolffelaar

> On Tue, 25 Sep 2001, Jeroen van Wolffelaar wrote:
>
> > 
> >
> > Note: after I solved that warning about automake & libtool not being in
> > the same dir, the error remainded the same. (I copied the automake
> > executable to the same dir as the libtool executable)
>
> Ok, but it's still a problem with your build tools, it works fine here.
> You re-ran buildconf I guess?

Yes, retrieving the whole CVS again takes quite some time again... what's
the command to clean all files that are not from CVS, so that I've got a
really clean tree again? make clean / make distclean? (But they don't yet
work before you run configure...)

So you think libtool is mal-installed? Could be possible...

> Derick

--Jeroen


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] How do I register a constructor in PHP (C code)

2001-09-25 Thread Jeff Hughes

I believe the problem you are having is that the zend_class_entry structure
destroyed as you leave the scope of the MINIT function.  This is definitely
going to have undefined behavior.  Move the zend_class_entry so that it is
global and you should be good to go.

Jeff Hughes
[EMAIL PROTECTED]

On Tue, Sep 25, 2001 at 05:12:37PM +0300, Emanuel Dejanu wrote:
> 
> I write an extension and I want to register a new class
> but I can not get my function to be registered as a constructor.
> 
> ex:
> PHP_FUNCTION(rt66class_constructor);
> static zend_function_entry php_rt66class_class_functions[] =
> {
>   PHP_FALIAS(RT66Class,  rt66class_constructor,  NULL)
> };
> 
> PHP_MINIT_FUNCTION(rt66util)
> {
>   zend_class_entry rt66class_class_entry;
>   INIT_CLASS_ENTRY(rt66class_class_entry, "RT66Class",
> php_rt66class_class_functions);
>   RT66Class_class_entry_ptr =
> zend_register_internal_class(&rt66class_class_entry);
> 
>   return SUCCESS;
> }
> 
> PHP_FUNCTION(rt66class_constructor)
> {
>   ZEND_PUTS("RT66Class Contructor");
> }
> 
> 
> -
>dl(myext.so);
>   $myvar = RT66Class();
> ?>
> 
> nothing appear on the screen.
> 
> Please tell me how can I make it to work.
> 
> Many thanks,
> 
> Emanuel Dejanu
> 
> > -Original Message-
> > From: Andy [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, August 01, 2001 3:27 PM
> > To: [EMAIL PROTECTED]
> > Subject: Fwd: FW: [PHP-DEV] print_r
> >
> >
> >
> >
> > --  Forwarded Message  --
> > Subject: FW: [PHP-DEV] print_r
> > Date: Wed, 1 Aug 2001 08:19:09 +0300
> > From: "Emanuel Dejanu" <[EMAIL PROTECTED]>
> >
> >
> > Sorry to forward this to you but I really have problems in
> > printing a doubled linked class.
> > Can you take a look at the following message and give me
> > an answer.
> >
> > Thanks,
> >
> > Emanuel Dejanu
> >
> > -Original Message-
> > From: Emanuel Dejanu [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, July 31, 2001 9:22 AM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP-DEV] print_r
> >
> >
> >
> > Hi,
> >
> > Is there a posibility to print an object but to not print some fields.
> >
> > If I use print_r he will print all variabiles from my object,
> > but I want on
> > variabile to not be printed. I do not want to write my own function.
> > Ex.
> >
> > class Node {
> > var $name;
> > var $parent = '/'
> > var $children = array();
> > function Node($name, &$parent) {
> > $this->parent = &$parent;
> > $this->name = $name;
> > }
> > }
> >
> > $rootNode = new Node('root', '');
> > array_push($rootNode->children, new Node('child1', $rootNode));
> > $child1Node = &$rootNode->children[0];
> > array_push($child1Node->children, new Node('child1', $child1Node));
> >
> > print_r($rootNode);
> >
> > will print make a recursivity. What will be nice is to allow that some
> > variabiles to not
> > be printed like this:
> >
> > class Node {
> > var $name;
> > var $__parent = '/'
> > var $children = array();
> > function Node($name, &$parent) {
> > $this->__parent = &$parent;
> > $this->name = $name;
> > }
> > }
> >
> > . /* add the root and childrens */
> >
> > print_r($rootNode);
> >
> > will print now the corret tree.
> >
> > Bellow you find the only modification that need to be done
> > for this to work.
> >
> > Best regards,
> >
> > Emanuel Dejanu
> >
> >
> > File: Zend/zend.c
> >
> > static void print_hash(HashTable *ht, int indent)
> > {
> > zval **tmp;
> > char *string_key;
> > HashPosition iterator;
> > unsigned long num_key, str_len;
> > int i, key_type;  /** HERE */
> >
> > for (i=0; i > ZEND_PUTS(" ");
> > }
> > ZEND_PUTS("(\n");
> > indent += PRINT_ZVAL_INDENT;
> > zend_hash_internal_pointer_reset_ex(ht, &iterator);
> > while (zend_hash_get_current_data_ex(ht, (void **)
> > &tmp, &iterator) ==
> > SUCCESS) {
> >
> >
> > / HERE **/
> >
> > key_type = zend_hash_get_current_key_ex(ht,
> > &string_key, &str_len,
> > &num_key, 0, &iterator);
> > if (key_type == HASH_KEY_IS_STRING)
> > if (string_key[0] == '_' &&
> > string_key[1] == '_') continue;
> >
> >
> > /*** HERE **/
> >
> >
> > for (i=0; i > ZEND_PUTS(" ");
> > }
> > ZEND_PUTS("[");
> > switch (key_type) {
> > case HASH_KEY_IS_STRING:
> > ZEND_PUTS(string_key);
> > break;
> > case HASH_KEY_IS_LONG:
> > zend_printf("%ld",num_key);
> > break;
> > }
> > ZEND_PUTS("] => ");
> > zend_print_zval_r(*tmp, indent+PRINT_ZVAL_INDENT);
> > ZEND_PUTS("\n");
> > zend_hash_move_forward_ex(ht, &iterator);
> > }
> > indent -= PRINT_ZVAL_IND

[PHP-DEV] Bug #13438: missing environment under iplanet like $PHP_AUTH_USER

2001-09-25 Thread php_bugs

From: [EMAIL PROTECTED]
Operating system: Solaris 8
PHP version:  4.0.4pl1
PHP Bug Type: iPlanet related
Bug description:  missing environment under iplanet like $PHP_AUTH_USER

This bug was reported before (#11181) but it hasn't been updated since May
and I can't add to that bug report because I don't have a password.

A lot of the environment is missing with php under iplanet that you would
normally see with apache.  $PHP_INFO_USER and $PHP_AUTH_PW but other stuff
like environment variables is also missing e.g. REMOTE_USER, REMOTE_ADDR,
SERVER_NAME, etc.

This makes programming a site that is authenticated virtually impossible. 
I have followed the instructions in nsapi-readme.txt to the letter, I have
tried this with and without the "AuthTrans fn=php4_auth_trans" line.

I've been told 4.0.4pl1 is the only version that works with iplanet, is
this incorrect information?
-- 
Edit bug report at: http://bugs.php.net/?id=13438&edit=1


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] [RFC] Versioning rules for PHP/Zend/PEAR/Extensions

2001-09-25 Thread Andrei Zmievski

On Tue, 25 Sep 2001, Jani Taskinen wrote:
> Like Zeev said, we release new versions too often anyway.

I think we're doing just fine.

-Andrei

The main reason Santa is so jolly is because he knows where
all the bad girls live.  -- George Carlin

-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #13437: PHP cores on exit; memory deallocation problem?

2001-09-25 Thread dshadow

From: [EMAIL PROTECTED]
Operating system: Linux & Solaris
PHP version:  4.0CVS-2001-09-25
PHP Bug Type: Reproducible crash
Bug description:  PHP cores on exit; memory deallocation problem?

When I unserialize a ~7mb object that contains several levels of nested
objects and arrays, PHP displays abnormal behavior. (Script #1)

First, when script execution is complete, PHP uses 100% of the CPU until it
has consumed the limit set by set_time_limit(). At this point, it segfaults
with the following backtrace (Backtrace #1).

When compiled into Apache, this causes the memory footprint for each child
process to skyrocket; the memory is not freed until the child exits. Over
time, this has resulted in Apache using 70mb * 10 children = 700mb of
RAM.

Additonally: I have experienced random crashes when PHP (4.0.4pl1) exits on
Solaris. As I can not consistently reproduce this, I can't provide a sample
script that always exhibits the problem, but the script that crashes does
use mysql, and does NOT use unserialize() at all. This problem is included
in this report because both crash in the same function when PHP is doing
the same thing (shutting down).


Backtrace #1 - Linux / php4-200109251035

./configure  --with-mysql=/usr/local/mysql --enable-track-vars --with-xml
--with-imap=/usr --with-zlib-dir=/usr --with-ttf=/usr --enable-bcmath
--with-kerberos=/usr/kerberos --with-openssl=/usr

Program received signal SIGSEGV, Segmentation fault.
0x80ee455 in _efree (ptr=0xa585b54) at zend_alloc.c:240
240 REMOVE_POINTER_FROM_LIST(p);
(gdb) bt
#0  0x80ee455 in _efree (ptr=0xa585b54) at zend_alloc.c:240
#1  0x80ee7eb in shutdown_memory_manager (silent=1, clean_cache=1)
at zend_alloc.c:469
#2  0x806affe in php_module_shutdown () at main.c:1008
#3  0x8069ba9 in main (argc=2, argv=0xbbf4) at cgi_main.c:787


Backtrace #2: Solaris / php 4.0.4pl1

./configure  --with-mysql=/apps/mysql --enable-track-vars --with-xml
--enable-bcmath

#0  0x89074 in _efree (ptr=0x14d1c0) at zend_alloc.c:232
232 REMOVE_POINTER_FROM_LIST(p);
(gdb) bt
#0  0x89074 in _efree (ptr=0x14d1c0) at zend_alloc.c:232
#1  0x9ad48 in zend_hash_destroy (ht=0x158008) at zend_hash.c:569
#2  0x962f8 in _zval_dtor (zvalue=0x14a328) at zend_variables.c:69
#3  0x8e9f8 in _zval_ptr_dtor (zval_ptr=0x14acf4) at
zend_execute_API.c:261
#4  0x9acdc in zend_hash_destroy (ht=0x11fdf4) at zend_hash.c:564
#5  0x8e824 in shutdown_executor () at zend_execute_API.c:165
#6  0x96ffc in zend_deactivate () at zend.c:525
#7  0x24c38 in php_request_shutdown (dummy=0x0) at main.c:688
#8  0x23a78 in main (argc=3, argv=0xed34) at cgi_main.c:771



Script #1:
#!/usr/local/bin/php -q


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


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] Bug in autoconf report

2001-09-25 Thread derick

On Tue, 25 Sep 2001, Jeroen van Wolffelaar wrote:

> 
>
> Note: after I solved that warning about automake & libtool not being in
> the same dir, the error remainded the same. (I copied the automake
> executable to the same dir as the libtool executable)

Ok, but it's still a problem with your build tools, it works fine here.
You re-ran buildconf I guess?

Derick


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] 403 on www.php.net (fwd)

2001-09-25 Thread Derick Rethans

Hello,

I get a 403 (Permission denied) on bugs and www.php.net from home... any
idea's? Works fine from my work location.

regards,

Derick Rethans

-
PHP: Scripting the Web - www.php.net - [EMAIL PROTECTED]
 SRM: Site Resource Manager - www.vl-srm.net
-
JDI Media Solutions - www.jdimedia.nl - [EMAIL PROTECTED]
 Boulevard Heuvelink 102 - 6828 KT Arnhem - The Netherlands
-



-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] Bug in autoconf report

2001-09-25 Thread Jeroen van Wolffelaar


- Original Message -
From: <[EMAIL PROTECTED]>
To: "Jeroen van Wolffelaar" <[EMAIL PROTECTED]>
Cc: "PHP Development List" <[EMAIL PROTECTED]>
Sent: Tuesday, September 25, 2001 7:46 PM
Subject: Re: [PHP-DEV] Bug in autoconf report


> On Tue, 25 Sep 2001, Jeroen van Wolffelaar wrote:
>
> > [jeroen@richard]~/scratch/tmp/php4-cvs> ./buildconf
> > buildconf: checking installation...
> > buildconf: autoconf version 2.13 (ok)
> > buildconf: automake version 1.4-p4 (ok)
> > buildconf: libtool version 1.4 (ok)
> > WARNING: automake and libtool are installed in different
> >  directories.  This may cause aclocal to fail.
> >  continuing anyway
>
> so don't do that... install them into the same dir. This causes the errors
> below probably.



> > Note: after I solved that warning about automake & libtool not being in
> > the same dir, the error remainded the same. (I copied the automake
executable to the same dir as the libtool executable)
> >
> > This is a fresh CVS of 3 minutes ago.
> >
> >
> > When I run configure arterwards:
> >
> > ./configure
> > 
> > Configuring Zend
> > checking build system type... i686-pc-linux-gnu
> > checking for ld used by GCC... /usr/bin/ld
> > checking if the linker (/usr/bin/ld) is GNU ld... yes
> > checking for BSD-compatible nm... /usr/bin/nm -B
> > updating cache ./config.cache
> > ./ltconfig: ./ltconfig: No such file or directory
> > configure: error: libtool configure failed
> >
> > (indeed, 'ltconfig' doesn't exist)
> >
> > Also note that I didn't ever succesfully build PHP directly from CVS - I
> > didn't have libtool 1.4 till yesterday
> >
> > --Jeroen



-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] Bug in autoconf report

2001-09-25 Thread derick

On Tue, 25 Sep 2001, Jeroen van Wolffelaar wrote:

> [jeroen@richard]~/scratch/tmp/php4-cvs> ./buildconf
> buildconf: checking installation...
> buildconf: autoconf version 2.13 (ok)
> buildconf: automake version 1.4-p4 (ok)
> buildconf: libtool version 1.4 (ok)
> WARNING: automake and libtool are installed in different
>  directories.  This may cause aclocal to fail.
>  continuing anyway

so don't do that... install them into the same dir. This causes the errors
below probably.

Derick

> rebuilding Makefile templates
> automake: configure.in: installing `Zend/ylwrap'
> rebuilding configure
> autoconf: Undefined macros:
> ***BUG in Autoconf--please report*** AC_TRY_DLOPEN_SELF
> configure.in:162:AC_MSG_RESULT([$PHP_SAPI])
> configure.in:182:AC_MSG_RESULT([$php_cv_cc_dashr])
> configure.in:192:   AC_MSG_RESULT([$php_cv_cc_rpath])
> configure.in:220: AC_DEFINE(HAVE_LIBSOCKET,1,[ ]) ], [
> configure.in:238: AC_DEFINE(HAVE_LIBNSL,1,[ ]) ],[
> configure.in:241:  AC_DEFINE(HAVE_LIBNSL,1,[ ]) ], [])
> configure.in:267: AC_DEFINE(HAVE_LIBSOCKET,1,[ ]) ], [
> configure.in:270:  AC_DEFINE(HAVE_LIBRESOLV,1,[ ])
> configure.in:363:  AC_DEFINE(HAVE_IPV6,1,[Whether you have IPv6
> support])
> configure.in:437:  AC_DEFINE(HAVE_GETADDRINFO,1,[Define if you have the
> getaddrinfo function])
> configure.in:463:dnl AC_MSG_RESULT([$ac_cv_type_in_addr_t])
> configure.in:465:  AC_DEFINE(in_addr_t, u_int, [ ])
> configure.in:528:  AC_DEFINE(PHP_SAFE_MODE,1,[ ])
> configure.in:530:  AC_DEFINE(PHP_SAFE_MODE,0,[ ])
> configure.in:540:
> AC_DEFINE(PHP_SAFE_MODE_EXEC_DIR,"/usr/local/php/bin", [ ])
> configure.in:541:   AC_MSG_RESULT([/usr/local/php/bin])
> configure.in:543:
> AC_DEFINE_UNQUOTED(PHP_SAFE_MODE_EXEC_DIR,"$withval", [ ])
> configure.in:544:   AC_MSG_RESULT([$withval])
> configure.in:547:
> AC_DEFINE(PHP_SAFE_MODE_EXEC_DIR,"/usr/local/php/bin", [ ])
> configure.in:548:   AC_MSG_RESULT([/usr/local/php/bin])
> configure.in:551:
> AC_DEFINE(PHP_SAFE_MODE_EXEC_DIR,"/usr/local/php/bin", [ ])
> configure.in:552:   AC_MSG_RESULT([/usr/local/php/bin])
> configure.in:569:  AC_DEFINE(PHP_SIGCHILD, 1, [ ])
> configure.in:571:  AC_DEFINE(PHP_SIGCHILD, 0, [ ])
> configure.in:578:  AC_DEFINE(MAGIC_QUOTES, 1, [ ])
> configure.in:580:  AC_DEFINE(MAGIC_QUOTES, 0, [ ])
> configure.in:603:  AC_DEFINE(DEFAULT_SHORT_OPEN_TAG,"1",[ ])
> configure.in:605:  AC_DEFINE(DEFAULT_SHORT_OPEN_TAG,"0",[ ])
> configure.in:616:AC_DEFINE(HAVE_DMALLOC,1,[Whether you have
> dmalloc])
> configure.in:629:  AC_DEFINE(HAVE_PHP_STREAM, 1, [Whether to use php
> streams])
> configure.in:635:  AC_DEFINE(HAVE_CRYPT,1,[ ])
> configure.in:655:AC_MSG_RESULT([$PHP_VERSIONING])
> configure.in:704:  AC_DEFINE(ZTS,1,[ ])
> configure.in:817:AC_DEFINE_UNQUOTED(PHP_BUILD_DATE,"$PHP_BUILD_DATE",[PHP
> build date])
> configure.in:819:AC_DEFINE_UNQUOTED(PHP_UNAME,"$PHP_UNAME",[uname -a
> output])
> configure.in:821:AC_DEFINE_UNQUOTED(PHP_OS,"$PHP_OS",[uname output])
> configure.in:88:AC_MSG_RESULT([$1.$2 (ok)])
> rebuilding acconfig.h
> rebuilding main/php_config.h.in
> [jeroen@richard]~/scratch/tmp/php4-cvs>
>
>
> Note: after I solved that warning about automake & libtool not being in
> the same dir, the error remainded the same.
>
> This is a fresh CVS of 3 minutes ago.
>
>
> When I run configure arterwards:
>
> ./configure
> 
> Configuring Zend
> checking build system type... i686-pc-linux-gnu
> checking for ld used by GCC... /usr/bin/ld
> checking if the linker (/usr/bin/ld) is GNU ld... yes
> checking for BSD-compatible nm... /usr/bin/nm -B
> updating cache ./config.cache
> ./ltconfig: ./ltconfig: No such file or directory
> configure: error: libtool configure failed
>
> (indeed, 'ltconfig' doesn't exist)
>
> Also note that I didn't ever succesfully build PHP directly from CVS - I
> didn't have libtool 1.4 till yesterday
>
> --Jeroen
>
> Jeroen van Wolffelaar
> [EMAIL PROTECTED]
> http://www.A-Eskwadraat.nl/~jeroen
>
>
> --
> PHP Development Mailing List 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>

Derick Rethans

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


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #13435 Updated: fileupload and filedownload

2001-09-25 Thread saibot

ID: 13435
User updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
Status: Open
Bug Type: HTTP related
Operating System: windows 2000 pro
PHP Version: 4.0.6
New Comment:

Ahhm forgot the environment:

Win2kPro, Apache (latest),MySQL,RAID-System for IDE, 128MB of ram and about 40 GB free 
harddisk. The php.ini was configured for 100mb posts and 100mb files, using 64 MB of 
memory for each script.

Previous Comments:


[2001-09-25 13:37:15] [EMAIL PROTECTED]

While uploading thru intranet, the PHP-process uses 99% of CPU, lots of memory (up to 
twice as much as the file itself) and takes 3/4 hour for 40 MB. While sending this 
file back using fopen/passthru, it takes a lot time until the browsers download-dialog 
opens. Then the transfer itself ist very quick !

That's why I guess it is not a http-problem, but a problem in handling files or 
handling memory ! Another hint on this is, that large files seem to get back corrupt, 
as testing a large and downloaded file resulted in some crc-errors. On small files all 
works fine.

This one might be relatet to the bug 10800 (or 10080 %o),
so have a look at that.





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


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #13435: fileupload and filedownload

2001-09-25 Thread saibot

From: [EMAIL PROTECTED]
Operating system: windows 2000 pro
PHP version:  4.0.6
PHP Bug Type: HTTP related
Bug description:  fileupload and filedownload

While uploading thru intranet, the PHP-process uses 99% of CPU, lots of
memory (up to twice as much as the file itself) and takes 3/4 hour for 40
MB. While sending this file back using fopen/passthru, it takes a lot time
until the browsers download-dialog opens. Then the transfer itself ist very
quick !

That's why I guess it is not a http-problem, but a problem in handling
files or handling memory ! Another hint on this is, that large files seem
to get back corrupt, as testing a large and downloaded file resulted in
some crc-errors. On small files all works fine.

This one might be relatet to the bug 10800 (or 10080 %o),
so have a look at that.
-- 
Edit bug report at: http://bugs.php.net/?id=13435&edit=1


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug in autoconf report

2001-09-25 Thread Jeroen van Wolffelaar

[jeroen@richard]~/scratch/tmp/php4-cvs> ./buildconf
buildconf: checking installation...
buildconf: autoconf version 2.13 (ok)
buildconf: automake version 1.4-p4 (ok)
buildconf: libtool version 1.4 (ok)
WARNING: automake and libtool are installed in different
 directories.  This may cause aclocal to fail.
 continuing anyway
rebuilding Makefile templates
automake: configure.in: installing `Zend/ylwrap'
rebuilding configure
autoconf: Undefined macros:
***BUG in Autoconf--please report*** AC_TRY_DLOPEN_SELF
configure.in:162:AC_MSG_RESULT([$PHP_SAPI])
configure.in:182:AC_MSG_RESULT([$php_cv_cc_dashr])
configure.in:192:   AC_MSG_RESULT([$php_cv_cc_rpath])
configure.in:220: AC_DEFINE(HAVE_LIBSOCKET,1,[ ]) ], [
configure.in:238: AC_DEFINE(HAVE_LIBNSL,1,[ ]) ],[
configure.in:241:  AC_DEFINE(HAVE_LIBNSL,1,[ ]) ], [])
configure.in:267: AC_DEFINE(HAVE_LIBSOCKET,1,[ ]) ], [
configure.in:270:  AC_DEFINE(HAVE_LIBRESOLV,1,[ ])
configure.in:363:  AC_DEFINE(HAVE_IPV6,1,[Whether you have IPv6
support])
configure.in:437:  AC_DEFINE(HAVE_GETADDRINFO,1,[Define if you have the
getaddrinfo function])
configure.in:463:dnl AC_MSG_RESULT([$ac_cv_type_in_addr_t])
configure.in:465:  AC_DEFINE(in_addr_t, u_int, [ ])
configure.in:528:  AC_DEFINE(PHP_SAFE_MODE,1,[ ])
configure.in:530:  AC_DEFINE(PHP_SAFE_MODE,0,[ ])
configure.in:540:
AC_DEFINE(PHP_SAFE_MODE_EXEC_DIR,"/usr/local/php/bin", [ ])
configure.in:541:   AC_MSG_RESULT([/usr/local/php/bin])
configure.in:543:
AC_DEFINE_UNQUOTED(PHP_SAFE_MODE_EXEC_DIR,"$withval", [ ])
configure.in:544:   AC_MSG_RESULT([$withval])
configure.in:547:
AC_DEFINE(PHP_SAFE_MODE_EXEC_DIR,"/usr/local/php/bin", [ ])
configure.in:548:   AC_MSG_RESULT([/usr/local/php/bin])
configure.in:551:
AC_DEFINE(PHP_SAFE_MODE_EXEC_DIR,"/usr/local/php/bin", [ ])
configure.in:552:   AC_MSG_RESULT([/usr/local/php/bin])
configure.in:569:  AC_DEFINE(PHP_SIGCHILD, 1, [ ])
configure.in:571:  AC_DEFINE(PHP_SIGCHILD, 0, [ ])
configure.in:578:  AC_DEFINE(MAGIC_QUOTES, 1, [ ])
configure.in:580:  AC_DEFINE(MAGIC_QUOTES, 0, [ ])
configure.in:603:  AC_DEFINE(DEFAULT_SHORT_OPEN_TAG,"1",[ ])
configure.in:605:  AC_DEFINE(DEFAULT_SHORT_OPEN_TAG,"0",[ ])
configure.in:616:AC_DEFINE(HAVE_DMALLOC,1,[Whether you have
dmalloc])
configure.in:629:  AC_DEFINE(HAVE_PHP_STREAM, 1, [Whether to use php
streams])
configure.in:635:  AC_DEFINE(HAVE_CRYPT,1,[ ])
configure.in:655:AC_MSG_RESULT([$PHP_VERSIONING])
configure.in:704:  AC_DEFINE(ZTS,1,[ ])
configure.in:817:AC_DEFINE_UNQUOTED(PHP_BUILD_DATE,"$PHP_BUILD_DATE",[PHP
build date])
configure.in:819:AC_DEFINE_UNQUOTED(PHP_UNAME,"$PHP_UNAME",[uname -a
output])
configure.in:821:AC_DEFINE_UNQUOTED(PHP_OS,"$PHP_OS",[uname output])
configure.in:88:AC_MSG_RESULT([$1.$2 (ok)])
rebuilding acconfig.h
rebuilding main/php_config.h.in
[jeroen@richard]~/scratch/tmp/php4-cvs>


Note: after I solved that warning about automake & libtool not being in
the same dir, the error remainded the same.

This is a fresh CVS of 3 minutes ago.


When I run configure arterwards:

./configure

Configuring Zend
checking build system type... i686-pc-linux-gnu
checking for ld used by GCC... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD-compatible nm... /usr/bin/nm -B
updating cache ./config.cache
./ltconfig: ./ltconfig: No such file or directory
configure: error: libtool configure failed

(indeed, 'ltconfig' doesn't exist)

Also note that I didn't ever succesfully build PHP directly from CVS - I
didn't have libtool 1.4 till yesterday

--Jeroen

Jeroen van Wolffelaar
[EMAIL PROTECTED]
http://www.A-Eskwadraat.nl/~jeroen


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #13434 Updated: Interface to PQrequestCancel() function

2001-09-25 Thread sander

ID: 13434
Updated by: sander
Reported By: [EMAIL PROTECTED]
Old Summary: feature req: Need interface to PQrequestCancel() function
Status: Open
Old Bug Type: PostgreSQL related
Bug Type: Feature/Change Request
Operating System: linux
PHP Version: 4.0.6
New Comment:

Reclassified.

Previous Comments:


[2001-09-25 12:17:39] [EMAIL PROTECTED]

At this time, if a long-standing query is submitted from php via pg_exec,
there is no way to abort it.  (Even closing the db connection with pg_close
may not abort the query at the server.)

It would be nice to have a pg_cancel() function which ties straight through to the 
pgsql PQrequestCancel() function.






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


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #13424 Updated: imagecreatetruecolor() or imagecopyresampled()

2001-09-25 Thread gargouil

ID: 13424
User updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
Old Status: Feedback
Status: Closed
Bug Type: GD related
Operating System: mandrake 8
PHP Version: 4.0.6


Previous Comments:


[2001-09-25 04:23:57] [EMAIL PROTECTED]

Can you post your configure line?



[2001-09-24 21:31:41] [EMAIL PROTECTED]

i use imagecreatetruecolor()  or imagecopyresampled() and i have an fatal error caused 
by undefined function but i use verison 2.0.1 of GD.. on my windows box this work well 
but in linux the same code don't work

answer quick.. thats urgent

thanks





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


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] extend zend_register_internal_class() and zend_register_internal_class_ex()?

2001-09-25 Thread Hansuck Jo

I can't speak English. so I'll shortly talk.
(and I can't using cvs.. ^^;;;)


I found that zend_register_internal_class() and
zend_register_internal_class_ex() is impossible adding default
properties. And instance properties(adding by add_property_*()
functions) can't inherit.

I think, It's mean that user-defined class could not inherit default
properties of internal classes.


So, I define and implement new functions. and suggest.. :)


ZEND_API zend_class_entry
*zend_register_internal_class_with_default_property(zend_class_entry
*class_entry, HashTable *default_properties);

ZEND_API zend_class_entry
*zend_register_internal_class_ex_with_default_property(zend_class_entry
*class_entry, zend_class_entry *parent_ce, char *parent_name, HashTable
*default_properties);

and add_default_property_*() functions.


zend_extend.h zend_extend.c
<-- This is extended code. This append Zend_API.h(.c).


php_scl.h scl.c
<-- Test Code. This register internel classes 'object'
 and 'subobjet'.


scl.php
<-- Test script that working 'object', 'subobject' and
'subobject2'(subclass of 'subobject').



This is rusult excuted scl.php


-
Built-in class Object test.
-
Success to create instance of class object.
Object Class Name : object
Object Parent Class Name :
Object Object Vars :
Array
(
[long_var1] => 100
[null_var1] =>
[bool_var1] => 1
[double_var1] => 100.1
[string_var1] => value
[stringl_var1] => value
[array_var1] => Array
(
)

)
Object Class Vars :
Array
(
[long_var1] => 100
[null_var1] =>
[bool_var1] => 1
[double_var1] => 100.1
[string_var1] => value
[stringl_var1] => value
[array_var1] => Array
(
)

)
Object Methods :
Array
(
[0] => object
[1] => getclass
[2] => getparentclass
[3] => getobjectvars
[4] => getclassvars
[5] => getmethods
[6] => methodexists
[7] => issubobjectof
)


-
Built-in class Subobject test.
-
Success to create instance of class subobject.
Subobject Class Name : subobject
Subobject Parent Class Name : object
Subobject Object Vars :
Array
(
[long_var2] => 20
[null_var2] =>
[bool_var2] => 1
[double_var2] => 200.2
[string_var2] => extended_value
[stringl_var2] => extended_value
[array_var2] => Array
(
)

[long_var1] => 100
[null_var1] =>
[bool_var1] => 1
[double_var1] => 100.1
[string_var1] => value
[stringl_var1] => value
[array_var1] => Array
(
)

[type] => 100
[value] => 100
)
Subobject Class Vars :
Array
(
[long_var2] => 20
[null_var2] =>
[bool_var2] => 1
[double_var2] => 200.2
[string_var2] => extended_value
[stringl_var2] => extended_value
[array_var2] => Array
(
)

[long_var1] => 100
[null_var1] =>
[bool_var1] => 1
[double_var1] => 100.1
[string_var1] => value
[stringl_var1] => value
[array_var1] => Array
(
)

)
Subobject Methods :
Array
(
[0] => subobject
[1] => object
[2] => getclass
[3] => getparentclass
[4] => getobjectvars
[5] => getclassvars
[6] => getmethods
[7] => methodexists
[8] => issubobjectof
)


-
User-defined class Subobject2 test.
-
Success to create instance of class subobject.
Subobject Class Name : subobject2
Subobject Parent Class Name : subobject
Subobject Object Vars :
Array
(
[long_var2] => 20
[null_var2] =>
[bool_var2] => 1
[double_var2] => 200.2
[string_var2] => extended_value
[stringl_var2] => extended_value
[array_var2] => Array
(
)

[long_var1] => 100
[null_var1] => not null :)
[bool_var1] =>
[double_var1] => 203023.302
[string_var1] => another value
[stringl_var1] => another value
[array_var1] => Array
(
[foo] => var
)

[type] => 100
[value] => 100
)
Subobject Class Vars :
Array
(
[long_var2] => 20
[null_var2] =>
[bool_var2] => 1
[double_var2] => 200.2
[string_var2] => extended_value
[stringl_var2] => extended_value
[array_var2] => Array
(
)

[long_var1] => 100
[null_var1] => not null :)
[bool_var1] =>
[double_var1] => 203023.302
[string_var1] => another value
[stringl_var1] => another value
[array_var1] => Array
(
[foo] => var
)

)
Subobject Methods :
Array
(
[0] => subobject
[1] => object
[2] => getclass
[3] => getparentclass
[4] => getobjectvars
[5] => getclassvars
[6] => getmethods
[7] => methodexists
[8] => issubobjectof
[9] => subobj

Re: [PHP-DEV] Warning in PHP_4_0_7 branch

2001-09-25 Thread Sterling Hughes

On Tue, 25 Sep 2001, Sebastian Bergmann wrote:

> zend_llist.c
> D:\home\php\php4\Zend\zend_llist.c(214) : warning C4018: '<' :
> Conflict between signed and unsigned
>
Fixed in CVS.

-Sterling


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Re: How do I register a constructor in PHP (C code)

2001-09-25 Thread Hansuck Jo

You use rt66clsss_init() instead of rt66class_contstructor().
may be, it's will work. :)


Emanuel Dejanu wrote:

> I write an extension and I want to register a new class
> but I can not get my function to be registered as a constructor.
> 
> ex:
> PHP_FUNCTION(rt66class_constructor);
> static zend_function_entry php_rt66class_class_functions[] =
> {
>   PHP_FALIAS(RT66Class,  rt66class_constructor,  NULL)
> };
> 
> PHP_MINIT_FUNCTION(rt66util)
> {
>   zend_class_entry rt66class_class_entry;
>   INIT_CLASS_ENTRY(rt66class_class_entry, "RT66Class",
> php_rt66class_class_functions);
>   RT66Class_class_entry_ptr =
> zend_register_internal_class(&rt66class_class_entry);
> 
>   return SUCCESS;
> }
> 
> PHP_FUNCTION(rt66class_constructor)
> {
>   ZEND_PUTS("RT66Class Contructor");
> }
> 
> 
> -
>dl(myext.so);
>   $myvar = RT66Class();
> ?>
> 
> nothing appear on the screen.
> 
> Please tell me how can I make it to work.
> 
> Many thanks,
> 
> Emanuel Dejanu
> 
> 
>>-Original Message-
>>From: Andy [mailto:[EMAIL PROTECTED]]
>>Sent: Wednesday, August 01, 2001 3:27 PM
>>To: [EMAIL PROTECTED]
>>Subject: Fwd: FW: [PHP-DEV] print_r
>>
>>
>>
>>
>>--  Forwarded Message  --
>>Subject: FW: [PHP-DEV] print_r
>>Date: Wed, 1 Aug 2001 08:19:09 +0300
>>From: "Emanuel Dejanu" <[EMAIL PROTECTED]>
>>
>>
>>Sorry to forward this to you but I really have problems in
>>printing a doubled linked class.
>>Can you take a look at the following message and give me
>>an answer.
>>
>>Thanks,
>>
>>Emanuel Dejanu
>>
>>-Original Message-
>>From: Emanuel Dejanu [mailto:[EMAIL PROTECTED]]
>>Sent: Tuesday, July 31, 2001 9:22 AM
>>To: [EMAIL PROTECTED]
>>Subject: [PHP-DEV] print_r
>>
>>
>>
>>Hi,
>>
>>Is there a posibility to print an object but to not print some fields.
>>
>>If I use print_r he will print all variabiles from my object,
>>but I want on
>>variabile to not be printed. I do not want to write my own function.
>>Ex.
>>
>>class Node {
>>  var $name;
>>  var $parent = '/'
>>  var $children = array();
>>  function Node($name, &$parent) {
>>  $this->parent = &$parent;
>>  $this->name = $name;
>>  }
>>}
>>
>>$rootNode = new Node('root', '');
>>array_push($rootNode->children, new Node('child1', $rootNode));
>>$child1Node = &$rootNode->children[0];
>>array_push($child1Node->children, new Node('child1', $child1Node));
>>
>>print_r($rootNode);
>>
>>will print make a recursivity. What will be nice is to allow that some
>>variabiles to not
>>be printed like this:
>>
>>class Node {
>>  var $name;
>>  var $__parent = '/'
>>  var $children = array();
>>  function Node($name, &$parent) {
>>  $this->__parent = &$parent;
>>  $this->name = $name;
>>  }
>>}
>>
>>. /* add the root and childrens */
>>
>>print_r($rootNode);
>>
>>will print now the corret tree.
>>
>>Bellow you find the only modification that need to be done
>>for this to work.
>>
>>Best regards,
>>
>>Emanuel Dejanu
>>
>>
>>File: Zend/zend.c
>>
>>static void print_hash(HashTable *ht, int indent)
>>{
>>  zval **tmp;
>>  char *string_key;
>>  HashPosition iterator;
>>  unsigned long num_key, str_len;
>>  int i, key_type;  /** HERE */
>>
>>  for (i=0; i>  ZEND_PUTS(" ");
>>  }
>>  ZEND_PUTS("(\n");
>>  indent += PRINT_ZVAL_INDENT;
>>  zend_hash_internal_pointer_reset_ex(ht, &iterator);
>>  while (zend_hash_get_current_data_ex(ht, (void **)
>>&tmp, &iterator) ==
>>SUCCESS) {
>>
>>
>>/ HERE **/
>>
>>  key_type = zend_hash_get_current_key_ex(ht,
>>&string_key, &str_len,
>>&num_key, 0, &iterator);
>>  if (key_type == HASH_KEY_IS_STRING)
>>  if (string_key[0] == '_' &&
>>string_key[1] == '_') continue;
>>
>>
>>/*** HERE **/
>>
>>
>>  for (i=0; i>  ZEND_PUTS(" ");
>>  }
>>  ZEND_PUTS("[");
>>  switch (key_type) {
>>  case HASH_KEY_IS_STRING:
>>  ZEND_PUTS(string_key);
>>  break;
>>  case HASH_KEY_IS_LONG:
>>  zend_printf("%ld",num_key);
>>  break;
>>  }
>>  ZEND_PUTS("] => ");
>>  zend_print_zval_r(*tmp, indent+PRINT_ZVAL_INDENT);
>>  ZEND_PUTS("\n");
>>  zend_hash_move_forward_ex(ht, &iterator);
>>  }
>>  indent -= PRINT_ZVAL_INDENT;
>>  for (i=0; i>  ZEND_PUTS(" ");
>>  }
>>  ZEND_PUTS(")\n");
>>}
>>
>>
>>--
>>PHP Development Mailing List 
>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>For additional commands, e-mail: [EMAIL PROTECTED]
>>To contact the list administrators, e-mail:
>>[EMAIL PROTECTED]
>>---
>>
>>--
>>PH

[PHP-DEV] Bug #13433: Returning Booleans from COM is broken in 407

2001-09-25 Thread peterd

From: [EMAIL PROTECTED]
Operating system: Windows NT 4 Server
PHP version:  4.0CVS-2001-09-25
PHP Bug Type: COM related
Bug description:  Returning Booleans from COM is broken in 407

In PHP 4.07 (RC1, RC2 and latest snapshot, standard windows build)
returning a boolean from a COM object is broken.

I reported this on PHP-QA a while ago but there was no response to it. 
That report was primarily to do with returning booleans from a database
accessed via an ADO COM object.  But now I've found it's true for all
booleans.

When you have a COM object returning a boolean, testing that boolean for
'trueness' fails.

The following script:

TestFunc();// Simple function that just returns TRUE

var_dump($arg);

if ($arg == TRUE)
   echo "arg is true";
elseif ($arg == FALSE)
   echo "arg is false";
else
   echo "arg is something else";

if ($arg)
  echo "arg is true, but not equal to true";
?>

produces this output:

>bool(true)
>arg is something else
>
>arg is true, but not equal to true
>

Basically, if you test for equality to 'true' it fails, but it's also not
false.  But if you just test directly on the value it works fine.

I stepped through the source and it appears to be due to the way comparison
of booleans is done.  The COM object returns a boolean by creating a
Variant of type BOOL and value -1.  whereas PHP creates a boolean of type
BOOL and value 1.  The comparison then messes up due to this, I think.

I've also tried this with PHP 4.06 and the problem doesn't occur in that
version
-- 
Edit bug report at: http://bugs.php.net/?id=13433&edit=1


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #13432 Updated: it has a virus !!!! Trust me , scan it!!!!!!!!!! You bastards screwed up my cou

2001-09-25 Thread jmoore

ID: 13432
Updated by: jmoore
Reported By: [EMAIL PROTECTED]
Status: Bogus
Bug Type: Unknown/Other Function
Operating System: windows 2000 pro
PHP Version: 4.0.6
New Comment:

I checked it with Norton Antivirus, no virus reported in zipped dirstribution. Must be 
your system or a false alarm (php_odbc.dll has given some of these)

- James

Previous Comments:


[2001-09-25 10:45:54] [EMAIL PROTECTED]

I just scanned it with Kaspersky AV, no virus found.
So it must have been another way how the virus came on your system.

Derick



[2001-09-25 10:35:38] [EMAIL PROTECTED]

it has a big virus when running on windows 2k pro.. You bastardz





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


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #13432 Updated: it has a virus !!!! Trust me , scan it!!!!!!!!!! You bastards screwed up my cou

2001-09-25 Thread derick

ID: 13432
Updated by: derick
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Bogus
Bug Type: Unknown/Other Function
Operating System: windows 2000 pro
PHP Version: 4.0.6
New Comment:

I just scanned it with Kaspersky AV, no virus found.
So it must have been another way how the virus came on your system.

Derick

Previous Comments:


[2001-09-25 10:35:38] [EMAIL PROTECTED]

it has a big virus when running on windows 2k pro.. You bastardz





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


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #13432: it has a virus !!!! Trust me , scan it!!!!!!!!!! You bastards screwed up my cou

2001-09-25 Thread danielclark

From: [EMAIL PROTECTED]
Operating system: windows 2000 pro
PHP version:  4.0.6
PHP Bug Type: Unknown/Other Function
Bug description:  it has a virus  Trust me , scan it!! You bastards 
screwed up my cou

it has a big virus when running on windows 2k pro.. You bastardz
-- 
Edit bug report at: http://bugs.php.net/?id=13432&edit=1


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] How do I register a constructor in PHP (C code)

2001-09-25 Thread Emanuel Dejanu


I write an extension and I want to register a new class
but I can not get my function to be registered as a constructor.

ex:
PHP_FUNCTION(rt66class_constructor);
static zend_function_entry php_rt66class_class_functions[] =
{
PHP_FALIAS(RT66Class,  rt66class_constructor,  NULL)
};

PHP_MINIT_FUNCTION(rt66util)
{
zend_class_entry rt66class_class_entry;
INIT_CLASS_ENTRY(rt66class_class_entry, "RT66Class",
php_rt66class_class_functions);
RT66Class_class_entry_ptr =
zend_register_internal_class(&rt66class_class_entry);

return SUCCESS;
}

PHP_FUNCTION(rt66class_constructor)
{
ZEND_PUTS("RT66Class Contructor");
}


-


nothing appear on the screen.

Please tell me how can I make it to work.

Many thanks,

Emanuel Dejanu

> -Original Message-
> From: Andy [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, August 01, 2001 3:27 PM
> To: [EMAIL PROTECTED]
> Subject: Fwd: FW: [PHP-DEV] print_r
>
>
>
>
> --  Forwarded Message  --
> Subject: FW: [PHP-DEV] print_r
> Date: Wed, 1 Aug 2001 08:19:09 +0300
> From: "Emanuel Dejanu" <[EMAIL PROTECTED]>
>
>
> Sorry to forward this to you but I really have problems in
> printing a doubled linked class.
> Can you take a look at the following message and give me
> an answer.
>
> Thanks,
>
> Emanuel Dejanu
>
> -Original Message-
> From: Emanuel Dejanu [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, July 31, 2001 9:22 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP-DEV] print_r
>
>
>
> Hi,
>
> Is there a posibility to print an object but to not print some fields.
>
> If I use print_r he will print all variabiles from my object,
> but I want on
> variabile to not be printed. I do not want to write my own function.
> Ex.
>
> class Node {
>   var $name;
>   var $parent = '/'
>   var $children = array();
>   function Node($name, &$parent) {
>   $this->parent = &$parent;
>   $this->name = $name;
>   }
> }
>
> $rootNode = new Node('root', '');
> array_push($rootNode->children, new Node('child1', $rootNode));
> $child1Node = &$rootNode->children[0];
> array_push($child1Node->children, new Node('child1', $child1Node));
>
> print_r($rootNode);
>
> will print make a recursivity. What will be nice is to allow that some
> variabiles to not
> be printed like this:
>
> class Node {
>   var $name;
>   var $__parent = '/'
>   var $children = array();
>   function Node($name, &$parent) {
>   $this->__parent = &$parent;
>   $this->name = $name;
>   }
> }
>
> . /* add the root and childrens */
>
> print_r($rootNode);
>
> will print now the corret tree.
>
> Bellow you find the only modification that need to be done
> for this to work.
>
> Best regards,
>
> Emanuel Dejanu
>
>
> File: Zend/zend.c
>
> static void print_hash(HashTable *ht, int indent)
> {
>   zval **tmp;
>   char *string_key;
>   HashPosition iterator;
>   unsigned long num_key, str_len;
>   int i, key_type;  /** HERE */
>
>   for (i=0; i   ZEND_PUTS(" ");
>   }
>   ZEND_PUTS("(\n");
>   indent += PRINT_ZVAL_INDENT;
>   zend_hash_internal_pointer_reset_ex(ht, &iterator);
>   while (zend_hash_get_current_data_ex(ht, (void **)
> &tmp, &iterator) ==
> SUCCESS) {
>
>
> / HERE **/
>
>   key_type = zend_hash_get_current_key_ex(ht,
> &string_key, &str_len,
> &num_key, 0, &iterator);
>   if (key_type == HASH_KEY_IS_STRING)
>   if (string_key[0] == '_' &&
> string_key[1] == '_') continue;
>
>
> /*** HERE **/
>
>
>   for (i=0; i   ZEND_PUTS(" ");
>   }
>   ZEND_PUTS("[");
>   switch (key_type) {
>   case HASH_KEY_IS_STRING:
>   ZEND_PUTS(string_key);
>   break;
>   case HASH_KEY_IS_LONG:
>   zend_printf("%ld",num_key);
>   break;
>   }
>   ZEND_PUTS("] => ");
>   zend_print_zval_r(*tmp, indent+PRINT_ZVAL_INDENT);
>   ZEND_PUTS("\n");
>   zend_hash_move_forward_ex(ht, &iterator);
>   }
>   indent -= PRINT_ZVAL_INDENT;
>   for (i=0; i   ZEND_PUTS(" ");
>   }
>   ZEND_PUTS(")\n");
> }
>
>
> --
> PHP Development Mailing List 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail:
> [EMAIL PROTECTED]
> ---
>
> --
> PHP Development Mailing List 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail:
> [EMAIL PROTECTED]
>


-- 
PHP Development Mailing List 
To 

[PHP-DEV] Bug #12909 Updated: CGI sapi compilation fails

2001-09-25 Thread sniper

ID: 12909
Updated by: sniper
Reported By: [EMAIL PROTECTED]
Old Status: Critical
Status: Closed
Bug Type: Compile Failure
Operating System: RedHat Linux 6.2-7.1
PHP Version: 4.0CVS-2001-08-22
New Comment:

Fixed now.

--Jani


Previous Comments:


[2001-08-28 05:23:24] [EMAIL PROTECTED]

Forgot to mention: I can reproduce this too.





[2001-08-28 05:22:49] [EMAIL PROTECTED]

Marked as FIX before release (4.0.7 !!)




[2001-08-28 05:05:37] [EMAIL PROTECTED]

It seems that extensions as dso's and cgi sapi don't mix well in PHP 4.0.7 RC1.

I've tried to reduce the example to the smallest possible:

So this is what I do:

1. CVS checkout of PHP_4_0_7 branch
2. ./buildconf
3. ./configure \
--with-recode=shared \
--without-mysql \
--without-gd \
--without-xml \
4. make

I get the compilation error:

Making all in .
make[1]: Entering directory `/home/ek/compile/cvs-php'
gcc -I. -I/home/ek/compile/cvs-php/ -I/home/ek/compile/cvs-php/main 
-I/home/ek/compile/cvs-php -I/home/ek/compile/cvs-php/Zend  
-I/home/ek/compile/cvs-php/TSRM -g -O2  -c stub.c && touch stub.lo
/bin/sh /home/ek/compile/cvs-php/libtool --silent --mode=link gcc -I. 
-I/home/ek/compile/cvs-php/ -I/home/ek/compile/cvs-php/main -I/home/ek/compile/cvs-php 
-I/home/ek/compile/cvs-php/Zend  -I/home/ek/compile/cvs-php/TSRM -g -O2   -o 
libphp4.la -rpath /home/ek/compile/cvs-php/libsstub.lo  Zend/libZend.la 
sapi/cgi/libsapi.la main/libmain.la regex/libregex.la ext/pcre/libpcre.la 
ext/posix/libposix.la ext/session/libsession.la ext/standard/libstandard.la 
TSRM/libtsrm.la -lpam -ldl -lcrypt -lresolv -lm -ldl -lnsl -lresolv -lcrypt
stub.lo: file not recognized: File truncated
collect2: ld returned 1 exit status
make[1]: *** [libphp4.la] Error 1
make[1]: Leaving directory `/home/ek/compile/cvs-php'
make: *** [all-recursive] Error 1



[2001-08-22 15:56:08] [EMAIL PROTECTED]

./configure \
--prefix=/data/php \
--with-config-file-path=/data/php \
--disable-debug \
--enable-sigchild 
--disable-magic-quotes \
--disable-short-tags \
--enable-dba=shared \
--with-gdbm=shared,/usr \
--enable-ftp=shared \
--with-gd=shared,/usr \
--with-gettext=shared,/usr \
--with-mysql=shared,/usr/local/mysql \
--with-oci8=shared,/ora01/app/oracle/product/8.1.6 \
--with-pcre-regex=shared \
--with-pgsql=shared,/usr \
--with-recode=shared,/usr \
--enable-shmop \
--with-regex=system \
--enable-sysvsem \
--enable-sysvshm \
--disable-memory-limit \
--with-ldap=shared,/ora01/app/oracle/product/8.1.6/ \
--with-imap=shared,/data/src/imap \
--with-zlib=shared,/usr \
--enable-sockets=shared \
--with-apxs=/data/apache/bin/apxs



[2001-08-22 15:47:42] [EMAIL PROTECTED]

And your configure line was..?

--Jani




The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/?id=12909


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


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #13426 Updated: fread not work

2001-09-25 Thread sniper

ID: 13426
Updated by: sniper
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Feedback
Bug Type: Filesystem function related
Operating System: Windows 2000 Professional
PHP Version: 4.0.6
New Comment:

So what you're saying is that using fopen with 'rb' which is 
the only way to open files (on windows) in binary mode,
does not work? Is this the problem?

Because using 'r' only won't work with binary files, such
as .gif's.

--Jani




Previous Comments:


[2001-09-25 06:14:09] [EMAIL PROTECTED]

function encode_file($sourcefile) {
 if (is_readable($sourcefile)) {
$fd = fopen($sourcefile, "r");
$contents = fread($fd,filesize($sourcefile));
$encoded = chunk_split(base64_encode($contents));
fclose($fd);
 }
 return $encoded;
}

$source = $DOCUMENT_ROOT."/IMAGES/titolomail.gif";

encode_file($source);

fopen also don't work with "rb" option and system return a memory violation
error



[2001-09-25 04:54:16] [EMAIL PROTECTED]

function encode_file($sourcefile) {
 if (is_readable($sourcefile)) {
$fd = fopen($sourcefile, "r");
$contents .= fread($fd,filesize($sourcefile));
$encoded = chunk_split(base64_encode($contents));
fclose($fd);
 }
 return $encoded;
}

$source = $DOCUMENT_ROOT."/IMAGES/titolomail.gif";

encode_file($source);

fopen also don't work with "rb" option and system return a memory violation error





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


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] In C, how do I access an associative array?

2001-09-25 Thread mlwmohawk

> On Tue, Sep 25, 2001 at 09:00:18AM -0400, [EMAIL PROTECTED]
> wrote:
>> 
>> If I do this in PHP:
>> 
>> >  $array = array();
>> 
>>  $array["foo"] = "bar";
>>  $array["hey"] = "you";
>>  $array["pink"]="floyd";
>> 
>>  myext_function($array);
>> ?>
>> 
>> 
>> How do I find all the keys and values out of that array in my
>> extension?  Is there a way?
> 
> You can do something like:
> 
> if (zend_hash_find(Z_ARRVAL_PP(input), "pink", sizeof("pink"), (void
> **) &val) == SUCCESS) {
>   convert_to_string_ex(val);
>   ...
> }
> 
> to look for pink, if you just want to iterate through the keys you can
> do something like:
> 
> zend_hash_internal_pointer_reset_ex(Z_ARRVAL_PP(input), &pos);
> while(zend_hash_get_current_data_ex(Z_ARRVAL_PP(input), (void
> **)&entry, &pos) == SUCCESS) {
>   zend_hash_get_current_key_ex(Z_ARRVAL_PP(input), &string_key,
>   &string_key_len, &num_key, 0, &pos) ...
> }

Thanks, I did a quick search and didn't see anything intuitively obvious.
This helps a lot, again, thanks.


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #13424 Updated: imagecreatetruecolor() or imagecopyresampled()

2001-09-25 Thread sniper

ID: 13424
Updated by: sniper
Reported By: [EMAIL PROTECTED]
Status: Feedback
Bug Type: GD related
Operating System: mandrake 8
PHP Version: 4.0.6
New Comment:

Short example script would also be useful..


Previous Comments:


[2001-09-25 04:23:57] [EMAIL PROTECTED]

Can you post your configure line?



[2001-09-24 21:31:41] [EMAIL PROTECTED]

i use imagecreatetruecolor()  or imagecopyresampled() and i have an fatal error caused 
by undefined function but i use verison 2.0.1 of GD.. on my windows box this work well 
but in linux the same code don't work

answer quick.. thats urgent

thanks





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


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #13422 Updated: gethostbyname() returns hostname when ip address is part of hostname

2001-09-25 Thread sniper

ID: 13422
Updated by: sniper
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Bogus
Bug Type: Unknown/Other Function
Operating System: Linux 2.2 SMP
PHP Version: 4.0.4pl1
New Comment:

submitted twice.

Previous Comments:


[2001-09-24 18:04:23] [EMAIL PROTECTED]

When you pass a host name such as ip-255-255-255-255.reverse.mobilenetics.com to 
gethostbyname() it returns the hostname, not the ip address.

Regular hostnames like google.com work.





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


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #13415 Updated: Compile Time Error

2001-09-25 Thread sniper

ID: 13415
Updated by: sniper
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Closed
Bug Type: Compile Failure
Operating System: Linux 2.0.34
PHP Version: 4.0.6
New Comment:

This is fixed in CVS and in PHP 4.0.7RC2.

--Jani


Previous Comments:


[2001-09-24 12:32:31] [EMAIL PROTECTED]

I went into filestat.c and changed the function to this, I won't be able to use this 
function now, but everything compiled and ran smoothly...


PHP_FUNCTION(diskfreespace)
{
double bytesfree = 0;
RETURN_DOUBLE(bytesfree);
}



[2001-09-24 12:25:12] [EMAIL PROTECTED]

Slackware, not positive on the version #, but the kernel is 2.0.34



[2001-09-24 11:48:22] [EMAIL PROTECTED]


 i guess it's due to the rather old kernel?

 can you tell us what distribution (vendor and version)
 you are using?



[2001-09-24 11:41:39] [EMAIL PROTECTED]

Configuration Line - 
./configure --with-mysql --with-gd=/usr/local --enable-track-vars 
--with-apxs=/usr/local/apache
-1.3.20/bin/apxs

Apache Version - 1.3.20

Reported Error:
filestat.c: In function `php_if_diskfreespace':
filestat.c:157: storage size of `buf' isn't known
make[3]: *** [filestat.lo] Error 1





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


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] [RFC] Versioning rules for PHP/Zend/PEAR/Extensions

2001-09-25 Thread Andrei Zmievski

On Tue, 25 Sep 2001, Stig Sæther Bakken wrote:
> I think we should be flexible to make this practical, the core of the
> idea is that you should not get any surprises when upgrading just "b",
> and no API surprises when upgrading "m".
> 
> There's a question about whether the API should be defined as the
> source API, or also the runtime API, for extensions.  I think "the
> API" should cover both.

But then you will quickly get into double digits for the 'm' version.

> > We already have such versions, they are called strnatcmp() and
> > natsort().
> 
> Huh?  Does strnatcmp() know the that 2.0RC4 is newer than 2.0b2? :-)

Well, geez, you had to go and spoil it with one example. :)

-Andrei

"Tomorrow the sun will rise. And who knows what the tide will bring?"
- Tom Hanks, in "Cast Away"

--
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #13412 Updated: IMAP don't compile propertly

2001-09-25 Thread sniper

ID: 13412
Updated by: sniper
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Bogus
Bug Type: *General Issues
Operating System: FreeBSD 4.4-RC
PHP Version: 4.0.6
New Comment:

You're using unsupported shared compile of c-client.
use the static library and it will work. Not a bug.



Previous Comments:


[2001-09-24 05:22:44] [EMAIL PROTECTED]

I have :
c-client library
All headers are deployed in /usr/local/include/c-client directory.

My config-file for make is :
 QUOTE 
-
./configure \
--with-mod_charset \
--enable-track-vars \
--enable-sysvsem \
--enable-sysvshm \
--enable-shared \
--with-apache=/usr/local/src/apache \
--with-pgsql=/usr/local/pgsql \
--with-mysql=/usr/local \
--with-gd=/usr/local \
--with-jpeg-dir=/usr/local \
--without-ttf \
--without-ndbm \
--without-dbm \
--without-gdbm \
--with-imap \
--with-xml > /dev/null
 EDN OF QUOTE 
-


Then, when I'm trying to configure Apache, the process stops, as described below:
 QUOTE 
-
Configuring for Apache, Version 1.3.20
 + using installation path layout: Apache (config.layout)
 + activated php4 module (modules/php4/libphp4.a)
 + activated auth_pgsql module (modules/auth_pgsql/mod_auth_pgsql.c)
 + activated rru module (modules/extra/mod_rru.o)
 + activated auth_mysql module (modules/auth_mysql/libauth_mysql.a)
Creating Makefile
Creating Configuration.apaci in src
Creating Makefile in src
 + configured for FreeBSD 4.4 platform
 + setting C pre-processor to gcc -E
 + checking for system header files
 + adding selected modules
o charset_module uses ConfigStart/End
o php4_module uses ConfigStart/End
o auth_pgsql_module uses ConfigStart/End
o auth_mysql_module uses ConfigStart/End
 + checking sizeof various data types
 + doing sanity check on compiler and options
** A test compilation with your Makefile configuration
** failed.  The below error output from the compilation
** test will give you an idea what is failing. Note that
** Apache requires an ANSI C Compiler, such as gcc.

cd ..; gcc  -I/usr/local/include/mysql  -funsigned-char -DRUSSIAN_APACHE -I/usr/
local/src/php -I/usr/local/src/php/main -I/usr/local/src/php/main -I/usr/local/s
rc/php/Zend -I/usr/local/src/php/Zend -I/usr/local/src/php/TSRM -I/usr/local/src
/php/TSRM -I/usr/local/src/php -DUSE_EXPAT -I./lib/expat-lite -DNO_DL_NEEDED `./
apaci` -o helpers/dummy helpers/dummy.c   -L/usr/local/lib/mysql -lmysqlclie
nt -lcrypt   -L/usr/local/pgsql/lib -lpq  -R/usr/local/lib -R/usr/local/lib/mysq
l -R/usr/local/pgsql/lib  -rdynamic -L/usr/local/lib -L/usr/local/lib/mysql -L/u
sr/local/pgsql/lib -Lmodules/php4 -L../modules/php4 -L../../modules/php4 -lmodph
p4  -lpam -lc-client4  -lpq -lmysqlclient -lcrypt -lpam -lgd -ljpeg -lcrypt -lm
 -lcrypt   -lcrypt
/usr/local/lib/libc-client4.so: undefined reference to `mm_expunged'
/usr/local/lib/libc-client4.so: undefined reference to `mm_diskerror'
/usr/local/lib/libc-client4.so: undefined reference to `mm_lsub'
/usr/local/lib/libc-client4.so: undefined reference to `mm_flags'
/usr/local/lib/libc-client4.so: undefined reference to `mm_fatal'
/usr/local/lib/libc-client4.so: undefined reference to `mm_nocritical'
/usr/local/lib/libc-client4.so: undefined reference to `mm_notify'
/usr/local/lib/libc-client4.so: undefined reference to `mm_searched'
/usr/local/lib/libc-client4.so: undefined reference to `mm_status'
/usr/local/lib/libc-client4.so: undefined reference to `mm_login'
/usr/local/lib/libc-client4.so: undefined reference to `mm_list'
/usr/local/lib/libc-client4.so: undefined reference to `mm_critical'
/usr/local/lib/libc-client4.so: undefined reference to `mm_exists'
 EDN OF QUOTE 
-

Also, I've tried to compile IMAP with PHP 4.0.6 and with snaps version, with I have 
obtained from  http://snaps.php.net:8080/php4-200109240135.tar.gz
Unfortunately, the result was same...






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


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #13420 Updated: open_basedir breaks Apache SSI xbithack

2001-09-25 Thread wbrown

ID: 13420
User updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
Status: Open
Bug Type: Apache related
Operating System: Linux mainserver2 2.4.4
PHP Version: 4.0.6
New Comment:

This may be the reason that some of the developers were not able to reproduce a 
similar bug reported in Bug id #10575.

Previous Comments:


[2001-09-24 15:33:15] [EMAIL PROTECTED]

Linux version 2.4.4
Apache version 1.3.19
Php version 4.0.6

When xbithack is set to FULL in .htaccess, setting test.htm chmod to 754 allows the 
SSI calls in test.htm to perform as expected.

However, when open_basedir is specified in httpd.conf the xbithack directive is 
ignored and SSI calls in test.htm stop working.





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


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] In C, how do I access an associative array?

2001-09-25 Thread Stig Venaas

On Tue, Sep 25, 2001 at 09:00:18AM -0400, [EMAIL PROTECTED] wrote:
> 
> If I do this in PHP:
> 
>$array = array();
> 
>   $array["foo"] = "bar";
>   $array["hey"] = "you";
>   $array["pink"]="floyd";
> 
>   myext_function($array);
> ?>
> 
> 
> How do I find all the keys and values out of that array in my extension? 
> Is there a way?

You can do something like:

if (zend_hash_find(Z_ARRVAL_PP(input), "pink", sizeof("pink"), (void **) &val) == 
SUCCESS) {
convert_to_string_ex(val);
...
}

to look for pink, if you just want to iterate through the keys you can do
something like:

zend_hash_internal_pointer_reset_ex(Z_ARRVAL_PP(input), &pos);
while(zend_hash_get_current_data_ex(Z_ARRVAL_PP(input), (void **)&entry, &pos) == 
SUCCESS) {
zend_hash_get_current_key_ex(Z_ARRVAL_PP(input), &string_key, &string_key_len, 
&num_key, 0, &pos)
...
}

See docs or sources for details/examples

Stig


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP-DEV] In C, how do I access an associative array?

2001-09-25 Thread Andre Christ

Hi,

> How do I find all the keys and values out of that array in my extension? 
> Is there a way?

Have a look at the Zend API Documentation at http://www.zend.com/apidoc/ or
review implementations of other Extensions.

Greets,
Andre


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] In C, how do I access an associative array?

2001-09-25 Thread mlwmohawk


If I do this in PHP:




How do I find all the keys and values out of that array in my extension? 
Is there a way?




-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #13430: Passthru doesn't honor ob_immediate_flush

2001-09-25 Thread muell

From: [EMAIL PROTECTED]
Operating system: RedHat 7.1
PHP version:  4.0.4pl1
PHP Bug Type: Output Control
Bug description:  Passthru doesn't honor ob_immediate_flush

Given a perl script test.pl:

#!/usr/bin/perl
$| = 1;   # immediate flush
for ($i=0;$i<10;$i++) {
  print "*";
  sleep(2);
}
exit;

And a php script test.php:



Eventhough both scripts have buffering disabled, no progressive content
loading happens. PHP autoflushes the first echo-line, but passthru-output
is not flushed until the test.pl script has completed. 

There are situations where this behavior is no good. I have perl-scripts
doing jobs on our server. These perl-scripts are called from a webpage (aka
php-script). However, an inbetween firewall shuts down communication after
5 mins with no data transferred. In order to keep the connection alive, I
rewrote the perl-scripts such as to send a progress character to the
browser every 30 seconds. Not being autoflushed, they don't keep alive
anything :-)
  
-- 
Edit bug report at: http://bugs.php.net/?id=13430&edit=1


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #13429: Real reflection API

2001-09-25 Thread es96

From: [EMAIL PROTECTED]
Operating system: Any
PHP version:  4.0.6
PHP Bug Type: Feature/Change Request
Bug description:  Real reflection API

Real reflection API is badly, badly needed. Something as simple as
get_class_var_names, which would return an array with names of all class
variables, initialized or not, would be really helpful. The
get_class_methods can be extended to return not just the method name, but
the number of method variables as well. 

Java has it done right. 
-- 
Edit bug report at: http://bugs.php.net/?id=13429&edit=1


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #13427 Updated: Macintosh IE 5 doesn't appear to recognise session cookies

2001-09-25 Thread jmoore

ID: 13427
Updated by: jmoore
Reported By: [EMAIL PROTECTED]
Old Status: Feedback
Status: Closed
Bug Type: Session related
Operating System: Mac OS 9.1 (client) / Linux serv
PHP Version: 4.0.6
New Comment:

JK, Waiting for 4.0.8 is probably best bet.. Cant see any obvious change to the source 
code that would make it work in 4.0.8 and not 4.0.7 but then again I might be blind.. 

Closing

- James

Previous Comments:


[2001-09-25 07:57:42] [EMAIL PROTECTED]

Can you try 4.0.7RC2 from www.php.net/~zeev/php-4.0.7RC2.tar.gz?

Derick



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

it works in 4.0.8 cvs build... so i suppose this is a wait for next version? close if 
appopriate

thanks



[2001-09-25 06:19:56] [EMAIL PROTECTED]

Mac IE 5 doesn't appear to interpret session cookies .. server continually tries to 
send cookie headers. ordinary setcookie works fine. is this a browser bug or something 
overlooked?

Standard configure build is 
'./configure' '--with-iconv' '--with-apxs' '--with-mysql' '--enable-ftp'
our production environment is RedHat Linux 7 on intel.

Thanks


James 





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


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #13427 Updated: Macintosh IE 5 doesn't appear to recognise session cookies

2001-09-25 Thread derick

ID: 13427
Updated by: derick
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Feedback
Bug Type: Session related
Operating System: Mac OS 9.1 (client) / Linux serv
PHP Version: 4.0.6
New Comment:

Can you try 4.0.7RC2 from www.php.net/~zeev/php-4.0.7RC2.tar.gz?

Derick

Previous Comments:


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

it works in 4.0.8 cvs build... so i suppose this is a wait for next version? close if 
appopriate

thanks



[2001-09-25 06:19:56] [EMAIL PROTECTED]

Mac IE 5 doesn't appear to interpret session cookies .. server continually tries to 
send cookie headers. ordinary setcookie works fine. is this a browser bug or something 
overlooked?

Standard configure build is 
'./configure' '--with-iconv' '--with-apxs' '--with-mysql' '--enable-ftp'
our production environment is RedHat Linux 7 on intel.

Thanks


James 





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


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #13427 Updated: Macintosh IE 5 doesn't appear to recognise session cookies

2001-09-25 Thread jamesk

ID: 13427
User updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
Status: Open
Bug Type: Session related
Operating System: Mac OS 9.1 (client) / Linux serv
PHP Version: 4.0.6
New Comment:

it works in 4.0.8 cvs build... so i suppose this is a wait for next version? close if 
appopriate

thanks

Previous Comments:


[2001-09-25 06:19:56] [EMAIL PROTECTED]

Mac IE 5 doesn't appear to interpret session cookies .. server continually tries to 
send cookie headers. ordinary setcookie works fine. is this a browser bug or something 
overlooked?

Standard configure build is 
'./configure' '--with-iconv' '--with-apxs' '--with-mysql' '--enable-ftp'
our production environment is RedHat Linux 7 on intel.

Thanks


James 





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


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] Feature?

2001-09-25 Thread Hartmut Holzgraefe

Andy wrote:

>In the case when I've few parameters I've to remember their order, so why not
>$bar=foo('par2'=>10);
>I want to pass value to only one or more but not to all params.
>Also this will make the code clearer I think.
>
you can use arrays to mimic this behavior

  function foo($bar) {
 ...
 if(isset($bar['par2'])) 
 ...
  }

  foo(array('par2'=>10));




-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #13427: Macintosh IE 5 doesn't appear to recognise session cookies

2001-09-25 Thread jamesk

From: [EMAIL PROTECTED]
Operating system: Mac OS 9.1 (client) / Linux serv
PHP version:  4.0.6
PHP Bug Type: Session related
Bug description:  Macintosh IE 5 doesn't appear to recognise session cookies

Mac IE 5 doesn't appear to interpret session cookies .. server continually
tries to send cookie headers. ordinary setcookie works fine. is this a
browser bug or something overlooked?

Standard configure build is 
'./configure' '--with-iconv' '--with-apxs' '--with-mysql' '--enable-ftp'
our production environment is RedHat Linux 7 on intel.

Thanks


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


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #13426 Updated: fread not work

2001-09-25 Thread cquadalti

ID: 13426
User updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
Status: Open
Bug Type: Filesystem function related
Operating System: Windows 2000 Professional
PHP Version: 4.0.6
New Comment:

function encode_file($sourcefile) {
 if (is_readable($sourcefile)) {
$fd = fopen($sourcefile, "r");
$contents = fread($fd,filesize($sourcefile));
$encoded = chunk_split(base64_encode($contents));
fclose($fd);
 }
 return $encoded;
}

$source = $DOCUMENT_ROOT."/IMAGES/titolomail.gif";

encode_file($source);

fopen also don't work with "rb" option and system return a memory violation
error

Previous Comments:


[2001-09-25 04:54:16] [EMAIL PROTECTED]

function encode_file($sourcefile) {
 if (is_readable($sourcefile)) {
$fd = fopen($sourcefile, "r");
$contents .= fread($fd,filesize($sourcefile));
$encoded = chunk_split(base64_encode($contents));
fclose($fd);
 }
 return $encoded;
}

$source = $DOCUMENT_ROOT."/IMAGES/titolomail.gif";

encode_file($source);

fopen also don't work with "rb" option and system return a memory violation error





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


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Re: Warning in PHP_4_0_7 branch

2001-09-25 Thread Sebastian Bergmann

Sebastian Bergmann wrote:
> zend_llist.c
> D:\home\php\php4\Zend\zend_llist.c(214) : warning C4018: '<' :
> Conflict between signed and unsigned

  And another one:

math.c
D:\home\php\php4\ext\standard\math.c(736) : warning C4307: '+' : 
Ueberlauf einer ganzzahligen Konstanten

  Sascha: Could you please merge your rewrite of that function to the
  4_0_7 branch as it fixed this warning.

  Thanks,
Sebastian

-- 
  Sebastian Bergmann  Measure Traffic & Usability
  http://sebastian-bergmann.de/ http://phpOpenTracker.de/

  Did I help you? Consider a gift: http://wishlist.sebastian-bergmann.de/

-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] Feature?

2001-09-25 Thread James Moore

> I want to pass value to only one or more but not to all params. Also this
will make the code clearer I think.
> Comments are welcome!

This is somthing that has been discussed as a probable feature in PHP 5 but
for now you could pass an assoc. array to get round the problem.

- James


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Warning in PHP_4_0_7 branch

2001-09-25 Thread Sebastian Bergmann

zend_llist.c
D:\home\php\php4\Zend\zend_llist.c(214) : warning C4018: '<' : 
Conflict between signed and unsigned

-- 
  Sebastian Bergmann  Measure Traffic & Usability
  http://sebastian-bergmann.de/ http://phpOpenTracker.de/

  Did I help you? Consider a gift: http://wishlist.sebastian-bergmann.de/

-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Feature?

2001-09-25 Thread Andy

After some days spent in a hospital reading "Programming Perl" and "Oracle Web 
Applications" I found that a language construct
which appears in Perl and PL/SQL is not available in PHP.
As in most 3G languages function call is like that
$bar=foo($bar1,$bar2,$bar3,'bar4');

function foo($par1=1,$par2=2,$par3=3,$par4='foo_bar',...){
...
}
In the case when I've few parameters I've to remember their order, so why not
$bar=foo('par2'=>10);
I want to pass value to only one or more but not to all params. Also this will make 
the code clearer I think.
Comments are welcome!


 
Andrey Hristov



-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] Spam (was: [±¤°í]Ãß°¡Áö¿ø ÇϽǺР14¸í¸¸ ¸ðÁýÇÕ´Ï´Ù.)

2001-09-25 Thread derick

Hello,

are the spam filters offline or something? The number of spam is
increasing again

Derick


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Win32 build broken

2001-09-25 Thread Sebastian Bergmann

internal_functions_win32.c
D:\home\php\php4\main\internal_functions_win32.c(75) : error C2065: 
'VARIANT_module_ptr' : Undeclared identifier

-- 
  Sebastian Bergmann  Measure Traffic & Usability
  http://sebastian-bergmann.de/ http://phpOpenTracker.de/

  Did I help you? Consider a gift: http://wishlist.sebastian-bergmann.de/

-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] curl compiler failed

2001-09-25 Thread Holger Schopohl

> > and also nl2br() crashes and chunk_split($string,2,' '); doesnt work ...
> 
> nl2br() should be fixed can you make sure with the latest CVS, and
> make a backtrace of the crash?

okay, with the current cvs version, it works fine,
sorry

-- 
Holger

-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] [RFC] Versioning rules for PHP/Zend/PEAR/Extensions

2001-09-25 Thread Zeev Suraski

At 03:12 25-09-01, Jim Winstead wrote:
>and i do question, a little bit, how successful our new release
>strategy is when we only seem to be able to muster a new release every
>three months. but maybe that's a pace we're happy with. and of course,
>that has way more to do with a great many more issues than how we
>number the releases. :)

As a matter of fact, one of the most serious complaints I've been hearing 
from people is that we release way too often.  Among others, that makes 
ISPs mad at us, since it's a logistical nightmare to keep current.

Zeev


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] [±¤°í]Ãß°¡Áö¿ø ÇϽǺР14¸í¸¸ ¸ðÁýÇÕ´Ï´Ù.

2001-09-25 Thread À¥Á¤º¸³ª¶ó
Title: Untitled




 

 
 
  
   
  
   
   
   
¸ðÁý±â°£ : 9¿ù 3ÀÏ~9¿ù 
29ÀÏ
°³°­ : 10¿ù 5ÀÏ /
±³À°½Ã°£ : 9 : 00 ~ 18 : 
00 (¿ù~±Ý) "Ãѱ³À°±â°£ 640½Ã°£-4°³¿ù" 
Áö¿øÀÚ°Ý : °íÁ¹,´ëÁ¹ ¹ÌÃë¾÷ÀÚ(ÀçÇлý 
Áß Á¹¾÷¿¹Á¤ÀÚ Æ÷ÇÔ) ¶Ç´Â ½Ç¾÷ÀÚ¡ØÀÚ°ÝÁ¦ÇÑ : 2001³âµµ¿¡ ŸºÎó°¡ ¼öÇàÁßÀÎ IT °ü·Ã ±³À° ¼öÇýÀÚ´Â 
Á¦¿Ü 
±¸ºñ¼­·ù: ¾øÀ½(´Ü, ÀçÇлýÀÏ °æ¿ì 
Á¹¾÷¿¹Á¤Áõ¸í¼­)
¸éÁ¢ ºÒÂü½Ã ºÒÇÕ°Ý Ã³¸®µÇ¸ç Á¶±â¸¶°¨ µÉ ¼ö 
ÀÖ½À´Ï´Ù. 
1ÀÎ 1PC ±³À°, ÃÊ°í¼Ó ÀÎÅͳÝ(T1±Þ) ¼³Ä¡¿Ï·á 

   
   


 
  ±³À°°úÁ¤ (¼¼ºÎ°úÁ¤)
 
  ±³À°ºñ
 
  Á¤ºÎ Áö¿ø±Ý
 
  °³ÀÎ 
ºÎ´ã±Ý

 
  CIW 
  SiteDesigner
 
  300¸¸¿ø
 
  256¸¸¿ø
 
  44¸¸¿ø
   
   
   


 
  ±³À°°úÁ¤ (¼¼ºÎ°úÁ¤)
 
  ±³À°ºñ
 
  Á¤ºÎ Áö¿ø±Ý
 
  °³ÀÎ 
ºÎ´ã±Ý

 
  Master 
  CIWAdministrator
 
  350¸¸¿ø
 
  252¸¸¿ø
 
  98¸¸¿ø
    
   
   


 
   ±³°ú °ú¸ñ ¸ñÇ¥ 
  
   
   ÀÎÅÍ³Ý Áö½ÄÀÇ ÀϹÝÀûÀÎ ÇÙ½ÉÀ» ÀÌÇØÇÏ°í, ÇʼöÀûÀÎ ±âÃÊ ±â´ÉµéÀ» 
   Àû¿ëÇÑ´Ù.
   Á¦ÀÛ µµ±¸¿Í ½ºÅ©¸³Æà ¾ð¾î¸¦ ÀÌ¿ëÇØ ÇÏÀÌÆÛÅؽºÆ® ±â¹Ý À¥»çÀÌÆ® Á¦ÀÛ 
   ¹× °ü¸®ÇÑ´Ù. 
   À¥ ÄÁÅÙÃ÷¸¦ ¸¸µç´Ù. 
   À¥ °ü·Ã Åøµé°ú ¸ÖƼ¹Ìµð¾î ÅøµéÀ» ´Ù·é´Ù. 
   Àΰ£ ģȭÀûÀÎ µðÀÚÀÎ °³³äÀ» Àû¿ëÇÑ À¥»çÀÌÆ®¸¦ »ý¼ºÇÑ´Ù. 
   E-Commerce À¥ »çÀÌÆ®¸¦ µðÀÚÀÎ ¹× ±¸ÇöÇÑ´Ù. 
   °í°´ÀÇ ¿ä±¸¸¦ ÆľÇÇÏ°í, °í°´µéÀÇ »çÀÌÆ® ÀÌ¿ë ÆÐÅÏÀ» ¸ð´ÏÅÍ 
   ÇÑ´Ù. 
   ÁÖ¹®°úÁ¤ ó¸®¿Í ¾ÖÇÁÅÍ ¼­ºñ½ºÀÇ ¹æÇâÀ» °áÁ¤ÇÑ´Ù. 
   E-Business¸¦ ÅëÇÑ ÆǸŠÁß´ë ¹æ¾ÈÀ» ¸ð»öÇÑ´Ù. 
   
ON - LINE »ó´ã    
   


 
  
   

 
  
  
   

*À̸§ 
   

  
   
*¼ºº°
   
³² 
    
¿© 

  
   
*»ý³â
   
 ³â 
¼±ÅÃ12 
 345 
 678 
 91011 
 12 ¿ù ¼±ÅÃ12 
 345 
 678 
 91011 
 121314 
 151617 
 181920 
 212223 
 242526 
 272829 
 3031 ÀÏ   ¿¹: 2001³â 1¿ù 
1ÀÏ
  
   
*ÀüÈ­¹øÈ£
   
¼±ÅÃ02 
 031032033 
 041042043 
 051052053 
 054055061 
 062063064 -  
   
  
   
*FAX
   
¼±ÅÃ02 
 031032033 
 041042043 
 051052053 
 054055061 
 062063064 -  
   
  
   
*ÁÖ¼Ò
   

  
   
*ÈÞ´ëÆù
   
¼±ÅÃ011 
 016017018 
 019 -  

  
   
*E-mail
   

  
   
*ȸ»ç¸í
   
(Çб³¸í)
  
   
*¹®ÀÇ 
»çÇ×
   
 

   

    
  
 ¸ÞÀÏ ¼ö½ÅÀ» 
 °ÅºÎÇϽô ºÐµéÀº ¿©±â¸¦ Ŭ¸¯ÇÏ¿© 
 Áֽʽÿä.



 
 
  
   



-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



[PHP-DEV] [±¤°í]Ãß°¡Áö¿ø ÇϽǺР14¸í¸¸ ¸ðÁýÇÕ´Ï´Ù.

2001-09-25 Thread À¥Á¤º¸³ª¶ó
Title: Untitled




 

 
 
  
   
  
   
   
   
¸ðÁý±â°£ : 9¿ù 3ÀÏ~9¿ù 
29ÀÏ
°³°­ : 10¿ù 5ÀÏ /
±³À°½Ã°£ : 9 : 00 ~ 18 : 
00 (¿ù~±Ý) "Ãѱ³À°±â°£ 640½Ã°£-4°³¿ù" 
Áö¿øÀÚ°Ý : °íÁ¹,´ëÁ¹ ¹ÌÃë¾÷ÀÚ(ÀçÇлý 
Áß Á¹¾÷¿¹Á¤ÀÚ Æ÷ÇÔ) ¶Ç´Â ½Ç¾÷ÀÚ¡ØÀÚ°ÝÁ¦ÇÑ : 2001³âµµ¿¡ ŸºÎó°¡ ¼öÇàÁßÀÎ IT °ü·Ã ±³À° ¼öÇýÀÚ´Â 
Á¦¿Ü 
±¸ºñ¼­·ù: ¾øÀ½(´Ü, ÀçÇлýÀÏ °æ¿ì 
Á¹¾÷¿¹Á¤Áõ¸í¼­)
¸éÁ¢ ºÒÂü½Ã ºÒÇÕ°Ý Ã³¸®µÇ¸ç Á¶±â¸¶°¨ µÉ ¼ö 
ÀÖ½À´Ï´Ù. 
1ÀÎ 1PC ±³À°, ÃÊ°í¼Ó ÀÎÅͳÝ(T1±Þ) ¼³Ä¡¿Ï·á 

   
   


 
  ±³À°°úÁ¤ (¼¼ºÎ°úÁ¤)
 
  ±³À°ºñ
 
  Á¤ºÎ Áö¿ø±Ý
 
  °³ÀÎ 
ºÎ´ã±Ý

 
  CIW 
  SiteDesigner
 
  300¸¸¿ø
 
  256¸¸¿ø
 
  44¸¸¿ø
   
   
   


 
  ±³À°°úÁ¤ (¼¼ºÎ°úÁ¤)
 
  ±³À°ºñ
 
  Á¤ºÎ Áö¿ø±Ý
 
  °³ÀÎ 
ºÎ´ã±Ý

 
  Master 
  CIWAdministrator
 
  350¸¸¿ø
 
  252¸¸¿ø
 
  98¸¸¿ø
    
   
   


 
   ±³°ú °ú¸ñ ¸ñÇ¥ 
  
   
   ÀÎÅÍ³Ý Áö½ÄÀÇ ÀϹÝÀûÀÎ ÇÙ½ÉÀ» ÀÌÇØÇÏ°í, ÇʼöÀûÀÎ ±âÃÊ ±â´ÉµéÀ» 
   Àû¿ëÇÑ´Ù.
   Á¦ÀÛ µµ±¸¿Í ½ºÅ©¸³Æà ¾ð¾î¸¦ ÀÌ¿ëÇØ ÇÏÀÌÆÛÅؽºÆ® ±â¹Ý À¥»çÀÌÆ® Á¦ÀÛ 
   ¹× °ü¸®ÇÑ´Ù. 
   À¥ ÄÁÅÙÃ÷¸¦ ¸¸µç´Ù. 
   À¥ °ü·Ã Åøµé°ú ¸ÖƼ¹Ìµð¾î ÅøµéÀ» ´Ù·é´Ù. 
   Àΰ£ ģȭÀûÀÎ µðÀÚÀÎ °³³äÀ» Àû¿ëÇÑ À¥»çÀÌÆ®¸¦ »ý¼ºÇÑ´Ù. 
   E-Commerce À¥ »çÀÌÆ®¸¦ µðÀÚÀÎ ¹× ±¸ÇöÇÑ´Ù. 
   °í°´ÀÇ ¿ä±¸¸¦ ÆľÇÇÏ°í, °í°´µéÀÇ »çÀÌÆ® ÀÌ¿ë ÆÐÅÏÀ» ¸ð´ÏÅÍ 
   ÇÑ´Ù. 
   ÁÖ¹®°úÁ¤ ó¸®¿Í ¾ÖÇÁÅÍ ¼­ºñ½ºÀÇ ¹æÇâÀ» °áÁ¤ÇÑ´Ù. 
   E-Business¸¦ ÅëÇÑ ÆǸŠÁß´ë ¹æ¾ÈÀ» ¸ð»öÇÑ´Ù. 
   
ON - LINE »ó´ã    
   


 
  
   

 
  
  
   

*À̸§ 
   

  
   
*¼ºº°
   
³² 
    
¿© 

  
   
*»ý³â
   
 ³â 
¼±ÅÃ12 
 345 
 678 
 91011 
 12 ¿ù ¼±ÅÃ12 
 345 
 678 
 91011 
 121314 
 151617 
 181920 
 212223 
 242526 
 272829 
 3031 ÀÏ   ¿¹: 2001³â 1¿ù 
1ÀÏ
  
   
*ÀüÈ­¹øÈ£
   
¼±ÅÃ02 
 031032033 
 041042043 
 051052053 
 054055061 
 062063064 -  
   
  
   
*FAX
   
¼±ÅÃ02 
 031032033 
 041042043 
 051052053 
 054055061 
 062063064 -  
   
  
   
*ÁÖ¼Ò
   

  
   
*ÈÞ´ëÆù
   
¼±ÅÃ011 
 016017018 
 019 -  

  
   
*E-mail
   

  
   
*ȸ»ç¸í
   
(Çб³¸í)
  
   
*¹®ÀÇ 
»çÇ×
   
 

   

    
  
 ¸ÞÀÏ ¼ö½ÅÀ» 
 °ÅºÎÇϽô ºÐµéÀº ¿©±â¸¦ Ŭ¸¯ÇÏ¿© 
 Áֽʽÿä.



 
 
  
   



-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



[PHP-DEV] Re: Bug #13424: imagecreatetruecolor() or imagecopyresampled()

2001-09-25 Thread Daniel Andersson

you forgot to compile --with-gd ?

/ d

<[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> From: [EMAIL PROTECTED]
> Operating system: mandrake 8
> PHP version:  4.0.6
> PHP Bug Type: PHP options/info functions
> Bug description:  imagecreatetruecolor()  or imagecopyresampled()
>
> i use imagecreatetruecolor()  or imagecopyresampled() and i have an fatal
> error caused by undefined function but i use verison 2.0.1 of GD.. on my
> windows box this work well but in linux the same code don't work
>
> answer quick.. thats urgent
>
> thanks
> --
> Edit bug report at: http://bugs.php.net/?id=13424&edit=1
>



-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #13426: fread not work

2001-09-25 Thread cquadalti

From: [EMAIL PROTECTED]
Operating system: Windows 2000 Professional
PHP version:  4.0.6
PHP Bug Type: Filesystem function related
Bug description:  fread not work

function encode_file($sourcefile) {
 if (is_readable($sourcefile)) {
$fd = fopen($sourcefile, "r");
$contents .= fread($fd,filesize($sourcefile));
$encoded = chunk_split(base64_encode($contents));
fclose($fd);
 }
 return $encoded;
}

$source = $DOCUMENT_ROOT."/IMAGES/titolomail.gif";

encode_file($source);

fopen also don't work with "rb" option and system return a memory violation
error
-- 
Edit bug report at: http://bugs.php.net/?id=13426&edit=1


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #13424 Updated: imagecreatetruecolor() or imagecopyresampled()

2001-09-25 Thread sander

ID: 13424
Updated by: sander
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Feedback
Bug Type: PHP options/info functions
Operating System: mandrake 8
PHP Version: 4.0.6
New Comment:

Can you post your configure line?

Previous Comments:


[2001-09-24 21:31:41] [EMAIL PROTECTED]

i use imagecreatetruecolor()  or imagecopyresampled() and i have an fatal error caused 
by undefined function but i use verison 2.0.1 of GD.. on my windows box this work well 
but in linux the same code don't work

answer quick.. thats urgent

thanks





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


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] curl compiler failed

2001-09-25 Thread Sterling Hughes

On Tue, 25 Sep 2001, Stanislav Malyshev wrote:

> SH>> I'd expect it to work with all php's above 4.0.8, the only problem
> SH>> is that if you link PHP 4.0.8 with an older version of CURL this
> SH>> will cause PHP compilation errors that maybe unforseen, therefore,
> SH>> to right it truly portable, you need two version checks for each new
> SH>> piece of code.
> SH>>
> SH>> if (phpversion == 4.0.8 && curl_version == 7.9) {
> SH>> curl_setopt($ch, CURLOPT_SSL_VERIFYRESULT, 1);
> SH>> }
>
> No, I need just:
>   if ($curl_version >= 7.9) {
>   curl_setopt($ch, CURLOPT_SSL_VERIFYRESULT, 1);
>   }
>
> And this is way better for one simple reason - it's easy to know which
> version of cURL CURLOPT_SSL_VERIFYRESULT appeared in. It's pretty hard to
> know which version of PHP is required for that, unless you are familiar
> with CVSweb and stuff (or depend on ChangeLog and people really
> documenting changes in their commit messages - which is not the case,
> unfortunately).
> This is also way better for logical reasons - you don't really need PHP
> 4.0.8 here, you need recent cURL, right? You couldn't care less for PHP
> version one it supports what you want. Also, imagine this is a stand-alone
> extension - oops. You need to check version anyway, since it is not linked
> to any specific PHP release. Won't it be logical to just check what you
> want to know instead of trying to shave with an axe?
>
no, you need PHP 4.0.8 or greater, if your isp is running curl 7.9
with PHP 4.0.7 it won't work.  I don't imagine cURL becoming
external (and if it did, it would have an extension_version()
function to check that).  I don't see this as shaving with an axe...
Its simple to wget a new cURL version and install it, and this
assures that your php users don't have to do a version check of the
underlying cURL library as well, if you use the latest php its
guaranteed to support all the latest cURL features out of the box.
I found that this was a problem that cURL-PHP users had (judging
from personal mails), which is now solved, requiring from users
something that is explicit, upgrade, or die :)

Think about it from a php coder's perspective, if you're coding and
you get a constant un-defined error, you know its in PHP X (no,
we're not becoming an Apple product ;), and you check, ok, i have
PHP X, would it be at all logical to check the cURL version?  not
really, I'd assume that since PHP compiled with my cURL that all
constants are available... only digging through the source will
reveal that some constants are #ifdef'd out.

-Sterling


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] curl compiler failed

2001-09-25 Thread Stanislav Malyshev

SH>> I'd expect it to work with all php's above 4.0.8, the only problem
SH>> is that if you link PHP 4.0.8 with an older version of CURL this
SH>> will cause PHP compilation errors that maybe unforseen, therefore,
SH>> to right it truly portable, you need two version checks for each new
SH>> piece of code.
SH>>
SH>> if (phpversion == 4.0.8 && curl_version == 7.9) {
SH>> curl_setopt($ch, CURLOPT_SSL_VERIFYRESULT, 1);
SH>> }

No, I need just:
if ($curl_version >= 7.9) {
curl_setopt($ch, CURLOPT_SSL_VERIFYRESULT, 1);
}

And this is way better for one simple reason - it's easy to know which
version of cURL CURLOPT_SSL_VERIFYRESULT appeared in. It's pretty hard to
know which version of PHP is required for that, unless you are familiar
with CVSweb and stuff (or depend on ChangeLog and people really
documenting changes in their commit messages - which is not the case,
unfortunately).
This is also way better for logical reasons - you don't really need PHP
4.0.8 here, you need recent cURL, right? You couldn't care less for PHP
version one it supports what you want. Also, imagine this is a stand-alone
extension - oops. You need to check version anyway, since it is not linked
to any specific PHP release. Won't it be logical to just check what you
want to know instead of trying to shave with an axe?
-- 
Stanislav Malyshev, Zend Products Engineer
[EMAIL PROTECTED]  http://www.zend.com/ +972-3-6139665 ext.115



-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]