Re: [PHP-DEV] New Build System Committed to HEAD

2002-03-22 Thread Derick Rethans

On Thu, 7 Mar 2002, Sascha Schumann wrote:

 Because I cannot test/build every extension under the earth,
 problems with untested extensions might crop up.  If it does,
 please notify me and I'll check it out.

For some reason ncurses ends up twice in internal_functions_cli.c; I 
can't figure out why though:

phpext_overload_ptr,
phpext_ncurses_ptr,
phpext_ncurses_ptr,
phpext_mysql_ptr,


Derick

-
PHP: Scripting the Web - www.php.net - [EMAIL PROTECTED]
All your branches are belong to me!
   SRM: Script Running Machine - www.vl-srm.net
-


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] configure broken: Iconv detection still not right...

2002-03-22 Thread Derick Rethans

Hello,

Iconv is *still* broken for me. Without --with-iconv I get the message 
that XMLRPC needs iconv which could not be found.

Derick

On Wed, 20 Mar 2002, Wez Furlong wrote:

 Hey guys,
 
 There's something screwy with the iconv detection/config that's
 mangling configure - it's generating code like this:
 
 Line 28183 or so of configure:
 
  case $iconv_lib_name in
 c|c_r|pthread*
fi
 ;;
 *)
 
LIBS=-l$iconv_lib_name $LIBS
 
 ;;
 esac
 
 The fi looks totally bogus to me, and it looks like there is
 a missing ) after pthread* 
 
 --Wez.
 
 
 
 
 
 -- 
 PHP Development Mailing List http://www.php.net/
 To unsubscribe, visit: http://www.php.net/unsub.php
 

Derick Rethans

-
PHP: Scripting the Web - www.php.net - [EMAIL PROTECTED]
All your branches are belong to me!
   SRM: Script Running Machine - www.vl-srm.net
-


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DEV] Warnings in mbstring

2002-03-22 Thread Derick Rethans

Hello,

can somebody have a look at this?

/var/system/src/php4/ext/mbstring/mbregex.c:1570: warning:
suggest parentheses around arithmetic in operand of |

/var/system/src/php4/ext/mbstring/mbregex.c:1596: warning:
suggest parentheses around  within ||

/var/system/src/php4/ext/mbstring/mbregex.c:1665: warning:
suggest parentheses around arithmetic in operand of |



Derick



-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] [PATCH] sprintf() argnum

2002-03-22 Thread derick

Hello,

I committed this patch to CVS.

Derick

On 21 Mar 2002, Morten Poulsen wrote:

 Hi,
 
 I discovered a bug in sprintf()'s argument swapping code. It accepts an
 argument number of zero, which is invalid. It is handled in different
 ways in different libcs, but i figured the best way to handle it in PHP
 was to make the functioncall fail. Patch is attached.
 
 Best regards,
 Morten
 
 PS. Thanks to mbn for whining :-)
 
 -- 
 Morten Poulsen [EMAIL PROTECTED]
 http://www.afdelingp.dk/
 

---
  PHP: Scripting the Web - [EMAIL PROTECTED]
All your branches are belong to me!
SRM: Script Running Machine - www.vl-srm.net
---


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] configure broken: Iconv detection still not right...

2002-03-22 Thread Rasmus Lerdorf

Same goes for xslt.  Adding --with-iconv fixes it

On Fri, 22 Mar 2002, Derick Rethans wrote:

 Hello,

 Iconv is *still* broken for me. Without --with-iconv I get the message
 that XMLRPC needs iconv which could not be found.

 Derick

 On Wed, 20 Mar 2002, Wez Furlong wrote:

  Hey guys,
 
  There's something screwy with the iconv detection/config that's
  mangling configure - it's generating code like this:
 
  Line 28183 or so of configure:
 
   case $iconv_lib_name in
  c|c_r|pthread*
 fi
  ;;
  *)
 
 LIBS=-l$iconv_lib_name $LIBS
 
  ;;
  esac
 
  The fi looks totally bogus to me, and it looks like there is
  a missing ) after pthread*
 
  --Wez.
 
 
 
 
 
  --
  PHP Development Mailing List http://www.php.net/
  To unsubscribe, visit: http://www.php.net/unsub.php
 

 Derick Rethans

 -
 PHP: Scripting the Web - www.php.net - [EMAIL PROTECTED]
 All your branches are belong to me!
