Re: [PHP-DEV] PHP 4.3 and PHP 5

2002-08-22 Thread Kristian Koehntopp

Am Mittwoch, 21. August 2002 22:09 schrieb Shane Caraveo:
> Rasmus Lerdorf wrote:
> > production quality. The best we can do is pick a small set
> > of extensions and a small set of platforms and say that with
> > the limited set of extensions, against a specific set of
> > versions of addon libraries on a specific version of that
> > OS, yes, it should be production quality - maybe.

I believe the designers of the Roxen web server were in a similar 
situation as Roxen is threaded, too. They worked around this 
problem with wrapper functions that kept a per-library lock for 
each library that was not tested as threadsafe.

They gradually improved the granularity of their locks, and 
isolated threadsafe functions, improving performance.

How are the perl people handling this issue? I believe they are 
using the same libs as we do.

Kristian


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




Re: [PHP-DEV] PHP 4.3 and PHP 5

2002-08-22 Thread Sterling Hughes


> Am Mittwoch, 21. August 2002 22:09 schrieb Shane Caraveo:
>> Rasmus Lerdorf wrote:
>> > production quality. The best we can do is pick a small set
>> > of extensions and a small set of platforms and say that with
>> > the limited set of extensions, against a specific set of
>> > versions of addon libraries on a specific version of that
>> > OS, yes, it should be production quality - maybe.
>
> I believe the designers of the Roxen web server were in a similar
> situation as Roxen is threaded, too. They worked around this
> problem with wrapper functions that kept a per-library lock for
> each library that was not tested as threadsafe.
>
> They gradually improved the granularity of their locks, and
> isolated threadsafe functions, improving performance.
>

This is certainly an option, however, improving granularity does have some
problems, mainly that you can't always know, for example, with PostgreSQL
you'd have to analyze the SQL query to get true mutex granularity.  Also,
running a query, and halting all thread accesses per SQL query can make an
application go sloow, especially when its only one or
two (SQL) functions that actually require the mutex.

Yes, it is better than segfaulting :)

> How are the perl people handling this issue? I believe they are
> using the same libs as we do.
>

I'm not sure, I think they are either:

1) Mutexing the entire library
2) Not worrying about it, because Perl is threadsafe, it really depends on
the modules that you fetch from CPAN.

-Sterling



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




Re: [PHP-DEV] PHP 4.3 and PHP 5

2002-08-22 Thread Rasmus Lerdorf

Putting in locks is the easy part.  The tough part is finding which
libraries are safe and which ones aren't.  You can't really test for it as
thread bugs tend to be subtle, occur sporadically and get worse with load.
So who are we going to trick into testing this stuff for us on their
loaded production servers?  The only way to find this stuff is to sit down
and read the code very carefully.  Except of course when we don't have the
source for stuff.  Then what?

The Perl folks aren't really handling this yet and the Roxen guys don't
support nearly as many libraries as we do.

I have been pushing for some more attention to this problem within the ASF
and have tried to kickstart an effort to pool our knowledge. With enough
eyes we should be able to build a knowledgebase that summarizes which
libraries are threadsafe, which ones aren't, and which ones can be,
provided you use them correctly. The current status of this knowledgebase
is here:

http://httpd.apache.org/docs-2.0/developer/thread_safety.html

Unfortunately so far it is mostly a single set of eyes, mine in this case,
that have contributed.  I know few people here have cvs commit access to
the Apache cvs server, but you can bounce any additions through me.

I did it at the Apache level since I am trying to leverage the knowledge
the mod_perl folks have as well.

-Rasmus

On Thu, 22 Aug 2002, Kristian Koehntopp wrote:

> Am Mittwoch, 21. August 2002 22:09 schrieb Shane Caraveo:
> > Rasmus Lerdorf wrote:
> > > production quality. The best we can do is pick a small set
> > > of extensions and a small set of platforms and say that with
> > > the limited set of extensions, against a specific set of
> > > versions of addon libraries on a specific version of that
> > > OS, yes, it should be production quality - maybe.
>
> I believe the designers of the Roxen web server were in a similar
> situation as Roxen is threaded, too. They worked around this
> problem with wrapper functions that kept a per-library lock for
> each library that was not tested as threadsafe.
>
> They gradually improved the granularity of their locks, and
> isolated threadsafe functions, improving performance.
>
> How are the perl people handling this issue? I believe they are
> using the same libs as we do.
>
> Kristian
>


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




Re: [PHP-DEV] PHP 4.3 and PHP 5

2002-08-22 Thread Zeev Suraski

At 23:09 21/08/2002, Shane Caraveo wrote:
>Rasmus Lerdorf wrote:
>>But how do you propose we come up with perfect Apache 2.0 support?
>
>FastCGI :)

Sounds like a plan (seriously)

Zeev


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




Re: [PHP-DEV] PHP 4.3 and PHP 5

2002-08-22 Thread Sebastian Bergmann

Shane Caraveo wrote:
> Rasmus Lerdorf wrote:
>> But how do you propose we come up with perfect Apache 2.0 support?
>
> FastCGI :)

  What's the status of Apache 2.0's FastCGI filter / module? Where can
  it be found?

