Re: [PHP-DEV] Re: output buffering

2002-10-08 Thread Zeev Suraski

I think we have a bit of a language gap, which is fine, but let's settle 
for that:
Please make sure that if you have a small doubt regarding a certain 
behavior, especially in a core component of PHP such as the output 
buffering layer or the session module - you ask the relevant author(s) 
about it, CCing php-dev.  Worst case - you'll ask a bit more than 
necessary, but that's much better than not asking enough.

Let's look forward now...

Zeev

At 03:32 08/10/2002, Yasuo Ohgaki wrote:
Zeev Suraski wrote:
Really?  Yasuo, people have been requesting that we disable your write 
access to the full php4 tree, and uptil now I was against it.  But this 
attitude is making me reconsider my stand on this.
This is the 2nd time in the last couple of days that I notice that your 
unverified assumptions introduced inconsistencies/bugs/misbehaviors, and 
if you don't realize that it needs to be fixed, we have a bit of a 
problem here.
Please reconsider.

Zeev,

I think you know my attitude. I usually ask when it's not clear bug or 
simple bug. I'm write if I'm not sure which Sascha said people don't
read code shouldn't comment. I agree and I usually follow this basic
rule.

There is misunderstanding that I thought you were willing to have
flushing while you are not. This resulted that mess we had.

I think it has been resolved, isn't it?

  No. I don't think I need to ask.

This line should be read

No. I don't think I need to ask if it is problem or not.
It is problem which I'm not willing to be fixed.

It does not work as it is supposed in limited case. We have
options, leave code and document limitation, modify code to
resolve small issue or just ignore it.
Flushing is problematic and we know well :)

--
Yasuo Ohgaki



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




[PHP-DEV] [PATCH] session.cache_limiter = none

2002-10-08 Thread Bastiaan Bakker

Hi, 

For a particular PHP installation I wanted to turn off all
'Cache-Control' headers, because 'cache_limiter=nocache' requires a user
to explicitly resubmit form data every time and 'cache_limiter=private'
would cache forms too often.
However the current cache_limiter implementation does not have an option
to do so. So I wrote a trivial patch against PHP 4.2.3 that adds value
'none' to session.cache_limiter. When set PHP replies do not include
'Cach-Control' or 'Pragma: nocache' headers, just a 'Last-Modified' one.

Please consider merging it, from browsing the mailing list I get the
impression that other people may find the 'none' option useful too.

Thanks,

Bastiaan Bakker
LifeLine Networks bv


Index: ext/session/session.c
===
RCS file: /opt/cvs/sourceroot/php/php-4.2.3/ext/session/session.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 session.c
--- ext/session/session.c   7 Oct 2002 13:59:02 -   1.1.1.1
+++ ext/session/session.c   7 Oct 2002 15:49:23 -
 -700,11 +700,17 
ADD_COOKIE(Pragma: no-cache);
 }
 
+CACHE_LIMITER_FUNC(none)
+{
+   last_modified(TSRMLS_C);
+}
+
 static php_session_cache_limiter_t php_session_cache_limiters[] = {
CACHE_LIMITER(public)
CACHE_LIMITER(private)
CACHE_LIMITER(private_no_expire)
CACHE_LIMITER(nocache)
+   CACHE_LIMITER(none)
{0}
 };
 





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




Re: [PHP-DEV] [PATCH] session.cache_limiter = none

2002-10-08 Thread Markus Fischer

On Tue, Oct 08, 2002 at 10:45:19AM +0200, Bastiaan Bakker wrote : 
 For a particular PHP installation I wanted to turn off all
 'Cache-Control' headers, because 'cache_limiter=nocache' requires a user
 to explicitly resubmit form data every time and 'cache_limiter=private'
 would cache forms too often.
 However the current cache_limiter implementation does not have an option
 to do so. So I wrote a trivial patch against PHP 4.2.3 that adds value
 'none' to session.cache_limiter. When set PHP replies do not include
 'Cach-Control' or 'Pragma: nocache' headers, just a 'Last-Modified' one.
 
 Please consider merging it, from browsing the mailing list I get the
 impression that other people may find the 'none' option useful too.

Current CVS already supports this. From php.ini-* :

; Set to {nocache,private,public,} to determine HTTP caching aspects.
; or leave this empty to avoid sending anti-caching headers.
session.cache_limiter = nocache

So, effectively, 'session.cache_limiter =' does what you want
(if I understood you correctly).

regards,
- Markus

-- 
GnuPG Key: http://guru.josefine.at/~mfischer/C2272BD0.asc
rei_ Derick, while ($xml) $ass-get_new_ideas();
[James] Markus: IE on_user_fart()
-- People doesn't seem to like the new XHTML2 specs :) --

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




[PHP-DEV] unixtojd function

2002-10-08 Thread Pedro

hi there, i have a script that use the unixtojd function. it worked on
version 4.2.0. now i installed the 4.2.3 version and it doesn't work. i
don't information in the change log about any changes to this. can someone
give me a help??

best regards,
pedro



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




[PHP-DEV] Fwd: Re: [sab-php] sablotron instalation

2002-10-08 Thread Melvyn Sopacua

By the way:

what about nuking ext/sablot?



You make too many assumptions, that are not based on facts.

Try reading configure --help and the various manual pages on installing
php.

Ask further questions at [EMAIL PROTECTED]


At 11:08 8-10-2002, you wrote:

hi all,
I hav a problem during instalation of sablotron i use apache and php 4.3 
and red hat 7.3
i have tried to compile with options --with dom but it load libxml that 
not support dom2
i tried also with --sablot but it doesn't work can anyone help

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.394 / Virus Database: 224 - Release Date: 3-10-2002

Best regards,
Melvyn Sopacua
WebMaster IDG.nl
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
If it applies, where it applies - this email is a personal
contribution and does not reflect the views of my employer
IDG.nl.
\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\



Archives and info: http://www.gingerall.org/charlie/ga/xml/m_ml.xml

Mailing list maintained by Ginger Alliance




?php
include(not_reflecting_employers_views.txt);
// Needed for Outlook collaboration program, mistaken for email client
printf(--\n\n%s %s, $name_in_from_header, $email_in_from_header);
?


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




[PHP-DEV] ext/readline

2002-10-08 Thread Jan Lehnardt

Hey list, thies,
the patch below fixes ext/readline on my FreeBSD system, can you please have a
look at it and veri- or falsify it?

Thank you!

===
RCS file: /repository/php4/ext/readline/readline.c,v
retrieving revision 1.29
diff -u -r1.29 readline.c
--- ext/readline/readline.c 22 Mar 2002 01:10:30 -  1.29
+++ ext/readline/readline.c 8 Oct 2002 09:32:14 -
 -38,7 +38,9 
 PHP_FUNCTION(readline_add_history);
 PHP_FUNCTION(readline_info);
 PHP_FUNCTION(readline_clear_history);
+#ifndef HAVE_LIBEDIT
 PHP_FUNCTION(readline_list_history);
+#endif
 PHP_FUNCTION(readline_read_history);
 PHP_FUNCTION(readline_write_history);
 PHP_FUNCTION(readline_completion_function);
 -57,7 +59,7 
PHP_FE(readline_info,   NULL)
PHP_FE(readline_add_history,NULL)
PHP_FE(readline_clear_history,  NULL)
-#ifdef HAVE_LIBREADLINE
+#ifndef HAVE_LIBEDIT
PHP_FE(readline_list_history,   NULL)
 #endif
