VS: [PHP-DEV] GIF support

2002-11-25 Thread Carsten Gehling
> Fra: Markus Fischer [mailto:[EMAIL PROTECTED]]
> Sendt: 20. november 2002 14:11
> Emne: Re: [PHP-DEV] GIF support
> 
> A project exists already:
> http://pear.php.net/package-info.php?pacid=76

Is there a Win32 binary available?

- Carsten


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




[PHP-DEV] GIF support

2002-11-20 Thread Carsten Gehling
A question popped into my mind. I know GD doesn't support GIF because of
Unisys' license on the LZW compression format.

Then how can ImageMagick support it?

It would sure be nice with an API to ImageMagick (PHPMagick?) as found in
Perl. Has anyone started on this before, then I would like to know about it.
I could give it a go myself, but would rather not start from scratch.

- Carsten


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




SV: [PHP-DEV] [4.3] Current critical bugs

2002-10-18 Thread Carsten Gehling
Maybe this is what you need?

http://www.naken.cc/mikehup.php

I use this on a CMS site, where the users upload imagefiles with ftp. After
that, they use a php webinterface to start an importscript (written in
Perl). By doing this command in php:

system("/usr/local/bin/mikehup /usr/bin/perl
/www/servers/netlag/cronscripts/import_billede.pl &");

The importscript is started and executes in the background while the
php-script finishes execution.

Hope that helps

- Carsten

> -Oprindelig meddelelse-
> Fra: Joseph Tate [mailto:jtate@;mi-corporation.com]
> Sendt: 15. oktober 2002 21:15
> Til: Zeev Suraski
> Cc: Andrei Zmievski; PHP Developers; Jason Priebe
> Emne: Re: [PHP-DEV] [4.3] Current critical bugs
>
>
> Throw me a bone then.  What is the suggested way to offer php developers
> the opportunity to run code after the connection has been closed?  Even
> if it only works under Apache on Linux?  Also if the 4.1.0 behavior is
> the "correct" behavior, why is the function still documented as the
> 4.0.x behavior?
>
> I'll admit that the company I work for is probably the only one using
> this function, but we depend on it.  We do heavy image processing work,
> using image magick, called from clients using wireless networks, where
> it hurts us to keep connections open for long periods of time.  If we
> can't fork some processing to the background, our users think our app is
> slow, and we lose sales.  It's that simple.  "Correct" behavior or not,
> we need the functionality.
>
> My patch, I hope, will be ready by the end of the week.  Adding a
> parameter to the register_shutdown_function will not be possible, since
> the function was changed a while back to allow users to specify
> arguments to the function being registered.  Instead a second function
> will be created: register_offline_function offering the 4.0.x behavior.
>
> Joseph
>
> Zeev Suraski wrote:
> >> Summary: Under Apache, register_shutdown_function() broke between 4.0.x
> >> to 4.1.x
> >> URL: http://bugs.php.net/bug.php?id=15209
> >
> >
> > I stated my stand on this, I believe that the 4.1.0 behavior is
> the more
> > correct one.
> >
> > I have to go now, but I'll look at the rest of relevant bugs
> later today.
> >
>
>
> --
> PHP Development Mailing List 
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


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




SV: [PHP-DEV] Structures and PHP

2002-09-02 Thread Carsten Gehling

I agree with Markus. PHP isn't C (although it resembles on some points), and
likewise you shouldn't use it, as you would C.

Play PHP by its own rules and use the language contructs made available to
you.

You could argue, that C only has structs because a) it is strongly typed and
therefore need a tool for complex datatypes and/or b) it doesn't implement
hashes in its core.

- Carsten