-- 
  Sebastian Bergmann
  http://sebastian-bergmann.de/ http://phpOpenTracker.de/

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

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




[PHP-DEV] Warnings in main/streams.c

2002-08-22 Thread Sebastian Bergmann

streams.c
C:\home\php\php4\main\streams.c(230) : warning C4022: 'php_error_docref0'
: Zeig
ertyp fuer uebergebenen Parameter 2 stimmt nicht mit dem deklarierten
Zeigertyp
ueberein
C:\home\php\php4\main\streams.c(230) : warning C4047: 'function' : Anzahl
der De
referenzierungen bei 'int ' und 'void ***  ' unterschiedlich
C:\home\php\php4\main\streams.c(230) : warning C4024: 'php_error_docref0'
: Unte
rschiedliche Typen fuer formalen und uebergebenen Parameter 3
C:\home\php\php4\main\streams.c(232) : warning C4022: 'php_error_docref0'
: Zeig
ertyp fuer uebergebenen Parameter 2 stimmt nicht mit dem deklarierten
Zeigertyp
ueberein
C:\home\php\php4\main\streams.c(232) : warning C4047: 'function' : Anzahl
der De
referenzierungen bei 'int ' und 'void ***  ' unterschiedlich
C:\home\php\php4\main\streams.c(232) : warning C4024: 'php_error_docref0'
: Unte
rschiedliche Typen fuer formalen und uebergebenen Parameter 3
C:\home\php\php4\main\streams.c(391) : warning C4047: 'function' : Anzahl
der De
referenzierungen bei 'unsigned int ' und 'void ***  ' unterschiedlich
C:\home\php\php4\main\streams.c(391) : warning C4024: '_php_stream_read' :
Unter
schiedliche Typen fuer formalen und uebergebenen Parameter 3
C:\home\php\php4\main\streams.c(913) : warning C4101: 'flags' :
Unreferenzierte
lokale Variable
C:\home\php\php4\main\streams.c(914) : warning C4101: 'oldval' :
Unreferenzierte
 lokale Variable
C:\home\php\php4\main\streams.c(1224) : warning C4022: 'php_error_docref0'
: Zei
gertyp fuer uebergebenen Parameter 2 stimmt nicht mit dem deklarierten
Zeigertyp
 ueberein
C:\home\php\php4\main\streams.c(1224) : warning C4047: 'function' : Anzahl
der D
ereferenzierungen bei 'int ' und 'void ***  ' unterschiedlich
C:\home\php\php4\main\streams.c(1224) : warning C4024: 'php_error_docref0'
: Unt
erschiedliche Typen fuer formalen und uebergebenen Parameter 3

-- 
  Sebastian Bergmann
  http://sebastian-bergmann.de/ http://phpOpenTracker.de/

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

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




SV: [PHP-DEV] PHP 4.3 and PHP 5

2002-08-22 Thread Carsten Gehling

> Fra: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]]
> Sendt: 22. august 2002 09:44
> Emne: Re: [PHP-DEV] PHP 4.3 and PHP 5



> I did it at the Apache level since I am trying to leverage the knowledge
> the mod_perl folks have as well.

Building a bridge to the opposition are you? ;-) Begone religious flamewars!
Let us unite in the common goal of building threadsafe scripting engines -
AND libraries. :-)

Correct me if I'm wrong, but once these issues about thread-safety have been
solved, it will not only affect the behavioud towards Apache 2.x but also
the ISAPI module, would it not?

Maybe the documentation on "Extending PHP" should provide some common
guidelines for building threadsafe libraries.

- Carsten


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




Re: SV: [PHP-DEV] PHP 4.3 and PHP 5

2002-08-22 Thread Zeev Suraski

At 11:20 22/08/2002, Carsten Gehling wrote:
>Correct me if I'm wrong, but once these issues about thread-safety have been
>solved, it will not only affect the behavioud towards Apache 2.x but also
>the ISAPI module, would it not?

They're only partially related.  Most of the libraries under Windows are 
thread safe (not all of them, but most of them).  Under ISAPI (or 
Apache/Windows for that matter) our main concern is to make sure that our 
own code is stable (engine should be stable now, but most of the extension 
modules are not).

Zeev


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




Re: [PHP-DEV] PHP 4.3 and PHP 5

2002-08-22 Thread Kristian Koehntopp

Am Donnerstag, 22. August 2002 09:43 schrieb Rasmus Lerdorf:
> Putting in locks is the easy part.  The tough part is finding
> which libraries are safe and which ones aren't.

I think that is easy, too. Either the library you are using is 
being documented as threadsafe, then it is. Or it isn't 
documented as threasdsafe, in which case you have to mutex it, 
even if it is actually threadsafe internally - no docs for it, 
the feature is an accident and you may not rely on it. Talk to 
the developers and make them cooperate.

Kristian


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




Re: [PHP-DEV] tests tweaks

2002-08-22 Thread Melvyn Sopacua

At 02:26 8/22/2002 +0200, Marcus Börger wrote:

>At 01:51 22.08.2002, Melvyn Sopacua wrote:
>>
>>Then this one is definetely not C99 compliant. Changed the test to:
>>#include 
>>
>>int main()
>>{
>> char buf[5];
>> int written;
>>
>> written = snprintf(buf, sizeof(buf), "%f", .111);
>> if (strcmp("0.1", buf)==0 && written == 6)
>> {
>> printf("OK\n");
>> }
>> else
>> {
>> printf("Not ok: %s (%i)\n", buf, written);
>> }
>>}
>>
>>Result:
>>Not ok: 0.11 (5)
>
>
>How is this, did you mean 3 * '1'? The function is supposed to return the 
>number of
>characters that could have been written (excluding the terminating \0).

What it does is return the actual written characters. The terminator is not 
consistent.
0.11\0 which would be 5 characters. The result given below is 0\0 would in 
this case
be 2 characters, but 1 is returned.
(The strcmp above should of course be "0.111" - was too sleepy to notice :-).

>>Additionally - with "%.f" it rounds to integer zero.
>>
>>Result:
>>Not ok: 0 (1)
>
>A quick look in the docs says when no precision is given 6 is assumed.
>So i would expect "0.111"

Yes, when no precision is given. According to the docs, a precision 
consists of '.'
followed by p. %.f then would be either illegal, or p being NULL resolves 
to zero.

Testing with 0.999 as a value reveals, that zero is assumed for p, since 
the result
then is 1.

Met vriendelijke groeten / With kind regards,

Webmaster IDG.nl
Melvyn Sopacua


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




[PHP-DEV] gcc error on complile

2002-08-22 Thread Alex Green

Hi All,

what does this mean?

/bin/sh libtool --silent --mode=compile
gcc  -Iext/zlib/ -I/usr/local/www/php4-200208210300/ext/zlib/ -DPHP_ATOM_INC
 -I/
usr/local/www/php4-200208210300/include -I/usr/local/www/php4-200208210300/m
ain
-I/usr/local/www/php4-200208210300 -I/usr/local/www/apache2/2.0.40/include -
I/us
r/local/www/php4-200208210300/Zend -I/usr/local/include -I/usr/local/include
/fre
etype2 -I/oracle/oracode/9.2.0.1/rdbms/public -I/oracle/oracode/9.2.0.1/rdbm
s/de
mo -I/oracle/oracode/9.2.0.1/plsql/public  -I/usr/local/www/php4-20020821030
0/TS
RM  -mpa-risc-2-0 -O -D_HPUX_SOURCE  -prefer-pic -c
/usr/local/www/php4-200208210300/ext/zlib/zlib.c -o ext/zlib/zlib.lo
gcc: cannot specify -o with -c or -S and multiple compilations
make: *** [ext/zlib/zlib.lo] Error 1

The configure command I ran is this:

CC=gcc CFLAGS="-mpa-risc-2-0 -O -D_HPUX_SOURCE"
./configure --with-apxs2=/usr/local/www/apache2/current/bin/apxs --with-zlib
-dir
=/usr/local/lib/ --with-zlib --without-mysql --enable-versioning --enable-tr
ack-
vars=yes --enable-url-includes --enable-trans-sid --enable-sysvshm=yes --ena
ble-
sysvsem=yes --with-ftp --with-config-file-path=/etc --with-gd=/usr/local --w
ith-
png-dir=/usr/local/lib --with-jpeg-dir=/usr/local/lib --with-xpm-dir=/usr/lo
cal/
lib --with-freetype-dir=/usr/local --enable-gd-native-ttf --with-gettext=/us
r/lo
cal --with-expat-dir=/usr/local --with-oracle=/oracle/oracode/9.2.0.1 --with
-oci
8=/oracle/oracode/9.2.0.1

I tried it without the CFLAGS, I was experimenting.

I'm trying to build php with Oracle 9i Release 2 (64bit) with Apache 2.0.40
on
my HPUX11i box.  I have editing the config.m4 files for both oci8 and oracle
to
point to the 32bit lib directories.


What other information would be helpfull?

Thanks in advance
AG




[PHP-DEV] fsockopen - fread: What packets are being seen and read?

2002-08-22 Thread Torsten Schlabach

Hi!

I am trying to implement a TFTP client in PHP. TFTP is using UDP, which
seems to be no problem as other examples that use UDP (for example to query DNS)
work just finde.

Just there is a difference between TFTP and most other UDP based protocols
that I have ever heared of:

While most UDP protocols send their answer packes FROM the same port they
received the query from TO the port on the client that the request came from
originally, TFTP for whatevery reason I never found out replies FROM an
arbritary source port > 1023 to the port on the client that it used to send the
query.

Now it seems to me that the replay packet being send back from the TFTP
server to my request (that I can see using an Ethernet sniffer) is just not put
into the read queue of my socket opened with fsockopen. The function fread
never sees the return packet when I do TFTP.

Is that behaviour by design or is this a bug? Did anyone ever have the same
problem and maybe even found a workaround?

Regards,
Torsten Schlabach


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




Re: [PHP-DEV] Warnings in main/streams.c

2002-08-22 Thread Marcus Börger

