[PHP-DEV] CVS Account Request: sams_virusphp

2002-06-25 Thread SUDHIR SUPATKAR

php4/ext/mysql

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




[PHP-DEV] domxml win32 build broken (HEAD)

2002-06-25 Thread Edin Kadribasic

Configuration: domxml - Win32
Release_TS
Compiling...
php_domxml.c
c:\php4build\snap\ext\domxml\php_domxml.c(201) : error C2099: initializer is
not a constant
c:\php4build\snap\ext\domxml\php_domxml.c(203) : error C2099: initializer is
not a constant
c:\php4build\snap\ext\domxml\php_domxml.c(282) : error C2099: initializer is
not a constant
c:\php4build\snap\ext\domxml\php_domxml.c(323) : error C2099: initializer is
not a constant
c:\php4build\snap\ext\domxml\php_domxml.c(1448) : warning C4013:
'xmlCreateFileParserCtxt' undefined; assuming extern returning int
c:\php4build\snap\ext\domxml\php_domxml.c(1450) : warning C4013:
'xmlCreateMemoryParserCtxt' undefined; assuming extern returning int
Error executing cl.exe.

php_domxml.dll - 4 error(s), 2 warning(s)



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




Re: [PHP-DEV] singleton feature

2002-06-25 Thread BB

I would like to know too,