> -Oprindelig meddelelse-
> Fra: Markus Fischer [mailto:[EMAIL PROTECTED]]
> Sendt: 2. september 2002 15:16
> Til: Terrence Cox
> Cc: [EMAIL PROTECTED]
> Emne: Re: [PHP-DEV] Structures and PHP
>
>
> On Mon, Sep 02, 2002 at 10:06:50PM +0800, Terrence Cox wrote :
> > Knowing that I can't create actual structures in PHP, I
> recently realized I could do something like this.
> >
> >  > function create_Struct($struct_array)
> >{
> >$struct_array=array(
> >  conn => 0,
> >  host => "",
> >  u_name => "",
> >  pass => "",
> >  db => ""
> >  );
> > return $struct_array;
> > }
> >
> > $db_struct = create_Struct($db_struct);
> > $db_pointer = &$db_struct;
> > print_r($db_pointer);
> > ?>
> >
> > What I'm curious about is the possibility of making
> > something like this "built in", for lack of a better term. I've
> heard a number of C guys asking about this on some message boards
> and came up with this as a result.
> >
> > Is there a better way? What do you guys think?
>
> Not really. Some also missuse objects for that purpose. heck,
> I remember asking this question first when I came to PHP
> years ago :) I got stuck to use arrays at first. Later and
> never needed this anymore (stopped coding PHP like C) and
> mainly used real objects etc.
>
> --
> GnuPG Key: http://guru.josefine.at/~mfischer/C2272BD0.asc
> "Finally, if someone actually flying a plane is relying on
> a freakin' webcam to land, we're all in trouble."
> - A /. poster.
>
> --
> PHP Development Mailing List 
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


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




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

2002-08-22 Thread Carsten Gehling

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



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

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

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

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

- Carsten


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




Re: [PHP-DEV] Request for new feature: $HTTP_SESSION_VARS whenregister_globals = on

2001-04-09 Thread Carsten Gehling

From: "Carsten Gehling" <[EMAIL PROTECTED]>
Sent: Monday, April 09, 2001 9:31 AM
Subject: Re: [PHP-DEV] Request for new feature: $HTTP_SESSION_VARS
whenregister_globals = on


> From: "Alexander Feldman" <[EMAIL PROTECTED]>
> Sent: Friday, April 06, 2001 10:46 PM
>
> > Hm, very strange. You are absolutely right - I do not see any problems
as
> > well. Not only with the current cvs but with the older phps also... But
I
> > am sure I have seen some time ago exactly what was described by Carsten
> > Gehling. Maybe it is kind of group hallucination ;)
>
> Try this:



Or this, which is slightly more interesting:


";
$HTTP_SESSION_VARS["c"] = $HTTP_SESSION_VARS["c"] + 1;
var_dump($HTTP_SESSION_VARS);
?>



On the first run, SID is displayed in the browser, but when reloading the
page, SID is empty.

As a side note: I run PHP 4.0.4pl1 as CGI on Win2k IIS5.

- Carsten



-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] PHP 4.0 Bug #10225 Updated: I have

2001-04-09 Thread Carsten Gehling

From: <[EMAIL PROTECTED]>
Sent: Saturday, April 07, 2001 7:58 PM
Subject: [PHP-DEV] PHP 4.0 Bug #10225 Updated: I have


> I had installed Oracle 8i(8.16) Client For win2000.
> And I modify the C:\winnt\php.ini to
>
> extension=php_oci8.dll
> ;extension=php_openssl.dll
> extension=php_oracle.dll
>
> When I restart the IIS, it show the message
> "Unable to load dynamic library 'c:\php\extensions\php_oracle.dll' - "

Have you set the following line in php.ini:

extension_dir = ./extensions

it is default set to

extension_dir = .

- Carsten



-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] Request for new feature: $HTTP_SESSION_VARS whenregister_globals = on

2001-04-09 Thread Carsten Gehling

From: "Alexander Feldman" <[EMAIL PROTECTED]>
Sent: Friday, April 06, 2001 10:46 PM


> Hm, very strange. You are absolutely right - I do not see any problems as
> well. Not only with the current cvs but with the older phps also... But I
> am sure I have seen some time ago exactly what was described by Carsten
> Gehling. Maybe it is kind of group hallucination ;)

Try this:

===


===

And try reloading the page a couple of times. With register_globals = Off,
the session variable "c" will be incrementing by one on each reload. With
register_globals = On, it will always be 1 (thereby showing, that it does
not exist when reloading).

- Carsten



-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] Object Constructors in PHP

2001-04-05 Thread Carsten Gehling