PHP_FE(readline_read_history,   NULL)
 -256,7 +258,7 
 /* }}} */
 /* {{{ proto array readline_list_history(void) 
Lists the history */
-#ifdef HAVE_LIBREADLINE
+#ifndef HAVE_LIBEDIT
 PHP_FUNCTION(readline_list_history)
 {
HIST_ENTRY **history;


Jan
-- 
Q: Thank Jan? A: http://geschenke.an.dasmoped.net/
Got an old and spare laptop? Please send me a mail.
Key7BCC EB86 8313 DDA9 25DF  
Fingerprint1805 ECA5 BCB7 BB96 56B0

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




[PHP-DEV] Re: #19809 [Bgs]: The same code that works on a Linux box, won't work on my windows box

2002-10-08 Thread Edin Kadribasic

Hi Rasmus,

I packaged win32 release in question and there are no defaults
changed. It could be that he used php.ini-recommended which has
error_reporting  =  E_ALL.

Edin

- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, October 08, 2002 7:16 AM
Subject: #19809 [Bgs]: The same code that works on a Linux box,
won't work on my windows box


 ID:   19809
  Updated by:   [EMAIL PROTECTED]
  Reported By:  [EMAIL PROTECTED]
  Status:   Bogus
  Bug Type: Performance problem
  Operating System: Windows 2000
  PHP Version:  4.2.3
  New Comment:

 Whoever packaged the Windows version decided to change the default
 error_reporting level, I think.  Simply set it to the same as on
your
 Linux box in your php.ini file and all will be well.


 Previous Comments:
 --
--

 [2002-10-07 21:41:31] [EMAIL PROTECTED]

 Not enough information was provided for us to be able
 to handle this bug. Please re-read the instructions at
 http://bugs.php.net/how-to-report.php

 If you can provide more information, feel free to add it
 to this bug and change the status back to Open.

 Thank you for your interest in PHP.


 Of the top of my head I can think of just 1 thing that could have
 caused without additional info. That being that your code relies
on
 register_globals and they are turned off on your Windows box.

 --
--

 [2002-10-07 21:32:22] [EMAIL PROTECTED]

 I get Undefined Variable errors all over my code ONLY when using
the
 windows version on PHP.  If I take the same code and run in on my
Linux
 box, it works fine.  Please help.

 --
--


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





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




[PHP-DEV] ext/sysvmsg

2002-10-08 Thread Jan Lehnardt

Hello again,
can somebody with a better knowledge than me have a look at 
ext/sysvmsg/sysvmsg.c ? On my FreeBSD 4.6 system I get 

gcc  -Iext/sysvmsg/ -I/mnt/data/cvs/php4clean/ext/sysvmsg/ -DPHP_ATOM_INC 
-I/mnt/data/cvs/php4clean/include -I/mnt/data/cvs/php4clean/main 
-I/mnt/data/cvs/php4clean -I/mnt/data/cvs/php4clean/Zend -I/usr/local/include 
-I/usr/local/include -I/usr/local/include/libxml2 -I/usr/local/FrontBase/include 
-I/usr/local/include/mcal -I/usr/local/include/ming -I/usr/local/include/pspell 
-I/usr/local/include/ucd-snmp -I/mnt/data/cvs/php4clean/ext/xml/expat  
-I/mnt/data/cvs/php4clean/TSRM  -g -O2  -c 
/mnt/data/cvs/php4clean/ext/sysvmsg/sysvmsg.c -o ext/sysvmsg/sysvmsg.o   echo  
ext/sysvmsg/sysvmsg.lo
/mnt/data/cvs/php4clean/ext/sysvmsg/sysvmsg.c: In function `zif_msg_receive':
/mnt/data/cvs/php4clean/ext/sysvmsg/sysvmsg.c:292: sizeof applied to an incomplete type
/mnt/data/cvs/php4clean/ext/sysvmsg/sysvmsg.c:308: dereferencing pointer to incomplete 
type
/mnt/data/cvs/php4clean/ext/sysvmsg/sysvmsg.c:313: dereferencing pointer to incomplete 
type
/mnt/data/cvs/php4clean/ext/sysvmsg/sysvmsg.c:325: dereferencing pointer to incomplete 
type
/mnt/data/cvs/php4clean/ext/sysvmsg/sysvmsg.c: In function `zif_msg_send':
/mnt/data/cvs/php4clean/ext/sysvmsg/sysvmsg.c:365: sizeof applied to an incomplete type
/mnt/data/cvs/php4clean/ext/sysvmsg/sysvmsg.c:366: dereferencing pointer to incomplete 
type
/mnt/data/cvs/php4clean/ext/sysvmsg/sysvmsg.c:371: sizeof applied to an incomplete type
/mnt/data/cvs/php4clean/ext/sysvmsg/sysvmsg.c:372: dereferencing pointer to incomplete 
type
/mnt/data/cvs/php4clean/ext/sysvmsg/sysvmsg.c:377: dereferencing pointer to incomplete 
type

Thank you again and sorry for the long lines.

Jan
-- 
Q: Thank Jan? A: http://geschenke.an.dasmoped.net/
Got an old and spare laptop? Please send me a mail.
Key7BCC EB86 8313 DDA9 25DF  
Fingerprint1805 ECA5 BCB7 BB96 56B0

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




Re: [PHP-DEV] Fwd: Re: [sab-php] sablotron instalation

2002-10-08 Thread Derick Rethans

On Tue, 8 Oct 2002, Melvyn Sopacua wrote:

 By the way:
 
 what about nuking ext/sablot?

[derick@kossu php-4.3.0dev]$ ls -l ext/sablot
ls: ext/sablot: No such file or directory

It's already nuked :)

Derick

--

---
 Derick Rethans   http://derickrethans.nl/ 
 JDI Media Solutions
--[ if you hold a unix shell to your ear, do you hear the c? ]-


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




Re: [PHP-DEV] ext/sysvmsg

2002-10-08 Thread Jan Lehnardt

Hi,
even more errors show up when the previously quoted lines are commented out:

gcc  -Iext/sysvmsg/ -I/mnt/data/cvs/php4clean/ext/sysvmsg/ -DPHP_ATOM_INC 
-I/mnt/data/cvs/php4clean/include -I/mnt/data/cvs/php4clean/main 
-I/mnt/data/cvs/php4clean -I/mnt/data/cvs/php4clean/Zend -I/usr/local/include 
-I/usr/local/include -I/usr/local/include/libxml2 -I/usr/local/FrontBase/include 
-I/usr/local/include/mcal -I/usr/local/include/ming -I/usr/local/include/pspell 
-I/usr/local/include/ucd-snmp -I/mnt/data/cvs/php4clean/ext/xml/expat  
-I/mnt/data/cvs/php4clean/TSRM  -g -O2  -c 
/mnt/data/cvs/php4clean/ext/sysvmsg/sysvmsg.c -o ext/sysvmsg/sysvmsg.o   echo  
ext/sysvmsg/sysvmsg.lo
/mnt/data/cvs/php4clean/ext/sysvmsg/sysvmsg.c: In function `zif_msg_send':
/mnt/data/cvs/php4clean/ext/sysvmsg/sysvmsg.c:365: sizeof applied to an incomplete type
/mnt/data/cvs/php4clean/ext/sysvmsg/sysvmsg.c:366: dereferencing pointer to incomplete 
type
/mnt/data/cvs/php4clean/ext/sysvmsg/sysvmsg.c:371: sizeof applied to an incomplete type
/mnt/data/cvs/php4clean/ext/sysvmsg/sysvmsg.c:372: dereferencing pointer to incomplete 
type
/mnt/data/cvs/php4clean/ext/sysvmsg/sysvmsg.c:377: dereferencing pointer to incomplete 
type
*** Error code 1

Jan
-- 
Q: Thank Jan? A: http://geschenke.an.dasmoped.net/
Got an old and spare laptop? Please send me a mail.
Key7BCC EB86 8313 DDA9 25DF  
Fingerprint1805 ECA5 BCB7 BB96 56B0

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




Re: [PHP-DEV] [PATCH] session.cache_limiter = none

2002-10-08 Thread Bastiaan Bakker

Hi Markus,

Thanks for the quick response. Looks like my patch can go directly into
/dev/null.
'session.cache_limiter = ' already works by accident in PHP-4.2.3,
because unrecognized values default to 'no value'.
The new dcoumentation still may be a bit confusing, because 'or leave
this empty' may be interpreted as 'don't set session.cache_limiter'. In
the latter case PHP defaults to 'nocache' rather than 'no cache
limiting'. Also the last comma in {nocache,private,public,} is easy to
miss.

Anyway thanks for nulling my patch, it's always better to be able to use
pristine sources.

Regards,

Bastiaan Bakker
LifeLine Networks bv

On Tue, 2002-10-08 at 11:18, Markus Fischer wrote:
 On Tue, Oct 08, 2002 at 10:45:19AM +0200, Bastiaan Bakker wrote : 
  For a particular PHP installation I wanted to turn off all
  'Cache-Control' headers, because 'cache_limiter=nocache' requires a user
  to explicitly resubmit form data every time and 'cache_limiter=private'
  would cache forms too often.
  However the current cache_limiter implementation does not have an option
  to do so. So I wrote a trivial patch against PHP 4.2.3 that adds value
  'none' to session.cache_limiter. When set PHP replies do not include
  'Cach-Control' or 'Pragma: nocache' headers, just a 'Last-Modified' one.
  
  Please consider merging it, from browsing the mailing list I get the
  impression that other people may find the 'none' option useful too.
 
 Current CVS already supports this. From php.ini-* :
 
 ; Set to {nocache,private,public,} to determine HTTP caching aspects.
 ; or leave this empty to avoid sending anti-caching headers.
 session.cache_limiter = nocache
 
 So, effectively, 'session.cache_limiter =' does what you want
 (if I understood you correctly).
 
 regards,
 - Markus
 
 -- 
 GnuPG Key: http://guru.josefine.at/~mfischer/C2272BD0.asc
 rei_ Derick, while ($xml) $ass-get_new_ideas();
 [James] Markus: IE on_user_fart()
 -- People doesn't seem to like the new XHTML2 specs :) --



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




[PHP-DEV] ext/sysvmsg permissions

2002-10-08 Thread Jan Lehnardt

Hey,
there seem to be some permission problems in ext/sysvmsg.

root@dahlia /mnt/data/cvs/php4snap/ext/sysvmsg ls -la
total 22
drwxr-xr-x4 jan  wheel512 Sep  2 14:39 .
drwxr-xr-x  100 jan  wheel   2048 Sep  9 13:08 ..
-r--r--r--1 jan  wheel 39 Apr 26 01:14 .cvsignore
-r--r--r--1 jan  wheel 39 Apr 26 01:14 CREDITS
drwxr-xr-x2 jan  wheel512 Sep  2 14:40 CVS
-r--r--r--1 jan  wheel  0 Apr 26 01:14 EXPERIMENTAL
-r--r--r--1 jan  wheel302 Apr 26 01:14 config.m4
-r--r--r--1 jan  wheel   2037 Apr 26 01:14 php_sysvmsg.h
-r--r--r--1 jan  wheel  11476 Apr 29 14:52 sysvmsg.c
drwxr-xr-x3 jan  wheel512 Sep  2 14:39 tests

Jan
-- 
Q: Thank Jan? A: http://geschenke.an.dasmoped.net/
Got an old and spare laptop? Please send me a mail.
Key7BCC EB86 8313 DDA9 25DF  
Fingerprint1805 ECA5 BCB7 BB96 56B0

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




Re: [PHP-DEV] [PATCH] session.cache_limiter = none

2002-10-08 Thread Markus Fischer

On Tue, Oct 08, 2002 at 12:05:55PM +0200, Bastiaan Bakker wrote : 
 The new dcoumentation still may be a bit confusing, because 'or leave
 this empty' may be interpreted as 'don't set session.cache_limiter'. In
 the latter case PHP defaults to 'nocache' rather than 'no cache
 limiting'. Also the last comma in {nocache,private,public,} is easy to
 miss.

Yes, it may not be that clear. I suggest you open a bug at
bugs.php.net about this issue so a) it doesn't get lost and
b) as soon as someone comes up with a more descriptive text
he can fix it.

- Markus

-- 
GnuPG Key: http://guru.josefine.at/~mfischer/C2272BD0.asc
rei_ Derick, while ($xml) $ass-get_new_ideas();
[James] Markus: IE on_user_fart()
-- People doesn't seem to like the new XHTML2 specs :) --

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




[PHP-DEV] Lib creation

2002-10-08 Thread Metal3d

Hello
I'm new here, and i'll try to stay ... :oP
I'm French so excuse me if i do mistakes .

My friend and I have created a lib in php ( a framework) ...
So i wonder if it is possible to install this lib into PHP to use it without
have to call include('class.inc') in scipts ...
If it is possible ... how can i do that ?
Have i to recode this in C and compil an lib ? is there a documentation for
it ?
Thanks a lot!

--
Metal3d
http://www.metal3d.fr.st
http://pov-wip.fr.st
[EMAIL PROTECTED]



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




Re: [PHP-DEV] [PATCH] session.cache_limiter = none

2002-10-08 Thread Bastiaan Bakker

On Tue, 2002-10-08 at 12:19, Markus Fischer wrote:
 On Tue, Oct 08, 2002 at 12:05:55PM +0200, Bastiaan Bakker wrote : 
  The new dcoumentation still may be a bit confusing, because 'or leave
  this empty' may be interpreted as 'don't set session.cache_limiter'. In
  the latter case PHP defaults to 'nocache' rather than 'no cache
  limiting'. Also the last comma in {nocache,private,public,} is easy to
  miss.
 
 Yes, it may not be that clear. I suggest you open a bug at
 bugs.php.net about this issue so a) it doesn't get lost and
 b) as soon as someone comes up with a more descriptive text
 he can fix it.
 
 - Markus


OK, I will.

BTW. I found out why leaving the option empty also works in 4.2.3: the
cache_limiter function tries to find the limiter corresponding with ''.
As it cannot find it, it does nothing, but simply returns with error
code -1. The calling function simply ignores the return code and
continues processing.
Unfortunately this also causes misspellings like 
'session.cache_limiter=pivate' to go unnoticed. 

Cheers,

Bastiaan Bakker
LifeLine Networks bv
 
 
 -- 
 GnuPG Key: http://guru.josefine.at/~mfischer/C2272BD0.asc
 rei_ Derick, while ($xml) $ass-get_new_ideas();
 [James] Markus: IE on_user_fart()
 -- People doesn't seem to like the new XHTML2 specs :) --



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




Re: [PHP-DEV] ext/sysvmsg permissions

2002-10-08 Thread Wez Furlong

Hi Jan,

I had this same problem with some of the streams files.
It was (apparently) due to someone doing a cvs watch on.
Jim fixed this by tweaking the repository.

What's strange is that both the streams files and those sysvmsg
files were created by me, (although my umask is the usual 022)...
so maybe Big Brother is watching me?? :-)

--Wez.

On 10/08/02, Jan Lehnardt [EMAIL PROTECTED] wrote:
 Hey,
 there seem to be some permission problems in ext/sysvmsg.
 
 root@dahlia /mnt/data/cvs/php4snap/ext/sysvmsg ls -la
 total 22
 drwxr-xr-x4 jan  wheel512 Sep  2 14:39 .
 drwxr-xr-x  100 jan  wheel   2048 Sep  9 13:08 ..
 -r--r--r--1 jan  wheel 39 Apr 26 01:14 .cvsignore
 -r--r--r--1 jan  wheel 39 Apr 26 01:14 CREDITS
 drwxr-xr-x2 jan  wheel512 Sep  2 14:40 CVS
 -r--r--r--1 jan  wheel  0 Apr 26 01:14 EXPERIMENTAL
 -r--r--r--1 jan  wheel302 Apr 26 01:14 config.m4
 -r--r--r--1 jan  wheel   2037 Apr 26 01:14 php_sysvmsg.h
 -r--r--r--1 jan  wheel  11476 Apr 29 14:52 sysvmsg.c
 drwxr-xr-x3 jan  wheel512 Sep  2 14:39 tests
 
 Jan
 -- 
 Q: Thank Jan? A: http://geschenke.an.dasmoped.net/
 Got an old and spare laptop? Please send me a mail.
 Key7BCC EB86 8313 DDA9 25DF  
 Fingerprint1805 ECA5 BCB7 BB96 56B0
 
 -- 
 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] ext/sysvmsg

2002-10-08 Thread Wez Furlong

Hi Jan,

I wrote that code, but I don't have a FreeBSD box to help fix this :-/

--Wez.

On 10/08/02, Jan Lehnardt [EMAIL PROTECTED] wrote:
 Hi,
 even more errors show up when the previously quoted lines are commented out:

 gcc  -Iext/sysvmsg/ -I/mnt/data/cvs/php4clean/ext/sysvmsg/ -DPHP_ATOM_INC 
-I/mnt/data/cvs/php4clean/include -I/mnt/data/cvs/php4clean/main 
-I/mnt/data/cvs/php4clean -I/mnt/data/cvs/php4clean/Zend -I/usr/local/include 
-I/usr/local/include -I/usr/local/include/libxml2 -I/usr/local/FrontBase/include 
-I/usr/local/include/mcal -I/usr/local/include/ming -I/usr/local/include/pspell 
-I/usr/local/include/ucd-snmp -I/mnt/data/cvs/php4clean/ext/xml/expat  
-I/mnt/data/cvs/php4clean/TSRM  -g -O2  -c 
/mnt/data/cvs/php4clean/ext/sysvmsg/sysvmsg.c -o ext/sysvmsg/sysvmsg.o   echo  
ext/sysvmsg/sysvmsg.lo
 /mnt/data/cvs/php4clean/ext/sysvmsg/sysvmsg.c: In function `zif_msg_send':
 /mnt/data/cvs/php4clean/ext/sysvmsg/sysvmsg.c:365: sizeof applied to an incomplete 
type
 /mnt/data/cvs/php4clean/ext/sysvmsg/sysvmsg.c:366: dereferencing pointer to 
incomplete type
 /mnt/data/cvs/php4clean/ext/sysvmsg/sysvmsg.c:371: sizeof applied to an incomplete 
type
 /mnt/data/cvs/php4clean/ext/sysvmsg/sysvmsg.c:372: dereferencing pointer to 
incomplete type
 /mnt/data/cvs/php4clean/ext/sysvmsg/sysvmsg.c:377: dereferencing pointer to 
incomplete type
 *** Error code 1

 Jan
 --
 Q: Thank Jan? A: http://geschenke.an.dasmoped.net/
 Got an old and spare laptop? Please send me a mail.
 Key7BCC EB86 8313 DDA9 25DF
 Fingerprint1805 ECA5 BCB7 BB96 56B0

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




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




[PHP-DEV] phpinfo() problems

2002-10-08 Thread Yasuo Ohgaki
First problem, CSS should not contain specific font
name. Otherwise, characters may be broken under some
browsers when font does not have type faces needed.

Second problem, phpinfo() output should not automatically
converted to html entity unless correct charset is used
when chars are converted to entity. Otherwise, characters
may be broken. Please do not try to use UTF-8 always to fix
since UTF-8 does not support everything.

Due to these two problems, phpinfo() output is much less
useful for me than used to be.

I hope someone responsible will fix it.

--
Yasuo Ohgaki


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


Re: [PHP-DEV] ext/sysvmsg

2002-10-08 Thread Melvyn Sopacua

Wez,

there's something going wrong with the autoconf logic config.m4 section I 
sent a while back.
I'll look into it.

Jan: if you change the following in main/php_config.h, it should work:

/*msgbuf is called mymsg */
/* #undef msgbuf */

to:

/*msgbuf is called mymsg */
#define msgbuf mymsg


See /usr/include/sys/msg.h for the reason why.


At 12:06 10/8/2002 +0100, Wez Furlong wrote:

Hi Jan,

I wrote that code, but I don't have a FreeBSD box to help fix this :-/

--Wez.

On 10/08/02, Jan Lehnardt [EMAIL PROTECTED] wrote:
  Hi,
  even more errors show up when the previously quoted lines are commented 
 out:
 
  gcc  -Iext/sysvmsg/ -I/mnt/data/cvs/php4clean/ext/sysvmsg/ 
 -DPHP_ATOM_INC -I/mnt/data/cvs/php4clean/include 
 -I/mnt/data/cvs/php4clean/main -I/mnt/data/cvs/php4clean 
 -I/mnt/data/cvs/php4clean/Zend -I/usr/local/include -I/usr/local/include 
 -I/usr/local/include/libxml2 -I/usr/local/FrontBase/include 
 -I/usr/local/include/mcal -I/usr/local/include/ming 
 -I/usr/local/include/pspell -I/usr/local/include/ucd-snmp 
 -I/mnt/data/cvs/php4clean/ext/xml/expat  -I/mnt/data/cvs/php4clean/TSRM 
 -g -O2  -c /mnt/data/cvs/php4clean/ext/sysvmsg/sysvmsg.c -o 
 ext/sysvmsg/sysvmsg.o   echo  ext/sysvmsg/sysvmsg.lo
  /mnt/data/cvs/php4clean/ext/sysvmsg/sysvmsg.c: In function `zif_msg_send':
  /mnt/data/cvs/php4clean/ext/sysvmsg/sysvmsg.c:365: sizeof applied to an 
 incomplete type
  /mnt/data/cvs/php4clean/ext/sysvmsg/sysvmsg.c:366: dereferencing 
 pointer to incomplete type
  /mnt/data/cvs/php4clean/ext/sysvmsg/sysvmsg.c:371: sizeof applied to an 
 incomplete type
  /mnt/data/cvs/php4clean/ext/sysvmsg/sysvmsg.c:372: dereferencing 
 pointer to incomplete type
  /mnt/data/cvs/php4clean/ext/sysvmsg/sysvmsg.c:377: dereferencing 
 pointer to incomplete type
  *** Error code 1
 
  Jan
  --
  Q: Thank Jan? A: http://geschenke.an.dasmoped.net/
  Got an old and spare laptop? Please send me a mail.
  Key7BCC EB86 8313 DDA9 25DF
  Fingerprint1805 ECA5 BCB7 BB96 56B0
 
  --
  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

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




Re: [PHP-DEV] ext/aspell

2002-10-08 Thread Sascha Cunz

 [] While new comers may not know of pspell,
 people who have compiled PHP before with it will, infact that is what
 they'll expect when configuring their PHP. Since we cannot remove the old
 pspell option like we seem to agree to do for --with-aspell it is cleaner
 IMHO to simply add that little bit of text that will tell people new to php
 that --with-pspell also applies to GNU Aspell. Perpaps, a year down the
 road when we feel confortable to say that GNU marketing(tm) has made pspell
 absolete we can make this change.

Then why not make --with-pspell cause an error saying: use 
--with-gnu-aspell? And then move --with-pspell to /dev/null at it's time.

Sascha

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




Re: [PHP-DEV] ext/aspell

2002-10-08 Thread Jon Parise

On Tue, Oct 08, 2002 at 06:05:09PM +0200, Sascha Cunz wrote:

  [] While new comers may not know of pspell,
  people who have compiled PHP before with it will, infact that is what
  they'll expect when configuring their PHP. Since we cannot remove the old
  pspell option like we seem to agree to do for --with-aspell it is cleaner
  IMHO to simply add that little bit of text that will tell people new to php
  that --with-pspell also applies to GNU Aspell. Perpaps, a year down the
  road when we feel confortable to say that GNU marketing(tm) has made pspell
  absolete we can make this change.
 
 Then why not make --with-pspell cause an error saying: use 
 --with-gnu-aspell? And then move --with-pspell to /dev/null at it's time.
 
Either way, I think it's also appropriate to move the [ap]spell
extension to PECL for the next major release (i.e. not for 4.3, but
for 4.4 or later).

-- 
Jon Parise ([EMAIL PROTECTED]) :: The PHP Project (http://www.php.net/)

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




[PHP-DEV] Re: [PHP-QA] Re: [PHP-DEV] ext/sysvmsg

2002-10-08 Thread Sascha Schumann

On Tue, 8 Oct 2002, Melvyn Sopacua wrote:

 Wez,

 there's something going wrong with the autoconf logic config.m4 section I
 sent a while back.
 I'll look into it.

As with SysV shared memory, the extension should define its
own structure, if struct msgbuf is not found on the system.

FreeBSD is a good example for an environment which does not
define this structure.  glibc only defines it, if all GNU
features have been enabled (-D_GNU_SOURCE).

In that regard, php_sysvmsg.h needs to stop defining
__USE_GNU.  An application must not interfere with the C
implementation which the sysvmsg extension is doing here
clearly.

Because __USE_GNU is only a subset of the behavioural changes
which are enabled by _GNU_SOURCE, one can expect that it
might trigger bugs in the C library or lead to other
undesirable results.

- Sascha


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




[PHP-DEV] Re: [PHP-QA] ext/sysvmsg

2002-10-08 Thread Melvyn Sopacua

At 11:45 10/8/2002 +0200, Jan Lehnardt wrote:

Hello again,
can somebody with a better knowledge than me have a look at
ext/sysvmsg/sysvmsg.c ?

Should be fixed now in Revision 1.4 of config.m4.

Tested and verified on FreeBSD 4.6.


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




Re: [PHP-DEV] Re: [PHP-QA] Re: [PHP-DEV] ext/sysvmsg

2002-10-08 Thread Melvyn Sopacua

Hi Sasha,

At 18:18 10/8/2002 +0200, Sascha Schumann wrote:

On Tue, 8 Oct 2002, Melvyn Sopacua wrote:

  Wez,
 
  there's something going wrong with the autoconf logic config.m4 section I
  sent a while back.
  I'll look into it.

 As with SysV shared memory, the extension should define its
 own structure, if struct msgbuf is not found on the system.

 FreeBSD is a good example for an environment which does not
 define this structure.  glibc only defines it, if all GNU
 features have been enabled (-D_GNU_SOURCE).

 In that regard, php_sysvmsg.h needs to stop defining
 __USE_GNU.  An application must not interfere with the C
 implementation which the sysvmsg extension is doing here
 clearly.

 Because __USE_GNU is only a subset of the behavioural changes
 which are enabled by _GNU_SOURCE, one can expect that it
 might trigger bugs in the C library or lead to other
 undesirable results.

The comment in the header explains that it's an unclear part of the SVID spec.

I've researched this a while back, and found the structures to be the same, 
just named
differently.
Howerver - looking more closely, I think you're right!

The struct msgbuf as defined, for example here:
http://ou800doc.caldera.com/cgi-bin/man/man?msgop+2

defines mtext member as mtext[] while FreeBSD defines it as mtext[1].

Shall I revert the patch?

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

2002-10-08 Thread Derick Rethans

Hello,

I propose to ditch this one right now, and re number the HEAD branch to 
4.3.0-dev (instead of 4.4.0-dev). Any objections?

regards,
Derick

--

---
 Derick Rethans   http://derickrethans.nl/ 
 JDI Media Solutions   http://www.jdimedia.nl/
---


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




[PHP-DEV] Re: [PHP-QA] Re: [PHP-DEV] Re: [PHP-QA] Re: [PHP-DEV] ext/sysvmsg

2002-10-08 Thread Sascha Schumann

 The struct msgbuf as defined, for example here:
 http://ou800doc.caldera.com/cgi-bin/man/man?msgop+2

 defines mtext member as mtext[] while FreeBSD defines it as mtext[1].

Yes, mtext[] is not a valid ISO C construct.

The structures of the SysV IPC interfaces are generally not
defined by system headers, although some implementations
choose to provide them.

Thus the rule should be: If autoconf finds the definition, we
use it, otherwise we rely on our own, namespace-protected
version.  Example:

#ifdef HAVE_STRUCT_SYSMSG
typedef struct sysmsg php_sysmsg;
#else

typedef struct {
long mtype;
char mtext[1];
} php_sysmsg;

#endif

 Shall I revert the patch?

Unless it decreases the quality of the code, it should stay
in (I have not looked at it myself).

- Sascha


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




[PHP-DEV] auto_prepend_file and auto_append_file

2002-10-08 Thread Ilia A.

As it currently stands, to disable auto_prepend_file and auto_append_file 
directives the user needs to either specify no value or a  value. However, 
the manual claims a special option none will accomplish the same task. This 
however creates a problem for people who for whatever reason want to use file 
called 'none'. Not to mention the fact that this particular option is not at 
all supported.
My suggestion is that rather then adding strncmp() for 'none' in addition to 
existing checks for auto_prepend_file/auto_append_file values we simply 
change the documentation to explain that to disable these options a user 
should use  as their value.

Ilia

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




Re: [PHP-DEV] PHP_4_3

2002-10-08 Thread Andrei Zmievski

No. I'll do it.

On Tue, 08 Oct 2002, Derick Rethans wrote:
 Hello,
 
 I propose to ditch this one right now, and re number the HEAD branch to 
 4.3.0-dev (instead of 4.4.0-dev). Any objections?
 
 regards,
 Derick
 
 --
 
 ---
  Derick Rethans   http://derickrethans.nl/ 
  JDI Media Solutions   http://www.jdimedia.nl/
 ---
 
 
 -- 
 PHP Development Mailing List http://www.php.net/
 To unsubscribe, visit: http://www.php.net/unsub.php



-Andrei   http://www.gravitonic.com/

The only true currency in this bankrupt world is what we share with each
other when we're uncool. -- Lester Bangs, from the film 'Almost Famous'

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




Re: [PHP-DEV] auto_prepend_file and auto_append_file

2002-10-08 Thread Stanislav Malyshev

IA however creates a problem for people who for whatever reason want to
IA use file called 'none'. Not to mention the fact that this particular

Do you know such people? What is the reason to use filename none as a 
prepend file?

IA option is not at all supported. My suggestion is that rather then

I thought it is supported, by lex parsing none as . 

IA adding strncmp() for 'none' in addition to existing checks for
IA auto_prepend_file/auto_append_file values we simply change the
IA documentation to explain that to disable these options a user should
IA use  as their value.

And break existing setups? Don't think it's any good...
-- 
Stanislav Malyshev, Zend Products Engineer   
[EMAIL PROTECTED]  http://www.zend.com/ +972-3-6139665 ext.109




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




Re: [PHP-DEV] auto_prepend_file and auto_append_file

2002-10-08 Thread Sander Roobol

On Tue, Oct 08, 2002 at 01:46:09PM -0400, Ilia A. wrote:
 My suggestion is that rather then adding strncmp() for 'none' in addition to 
 existing checks for auto_prepend_file/auto_append_file values we simply 
 change the documentation to explain that to disable these options a user 
 should use  as their value.
+1

Sander

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




Re: [PHP-DEV] auto_prepend_file and auto_append_file

2002-10-08 Thread Ilia A.

On October 8, 2002 01:45 pm, Stanislav Malyshev wrote:
 IA however creates a problem for people who for whatever reason want to
 IA use file called 'none'. Not to mention the fact that this particular

 Do you know such people? What is the reason to use filename none as a
 prepend file?

People use all sort of files names, ultimately there will be someone who woud 
want to use none as an option. For people who do not speak English and are 
not aware of the word's meaning, this is quite likely.

 IA option is not at all supported. My suggestion is that rather then

 I thought it is supported, by lex parsing none as .


That is true, however despite the warning inside php.ini itself, many users 
quote none, which leads to the percieved problem of none option not working 
properly. 

 IA adding strncmp() for 'none' in addition to existing checks for
 IA auto_prepend_file/auto_append_file values we simply change the
 IA documentation to explain that to disable these options a user should
 IA use  as their value.

 And break existing setups? Don't think it's any good...

I do not suggest we break BC, maintaining support for non quoted 'none' option 
is good idea. However, I think it would clear up a fair amount of confustion 
if the manual is changed to indicate, that to disable 
auto_prepend_file/auto_append_file,  or no value at all should be used.

Ilia

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




Re: [PHP-DEV] Re: output buffering

2002-10-08 Thread Hartmut Holzgraefe

Zeev Suraski wrote:
 
 Aha, ok, that actually makes quite a bit of sense.  If there's a bit of 
 output that remains inside the buffers, and the session module gets 
 deactivated before this output is flushed, we're in trouble...  I'll 
 take a look at it.

i think i've been bitten by this using apxs ... :(

at least i've been suffering xml output missing some bytes at the end
in a project where a trans-sid session was started for the xml 
generating script by an included file (although there was no actual
need for a session, so 'fixing' the problem was easy in that case)


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




[PHP-DEV] Re: [PHP-QA] Re: [PHP-DEV] Re: [PHP-QA] Re: [PHP-DEV] ext/sysvmsg

2002-10-08 Thread Melvyn Sopacua

At 18:56 10/8/2002 +0200, Sascha Schumann wrote:

Thus the rule should be: If autoconf finds the definition, we
 use it, otherwise we rely on our own, namespace-protected
 version.  Example:

 #ifdef HAVE_STRUCT_SYSMSG
 typedef struct sysmsg php_sysmsg;
 #else

 typedef struct {
 long mtype;
 char mtext[1];
 } php_sysmsg;

 #endif

It's not a typedef but the struct itself that's provided, so that doesn't work.
I've made a patch now, that I'm not too keen on, but works.

It boils down to:
AC_TRY_COMPILE(...look for msgbuf,
 [AC_DEFINE(HAVE_STRUCT_SYSV_MSGBUF,1,[struct msgbuf is in 
sys/msg.h])],
 [AC_TRY_COMPILE(...look for mymsg,
 [AC_DEFINE(HAVE_STRUCT_SYSV_MSGBUF,1,[struct msgbuf is in 
sys/msg.h]),
  AC_DEFINE(msgbuf,mymsg,[msgbuf is called mymsg])
 ])
 ])

Then in sysvmsg.c:
#ifdef HAVE_STRUCT_SYSV_MSGBUF
#define php_msgbuf msgbuf
#else
struct php_msgbuf {
 long mtype;
 char mtext[1];
};
#endif

Replace all occurences of msgbuf with php_msgbuf.

As I said - it works, but it's a double pre-processor replace for mymsg. I 
think I could just ignore
mymsg all together, but that would create two identical structs defined. 
Not sure if that's
desirable (read: no idea what that impact and in what way).

Test 001.phpt passes though.

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] Re: [PHP-QA] Re: [PHP-DEV] Re: [PHP-QA] Re: [PHP-DEV] ext/sysvmsg

2002-10-08 Thread Sascha Schumann

 It's not a typedef but the struct itself that's provided, so that doesn't work.

I'm curious.  The following code works here.

struct foo { int a; };
typedef struct foo php_sysmsg;

What did not work for you?

Just using struct php_sysmsg is fine, too.

 It boils down to:

Please remove the mymsg part.  It is not required and might
cause problems later on (e.g. mysql uses the my prefix as
well).

- Sascha


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




[PHP-DEV] Re: [sab-php] bughunting

2002-10-08 Thread Melvyn Sopacua

At 15:11 8-10-2002, you wrote:

Melvyn Sopacua wrote:

Problem is:
which binary is the reference for CWD?

The cwd is set according to an executable that loads and executes the 
sablib code. To work with modules running scripts, a convenient default 
base should be set to override the cwd. This is what you do now, aren't you?

Nope. This is what we do, when you tell which binary is the reference :-)


I think the cwd implementation is the correct one, as it's PHP's task to 
set the current working directory to the top-level script being executed. 
Is this change in CVS?


Yes, a couple of releases already. Just my theory has been out-of-date.

Good. Judging from David's message, the base should be a file, not a path 
and you call dirname on the base. Is this subject to change/discussion?
I think it's more intuitive to set a base dir, rather than a base file, 
even though it's more work to do so in userland.

We can make this a doc issue though, but that would also imply that we 
would stat the argument of xslt_set_base in php and issue a warning when 
it's a directory as a curtosy to the user now that we have the fancy 
php_error_docref :-).

4.3 release is aimed at 1st week november.

Looking at current developments, this estimation of mine, may be a little 
optimistic, but time will tell. It's unlikely to be sooner IMO.

OK. If we have a new release candidate, we will make it available for 
tests before the release.

Thanx! I'll keep sablot cvs in sync with any tests/modifications we'll 
produce and keep you posted (on this and other issues of course :-).


--
Petr Cimprich
Ginger Alliance
www.gingerall.com




Archives and info: http://www.gingerall.org/charlie/ga/xml/m_ml.xml

Mailing list maintained by Ginger Alliance




Best regards,
Melvyn Sopacua
WebMaster IDG.nl
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
If it applies, where it applies - this email is a personal
contribution and does not reflect the views of my employer
IDG.nl.
\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\


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




[PHP-DEV] default properties (in c)

2002-10-08 Thread Tim Daly, Jr.


Hi everybody.  I'm working on an extension that creates classes, and I
want to add class variables to the classes.  It looks like,
internally, class variables are stored in the
zend_class_entry.default_properties hash.  Manipulating this hash has
the effect desired, however I seem to have misunderstood the memory
management issues somehow; the code below causes leaks and crashes.

Is there an official way to add class variables to a class from C?  Is
there anything obviously wrong with the code below?  

Thanks!!
-Tim

static zend_class_entry *class_name_class_entry;
static zend_class_entry tmp_class_entry;

int add_default_property_null(zend_class_entry *class_entry, 
  const char *name)
{
zval *property;
int ret;

MAKE_STD_ZVAL(property); 
ZVAL_NULL(property);
return zend_hash_update(class_entry-default_properties, name, 
strlen(name)+1,  (void *)property, sizeof(zval *), NULL);
}



int add_default_property_zval(zend_class_entry *class_entry, 
  const char *name, 
  zval **value)
{
zval *aval;

MAKE_STD_ZVAL(aval);
*aval = **value;
zval_add_ref(aval);
zval_copy_ctor(aval);
return zend_hash_update(class_entry-default_properties, name, 
strlen(name)+1, (void *)aval, sizeof(zval *), NULL);
}


void define_a_class() 
{
   /* make a class with two properties, one of which is an array */
zval *wrapper;
zval *array;

INIT_CLASS_ENTRY(tmp_class_entry, class_name, class_name_functions);
class_name_class_entry = zend_register_internal_class(tmp_class_entry);

add_default_property_null(class_name_class_entry, prop_name);

MAKE_STD_ZVAL(array);
array_init(array);
add_next_index_string(array, foo, 1);
add_default_property_zval(class_name_class_entry, prop_name1, array); 

}



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




Re: [PHP-DEV] default properties (in c)

2002-10-08 Thread Brad LaFountain

What engine are you working with 1 or 2?
-brad
--- Tim Daly, Jr. [EMAIL PROTECTED] wrote:
 
 Hi everybody.  I'm working on an extension that creates classes, and I
 want to add class variables to the classes.  It looks like,
 internally, class variables are stored in the
 zend_class_entry.default_properties hash.  Manipulating this hash has
 the effect desired, however I seem to have misunderstood the memory
 management issues somehow; the code below causes leaks and crashes.
 
 Is there an official way to add class variables to a class from C?  Is
 there anything obviously wrong with the code below?  
 
 Thanks!!
 -Tim
 
 static zend_class_entry *class_name_class_entry;
 static zend_class_entry tmp_class_entry;
 
 int add_default_property_null(zend_class_entry *class_entry, 
   const char *name)
 {
 zval *property;
 int ret;
 
 MAKE_STD_ZVAL(property); 
 ZVAL_NULL(property);
 return zend_hash_update(class_entry-default_properties, name, 
 strlen(name)+1,  (void *)property, sizeof(zval
 *), NULL);
 }
 
 
 
 int add_default_property_zval(zend_class_entry *class_entry, 
   const char *name, 
   zval **value)
 {
 zval *aval;
 
 MAKE_STD_ZVAL(aval);
 *aval = **value;
 zval_add_ref(aval);
 zval_copy_ctor(aval);
 return zend_hash_update(class_entry-default_properties, name, 
 strlen(name)+1, (void *)aval, sizeof(zval *),
 NULL);
 }
 
 
 void define_a_class() 
 {
/* make a class with two properties, one of which is an array */
 zval *wrapper;
 zval *array;
 
 INIT_CLASS_ENTRY(tmp_class_entry, class_name, class_name_functions);
 class_name_class_entry = zend_register_internal_class(tmp_class_entry);
 
 add_default_property_null(class_name_class_entry, prop_name);
 
 MAKE_STD_ZVAL(array);
 array_init(array);
 add_next_index_string(array, foo, 1);
 add_default_property_zval(class_name_class_entry, prop_name1, array); 
 
 }
 
 
 
 -- 
 PHP Development Mailing List http://www.php.net/
 To unsubscribe, visit: http://www.php.net/unsub.php
 


__
Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos  More
http://faith.yahoo.com

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




Re: [PHP-DEV] default properties (in c)

2002-10-08 Thread Tim Daly, Jr.


Brad LaFountain [EMAIL PROTECTED] writes:

 What engine are you working with 1 or 2?
 -brad

I imagine PHP3 == engine 1, and PHP4 == engine 2?

I'm using PHP version 4.2.3.

-Tim

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




Re: [PHP-DEV] ext/sysvmsg

2002-10-08 Thread Melvyn Sopacua

At 21:11 8-10-2002, Sascha Schumann wrote:

  It's not a typedef but the struct itself that's provided, so that 
 doesn't work.

 I'm curious.  The following code works here.

 struct foo { int a; };
 typedef struct foo php_sysmsg;

 What did not work for you?

Yes - it sounds logical, but we we're back to the old problem. Calling a sizeof
on an unfinished type.
I placed the #ifdefs, in the header, the global scope of the c file, and the
function bodies and none worked. I also checked gcc -E preprocessor output and
all looked in order.
I might have overlooked something though.

  It boils down to:

 Please remove the mymsg part.  It is not required and might
 cause problems later on (e.g. mysql uses the my prefix as
 well).

Good point - but also raises, whether to look for this struct in the first 
place.
Why not skip it all, and define it ISO C compliant, in php_ namespace?



Met vriendelijke groeten / With kind regards,

Webmaster IDG.nl
Melvyn Sopacua


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




[PHP-DEV] Re: [PHP-CVS] cvs: php4 /ext/standard css.c

2002-10-08 Thread Colin Viebrock

   Log:
   don't define fonts ... use the browser defaults
 
 Reason being?

Yasuo Ohgaki's post earlier today said:

  First problem, CSS should not contain specific font
  name. Otherwise, characters may be broken under some
  browsers when font does not have type faces needed.

Although, to be honest, I think his problem is more with the character
set that is being sent with phpinfo pages.  I'm guessing he has a
Japanese version of Arial, that's missing some of the characters like
eactue; etc..  Since the page is probably outputting
charset=shift-JIS or whatever, the page looks broken.

I'm waiting to hear a response from him on this issue, which might
affect my changes to the css page.


 The definitions end in generic font families. There's no shame in
 defining a __readable__ __preference__.
 Especially Andale Mono, since it is one of the few monotype fonts,
 that has a readable difference between the l and a 1 and the O and 0.
 
 I've seen more people fiddling with their fonts, because they're pretty
 than because they're readable. Docs should aim to be readable.

Agreed.  Which is why the default fonts on people's browsers should be
set to be readable already, no?

Also, some people have emailed suggesting I remove them because of the
CSS styling that they apply themselves to the phpinfo() output, using
their own font defs.


 What's more problematic in the css code below, is the 75% default on td/th.
 
 If you nest that, the inner td, is 75% of 75% of the body.

But there is no nesting of tables in phpinfo()'s output.

- Colin


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




Re: [PHP-DEV] Re: [PHP-CVS] cvs: php4 /ext/standard css.c

2002-10-08 Thread Melvyn Sopacua

At 00:28 9-10-2002, Colin Viebrock wrote:

Log:
don't define fonts ... use the browser defaults
 
  Reason being?

Yasuo Ohgaki's post earlier today said:

   First problem, CSS should not contain specific font
   name. Otherwise, characters may be broken under some
   browsers when font does not have type faces needed.

I've had this discussion with respect to the euro-sign also. Apparently,
there are 2 different standards, which define different places for the
euro sign in fonts - one on the 'international currency' glyph, and
the 'microsoft' way, in unicode, with an OS-hack for non-unicode fonts.
[1]

I lack the specifics right now, but can look them up if you're interested.

Although, to be honest, I think his problem is more with the character
set that is being sent with phpinfo pages.  I'm guessing he has a
Japanese version of Arial, that's missing some of the characters like
eactue; etc..  Since the page is probably outputting
charset=shift-JIS or whatever, the page looks broken.

Agreed, as [1] is a problem with the font implementation and should be
taken up with the vendor of either the font or the OS. 'The web' cannot
be held responsible for how the browser interprets euro; (or a charset
header and bytes from a different one for that matter).

I'm waiting to hear a response from him on this issue, which might
affect my changes to the css page.


  The definitions end in generic font families. There's no shame in
  defining a __readable__ __preference__.
  Especially Andale Mono, since it is one of the few monotype fonts,
  that has a readable difference between the l and a 1 and the O and 0.
 
  I've seen more people fiddling with their fonts, because they're pretty
  than because they're readable. Docs should aim to be readable.

Agreed.  Which is why the default fonts on people's browsers should be
set to be readable already, no?

For a sysadmin yes. For a designer (large group of new users, since articles
on flash+php seem to emerge everywhere) that's questionable :-)

The CSS mechanism was however designed to express preferences and fallback.

Also, some people have emailed suggesting I remove them because of the
CSS styling that they apply themselves to the phpinfo() output, using
their own font defs.

Ehm - that is what user-defined stylesheets on the client are for. And settings
like 'always use my fonts'.

But anyway - not worth a long discussion - just a tiny bit worried about 
bogusing
bug reports like 'phpinfo page suddenly looks weird'.
And it's already much better than deprecated font-tags :-)

  What's more problematic in the css code below, is the 75% default on td/th.
 
  If you nest that, the inner td, is 75% of 75% of the body.

But there is no nesting of tables in phpinfo()'s output.

yet :-)


- Colin


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


Met vriendelijke groeten / With kind regards,

Webmaster IDG.nl
Melvyn Sopacua


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




Re: [PHP-DEV] default properties (in c)

2002-10-08 Thread Timm Friebe

On Tue, 2002-10-08 at 23:15, Tim Daly, Jr. wrote:
 
 Brad LaFountain [EMAIL PROTECTED] writes:
 
  What engine are you working with 1 or 2?
  -brad
 
 I imagine PHP3 == engine 1, and PHP4 == engine 2?
 
 I'm using PHP version 4.2.3.

Almost: PHP4 = ZE1, PHP5 = ZE2 :-)

-- 
Timm




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




[PHP-DEV] Re: phpinfo() problems

2002-10-08 Thread Yasuo Ohgaki

I understand you would like to make phpinfo() output confirm XHTML

My suggestion is leave small problems and let browser detect/use
appropriate font/charset. This will work mostly since users are
using browser optimized for their language. If browser detect wrong,
user still be able to manually set correct charset.

Hard coding charset causes problems and the behavior is different
from browser to browser... Char to entity conversion function only 
supports few encoding... Detecting charset is a bit unreasonable,
but using internal encoding/charset ini directive is more reasonable.
However, it means phpinfo() depends on mbstring (or make internal
encoding directive to core_globals at least)
Please note charset != internal encoding. These ini directives
do not have to be the same.

I'm not sure if we should try, but we can try to make phpinfo()
perfectly confirm XHTML once multibyte char support is fully
integrated to PHP/Zend.

--
Yasuo Ohgaki

Colin Viebrock wrote:
 Would this problem be solved if the META tag that defines the character
 set is hard-coded to use US-ASCII or ISO-8859-1, instead of going
 through the process it does now to try and determine a charset?
 
 - Colin
 
 Yasuo Ohgaki wrote:
 
First problem, CSS should not contain specific font
name. Otherwise, characters may be broken under some
browsers when font does not have type faces needed.

Second problem, phpinfo() output should not automatically
converted to html entity unless correct charset is used
when chars are converted to entity. Otherwise, characters
may be broken. Please do not try to use UTF-8 always to fix
since UTF-8 does not support everything.

Due to these two problems, phpinfo() output is much less
useful for me than used to be.

I hope someone responsible will fix it.

--
Yasuo Ohgaki

 
 
 
 
 



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




[PHP-DEV] Re: [PHP-CVS] cvs: php4 /ext/standard css.c

2002-10-08 Thread Yasuo Ohgaki

Colin Viebrock wrote:
 I'm waiting to hear a response from him on this issue, which might
 affect my changes to the css page.
 

You forgot to disable automatic char to entities conversion

e.g. Followings cannot be Japanese text obviously
Ccedil;macr; 9middot;icirc; 9AElig;uuml; 
middot;icirc;Iacute;Euml;AElig;uuml;
This is EUC-JP text output from phpinfo(), btw.

--
Yasuo Ohgaki


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




[PHP-DEV] Re: [PHP-CVS] cvs: php4 /ext/standard css.c

2002-10-08 Thread Yasuo Ohgaki

Colin Viebrock wrote:
 Yasuo Ohgaki's post earlier today said:
First problem, CSS should not contain specific font
name. Otherwise, characters may be broken under some
browsers when font does not have type faces needed.

 
 Although, to be honest, I think his problem is more with the character
 set that is being sent with phpinfo pages.  I'm guessing he has a

It is well known font issue. Some browser won't try to use other
fonts when font specified is missing type faces. If you really would
like to list specific font, list CJK and other fonts first then western
fonts.

Anyway, you have been resolved this.

 Japanese version of Arial, that's missing some of the characters like
 eactue; etc..  Since the page is probably outputting
 charset=shift-JIS or whatever, the page looks broken.

AFAIK, there is no Arial that includes CJK.

--
Yasuo Ohgaki


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




[PHP-DEV] CODING_STANDARDS addition re: emalloc

2002-10-08 Thread Jon Parise

Attached is a patch that adds a new item to CODING_STANDARDS that
suggests using emalloc() and friends over the standard C library
version.  It also offers an explanation, courtesy of Rasmus' reply to
my earlier question on the subject.

If no one objects to the addition in principle or in wording, I'll
commit this in a few days.

-- 
Jon Parise ([EMAIL PROTECTED]) :: The PHP Project (http://www.php.net/)


Index: CODING_STANDARDS
===
RCS file: /repository/php4/CODING_STANDARDS,v
retrieving revision 1.22
diff -u -r1.22 CODING_STANDARDS
--- CODING_STANDARDS9 Sep 2002 07:54:11 -   1.22
+++ CODING_STANDARDS9 Oct 2002 02:09:46 -
@@ -122,6 +122,15 @@
  existing.  End users should use function_exists() to test for the
  existence of a function
 
+[11] Prefer emalloc(), efree(), estrdup(), etc. to their standard C library
+ counterparts.  These functions implement an internal safety-net
+ mechanism that ensures the deallocation of any unfreed memory at the
+ end of the request.  They also provide useful allocation and overflow
+ information when running in debug mode.
+
+ malloc() should only be used in instances where you need to allocate
+ memory that will be freed (via free()) inside of a third-party library.
+
 Naming Conventions
 --
 



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


[PHP-DEV] Re: [PHP-CVS] cvs: php4 /ext/standard css.c

2002-10-08 Thread Colin Viebrock

This is getting a little more complicated than I think is necessary.
There are two issues here, I think:

a) Fonts.  Some people didn't like Arial, so I reverted to letter the
browser decide.  Some people didn't like that, and they'd like the font
specifications back in.

I'm going to add the font specifications back in again.  I like Arial,
personally, but I will put Verdana as the first font.  This is in
keeping with the look of php.net anyway, so I can justify it.  There is
nothing stopping anyone from specifying use my own fonts in their
browsers.

b) Charsets.  I don't pretend to know what the charset deciding code in
ext/standard/info.c is trying to do.  I guess it's looking to see if
your browser supports multi-byte charsets, or what encoding you prefer
... and then defaulting to US-ASCII if nothing else works.  Seemed
reasonable to me.

I suppose, what Yasuo has pointed out, is that some (many? all?)
multibyte fonts or versions of those fonts don't support the HTML entity
encoding that is used on some of the phpinfo() pages ... mainly people's
names in the credits pages, but also any  or  or  that show up in
other data.  These need to be encoded *somehow* if the page is to be
XHTML compatible, and I'm not about to implement utf8_encode() in C.  :)

I don't know what the solution to this is.  My instinct is to ask why
don't we just hardcode the pages to use US-ASCII, or ISO-8859-1?  Would
this not solve the charset issues?

- Colin


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




[PHP-DEV] Re: [PHP-CVS] cvs: php4 /ext/standard css.c

2002-10-08 Thread Yasuo Ohgaki

Colin Viebrock wrote:
 This is getting a little more complicated than I think is necessary.
 There are two issues here, I think:
 
 a) Fonts.  Some people didn't like Arial, so I reverted to letter the
 browser decide.  Some people didn't like that, and they'd like the font
 specifications back in.

This will simply break output under some browser.
It's more important to show info, but show a little nicely on some
systems while printing garages on some systems.

If anyone prefer any specific font, they should use their own CSS.

 I don't know what the solution to this is.  My instinct is to ask why
 don't we just hardcode the pages to use US-ASCII, or ISO-8859-1?  Would
 this not solve the charset issues?

No.

Why you bother?

Letting browser decide is more feasible and most importantly,
it works.

If you are not certain how to make phpinfo() work under most
environment, I can help.

--
Yasuo Ohgaki



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




Re: [PHP-DEV] ext/sysvmsg

2002-10-08 Thread Sascha Schumann

 Good point - but also raises, whether to look for this struct in the first
 place.
 Why not skip it all, and define it ISO C compliant, in php_ namespace?

That would be a possibility, although you never know how
engineers at some random company interpreted the standard text
(if they had access to it at all) and how they might have
simply copied things from another OS in their own broken way.

- Sascha


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




[PHP-DEV] Re: [PHP-CVS] cvs: php4 /ext/standard css.c

2002-10-08 Thread Colin Viebrock

 a) Fonts.  Some people didn't like Arial, so I reverted to letter the
 browser decide.  Some people didn't like that, and they'd like the font
 specifications back in.
 
 This will simply break output under some browser.
 It's more important to show info, but show a little nicely on some
 systems while printing garages on some systems.

But the old phpinfo() specified fonts, so are you saying it was broken
then too?


 If anyone prefer any specific font, they should use their own CSS.

But I bet 99% of the people will have versions of either Arial or
Verdana or Helvetica that *will* work.  Why not make life easier for the
majority, since the 1% is going to have to specify their own font anyway?


 I don't know what the solution to this is.  My instinct is to ask why
 don't we just hardcode the pages to use US-ASCII, or ISO-8859-1?  Would
 this not solve the charset issues?
 
 No.
 
 Why you bother?
 
 Letting browser decide is more feasible and most importantly,
 it works.

Okay ... so don't output the charset meta tag at all?


 If you are not certain how to make phpinfo() work under most
 environment, I can help.

If you can make it work under most environment *and* look good (i.e. as
much like it used to, sans-serif fonts and all), then great!  CVS is a
wonderful thing. :)

- Colin


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




[PHP-DEV] Re: [PHP-CVS] cvs: php4 /ext/standard css.c

2002-10-08 Thread Yasuo Ohgaki

Colin Viebrock wrote:
a) Fonts.  Some people didn't like Arial, so I reverted to letter the
browser decide.  Some people didn't like that, and they'd like the font
specifications back in.

This will simply break output under some browser.
It's more important to show info, but show a little nicely on some
systems while printing garages on some systems.
 
 
 But the old phpinfo() specified fonts, so are you saying it was broken
 then too?

Yes and No. It works withh my browser, but I just happen to know
some browsers do not like it. Let's be more conservative.

I don't know what the solution to this is.  My instinct is to ask why
don't we just hardcode the pages to use US-ASCII, or ISO-8859-1?  Would
this not solve the charset issues?

No.

Why you bother?

Letting browser decide is more feasible and most importantly,
it works.
 
 
 Okay ... so don't output the charset meta tag at all?

That's better. And you must not try to convert chars to
entities. This is the worst thing... Text cannot be read
even with HTML sources.

--
Yasuo Ohgaki


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




[PHP-DEV] Re: [PHP-CVS] cvs: php4 /ext/standard css.c

2002-10-08 Thread Colin Viebrock

 Yes and No. It works withh my browser, but I just happen to know
 some browsers do not like it. Let's be more conservative.

I'd rather have a nice looking page that works on 99% of the browsers,
than a not-so-nice looking one that works on 100%.


 Okay ... so don't output the charset meta tag at all?
 
 That's better. And you must not try to convert chars to
 entities. This is the worst thing... Text cannot be read
 even with HTML sources.

But the characters need to be converted.  It isn't valid XHTML if we
don't specify a charset.

Testing on Mozilla, if I have a document that contains:

Hello Theacute;o, welcome to my Straße!

This only renders completely properly if the charset is ISO-8859-1.
HTML entities render in UTF-8 and US-ASCII, but the ß does not.  Even
using the character set your emails to me come in (ISO-2022-JP)
renders the HTML entities correctly, but fails on the un-encoded character.

I really think the best solution (not perfect, but best) is to specify
some fonts so the pages look nice, and hard code in the ISO-8859-1 font.

- Colin


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




Re: [PHP-DEV] CODING_STANDARDS addition re: emalloc

2002-10-08 Thread Andi Gutmans

It might be a good idea to mention that almost in all cases memory returned 
to the engine has to be emalloced.
You can also mention that malloc() also should be used if the memory has to 
survive in between requests.

Andi

At 10:14 PM 10/8/2002 -0400, Jon Parise wrote:
Attached is a patch that adds a new item to CODING_STANDARDS that
suggests using emalloc() and friends over the standard C library
version.  It also offers an explanation, courtesy of Rasmus' reply to
my earlier question on the subject.

If no one objects to the addition in principle or in wording, I'll
commit this in a few days.

--
Jon Parise ([EMAIL PROTECTED]) :: The PHP Project (http://www.php.net/)

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


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




Re: [PHP-DEV] Lib creation

2002-10-08 Thread Markus Fischer

[Cc'd to [EMAIL PROTECTED]]

On Tue, Oct 08, 2002 at 12:40:12PM +0200, Metal3d wrote : 
 Hello
 I'm new here, and i'll try to stay ... :oP
 I'm French so excuse me if i do mistakes .
 
 My friend and I have created a lib in php ( a framework) ...
 So i wonder if it is possible to install this lib into PHP to use it without
 have to call include('class.inc') in scipts ...
 If it is possible ... how can i do that ?

I think your answer is the 'auto_prepend_file' directive in
php.ini

 Have i to recode this in C and compil an lib ? is there a documentation for
 it ?

http://www.php.net/manual/en/zend.php

Btw, such questions are best asked at
[EMAIL PROTECTED] .

- Markus

-- 
GnuPG Key: http://guru.josefine.at/~mfischer/C2272BD0.asc
rei_ Derick, while ($xml) $ass-get_new_ideas();
[James] Markus: IE on_user_fart()
-- People doesn't seem to like the new XHTML2 specs :) --

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




Re: [PHP-DEV] Lib creation

2002-10-08 Thread Metal3d

Ok thanks you ! :o)

Markus Fischer [EMAIL PROTECTED] a écrit dans le message :
[EMAIL PROTECTED]
 [Cc'd to [EMAIL PROTECTED]]

 On Tue, Oct 08, 2002 at 12:40:12PM +0200, Metal3d wrote :
  Hello
  I'm new here, and i'll try to stay ... :oP
  I'm French so excuse me if i do mistakes .
 
  My friend and I have created a lib in php ( a framework) ...
  So i wonder if it is possible to install this lib into PHP to use it
without
  have to call include('class.inc') in scipts ...
  If it is possible ... how can i do that ?

 I think your answer is the 'auto_prepend_file' directive in
 php.ini

  Have i to recode this in C and compil an lib ? is there a documentation
for
  it ?

 http://www.php.net/manual/en/zend.php

 Btw, such questions are best asked at
 [EMAIL PROTECTED] .

 - Markus

 --
 GnuPG Key: http://guru.josefine.at/~mfischer/C2272BD0.asc
 rei_ Derick, while ($xml) $ass-get_new_ideas();
 [James] Markus: IE on_user_fart()
 -- People doesn't seem to like the new XHTML2 specs :) --



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




[PHP-DEV] Changes to PHP/MySQL extension

2002-10-08 Thread Steven Roussey

I have had problems with PHP and MySQL and have made some changes. First
off, in http://bugs.php.net/bug.php?id=19529 MySQL is complaining about
things not being cleaned up. This is because any query that returns
results (which one's don't -- any?) must get them.

In case of an unbuffered query, we need to eat the rest of the rows
before exiting (like we do when a new query is run when an old
unbuffered query was not finished). I removed the warning in this case,
but you all can change it as you please.

The case that is hitting me (and EVERYONE out there using persistent
connections with current revs) is that there is a rollback. But there is
nothing to get the results of the rollback. This means, that the next
script to use this persistent connection will generally fail on the
first query, but might do alright on the others. For this reason, I
recommend anyone use PHP 4.2.3 (maybe later versions as well) to turn
off persistent connections for now.

Also, in CVS there is something to reset AUTOCOMMIT. It also did not
clean up and that causes additional issues. I removed it rather than
fixed it. Who says AUTOCOMMIT=1 should be the default for a certain
server? That is user configurable on the server side. Personally, I like
the idea of resetting all the variables that might have been changed
(including that one). There are a lot. No good way to do right now.

Oh, what else? Ah.. the code in CVS for mysql.connection.timeout. That
rocks! However, it sets the default to zero and then checks for -1 as a
sign not to include the option. Oops. So the default timeout value is
set to nothing when the user doesn't do anything. That is a
unpredictable change in behavior.

I have some changes below. My first time even looking at this code, so
look for any mistakes.

static int _restore_connection_defaults(zend_rsrc_list_entry *rsrc
TSRMLS_DC)
{
php_mysql_conn *link;
charquery[128];
charuser[128];
charpasswd[128];
 
/* check if its a persistent link */
if (Z_TYPE_P(rsrc) != le_plink) 
return 0;

link = (php_mysql_conn *) rsrc-ptr;

if (link-active_result_id) do {
int type;
MYSQL_RES *mysql_result;
 
mysql_result = (MYSQL_RES *)
zend_list_find(link-active_result_id, type);
if (mysql_result  type==le_result) {
if (!mysql_eof(mysql_result)) {
while (mysql_fetch_row(mysql_result));
}
zend_list_delete(link-active_result_id);
link-active_result_id = 0;
}
} while(0);

/* rollback possible transactions */
strcpy (query, ROLLBACK);
if (mysql_real_query(link-conn, query, strlen(query)) !=0 ) {
MYSQL_RES *mysql_result=mysql_store_result(link-conn);
mysql_free_result(mysql_result);
}

/* unset the current selected db */
#if MYSQL_VERSION_ID  32329
strcpy (user, (char *)(link-conn)-user);
strcpy (passwd, (char *)(link-conn)-passwd);
mysql_change_user(link-conn, user, passwd, );
#endif

return 0;   
}

And change the two copies of this:
if (connect_timeout != -1)
to 
if (connect_timeout = 0)


My 2 cents for the day.

Sincerely,
Steven Roussey
http://Network54.com/?pp=e 



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




[PHP-DEV] Re: [PHP-DOC] iconv-extension

2002-10-08 Thread Yasuo Ohgaki

Gabor Hojtsy wrote:
 What php-dev guys think about this?
 
 Goba

Except there may be some lib detection problems on some
platforms. It's stable, IMO.
At least, API will not be changed.

--
Yasuo Ohgaki

 
 - Original Message - 
 From: Friedhelm Betz [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Tuesday, October 08, 2002 12:06 PM
 Subject: [PHP-DOC] iconv-extension
 
 
 
Sources state iconv extensions as experimental. Is this (still) correct?
If so, I'll add the appropriate notes in the docs.

 Friedhelm  


-- 
PHP Documentation 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: [PHP-DOC] iconv-extension

2002-10-08 Thread Pierre-Alain Joye

On Tue, 08 Oct 2002 23:43:42 +0900
Yasuo Ohgaki [EMAIL PROTECTED] wrote:

 Gabor Hojtsy wrote:
  What php-dev guys think about this?
  
  Goba
 
 Except there may be some lib detection problems on some
 platforms. It's stable, IMO.

Without specify anything detection failed on RH7.3 (latest up2date) or
using the latest iconv sources.

See bug #19717, for details.

Solved by using --with-iconv=/usr


hth

pa

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




Re: [PHP-DEV] Re: [PHP-DOC] iconv-extension

2002-10-08 Thread Yasuo Ohgaki

Pierre-Alain Joye wrote:
 On Tue, 08 Oct 2002 23:43:42 +0900
 Yasuo Ohgaki [EMAIL PROTECTED] wrote:
 
 
Gabor Hojtsy wrote:

What php-dev guys think about this?

Goba

Except there may be some lib detection problems on some
platforms. It's stable, IMO.
 
 
 Without specify anything detection failed on RH7.3 (latest up2date) or
 using the latest iconv sources.
 
 See bug #19717, for details.
 
 Solved by using --with-iconv=/usr

Like I mentioned someone may have to look into lib detection
issue, but it's just not me :)

--
Yasuo Ohgaki




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




[PHP-DEV] Re: [PHP-DOC] iconv-extension

2002-10-08 Thread Gabor Hojtsy

What php-dev guys think about this?

Goba

- Original Message - 
From: Friedhelm Betz [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, October 08, 2002 12:06 PM
Subject: [PHP-DOC] iconv-extension


 
 Sources state iconv extensions as experimental. Is this (still) correct?
 If so, I'll add the appropriate notes in the docs.
 
  Friedhelm  
 
 
 -- 
 PHP Documentation 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