Purushotham Komaravolu [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Singleton means only one instance.. i.e. instance of a class per
 webserver... all application scripts should talk only to that same
instance
 irrespective of the request.
 p

 - Original Message -
 From: Alexander Skwar [EMAIL PROTECTED]
 To: Purushotham Komaravolu [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Sent: Monday, June 24, 2002 2:53 PM
 Subject: Re: [PHP-DEV] singleton feature


 So sprach Purushotham Komaravolu am 2002-06-24 um 11:39:36 -0700 :
 
  Hi ,
I have a small suggestion. I guess it is a good feature to
  have a provision to have a Singleton class per webserver instance. This
is
  especially useful for maintain user defined connection pools, loggers
etc.

 Uhm, what's a Singleton class?

 Alexander Skwar
 --
 How to quote: http://learn.to/quote (german) http://quote.6x.to (english)
 Homepage: http://www.iso-top.de  |Jabber: [EMAIL PROTECTED]
iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 1 day 11 hours 5 minutes

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




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




Re: [PHP-DEV] Re: Small CGI Serve

2002-06-25 Thread BB

Does no-one know how I can get the POST vars in there?
If I get this done, then my server will be complete and ready to be
re-written to be half decent :oP

Bb [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Get vars are working now!

 Just gotta do post and i'm virtually done!

 Anyone got a guide?

 James Cox [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  
   I have found if you set the environment var REDIRECT_STATUS to
FALSE
   then it works
  
   Someone explain?
   
Having finally found out how to pass the Environment vars onto PHP,
I
 am
stumpted to find that PHP wasn't reading them and putting them in
 their
place (GET vars).
   
I tried changing the exe from the php-cli to just php.  This
   now brings up
   a
security error and I cannot find a solution
   
Can anyone help?
 
  the REDIRECT_STATUS env var is for cgi security, and is a workaround
given
  some webservers don't set it properly. That php wasn't showing env vars
  sounds to me like a register globals problem, and you having it set to
 off.
 
   -- james
 





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




Re: [PHP-DEV] domxml win32 build broken (HEAD)

2002-06-25 Thread Christian Stocker

On Tue, 25 Jun 2002, Edin Kadribasic wrote:

 Configuration: domxml - Win32
 Release_TS
 Compiling...
 php_domxml.c
 c:\php4build\snap\ext\domxml\php_domxml.c(201) : error C2099: initializer is
 not a constant
 c:\php4build\snap\ext\domxml\php_domxml.c(203) : error C2099: initializer is
 not a constant
 c:\php4build\snap\ext\domxml\php_domxml.c(282) : error C2099: initializer is
 not a constant
 c:\php4build\snap\ext\domxml\php_domxml.c(323) : error C2099: initializer is
 not a constant

these are the lines with eg

PHP_FE(xmldoc,  third_arg_force_ref)

therefore it chokes on third_arg_force_ref. What did I wrong there? Isn't
this the standard way to do it (I assumed that from other sources)

 c:\php4build\snap\ext\domxml\php_domxml.c(1448) : warning C4013:
 'xmlCreateFileParserCtxt' undefined; assuming extern returning int
 c:\php4build\snap\ext\domxml\php_domxml.c(1450) : warning C4013:
 'xmlCreateMemoryParserCtxt' undefined; assuming extern returning int

undefined? mmmh, maybe we have to include libxml/parserInternals.h
explicitely. Just added it. Hope it helps

chregu



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




[PHP-DEV] xmlrpc gd bundled win32 build broken

2002-06-25 Thread Edin Kadribasic

The details:

http://snaps.php.net/win32/compile.log

It would be nice if people would check this log file from time to time to
make sure their changes didn't break the build.

Edin


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




Re: [PHP-DEV] xmlrpc gd bundled win32 build broken

2002-06-25 Thread Marcus Börger

GD should work after my last patch (if i understand autoconf etc correct)

At 11:21 25.06.2002, Edin Kadribasic wrote:
The details:

http://snaps.php.net/win32/compile.log

It would be nice if people would check this log file from time to time to
make sure their changes didn't break the build.

Edin


--
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] ZendEngine2 and $argc,$argv

2002-06-25 Thread Marcus Börger

Works now, THX

marcus

At 06:22 25.06.2002, Andi Gutmans wrote:
Can you try the latest CVS version? It should be fixed there.
Let me know...
Thanks,
Andi

At 11:04 PM 6/24/2002 +0200, Marcus Boerger wrote:
Since i use ZendEngine2 i cannot use global $argc,$argv.

Example:

function somefunction() {
 global $argc, $argv;
}

worked before ZE2, PHP-3.0-dev
now i get: Fatal error - Can't assign by reference non-referencable value!

function somefunction() {
 $argc = $GLOBALS['argc'];
 $argv = $GLOBALS['argv'];
}

works just fine.

I assume global creates a reference and checks if the variable is writeable.
But a readonly variable or constant *should* also be referenceable.

regards
marcus


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




Re: [PHP-DEV] Seeking Comments - Regarding header()

2002-06-25 Thread Hartmut Holzgraefe

Mike Hall wrote:
Chris Shiflett wrote:


I have a few sites where I deliberately violate the HTTP spec in this
way to get around a bug in IE (I know, shame on me). I've been using
relative URLs in a Location header for years with no crashes that I
know of.

There must be something unique in your configuration. Have you mentioned
this to the Apache guys?


I've seen this before too, but only on Windows.  I've never noticed the
problem on Linux, Solaris, or BSD.
 
 
 I had it on FreeBSD. It was particularly bad under SSL, but happened without
 too.


may i quote this as warnings in the manual?

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


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




RE: [PHP-DEV] Switching zlib.output_compression, bug #16109

2002-06-25 Thread Jaime Bozza

sigh Unfortunately, in some cases, this won't work for me.  The
image scripts aren't always in their own separate directory.

I *have* a workaround, but I just thought it would be nicer to allow
using:
   ini_set(zlib.output_compression, Off);

at the start of a script.  Apparantly, everyone seems against that. :)


Jaime Bozza

-Original Message-
From: Yasuo Ohgaki [mailto:[EMAIL PROTECTED]] 
Sent: Monday, June 24, 2002 7:47 PM
To: [EMAIL PROTECTED]; Jaime Bozza
Cc: 'Mike Hall'
Subject: Re: [PHP-DEV] Switching zlib.output_compression, bug #16109


Jaime Bozza wrote:
 And how do you set zlib.outputcompression on at runtime?
 

.htaccess if you are using Apache.

If you use web server other than Aapche, use ob_gzhandler()
I don't like ob_gzhandler() since PHP will misbehave easily
by user's mistakes. However, it should be used in this case.

--
Yasuo Ohgaki


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





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




Re: [PHP-DEV] Re: Switching zlib.output_compression, bug #16109

2002-06-25 Thread Stefan Roehrich

On 2002-06-25 09:36:20, Yasuo Ohgaki wrote:
 Yasuo Ohgaki wrote:
 I would suggest turn off compression for image.
 I mean turn off compression manually.
 As you already know, turning on and off by header(mime-type)
 does not work always, thus it's confusing.

Yes, but we need some kind of detection in order to disable it for PHP
internally generated images like the PHP/Zend logos used by
phpinfo(). Or we have to switch compression off there.

  Stefan

-- 
Stefan Röhrich   [EMAIL PROTECTED], [EMAIL PROTECTED]
 http://www.roehri.ch/~sr/

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




[PHP-DEV] code profiler

2002-06-25 Thread Tit \Black\ Petric

ok this may be a bit offtopic, but here goes

i am searching for a PHP code profiler, something to measure key components of the PHP 
scripts, tracking how many function calls are preformed in the code, the cost of each 
of the functions in terms of cpu cycles and memory usage, minimal, maximum, and 
average, etc, basically to help me optimise my code and maybe make some nice 
statistics along with that..

as far my search has been unsucessfull, i did come to find an old message from 
[php-dev] list, from a Brian Moore and i tried to contact him with no luck, and not 
beeing able to chase up anything on the subject..

http://www.zend.com/lists/php-dev/200108/msg01181.html

and i did find some old (read 3.0.16 version php) profilers on sourceforge/freshmeat

are there any plans to have that in latest versions of php in a module or similar? 
something run-time would be also great, so i can get the profile with php, after the 
code finished executing..

this was posted on php-dev since it should involve somekind of more lowlevel php 
coding, so i guess this is a feature request... and it probablly gets the same 
audience as bugs.php.net

so, any info where i can start if i want to profile my php code? (or how i can start 
developing and extension, if php lets you go that deep into the scripting engine with 
its extensions)

regards,
black



Re: [PHP-DEV] code profiler

2002-06-25 Thread George Schlossnagle

APD (http://apd.communityconnect.com/) is a php code profiler.

On Tuesday, June 25, 2002, at 10:26 AM, Tit Black Petric wrote:

 ok this may be a bit offtopic, but here goes

 i am searching for a PHP code profiler, something to measure key 
 components of the PHP scripts, tracking how many function calls are 
 preformed in the code, the cost of each of the functions in terms of 
 cpu cycles and memory usage, minimal, maximum, and average, etc, 
 basically to help me optimise my code and maybe make some nice 
 statistics along with that..

 as far my search has been unsucessfull, i did come to find an old 
 message from [php-dev] list, from a Brian Moore and i tried to 
 contact him with no luck, and not beeing able to chase up anything on 
 the subject..

 http://www.zend.com/lists/php-dev/200108/msg01181.html

 and i did find some old (read 3.0.16 version php) profilers on 
 sourceforge/freshmeat

 are there any plans to have that in latest versions of php in a module 
 or similar? something run-time would be also great, so i can get the 
 profile with php, after the code finished executing..

 this was posted on php-dev since it should involve somekind of more 
 lowlevel php coding, so i guess this is a feature request... and it 
 probablly gets the same audience as bugs.php.net

 so, any info where i can start if i want to profile my php code? (or 
 how i can start developing and extension, if php lets you go that deep 
 into the scripting engine with its extensions)

 regards,
 black


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




RE: [PHP-DEV] Re: Switching zlib.output_compression, bug #16109

2002-06-25 Thread Jaime Bozza

Personally, I don't really care to have compression turned off
automatically for images.  I'd like to be able to make that choice
myself.  For the browsers that work correctly, an uncompressed generated
image will still be able to take advantage of zlib compression.

I *DO* like the ability to be able to ini_set (or turn off some other
way) the zlib.output_compression switch.  That way, if I want to turn
off compression for some reason, I can just use the switch.

FYI, Netscape doesn't just have problems with images.  Netscape also
doesn't properly render compressed ILAYERs.  On my site, I have to
disable HTML (For Netscape) that is rendered in an ILAYER.

While the bugs in Netscape aren't necessarily PHP's problem, it really
would be nice to be able to turn off compression in cases where we have
to, *because* of the browser bugs.  The choice of using .htaccess
complicates something that should be easily tunable from within the
script.


Jaime Bozza


-Original Message-
From: Stefan Roehrich [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, June 25, 2002 8:19 AM
To: Yasuo Ohgaki
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP-DEV] Re: Switching zlib.output_compression, bug #16109


On 2002-06-25 09:36:20, Yasuo Ohgaki wrote:
 Yasuo Ohgaki wrote:
 I would suggest turn off compression for image.
 I mean turn off compression manually.
 As you already know, turning on and off by header(mime-type)
 does not work always, thus it's confusing.

Yes, but we need some kind of detection in order to disable it for PHP
internally generated images like the PHP/Zend logos used by
phpinfo(). Or we have to switch compression off there.

  Stefan

-- 
Stefan Röhrich   [EMAIL PROTECTED], [EMAIL PROTECTED]
 http://www.roehri.ch/~sr/

-- 
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] Has this fp fix been considered?

2002-06-25 Thread George Whiffen



Has the following fix for php's fp decimal arithmetic problems been considered?

Fix:
---

Numeric rounding to DBL_DIG decimal digits of  the results of
php's arithmetic operators via a redecimalize function:

  double redecimalize(double dval)
  {
double f;
if (dval == 0)
   {
  return dval;
   }
   f = pow(10.0, DBL_DIG - (1 + floor(log10(fabs(dval);
   return (double) (rint(dval*f))/f;
  }


Benefits:
--

1. Eliminates the decimal/binary fp issues:
i.e. the problems with comparison operators
(0.8 == 0.7 + 0.1 etc.); the problems with floor(), ceil(),
intval() and round(); the spurious result for 0.8 - (0.7 + 0.1);
and the cumulative loss of precision on long sequences of
arithmetic operations attributable to conversion errors.

2. Improved consistency in php's type handling, e.g. $a == $b
is sensible regardless of type.

3. Simplifies documentation.

4. Protects the newbie.

5. Provides a clear comparative advantage for php over Perl,
Javascript etc. in decimal/money arithmetic.

Costs:


1. Performance.
Although redecimalize() is about 15 times faster than the equivalent
atof(sprintf..., there is still a performance cost for each php arithmetic
operation of 10-30% depending on operands.

This is less than the cost of an object/array variable access i.e.
Fixed: $a = $b +$c
is quicker than:
Unfixed: $a = $b + $c-d

redecimalize() could be optimized to improve performance
further.

2. Code Changes.
One source, zend_operators.c, needs modification with the addition
of  about 20 lines of code i.e.
the redecimalize function shown above plus the following line
repeated twice for each arithmetic operator, (add_function, sub_function,
mul_function and div_function):-
result-dval = redecimalize(result-dval);

3. Build Requirements.
The extra build requirements for zend_operators.c are to
find float.h for DBL_DIG, and  to pick up rint() from a maths library.
(rint() is used to ensure that the floating point round mode is respected
for compatibility with convert_to_string.).  If either of these
are problematic I guess we can get round them, though it would
be a pain to handle all the variants of round mode ourselves.



Where next?

You'll notice that the version of redecimalize shown above is
far from optimal.  Most of the performance cost is in
calculating 'f', which could probably be made much faster,
e.g. by estimating log10 from the double's exponent.

I've only mentioned the arithmetic operators so far as they
are by far the most important, but this could easily be
extended to the appropriate mathematical functions e.g
pow(), log(), cosh().

The fix works for me with 4.2.1 on Linux, but I haven't
tried it on any other platforms.

However, I'm not keen to do much more unless I know
that this approach hasn't been ruled out in the past for
some reason of which I am not aware.

Comments please!


George



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




Re: [PHP-DEV] code profiler

2002-06-25 Thread Ivan Ristic


 i am searching for a PHP code profiler

  DBG (http://dd.cron.ru/dbg/sshot.php) seems to be doing what
  you need. The link points to the screenshots page,
  and some screenshots show the profiler in action.

--
Best regards,
Ivan Ristic, Chief Technology Officer
DataGate Network Solutions Ltd. - http://www.datagate.net
Tel: +44 8700 119090, Fax: +44 8700 119080

-- 
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/gd config.m4 gd.c

2002-06-25 Thread Rasmus Lerdorf

It might be an idea to alias it to imagefilledellipse instead of just
deleting it.  Then it wouldn't break stuff.  If the current fill colour is
set, then it will be slightly wrong, but I think that is slightly better
than a broken image.

-Rasmus

On Tue, 25 Jun 2002, Marcus Börger wrote:

 helly Tue Jun 25 05:00:11 2002 EDT

   Modified files:
 /php4/ext/gd  config.m4 gd.c
   Log:
   imageellipse is removed in 2.01
   #maybe someone reintroduces this one in bundled lib?

 Index: php4/ext/gd/config.m4
 diff -u php4/ext/gd/config.m4:1.98 php4/ext/gd/config.m4:1.99
 --- php4/ext/gd/config.m4:1.98Mon Jun 24 15:31:44 2002
 +++ php4/ext/gd/config.m4 Tue Jun 25 05:00:08 2002
  -1,5 +1,5 
  dnl
 -dnl $Id: config.m4,v 1.98 2002/06/24 19:31:44 derick Exp $
 +dnl $Id: config.m4,v 1.99 2002/06/25 09:00:08 helly Exp $
  dnl

  dnl
  -214,6 +214,7 
PHP_CHECK_LIBRARY(gd, gdImageCreateFromGd2,   [AC_DEFINE(HAVE_GD_GD2, 
 1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
PHP_CHECK_LIBRARY(gd, gdImageCreateTrueColor, [AC_DEFINE(HAVE_LIBGD20,
 1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
PHP_CHECK_LIBRARY(gd, gdImageSetTile, [AC_DEFINE(HAVE_GD_IMAGESETTILE,
 1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
 +  PHP_CHECK_LIBRARY(gd, gdImageEllipse, [AC_DEFINE(HAVE_GD_IMAGEELLIPSE,
 1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
PHP_CHECK_LIBRARY(gd, gdImageSetBrush,[AC_DEFINE(HAVE_GD_IMAGESETBRUSH,   
 1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
PHP_CHECK_LIBRARY(gd, gdImageStringTTF,   [AC_DEFINE(HAVE_GD_STRINGTTF,   
 1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
PHP_CHECK_LIBRARY(gd, gdImageStringFT,[AC_DEFINE(HAVE_GD_STRINGFT,
 1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
 Index: php4/ext/gd/gd.c
 diff -u php4/ext/gd/gd.c:1.190 php4/ext/gd/gd.c:1.191
 --- php4/ext/gd/gd.c:1.190Mon Jun 24 15:31:44 2002
 +++ php4/ext/gd/gd.c  Tue Jun 25 05:00:09 2002
  -18,7 +18,7 
 +--+
   */

 -/* $Id: gd.c,v 1.190 2002/06/24 19:31:44 derick Exp $ */
 +/* $Id: gd.c,v 1.191 2002/06/25 09:00:09 helly Exp $ */

  /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center,
 Cold Spring Harbor Labs. */
  -133,9 +133,8 
   PHP_FE(imagecreatetruecolor,NULL)
   PHP_FE(imagetruecolortopalette, NULL)
   PHP_FE(imagesetthickness,   NULL)
 - PHP_FE(imageellipse,NULL)
 - PHP_FE(imagefilledellipse,  NULL)
   PHP_FE(imagefilledarc,  NULL)
 + PHP_FE(imagefilledellipse,  NULL)
   PHP_FE(imagealphablending,  NULL)
   PHP_FE(imagecolorresolvealpha,  NULL)
   PHP_FE(imagecolorclosestalpha,  NULL)
  -143,6 +142,10 
   PHP_FE(imagecopyresampled,  NULL)
  #endif

 +#if HAVE_GD_IMAGEELLIPSE
 + PHP_FE(imageellipse,NULL)
 +#endif
 +
  #if HAVE_GD_IMAGESETTILE
   PHP_FE(imagesettile,NULL)
  #endif
  -645,7 +648,7 
  }
  /* }}} */

 -#if 0  /* this function is missing from GD 2.0.1 */
 +#ifdef HAVE_GD_IMAGEELLIPSE  /* this function is missing from GD 2.0.1 */
  /* {{{ proto void imageellipse(resource im, int cx, int cy, int w, int h, int color)
 Draw an ellipse */
  PHP_FUNCTION(imageellipse)



 --
 PHP CVS 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] Re: [PHP-CVS] cvs: php4 /ext/gd config.m4 gd.c

2002-06-25 Thread Marcus Börger

Defenitly not because if you want to draw a non filled ellipse than
a filled ellipse is very different.

As far as i understand the documentation
ImageEllipse(x,y,w,h,c) = ImageArc(x,y,w,h,0,360,c)

If so we can easiliy map ImageEllipse to ImageArc if ImageEllipse is not 
present.

marcus

At 18:35 25.06.2002, Rasmus Lerdorf wrote:
It might be an idea to alias it to imagefilledellipse instead of just
deleting it.  Then it wouldn't break stuff.  If the current fill colour is
set, then it will be slightly wrong, but I think that is slightly better
than a broken image.

-Rasmus

On Tue, 25 Jun 2002, Marcus Börger wrote:

  helly Tue Jun 25 05:00:11 2002 EDT
 
Modified files:
  /php4/ext/gd  config.m4 gd.c
Log:
imageellipse is removed in 2.01
#maybe someone reintroduces this one in bundled lib?
 
  Index: php4/ext/gd/config.m4
  diff -u php4/ext/gd/config.m4:1.98 php4/ext/gd/config.m4:1.99
  --- php4/ext/gd/config.m4:1.98Mon Jun 24 15:31:44 2002
  +++ php4/ext/gd/config.m4 Tue Jun 25 05:00:08 2002
   -1,5 +1,5 
   dnl
  -dnl $Id: config.m4,v 1.98 2002/06/24 19:31:44 derick Exp $
  +dnl $Id: config.m4,v 1.99 2002/06/25 09:00:08 helly Exp $
   dnl
 
   dnl
   -214,6 +214,7 
 PHP_CHECK_LIBRARY(gd, 
 gdImageCreateFromGd2,   [AC_DEFINE(HAVE_GD_GD2,  1, [ ])], 
 [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
 PHP_CHECK_LIBRARY(gd, gdImageCreateTrueColor, 
 [AC_DEFINE(HAVE_LIBGD20, 1, [ ])], [], [ -L$GD_LIB 
 $GD_SHARED_LIBADD ])
 PHP_CHECK_LIBRARY(gd, 
 gdImageSetTile, [AC_DEFINE(HAVE_GD_IMAGESETTILE, 1, [ ])], 
 [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
  +  PHP_CHECK_LIBRARY(gd, 
 gdImageEllipse, [AC_DEFINE(HAVE_GD_IMAGEELLIPSE, 1, [ ])], 
 [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
 PHP_CHECK_LIBRARY(gd, 
 gdImageSetBrush,[AC_DEFINE(HAVE_GD_IMAGESETBRUSH,1, [ ])], 
 [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
 PHP_CHECK_LIBRARY(gd, 
 gdImageStringTTF,   [AC_DEFINE(HAVE_GD_STRINGTTF,1, [ ])], 
 [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
 PHP_CHECK_LIBRARY(gd, 
 gdImageStringFT,[AC_DEFINE(HAVE_GD_STRINGFT, 1, [ ])], 
 [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
  Index: php4/ext/gd/gd.c
  diff -u php4/ext/gd/gd.c:1.190 php4/ext/gd/gd.c:1.191
  --- php4/ext/gd/gd.c:1.190Mon Jun 24 15:31:44 2002
  +++ php4/ext/gd/gd.c  Tue Jun 25 05:00:09 2002
   -18,7 +18,7 
  
 +--+
*/
 
  -/* $Id: gd.c,v 1.190 2002/06/24 19:31:44 derick Exp $ */
  +/* $Id: gd.c,v 1.191 2002/06/25 09:00:09 helly Exp $ */
 
   /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center,
  Cold Spring Harbor Labs. */
   -133,9 +133,8 
PHP_FE(imagecreatetruecolor,NULL)
PHP_FE(imagetruecolortopalette, NULL)
PHP_FE(imagesetthickness, 
NULL)
  
 - PHP_FE(imageellipse, 
  NULL)
  
 - PHP_FE(imagefilledellipse, 
  NULL)
PHP_FE(imagefilledarc, 
NULL)
  
 + PHP_FE(imagefilledellipse, 
  NULL)
PHP_FE(imagealphablending, 
NULL)
PHP_FE(imagecolorresolvealpha,  NULL)
PHP_FE(imagecolorclosestalpha,  NULL)
   -143,6 +142,10 
PHP_FE(imagecopyresampled, 
NULL)
   #endif
 
  +#if HAVE_GD_IMAGEELLIPSE
  
 + PHP_FE(imageellipse, 
  NULL)
  +#endif
  +
   #if HAVE_GD_IMAGESETTILE
PHP_FE(imagesettile, 
NULL)
   #endif
   -645,7 +648,7 
   }
   /* }}} */
 
  -#if 0  /* this function is missing from GD 2.0.1 */
  +#ifdef HAVE_GD_IMAGEELLIPSE  /* this function is missing from GD 2.0.1 */
   /* {{{ proto void imageellipse(resource im, int cx, int cy, int w, int 
 h, int color)
  Draw an ellipse */
   PHP_FUNCTION(imageellipse)
 
 
 
  --
  PHP CVS 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-CVS] cvs: php4 /ext/gd config.m4 gd.c

2002-06-25 Thread Rasmus Lerdorf

Ok, whatever the mapping, my point is that I'd rather see a slightly wrong
image than a broken image.  Simply removing the function is a bad idea.

-Rasmus

On Tue, 25 Jun 2002, Marcus [iso-8859-1] Börger wrote:

 Defenitly not because if you want to draw a non filled ellipse than
 a filled ellipse is very different.

 As far as i understand the documentation
 ImageEllipse(x,y,w,h,c) = ImageArc(x,y,w,h,0,360,c)

 If so we can easiliy map ImageEllipse to ImageArc if ImageEllipse is not
 present.

 marcus

 At 18:35 25.06.2002, Rasmus Lerdorf wrote:
 It might be an idea to alias it to imagefilledellipse instead of just
 deleting it.  Then it wouldn't break stuff.  If the current fill colour is
 set, then it will be slightly wrong, but I think that is slightly better
 than a broken image.
 
 -Rasmus
 
 On Tue, 25 Jun 2002, Marcus Börger wrote:
 
   helly Tue Jun 25 05:00:11 2002 EDT
  
 Modified files:
   /php4/ext/gd  config.m4 gd.c
 Log:
 imageellipse is removed in 2.01
 #maybe someone reintroduces this one in bundled lib?
  
   Index: php4/ext/gd/config.m4
   diff -u php4/ext/gd/config.m4:1.98 php4/ext/gd/config.m4:1.99
   --- php4/ext/gd/config.m4:1.98Mon Jun 24 15:31:44 2002
   +++ php4/ext/gd/config.m4 Tue Jun 25 05:00:08 2002
-1,5 +1,5 
dnl
   -dnl $Id: config.m4,v 1.98 2002/06/24 19:31:44 derick Exp $
   +dnl $Id: config.m4,v 1.99 2002/06/25 09:00:08 helly Exp $
dnl
  
dnl
-214,6 +214,7 
  PHP_CHECK_LIBRARY(gd,
  gdImageCreateFromGd2,   [AC_DEFINE(HAVE_GD_GD2,  1, [ ])],
  [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
  PHP_CHECK_LIBRARY(gd, gdImageCreateTrueColor,
  [AC_DEFINE(HAVE_LIBGD20, 1, [ ])], [], [ -L$GD_LIB
  $GD_SHARED_LIBADD ])
  PHP_CHECK_LIBRARY(gd,
  gdImageSetTile, [AC_DEFINE(HAVE_GD_IMAGESETTILE, 1, [ ])],
  [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
   +  PHP_CHECK_LIBRARY(gd,
  gdImageEllipse, [AC_DEFINE(HAVE_GD_IMAGEELLIPSE, 1, [ ])],
  [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
  PHP_CHECK_LIBRARY(gd,
  gdImageSetBrush,[AC_DEFINE(HAVE_GD_IMAGESETBRUSH,1, [ ])],
  [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
  PHP_CHECK_LIBRARY(gd,
  gdImageStringTTF,   [AC_DEFINE(HAVE_GD_STRINGTTF,1, [ ])],
  [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
  PHP_CHECK_LIBRARY(gd,
  gdImageStringFT,[AC_DEFINE(HAVE_GD_STRINGFT, 1, [ ])],
  [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
   Index: php4/ext/gd/gd.c
   diff -u php4/ext/gd/gd.c:1.190 php4/ext/gd/gd.c:1.191
   --- php4/ext/gd/gd.c:1.190Mon Jun 24 15:31:44 2002
   +++ php4/ext/gd/gd.c  Tue Jun 25 05:00:09 2002
-18,7 +18,7 
  
  +--+
 */
  
   -/* $Id: gd.c,v 1.190 2002/06/24 19:31:44 derick Exp $ */
   +/* $Id: gd.c,v 1.191 2002/06/25 09:00:09 helly Exp $ */
  
/* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center,
   Cold Spring Harbor Labs. */
-133,9 +133,8 
 PHP_FE(imagecreatetruecolor,NULL)
 PHP_FE(imagetruecolortopalette, NULL)
 PHP_FE(imagesetthickness,
 NULL)
  
  - PHP_FE(imageellipse,
   NULL)
  
  - PHP_FE(imagefilledellipse,
   NULL)
 PHP_FE(imagefilledarc,
 NULL)
  
  + PHP_FE(imagefilledellipse,
   NULL)
 PHP_FE(imagealphablending,
 NULL)
 PHP_FE(imagecolorresolvealpha,  NULL)
 PHP_FE(imagecolorclosestalpha,  NULL)
-143,6 +142,10 
 PHP_FE(imagecopyresampled,
 NULL)
#endif
  
   +#if HAVE_GD_IMAGEELLIPSE
  
  + PHP_FE(imageellipse,
   NULL)
   +#endif
   +
#if HAVE_GD_IMAGESETTILE
 PHP_FE(imagesettile,
 NULL)
#endif
-645,7 +648,7 
}
/* }}} */
  
   -#if 0  /* this function is missing from GD 2.0.1 */
   +#ifdef HAVE_GD_IMAGEELLIPSE  /* this function is missing from GD 2.0.1 */
/* {{{ proto void imageellipse(resource im, int cx, int cy, int w, int
  h, int color)
   Draw an ellipse */
PHP_FUNCTION(imageellipse)
  
  
  
   --
   PHP CVS 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 Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php