Why sending this in German? Please use snaps.php.net/win32/compile.log instead:

streams.c
c:\php4build\snap\main\streams.c(230) : warning C4022: 'php_error_docref0' 
: pointer mismatch for actual parameter 2
c:\php4build\snap\main\streams.c(230) : warning C4047: 'function' : 'int ' 
differs in levels of indirection from 'void *** '
c:\php4build\snap\main\streams.c(230) : warning C4024: 'php_error_docref0' 
: different types for formal and actual parameter 3
c:\php4build\snap\main\streams.c(232) : warning C4022: 'php_error_docref0' 
: pointer mismatch for actual parameter 2
c:\php4build\snap\main\streams.c(232) : warning C4047: 'function' : 'int ' 
differs in levels of indirection from 'void *** '
c:\php4build\snap\main\streams.c(232) : warning C4024: 'php_error_docref0' 
: different types for formal and actual parameter 3
c:\php4build\snap\main\streams.c(391) : warning C4047: 'function' : 
'unsigned int ' differs in levels of indirection from 'void *** '
c:\php4build\snap\main\streams.c(391) : warning C4024: '_php_stream_read' : 
different types for formal and actual parameter 3
c:\php4build\snap\main\streams.c(913) : warning C4101: 'flags' : 
unreferenced local variable
c:\php4build\snap\main\streams.c(914) : warning C4101: 'oldval' : 
unreferenced local variable
c:\php4build\snap\main\streams.c(1224) : warning C4022: 'php_error_docref0' 
: pointer mismatch for actual parameter 2
c:\php4build\snap\main\streams.c(1224) : warning C4047: 'function' : 'int ' 
differs in levels of indirection from 'void *** '
c:\php4build\snap\main\streams.c(1224) : warning C4024: 'php_error_docref0' 
: different types for formal and actual parameter 3


p.s.: Wie kannst Du mit nem deutschen compiler arbeiten, da versteht man 
die Fehelrmeldungen doch gar nicht?

At 10:16 22.08.2002, Sebastian Bergmann wrote:
>streams.c
>C:\home\php\php4\main\streams.c(230) : warning C4022: 'php_error_docref0'
>: Zeig
>ertyp fuer uebergebenen Parameter 2 stimmt nicht mit dem deklarierten
>Zeigertyp
>ueberein
>C:\home\php\php4\main\streams.c(230) : warning C4047: 'function' : Anzahl
>der De
>referenzierungen bei 'int ' und 'void ***  ' unterschiedlich
>C:\home\php\php4\main\streams.c(230) : warning C4024: 'php_error_docref0'
>: Unte
>rschiedliche Typen fuer formalen und uebergebenen Parameter 3
>C:\home\php\php4\main\streams.c(232) : warning C4022: 'php_error_docref0'
>: Zeig
>ertyp fuer uebergebenen Parameter 2 stimmt nicht mit dem deklarierten
>Zeigertyp
>ueberein
>C:\home\php\php4\main\streams.c(232) : warning C4047: 'function' : Anzahl
>der De
>referenzierungen bei 'int ' und 'void ***  ' unterschiedlich
>C:\home\php\php4\main\streams.c(232) : warning C4024: 'php_error_docref0'
>: Unte
>rschiedliche Typen fuer formalen und uebergebenen Parameter 3
>C:\home\php\php4\main\streams.c(391) : warning C4047: 'function' : Anzahl
>der De
>referenzierungen bei 'unsigned int ' und 'void ***  ' unterschiedlich
>C:\home\php\php4\main\streams.c(391) : warning C4024: '_php_stream_read' :
>Unter
>schiedliche Typen fuer formalen und uebergebenen Parameter 3
>C:\home\php\php4\main\streams.c(913) : warning C4101: 'flags' :
>Unreferenzierte
>lokale Variable
>C:\home\php\php4\main\streams.c(914) : warning C4101: 'oldval' :
>Unreferenzierte
>  lokale Variable
>C:\home\php\php4\main\streams.c(1224) : warning C4022: 'php_error_docref0'
>: Zei
>gertyp fuer uebergebenen Parameter 2 stimmt nicht mit dem deklarierten
>Zeigertyp
>  ueberein
>C:\home\php\php4\main\streams.c(1224) : warning C4047: 'function' : Anzahl
>der D
>ereferenzierungen bei 'int ' und 'void ***  ' unterschiedlich
>C:\home\php\php4\main\streams.c(1224) : warning C4024: 'php_error_docref0'
>: Unt
>erschiedliche Typen fuer formalen und uebergebenen Parameter 3
>
>--
>   Sebastian Bergmann
>   http://sebastian-bergmann.de/ http://phpOpenTracker.de/
>
>   Did I help you? Consider a gift: http://wishlist.sebastian-bergmann.de/
>
>--
>PHP Development Mailing List 
>To unsubscribe, visit: http://www.php.net/unsub.php


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




[PHP-DEV] CVS Account Request: phpman

2002-08-22 Thread Mohamad Saleh Mohamad

Translating the documentation to arabic with group

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




[PHP-DEV] CVS Account Request: mrphp

2002-08-22 Thread ibraheem alorini