SRM: Script Running Machine - www.vl-srm.net
 -


 --
 PHP Development Mailing List http://www.php.net/
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] AUTOLOAD in PHP

2002-03-22 Thread Hartmut Holzgraefe

S.Murali Krishna wrote:
 Hi,
   As I told in my Previous Post that I have added a feauture in PHP
 which is similar to AUTOLOAD feauture in Perl Modules. 
   
   I had sent a unified diff output along with this.
 
   According to that if a user tried to call a undefined function,
 PHP Zend Engine would search for a function named '__autoload' in current
 scope, if it finds one, it would set the global variable 
 
 $php_undef_func_name  
 
 with name of the called function and call the __autoload()  function with
 passed arguments.
 
   Its working fine for me. If it seems to be good, we could discuss
 on this. 

please have a look at the callback mechanism for unserialize()
( http://php.net/unserialize ) and try to follow the scheme already
implemented for including files for undefined classes on demand



-- 
Hartmut Holzgraefe  [EMAIL PROTECTED]  http://www.six.de  +49-711-99091-77


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] New Build System Committed to HEAD

2002-03-22 Thread Boian Bonev

 For some reason ncurses ends up twice in internal_functions_cli.c; I 
 can't figure out why though:
 
 phpext_overload_ptr,
 phpext_ncurses_ptr,
 phpext_ncurses_ptr,
 phpext_mysql_ptr,

xmm. i couldn't verify this... (updated before 10-20 minutes)

phpext_overload_ptr,
phpext_ncurses_ptr,
phpext_mysql_ptr,

 
 Derick

b.


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP-DEV] Warnings in mbstring (fwd)

2002-03-22 Thread derick

At 10:09 22.03.2002, you wrote:
Hello,

can somebody have a look at this?

/var/system/src/php4/ext/mbstring/mbregex.c:1570: warning:
suggest parentheses around arithmetic in operand of |

/var/system/src/php4/ext/mbstring/mbregex.c:1596: warning:
suggest parentheses around  within ||

/var/system/src/php4/ext/mbstring/mbregex.c:1665: warning:
suggest parentheses around arithmetic in operand of |



Derick

try attached patch. for me mbstring does not work - all tests fail but
i should be correct.

marcus

diff -u -w -r1.2 mbregex.c
--- ext/mbstring/mbregex.c  14 Jan 2002 03:08:40 -  1.2
+++ ext/mbstring/mbregex.c  22 Mar 2002 10:30:40 -
 -562,7 +562,7 
