Re: [PHP-DEV] fun with autoconf on Tru64

2003-03-07 Thread David Hill

 What does this output?
 
 flex -V -v --version 2/dev/null
 
 - Sascha


# flex-2.5.27/flex -V -v --version 2/dev/null
flex 2.5.27


# flex-2.5.4/flex -V -v --version 2/dev/null
flex-2.5.4/flex version 2.5.4


Nice consistancy eh ?

Dave

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



Re: [PHP-DEV] fun with autoconf on Tru64

2003-03-07 Thread Sascha Schumann
On Fri, 7 Mar 2003, David Hill wrote:


  What does this output?
 
  flex -V -v --version 2/dev/null
 
  - Sascha


 # flex-2.5.27/flex -V -v --version 2/dev/null
 flex 2.5.27

This should be parsed correctly.  What kind of OS and /bin/sh
do you have?

What does

ver1=2.5.27
ver2=2 5 27
set $ver2; echo $3
IFS=.; set $ver1; echo $3

output?

- Sascha

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



[PHP-DEV] CVS Account Request: akelavlk

2003-03-07 Thread Jan Sunavec
I want add DotPHP layer into PHP. See webcomp.sourceforge.net Or CVS repository on 
sourceforge.net/projects/webcomp

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



Re: [PHP-DEV] fun with autoconf on Tru64

2003-03-07 Thread David Hill


  # flex-2.5.27/flex -V -v --version 2/dev/null
  flex 2.5.27

 This should be parsed correctly.  What kind of OS and /bin/sh

OS == Tru65, shell is /bin/sh
 do you have?

 What does

 ver1=2.5.27
 ver2=2 5 27
 set $ver2; echo $3
27
 IFS=.; set $ver1; echo $3
27

The test in php4/configure.in (and php5/configure.in) is

set `echo  | $LEX -V -v --version 2/dev/null | grep 'version' |
cut -d ' ' -f
 3 | sed -e 's/\./ /g' | sed -e 's/[^0-9 ]//g'`
if test ${1} != 2 -o ${2} != 5 -o ${3} -lt 4; then

In the newer flex output it does not have the work 'version' in it,
and the version is the second not the third arg which is why this test
fails.

changing that to
set `echo  | $LEX -V -v --version 2/dev/null |  sed -e 's/^.*
//' -e 's/\./ /g'

works for me in both cases.  It also handles this case:

# flex-2.5.4/flex -v -V --version 21
flex-2.5.4/flex version 2.5.4

which has a double version number.

Dave


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



Re: [PHP-DEV] fun with autoconf on Tru64

2003-03-07 Thread David Hill


 I set up a debian linux box and after getting the right versions of
 things I am still getting the same results from configure. I am
 getting a syntax error saying else unexpected.

 With php5 module HEAD?

No - php4 HEAD, should I be doing this with php5 instead ?

 What line is the error at?
 What does running the build/buildcheck.sh script output
 for the tool versions?

# ./buildconf
using default Zend directory
buildconf: checking installation...
buildconf: autoconf version 2.13 (ok)
buildconf: automake version 1.5 (ok)
buildconf: libtool version 1.4.3 (ok)
rebuilding configure
rebuilding acconfig.h
rebuilding main/php_config.h.in


# CC='cc -std1' ./configure   (I normally add more options - but I am
trying to get the simple case to work)
...
checking style of sigwait... other
checking style of sigwait... other
checking for mysqli support... no
-l
./configure[53629]: syntax error at line 53630 : `else' unexpected


$ODBC_LIBDIR/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.so

  echo
*

else
  ODBC_LFLAGS=-L$ODBC_LIBDIR
  ODBC_LIBS=-l${ac_solid_prefix}${ac_solid_os}${ac_solid_version}
fi

  echo $ac_t`echo $ODBC_LIBS | sed -e 's!.*/!!'` 16

  else 53629
echo $ac_tno 16
  fi



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



[PHP-DEV] patch for trivial ZE2 leaks

2003-03-07 Thread Moriyoshi Koizumi
I found memleaks in the current HEAD. A Patch for this issue attached.

$ php -r class foo {}

/home/koizumi/src/php5/Zend/zend_hash.c(198) :  Freeing 0x400C1034 (64 bytes), s
cript=-
/home/koizumi/src/php5/Zend/zend_hash.c(176) : Actual location (location was rel
ayed)
Last leak repeated 5 times
/home/koizumi/src/php5/Zend/zend_compile.c(3454) :  Freeing 0x400C0ED4 (44 bytes
), script=-
/home/koizumi/src/php5/Zend/zend_compile.c(2201) :  Freeing 0x400C0CD0 (296 byte
s), script=-
/home/koizumi/src/php5/Zend/zend_language_scanner.l(1107) :  Freeing 0x400C0C94
(4 bytes), script=-


Index: Zend/zend_compile.c
===
RCS file: /repository/ZendEngine2/zend_compile.c,v
retrieving revision 1.388
diff -u -r1.388 zend_compile.c
--- Zend/zend_compile.c 6 Mar 2003 23:45:50 -   1.388
+++ Zend/zend_compile.c 7 Mar 2003 15:29:42 -
@@ -2207,6 +2207,7 @@
zend_error(E_COMPILE_ERROR, Cannot use '%s' as class name as it is 
reserved, class_name-u.constant.value.str.val);
}
 
+   new_class_entry-type = ZEND_USER_CLASS;
new_class_entry-name = class_name-u.constant.value.str.val;
new_class_entry-name_length = class_name-u.constant.value.str.len;
 
-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] why is iconv not working as expected?

2003-03-07 Thread Fil
Hi there,

I'm puzzled by the iconv() call from php. When I test it with cyrillic 
text, in the utf-8 or windows-1251 charsets, or when I try with iranian 
text, the following php call

?php
echo @iconv($charset, 'ASCII//TRANSLIT', $texte))
?
brings me only question marks ???.

What I don't understand is that lynx parses those same texts very well, 
and it is (I think?) based on the same iconv() library...

What can I do to either tune my system or do the right call to iconv()? 
The aim is to have a nice search engine for SPIP, a GPL'd CMS, so the 
most portable answer will be the best ;)

(I'm not on the php-dev list, so please Cc: me.)

-- Fil

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


Re: [PHP-DEV] why is iconv not working as expected?

2003-03-07 Thread Derick Rethans
Hello,

please forward user questions to the [EMAIL PROTECTED]
mailinglist, this list is for development _OF_ PHP, not development
_with_ PHP.

Derick


On Fri, 7 Mar 2003, Fil wrote:

 
 Hi there,
 
 I'm puzzled by the iconv() call from php. When I test it with cyrillic 
 text, in the utf-8 or windows-1251 charsets, or when I try with iranian 
 text, the following php call
 
 ?php
   echo @iconv($charset, 'ASCII//TRANSLIT', $texte))
 ?
 
 brings me only question marks ???.
 
 What I don't understand is that lynx parses those same texts very well, 
 and it is (I think?) based on the same iconv() library...
 
 
 What can I do to either tune my system or do the right call to iconv()? 
 The aim is to have a nice search engine for SPIP, a GPL'd CMS, so the 
 most portable answer will be the best ;)
 
 (I'm not on the php-dev list, so please Cc: me.)
 
 -- Fil
 
 
 

-- 
Stop mad cowboy disease!
-
 Derick Rethans http://derickrethans.nl/ 
 PHP Magazine - PHP Magazine for Professionals   http://php-mag.net/
-

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



[PHP-DEV] nested namespace

2003-03-07 Thread Greg Beaver
Hi,

I'm wondering if a note of clarification could be added to ZEND_CHANGES. 
 The sentences:

A namespace's name may contain colons to denote sub-namespaces.
This is pure syntactic sugar, the Zend Engine will not see, for
instance, the namespaces Package, Package:Subpackage and
Package:Subpackage:Subsubpackage as related.
will possibly be clearer if modified like:

A namespace's name may contain SINGLE colons (:) to denote 
sub-namespaces.  This is pure syntactic sugar, the Zend Engine
will not see, for instance, the namespaces Package, 
Package:Subpackage and Package:Subpackage:Subsubpackage as related.
DOUBLE colons are used to distinguish between nested namespaces as in 
Package::Subpackage.  A namespace identifier may not begin with a colon.

namespace Package {
const one = 1;
   namespace SubPackage {
   const one = 'one';
   }
}
namespace Package:Subpackage {
const one = 'einz';
}
echo Package::one; // 1
echo Package::Subpackage::one; // one
echo Package:Subpackage::one // einz
This is assuming I understand namespaces.  Modify as needed.

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


Re: [PHP-DEV] nested namespace

2003-03-07 Thread Derick Rethans
On Fri, 7 Mar 2003, Greg Beaver wrote:

 namespace Package {
 const one = 1;
 namespace SubPackage {
 const one = 'one';
 }
 }

You can not nest namespaces, so this wont work.

Derick

-- 
Stop mad cowboy disease!
-
 Derick Rethans http://derickrethans.nl/ 
 PHP Magazine - PHP Magazine for Professionals   http://php-mag.net/
-

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



Re: [PHP-DEV] nested namespace

2003-03-07 Thread Greg Beaver


Derick Rethans wrote:
On Fri, 7 Mar 2003, Greg Beaver wrote:


namespace Package {
const one = 1;
   namespace SubPackage {
   const one = 'one';
   }
}


You can not nest namespaces, so this wont work.

Derick

OK, makes sense.  Adding this sentence would clear up a great deal of 
confusion.

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


[PHP-DEV] Refreshing pages after HTTP redirects

2003-03-07 Thread Daniel Joyce
Well, I've gone on to the next step of my project.

I've finally moved to a more structured development approach, treating 
web pages as forms as having them call a central cgi script that 
dispatchs calls to other scripts, and then redirects the client to the 
next step Basically, a mini servlet idea.

So, in my pages, the forms call a central script, say 'foo.php'.

foo.php redirects the client to a webpage that shows a Please wait, 
processing your request' page, using http header rediracts.

When processing completes, foo.php sends another http redirect header to 
the client to redirect it to the next step. The problem is the following...

Say the client is on a.php, which renders a form that calls foo.php when 
submitted. After processing, foo.php redirects the client back to a.php. 

( a.php has a search form, and displays query results from the DB ).

The problem is that a.php is not refreshed, it shows the last value. 
I've tried various http caching headers, and other items, and I can't 
seem to force a refresh when redirecting back to a.php.

Is there a header that says Go to a, but refresh it too.?

-Daniel

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


Re: [PHP-DEV] Refreshing pages after HTTP redirects

2003-03-07 Thread Derick Rethans
Hello,

please forward user questions to the [EMAIL PROTECTED]
mailinglist, this list is for development _OF_ PHP, not development
_with_ PHP.

Derick



On Fri, 7 Mar 2003, Daniel Joyce wrote:

 Well, I've gone on to the next step of my project.
 
 I've finally moved to a more structured development approach, treating 
 web pages as forms as having them call a central cgi script that 
 dispatchs calls to other scripts, and then redirects the client to the 
 next step Basically, a mini servlet idea.
 
 So, in my pages, the forms call a central script, say 'foo.php'.
 
 foo.php redirects the client to a webpage that shows a Please wait, 
 processing your request' page, using http header rediracts.
 
 When processing completes, foo.php sends another http redirect header to 
 the client to redirect it to the next step. The problem is the following...
 
 Say the client is on a.php, which renders a form that calls foo.php when 
 submitted. After processing, foo.php redirects the client back to a.php. 
 
 ( a.php has a search form, and displays query results from the DB ).
 
 The problem is that a.php is not refreshed, it shows the last value. 
 I've tried various http caching headers, and other items, and I can't 
 seem to force a refresh when redirecting back to a.php.
 
 Is there a header that says Go to a, but refresh it too.?
 
 -Daniel
 
 
 

-- 
Stop mad cowboy disease!
-
 Derick Rethans http://derickrethans.nl/ 
 PHP Magazine - PHP Magazine for Professionals   http://php-mag.net/
-

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



Re: [PHP-DEV] fun with autoconf on Tru64

2003-03-07 Thread Magnus M
On Fri, 7 Mar 2003 10:07:31 -0500
David Hill [EMAIL PROTECTED] wrote:

 
 
  I set up a debian linux box and after getting the right versions of
  things I am still getting the same results from configure. I am
  getting a syntax error saying else unexpected.
 
  With php5 module HEAD?


I do also get this on Tru64. Removing ext/mysqli helps.


/ Magnus

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



Re: [PHP-DEV] fun with autoconf on Tru64

2003-03-07 Thread Jani Taskinen
On Fri, 7 Mar 2003, David Hill wrote:



 I set up a debian linux box and after getting the right versions of
 things I am still getting the same results from configure. I am
 getting a syntax error saying else unexpected.

 With php5 module HEAD?

No - php4 HEAD, should I be doing this with php5 instead ?

Don't even try php4 HEAD, it won't work anyway.
You either use:

  # cvs co -rPHP_4_3 php4

or

  # cvs co php5
  
(with the correct -d option of course)

These are the ONLY useful and up-to-date modules at the moment. 

--Jani


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



Re: [PHP-DEV] fun with autoconf on Tru64

2003-03-07 Thread Sascha Schumann
   # cvs co -rPHP_4_3 php4

Or for experimental code which should not go into a release
branch like PHP_4_3

$ cvs co -r PHP_4 php4

 These are the ONLY useful and up-to-date modules at the moment.

I'm planning on syncing those changes which have been
forgotten to PHP_4, so please stop the FUD.

- Sascha

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



Re: [PHP-DEV] fun with autoconf on Tru64

2003-03-07 Thread Magnus M@H%) !-
On Fri, 7 Mar 2003 19:35:09 +0100
Magnus M [EMAIL PROTECTED] wrote:

 On Fri, 7 Mar 2003 10:07:31 -0500
 David Hill [EMAIL PROTECTED] wrote:
 
  
  
   I set up a debian linux box and after getting the right versions of
   things I am still getting the same results from configure. I am
   getting a syntax error saying else unexpected.
  
   With php5 module HEAD?
 
 
 I do also get this on Tru64. Removing ext/mysqli helps.