Translating the documentation to arabic with group 

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




[PHP-DEV] [RFC] apache_hooks update

2002-08-22 Thread Lukas Schroeder

hi,

attached is a first request for comment for an update to the
apache_hooks code.


a php-handler for uri translation looks like this ($request is of type
ApacheRequest).

uri('/s.html');
  return DECLINED;
?>


a php-handler for uri-to-filename translation would look like this.

filename('/tmp/foo.html');
  return OK;
?>


the patch is intended for peer review only.



regards,
  -lukas



Index: sapi/apache/mod_php4.c
===
RCS file: /repository/php4/sapi/apache/mod_php4.c,v
retrieving revision 1.138
diff -u -r1.138 mod_php4.c
--- sapi/apache/mod_php4.c  19 Aug 2002 15:52:21 -  1.138
+++ sapi/apache/mod_php4.c  22 Aug 2002 11:55:48 -
@@ -34,6 +34,7 @@
 /* {{{ Prototypes
  */
 int apache_php_module_main(request_rec *r, int display_source_mode TSRMLS_DC);
+int apache_php_module_hook(request_rec *r, char *filename, zval **ret TSRMLS_DC);
 void php_save_umask(void);
 void php_restore_umask(void);
 int sapi_apache_read_post(char *buffer, uint count_bytes TSRMLS_DC);
@@ -835,6 +836,40 @@
 }
 /* }}} */
 
+static int php_uri_translation(request_rec *r)
+{
+   char *handler = NULL;
+   zval *ret = NULL;
+   HashTable *conf;
+   TSRMLS_FETCH();
+
+   if (!AP(apache_config_loaded)) {
+   conf = (HashTable *) get_module_config(r->per_dir_config, 
+&php4_module);
+   if (conf)
+   zend_hash_apply((HashTable *)conf, (apply_func_t) 
+php_apache_alter_ini_entries TSRMLS_CC);
+   AP(apache_config_loaded) = 1;
+   }
+
+   handler = AP(uri_handler);
+
+   if (!handler)
+   return DECLINED;
+
+   hard_timeout("send", r);
+   SG(server_context) = r;
+   php_save_umask();
+   add_common_vars(r);
+   add_cgi_vars(r);
+   init_request_info(TSRMLS_C);
+   apache_php_module_hook(r, handler, &ret TSRMLS_CC);
+   php_restore_umask();
+   kill_timeout(r);
+
+   convert_to_long(ret);
+   fprintf(stderr, "%s() %d\n", __FUNCTION__, Z_LVAL_P(ret));
+   return Z_LVAL_P(ret);
+}
+
 /* {{{ handler_rec php_handlers[]
  */
 handler_rec php_handlers[] =
@@ -870,7 +905,7 @@
NULL,   /* merge server config */
php_commands,   /* command table */
php_handlers,   /* handlers */
-   NULL,   /* filename translation */
+   php_uri_translation,/* filename translation */
NULL,   /* check_user_id */
NULL,   /* check auth */
NULL,   /* check access */
Index: sapi/apache/mod_php4.h
===
RCS file: /repository/php4/sapi/apache/mod_php4.h,v
retrieving revision 1.17
diff -u -r1.17 mod_php4.h
--- sapi/apache/mod_php4.h  28 Feb 2002 08:27:19 -  1.17
+++ sapi/apache/mod_php4.h  22 Aug 2002 11:55:48 -
@@ -32,6 +32,8 @@
long xbithack;
long terminate_child;
zend_bool in_request;
+   zend_bool apache_config_loaded;
+   char *uri_handler;
 } php_apache_info_struct;
 
 extern zend_module_entry apache_module_entry;
Index: sapi/apache/php_apache.c
===
RCS file: /repository/php4/sapi/apache/php_apache.c,v
retrieving revision 1.66
diff -u -r1.66 php_apache.c
--- sapi/apache/php_apache.c13 Aug 2002 04:03:20 -  1.66
+++ sapi/apache/php_apache.c22 Aug 2002 11:55:48 -
@@ -37,6 +37,11 @@
 #define SECTION(name)  PUTS("" name "\n")
 
 extern module *top_module;
+static int le_apachereq;
+static zend_class_entry *apacherequest_class_entry;
+
+#define SLOT_URI 0
+#define SLOT_FILENAME 1
 
 PHP_FUNCTION(virtual);
 PHP_FUNCTION(apache_request_headers);
@@ -49,6 +54,7 @@
 
 PHP_MINFO_FUNCTION(apache);
 
+
 function_entry apache_functions[] = {
PHP_FE(virtual,
 NULL)
PHP_FE(apache_request_headers,  NULL)
@@ -61,15 +67,17 @@
{NULL, NULL, NULL}
 };
 
-
+/* {{{ php_apache ini entries
+ */
 PHP_INI_BEGIN()