int n = mbclen(c) - 1;   \
c = (1(MBRE_BYTEWIDTH-2-n)) - 
1;  \
while (n--) {\
-   c = c  6 | *p++  ((16)-1); \
+   c = (c  6) | ((*p++)  
((16)-1));   \
} 
\
  }  \
  else { \
 -1592,8 +1592,8 
   case 'W':
 for (c = 0; c  (1  MBRE_BYTEWIDTH); c++) {
   if (SYNTAX(c) != Sword 
- (current_mbctype  !re_mbctab[c] ||
- !current_mbctype  SYNTAX(c) != Sword2))
+ ((current_mbctype  !re_mbctab[c]) ||
+  (!current_mbctype  (SYNTAX(c) != Sword2
 SET_LIST_BIT(c);
 }
 had_char_class = 1;




--
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] Warnings in mbstring

2002-03-22 Thread Derick Rethans

Hi,

Warnings are gone now... but can't see if it still works :)

Derick


On Fri, 22 Mar 2002, Marcus Börger wrote:

 At 10:09 22.03.2002, you wrote:
 Hello,
 
 can somebody have a look at this?
 
 /var/system/src/php4/ext/mbstring/mbregex.c:1570: warning:
 suggest parentheses around arithmetic in operand of |
 
 /var/system/src/php4/ext/mbstring/mbregex.c:1596: warning:
 suggest parentheses around  within ||
 
 /var/system/src/php4/ext/mbstring/mbregex.c:1665: warning:
 suggest parentheses around arithmetic in operand of |
 
 
 
 Derick
 
 try attached patch. for me mbstring does not work - all tests fail but
 i should be correct.
 
 marcus
 
 diff -u -w -r1.2 mbregex.c
 --- ext/mbstring/mbregex.c  14 Jan 2002 03:08:40 -  1.2
 +++ ext/mbstring/mbregex.c  22 Mar 2002 10:30:40 -
 @@ -562,7 +562,7 @@
 int n = mbclen(c) - 1;   \
 c = (1(MBRE_BYTEWIDTH-2-n)) - 
 1;  \
 while (n--) {\
 -   c = c  6 | *p++  ((16)-1); \
 +   c = (c  6) | ((*p++)  
 ((16)-1));   \
 } 
 \
   }  \
   else { \
 @@ -1592,8 +1592,8 @@
case 'W':
  for (c = 0; c  (1  MBRE_BYTEWIDTH); c++) {
if (SYNTAX(c) != Sword 
 - (current_mbctype  !re_mbctab[c] ||
 - !current_mbctype  SYNTAX(c) != Sword2))
 + ((current_mbctype  !re_mbctab[c]) ||
 +  (!current_mbctype  (SYNTAX(c) != Sword2
  SET_LIST_BIT(c);
  }
  had_char_class = 1;
 
 
 
 
 --
 PHP Development Mailing List http://www.php.net/
 To unsubscribe, visit: http://www.php.net/unsub.php
 

Derick Rethans

-
PHP: Scripting the Web - www.php.net - [EMAIL PROTECTED]
All your branches are belong to me!
   SRM: Script Running Machine - www.vl-srm.net
-


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] New Build System Committed to HEAD

2002-03-22 Thread Sander Roobol

On 2002.03.22 09:22 Derick Rethans wrote:
 On Thu, 7 Mar 2002, Sascha Schumann wrote:
 
  Because I cannot test/build every extension under the earth,
  problems with untested extensions might crop up.  If it does,
  please notify me and I'll check it out.
 
 For some reason ncurses ends up twice in internal_functions_cli.c; I
 can't figure out why though:
 
 phpext_overload_ptr,
 phpext_ncurses_ptr,
 phpext_ncurses_ptr,
 phpext_mysql_ptr,
 

Does the same for me, but for the readline extension too:
phpext_session_ptr,
phpext_readline_ptr,
phpext_readline_ptr,
phpext_pspell_ptr,
(...)
phpext_openssl_ptr,
phpext_ncurses_ptr,
phpext_ncurses_ptr,
phpext_mysql_ptr,

Sander

-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] New Build System Committed to HEAD

2002-03-22 Thread derick

On Fri, 22 Mar 2002, Sander Roobol wrote:

 Does the same for me, but for the readline extension too:
   phpext_session_ptr,
   phpext_readline_ptr,
   phpext_readline_ptr,
   phpext_pspell_ptr,
 (...)
   phpext_openssl_ptr,
   phpext_ncurses_ptr,
   phpext_ncurses_ptr,
   phpext_mysql_ptr,

It should be fixed in CVS now,

Derick

---
  PHP: Scripting the Web - [EMAIL PROTECTED]
All your branches are belong to me!
SRM: Script Running Machine - www.vl-srm.net
---


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] configure broken: Iconv detection still not right...

2002-03-22 Thread Jani Taskinen


This should be fixed now. 

--Jani

On Fri, 22 Mar 2002, Rasmus Lerdorf wrote:

Same goes for xslt.  Adding --with-iconv fixes it

On Fri, 22 Mar 2002, Derick Rethans wrote:

 Hello,

 Iconv is *still* broken for me. Without --with-iconv I get the message
 that XMLRPC needs iconv which could not be found.

 Derick

 On Wed, 20 Mar 2002, Wez Furlong wrote:

  Hey guys,
 
  There's something screwy with the iconv detection/config that's
  mangling configure - it's generating code like this:
 
  Line 28183 or so of configure:
 
   case $iconv_lib_name in
  c|c_r|pthread*
 fi
  ;;
  *)
 
 LIBS=-l$iconv_lib_name $LIBS
 
  ;;
  esac
 
  The fi looks totally bogus to me, and it looks like there is
  a missing ) after pthread*
 
  --Wez.
 
 
 
 
 
  --
  PHP Development Mailing List http://www.php.net/
  To unsubscribe, visit: http://www.php.net/unsub.php
 

 Derick Rethans

 -
 PHP: Scripting the Web - www.php.net - [EMAIL PROTECTED]
 All your branches are belong to me!
SRM: Script Running Machine - www.vl-srm.net
 -


 --
 PHP Development Mailing List http://www.php.net/
 To unsubscribe, visit: http://www.php.net/unsub.php





-- 


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DEV] RFC: CLI -x