Using php5 HEAD..

19:58 [EMAIL PROTECTED]:/php/php4 # flex --version
flex version 2.5.4
19:59 [EMAIL PROTECTED]:/php/php4 # automake --version
automake (GNU automake) 1.5
19:59 [EMAIL PROTECTED]:/php/php4 # autoconf --version
Autoconf version 2.13
19:59 [EMAIL PROTECTED]:/php/php4 # m4 --version
GNU m4 1.4
19:59 [EMAIL PROTECTED]:/php/php4 # libtool --version
ltmain.sh (GNU libtool) 1.4.3 (1.922.2.110 2002/10/23 01:39:54)


/ Magnus

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



Re: [PHP-DEV] Sqlite-php module in php-distribution?

2003-03-07 Thread Marcus Börger
At 10:32 07.03.2003, Björn Kalkbrenner wrote:
Sqlite is something like dbm with sql92 language and more.


I would much more appreciate a new submodule for the dbx module!

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


Re: [PHP-DEV] fun with autoconf on Tru64

2003-03-07 Thread David Hill

Thank you all for you tips and pointers on this build issue.

Once I switched to the PHP_4_3 tree I things got much better :-)
I built it and hand installed the .so and am seeing a phpinfo() page
in my browser.

Dave


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



[PHP-DEV] Bug fixing and CVS

2003-03-07 Thread Jean-Michel Dault
Hello,

I'm not sure this is the right mailing list, but at least it's not about
development _with_ php, it's about development _of_ php ;-)

I maintain PHP for Mandrake Linux, and I try to ship a bug-free PHP.
That is, if there were some showstopper bugs that were not corrected in
4.3.1, I take the bugfixes from CVS and apply them.

My concern is: php-bugs always says This bug is fixed in CVS, then I
have to look through php-cvs and try to find what changes were made
concerning that specific bug.

Is there a better way? Is there a special CVS command to show the diffs
on a changelog entry?

Would something like bugs.php.net/patches with a list of all closed bugs
and their corresponding diffs be thinkable?

Jean-Michel



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



Re: [PHP-DEV] bug in zend_API.c (with patch)

2003-03-07 Thread Brad LaFountain
Why can't you just simply name your classes all lowercase. All of the
extensions currently do this and it works fine.

 - Brad
--- Eric Lambart [EMAIL PROTECTED] wrote:
 Hello.
 
 After a short bout of hair-pulling, I have discovered the source (in the
 Zend engine) of a recent problem, and have fixed it.
 
 BACKGROUND:
 As I have mentioned previously on this list, I am developing a complex
 PHP extension, which among many other things creates its own PHP
 classes, and when these classes are instantiated, I manually call the
 class constructor (as one must) from my C code.
 
 I am creating the extension from existing C++ and Java versions of the
 same system, so I am trying to maintain things as much as possible,
 including names (including capitalization) of classes and functions
 (although I am prefixing them all with eo_ to avoid potential
 conflicts with functions and classes from other PHP extensions).
 
 Thus, I have classes such as eo_list, eo_table and eo_NVList.  
 
 THE SYMPTOM:
 I had no trouble instantiating and calling the constructors for the
 first two classes, but when I tried to do it for eo_NVList,
 call_user_function_ex() was returning FAILURE, which I discovered can
 occur for one of seven reasons.
 
 I tracked down the problem to a failure of zend_hash_find() to lookup
 the function.  Using zend_hash_display() I was able to verify that the
 eo_NVList constructor was indeed contained in the function table for the
 eo_NVList class.
 
 THE PROBLEM:
 call_user_function_ex() is converting the requested function name to
 lower case (at zend_execute_API.c:463) before performing the
 zend_hash_find(), but zend_register_functions() (in zend_API.c) does NOT
 convert the function names to lower case before storing them in the
 function table--so call_user_function_ex() was searching for a function
 called eo_nvlist and could never find eo_NVList!
 
 Class lookups worked fine of course, because object_init_ex() takes a
 pointer to the class entry rather than a name.
 
 Additionally, zend_register_internal_class() (also in zend_API.c)
 converts all class names to lower case, and execute() (in
 zend_execute.c) does the same when looking up a class to instantiate it
 from a script.
 
 I haven't looked into script-driven function registration and execution,
 but presumably case-insensitivity is properly supported there, or I'm
 sure you would have heard of it long ago!
 
 MY SOLUTION:
 I present the following little patch for your approval.
 
 I apologize that it is done against 4.3.1 rather than the latest CVS but
 I do not have time to deal with CVS at this time, as my project is
 already behind schedule and of course I need to work with a stable
 engine.  If zend_API.c has changed since the 4.3.1 release, it should be
 trivial to change these few lines of code (yes, I'm sure they all say
 that!). =)
 
 I didn't find any patch submission guidlines in a quick web search; I'm
 afraid you'll have to change the file/pathnames in the first lines.  If
 you don't want to deal with that, point me to the guidelines and I will
 resubmit the patch.  For now I will get back to work.
 
 Respectfully,
 Eric Lambart
 
 --- Zend/OLD_zend_API.c   Wed Oct  9 07:17:52 2002
 +++ Zend/zend_API.c   Fri Mar  7 13:10:38 2003
 @@ -1039,6 +1039,12 @@
   internal_function-type = ZEND_INTERNAL_FUNCTION;
   
   while (ptr-fname) {
 +/* store all function names in lower case so they will always be found
 by
 + * call_user_function_ex() */
 +size_t fname_len = strlen(ptr-fname);
 +char *lowercase_name = zend_strndup(ptr-fname, fname_len);
 +zend_str_tolower(lowercase_name, fname_len);
 +
   internal_function-handler = ptr-handler;
   internal_function-arg_types = ptr-func_arg_types;
   internal_function-function_name = ptr-fname;
 @@ -1047,7 +1053,7 @@
   zend_unregister_functions(functions, count, 
 target_function_table
 TSRMLS_CC);
   return FAILURE;
   }
 - if (zend_hash_add(target_function_table, ptr-fname, 
 strlen(ptr-fname)+1,
 function, sizeof(zend_function), NULL) == FAILURE) {
 + if (zend_hash_add(target_function_table, lowercase_name, fname_len+1,
 function, sizeof(zend_function), NULL) == FAILURE) {
   unload=1;
   break;
   }
 
 
 
 -- 
 PHP Development Mailing List http://www.php.net/
 To unsubscribe, visit: http://www.php.net/unsub.php
 


__
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/

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



Re: [PHP-DEV] bug in zend_API.c (with patch)

2003-03-07 Thread Eric Lambart
On Fri, 2003-03-07 at 14:24, Brad LaFountain wrote:
 Why can't you just simply name your classes all lowercase.

Because then I wouldn't have discovered the bug! =)

 All of the extensions currently do this and it works fine.

Apparently that is the case--that's probably why I had the pleasure of
discovering this bug myself.  Although we are not currently developing
this extension for public release, it may be open-sourced in the future,
and for that reason I have followed the CODING_STANDARDS document fairly
closely.

We could, of course, give all classes and functions lower case names,
but as I explained in my previous post, we are porting an existing
application that exists in C++ and Java and the developers of those
original versions chose to use CamelCaps.  AFAIC, the less changes
needed to the code, the better.

Personally, I'd rather have case-sensitive class and function names in
PHP, but the whole point is, if the Zend engine is going to try and look
them up them in lowercase, IMHO it'd be really nice if it'd store it the
same way :)

BTW, since my first post I have discovered the  README.SUBMITTING_PATCH
file.  I still don't have the time now to deal with CVS, though if
pushed I will do so, sometime in the future.  Nonetheless, I am
re-submitting the patch here as requested in the form of a MIME
attachment.  FWIW I also performed a make test with no FAILs, though I
did not create a new test case for this bug.

Let me know if there's anything else I can do to help.  If this patch
will not be accepted SOLEY due to the fact that it's not done on CVS,
please let me know and I will take care of that when I have time, and
resubmit it.

For now, I have spent enough time on this problem already.

Regards,
Eric

--- Zend/OLD_zend_API.c Wed Oct  9 07:17:52 2002
+++ Zend/zend_API.c Fri Mar  7 14:49:36 2003
@@ -1039,6 +1039,12 @@
internal_function-type = ZEND_INTERNAL_FUNCTION;

while (ptr-fname) {
+   /* store all function names in lower case so they will always be found 
by
+* call_user_function_ex() */
+   size_t fname_len = strlen(ptr-fname);
+   char *lowercase_name = zend_strndup(ptr-fname, fname_len);
+   zend_str_tolower(lowercase_name, fname_len);
+
internal_function-handler = ptr-handler;
internal_function-arg_types = ptr-func_arg_types;
internal_function-function_name = ptr-fname;
@@ -1047,7 +1053,7 @@
zend_unregister_functions(functions, count, 
target_function_table TSRMLS_CC);
return FAILURE;
}
-   if (zend_hash_add(target_function_table, ptr-fname, 
strlen(ptr-fname)+1, function, sizeof(zend_function), NULL) == FAILURE) {
+   if (zend_hash_add(target_function_table, lowercase_name, fname_len+1, 
function, sizeof(zend_function), NULL) == FAILURE) {
unload=1;
break;
}

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

Re: [PHP-DEV] bug in zend_API.c (with patch)

2003-03-07 Thread Wez Furlong
It's not a bug; PHP is a case-IN-sensitive language when it comes to
function and class names.

Adding strtolower calls will only slow down the whole language.

Using lowercase function and class names is the best solution.

--Wez.

On Fri, 7 Mar 2003, Eric Lambart wrote:

 On Fri, 2003-03-07 at 14:24, Brad LaFountain wrote:
  Why can't you just simply name your classes all lowercase.

 Because then I wouldn't have discovered the bug! =)

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



Re: [PHP-DEV] Apache2 SAPI

2003-03-07 Thread Jean-Michel Dault
Le ven 07/03/2003 à 02:56, Derick Rethans a écrit :
  I think it would be in everyone's best interest if apache2handler was 
  introduced in 4.3.X series  probably replace the current apache2filter all 
  together.
  I'm big +1 on this as it can be considered as a FIX..
  Let's just replace the other one with this new one.
 Ok, I'm convinced now too :)

Just one thing before we make the move: what about the thing with
virtual and php re-entrancy? Is that fixed?

Jean-Michel

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



Re: [PHP-DEV] Apache2 SAPI

2003-03-07 Thread Derick Rethans
On Fri, 7 Mar 2003, Jean-Michel Dault wrote:

 Le ven 07/03/2003 à 02:56, Derick Rethans a écrit :
   I think it would be in everyone's best interest if apache2handler was 
   introduced in 4.3.X series  probably replace the current apache2filter all 
   together.
   I'm big +1 on this as it can be considered as a FIX..
   Let's just replace the other one with this new one.
  Ok, I'm convinced now too :)
 
 Just one thing before we make the move: what about the thing with
 virtual and php re-entrancy? Is that fixed?

I've no idea what you're talking about, care to elaborate?

Derick

-- 
my other box is your windows PC
-
 Derick Rethans http://derickrethans.nl/ 
 PHP Magazine - PHP Magazine for Professionals   http://php-mag.net/
-

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



Re: [PHP-DEV] Apache2 SAPI

2003-03-07 Thread Ian Holsman
Jean-Michel Dault wrote:
Le ven 07/03/2003 à 02:56, Derick Rethans a écrit :

I think it would be in everyone's best interest if apache2handler was 
introduced in 4.3.X series  probably replace the current apache2filter all 
together.
   I'm big +1 on this as it can be considered as a FIX..
   Let's just replace the other one with this new one.
Ok, I'm convinced now too :)


Just one thing before we make the move: what about the thing with
virtual and php re-entrancy? Is that fixed?
Jean-Michel

I belive justin fixed that by using the same method the 1.3 handler 
used (called zend_xyz instead of php_xyz .. i don't have the code in 
front of me)

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


Re: [PHP-DEV] bug in zend_API.c (with patch)

2003-03-07 Thread Wez Furlong

On Sat, 7 Mar 2003, Eric Lambart wrote:

  Adding strtolower calls will only slow down the whole language.

 but my
 point is the overhead involved cannot possibly rival the amount already
 created by the zend_str_tolower() calls within zend_execute.c, which is
 surely encountered far more often in everyday use of PHP.

 Does what I am suggesting make sense, now?

Yes, but simple maths suggests that adding a strtolower call when
building the initial hash for each of 2837 functions is surely slower
than not having it :) (this is just for extensions in the core).