STD_PHP_INI_ENTRY("xbithack",   "0",   
 PHP_INI_ALL,OnUpdateInt,xbithack, php_apache_info_struct, 
php_apache_info)
STD_PHP_INI_ENTRY("engine", "1",   
 PHP_INI_ALL,OnUpdateInt,engine, 
php_apache_info_struct, php_apache_info)
STD_PHP_INI_ENTRY("last_modified",  "0",   
 PHP_INI_ALL,OnUpdateInt,last_modified, 
php_apache_info_struct, php_apache_info)
STD_PHP_INI_ENTRY("child_terminate","0", 

[PHP-DEV] ext OCI8 again

2002-08-22 Thread abdul-kareem.abo-namous

Hi everyone

I am in the process of rewriting a few parts of the oci ext, mainly the createn/init 
of OCIEnv. This is an extremly important step in order to be able to support multiple 
nls's (character sets etc.) on the same server in a shared environment.

just to understand it:

as it seems, OCI(pEnv) is filled once at MINIT, which means that all sessions share 
the nls environment settings. if I change the initialization to be done upon every 
connection start, this would ultimatly lead to chaos since all running sessions (or 
requests) share the same env.

is it correct this way?

Abdul-Kareem Abo-Namous


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




Re: [PHP-DEV] ext OCI8 again

2002-08-22 Thread Thies C. Arntzen

On Thu, Aug 22, 2002 at 02:06:51PM +0200, [EMAIL PROTECTED] wrote:
> Hi everyone
> 
> I am in the process of rewriting a few parts of the oci ext,
> mainly the createn/init of OCIEnv. This is an extremly
> important step in order to be able to support multiple nls's
> (character sets etc.) on the same server in a shared
> environment.
> 
> just to understand it:
> 
> as it seems, OCI(pEnv) is filled once at MINIT, which means
> that all sessions share the nls environment settings. if I
> change the initialization to be done upon every connection
> start, this would ultimatly lead to chaos since all running
> sessions (or requests) share the same env.

what i would do is move the env into the oci_session and add
another parameter to oci[p|n]logon() - the NLS setting for
this connection. that way it shouldn't become a mess;-)

tc

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




[PHP-DEV] 4.2.3

2002-08-22 Thread Zeev Suraski

As per Dan K, most of the important bug fixes were backported to the 4.2 
branch (thanks everyone!)

I'll pack 4.2.3RC1 tomorrow morning, so if anybody has any last minute bug 
fixes to put in, now's the time!

Zeev


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




[PHP-DEV] Bison, Flex To Output PHP parser/compiler.

2002-08-22 Thread Johan Jordaan

Hi,

  I'm new to this list, so hi to everybody out there :)

  I think this msg would be reaching the intended audience, but if I'm
wrong let me know :)

  I've been playing around with flex/bison a little the last couple of
days. I've got this stupid idea to modify flex/bison to emit a
compiler/parser as native PHP as opposed to C code. Does anybody know if
this has been attempted or of there is any value in it except the fact
that it would be Kewl :)

  Thanks

Johan Jordaan
BB&D



Re: [PHP-DEV] 4.2.3

2002-08-22 Thread Dan Kalowsky

Any of you who have done some 64bit fixes, may want to check the PHP_4_2_0
branch out and ensure that they are backported.  A number of commits went
on in CVS, and not all of them mention if they fix compile errors for
64bit platforms or only for 32bit (or even both).

Anyhow just look.

On Thu, 22 Aug 2002, Zeev Suraski wrote:

> As per Dan K, most of the important bug fixes were backported to the 4.2
> branch (thanks everyone!)
>
> I'll pack 4.2.3RC1 tomorrow morning, so if anybody has any last minute bug
> fixes to put in, now's the time!
>
> Zeev
>
>
>

>---<
Dan Kalowsky"A little less conversation,
http://www.deadmime.org/~danka little more action."
[EMAIL PROTECTED]- "A Little Less Conversation",
[EMAIL PROTECTED]Elvis Presley


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




Re: [PHP-DEV] RFC: run-tests.php + diff

2002-08-22 Thread Sander Roobol

It's a good idea, but I'd rather see an unified diff with some context.
Maybe use diff when it's available, and fall back on this code when 
it's not.

Sander

On Thu, Aug 22, 2002 at 02:46:57AM +0200, Marcus Boerger wrote:
> The following patch produces *.diff files similar to
> diff command. These would allow for easier checks in faild tests
> when test combines multiple function checks in one test file
> or the test uses var_dump for output.
> 
> For example i changed precision to 13 in array test 003.phpt
> The tests now produce 003.diff
> 004-   float(-0.33)
> 004+   float(-0.3)
> 034-   float(-0.33)
> 034+   float(-0.3)
> 050-   float(-0.33)
> 050+   float(-0.3)
> 
> When the test fails because of memory leaks and such then
> of cause .log files are better to read.
> 
> Any pros/cons?
> 
> Here is the diff
> 
> [ s n i p ]
> 
> 
> 
> --->>> mailto:[EMAIL PROTECTED] <<<--
> "Wir sind allzumal Tiere unter Tieren, Kinder der Materie wie sie,
> nur wehrloser. Doch da wir im Unterschied zu den Tieren wissen,
> dass wir sterben muessen, wollen wir uns auf jenen Augenblick vorbereiten,
> indem wir das Leben geniessen, das uns durch Zufall und vom Zufall gegeben 
> ist."
> Umberto Eco, Die Insel des vorigen Tages
> ->>> http://marcus-boerger.de <<<-
> >>> Tel. 0241 / 874 09-7 ### 0179 / 29 14 980  <<<

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