2002-03-22 Thread Marcus Boerger

I added new -x switch to CLI version which enables execution of
files without having scripting tags.
Suppose we have a file called /usr/bin/phpx:
/usr/bin/php -x $1
EOF
Suppose we have a file called hello.phpc
#!/usr/bin/phpx
echo Hello ;echoWorld!\n;
EOF
Suppose we have a file called hello2.phpc
#!/usr/bin/php -x
$a = Hello ;
$b = World!;
echo $a $b\n;
EOF
With this you can do:
[marcus@marvin tmp]$ ./hello.phpc
Hello
World!\n
[marcus@marvin tmp]$ phpx hello.phpc
Hello World!
[marcus@marvin tmp]$ ./hello2.phpc
Hello World!
[marcus@marvin tmp]$
About the implementation: I had very big problems with a nicer
implementation. When using buffered copy operation using
fread/fwrite
i cannot copy any bytes ?!? (don't know why). When using streams
every thing works fine but it i get segfault on
php_request_shutdown().
It seems that the shutdown process closes the filepointer to the
script
and then frees the stream and segfaults because of php_stream_free 
working with an illegal file pointer.
Any comments?
marcus

-
mailto:[EMAIL PROTECTED]

 I don't want to start any blashphemous rumours
 but i think that god's got a sick sense of humor
 and when i die i expect to find him laughing.
 Depeche Mode
--- http://www.marcus-boerger.de ---



[PHP-DEV] [PATCH][NEW FEATURE] read_uploaded_file()

2002-03-22 Thread Andrew Sitnikov

Hello php-dev,

  I created function `read_uploaded_file()`, i think it is useful at
  to work with uploaded file in safe_mode and open_basedir, because if
  i need only file content and safe_mode=on or open_basedir is set, i
  can not read file, i must move it, read and delete then.  

Best regards,
 Andrew Sitnikov 
 e-mail : [EMAIL PROTECTED]
 GSM: (+372) 56491109


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DEV] [PATCH][NEW FEATURE] read_uploaded_file()

2002-03-22 Thread Andrew Sitnikov

Hello php-dev,

  I created function `read_uploaded_file()`, i think it is useful at
  to work with uploaded file in safe_mode and open_basedir, because if
  i need only file content and safe_mode=on or open_basedir is set, i
  can not read file, i must move it, read and delete then.

  See in attach
  
Best regards,
 Andrew Sitnikov 
 e-mail : [EMAIL PROTECTED]
 GSM: (+372) 56491109


read_uploaded_file.diff
Description: Binary data

-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP-DEV] PHP Newbie Classes / XML Question

2002-03-22 Thread arti

I am very new to PHP and have what is probably a dumb question.  I am
attempting to parse an XML document with a Class.

But, you have to use  xml_set_element_handler for this to work and that
means you have to pass it the names of your element handlers.  How do I do
this in a class???

For example, this does not work:

 xml_set_element_handler($parser, this-startElementHandler,
this-endElementHandler);

as I get this error:

Warning: Unable to call handler this-startElementHandler() in
C:\Inetpub\wwwroot\PHP\stdqclass.php on line 31


If I remove the this- I get the exact same error only without the
this-.