From: "Steven Roussey" <[EMAIL PROTECTED]>
Sent: Friday, April 06, 2001 2:19 AM
Subject: [PHP-DEV] Object Constructors in PHP


> Don't ask why it is this way, but say we have these files:



Bad bad BAD programmer! Go to your corner. :-)

> It runs fine printing 'hi' (though not with APC, but fine with Zend
Cache).
>
> BUT, What _should_ happen?

You mean from a PHP perspective or from an OOP perspective?

Your example runs as expected. The contructur Outline_ForumStyle() calls the
inherited method ForumStyle(). Nothing wrong with that.

I think what would be more interesting is, what happens if you instantiate
ForumStyle?

$f = new ForumStyle();

>From an OOP POV, there is no contructor, so nothing should happen. PHP OTOH
recognises the inherited method ForumStyle() as having the same name as the
class, thereby making it a contructor.

Not good IMHO, but i think it stems from the fact that PHP does not have a
keyword for explicitly defining contructors, like you find in Java or C++.

One of the areas in PHP that still need some work is IMHO the OOP area. Some
things are a bit too loosly defined - even for a script language.

- Carsten



-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Request for new feature: $HTTP_SESSION_VARS when register_globals = on

2001-04-05 Thread Carsten Gehling

One of the IMHO stranger behaviors in PHP is what happens to the
$HTTP_SESSION_VARS array when changing register_globals from off to on.

If register_globals is set to on, you cannot access $HTTP_SESSION_VARS any
longer. Instead you can get the values through implicit created variables or
through the $GLOBALS array.

Now compare this to $HTTP_GET_VARS and $HTTP_POST_VARS. Both of these arrays
are available regardless of what register_globals is set to.

Shouldn't it be the same for $HTTP_SESSION_VARS ?

- Carsten



-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] PHP 4.0 Bug #10165 Updated: install.txt doesn't mention copying DLLs to WINNT

2001-04-04 Thread Carsten Gehling

From: <[EMAIL PROTECTED]>
Sent: Wednesday, April 04, 2001 7:49 PM
Subject: [PHP-DEV] PHP 4.0 Bug #10165 Updated: install.txt doesn't mention
copying DLLs to WINNT


> ID: 10165
> Updated by: phildriscoll
> Reported By: [EMAIL PROTECTED]
> Old-Status: Open
> Status: Feedback
> Bug Type: Documentation problem
> Assigned To:
> Comments:
>
> It would be good to get to the bottom of this. If anyone out there
understands what Windows does in these circumstances, can they shed some
light on proceedings.



You don't need to copy ANY of the php dlls to \winnt\system32.

"php4ts.dll" runs fine from the php directory, as any dlls your application
tries to load is first searched for in the application's directory.

The extension-dlls can also stay where they are (in the "extensions"
directory), BUT you need to change a line in the "php.ini":

extension_dir = ./extensions

Maybe this should be a default value instead of

extension_dir = .

Just my suggestion anyway, especially sine the install.txt doesn't mention
this.

- Carsten




-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] RE: ; arg seperator

2001-04-04 Thread Carsten Gehling

From: "Rasmus Lerdorf" <[EMAIL PROTECTED]>
Sent: Wednesday, April 04, 2001 7:22 PM


> > There was a discussion about things to break in 4.1. magic_quotes_gpc
would
> > definitely be my favourite. I'd like to see it set to off for good and
> > removed from php.ini.
>
> I'd be completely against removing the concept of magic_quotes altogether.
> We can discuss changing the default, but for someone writing simple sql
> pages, it is extremely handy to have PHP deal with escaping stuff for you
> so you don't have a bunch of addslashes() calls everywhere.

Agreed that it's handy and easy, but it's a two-edged sword. If you write
scripts that should be distributed on many different servers, it takes a lot
of code to account for both settings.

I'm one of those control freaks ;) that like to be in total charge about
what data goes in and out of my application. magic_quotes most certainly
messes with that. There are so many other converting methods in PHP that you
need to use, magic_quotes or not, (eg. urlencode/decode), so why must
addslashes be a default?

- Carsten




-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]