You have to remember that this cost is incurred each time php is loaded;
a big performance hit for people using CGI for example.

 But as I have seen no warnings or admonitions about using one or more
 upper case letters in a function or class name in the available
 extension-writing documentation (either online, or in the book ...

Consider this thread a warning ;-)

--Wez.

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



[PHP-DEV] Namespaces

2003-03-07 Thread l0t3k
this may be a bit premature, but how do i inject the classes, functions and
constants in my extension into a namespace ?

l0t3k



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



[PHP-DEV] Namespaces

2003-03-07 Thread l0t3k
this may be a bit premature, but how do i inject the classes, functions and
constants in my extension into a namespace ?

l0t3k





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



Re: [PHP-DEV] Re: [PHP-I18N] Help: Sablotron and Shift-jis

2003-03-07 Thread Christian Stocker
On Fri, 2003-03-07 at 08:50, Moriyoshi Koizumi wrote:
 It works for me. See the attached example. Anyway, you don't have to 
 crosspost your question to [EMAIL PROTECTED], which is for developing 
 php internals and irrelevant for such user questions.
 

ditto for php-xml-dev, a list _for_ developing of the xml extensions in
PHP and not _with_. 

Your issue looks like a Sablotron problem and not a php at all, by the
way ;)

chregu

 Hope this helps
 
 Moriyoshi
 
 
 Michel Sahyoun [EMAIL PROTECTED] wrote:
 
  Does anyone have an example of using XSLT with Sablotron to transform and
  XML document containing Shift-jis encoded characters?
  
  I keep getting the following error message: Illegal Character for Encoding
  'Shift-jis'
  
  I am using the latest from snap.php.net and sablotron 0.97 FullPack with
  iconv, and Javascript.
  
  In my php file, I call xslt_set_encoding($xsltHandle, 'Shift-jis');
  My xsl file has xsl:output method=xml omit-xml-declaration=yes
  encoding=Shift-jis /
  My XML file has: ?xml version=1.0 encoding=Shift-jis ?
  
  Am I doing something wrong? Is the encoding name misspelled? Anything else I
  could check?
  
  Thanks,
  
  Michel
  
  
  
  -- 
  PHP Internationalization 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
-- 
Christian Stocker [EMAIL PROTECTED]


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



[PHP-DEV] Re: [PHP-XML-DEV] Re: [PHP-I18N] Help: Sablotron and Shift-jis

2003-03-07 Thread Melvyn Sopacua
At 08:50 3/7/2003, Moriyoshi Koizumi wrote:

Anyway, you don't have to
crosspost your question to [EMAIL PROTECTED], which is for developing
php internals and irrelevant for such user questions.
The same applies to [EMAIL PROTECTED]

Note the pattern :)

Met vriendelijke groeten / With kind regards,

Webmaster IDG.nl
Melvyn Sopacua
@Logan I spent a minute looking at my own code by accident.
@Logan I was thinking What the hell is this guy doing?
--
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP-DEV] Patch for README.EXT_SKEL

2003-03-06 Thread Martin Jansen
Hi,

on Debian Woody, one not only needs to change skeleton/create_stubs to
use gawk instead of mawk, but it is also necessary to change ext_skel
itself.

With the attached patch this is noted in README.EXT_SKEL.

-- 
- Martin   Martin Jansen
http://martinjansen.com/Index: README.EXT_SKEL
===
RCS file: /repository/php4/README.EXT_SKEL,v
retrieving revision 1.9
diff -u -r1.9 README.EXT_SKEL
--- README.EXT_SKEL 23 Oct 2002 21:31:12 -  1.9
+++ README.EXT_SKEL 6 Mar 2003 09:45:31 -
@@ -17,7 +17,8 @@
 
   [ Note that GNU awk is likely required for this script to work.  Debian 
 systems seem to default to using mawk, so you may need to change the 
-#! line in skeleton/create_stubs to use gawk explicitly. ]
+#! line in skeleton/create_stubs and the cat $proto | awk line in
+ext_skel to use gawk explicitly. ]
 
   If you don't need to test the existence of any external header files, 
   libraries or functions in them, the module is already almost ready to be 

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

[PHP-DEV] [PATCH] fixes for /usr/lib64 systems

2003-03-06 Thread Joe Orton
Hi, I've got a bunch of fixes for systems which have system libraries in
/usr/lib64 rather than /usr/lib - these are needed for some upcoming
64-bit Linux ports.  These fixes are based on patches from SuSE
developers [EMAIL PROTECTED] [EMAIL PROTECTED].

Should I submit changes to ext/*/config.m4 in bulk or individually? 

Here's the first fix to prevent adding /usr/lib64 to LDFLAGS:

Index: acinclude.m4
===
RCS file: /repository/php4/acinclude.m4,v
retrieving revision 1.218.2.8
diff -u -r1.218.2.8 acinclude.m4
--- acinclude.m424 Feb 2003 15:12:11 -  1.218.2.8
+++ acinclude.m46 Mar 2003 10:22:59 -
@@ -177,7 +177,7 @@
   unset ac_new_flags
   for i in [$]$1; do
 case [$]i in
--L/usr/lib|-L/usr/lib/) ;;
+-L/usr/lib|-L/usr/lib/|-L/usr/lib64|-L/usr/lib64/) ;;
 *) ac_new_flags=[$]ac_new_flags [$]i ;;
 esac
   done
@@ -906,7 +906,9 @@
 dnl add a library to linkpath/runpath
 dnl
 AC_DEFUN([PHP_ADD_LIBPATH],[
-  if test $1 != /usr/lib; then
+  case x$1 in
+  x/usr/lib|x/usr/lib64) ;;
+  *)
 PHP_EXPAND_PATH($1, ai_p)
 ifelse([$2],,[
   _PHP_ADD_LIBPATH_GLOBAL([$ai_p])
@@ -917,7 +919,7 @@
 _PHP_ADD_LIBPATH_GLOBAL([$ai_p])
   fi
 ])
-  fi
+  esac
 ])
 
 dnl

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



Re: [PHP-DEV] [PATCH] fixes for /usr/lib64 systems

2003-03-06 Thread James Devenish
In message [EMAIL PROTECTED]
on Thu, Mar 06, 2003 at 10:25:14AM +, Joe Orton wrote:
 Hi, I've got a bunch of fixes for systems which have system libraries in
 /usr/lib64 rather than /usr/lib - these are needed for some upcoming
 64-bit Linux ports.  These fixes are based on patches from SuSE
 developers [EMAIL PROTECTED] [EMAIL PROTECTED].
 
 Should I submit changes to ext/*/config.m4 in bulk or individually? 
 
 Here's the first fix to prevent adding /usr/lib64 to LDFLAGS:
[...]
 +-L/usr/lib|-L/usr/lib/|-L/usr/lib64|-L/usr/lib64/) ;;

Of all the problems I've had using PHP on 64-bit platforms (e.g. bug
#21973, which refers mainly to lib directory naming under commercial
64-bit environments), this was not one of them -- yay.

So I am curious:
 - What is the purpose of having the mechanism to remove or not remove
   /usr/lib (and why not do the same for /lib and other vendor
   directories)?
 - Why do 64-bit Linux operating systems need the special hard-coded
   treatment?
 - Will the same be done for other operating systems?




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



[PHP-DEV] Fix for wordwrap()

2003-03-06 Thread Jedi/Sector One
  Hello.
  
  Maybe this is the intended behavior, but wordwrap()'s behavior is a bit
illogical on PHP 4.3.1, as it does only break after a plain whitespace, not
after punctuation, \n, etc.

  Here's a trivial sample :
  
$a = ww\nphprules\nw;
print wordwrap($a, 10, ' ', 10);

  Output :
  
ww 
p hprules
ww ww w

  The following trivial patch makes wordwrap() wrap after any
non-alphanumeric charater. Output after application of that patch :

ww  phprules ww www

  Best regards,
  
   -Frank.