I want the class to handle the XML totally on its own, but I am cannot
figure out how to pass the xml_set_element_handler function a reference to
my event handlers.  Can this be done from within a class and if so, how do I
pass my event handlers?

Thanks,

-- Brian



-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] PHP Newbie Classes / XML Question

2002-03-22 Thread Markus Fischer

the syntax for passing methods of static classes or objects
is

array('class', 'methdod'); // static

or

array($object, 'method'); // without and

array($object, 'method')) // by reference

- Markus

On Fri, Mar 22, 2002 at 04:19:42PM -0500, arti wrote : 
 I am very new to PHP and have what is probably a dumb question.  I am
 attempting to parse an XML document with a Class.
 
 But, you have to use  xml_set_element_handler for this to work and that
 means you have to pass it the names of your element handlers.  How do I do
 this in a class???
 
 For example, this does not work:
 
  xml_set_element_handler($parser, this-startElementHandler,
 this-endElementHandler);
 
 as I get this error:
 
 Warning: Unable to call handler this-startElementHandler() in
 C:\Inetpub\wwwroot\PHP\stdqclass.php on line 31
 
 
 If I remove the this- I get the exact same error only without the
 this-.
 
 
 I want the class to handle the XML totally on its own, but I am cannot
 figure out how to pass the xml_set_element_handler function a reference to
 my event handlers.  Can this be done from within a class and if so, how do I
 pass my event handlers?
 
 Thanks,
 
 -- Brian
 
 
 
 -- 
 PHP Development Mailing List http://www.php.net/
 To unsubscribe, visit: http://www.php.net/unsub.php

-- 
Please always Cc to me when replying to me on the lists.
GnuPG Key: http://guru.josefine.at/~mfischer/C2272BD0.asc

-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] PHP Newbie Classes / XML Question

2002-03-22 Thread arti

So, as I understand this, I should do it like this???