[PHP-DEV] Re: [PHP-CVS] cvs: php4 /ext/gd gd.c php_gd.h /ext/gd/libgd gd.c gd.h gd_topal.c

2002-08-22 Thread Sebastian Bergmann

Tim Toohey wrote:
> ttoohey Thu Aug 22 03:28:26 2002 EDT
>
>   Modified files:
> /php4/ext/gdgd.c php_gd.h
> /php4/ext/gd/libgd  gd.c gd.h gd_topal.c

  This broke the ZTS build of ext/gd.

  The patch below makes it compile again, but with warnings. Someone
  please look this over:

Index: gd.c
===
RCS file: /repository/php4/ext/gd/gd.c,v
retrieving revision 1.203
diff -u -r1.203 gd.c
--- gd.c22 Aug 2002 07:28:24 -  1.203
+++ gd.c22 Aug 2002 13:16:47 -
@@ -669,15 +669,15 @@
switch( result )
{
case -1:
-   php_error_docref(NULL, E_ERROR, "Image1 must be TrueColor"
);
+   php_error_docref(NULL, E_ERROR TSRMLS_CC, "Image1 must be
TrueCo
lor");
RETURN_FALSE;
break;
case -2:
-   php_error_docref(NULL, E_ERROR, "Image2 must be Palette"
);
+   php_error_docref(NULL, E_ERROR TSRMLS_CC, "Image2 must be
Palett
e");
RETURN_FALSE;
break;
case -3:
-   php_error_docref(NULL, E_ERROR, "Image1 and Image2 must be
the s
ame size" );
+   php_error_docref(NULL, E_ERROR TSRMLS_CC, "Image1 and
Image2 mus
t be the same size");
RETURN_FALSE;
break;
}

-- 
  Sebastian Bergmann
  http://sebastian-bergmann.de/ http://phpOpenTracker.de/

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

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




[PHP-DEV] Object Overloading

2002-08-22 Thread Sam Liddicott

Zeev I just wanted to make you aware that not just the Java module, but also
all SWIG generated php modules also use the object overloading propget and
propset way of accessing properties of the wrapped objects.

I hear this was being revamped for zend 2.0 and thought I should let you
know.

SWIG-php works by generating a seperate overloaded class for each wrapped
class, with methods as normal in the method table, but special behaviour to
intercept the getting and setting of properties.

Will the propget/propset system be lost in zend 2.0?

Further for your information; (and I realise not for discussion); the
wrapped class hierachy is mirrored in php (get_parent_class) except where
the wrapped class hierachy uses mutiple inheritance in which case
get_parent_class only returns the main parent class, but class properties
and such from all classes remain available.  I mention this in case zend 2.0
does support multiple inheritance and so you may know how we would use it.

Thanks

Sam





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




[PHP-DEV] Re: Object Overloading

2002-08-22 Thread Zeev Suraski

At 16:44 22/08/2002, Sam Liddicott wrote:
>Zeev I just wanted to make you aware that not just the Java module, but also
>all SWIG generated php modules also use the object overloading propget and
>propset way of accessing properties of the wrapped objects.
>
>I hear this was being revamped for zend 2.0 and thought I should let you
>know.
>
>SWIG-php works by generating a seperate overloaded class for each wrapped
>class, with methods as normal in the method table, but special behaviour to
>intercept the getting and setting of properties.
>
>Will the propget/propset system be lost in zend 2.0?

It won't be lost at all - but it will indeed be completely different (much 
more efficient, and easier to work with).

Zeev


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




Re: [PHP-DEV] Re: [PHP-CVS] cvs: php4 /ext/gd gd.c php_gd.h /ext/gd/libgd gd.c gd.h gd_topal.c

2002-08-22 Thread Marcus Börger

It must be php_error_docref(NULL TSRMLS_CC, E_whatever...)
I've just comitted it.
marcus

At 15:18 22.08.2002, you wrote:
>Tim Toohey wrote:
> > ttoohey Thu Aug 22 03:28:26 2002 EDT
> >
> >   Modified files:
> > /php4/ext/gdgd.c php_gd.h
> > /php4/ext/gd/libgd  gd.c gd.h gd_topal.c
>
>   This broke the ZTS build of ext/gd.
>
>   The patch below makes it compile again, but with warnings. Someone
>   please look this over:
>
>Index: gd.c
>===
>RCS file: /repository/php4/ext/gd/gd.c,v
>retrieving revision 1.203
>diff -u -r1.203 gd.c
>--- gd.c22 Aug 2002 07:28:24 -  1.203
>+++ gd.c22 Aug 2002 13:16:47 -
>@@ -669,15 +669,15 @@
> switch( result )
> {
> case -1:
>-   php_error_docref(NULL, E_ERROR, "Image1 must be TrueColor"
>);
>+   php_error_docref(NULL, E_ERROR TSRMLS_CC, "Image1 must be
>TrueCo
>lor");
> RETURN_FALSE;
> break;
> case -2:
>-   php_error_docref(NULL, E_ERROR, "Image2 must be Palette"
>);
>+   php_error_docref(NULL, E_ERROR TSRMLS_CC, "Image2 must be
>Palett
>e");
> RETURN_FALSE;
> break;
> case -3:
>-   php_error_docref(NULL, E_ERROR, "Image1 and Image2 must be
>the s
>ame size" );
>+   php_error_docref(NULL, E_ERROR TSRMLS_CC, "Image1 and
>Image2 mus
>t be the same size");
> RETURN_FALSE;
> break;
> }
>
>--
>   Sebastian Bergmann
>   http://sebastian-bergmann.de/ http://phpOpenTracker.de/
>
>   Did I help you? Consider a gift: http://wishlist.sebastian-bergmann.de/
>
>--
>PHP Development Mailing List 
>To unsubscribe, visit: http://www.php.net/unsub.php


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




Re: [PHP-DEV] Bison, Flex To Output PHP parser/compiler.

2002-08-22 Thread Alan Knowles

Johan Jordaan wrote:

>Hi,
>
>  I'm new to this list, so hi to everybody out there :)
>
>  I think this msg would be reaching the intended audience, but if I'm
>wrong let me know :)
>
It's probably not a bad audience :)

>  I've been playing around with flex/bison a little the last couple of
>days. I've got this stupid idea to modify flex/bison to emit a
>compiler/parser as native PHP as opposed to C code. Does anybody know if
>this has been attempted or of there is any value in it except the fact
>that it would be Kewl :)
>
the tokenizer will emit the elements of php code (in a similar way to 
flex/bison)

bcompiler (pear.php.net) has a callback feature that can show you all 
the opcodes in php - I did it to play about with writing a PHP->C 
converter, (not that simple)..

somewhere between the two, you may find what you are looking for.

regards
Alan

>
>  Thanks
>
>Johan Jordaan
>BB&D
>
>  
>




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




Re: [PHP-DEV] PHP 4.3 and PHP 5

2002-08-22 Thread Rasmus Lerdorf

On Thu, 22 Aug 2002, Kristian Koehntopp wrote:

> Am Donnerstag, 22. August 2002 09:43 schrieb Rasmus Lerdorf:
> > Putting in locks is the easy part.  The tough part is finding
> > which libraries are safe and which ones aren't.
>
> I think that is easy, too. Either the library you are using is
> being documented as threadsafe, then it is. Or it isn't
> documented as threasdsafe, in which case you have to mutex it,
> even if it is actually threadsafe internally - no docs for it,
> the feature is an accident and you may not rely on it. Talk to
> the developers and make them cooperate.

That's not very realistic I don't think. You have folks like Mr. Crispin
who insists that his c-client library is perfectly threadsafe yet he uses
strtok() and gethostbyname() so it obviously isn't.

-Rasmus


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




Re: [PHP-DEV] 4.2.3

2002-08-22 Thread Adam Maccabee Trachtenberg

On Thu, 22 Aug 2002, Zeev Suraski wrote:

> I'll pack 4.2.3RC1 tomorrow morning, so if anybody has any last minute bug 
> fixes to put in, now's the time!

Shuffle fix didn't make it:

http://bugs.php.net/bug.php?id=18401

-adam

-- 
adam maccabee trachtenberg
[EMAIL PROTECTED]


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




[PHP-DEV] Re: German

2002-08-22 Thread Florian Berger

post the url and i'll check the grammar...

"Remus Agundar" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
news:[EMAIL PROTECTED]...
> I know this is kind of out of place in this newsgroup, but
> does anyone speak German and want to help me translate my
> web site?  It's a small site and I'm doing most of the
> translation.  I just need someone to make corrections to my
> German grammar.
>
>
>



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




Re: [PHP-DEV] [RFC] apache_hooks update

2002-08-22 Thread Rasmus Lerdorf

Does it work?

On Thu, 22 Aug 2002, Lukas Schroeder wrote:

> hi,
>
> attached is a first request for comment for an update to the
> apache_hooks code.
>
>
> a php-handler for uri translation looks like this ($request is of type
> ApacheRequest).
>
> 
>   $request->uri('/s.html');
>   return DECLINED;
> ?>
>
>
> a php-handler for uri-to-filename translation would look like this.
>
> 
>   $request->filename('/tmp/foo.html');
>   return OK;
> ?>
>
>
> the patch is intended for peer review only.
>
>
>
> regards,
>   -lukas
>
>


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




Re: [PHP-DEV] [RFC] apache_hooks update

2002-08-22 Thread Lukas Schroeder

On Thu, Aug 22, 2002 at 08:07:33AM -0700, Rasmus Lerdorf wrote:
> Does it work?
> 

hehe. yes it does.


besides the fact, that a lot of functionality is still missing, the only
issue currently is an incomplete cleanup:
./Zend/zend_execute.c(1704) :  Freeing 0x0828FFCC (12 bytes), script=-
./sapi/apache/php_apache.c(143) : Freeing 0x0828FCA4 (12 bytes), script=-



-lukas
 

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