--- php-4.3.1/ext/standard/string.c 2002-12-27 04:22:20.0 +0100
+++ php-4.3.1-jedi/ext/standard/string.c2003-03-06 12:41:46.0 +0100
@@ -654,7 +654,7 @@
for (current = 0; current  textlen; current++) {
if (text[current] == breakchar[0]) {
laststart = lastspace = current;
-   } else if (text[current] == ' ') {
+   } else if (!isalnum((unsigned char) text[current])) {
if (current - laststart = linelength) {
newtext[current] = breakchar[0];
laststart = current;
@@ -701,7 +701,7 @@
}
/* if it is a space, check if it is at the line boundary,
 * copy and insert a break, or just keep track of it */
-   else if (text[current] == ' ') {
+   else if (!isalnum((unsigned char) text[current])) {
if (current - laststart = linelength) {
memcpy(newtext+newtextlen, text+laststart, 
current-laststart);
newtextlen += current - laststart;

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

Re: [PHP-DEV] [PATCH] fixes for /usr/lib64 systems

2003-03-06 Thread Joe Orton
On Thu, Mar 06, 2003 at 07:27:05PM +0800, James Devenish wrote:
 In message [EMAIL PROTECTED]
 on Thu, Mar 06, 2003 at 10:25:14AM +, Joe Orton wrote:
  Hi, I've got a bunch of fixes for systems which have system libraries in
  /usr/lib64 rather than /usr/lib - these are needed for some upcoming
  64-bit Linux ports.  These fixes are based on patches from SuSE
  developers [EMAIL PROTECTED] [EMAIL PROTECTED].
  
  Should I submit changes to ext/*/config.m4 in bulk or individually? 
  
  Here's the first fix to prevent adding /usr/lib64 to LDFLAGS:
 [...]
  +-L/usr/lib|-L/usr/lib/|-L/usr/lib64|-L/usr/lib64/) ;;
 
 Of all the problems I've had using PHP on 64-bit platforms (e.g. bug
 #21973, which refers mainly to lib directory naming under commercial
 64-bit environments), this was not one of them -- yay.
 
 So I am curious:
  - What is the purpose of having the mechanism to remove or not remove
/usr/lib (and why not do the same for /lib and other vendor
directories)?

 - Why do 64-bit Linux operating systems need the special hard-coded 
   treatment?  
 - Will the same be done for other operating systems?

/usr/lib64 exists so that you can have 64-bit libraries installed
alongside 32-bit libraries in /usr/lib - this is a precedent that comes
from Sun or SGI or somewhere I believe.  IRIX is the top Google hit for
lib64 in any case.

(In fact I think you can get /usr/lib32 as well for some IRIX/MIPS,
since there are two different flavours of 32-bit ABI)

Adding /usr/lib64 or /usr/lib to the library search path at minimum
causes a re-ordering of the library search path, which means in some
circumstances you pick up the wrong versions of libraries.

e.g. if you have a libfoo in /usr/lib, but you want to compile against a
different version you have installed in /home/jim/lib, you start with
-L/home/jim/lib -lfoo.  If the configure script then adds -L/usr/lib to
LDFLAGS, you might end up with the system libfoo again, which is wrong.

On a lib64 system, if you do have the 32-bit libraries installed in
/usr/lib, but want to compile against the 64-bit libraries in
/usr/lib64, adding /usr/lib to the library search path breaks everything
horribly, since you pick up the 32-bit libc etc.

Regards,

joe

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



Re: [PHP-DEV] [PATCH] fixes for /usr/lib64 systems

2003-03-06 Thread James Devenish
In message [EMAIL PROTECTED]
on Thu, Mar 06, 2003 at 11:52:15AM +, Joe Orton wrote:
 /usr/lib64 exists so that you can have 64-bit libraries installed
 alongside 32-bit libraries in /usr/lib - this is a precedent that comes
 from Sun or SGI or somewhere I believe.

Yep, HP-UX does it, too.

 (In fact I think you can get /usr/lib32 as well for some IRIX/MIPS,
 since there are two different flavours of 32-bit ABI)

Sure. Sometimes lib-and-lib32 or lib-and-lib64 or lib-and-lib/sparcv9
or lib-and-lib/pa20_64.

 Adding /usr/lib64 or /usr/lib to the library search path at minimum
 causes a re-ordering of the library search path, which means in some
 circumstances you pick up the wrong versions of libraries.
[...]
 e.g. if you have a libfoo in /usr/lib, but you want to compile against a
 different version you have installed in /home/jim/lib, you start with
 -L/home/jim/lib -lfoo.  If the configure script then adds -L/usr/lib to
 LDFLAGS, you might end up with the system libfoo again, which is wrong.

Sure, my question is whether (and why) /usr/lib and /usr/lib64 should be
preferentially treated.

 On a lib64 system, if you do have the 32-bit libraries installed in
 /usr/lib, but want to compile against the 64-bit libraries in
 /usr/lib64, adding /usr/lib to the library search path breaks everything
 horribly, since you pick up the 32-bit libc etc.

Okay, so 64-bit Linux needs the path hack because it will try and use
32-bit binaries with its 64-bit ABI instead of recognising that the
32-bit binaries cannot be used and skipping over them? Is that what
you're saying?



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



Re: [PHP-DEV] [PATCH] fixes for /usr/lib64 systems

2003-03-06 Thread Joe Orton
On Thu, Mar 06, 2003 at 08:06:57PM +0800, James Devenish wrote:
 In message [EMAIL PROTECTED]
 on Thu, Mar 06, 2003 at 11:52:15AM +, Joe Orton wrote:
...
  On a lib64 system, if you do have the 32-bit libraries installed in
  /usr/lib, but want to compile against the 64-bit libraries in
  /usr/lib64, adding /usr/lib to the library search path breaks everything
  horribly, since you pick up the 32-bit libc etc.
 
 Okay, so 64-bit Linux needs the path hack because it will try and use
 32-bit binaries with its 64-bit ABI instead of recognising that the
 32-bit binaries cannot be used and skipping over them? Is that what
 you're saying?

Yes, that's why it is needed - though I'm surprised if this problem is
unique to the linker used on Linux.  (especially since GNU binutils
isn't uniquely used on Linux :)

I'm fairly sure I've had problems on IRIX before when the linker picks
up libraries with a different ABI.

Regards,

joe


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



Re: [PHP-DEV] [PATCH] fixes for /usr/lib64 systems

2003-03-06 Thread James Devenish
In message [EMAIL PROTECTED]
on Thu, Mar 06, 2003 at 12:15:43PM +, Joe Orton wrote:
 Yes, that's why it is needed - though I'm surprised if this problem is
 unique to the linker used on Linux.
[...]
 I'm fairly sure I've had problems on IRIX before when the linker picks
 up libraries with a different ABI.

Okay, thanks for the clarification.

The reason it might not have come up for me is that on systems I use,
the vendor's linker is used. On an UltraSPARC II test box with gcc using
Sun's ccs linker:

solaris$ gcc -v
Reading specs from /usr/local/lib/gcc-lib/sparc-sun-solaris2.9/3.2.1/specs
Configured with: ../configure --with-as=/usr/ccs/bin/as
--with-ld=/usr/ccs/bin/ld --disable-nls
Thread model: posix
gcc version 3.2.1
solaris$ /usr/bin/echo '#include stdio.h\nint main(void) { printf(Hello 
World!\\n); }'  hello.c
solaris$ gcc -m32 -o hello32 hello.c
solaris$ gcc -m64 -o hello64 hello.c
solaris$ file hello32
hello32: ELF 32-bit MSB executable, SPARC, version 1 (SYSV), dynamically linked (uses 
shared libs), not stripped
solaris$ file hello64
hello64: ELF 64-bit MSB executable, SPARC V9, version 1 (SYSV), dynamically linked 
(uses shared libs), not stripped
solaris$ LDPATH=-L/usr/lib\ -L/usr/lib/sparcv9 gcc -m64 -o hello64 hello.c
solaris$ ldd hello64
libc.so.1 = /usr/lib/sparcv9/libc.so.1
libdl.so.1 =/usr/lib/sparcv9/libdl.so.1
/usr/platform/SUNW,Ultra-5_10/lib/sparcv9/libc_psr.so.1

On an Itanium host:

hp-ux$ gcc -v
Reading specs from /usr/local/lib/gcc-lib/ia64-hp-hpux11.20/3.0/specs
Thread model: posix
gcc version 3.0
hp-ux$ gcc -o hello32 hello.c
hp-ux$ file hello32
hello32:ELF-32 executable object file - IA64
hp-ux$ ldd hello32
libc.so.1 =/lib/hpux32/libc.so.1
libdl.so.1 =   /usr/lib/hpux32/libdl.so.1
/opt/graphics/OpenGL/lib/hpux32/libogltls.so = 
/opt/graphics/OpenGL/lib/hpux32/libogltls.so
hp-ux$ LDPATH=/lib/hpux64\ /lib/hpux32 gcc -o hello32 hello.c
hp-ux$ ldd hello32
libc.so.1 =/lib/hpux32/libc.so.1
libdl.so.1 =   /usr/lib/hpux32/libdl.so.1
/opt/graphics/OpenGL/lib/hpux32/libogltls.so = 
/opt/graphics/OpenGL/lib/hpux32/libogltls.so
hp-ux$ cc +DD64 -o hello64 hello.c
hp-ux$ file hello64
hello64:ELF-64 executable object file - IA64
hp-ux$ ldd hello64
libc.so.1 =/usr/lib/hpux64/libc.so.1
libdl.so.1 =   /usr/lib/hpux64/libdl.so.1
hp-ux$ LDPATH=/lib/hpux32\ /lib/hpux64 cc +DD64 -o hello64 hello.c
hp-ux$ file hello64
hello64:ELF-64 executable object file - IA64
hp-ux$ ldd hello64
libc.so.1 =/usr/lib/hpux64/libc.so.1
libdl.so.1 =   /usr/lib/hpux64/libdl.so.1

(Acutally, I'm not sure that the last example attempted to do what I
wanted it to do.)



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



[PHP-DEV] fun with autoconf on Tru64

2003-03-06 Thread Dave Hill
Hi all,
   I am having fun with [EMAIL PROTECTED]@#$ autoconf. In the past I always used 
the configure in the RC tarball without (much) problem. As I am trying 
to be a good little commiter, I am trying to build my potential changes 
out of cvs and am starting with buildconf.

I have installed:
   gawk-3.1.1
   m4-1.4o
   bison-1.875
   flex-2.5.27
   autoconf-2.13
   automake-1.5
   libtool-1.4.3
I get warnings/errors during buildconf, and then syntax errors in the 
./configure after.

Any suggestions ?

# ./buildconf
using default Zend directory
buildconf: checking installation...
buildconf: autoconf version 2.13 (ok)
buildconf: automake version 1.5 (ok)
buildconf: libtool version 1.4.3 (ok)
rebuilding configure
configure.in:564: AC_TRY_COMPILE was called before AC_AIX
configure.in:564: AC_TRY_RUN was called before AC_AIX
configure.in:564: AC_TRY_COMPILE was called before AC_AIX
configure.in:564: AC_TRY_RUN was called before AC_AIX
autoconf: Undefined macros:
***BUG in Autoconf--please report*** AC_ACVERSION
***BUG in Autoconf--please report*** AC_TRY_DLOPEN_SELF
***BUG in Autoconf--please report*** AC_TRY_DLOPEN_SELF
***BUG in Autoconf--please report*** AC_TRY_DLOPEN_SELF
***BUG in Autoconf--please report*** AC_TRY_DLOPEN_SELF
***BUG in Autoconf--please report*** AC_TRY_DLOPEN_SELF
***BUG in Autoconf--please report*** AC_TRY_DLOPEN_SELF
***BUG in Autoconf--please report*** AC_TRY_DLOPEN_SELF
***BUG in Autoconf--please report*** AC_TRY_DLOPEN_SELF
rebuilding acconfig.h
rebuilding main/php_config.h.in
configure.in:564: AC_TRY_COMPILE was called before AC_AIX
configure.in:564: AC_TRY_RUN was called before AC_AIX
configure.in:564: AC_TRY_COMPILE was called before AC_AIX
configure.in:564: AC_TRY_RUN was called before AC_AIX


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


Re: [PHP-DEV] [WARNING] Release process for 4.3.2 starts RSN..

2003-03-06 Thread Petar
Any progress towards a 4.3.2 release?

Cheers

..Petar

- Original Message - 
From: Jani Taskinen [EMAIL PROTECTED]
To: Shane Caraveo [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Monday, February 24, 2003 10:13 AM
Subject: Re: [PHP-DEV] [WARNING] Release process for 4.3.2 starts RSN..
snip
 Jani Taskinen wrote:
  To get this thing started, I'm going to roll PHP 4.3.2-pre1
  on Wednesday, 26th Feb, around 3pm EEST. And I'll announce
  it on php-general too, to get some more people testing it
  before we start with any RCs.
  
  Following is collection of bugs marked as critical and verified
  which should be looked into and dealt with. If not fixed,
  then please, PLEASE add some comment why they won't ever
  be fixed and bogus the out.
snip



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



[PHP-DEV] Re: fun with autoconf on Tru64

2003-03-06 Thread J Smith

I have had similar problems, using autoconf 2.5x seems to work. (I use 2.54,
specifically.)

J


Dave Hill wrote:

 Hi all,
 I am having fun with [EMAIL PROTECTED]@#$ autoconf. In the past I always used
 the configure in the RC tarball without (much) problem. As I am trying
 to be a good little commiter, I am trying to build my potential changes
 out of cvs and am starting with buildconf.
 
 I have installed:
 gawk-3.1.1
 m4-1.4o
 bison-1.875
 flex-2.5.27
 autoconf-2.13
 automake-1.5
 libtool-1.4.3
 
 I get warnings/errors during buildconf, and then syntax errors in the
 ./configure after.
 
 Any suggestions ?
 
 # ./buildconf
 using default Zend directory
 buildconf: checking installation...
 buildconf: autoconf version 2.13 (ok)
 buildconf: automake version 1.5 (ok)
 buildconf: libtool version 1.4.3 (ok)
 rebuilding configure
 configure.in:564: AC_TRY_COMPILE was called before AC_AIX
 configure.in:564: AC_TRY_RUN was called before AC_AIX
 configure.in:564: AC_TRY_COMPILE was called before AC_AIX
 configure.in:564: AC_TRY_RUN was called before AC_AIX
 autoconf: Undefined macros:
 ***BUG in Autoconf--please report*** AC_ACVERSION
 ***BUG in Autoconf--please report*** AC_TRY_DLOPEN_SELF
 ***BUG in Autoconf--please report*** AC_TRY_DLOPEN_SELF
 ***BUG in Autoconf--please report*** AC_TRY_DLOPEN_SELF
 ***BUG in Autoconf--please report*** AC_TRY_DLOPEN_SELF
 ***BUG in Autoconf--please report*** AC_TRY_DLOPEN_SELF
 ***BUG in Autoconf--please report*** AC_TRY_DLOPEN_SELF
 ***BUG in Autoconf--please report*** AC_TRY_DLOPEN_SELF
 ***BUG in Autoconf--please report*** AC_TRY_DLOPEN_SELF
 rebuilding acconfig.h
 rebuilding main/php_config.h.in
 configure.in:564: AC_TRY_COMPILE was called before AC_AIX
 configure.in:564: AC_TRY_RUN was called before AC_AIX
 configure.in:564: AC_TRY_COMPILE was called before AC_AIX
 configure.in:564: AC_TRY_RUN was called before AC_AIX


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



[PHP-DEV] PHP for generating SVG

2003-03-06 Thread Reuben D. Budiardja

Hello all, 
Just wondering, is there any plans to develop PHP functions to generate SVG? 
Something similar to the images functions that use GD library to generate 
rasterize images on the fly, but instead generate SVG tags on the fly. That 
would be a killer and makes it very easy to write SVG.

Just a thought..
Reuben D. Budiardja


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



Re: [PHP-DEV] fun with autoconf on Tru64

2003-03-06 Thread Melvyn Sopacua
At 14:40 3/6/2003, Dave Hill wrote:

I have installed:
   gawk-3.1.1
   m4-1.4o
You shouldn't :)
m4-1.4 without the 'o'.
Make sure to rm -rf /usr/local/share/m4|autoconf cause the 'frozen' file,
won't be uninstalled with make uninstall.
Met vriendelijke groeten / With kind regards,

Webmaster IDG.nl
Melvyn Sopacua
@Logan I spent a minute looking at my own code by accident.
@Logan I was thinking What the hell is this guy doing?
--
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP-DEV] Apache2 SAPI

2003-03-06 Thread Ian Holsman
I've been using the apache2handler on two low/medium-traffic sites for a 
while and it appears ok to me.

now.. I'm new to this list, and really don't know how it works, so 
excuse me if this is a FAQ or something.

I'd like to see this code in 4.3.2/4.3.3?, and if it doesn't blow up,
replace the 'apache2filter' as the default apache2 SAPI in a month or two.
so..
Can I check this into PHP_4  PHP_4_3 ?
Thanks
Ian.
--
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP-DEV] Apache2 SAPI

2003-03-06 Thread Derick Rethans
On Thu, 6 Mar 2003, Ian Holsman wrote:

 I've been using the apache2handler on two low/medium-traffic sites for a 
 while and it appears ok to me.
 
 now.. I'm new to this list, and really don't know how it works, so 
 excuse me if this is a FAQ or something.

 I'd like to see this code in 4.3.2/4.3.3?, and if it doesn't blow up,
 replace the 'apache2filter' as the default apache2 SAPI in a month or two.

Our policy is not to merge new things to stable branches (which is 
PHP_4_3 now).

 Can I check this into PHP_4  PHP_4_3 ?

Nope :)

Derick

-- 
Stop mad cowboy disease!
-
 Derick Rethans http://derickrethans.nl/ 
 PHP Magazine - PHP Magazine for Professionals   http://php-mag.net/
-

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



Re: [PHP-DEV] fun with autoconf on Tru64

2003-03-06 Thread David Hill

 You shouldn't :)
 m4-1.4 without the 'o'.

Thanks ! That does help some. I don't get the buildconf warnings now,
but I am still getting shell syntax errors in the resulting configure
script. arrrgh :-p

Dave


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



Re: [PHP-DEV] Apache2 SAPI

2003-03-06 Thread Ian Holsman
Derick Rethans wrote:
On Thu, 6 Mar 2003, Ian Holsman wrote:


I've been using the apache2handler on two low/medium-traffic sites for a 
while and it appears ok to me.

now.. I'm new to this list, and really don't know how it works, so 
excuse me if this is a FAQ or something.

I'd like to see this code in 4.3.2/4.3.3?, and if it doesn't blow up,
replace the 'apache2filter' as the default apache2 SAPI in a month or two.


Our policy is not to merge new things to stable branches (which is 
PHP_4_3 now).


Can I check this into PHP_4  PHP_4_3 ?


Nope :)

Derick

maybe I should have just patched the apache2filter code instead of 
creating a new directory ;-)

the handler is much simpler  IMHO more stable, but I'm not going to 
bitch and moan about it anymore

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


Re: [PHP-DEV] Apache2 SAPI

2003-03-06 Thread Sascha Schumann
  Can I check this into PHP_4  PHP_4_3 ?

 Nope :)

PHP_4 is ok.

- Sascha


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



Re: [PHP-DEV] fun with autoconf on Tru64

2003-03-06 Thread Sascha Schumann
 Thanks ! That does help some. I don't get the buildconf warnings now,
 but I am still getting shell syntax errors in the resulting configure
 script. arrrgh :-p

Make sure that autoconf-2.13 is completely reinstalled
(including rm -rf autoconf-2.13).  Otherwise, the frozen
files which were generated using m4-1.4o cause problems.

- Sascha


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



Re: [PHP-DEV] Apache2 SAPI

2003-03-06 Thread Derick Rethans
On Thu, 6 Mar 2003, Sascha Schumann wrote:

   Can I check this into PHP_4  PHP_4_3 ?
 
  Nope :)
 
 PHP_4 is ok.

Sure, but there is no point in doing that... as there won't be released 
from that branch anyway.

Derick

-- 
Stop mad cowboy disease!
-
 Derick Rethans http://derickrethans.nl/ 
 PHP Magazine - PHP Magazine for Professionals   http://php-mag.net/
-

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



Re: [PHP-DEV] Apache2 SAPI

2003-03-06 Thread Sascha Schumann
 Sure, but there is no point in doing that... as there won't be released
 from that branch anyway.

Well, that depends on the needs of our users.

Regardless, testing new SAPIs/extensions is quite a burden in the
PHP 5 context, because you have two moving targets then -- the
engine and your own code.  It's often preferrable to have a
stable environment for your own testing needs and that is
where PHP_4 comes in.

- Sascha


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



[PHP-DEV] Error_log

2003-03-06 Thread John Coggeshall

Is there any reason we are still supporting PHP3 for error_log?
Specifically that TCP/IP stuff. I was looking at error_log and I was
wondering if anyone had a good objection to me submitting a patch for it
to:

define constants ERRORLOG_SYSLOG, ERRORLOG_EMAIL, ERRORLOG_FILE ..
It's really ugly having hard-coded ints

Getting rid of message_type = 2 (TCP/IP logging) since it doesn't
work anymore, make it the same as 3 (write to file) and throw a notice
if type 3 is used (but still work). 

John


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



Re: [PHP-DEV] Apache2 SAPI

2003-03-06 Thread Jani Taskinen

I think it would be okay to just replace the apache2filter
with apache2handler altogether..since the former does not
work as well anyway. 

Are there any differences how it is setup in http.conf btw?

--Jani



On Thu, 6 Mar 2003, Derick Rethans wrote:

On Thu, 6 Mar 2003, Ian Holsman wrote:

 I've been using the apache2handler on two low/medium-traffic sites for a 
 while and it appears ok to me.
 
 now.. I'm new to this list, and really don't know how it works, so 
 excuse me if this is a FAQ or something.

 I'd like to see this code in 4.3.2/4.3.3?, and if it doesn't blow up,
 replace the 'apache2filter' as the default apache2 SAPI in a month or two.

Our policy is not to merge new things to stable branches (which is 
PHP_4_3 now).

 Can I check this into PHP_4  PHP_4_3 ?

Nope :)

Derick



-- 
- For Sale! -


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



Re: [PHP-DEV] Apache2 SAPI

2003-03-06 Thread Ian Holsman
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Jani Taskinen wrote:
| I think it would be okay to just replace the apache2filter
| with apache2handler altogether..since the former does not
| work as well anyway.
|
| Are there any differences how it is setup in http.conf btw?
no.. not now
but in previous versions of the setup, it was using
SetOutputFilter PHP
SetInputFilter PHP
which won't work.
the current implementation doesn't use this method..
|
| --Jani
|
|
|
| On Thu, 6 Mar 2003, Derick Rethans wrote:
|
|
|On Thu, 6 Mar 2003, Ian Holsman wrote:
|
|
|I've been using the apache2handler on two low/medium-traffic sites for a
|while and it appears ok to me.
|
|now.. I'm new to this list, and really don't know how it works, so
|excuse me if this is a FAQ or something.
|
|I'd like to see this code in 4.3.2/4.3.3?, and if it doesn't blow up,
|replace the 'apache2filter' as the default apache2 SAPI in a month or
two.
|
|Our policy is not to merge new things to stable branches (which is
|PHP_4_3 now).
|
|
|Can I check this into PHP_4  PHP_4_3 ?
|
|Nope :)
|
|Derick
|
|
|
|
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.1 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQE+Z4sOq3pgvCz4ZCcRArKkAJ4kZqsuKC3smPNe7MaR3fbu3SZjsACfbfFe
fIxhq1Tu5C2LJMESNDKGdUc=
=RTsX
-END PGP SIGNATURE-
--
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP-DEV] Apache2 SAPI

2003-03-06 Thread Jani Taskinen
On Thu, 6 Mar 2003, Ian Holsman wrote:

Jani Taskinen wrote:
| I think it would be okay to just replace the apache2filter
| with apache2handler altogether..since the former does not
| work as well anyway.
|
| Are there any differences how it is setup in http.conf btw?

no.. not now
but in previous versions of the setup, it was using
SetOutputFilter PHP
SetInputFilter PHP
which won't work.
the current implementation doesn't use this method..

So currently, there's no difference how you setup
apache2filter or apache2handler in httpd.conf ??

If so, then IMO, we should just replace the apache2filter
with apache2handler altogether. Also in 4.3.x branch.

And make the configure option --with-apxs2.. :)

--Jani



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



Re: [PHP-DEV] Apache2 SAPI

2003-03-06 Thread Peter Neuman
Hi,

Jani Taskinen [EMAIL PROTECTED] wrote:
 And make the configure option --with-apxs2.. :)

Do you have an idea when --with-apache2 comes?
thus which one can install the Apache2 also without DSO/CGI support?
As with the Apache1 (--with-apache)... 

Thanks
Peter Neuman

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



[PHP-DEV] XMLSec support in PHP

2003-03-06 Thread Mark J. Hershenson
I use libxml2 in PHP as almost a daily task, and I love it, but as my
company is going further and further into XML as a data transport/storage
format, I've become piqued at the idea of actually using xmlsec to securely
store and/or transfer our files and RPC data.

I know that there is an xmlsec project (http://www.aleksey.com/xmlsec/)
which is building off of or related to both libxml2 and OpenSSL, so I was
curious if anyone had started work to expose xmlsec functionality to PHP. I
know the xmlsec project listed above is fairly early on in its development,
but if someone knew of a proof of concept implementation of xmlsec in PHP,
I'd love to play with it.

If there isn't, has anyone started such a project, or are planning to?

Just curious. Thanks!

Mark J. Hershenson
[EMAIL PROTECTED]
http://green-ant.com/


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



[PHP-DEV] CVS Account Request: moodeey

2003-03-06 Thread Mahmoud Hazem
I'm programing php , and I would join php.net Development team .

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



[PHP-DEV] CVS Account Request: vbzoom

2003-03-06 Thread Khaled Mamdouh
PHP development

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



Re: [PHP-DEV] fun with autoconf on Tru64

2003-03-06 Thread David Hill

  Thanks ! That does help some. I don't get the buildconf warnings
now,
  but I am still getting shell syntax errors in the resulting
configure
  script. arrrgh :-p

 Make sure that autoconf-2.13 is completely reinstalled
 (including rm -rf autoconf-2.13).  Otherwise, the frozen
 files which were generated using m4-1.4o cause problems.

Thanks, I did purge my tools tree and rebuilt all of them.

Moving on to the next bug, it would seem that flex changed how it
reports versions differently

# ./flex --version
./flex version 2.5.4

# ./flex --version
flex 2.5.27

and the code that checks for the right flex will work right with 2.5.4
but not with 2.5.27, the result is a set command with no args which
causes my env to be burped out. The change is needed in configure.in
(I think).

So I backed up to flex 2.5.4 :-p

After that, I get a syntax error related to ext/odbc/config.m4. Don't
understand why, but I get a script block that is missing the first
half of an if then else fi  construct. I tried working around this
by zeroing the config.m4 file, as I am not using odbc anyway, but that
only moved the problem down a module or two.

I set up a debian linux box and after getting the right versions of
things I am still getting the same results from configure. I am
getting a syntax error saying else unexpected.

I encountered what appears to be a typo in odbc/config.m4:
+  PHP_EVAL_LIBLINE([$ODBC_LFLAGS $ODBC_LIBS], OBDC_SHARED_LIBADD)
that should probably be ODBC, but it had nothing to do with my build
problem.

At this point I have spent about 10 hours on this and am no closer to
being able to build test my changes. Anyone have any ideas ? Anyone
want to send me a ./configure that works with HEAD ?

As I can only compile a part of the zend_parse_parameter changes I
have proposed,  I will becommiting them anyway in a moment. I will
also need to commit the OnUpdateInt/Long changes tommorow (friday) so
Jani can do the 4.3.2 kit.

Dave


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



[PHP-DEV] Threads in PHP5?

2003-03-06 Thread Daniel Skrach
Hello, php-dev mailing list members,

Just one short question: Are threads a planned feature for ZE2 / PHP5?

thanks for your answers. 

Daniel Skrach
[EMAIL PROTECTED]
2003-03-07



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



Re: [PHP-DEV] Threads in PHP5?

2003-03-06 Thread Timm Friebe
On Fri, 2003-03-07 at 02:02, Daniel Skrach wrote:
 Hello, php-dev mailing list members,
 
 Just one short question: Are threads a planned feature for ZE2 / PHP5?

AFAIK, no. 

You might want to have a look at
http://cvs.php.net/cvs.php/pear/PECL/threads though.

- Timm


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



Re: [PHP-DEV] Re: [PHP] Threading

2003-03-06 Thread Braulio José Solano Rojas
Hi!

Thanks all of you for your answers, especially to Dave Viner.  I will be
investigating on how to solve my problem.

Maybe someone of the core of PHP could point me on how to do mutual
exclusion because I've seen code like the following inside PHP (however I
don't know if I can use it):

tsrm_mutex_lock(tsmm_mutex);
...
tsrm_mutex_unlock(tsmm_mutex);

Anyway, I will analyze my problem using the information I have and the
answers I got.

Again, thanks for your answers on this topic.

Bye!

Braulio

Melvyn Sopacua [EMAIL PROTECTED] escribió en el mensaje
news:[EMAIL PROTECTED]
At 20:12 27-2-2003, Braulio José Solano Rojas wrote:

I already know about this functionality, but as you know this is only for
Unix.  And yes it matters if the semaphores are implemented in PHP since I
need portability between different OSes. (I like Inter-Process
Comunication,
I am sorry not to have it on win32).

You are? Well, then install it:
http://www.neuro.gatech.edu/users/cwilson/cygutils/cygipc/index.html


With kind regards,

Melvyn Sopacua
?php include(not_reflecting_employers_views.txt); ?



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



Re: [PHP-DEV] Apache2 SAPI

2003-03-06 Thread Ilia A.
On March 6, 2003 11:19 am, Derick Rethans wrote:
 Our policy is not to merge new things to stable branches (which is
 PHP_4_3 now).

True, however the apache2handler works much better then the existing 
apache2filter and as far as I can tell fixes at least 1 crash bug. There 
maybe more things it fixes, but I have not had the chance to test those yet.
The only things on my wishlist is some CS cleanup  better Apache info (akin 
to the one offered by Apache 1) and I hope to have a patch for those shortly.
The only possible issue that I see with apache2handler, is that is requires 
the very latest Apache 2, 2.0.44.

I think it would be in everyone's best interest if apache2handler was 
introduced in 4.3.X series  probably replace the current apache2filter all 
together.

Ilia

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



Re: [PHP-DEV] Fix for wordwrap()

2003-03-06 Thread Ilia A.
On March 6, 2003 06:52 am, Jedi/Sector One wrote:
   Hello.

   Maybe this is the intended behavior, but wordwrap()'s behavior is a bit
 illogical on PHP 4.3.1, as it does only break after a plain whitespace, not
 after punctuation, \n, etc.

   Here's a trivial sample :

 $a = ww\nphprules\nw;
 print wordwrap($a, 10, ' ', 10);

   Output :

 ww 
 p hprules
 ww ww w

   The following trivial patch makes wordwrap() wrap after any
 non-alphanumeric charater. Output after application of that patch :

 ww  phprules ww www

Seems like the expected behavior to me, you are hardcoding the 'break' as ' ', 
meaning that no other character is considered a space hence, \n are being 
treated as part of the string rather then a string separator.

Ilia

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



Re: [PHP-DEV] Apache2 SAPI

2003-03-06 Thread Jani Taskinen
On Thu, 6 Mar 2003, Ilia A. wrote:

On March 6, 2003 11:19 am, Derick Rethans wrote:
 Our policy is not to merge new things to stable branches (which is
 PHP_4_3 now).

True, however the apache2handler works much better then the existing 
apache2filter and as far as I can tell fixes at least 1 crash bug. There 
maybe more things it fixes, but I have not had the chance to test those yet.
The only things on my wishlist is some CS cleanup  better Apache info (akin 
to the one offered by Apache 1) and I hope to have a patch for those shortly.
The only possible issue that I see with apache2handler, is that is requires 
the very latest Apache 2, 2.0.44.

I don't think that's an issue. Everyone should be using 2.0.44 anyway,
as it fixes several security related bugs.

  http://www.apache.org/dist/httpd/Announcement2.html
 
(on windows, but still..)

I think it would be in everyone's best interest if apache2handler was 
introduced in 4.3.X series  probably replace the current apache2filter all 
together.

I'm big +1 on this as it can be considered as a FIX..
Let's just replace the other one with this new one.

--Jani



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



Re: [PHP-DEV] fun with autoconf on Tru64

2003-03-06 Thread Jani Taskinen
On Thu, 6 Mar 2003, David Hill wrote:

I encountered what appears to be a typo in odbc/config.m4:
+  PHP_EVAL_LIBLINE([$ODBC_LFLAGS $ODBC_LIBS], OBDC_SHARED_LIBADD)
that should probably be ODBC, but it had nothing to do with my build
problem.

Good catch..this closed (hopefully) at least one bug report. :)

--Jani



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



Re: [PHP-DEV] fun with autoconf on Tru64

2003-03-06 Thread Jani Taskinen
On Thu, 6 Mar 2003, David Hill wrote:

I set up a debian linux box and after getting the right versions of
things I am still getting the same results from configure. I am
getting a syntax error saying else unexpected.

With php5 module HEAD?
What line is the error at?
What does running the build/buildcheck.sh script output
for the tool versions?

--Jani



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



[PHP-DEV] Help a beginner out please!!

2003-03-06 Thread Ted Conn
Hi well maybe this isnt the right place to put a beginners post but I will
find out soon if its not I guess!

Anyway I am as newbie at PHP that one can get. I went to PHP.net for some
resources on how to get started and I downloaded a bunch of zip files and
basically followed their instructions but I am still way confused. Ok I
downloaded the PHP installer, and installed it, and I already had IIS
running under Win XP. So. I thought I had everything done, but then I
noticed that the instructions were for people working under Visual C++. Now
here are my questions:

1. Do I have to work in an environment or can I do it in notepad? Is it
easier to work in MVC++? Any suggestions here?
2. I downloaded all these configuration files and I was told to put them in
a folder called c:\work. Now, how do I get these files to run, and are they
necessary only if working under MVC++?
3. I tried to run the following PHP script, saved it as hello.php in my
inetpub\wwwroot directory (my clientside server directory):


html
 head
  titlePHP Test/title
 /head
 body
 ?php echo pHello World/p; ?
 /body
/html


I got the following error?

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


Am I even close to being done with PHP installation or is there a bunch more
configuration to be done?

If anybody can give me some suggestions or resources I will be greatly
thankful.

Thank you in advance,

Ted Conn



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



Re: [PHP-DEV] Help a beginner out please!!

2003-03-06 Thread George Schlossnagle
Wrong list.  You're looking for [EMAIL PROTECTED]  This is a 
list for the development of the language itself, not with it.

On Friday, March 7, 2003, at 12:44  AM, Ted Conn wrote:

Hi well maybe this isnt the right place to put a beginners post but I 
will
find out soon if its not I guess!


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


Re: [PHP-DEV] Apache2 SAPI

2003-03-06 Thread Derick Rethans
On Fri, 7 Mar 2003, Jani Taskinen wrote:

 I think it would be in everyone's best interest if apache2handler was 
 introduced in 4.3.X series  probably replace the current apache2filter all 
 together.
 
 I'm big +1 on this as it can be considered as a FIX..
 Let's just replace the other one with this new one.

Ok, I'm convinced now too :)

Derick

-- 
Stop mad cowboy disease!
-
 Derick Rethans http://derickrethans.nl/ 
 PHP Magazine - PHP Magazine for Professionals   http://php-mag.net/
-

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



Re: [PHP-DEV] Fix for wordwrap()

2003-03-06 Thread Jedi/Sector One
On Thu, Mar 06, 2003 at 09:53:22AM -0500, Ilia A. wrote:
 you are hardcoding the 'break' as ' ',
 meaning that no other character is considered a space hence

  The documentation states that 'break' is what is used to break lines, not
what is considered a space. 

  Simple try with PHP 4.3.1 :
  
$a = w\nphprules\nw;
print wordwrap($a, 10, 'br /', 10);

  Output :
  
wwbr /wwbr /w
phprbr /ules
wbr /

  Looks buggy to me.
  

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



[PHP-DEV] Re: [PHP-I18N] Help: Sablotron and Shift-jis

2003-03-06 Thread Moriyoshi Koizumi
It works for me. See the attached example. Anyway, you don't have to 
crosspost your question to [EMAIL PROTECTED], which is for developing 
php internals and irrelevant for such user questions.

Hope this helps

Moriyoshi


Michel Sahyoun [EMAIL PROTECTED] wrote:

 Does anyone have an example of using XSLT with Sablotron to transform and
 XML document containing Shift-jis encoded characters?
 
 I keep getting the following error message: Illegal Character for Encoding
 'Shift-jis'
 
 I am using the latest from snap.php.net and sablotron 0.97 FullPack with
 iconv, and Javascript.
 
 In my php file, I call xslt_set_encoding($xsltHandle, 'Shift-jis');
 My xsl file has xsl:output method=xml omit-xml-declaration=yes
 encoding=Shift-jis /
 My XML file has: ?xml version=1.0 encoding=Shift-jis ?
 
 Am I doing something wrong? Is the encoding name misspelled? Anything else I
 could check?
 
 Thanks,
 
 Michel
 
 
 
 -- 
 PHP Internationalization Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
?xml version=1.0 encoding=Shift_JIS ?
demo
  ‚ ‚Íaha/‚ ‚Í
  ‚¢‚Ðdef/‚¢‚Ð
  ‚¤‚Óghi/‚¤‚Ó
/demo
?php
$xp = xslt_create();
xslt_set_encoding($xp, Shift_JIS);

xslt_process($xp, test.xml.txt, test.xsl.txt, result.xml);
?
 
?xml version=1.0 encoding=Shift_JIS?
•\ xmlns=http://www.w3.org/TR/xhtml1/strict;
  •\—v‘f content=aha/
  •\—v‘f content=def/
  •\—v‘f content=ghi/
/•\
?xml version=1.0 encoding=Shift_JIS ?
xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform; 
  xsl:output method=xml indent=yes encoding=Shift_JIS /
  xsl:template match=demo
  •\
•\—v‘f content={‚ ‚Í} /
•\—v‘f content={‚¢‚Ð} /
•\—v‘f content={‚¤‚Ó} /
  /•\
  /xsl:template
/xsl:stylesheet
-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] Help: Sablotron and Shift-jis

2003-03-06 Thread Michel Sahyoun
Does anyone have an example of using XSLT with Sablotron to transform and
XML document containing Shift-jis encoded characters?

I keep getting the following error message: Illegal Character for Encoding
'Shift-jis'

I am using the latest from snap.php.net and sablotron 0.97 FullPack with
iconv, and Javascript.

In my php file, I call xslt_set_encoding($xsltHandle, 'Shift-jis');
My xsl file has xsl:output method=xml omit-xml-declaration=yes
encoding=Shift-jis /
My XML file has: ?xml version=1.0 encoding=Shift-jis ?

Am I doing something wrong? Is the encoding name misspelled? Anything else I
could check?

Thanks,

Michel



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



Re: [PHP-DEV] Help: Sablotron and Shift-jis

2003-03-06 Thread Marcus Börger
At 00:40 07.03.2003, Michel Sahyoun wrote:
Does anyone have an example of using XSLT with Sablotron to transform and
XML document containing Shift-jis encoded characters?
I keep getting the following error message: Illegal Character for Encoding
'Shift-jis'


You could try: SJIS and Shift_JIS keep letter cases.

marcus

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


Re: [PHP-DEV] Help: Sablotron and Shift-jis

2003-03-06 Thread Michel Sahyoun
Thanks.

But I have tried  SJIS and Shift_JIS in addition to a couple of other
combinations to no avail. I believe the problem might not be with the way
the encoding is spelled, but elsewhere.

If anyone has a working example of transforming an sjis or other eastern
language encoded xml document, that would be of great help.

Michel

Marcus Börger [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 At 00:40 07.03.2003, Michel Sahyoun wrote:
 Does anyone have an example of using XSLT with Sablotron to transform and
 XML document containing Shift-jis encoded characters?
 
 I keep getting the following error message: Illegal Character for
Encoding
 'Shift-jis'


 You could try: SJIS and Shift_JIS keep letter cases.

 marcus




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



Re: [PHP-DEV] Issues in passing session data

2003-03-05 Thread Derick Rethans
Hello,

please forward user questions to the [EMAIL PROTECTED]
mailinglist, this list is for development _OF_ PHP, not development
_with_ PHP.

Derick

On Wed, 5 Mar 2003, Hantzley wrote:

 Hi php users,
 I have some questions regarding the way developers uses php sessions.
 For instance, most developers uses session_start() on top of every page. The
 problem is that after visiting each page, a new session file is created on
 the server. Now i made a web application that uses the start_session
 function on top of every page as follows:
 
 ?
   if ($PHPSESSID){
session_start($PHPSESSID);
if (session_is_registered('valid_user')){
 ?
 
 and it works. But now only one session file is created on the server.
 
 Is this the best way of passing session data??
 
 Hantzley
 
 
 
 

-- 
Stop mad cowboy disease!
-
 Derick Rethans http://derickrethans.nl/ 
 PHP Magazine - PHP Magazine for Professionals   http://php-mag.net/
-

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



Re: [PHP-DEV] [PATCH] - 64 bit issue with zend_parse_parameters calls

2003-03-05 Thread David Hill

 Just commit these..

I will - give me a couple of days though - given that it is my first
commit with php I want to triple check that I have got the process
correct before I push the button :-)

Dave


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



Re: [PHP-DEV] [PATCH] - fix for 64 bit issues with OnUpdateInt

2003-03-05 Thread David Hill

 A single API is probably sufficient but I can understand that extension 
 writers might want to use ints. The INI flag might have nothing to do with 
 an internal zval and an int might be more than enough.
 I don't really mind but I wouldn't introduce OnUpdateInteger.
 I guess we should either move everything to OnUpdateLong() and nuke 
 OnUpdateInt() in ZE2 or we change OnUpdateInt to work with ints and fix the 
 whole code.


 It might be less confusing to just have one.

I agree about the confusing part. My suggestion is:

 *  we leave OnUpdateInt as is currently for BC, deprecating it now, removing it in (? 
php 5.x == ZE2 ?)

 *  convert everything in the code base to OnUpdateLong, which means I change the 
arguments passed into the call where needed (yipee I get to do another code sweep :-) 
This fixes the symantic problem and sets the stage for how to proceed in the future.

 * update the documentation with a note reminding people that int and long are not the 
same thing, both for OnUpdateInt and for zend_parse_parameters (I found 
zend_parse_parameters in the docs but not OnUpdateInt, any hints ?)

I *think* this would work with all of the comments I have seen on this issue. I will 
start coding today, and if people are ok with it I will commit on Friday (to allow 
time for comment) so that Jani can move on 4.3.2. 

dave

Re: [PHP-DEV] [PATCH] imagesavealpha()

2003-03-05 Thread Ilia A.
On March 5, 2003 12:18 am, Steven Brown wrote:
 I went to update the official gd library with my bug fixes so I could get
 them rolled back into PHP's without requiring PHP's gd diverge more, but it
 appears between the time PHP bundled gd and now that the gd people have
 fixed the most important of the truecolor problems that my patch used to
 fix - 2.0.11 managed to generate a truecolor boolean-transparent png.
 Problem is, PHP's bundled gd still fails.  I poked around PHP's CVS, and
 the bundled libgd reports having already been synched with 2.0.11, but
 something must have been missed as it fails like pre-2.0.11.  I'll try and
 look at what might have been missed in the sync when I get some more time. 
 For now, I've added it as a bug, http://bugs.php.net/22544 .

The bundled gd in php 5.0 has been sycnched with gd 2.0.11, this was not done 
for version 4.3.2.

Ilia

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



Re: [PHP-DEV] Modifying PHP variables in C

2003-03-05 Thread John Lim
Hi Moriyoshi
Thanks for the advice!

Moriyoshi Koizumi [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 You should use zval_ptr_dtor() to dispose the old value. Note the old
 value won't actually be freed as long as any reference to the variable is
 alive.




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



[PHP-DEV] pg_lo_open and object creation... intended behavior?

2003-03-05 Thread David Brown
Hi:

This is an excerpt from ext/pgsql/pgsql.c, in pg_lo_open:

---
if (strchr(mode_string, 'w') == mode_string) {
pgsql_mode |= INV_WRITE;
create = 1;
if (strchr(mode_string, '+') == mode_string+1) {
pgsql_mode |= INV_READ;
}
}

pgsql_lofp = (pgLofp *) emalloc(sizeof(pgLofp));

if ((pgsql_lofd = lo_open(pgsql, oid, pgsql_mode)) == -1) {
if (create) {
if ((oid = lo_creat(pgsql, INV_READ|INV_WRITE)) == 0) {
efree(pgsql_lofp);
php_error_docref(NULL TSRMLS_CC, E_WARNING,
 Unable to create PostgreSQL large object.);
RETURN_FALSE;
} else {
if ((pgsql_lofd = lo_open(pgsql, oid, pgsql_mode)) == -1) {
if (lo_unlink(pgsql, oid) == -1) {
efree(pgsql_lofp);
...
}

  ... registers resource and returns ...
---

If I'm reading this correctly, it looks like a call to pg_lo_open (with
an object identifier specified explicitly in $oid) can theoretically
return a file handle pointing to a different, newly-created large
object in the case that the initial open failed.

If this is the case, it seems unintuitive and very cumbersome to handle
from user-space. Can we change the 'if (create) {' branch to only be
triggered when the oid was left unset (ensuring that the open() failure
actually gets back to the caller)?


Best Regards,

- Dave
  [EMAIL PROTECTED]

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



[PHP-DEV] Question about zend_compile

2003-03-05 Thread John Coggeshall

I'm playing around with the compiler/executor and I was wondering if
someone could answer a question.. 

Is there any reasonable way to essentially push/pop the function table?
What I'd like to do is get a function_table hash for only a single file
(pesudo code below):

PUSH_FUNCTION_TABLE(CG(function_table))
Op_array = zend_compile_file(fh, ZEND_REQUIRE);

/* retrieve information from the function_table 
about the functions in the fh handle only*/

POP_FUNCTION_TABLE(CG(function_table))

Specifically, I'd like to get the zend_function structures for the
user-defined functions declared inside of myfile.php... Basically my
problem is I have a userspace get_func_info($filename) function which
works great when retrieving information from the function table after
zend_compile_file(), but I end up having more functions than I wanted
since every user-defined function regardless of file (including the file
I'm in) is in the hash... i.e.

Myscript.php
?php
function foo() {

}
/* supposed to return an array based 
   on the function declarations in myfile.php, but it includes
foo() because it's already in the function table when zend
compiled this script. */
$info = get_func_info(myfile.php) 
?

It seems to me that this is exactly the sort of thing I would want to
use namespaces for, is there a elequent way to create a new namespace
from within my C function temporarily between when my function is called
and returns?

Suggestions? 

John



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



Re: [PHP-DEV] Question about zend_compile

2003-03-05 Thread George Schlossnagle
Look at apc.  It tracks per-file function and class tables.

http://apc.communityconnect.com/  (v2.0)
pear/PECL/apc (v1.x)
Both versions do the thing you wish for.

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


[PHP-DEV] FYI: PHP/threads

2003-03-05 Thread Timm Friebe
I've been playing around with the (not new) idea of introducing threads
into PHP userland (maybe something to think about havin in PHP6?). What
came out of it is available at [1], offering an object oriented API (in
comparison to PECL/threads [2]).

Threads would quite likely come in handy in the following situations:
- GTK-PHP thin network client application polling a socket for events
  (e.g., IRC client)

- Multiple simultaneous connections to slow services (for instance,
  think of whois + check multiple domain names).

Both of these examples could be realized using fork() or
socket_select(), though the first is not portable and the latter
produces unnecessary overhead.

Maybe someone here would like to pick up on this idea or give some
directions to what would have to be done to make this actually work
dependably. I'm experiencing the same issues as with PECL/threads -
variable confusion (local function arguments with same names in two
threads affect each other), Engine unstability (Warning: ... in ... on
line -18182899), but could get a couple of samples[3] to work quite
well.

Maybe the userland API could be adopted by PECL/threads? Is anyone still
working at this or was development given up?

1] http://sitten-polizei.de/php/threads-0.1alpha.tar.gz
2] http://cvs.php.net/cvs.php/pear/PECL/threads
3] http://sitten-polizei.de/php/threads/tests/?file=mythread.php
   http://sitten-polizei.de/php/threads/tests/?file=timer.php
   http://sitten-polizei.de/php/threads/tests/?file=simple.php
   http://sitten-polizei.de/php/threads/tests/?file=calendar.php
   etc.

- Timm
Threads for PHP

$Id$

1. API:
---
The thread API for PHP was designed to assemble that of Java (see
API documentation for lang.Thread).

2. Usage:
-
To create a thread, subclass the Thread class (defined in threads.c)
and overwrite its run() method. Put any code to be executed into this
function.

3. Basic example:
-
?php
  class MyThread extends Thread {
public function run() {
  print(thread init\n);
  sleep(4);
  print(thread finished\n);
}
  }
  
  $m= new MyThread();
  $m-start();
  
  // Wait for thread
  print(main\n);
  sleep(5);
  print(main done\n);
?

For more examples, see the tests/ subdirectory.

3.1. Example scripts output:


mythread.php (the sourcecode above)
| thread init
| main
| thread finished
| main done

timer.php (schedule reminder to alert in five seconds from now)
| About to schedule task.
| Task scheduled at 18:33:59.
| 18:33:59
| 18:34:00
| 18:34:01
| 18:34:02
| 18:34:03
| Reminder: It's now 18:34:04!
| 18:34:04
| Done.

calendar.php (schedule three tasks to alter in 2, 5 and 8 seconds from now)
| About to schedule tasks.
| Tasks scheduled at 18:34:35.
| 18:34:35
| 18:34:36
| Reminder: It's now 18:34:37, Buy food
| 18:34:37
| 18:34:38
| 18:34:39
| Reminder: It's now 18:34:40, Cook it
| 18:34:40
| 18:34:41
| 18:34:42
| Reminder: It's now 18:34:43, Meal done
| 18:34:43
| 18:34:44
| Done.

consumer_producer.php (demonstrate wait/notify)
|  Producer put 0 into resource #0
|  Consumer got 0 from resource #0
|  Producer put 1 into resource #0
|  Consumer got 1 from resource #0
|  Producer put 2 into resource #0
|  Consumer got 2 from resource #0
|  Producer put 3 into resource #0
|  Consumer got 3 from resource #0
|  Producer put 4 into resource #0
|  Consumer got 4 from resource #0
|  Producer put 5 into resource #0
|  Consumer got 5 from resource #0
|  Producer put 6 into resource #0
|  Consumer got 6 from resource #0
|  Producer put 7 into resource #0
|  Consumer got 7 from resource #0
|  Producer put 8 into resource #0
|  Consumer got 8 from resource #0
|  Producer put 9 into resource #0
|  Consumer got 9 from resource #0
| ### Done

hostcheck.php (NOT WORKING CORRECTLY, threads do not get joined)
| --- Trying test.edu:443
| --- Trying php3.de:25
| --- Trying blup.blop:1010
| --- Trying localhost:80
| --- Trying localhost:6100
|   -ERR test.edu:443 [-1078991188]: getaddrinfo: null result pointer
|   +OK php3.de:25
|   -ERR blup.blop:1010 [-1079200356]: getaddrinfo: null result pointer
| === Destruct thread for blup.blop:1010
|   +OK localhost:80
| === Destruct thread for localhost:80
|   -ERR localhost:6100 [61]: Connection refused
| === Destruct thread for localhost:6100
| DONE
| === Destruct thread for test.edu:443
| === Destruct thread for php3.de:25

The ideas for the examples were taken from
http://java.sun.com/docs/books/tutorial/essential/threads/index.html

4. Problems:

- Mysterious things happen at the moment: E.g., global variables dissapear,
  fatal errors in run() lead to a failed longjmp() and therefore to Abort
  trap, join() doesn't return the correct value (mostly returning NULL:
  I guess this has to do with the thread's EG(retval_ptr_ptr) overwriting
  one another(?)).
  
- This does NOT work with ZTS, there are 

[PHP-DEV] Re: [Zend Engine 2] FYI: PHP/threads

2003-03-05 Thread George Schlossnagle
Both of these examples could be realized using fork() or
socket_select(), though the first is not portable and the latter
produces unnecessary overhead.


Just to nit-pick: non-blocking io is much more efficient than threads,

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


[PHP-DEV] modules in c++

2003-03-05 Thread Michel M. dos Santos


Hi,

I've been trying use C++ within a PHP extension with help by document in  
http://www.tutorbuddy.com/software/phpcpp/phpcpp/. 
The instructions works fine but I have problems with linking objects. The 
script libtool links objects with gcc and not with g++ and  the moment of 
creation of the dinamic library .so gcc is used and not g++.

See:

/bin/sh /root/biac_php/teste/libtool --mode=link gcc  -I.
 ^^^  
-I/root/biac_php/teste/ -I/root/biac_php/teste/main -I/root/biac_php/teste 
-I/usr/include/php4 -I/usr/include/php4/main -I/usr/include/php4/Zend 
-I/usr/include/php4/TSRM  -DHAVE_CONFIG_H -g -O2   -o teste.la -avoid-version 
-module -rpath /root/biac_php/teste/modules   teste.lo

gcc -shared  teste.lo   -Wl,-soname -Wl,teste.so -o .libs/teste.so
^^^

Thanks,

Michel M. dos Santos


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



[PHP-DEV] Re: modules in c++

2003-03-05 Thread J Smith

That should still work fine, though, shouldn't it? I mean, the .so spit out
should be working properly. I just tested this with a C++ extension and
while gcc was used by libtool for the linking, the extension works fine.

If you really want the C++ compiler to do the linking, you can open up
libtool file that's generated and edit the line that reads CC=gcc to say
CC=g++. I'm not sure if there's a better way to do this. At least, I
haven't found one yet. If you find something that works a bit better, let
me know and I'll update the article.

J


Michel M. Dos Santos wrote:

 
 
 Hi,
 
 I've been trying use C++ within a PHP extension with help by document in
 http://www.tutorbuddy.com/software/phpcpp/phpcpp/.
 The instructions works fine but I have problems with linking objects. The
 script libtool links objects with gcc and not with g++ and  the moment of
 creation of the dinamic library .so gcc is used and not g++.
 
 See:
 
 /bin/sh /root/biac_php/teste/libtool --mode=link gcc  -I.
  ^^^
 -I/root/biac_php/teste/ -I/root/biac_php/teste/main -I/root/biac_php/teste
 -I/usr/include/php4 -I/usr/include/php4/main -I/usr/include/php4/Zend
 -I/usr/include/php4/TSRM  -DHAVE_CONFIG_H -g -O2   -o teste.la
 -avoid-version
 -module -rpath /root/biac_php/teste/modules   teste.lo
 
 gcc -shared  teste.lo   -Wl,-soname -Wl,teste.so -o .libs/teste.so
 ^^^
 
 Thanks,
 
 Michel M. dos Santos


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



Re: [PHP-DEV] Re: modules in c++

2003-03-05 Thread Michel M. dos Santos


J,

First, thanks by your article. My original e first problem is :

PHP Warning:  Unable to load dynamic library 
'/usr/lib/php4/20010901/biac.so' - /usr/lib/php4/20010901/biac.so: undefined 
symbol: endl__FR7ostream in Unknown on line 0

The use of cout (in this case) result it. I try with std::cout or using 
namespace std but not resolve. Linking with g++ the error dont occur. 

What is wrong ?

Thanks a lot,

Michel M. dos Santos



On Wednesday 05 March 2003 17:23, J Smith wrote:
 That should still work fine, though, shouldn't it? I mean, the .so spit out
 should be working properly. I just tested this with a C++ extension and
 while gcc was used by libtool for the linking, the extension works fine.

 If you really want the C++ compiler to do the linking, you can open up
 libtool file that's generated and edit the line that reads CC=gcc to say
 CC=g++. I'm not sure if there's a better way to do this. At least, I
 haven't found one yet. If you find something that works a bit better, let
 me know and I'll update the article.

 J

 Michel M. Dos Santos wrote:
  Hi,
 
  I've been trying use C++ within a PHP extension with help by document in
  http://www.tutorbuddy.com/software/phpcpp/phpcpp/.
  The instructions works fine but I have problems with linking objects. The
  script libtool links objects with gcc and not with g++ and  the moment of
  creation of the dinamic library .so gcc is used and not g++.
 
  See:
 
  /bin/sh /root/biac_php/teste/libtool --mode=link gcc  -I.
   ^^^
  -I/root/biac_php/teste/ -I/root/biac_php/teste/main
  -I/root/biac_php/teste -I/usr/include/php4 -I/usr/include/php4/main
  -I/usr/include/php4/Zend -I/usr/include/php4/TSRM  -DHAVE_CONFIG_H -g -O2
-o teste.la
  -avoid-version
  -module -rpath /root/biac_php/teste/modules   teste.lo
 
  gcc -shared  teste.lo   -Wl,-soname -Wl,teste.so -o .libs/teste.so
  ^^^
 
  Thanks,
 
  Michel M. dos Santos

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



RE: [PHP-DEV] Re: modules in c++

2003-03-05 Thread Dave Viner
do you have the PHP_REQUIRE_CXX() in your config.m4?

dave


-Original Message-
From: Michel M. dos Santos [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 05, 2003 12:43 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: [PHP-DEV] Re: modules in c++




J,

First, thanks by your article. My original e first problem is :

PHP Warning:  Unable to load dynamic library
'/usr/lib/php4/20010901/biac.so' - /usr/lib/php4/20010901/biac.so: undefined
symbol: endl__FR7ostream in Unknown on line 0

The use of cout (in this case) result it. I try with std::cout or using
namespace std but not resolve. Linking with g++ the error dont occur.

What is wrong ?

Thanks a lot,

Michel M. dos Santos



On Wednesday 05 March 2003 17:23, J Smith wrote:
 That should still work fine, though, shouldn't it? I mean, the .so spit
out
 should be working properly. I just tested this with a C++ extension and
 while gcc was used by libtool for the linking, the extension works fine.

 If you really want the C++ compiler to do the linking, you can open up
 libtool file that's generated and edit the line that reads CC=gcc to say
 CC=g++. I'm not sure if there's a better way to do this. At least, I
 haven't found one yet. If you find something that works a bit better, let
 me know and I'll update the article.

 J

 Michel M. Dos Santos wrote:
  Hi,
 
  I've been trying use C++ within a PHP extension with help by document in
  http://www.tutorbuddy.com/software/phpcpp/phpcpp/.
  The instructions works fine but I have problems with linking objects.
The
  script libtool links objects with gcc and not with g++ and  the moment
of
  creation of the dinamic library .so gcc is used and not g++.
 
  See:
 
  /bin/sh /root/biac_php/teste/libtool --mode=link gcc  -I.
   ^^^
  -I/root/biac_php/teste/ -I/root/biac_php/teste/main
  -I/root/biac_php/teste -I/usr/include/php4 -I/usr/include/php4/main

 -I/usr/include/php4/Zend -I/usr/include/php4/TSRM  -DHAVE_CONFIG_H -g -O2
-o teste.la
  -avoid-version
  -module -rpath /root/biac_php/teste/modules   teste.lo
 
  gcc -shared  teste.lo   -Wl,-soname -Wl,teste.so -o .libs/teste.so
  ^^^
 
  Thanks,
 
  Michel M. dos Santos

--
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] Re: modules in c++

2003-03-05 Thread Michel M. dos Santos

Yes.

My config.m4:


PHP_ARG_ENABLE(biac, for biac support,[ --enable-biacEnable biac 
support])

if test $PHP_BIAC != no ; then
 PHP_ADD_LIBRARY(stdc++)
 PHP_EXTENSION(biac,$ext_shared)
 PHP_REQUIRE_CXX()
fi

Michel M. dos Santos



On Wednesday 05 March 2003 18:01, Dave Viner wrote:
 do you have the PHP_REQUIRE_CXX() in your config.m4?

 dave


 -Original Message-
 From: Michel M. dos Santos [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, March 05, 2003 12:43 PM
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Subject: Re: [PHP-DEV] Re: modules in c++




   J,

   First, thanks by your article. My original e first problem is :

   PHP Warning:  Unable to load dynamic library
 '/usr/lib/php4/20010901/biac.so' - /usr/lib/php4/20010901/biac.so:
 undefined symbol: endl__FR7ostream in Unknown on line 0

   The use of cout (in this case) result it. I try with std::cout or using
 namespace std but not resolve. Linking with g++ the error dont occur.

   What is wrong ?

   Thanks a lot,

 Michel M. dos Santos

 On Wednesday 05 March 2003 17:23, J Smith wrote:
  That should still work fine, though, shouldn't it? I mean, the .so spit

 out

  should be working properly. I just tested this with a C++ extension and
  while gcc was used by libtool for the linking, the extension works fine.
 
  If you really want the C++ compiler to do the linking, you can open up
  libtool file that's generated and edit the line that reads CC=gcc to
  say CC=g++. I'm not sure if there's a better way to do this. At least,
  I haven't found one yet. If you find something that works a bit better,
  let me know and I'll update the article.
 
  J
 
  Michel M. Dos Santos wrote:
   Hi,
  
   I've been trying use C++ within a PHP extension with help by document
   in http://www.tutorbuddy.com/software/phpcpp/phpcpp/.
   The instructions works fine but I have problems with linking objects.

 The

   script libtool links objects with gcc and not with g++ and  the moment

 of

   creation of the dinamic library .so gcc is used and not g++.
  
   See:
  
   /bin/sh /root/biac_php/teste/libtool --mode=link gcc  -I.
^^^
   -I/root/biac_php/teste/ -I/root/biac_php/teste/main
   -I/root/biac_php/teste -I/usr/include/php4 -I/usr/include/php4/main
 
  -I/usr/include/php4/Zend -I/usr/include/php4/TSRM  -DHAVE_CONFIG_H -g -O2
 
 -o teste.la
   -avoid-version
   -module -rpath /root/biac_php/teste/modules   teste.lo
  
   gcc -shared  teste.lo   -Wl,-soname -Wl,teste.so -o .libs/teste.so
   ^^^
  
   Thanks,
  
   Michel M. dos Santos

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



RE: [PHP-DEV] Re: modules in c++

2003-03-05 Thread Dave Viner
with that config.m4, running:
% phpize  ./configure --enable-biac=shared  make

should yield this:
/bin/bash dir/libtool --mode=compile g++

is that the case or not?

dave

-Original Message-
From: Michel M. dos Santos [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 05, 2003 1:04 PM
To: Dave Viner; [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: [PHP-DEV] Re: modules in c++



Yes.

My config.m4:


PHP_ARG_ENABLE(biac, for biac support,[ --enable-biacEnable biac
support])

if test $PHP_BIAC != no ; then
 PHP_ADD_LIBRARY(stdc++)
 PHP_EXTENSION(biac,$ext_shared)
 PHP_REQUIRE_CXX()
fi

Michel M. dos Santos



On Wednesday 05 March 2003 18:01, Dave Viner wrote:
 do you have the PHP_REQUIRE_CXX() in your config.m4?

 dave


 -Original Message-
 From: Michel M. dos Santos [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, March 05, 2003 12:43 PM
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Subject: Re: [PHP-DEV] Re: modules in c++




   J,

   First, thanks by your article. My original e first problem is :

   PHP Warning:  Unable to load dynamic library
 '/usr/lib/php4/20010901/biac.so' - /usr/lib/php4/20010901/biac.so:
 undefined symbol: endl__FR7ostream in Unknown on line 0

   The use of cout (in this case) result it. I try with std::cout or using
 namespace std but not resolve. Linking with g++ the error dont occur.

   What is wrong ?

   Thanks a lot,

 Michel M. dos Santos

 On Wednesday 05 March 2003 17:23, J Smith wrote:
  That should still work fine, though, shouldn't it? I mean, the .so spit

 out

  should be working properly. I just tested this with a C++ extension and
  while gcc was used by libtool for the linking, the extension works fine.
 
  If you really want the C++ compiler to do the linking, you can open up
  libtool file that's generated and edit the line that reads CC=gcc to
  say CC=g++. I'm not sure if there's a better way to do this. At least,
  I haven't found one yet. If you find something that works a bit better,
  let me know and I'll update the article.
 
  J
 
  Michel M. Dos Santos wrote:
   Hi,
  
   I've been trying use C++ within a PHP extension with help by document
   in http://www.tutorbuddy.com/software/phpcpp/phpcpp/.
   The instructions works fine but I have problems with linking objects.

 The

   script libtool links objects with gcc and not with g++ and  the moment

 of

   creation of the dinamic library .so gcc is used and not g++.
  
   See:
  
   /bin/sh /root/biac_php/teste/libtool --mode=link gcc  -I.
^^^
   -I/root/biac_php/teste/ -I/root/biac_php/teste/main
   -I/root/biac_php/teste -I/usr/include/php4 -I/usr/include/php4/main
 

 -I/usr/include/php4/Zend -I/usr/include/php4/TSRM  -DHAVE_CONFIG_H -g -O2
 
 -o teste.la
   -avoid-version
   -module -rpath /root/biac_php/teste/modules   teste.lo
  
   gcc -shared  teste.lo   -Wl,-soname -Wl,teste.so -o .libs/teste.so
   ^^^
  
   Thanks,
  
   Michel M. dos Santos

--
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] Re: modules in c++

2003-03-05 Thread J Smith

Looks like you need to link to the standard C++ library. Try putting this in
your config.m4 file:

PHP_ADD_LIBRARY(stdc++)

And run phpize, configure and make again. That should make gcc link with
stdc++. 

J


Michel M. Dos Santos wrote:

 
 
 J,
 
 First, thanks by your article. My original e first problem is :
 
 PHP Warning:  Unable to load dynamic library
 '/usr/lib/php4/20010901/biac.so' - /usr/lib/php4/20010901/biac.so:
 undefined symbol: endl__FR7ostream in Unknown on line 0
 
 The use of cout (in this case) result it. I try with std::cout or using
 namespace std but not resolve. Linking with g++ the error dont occur.
 
 What is wrong ?
 
 Thanks a lot,
 
 Michel M. dos Santos
 
 
 


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



Re: [PHP-DEV] Re: modules in c++

2003-03-05 Thread J Smith

Actually, try this instead of PHP_ADD_LIBRARY(stdc++) and see if that
works...

PHP_ADD_LIBRARY(stdc++, 1, BIAC_SHARED_LIBADD)

J


Michel M. Dos Santos wrote:

 
 Yes.
 
 My config.m4:
 
 
 PHP_ARG_ENABLE(biac, for biac support,[ --enable-biacEnable biac
 support])
 
 if test $PHP_BIAC != no ; then
  PHP_ADD_LIBRARY(stdc++)
  PHP_EXTENSION(biac,$ext_shared)
  PHP_REQUIRE_CXX()
 fi
 
 Michel M. dos Santos
 
 
 


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



Re: [PHP-DEV] Re: modules in c++

2003-03-05 Thread Sascha Schumann
Please supply 1 as the 6th argument to PHP_NEW_EXTENSION.

- Sascha

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



[PHP-DEV] Doing something with an each opcode as zend_execute() handles it

2003-03-05 Thread David Sklar
Just before zend_execute()/execute() handles each opcode in its big switch()
statement, I'd like to be able to call a function and pass it the opcode (or
other information from the opline.

Is the best approach to reset zend_execute to a new function in the
PHP_MINIT_FUNCTION() (and restore the saved value in
PHP_MSHUTDOWN_FUNCTION)? This new function would mostly be a copy of
execute() in zend_execute.c with my addtional function call tossed in.

What's the difference between zend_execute() and zend_execute_internal()?

Thanks,
David


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



Re: [PHP-DEV] Doing something with an each opcode as zend_execute() handles it

2003-03-05 Thread Sterling Hughes
 Just before zend_execute()/execute() handles each opcode in its big switch()
 statement, I'd like to be able to call a function and pass it the opcode (or
 other information from the opline.
 
 Is the best approach to reset zend_execute to a new function in the
 PHP_MINIT_FUNCTION() (and restore the saved value in
 PHP_MSHUTDOWN_FUNCTION)? This new function would mostly be a copy of
 execute() in zend_execute.c with my addtional function call tossed in.
 
 What's the difference between zend_execute() and zend_execute_internal()?
 

Well, I have a feeling what you are talking about is sub-optimal, what
do you want to do?

-Sterling

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

-- 
Reductionists like to take things apart.  The rest of us are
 just trying to get it together.
- Larry Wall, Programming Perl, 3rd Edition

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



RE: [PHP-DEV] Doing something with an each opcode as zend_execute() handles it

2003-03-05 Thread David Sklar
On Wednesday, March 05, 2003 5:35 PM, Sterling Hughes wrote:

 Just before zend_execute()/execute() handles each opcode in its big
 switch() statement, I'd like to be able to call a function and pass
 it the opcode (or other information from the opline.

 Is the best approach to reset zend_execute to a new function in the
 PHP_MINIT_FUNCTION() (and restore the saved value in
 PHP_MSHUTDOWN_FUNCTION)? This new function would mostly be a copy of
 execute() in zend_execute.c with my addtional function call tossed
 in.

 What's the difference between zend_execute() and
 zend_execute_internal()?


 Well, I have a feeling what you are talking about is sub-optimal,
 what do you want to do?

Essentially, I want to be able to produce a sort of serialized
representation of the opcodes, but as they are executed, not all in one big
chunk after they are compiled.

This isn't for any actually useful production code, just some
debugging/messing around/exploring engine internals.

David


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



Re: [PHP-DEV] Doing something with an each opcode as zend_execute() handles it

2003-03-05 Thread Sterling Hughes
 On Wednesday, March 05, 2003 5:35 PM, Sterling Hughes wrote:
 
  Just before zend_execute()/execute() handles each opcode in its big
  switch() statement, I'd like to be able to call a function and pass
  it the opcode (or other information from the opline.
 
  Is the best approach to reset zend_execute to a new function in the
  PHP_MINIT_FUNCTION() (and restore the saved value in
  PHP_MSHUTDOWN_FUNCTION)? This new function would mostly be a copy of
  execute() in zend_execute.c with my addtional function call tossed
  in.
 
  What's the difference between zend_execute() and
  zend_execute_internal()?
 
 
  Well, I have a feeling what you are talking about is sub-optimal,
  what do you want to do?
 
 Essentially, I want to be able to produce a sort of serialized
 representation of the opcodes, but as they are executed, not all in one big
 chunk after they are compiled.
 
 This isn't for any actually useful production code, just some
 debugging/messing around/exploring engine internals.

I would suggest you take a look at Ze2's execution architecture, it
should allow you to do this.

-Sterling

 David

-- 
Reductionists like to take things apart.  The rest of us are
 just trying to get it together.
- Larry Wall, Programming Perl, 3rd Edition

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



<    1   2   3   4   5   6   7   8   9   10   >