class stdxml
{

function stdxml($xmlfilename)
{

$parser=xml_parser_create();

xml_set_element_handler($parser, array(stdxml,startElementHandler),
array(stdxml,endElementHandler);


This yields the wonderfully helpful error:

Parse error: parse error in C:\Inetpub\wwwroot\PHP\stdqclass.php on line
20


I believe I am following the first syntax you listed:  array('class',
'methdod'); // static




Markus Fischer [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 the syntax for passing methods of static classes or objects
 is

 array('class', 'methdod'); // static

 or

 array($object, 'method'); // without and

 array($object, 'method')) // by reference

 - Markus

 On Fri, Mar 22, 2002 at 04:19:42PM -0500, arti wrote :
  I am very new to PHP and have what is probably a dumb question.  I am
  attempting to parse an XML document with a Class.
 
  But, you have to use  xml_set_element_handler for this to work and
that
  means you have to pass it the names of your element handlers.  How do I
do
  this in a class???
 
  For example, this does not work:
 
   xml_set_element_handler($parser, this-startElementHandler,
  this-endElementHandler);
 
  as I get this error:
 
  Warning: Unable to call handler this-startElementHandler() in
  C:\Inetpub\wwwroot\PHP\stdqclass.php on line 31
 
 
  If I remove the this- I get the exact same error only without the
  this-.
 
 
  I want the class to handle the XML totally on its own, but I am cannot
  figure out how to pass the xml_set_element_handler function a reference
to
  my event handlers.  Can this be done from within a class and if so, how
do I
  pass my event handlers?
 
  Thanks,
 
  -- Brian
 
 
 
  --
  PHP Development Mailing List http://www.php.net/
  To unsubscribe, visit: http://www.php.net/unsub.php

 --
 Please always Cc to me when replying to me on the lists.
 GnuPG Key: http://guru.josefine.at/~mfischer/C2272BD0.asc



-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] PHP Newbie Classes / XML Question

2002-03-22 Thread Andrew Lindeman

looks like you're missing a parenthesis at the end of the xml_set line..

--Andrew

On Friday 22 March 2002 03:38 pm, arti wrote:
 So, as I understand this, I should do it like this???


 class stdxml
 {

 function stdxml($xmlfilename)
 {

 $parser=xml_parser_create();

 xml_set_element_handler($parser, array(stdxml,startElementHandler),
 array(stdxml,endElementHandler);


 This yields the wonderfully helpful error:

 Parse error: parse error in C:\Inetpub\wwwroot\PHP\stdqclass.php on
 line 20


 I believe I am following the first syntax you listed:  array('class',
 'methdod'); // static




 Markus Fischer [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...

  the syntax for passing methods of static classes or objects
  is
 
  array('class', 'methdod'); // static
 
  or
 
  array($object, 'method'); // without and
 
  array($object, 'method')) // by reference
 
  - Markus
 
  On Fri, Mar 22, 2002 at 04:19:42PM -0500, arti wrote :
   I am very new to PHP and have what is probably a dumb question.  I am
   attempting to parse an XML document with a Class.
  
   But, you have to use  xml_set_element_handler for this to work and

 that

   means you have to pass it the names of your element handlers.  How do I

 do

   this in a class???
  
   For example, this does not work:
  
xml_set_element_handler($parser, this-startElementHandler,
   this-endElementHandler);
  
   as I get this error:
  
   Warning: Unable to call handler this-startElementHandler() in
   C:\Inetpub\wwwroot\PHP\stdqclass.php on line 31
  
  
   If I remove the this- I get the exact same error only without the
   this-.
  
  
   I want the class to handle the XML totally on its own, but I am cannot
   figure out how to pass the xml_set_element_handler function a reference

 to

   my event handlers.  Can this be done from within a class and if so, how

 do I

   pass my event handlers?
  
   Thanks,
  
   -- Brian
  
  
  
   --
   PHP Development Mailing List http://www.php.net/
   To unsubscribe, visit: http://www.php.net/unsub.php
 
  --
  Please always Cc to me when replying to me on the lists.
  GnuPG Key: http://guru.josefine.at/~mfischer/C2272BD0.asc

-- 
I did this 'cause Linux gives me a woody.  It doesn't generate revenue.
(Dave '-ddt-` Taylor, announcing DOOM for Linux)

-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] PHP Newbie Classes / XML Question

2002-03-22 Thread Markus Fischer

On Fri, Mar 22, 2002 at 04:38:12PM -0500, arti wrote : 
 So, as I understand this, I should do it like this???
 
 
 class stdxml
 {
 
 function stdxml($xmlfilename)
 {
 
 $parser=xml_parser_create();
 
 xml_set_element_handler($parser, array(stdxml,startElementHandler),
 array(stdxml,endElementHandler);
 
 
 This yields the wonderfully helpful error:
 
 Parse error: parse error in C:\Inetpub\wwwroot\PHP\stdqclass.php on line
 20

Not knowing where your line 20 is, but you miss a ')' in the
line 'xml_set_element_handler'

 
 I believe I am following the first syntax you listed:  array('class',
 'methdod'); // static

Depends on how you wrote your code.

-- 
Please always Cc to me when replying to me on the lists.
GnuPG Key: http://guru.josefine.at/~mfischer/C2272BD0.asc

-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] PHP Newbie Classes / XML Question

2002-03-22 Thread arti

Oh man, I am a complete idiot!!  :-D


Andrew Lindeman [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 looks like you're missing a parenthesis at the end of the xml_set
line..

 --Andrew

 On Friday 22 March 2002 03:38 pm, arti wrote:
  So, as I understand this, I should do it like this???
 
 
  class stdxml
  {
 
  function stdxml($xmlfilename)
  {
 
  $parser=xml_parser_create();
 
  xml_set_element_handler($parser,
array(stdxml,startElementHandler),
  array(stdxml,endElementHandler);
 
 
  This yields the wonderfully helpful error:
 
  Parse error: parse error in C:\Inetpub\wwwroot\PHP\stdqclass.php on
  line 20
 
 
  I believe I am following the first syntax you listed:  array('class',
  'methdod'); // static
 
 
 
 
  Markus Fischer [EMAIL PROTECTED] wrote in message
  [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 
   the syntax for passing methods of static classes or objects
   is
  
   array('class', 'methdod'); // static
  
   or
  
   array($object, 'method'); // without and
  
   array($object, 'method')) // by reference
  
   - Markus
  
   On Fri, Mar 22, 2002 at 04:19:42PM -0500, arti wrote :
I am very new to PHP and have what is probably a dumb question.  I
am
attempting to parse an XML document with a Class.
   
But, you have to use  xml_set_element_handler for this to work and
 
  that
 
means you have to pass it the names of your element handlers.  How
do I
 
  do
 
this in a class???
   
For example, this does not work:
   
 xml_set_element_handler($parser, this-startElementHandler,
this-endElementHandler);
   
as I get this error:
   
Warning: Unable to call handler this-startElementHandler() in
C:\Inetpub\wwwroot\PHP\stdqclass.php on line 31
   
   
If I remove the this- I get the exact same error only without the
this-.
   
   
I want the class to handle the XML totally on its own, but I am
cannot
figure out how to pass the xml_set_element_handler function a
reference
 
  to
 
my event handlers.  Can this be done from within a class and if so,
how
 
  do I
 
pass my event handlers?
   
Thanks,
   
-- Brian
   
   
   
--
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php
  
   --
   Please always Cc to me when replying to me on the lists.
   GnuPG Key: http://guru.josefine.at/~mfischer/C2272BD0.asc

 --
 I did this 'cause Linux gives me a woody.  It doesn't generate revenue.
 (Dave '-ddt-` Taylor, announcing DOOM for Linux)



-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DEV] CVS Account Request: roland

2002-03-22 Thread Roland Moriz

translation of manual pages (especially German Pages)

-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DEV] Advice on design issues (long)...

2002-03-22 Thread l0t3k

im looking for opinions on two OOP related design issues for code im
targeting to PHP5.

(1) im writing (actually porting) a DateTime class which matches the
functionality of the Java Date class. it actually does much more, and that's
the issue. in looking at the Javadocs reference page for Date, a lot of what
i have scheduled for my class has been deprecated in Date for various
reasons. in specific, display formatting, parsing and interval math are
moved into other classes.
what do you think about having this functionality in one class or
splitting. i agree somewhat in a separation of concerns, but one reason i
tend not to like Java for web development is the fact that there can be too
many classes involved in getting basic things accomplished.

(2) im working on a database access abstraction, again inspired by Java and
JDBC (MySQL driver is written and works, BTW). in Java you have the
Resultset.getXXX methods which gets the value of a given column as a
particular type. Java of course is strongly typed, whereas PHP is not. Is it
useful to implement the getXXX methods natively. i lean toward it primarily
because 1) folks coming from Java will be right at home 2) sometimes you
need to enforce a particular return type coming from a column 3) Metabase
does it for portability, and although it can be done in PHP, its more
efficient to do it in the extension. On the downside there is the issue of
bloat.


BTW : is there sufficient interest in starting a new newsgroup to discuss
PHP5 ?

l0t3k



-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DEV] -lresolv problems on OpenBSD

2002-03-22 Thread Peter Blokland

hi,

Being severely bitten by the troubles with libiconv  the configure
script in php-4.1.2, I grabbed a cvs version yesterday.
This problem seems solved, but I still can't build a shared version
of php. Doing a ./configure --with-apxs=/usr/sbin/apxs  make
results in :

*** Warning: This library needs some functionality provided by -lresolv.
*** I have the capability to make that library automatically link in when
*** you link to this library.  But I can only do this if you have a
*** shared version of the library, which you do not appear to have.

However, as I understand, I don't need libresolv.so, as the resolver
functions are in libc (correct me if I'm wrong).

Worse still, returning to php-4.1.2 and doing a minimal build there,
I noticed the very same problem. Does this have something to do with
a change from 4.0 to 4.1 ? 4.0.6 built fine months ago...

I tried the patches for 4.1.2 that are available in OpenBSD ports, but
to no avail.

I'm using OpenBSD 3.0 Release (Apache 1.3.19), with added automake 1.4-p5,
autoconf 2.13 and libtool 1.4.

-- 
CUL8R, Peter.


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php