Re: [PHP-DEV] when PHP code causes crash due to bad input, is it a bug?

2003-01-10 Thread Brian Moon
| I have worked as Sr. SQA engineer for many years and have always worked 
| under the understanding that crashes are unacceptible - no matter what 
| caused them: code should be able to handle bad data and not crash.

Agreed, IMO, if it in fact crashes, it is not bogus.

Brian Moon
dealnews.com


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




[PHP-DEV] sapi/embed ?

2003-01-17 Thread Brian Moon
I just noticed sapi/embed.  Where can I find out more about what this is?  I
am hoping it is a sapi that will create a generic library that can be used
from any C application.  Is this true?

Brian Moon
dealnews.com




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




[PHP-DEV] Distributing Extensions

2003-01-22 Thread Brian Moon
I have made and tested (originally againts 4.2.1 now against 4.3.0) a C
extension to PHP that allows you to name variables in the ini file that are
to be treated as super globals.  This is very handy for dealnews as we have
several variables (database object, directory paths, etc.) that are
constantly getting "globaled" in functions.  Yes, we could use constants,
but that won't work for the database class and they are harder to work with
in strings.

To the point, I want to know how/where this should be distributed.  I want
to do it "right".  I can write up some docs that tell you where to stick the
code, run buildconf, etc., but I wondered if there was a preferred way of
handling C extensions.  Is PECL ready for this stuff?

Thanks,

Brian Moon
dealnews.com



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




Re: [PHP-DEV] Register Shutdown Function for Apache

2003-01-23 Thread Brian Moon
+1 for me too.  It seems a lot of people (like us at dealnews) built large
time consuming applications around the concept of register_shutdown_function
working like this.  I would love to have this back.

Brian Moon
dealnews.com


- Original Message -
From: "Joseph Tate" <[EMAIL PROTECTED]>
To: "Php-Dev List" <[EMAIL PROTECTED]>
Cc: "PHP Group" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Thursday, January 23, 2003 10:38 AM
Subject: [PHP-DEV] Register Shutdown Function for Apache


| I can have the patches ready to go in a very short amount of time.  I'll
| work on and post them if I can be reasonably sure they'll be committed.
I'm
| tired of spinning my wheels with this though.  I've got a personally
patched
| version of 4.3.0 that will be going into production in a few weeks, so I'm
| confident in the changes.  I'd like to not use a personally patched
version
| of PHP the next time a release comes down the pipe though.  As a reminder,
| this patch will fix bug #15209 without breaking the new functionality of
| register_shutdown_function under !apache systems.
|
| I've appealed to the [EMAIL PROTECTED] for karma to apply them myself, but for
| the last two weeks have heard nothing either negative or positive.
|
| Joseph
|
|
| --
| 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] roadmap of PHP - where? PHP 5 - when?

2003-01-23 Thread Brian Moon
| Imagine a company office where the programmers get paid per hour while
| spending tons of time at the round table of a meeting room throwing into
| each other what they like better and why.  In open source this happens a
| lot.

hey, who let you in to the dealnews dev room?

Brian.
dealnews.com


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




Re: [PHP-DEV] Re: Register Shutdown Function for Apache

2003-01-28 Thread Brian Moon
You are correct.  The output buffer is not auto-flushed with this patch.

Brian.
dealnews.com

- Original Message -
From: "Zeev Suraski" <[EMAIL PROTECTED]>
To: "Joseph Tate" <[EMAIL PROTECTED]>
Cc: "Php-Dev List" <[EMAIL PROTECTED]>; "PHP Group" <[EMAIL PROTECTED]>
Sent: Tuesday, January 28, 2003 3:16 AM
Subject: [PHP-DEV] Re: Register Shutdown Function for Apache


| Joseph,
|
| Your latest patch seems to be in the right direction (admittedly I haven't
| reviewed it until now).  A couple of random points:
|
| - It sounds dangerous to me to move php_request_shutdown() to be called
| from Apache's shutdown without further inspection.  At least one thing
| comes to mind - won't it screw up output buffers (they're supposed to
| autoflush on shutdown, and if I'm not mistaken, this autoflush will now
| happen when the connection is already closed)?  Possibly some other things
too.
| - Once we're all happy with the patch, we need to decide what to do with
| it.  Right now, there are no plans to release any further 4.x versions,
| except for bug fixes.  And the question arises - should this change be in
a
| bugfix release or not.  It certainly has potential to screw things up.
|
| Zeev
|
| At 18:38 23/01/2003, Joseph Tate wrote:
| >I can have the patches ready to go in a very short amount of time.  I'll
| >work on and post them if I can be reasonably sure they'll be committed.
I'm
| >tired of spinning my wheels with this though.  I've got a personally
patched
| >version of 4.3.0 that will be going into production in a few weeks, so
I'm
| >confident in the changes.  I'd like to not use a personally patched
version
| >of PHP the next time a release comes down the pipe though.  As a
reminder,
| >this patch will fix bug #15209 without breaking the new functionality of
| >register_shutdown_function under !apache systems.
| >
| >I've appealed to the [EMAIL PROTECTED] for karma to apply them myself, but
for
| >the last two weeks have heard nothing either negative or positive.
| >
| >Joseph
|
|
| --
| PHP Development Mailing List 
| To unsubscribe, visit: http://www.php.net/unsub.php
|
|
|


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




Re: [PHP-DEV] Re: Register Shutdown Function for Apache

2003-01-28 Thread Brian Moon
It also does not send the headers if there is not content.

http://spidey.dealnews.com/";);

exit();

?>



Document Contains No Data.



Brian.

dealnews.com


- Original Message -
From: "Brian Moon" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; "Joseph Tate" <[EMAIL PROTECTED]>
Cc: "Php-Dev List" <[EMAIL PROTECTED]>; "PHP Group" <[EMAIL PROTECTED]>
Sent: Tuesday, January 28, 2003 10:16 AM
Subject: Re: [PHP-DEV] Re: Register Shutdown Function for Apache


| You are correct.  The output buffer is not auto-flushed with this patch.
|
| Brian.
| dealnews.com
|
| - Original Message -
| From: "Zeev Suraski" <[EMAIL PROTECTED]>
| To: "Joseph Tate" <[EMAIL PROTECTED]>
| Cc: "Php-Dev List" <[EMAIL PROTECTED]>; "PHP Group" <[EMAIL PROTECTED]>
| Sent: Tuesday, January 28, 2003 3:16 AM
| Subject: [PHP-DEV] Re: Register Shutdown Function for Apache
|
|
| | Joseph,
| |
| | Your latest patch seems to be in the right direction (admittedly I
haven't
| | reviewed it until now).  A couple of random points:
| |
| | - It sounds dangerous to me to move php_request_shutdown() to be called
| | from Apache's shutdown without further inspection.  At least one thing
| | comes to mind - won't it screw up output buffers (they're supposed to
| | autoflush on shutdown, and if I'm not mistaken, this autoflush will now
| | happen when the connection is already closed)?  Possibly some other
things
| too.
| | - Once we're all happy with the patch, we need to decide what to do with
| | it.  Right now, there are no plans to release any further 4.x versions,
| | except for bug fixes.  And the question arises - should this change be
in
| a
| | bugfix release or not.  It certainly has potential to screw things up.
| |
| | Zeev
| |
| | At 18:38 23/01/2003, Joseph Tate wrote:
| | >I can have the patches ready to go in a very short amount of time.
I'll
| | >work on and post them if I can be reasonably sure they'll be committed.
| I'm
| | >tired of spinning my wheels with this though.  I've got a personally
| patched
| | >version of 4.3.0 that will be going into production in a few weeks, so
| I'm
| | >confident in the changes.  I'd like to not use a personally patched
| version
| | >of PHP the next time a release comes down the pipe though.  As a
| reminder,
| | >this patch will fix bug #15209 without breaking the new functionality
of
| | >register_shutdown_function under !apache systems.
| | >
| | >I've appealed to the [EMAIL PROTECTED] for karma to apply them myself, but
| for
| | >the last two weeks have heard nothing either negative or positive.
| | >
| | >Joseph
| |
| |
| | --
| | 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 Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] Re: Register Shutdown Function for Apache

2003-01-28 Thread Brian Moon
Give me a patch and I will tell you. ;)

Brian Moon
dealnews.com


- Original Message -
From: "Zeev Suraski" <[EMAIL PROTECTED]>
To: "Joseph Tate" <[EMAIL PROTECTED]>
Cc: "Brian Moon" <[EMAIL PROTECTED]>; "Php-Dev List"
<[EMAIL PROTECTED]>; "PHP Group" <[EMAIL PROTECTED]>
Sent: Tuesday, January 28, 2003 4:03 PM
Subject: RE: [PHP-DEV] Re: Register Shutdown Function for Apache


| At 19:54 28/01/2003, Joseph Tate wrote:
| >Then, could we add a sapi_flush()/ob_flush() call at the end of
| >apache_php_module_main after calling the normal
register_shutdown_functions?
|
| Yeah, something along these lines.
|
| >What else might have problems?
|
| Might is a powerful word :)
|
| Zeev
|
|
|


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




Re: [PHP-DEV] Register Shutdown Function for Apache

2003-02-03 Thread Brian Moon
Hmm, there is #define MOD_PHP4_H in sapi/apache/mod_php4.h.  Not real
descriptive, but seems to be unique to the Apache sapi.

Brian Moon
dealnews.com


- Original Message -
From: "Joseph Tate" <[EMAIL PROTECTED]>
To: "Brian Moon" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Cc: "Php-Dev List" <[EMAIL PROTECTED]>
Sent: Monday, February 03, 2003 3:45 PM
Subject: Re: [PHP-DEV] Register Shutdown Function for Apache


| Here is an updated patch which copies a few of the methods from
| main/main.c::php_request_shutdown to
| sapi/apache/sapi_apache.c::apache_php_module_main.  This has flushed both
| the headers and output buffers in my two test scripts.  Now I need to
figure
| out a way to make sure these don't get called in
| main/main.c::php_request_shutdown on Apache systems.  Any pointers on
this?
| Is there a handy #define that I can use if configure is
called --with-apxs?
|
| Joseph
|
| P.S.  The two test scripts are:
|
| http://www.mi-corporation.com');
| exit();
| ?>
|
| and
|
| 
|
| > -Original Message-
| > From: Brian Moon [mailto:[EMAIL PROTECTED]]
| > Sent: Tuesday, January 28, 2003 5:50 PM
| > To: [EMAIL PROTECTED]; Joseph Tate
| > Cc: Php-Dev List; PHP Group
| > Subject: Re: [PHP-DEV] Re: Register Shutdown Function for Apache
| >
| >
| > Give me a patch and I will tell you. ;)
| >
| > Brian Moon
| > dealnews.com
| >
| >
| > - Original Message -
| > From: "Zeev Suraski" <[EMAIL PROTECTED]>
| > To: "Joseph Tate" <[EMAIL PROTECTED]>
| > Cc: "Brian Moon" <[EMAIL PROTECTED]>; "Php-Dev List"
| > <[EMAIL PROTECTED]>; "PHP Group" <[EMAIL PROTECTED]>
| > Sent: Tuesday, January 28, 2003 4:03 PM
| > Subject: RE: [PHP-DEV] Re: Register Shutdown Function for Apache
| >
| >
| > | At 19:54 28/01/2003, Joseph Tate wrote:
| > | >Then, could we add a sapi_flush()/ob_flush() call at the end of
| > | >apache_php_module_main after calling the normal
| > register_shutdown_functions?
| > |
| > | Yeah, something along these lines.
| > |
| > | >What else might have problems?
| > |
| > | Might is a powerful word :)
| > |
| > | Zeev
| > |
| > |
| > |
| >
| >
| > --
| > 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] Register Shutdown Function for Apache

2003-02-11 Thread Brian Moon
Well, it is not just apxs is it?  The same would be true if --with-apache
was used.

Brian Moon
dealnews.com


- Original Message -
From: "Joseph Tate" <[EMAIL PROTECTED]>
To: "Jani Taskinen" <[EMAIL PROTECTED]>
Cc: "Php-Dev List" <[EMAIL PROTECTED]>
Sent: Tuesday, February 11, 2003 9:04 AM
Subject: RE: [PHP-DEV] Register Shutdown Function for Apache


| I think it's reached that stage.  Something like HAVE_APXS that's defined
| when configure is called --with-apxs.  That'd be great.
|
| Joseph
|
| > -Original Message-
| > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
| > Behalf Of Jani Taskinen
| > Sent: Monday, February 10, 2003 7:16 PM
| > To: Joseph Tate
| > Cc: Php-Dev List
| > Subject: RE: [PHP-DEV] Register Shutdown Function for Apache
| >
| >
| >
| > If you need a define for it, we can add one..?
| >
| > --Jani
| >
| >
| > On Mon, 10 Feb 2003, Joseph Tate wrote:
| >
| > >Well, to me, calling the code that flushes the headers and the output
| > >buffers twice doesn't kill us.  Unless someone can come up with
| > a better way
| > >to not call these two functions in main/main.c::php_request_shutdown,
the
| > >patch suffices for me.  MOD_PHP4_H is undefined in main.c, so it's not
| > >acceptable.
| > >
| > >Joseph
| > >
| > >> -Original Message-
| > >> From: Brian Moon [mailto:[EMAIL PROTECTED]]
| > >> Sent: Monday, February 03, 2003 5:30 PM
| > >> To: Joseph Tate; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]
| > >> Cc: Php-Dev List
| > >> Subject: Re: [PHP-DEV] Register Shutdown Function for Apache
| > >>
| > >>
| > >> Hmm, there is #define MOD_PHP4_H in sapi/apache/mod_php4.h.  Not real
| > >> descriptive, but seems to be unique to the Apache sapi.
| > >>
| > >> Brian Moon
| > >> dealnews.com
| > >>
| > >>
| > >> - Original Message -
| > >> From: "Joseph Tate" <[EMAIL PROTECTED]>
| > >> To: "Brian Moon" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>;
| > >> <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
| > >> Cc: "Php-Dev List" <[EMAIL PROTECTED]>
| > >> Sent: Monday, February 03, 2003 3:45 PM
| > >> Subject: Re: [PHP-DEV] Register Shutdown Function for Apache
| > >>
| > >>
| > >> | Here is an updated patch which copies a few of the methods from
| > >> | main/main.c::php_request_shutdown to
| > >> | sapi/apache/sapi_apache.c::apache_php_module_main.  This has
| > >> flushed both
| > >> | the headers and output buffers in my two test scripts.  Now I need
to
| > >> figure
| > >> | out a way to make sure these don't get called in
| > >> | main/main.c::php_request_shutdown on Apache systems.  Any pointers
on
| > >> this?
| > >> | Is there a handy #define that I can use if configure is
| > >> called --with-apxs?
| > >> |
| > >> | Joseph
| > >> |
| > >> | P.S.  The two test scripts are:
| > >> |
| > >> |  >> | header('Location: http://www.mi-corporation.com');
| > >> | exit();
| > >> | ?>
| > >> |
| > >> | and
| > >> |
| > >> |  >> | ob_begin();
| > >> | phpinfo();
| > >> | ?>
| > >> |
| > >> | > -Original Message-
| > >> | > From: Brian Moon [mailto:[EMAIL PROTECTED]]
| > >> | > Sent: Tuesday, January 28, 2003 5:50 PM
| > >> | > To: [EMAIL PROTECTED]; Joseph Tate
| > >> | > Cc: Php-Dev List; PHP Group
| > >> | > Subject: Re: [PHP-DEV] Re: Register Shutdown Function for Apache
| > >> | >
| > >> | >
| > >> | > Give me a patch and I will tell you. ;)
| > >> | >
| > >> | > Brian Moon
| > >> | > dealnews.com
| > >> | >
| > >> | >
| > >> | > - Original Message -
| > >> | > From: "Zeev Suraski" <[EMAIL PROTECTED]>
| > >> | > To: "Joseph Tate" <[EMAIL PROTECTED]>
| > >> | > Cc: "Brian Moon" <[EMAIL PROTECTED]>; "Php-Dev List"
| > >> | > <[EMAIL PROTECTED]>; "PHP Group" <[EMAIL PROTECTED]>
| > >> | > Sent: Tuesday, January 28, 2003 4:03 PM
| > >> | > Subject: RE: [PHP-DEV] Re: Register Shutdown Function for Apache
| > >> | >
| > >> | >
| > >> | > | At 19:54 28/01/2003, Joseph Tate wrote:
| > >> | > | >Then, could we add a sapi_flush()/ob_flush() call at the end
of
| > >> | > | >apache_php_module_main after calling the normal
| > >> | > register_shutdown_functions?
| > >> | > |
| > >> | > | Yeah, something along these lines.
| > >> | > |
| > >> | > | >What else might have problems?
| > >> | > |
| > >> | > | Might is a powerful word :)
| > >> | > |
| > >> | > | Zeev
| > >> | > |
| > >> | > |
| > >> | > |
| > >> | >
| > >> | >
| > >> | > --
| > >> | > PHP Development Mailing List <http://www.php.net/>
| > >> | > To unsubscribe, visit: http://www.php.net/unsub.php
| > >> | >
| > >> | >
| > >> | >
| > >> |
| > >>
| > >>
| > >>
| > >
| > >
| > >
| >
| > --
| > <- For Sale! ->
| >
| >
| >
|
|
| --
| 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] Announcement: New MySQL-Extension for PHP 5: ext/mysqli

2003-02-11 Thread Brian Moon
Do you have some sample code or a function list?

Brian Moon
dealnews.com


- Original Message -
From: "Georg Richter" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, February 11, 2003 6:08 PM
Subject: [PHP-DEV] Announcement: New MySQL-Extension for PHP 5: ext/mysqli


| Hi,
|
| The new mysql extension is now in the cvs-repository. Please not that you
| need MySQL Version 4.1 (both server and client library) and that this
| extension has experimental status.
|
| Configuration:
|
| --with-mysqli=/path-to-mysql-4.1  -without-mysql
|
| If you want to use both ext/mysql and ext/mysqli you have to specity
|
| --with-mysqli=/path-to-mysql-4.1  --with-mysql=/path-to-mysql-4.1
|
|
| Some new features:
|
| OO and plain interface
| Diffrent types of connections (compressed/ssl)
| Variable bindings
| Support for bigints
| Replication support
|
| For some samples check the tests subdir. I'll add documentation within the
| next days.
|
| Regards
|
| Georg
|
| --
| 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] Register Shutdown Function for Apache

2003-02-11 Thread Brian Moon
Jani, are you volunteering to add it?  If so, please do so at your earliest
convience.

Brian Moon
dealnews.com


- Original Message -
From: "Jani Taskinen" <[EMAIL PROTECTED]>
To: "Joseph Tate" <[EMAIL PROTECTED]>
Cc: "Php-Dev List" <[EMAIL PROTECTED]>
Sent: Monday, February 10, 2003 6:16 PM
Subject: RE: [PHP-DEV] Register Shutdown Function for Apache


|
| If you need a define for it, we can add one..?
|
| --Jani
|
|
| On Mon, 10 Feb 2003, Joseph Tate wrote:
|
| >Well, to me, calling the code that flushes the headers and the output
| >buffers twice doesn't kill us.  Unless someone can come up with a better
way
| >to not call these two functions in main/main.c::php_request_shutdown, the
| >patch suffices for me.  MOD_PHP4_H is undefined in main.c, so it's not
| >acceptable.
| >
| >Joseph
| >
| >> -Original Message-
| >> From: Brian Moon [mailto:[EMAIL PROTECTED]]
| >> Sent: Monday, February 03, 2003 5:30 PM
| >> To: Joseph Tate; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]
| >> Cc: Php-Dev List
| >> Subject: Re: [PHP-DEV] Register Shutdown Function for Apache
| >>
| >>
| >> Hmm, there is #define MOD_PHP4_H in sapi/apache/mod_php4.h.  Not real
| >> descriptive, but seems to be unique to the Apache sapi.
| >>
| >> Brian Moon
| >> dealnews.com
| >>
| >>
| >> - Original Message -
| >> From: "Joseph Tate" <[EMAIL PROTECTED]>
| >> To: "Brian Moon" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>;
| >> <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
| >> Cc: "Php-Dev List" <[EMAIL PROTECTED]>
| >> Sent: Monday, February 03, 2003 3:45 PM
| >> Subject: Re: [PHP-DEV] Register Shutdown Function for Apache
| >>
| >>
| >> | Here is an updated patch which copies a few of the methods from
| >> | main/main.c::php_request_shutdown to
| >> | sapi/apache/sapi_apache.c::apache_php_module_main.  This has
| >> flushed both
| >> | the headers and output buffers in my two test scripts.  Now I need to
| >> figure
| >> | out a way to make sure these don't get called in
| >> | main/main.c::php_request_shutdown on Apache systems.  Any pointers on
| >> this?
| >> | Is there a handy #define that I can use if configure is
| >> called --with-apxs?
| >> |
| >> | Joseph
| >> |
| >> | P.S.  The two test scripts are:
| >> |
| >> | > | header('Location: http://www.mi-corporation.com');
| >> | exit();
| >> | ?>
| >> |
| >> | and
| >> |
| >> | > | ob_begin();
| >> | phpinfo();
| >> | ?>
| >> |
| >> | > -Original Message-
| >> | > From: Brian Moon [mailto:[EMAIL PROTECTED]]
| >> | > Sent: Tuesday, January 28, 2003 5:50 PM
| >> | > To: [EMAIL PROTECTED]; Joseph Tate
| >> | > Cc: Php-Dev List; PHP Group
| >> | > Subject: Re: [PHP-DEV] Re: Register Shutdown Function for Apache
| >> | >
| >> | >
| >> | > Give me a patch and I will tell you. ;)
| >> | >
| >> | > Brian Moon
| >> | > dealnews.com
| >> | >
| >> | >
| >> | > - Original Message -
| >> | > From: "Zeev Suraski" <[EMAIL PROTECTED]>
| >> | > To: "Joseph Tate" <[EMAIL PROTECTED]>
| >> | > Cc: "Brian Moon" <[EMAIL PROTECTED]>; "Php-Dev List"
| >> | > <[EMAIL PROTECTED]>; "PHP Group" <[EMAIL PROTECTED]>
| >> | > Sent: Tuesday, January 28, 2003 4:03 PM
| >> | > Subject: RE: [PHP-DEV] Re: Register Shutdown Function for Apache
| >> | >
| >> | >
| >> | > | At 19:54 28/01/2003, Joseph Tate wrote:
| >> | > | >Then, could we add a sapi_flush()/ob_flush() call at the end of
| >> | > | >apache_php_module_main after calling the normal
| >> | > register_shutdown_functions?
| >> | > |
| >> | > | Yeah, something along these lines.
| >> | > |
| >> | > | >What else might have problems?
| >> | > |
| >> | > | Might is a powerful word :)
| >> | > |
| >> | > | Zeev
| >> | > |
| >> | > |
| >> | > |
| >> | >
| >> | >
| >> | > --
| >> | > PHP Development Mailing List <http://www.php.net/>
| >> | > To unsubscribe, visit: http://www.php.net/unsub.php
| >> | >
| >> | >
| >> | >
| >> |
| >>
| >>
| >>
| >
| >
| >
|
| --
| <- For Sale! ->
|
|
| --
| 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] Announcement: New MySQL-Extension for PHP 5: ext/mysqli

2003-02-12 Thread Brian Moon
my bad, forgive me.

Brian Moon
dealnews.com


- Original Message -
From: "Sebastian Bergmann" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, February 11, 2003 11:47 PM
Subject: Re: [PHP-DEV] Announcement: New MySQL-Extension for PHP 5:
ext/mysqli


| Brian Moon wrote:
| > Do you have some sample code or a function list?
|
| "For some samples check the tests subdir.
| I'll add documentation within the next days." 
|
| --
|   Sebastian Bergmann
|   http://sebastian-bergmann.de/ http://phpOpenTracker.de/
|
|   Did I help you? Consider a gift: http://wishlist.sebastian-bergmann.de/
|
| --
| PHP Development Mailing List <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] Two ZE2 problems

2003-02-21 Thread Brian Moon
|   class foo {}
|   class bar {
|   var $baz = 'foo';
|   }
|   $bar = new bar();
|   $foo = new $bar->baz; // let's call this line 6
|
| It runs fine on ZE1, but ZE2 bails out with "parse error, unexpected
| T_OBJECT_OPERATOR on line 6".

Should this work?  YOu are using new with a returned value that is not an
object.

Brian.
dealnews.com


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




Re: [PHP-DEV] Moderate PHP-DEV

2003-03-12 Thread Brian Moon
| -1.
| 
| The list could be renamed so that it is less confusing for
| newbie PHP developers.
| 
| - Sascha

I agree.

Brian.
dealnews.com


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



[PHP-DEV] register_shutdown_function => register_offline_function

2002-12-05 Thread Brian Moon
Has the new function been created yet and if not when?

We have just spent 2 weeks investigating why our pages started dragging to
find out that register_shutdown_function is BROKE.  I am a little
discouraged from what I have read on this.  It seems that BC is only a
concern when the right person likes the old way it worked.  When the right
people don't like the way things work, BC is thrown out the window and code
is broken.  fgetcsv is broke and has been broke IMO.  It causes segfaults.
Read the archives.  But because it would break BC (and the orig author likes
the way it workds) it stays unchanged.

As for the new function,If we are creating a new function, we should create
a new one for the NEW behavior.  This is the same thing that happened with
mysql_fetch_array.  At first, it returned an associative array and
mysql_fetch_row returned a numerical array.  Then someone said, "I want both
in one call", so, someone decided that mysql_fetch_array should return both.
Well, people complained (me included) and the solution was make it take an
optional param to designate the array type with both being the default.
Now, we all know that assoc should have been the default. So, i wrote
mysql_fetch_assoc, got it commited and never looked back on that one.

Thanks for the time.

Brian Moon
dealnews.com




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




Re: [PHP-DEV] register_shutdown_function => register_offline_function

2002-12-05 Thread Brian Moon
Ok, I reopened the bug.  It fails with latest CVS.

[root@dealnews php4-200212051430]# ./sapi/cgi/php-cgi csv.php

Content-type: text/html
X-Powered-By: PHP/4.4.0-dev

Array
(
[0] => 6
[1] => 7
[2] => 8
[3] => line1
)
Segmentation fault

Brian Moon
dealnews.com


- Original Message -
From: "Derick Rethans" <[EMAIL PROTECTED]>
To: "Brian Moon" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Thursday, December 05, 2002 10:00 AM
Subject: Re: [PHP-DEV] register_shutdown_function =>
register_offline_function


| Hey Brain,
|
| watch your attitude, we're not here to solve your problems. fgetcvs is
| not broken at all, it has been fixed recently. If you still think it's
| broken file a bugreport.
|
| Derick
|
|
| On Thu, 5 Dec 2002, Brian Moon wrote:
|
| > Has the new function been created yet and if not when?
| >
| > We have just spent 2 weeks investigating why our pages started dragging
to
| > find out that register_shutdown_function is BROKE.  I am a little
| > discouraged from what I have read on this.  It seems that BC is only a
| > concern when the right person likes the old way it worked.  When the
right
| > people don't like the way things work, BC is thrown out the window and
code
| > is broken.  fgetcsv is broke and has been broke IMO.  It causes
segfaults.
| > Read the archives.  But because it would break BC (and the orig author
likes
| > the way it workds) it stays unchanged.
| >
| > As for the new function,If we are creating a new function, we should
create
| > a new one for the NEW behavior.  This is the same thing that happened
with
| > mysql_fetch_array.  At first, it returned an associative array and
| > mysql_fetch_row returned a numerical array.  Then someone said, "I want
both
| > in one call", so, someone decided that mysql_fetch_array should return
both.
| > Well, people complained (me included) and the solution was make it take
an
| > optional param to designate the array type with both being the default.
| > Now, we all know that assoc should have been the default. So, i wrote
| > mysql_fetch_assoc, got it commited and never looked back on that one.
| >
| > Thanks for the time.
| >
| > Brian Moon
| > dealnews.com
| >
| >
| >
| >
| > --
| > PHP Development Mailing List <http://www.php.net/>
| > To unsubscribe, visit: http://www.php.net/unsub.php
| >
|
| --
|
| -
|  Derick Rethans http://derickrethans.nl/
|  PHP Magazine - PHP Magazine for Professionals   http://php-mag.net/
| -
|
|
|


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




[PHP-DEV] fgetcsv problems was: register_shutdown_function => register_offline_function

2002-12-05 Thread Brian Moon
Well, this goes back to my original problem with fgetcsv then.  I can not
find another application that will accept a CSV file that will allow
mutliline quoted fields.  They stop at the newline regardless.

Brian Moon
dealnews.com


- Original Message -
From: "Ilia A." <[EMAIL PROTECTED]>
To: "Brian Moon" <[EMAIL PROTECTED]>; "Derick Rethans" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Thursday, December 05, 2002 10:52 AM
Subject: Re: [PHP-DEV] register_shutdown_function =>
register_offline_function


| Known issue, the original patch for this problem had to be reveted since
it
| broke the handling of mulit-line CVS fields that are quoted. I am now
working
| on a more permanent fix.
|
| Ilia
|
| On December 5, 2002 11:39 am, Brian Moon wrote:
| > Ok, I reopened the bug.  It fails with latest CVS.
| >
| > [root@dealnews php4-200212051430]# ./sapi/cgi/php-cgi csv.php
| >
| > Content-type: text/html
| > X-Powered-By: PHP/4.4.0-dev
| >
| > Array
| > (
| > [0] => 6
| >     [1] => 7
| > [2] => 8
| > [3] => line1
| > )
| > Segmentation fault
| >
| > Brian Moon
| > dealnews.com
| >
| >
| > - Original Message -
| > From: "Derick Rethans" <[EMAIL PROTECTED]>
| > To: "Brian Moon" <[EMAIL PROTECTED]>
| > Cc: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
| > Sent: Thursday, December 05, 2002 10:00 AM
| > Subject: Re: [PHP-DEV] register_shutdown_function =>
| > register_offline_function
| >
| > | Hey Brain,
| > |
| > | watch your attitude, we're not here to solve your problems. fgetcvs is
| > | not broken at all, it has been fixed recently. If you still think it's
| > | broken file a bugreport.
| > |
| > | Derick
| > |
| > | On Thu, 5 Dec 2002, Brian Moon wrote:
| > | > Has the new function been created yet and if not when?
| > | >
| > | > We have just spent 2 weeks investigating why our pages started
dragging
| >
| > to
| >
| > | > find out that register_shutdown_function is BROKE.  I am a little
| > | > discouraged from what I have read on this.  It seems that BC is only
a
| > | > concern when the right person likes the old way it worked.  When the
| >
| > right
| >
| > | > people don't like the way things work, BC is thrown out the window
and
| >
| > code
| >
| > | > is broken.  fgetcsv is broke and has been broke IMO.  It causes
| >
| > segfaults.
| >
| > | > Read the archives.  But because it would break BC (and the orig
author
| >
| > likes
| >
| > | > the way it workds) it stays unchanged.
| > | >
| > | > As for the new function,If we are creating a new function, we should
| >
| > create
| >
| > | > a new one for the NEW behavior.  This is the same thing that
happened
| >
| > with
| >
| > | > mysql_fetch_array.  At first, it returned an associative array and
| > | > mysql_fetch_row returned a numerical array.  Then someone said, "I
want
| >
| > both
| >
| > | > in one call", so, someone decided that mysql_fetch_array should
return
| >
| > both.
| >
| > | > Well, people complained (me included) and the solution was make it
take
| >
| > an
| >
| > | > optional param to designate the array type with both being the
default.
| > | > Now, we all know that assoc should have been the default. So, i
wrote
| > | > mysql_fetch_assoc, got it commited and never looked back on that
one.
| > | >
| > | > Thanks for the time.
| > | >
| > | > Brian Moon
| > | > dealnews.com
| > | >
| > | >
| > | >
| > | >
| > | > --
| > | > PHP Development Mailing List <http://www.php.net/>
| > | > To unsubscribe, visit: http://www.php.net/unsub.php
| > |
| > | --
| > |
| >
| -
| > |  Derick Rethans
http://derickrethans.nl/
| > |  PHP Magazine - PHP Magazine for Professionals
http://php-mag.net/
| >
| -
|
|
| --
| PHP Development Mailing List <http://www.php.net/>
| To unsubscribe, visit: http://www.php.net/unsub.php
|
|
|


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




[PHP-DEV] Single quotes VS. Double quotes

2002-12-13 Thread Brian Moon
This is of really low importance, but I found it interesting.  A new guy on
the Phorum dev team decided to convert all double quotes to single quotes
for "speed" in CVS.  The common assumption is that single quotes are faster
than double quotes.  However, I am of the mind set of using double always as
it creates less headaches later to add a variable to the string.  In an
attempt to show him the marginal savings of this, I did some benchmarks.
The results were confusing.

$var="This is test number $x"; was really slow.

but,

$var="This is test number ".$x;

and

$var='This is test number '.$x;

we basically identical.

Andi, Zeev, if you want waste some energy on exanding on why this is and if
anything in ZE2 will change it I would find it a good read.

Brian Moon
dealnews.com




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




Re: [PHP-DEV] Single quotes VS. Double quotes

2002-12-13 Thread Brian Moon
Man, I wish that answered my question, but it does not address string
concatenation vs. variables in double quoted strings anywhere on there.

Thanks for trying.

Brian Moon
dealnews.com


- Original Message -
From: "Andrey Hristov" <[EMAIL PROTECTED]>
To: "Brian Moon" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Friday, December 13, 2002 10:35 AM
Subject: Re: [PHP-DEV] Single quotes VS. Double quotes


| See this :
| http://phpxpath.sourceforge.net/benchmark/phpBench.php
|
| And show it to the guy.
|
| Andrey
|
| - Original Message -
| From: "Brian Moon" <[EMAIL PROTECTED]>
| To: <[EMAIL PROTECTED]>
| Sent: Friday, December 13, 2002 6:29 PM
| Subject: [PHP-DEV] Single quotes VS. Double quotes
|
|
| > This is of really low importance, but I found it interesting.  A new guy
| on
| > the Phorum dev team decided to convert all double quotes to single
quotes
| > for "speed" in CVS.  The common assumption is that single quotes are
| faster
| > than double quotes.  However, I am of the mind set of using double
always
| as
| > it creates less headaches later to add a variable to the string.  In an
| > attempt to show him the marginal savings of this, I did some benchmarks.
| > The results were confusing.
| >
| > $var="This is test number $x"; was really slow.
| >
| > but,
| >
| > $var="This is test number ".$x;
| >
| > and
| >
| > $var='This is test number '.$x;
| >
| > we basically identical.
| >
| > Andi, Zeev, if you want waste some energy on exanding on why this is and
| if
| > anything in ZE2 will change it I would find it a good read.
| >
| > Brian Moon
| > dealnews.com
| >
| >
| >
| >
| > --
| > 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] Single quotes VS. Double quotes

2002-12-13 Thread Brian Moon
I am using 4.2.2-dev.  Must be a stable build from snaps.php.net.  I will
read the archives.

Brian Moon
dealnews.com


- Original Message -
From: "George Schlossnagle" <[EMAIL PROTECTED]>
To: "Andrey Hristov" <[EMAIL PROTECTED]>
Cc: "Brian Moon" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Friday, December 13, 2002 10:40 AM
Subject: Re: [PHP-DEV] Single quotes VS. Double quotes


| What version of php did you try this with Brian?  There were some lexer
| changes implemented (that I believe are only in HEAD for ZE1 and ZE2
| and not in 4.3) that should equalize this difference.  There was a
| thread about this on php-dev not long ago that explains why this occurs
| - search the archives for ZEND_ADD_STRING.
|
| George
|
| On Friday, December 13, 2002, at 11:35  AM, Andrey Hristov wrote:
|
| > See this :
| > http://phpxpath.sourceforge.net/benchmark/phpBench.php
| >
| > And show it to the guy.
| >
| > Andrey
| >
| > - Original Message -
| > From: "Brian Moon" <[EMAIL PROTECTED]>
| > To: <[EMAIL PROTECTED]>
| > Sent: Friday, December 13, 2002 6:29 PM
| > Subject: [PHP-DEV] Single quotes VS. Double quotes
| >
| >
| >> This is of really low importance, but I found it interesting.  A new
| >> guy
| > on
| >> the Phorum dev team decided to convert all double quotes to single
| >> quotes
| >> for "speed" in CVS.  The common assumption is that single quotes are
| > faster
| >> than double quotes.  However, I am of the mind set of using double
| >> always
| > as
| >> it creates less headaches later to add a variable to the string.  In
| >> an
| >> attempt to show him the marginal savings of this, I did some
| >> benchmarks.
| >> The results were confusing.
| >>
| >> $var="This is test number $x"; was really slow.
| >>
| >> but,
| >>
| >> $var="This is test number ".$x;
| >>
| >> and
| >>
| >> $var='This is test number '.$x;
| >>
| >> we basically identical.
| >>
| >> Andi, Zeev, if you want waste some energy on exanding on why this is
| >> and
| > if
| >> anything in ZE2 will change it I would find it a good read.
| >>
| >> Brian Moon
| >> dealnews.com
| >>
| >>
| >>
| >>
| >> --
| >> 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 Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DEV] zlib + register_shutdown_function

2002-12-23 Thread Brian Moon
I just put a comment on the register_shutdown_function bug, but I am not
sure if comments go to the list or not.  Here was the comment:

--

The following script will cause IE to stop loading the page when
zlib.output_compression is used.  This was not true before the changes
to register_shutdown_function as the output was not sent.

You can see a test at http://dealnews.com/zlibshutdown.php.  Mozilla
gracefully handles the mixed output by truncating the non-compressed
data.









This is in the HTML body.








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




Re: [PHP-DEV] [PATCH]apache_register_shutdown_function final version

2002-12-30 Thread Brian Moon
So, is this going to get added?  I have seen very little response to Joseph
from the list.  I would very much like to see this as
register_shutdown_function is/was crucial to us in it previous form.

Brian Moon
dealnews.com


- Original Message -
From: "Joseph Tate" <[EMAIL PROTECTED]>
To: "Php-Dev List" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Cc: "Jason Priebe" <[EMAIL PROTECTED]>
Sent: Monday, December 30, 2002 11:22 AM
Subject: [PHP-DEV] [PATCH]apache_register_shutdown_function final version


| As a reminder, this replaces the register_shutdown_function functionality
| removed in 4.1.x as described at http://bugs.php.net/15209.  I've made my
| final adjustments to the patch.  Please review and commit both to HEAD and
| PHP_4_3.  I received no response from the SAPI guru's, so I went ahead and
| added the sapi_close function to all SAPI modules, initializing it to
NULL.
| It's not implemented for anything but apache 1.3.  Implementing for
Apache2
| is not a big deal, just call ap_lingering_close from within sapi_close.
|
| With the addition of sapi_close, it should be possible to add the
| functionality of apache_register_shutdown_function to every platform
| implementing the sapi_close method.
|
| Also, those on non-Apache systems, please test to make sure that this does
| not break your builds.
|
| Thanks,
| Joseph
| [EMAIL PROTECTED]
|
|






| --
| 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] Designing for PHP4 with PHP5 in mind...

2003-01-06 Thread Brian Moon
>From what I understand, all OO code will have to be modified for PHP5.
Constructors for example and no longer named the same as the class name.
That alone means every class must be changed.  I don't recall anyone saying
it would be BC either, but I could be wrong.

Brian Moon
-
dealnews.com
-
phorum.org

- Original Message -
From: "John Wells" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, January 06, 2003 7:03 PM
Subject: [PHP-DEV] Designing for PHP4 with PHP5 in mind...


| I'm preparing for a project in which I'll be porting and redesigning a
| large, ugly Visual Basic/Sql Server app to a PHP/Mysql or Postgresql based
| web application.
|
| I'd like to code in a way that will be at the same time easily ported to
| PHP5 and that will take advantage of PHP5's new object handling
| efficiencies.  I've read varying reports of whether syntax will be
| different.
|
| Is there anything I should watch for, add, or specifically avoid while
| coding this application to make the transition as easy as possible?
|
| Thanks!
| John
|
|
|
|
|
|
|
|
| --
| 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] Designing for PHP4 with PHP5 in mind...

2003-01-06 Thread Brian Moon
| > >I don't recall anyone saying
| > >it would be BC either, but I could be wrong.
| > 
| > You're wrong.
| > 
| > Of course, I could be too.
| >
| but you're not.  so its ok...
| 


So current PHP4 classes will still work in ZE2?

Brian.

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




Re: [PHP-DEV] PHP 4.0 Bug #8889: Memory is not being freed.

2001-01-31 Thread Brian Moon

> 4.
> >And, BTW, you can control it - see MAX_ constants at zend_alloc.h
>
> As I CLEARLY (as I think ...) described in
> http://marc.theaimsgroup.com/?l=php-dev&m=98080647502573&w=2
> the mechanism of memory "deadlocks" is not based on the cache size
> (it is small in fact), but in order of memory operations (problem
> appears even when the size is set to 1 !). We've tested some
> very simple fixes (turn off ZEND_FAST_CACHE and for example
> force the shutdown_memory_manager always to clean the cache, not
> only when "clean" flag is set. It needs some small modification
> in for loop in order to reinitialize cache globals) and the problem
> has dissapeared (almost, but I'll say about it later in 5).
> The CPU performance lowers down only a little bit.

I did what it says at that URL and still had the problems.  I suspect it is
related to libraries and such that we use at phorum.org but I am not sure
how to pinpoint it.  Can you tell me what you did to force the
shutdown_memory_manager.  I would like to see what that can do for me.

Brian Moon
-
Phorum Dev Team - http://phorum.org
Making better forums with PHP
-




-- 
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] Question: Should exit() print out the integer exit-status?

2001-12-19 Thread Brian Moon

No offense Benjamin, but you don't understand the conversation.  This is
about running PHP apps in consoles, mail pre-processors and as cron jobs
where exit status is needed.  The only way to get an exit status is with
exit.

Brian.

- Original Message -
From: "benjamin yates" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Wednesday, December 19, 2001 3:00 PM
Subject: Re: [PHP-DEV] Question: Should exit() print out the integer
exit-status?


| >What are you talking about?
| >1) Setting the exit status of a process is common.
| >2) Try and right any kind of executer/parser that performs well without
| >goto's
|
|   1 - u can return a value just fine (and silently :) with return, and
| having multiple exit points i've always thought was bad design...
|
|   2 - i don't think anyone is going to write that kind of parser in php...
| but i see your point
|
|   -benjamin
|
| _
| Send and receive Hotmail on your mobile device: http://mobile.msn.com
|
|
| --
| 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 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] exit() summary

2001-12-19 Thread Brian Moon

I say we apply the shell_exit() patch and move on with our lives.  If you
are dead set on making exit work like that, then change your own code and be
happy.

I just want a solution ASAP.  The code is written.

Brian.

- Original Message -
From: "Markus Fischer" <[EMAIL PROTECTED]>
To: "Derick Rethans" <[EMAIL PROTECTED]>
Cc: "PHP Developers Mailing List" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, December 19, 2001 5:32 PM
Subject: Re: [PHP-DEV] exit() summary


| I get the impression that many questions raise need a voting
| so we see how not only three, four developers respond to it
| but how the masses, who're THE userbase, actually use it.
|
| Do you guys think its silly to have voting or do you think it
| can be useful?
|
| Personally, I've seen several cases in the past where a
| voting system would have solved at least the question, what
| MORE people think about it.
|
| - Markus
|
| On Wed, Dec 19, 2001 at 06:04:35PM +0100, Derick Rethans wrote :
| > Hello,
| >
| > yeah, another endless mail shout at, well, listen first :)
| >
| > As you all know, a lot of ppl think that Backward Compability is The
Most
| > Presious Thing. Other ppl think that more and better functions are more
| > important. This sometimes requires _breaking_ backward compability (uh
| > oh, i mentioned it), as was cheerfull mentioned by Mr Lemos. Although he
| > has a good point, we still decided (one year ago) that the dirname was
| > broken. The same is true for exit(). voice>It's simply broken from a programmers perspective.
Look
| > at C/Pascal/shells/Java and every other programming language available
on
| > Earth, but no, because some programmer that wrote the language
semantics,
| > thought, hey, let's exit() print out the status too, cause it looks
nice.
| > BAD.
| >
| > Ok, that was the problem, now the solution:
| >
| > 1. We fix exit
| > 2. We add an extra argument to exit, which silences the output
| > 3. We make exit understand @, like @exit();
| > 4. We add a new function
| >
| > Before hell breaks loose again, I don't want to hear comments on this,
| > only reply's with those numbers in the subject. You can direct all mail
| > to [EMAIL PROTECTED]
| >
| > Discussions can go on here of course :)
| >
| > regards,
| > Derick
| >
| >
| >
| > --
| > 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]
|
| --
| Please always Cc to me when replying to me on the lists.
|
| --
| 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 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] exit()

2001-12-25 Thread Brian Moon

+1

- Original Message -
From: "Andi Gutmans" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, December 21, 2001 3:20 AM
Subject: [PHP-DEV] exit()


| Guys,
|
| I just read the whole thread about exit() now. Boy you guys write a lot :)
| Unlike Zeev I think that overloading exit() is the best solution we have
| right now.
| Have exit(integer) exit with an exit status and exit("string") print the
| error. I also very much liked the proposal of exit(string, integer) where
| it would behave correctly with exit("foo"), exit(5) and exit("foo", 5).
| I think BC is an issue and I wouldn't want to break stuff during a 4.x
| release. It's not as if people can't survive with the way it is today
| (people have survived for a long time). If it doesn't change tomorrow
| morning it's not like PHP will fall apart.
| How about changing this for PHP 5?
|
| Andi
|
| P.S. - Just a small suggestion. When people write essays in E-mails please
| see if they can't be shortened whilst still saying all you wanted to say.
| It sometimes takes a long time to read all of these threads :)
|
|
| --
| 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 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] References - good or bad

2001-12-28 Thread Brian Moon

Ok, there has been some discussion on the ZE2 list about returning
references from functions and it has gotten me looking at references in
general.  Phorum deals with some pretty large arrays and so far that has
made us faster than other BB's.  I want to keep it that way.

First, the question: When is it a good idea to use references for
performance reasons?

Now, some things I tried (PHP 4.0.6):

$arr=array();
$arr=array_pad($arr, 1, md5(microtime()));

function test($arr){
$newvar=$arr;
return $newvar;
}

$newvar=test($arr);

This code takes 2.6MB of ram to run. Changing the function to any of these:

function test(&$arr){
$newvar=$arr;
return $newvar;
}

function test(&$arr){
$newvar=&$arr;
return $newvar;
}

function test($arr){
$newvar=&$arr;
return $newvar;
}

it now takes 4.4MB to run. That is not what I expected.

Now, this function:

function test($arr){
foreach($arr as $key => $var){
$newvar[$key]=$var;
}
return $newvar;
}

takes 4.4MB also.  I would expect that.  However, changing it to:

function test($arr){
foreach($arr as $key => $var){
$newvar[$key]=&$arr[$key];
}
return $newvar;
}

It now takes 6.8MB of ram.

Last, this code:

$arr=array();
$arr=array_pad($arr, 1, md5(microtime()));

$arr2=$arr;

uses 2.6MB where:

$arr=array();
$arr=array_pad($arr, 1, md5(microtime()));

$arr2=&$arr;

uses 3.5MB.


So, my conclusion is that references are bad in all cases on memory and
should only be used when you have to know you are using the same exact data
in two places, or a variable needs to be modified by a function.  If this is
the case, shouldn't this be documented?

Am I missing something?

Brian Moon
--
dealnews.com, Inc.
Makers of dealnews & dealmac
http://dealnews.com/ | http://dealmac.com/



-- 
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] Zdnet Article

2001-05-17 Thread Brian Moon

That may be the worst done article I have ever read.  I could rewrite every
paragraph and turn it on ASP or Perl or any language.  He obviously did not
put much effort into it.

My Take:

"The Unix version of ASP, unfortunately, cannot be taken seriously as it
does not exist except in a very expensive form from ChiliSoft.  We scanned
the web for comments on IIS and commonly found that there are built in back
doors that allow everyone in the world to see your code.

"ASP uses some sort of home rolled database abstraction layer that limits
the use of key features of most databases and turns them all into simplified
useless tools."

Brian Moon
--
dealnews.com, Inc.
Makers of dealnews, dealmac
http://dealnews.com/ | http://dealmac.com/


- Original Message -
From: "Emmanuel FAIVRE" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, May 17, 2001 5:22 PM
Subject: [PHP-DEV] Zdnet Article


> http://www.zdnet.com/products/stories/reviews/0,4161,2711724,00.html
>
> no word to comment that !
>
> just see a adbanner for ColdFusion on the same page !
>
> Manu
>
>
>
> --
> 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]
>
>
>


-- 
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] Register_Shutdown_Function happens before shutdown

2001-06-19 Thread Brian Moon

PHP lives inside the connection and content delivery area of Apache.
Therefore, all code is parsed while the connection is open.  You must have
some bad HTML design however if you can not see your page until after all
that is done.

Brian Moon
--
dealnews.com, Inc.
Makers of dealnews, dealmac
http://dealnews.com/ | http://dealmac.com/


- Original Message -
From: "Brian Tanner" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, June 18, 2001 8:15 PM
Subject: [PHP-DEV] Register_Shutdown_Function happens before shutdown


> In theory (at least IMHO), this function should be used to register
> functions to finish up after the client has detached from the server.
>
> This way, time consuming tasks like logging, closing connections, sending
> e-mail, or whatever can be done *after* the client is happily surfing to
> their next page.
>
> However, I have tested Register_Shutdown_Function as much as I can
locally,
> and no matter what I try... I have to wait until my shutdown functions are
> done before I see the page, get redirected, or whatever.
>
> This is bug or a feature?  Or am I a dummy?
>
> -Brian Tanner
>
>
> --
> 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]
>
>
>


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




[PHP-DEV] Command line option for shell scripting

2001-06-20 Thread Brian Moon

Hi guys,

I would like to create a command line option that would do the following:

assume -q
ignore error_prepend_string and error_append_string
set html_errors off
turn off output buffering if it is set in ini file.


I use those ini settings in the apache module but don't need them in the
binary running cron jobs.  Having two ini files is a pain.  If I could get
just one command line option that would do all of that it would rock.

I would be willing to do the work, although, last time I tried to submit a
change (a bug fix) I was told I do not have karma.  Did something change
with the premissions or was that just part of the temporary server setup?

I have tried playing with zend_alter_ini_entry() but it seems to have a
queer reaction to passing "" as the value.  It does not set the value of the
setting to "".  Instead it continues to use what is in the INI file.  There
does not appear to be a simple function to unregister a ini setting.  I need
to have an ini_entry struct and a module number to do that.  Any pointers on
that?

Thanks,

Brian Moon
--
dealnews.com, Inc.
Makers of dealnews & dealmac
http://dealnews.com/ | http://dealmac.com/




-- 
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] List messages are being delayed?

2001-06-20 Thread Brian Moon

The hard part is finding someone who is willing to do it and does not want a
lot of advertising in return.

Good Luck.

BTW, what kind of machine does it take to turn the list out?  I know you
were on a dual CPU box with Gig of ram at VA.

Brian Moon
--
dealnews.com, Inc.
Makers of dealnews & dealmac
http://dealnews.com/ | http://dealmac.com/


- Original Message -
From: "Rasmus Lerdorf" <[EMAIL PROTECTED]>
To: "Daniel Beckham" <[EMAIL PROTECTED]>
Cc: "Bug Database" <[EMAIL PROTECTED]>
Sent: Wednesday, June 20, 2001 8:55 AM
Subject: Re: [PHP-DEV] List messages are being delayed?


> > From what I can tell, you are hosting this on your own connection at
> > home/work?  Is there no one in the community that is willing to host the
> > server for you guys?
>
> It is on my home DSL connection.  And yes, there are people willing, but
> we are somewhat picky about the terms of such hosting.  We basically want
> a server to ourselves with full root access, but we also want someone we
> can call who will get the server back up and running quickly if something
> happens.  And we want to host it somewhere that will still be around in 6
> months.
>
> -Rasmus
>
>
> --
> 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]
>
>
>


-- 
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] Command line option for shell scripting [ And some interactive mode issues]

2001-06-21 Thread Brian Moon

Looks like we just need to call:

zend_unset_timeout();
zend_set_timeout(0);

in sapi/cgi/cgi_main.c.

I will put this in the patch I send in.  This is a good idea.

Brian Moon
--
dealnews.com, Inc.
Makers of dealnews & dealmac
http://dealnews.com/ | http://dealmac.com/


- Original Message -
From: "James Moore" <[EMAIL PROTECTED]>
To: "'Brian Moon'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, June 20, 2001 5:00 PM
Subject: RE: [PHP-DEV] Command line option for shell scripting [ And some
interactive mode issues]


>
> Something along this line which I wanted to do was to turn the time out
> off for interactive mode as at the moment it times out after 30secs,
> anyone got any objections if I make that change??
>
> - James
>
>
>


-- 
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] Command line option for shell scripting [ And some interactive mode issues]

2001-06-21 Thread Brian Moon

output_buffering also needs to be turned off in interactive mode.  I will
add that as well.

Brian Moon
--
dealnews.com, Inc.
Makers of dealnews & dealmac
http://dealnews.com/ | http://dealmac.com/


- Original Message -
From: "James Moore" <[EMAIL PROTECTED]>
To: "'Brian Moon'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, June 20, 2001 5:00 PM
Subject: RE: [PHP-DEV] Command line option for shell scripting [ And some
interactive mode issues]


>
> Something along this line which I wanted to do was to turn the time out
> off for interactive mode as at the moment it times out after 30secs,
> anyone got any objections if I make that change??
>
> - James
>
>
>


-- 
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] Bug #8889 Updated: Memory is not being freed.

2001-06-22 Thread Brian Moon

Andi's statement is correct.  I believed that but felt something else was
wrong.  Andi gave me the benefit of the doubt (yeah Andi!) and took a close
look at the code.

I asked him what he changed and he said:

"The memory manager did some memory block caching which was causing very bad
fragmentation. I fixed it so that it'll minimize memory fragmentation in
between requests."

So, good for PHP!

Brian Moon
--
dealnews.com, Inc.
Makers of dealnews & dealmac
http://dealnews.com/ | http://dealmac.com/


- Original Message -
From: "Brian Foddy" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Friday, June 22, 2001 8:20 AM
Subject: Re: [PHP-DEV] Bug #8889 Updated: Memory is not being freed.


> Not that I believed anything serious was wrong, but can you tell
> me specifically what was "fixed".  Is there any change in Andi's
> statement (which is always what I've understood)?
>
> Brian
>
> [EMAIL PROTECTED] wrote:
> >
> > ID: 8889
> > Updated by: brianlmoon
> > Reported By: [EMAIL PROTECTED]
> > Status: Closed
> > Bug Type: Performance problem
> > Operating system:
> > PHP Version: 4.0.4
> > Assigned To:
> > Comments:
> >
> > This is all fixed in 4.0.6.
> >
> > Previous Comments:
>
> --
-
> >
> > [2001-05-01 03:01:29] [EMAIL PROTECTED]
> > The main problem is that once the system's standard C library allocates
heap space (with the sbrk() system call) it will never return that memory to
the system.
> > PHP can't solve this problem. If you do find certain things in the
future which take up much more memory than they should please open a new bug
report and we will check into it.
> >
>
> --
-
> >
> > [2001-04-30 14:31:27] [EMAIL PROTECTED]
> > I am talking about nearly endless amounts.  I saw Apache processes with
as much as 14MB of memory in use.
> >
> > Brian.
> >
>
> --
-
> >
> > [2001-04-29 19:59:56] [EMAIL PROTECTED]
> > What kind of sizes are we talking about here?  the Zend memory manager
holds a memory cache, but we're talking at around 1MB per process max.
> >
>
> --
-
> >
> > [2001-01-26 18:45:45] [EMAIL PROTECTED]
> > Ok, this is just like what is described in
http://marc.theaimsgroup.com/?l=php-dev&m=97923602322593&w=2 which contains
a hacked up solution.  It looks like it should be able to turn into a usable
end solution.
> >
>
> --
-
> >
> > [2001-01-24 13:21:13] [EMAIL PROTECTED]
> > Hi guys,
> >
> > I do not have much information.  I know that my Apache processes memory
is growing by the minute.  If I start a separate server on another port and
serve only static pages and files through it, those process do not grow.
> >
> > I have tried what I remembered of gdb but have not come up with
anything.  I know I need to attach to a process and it seems I can `gdb
{pid}` but that gives me nothing.  How can I get some info for you guys?  I
do have --enable-debug.
> >
> > thanks,
> >
> > Brian.
> > Phorum.org
> >
>
> --
-
> >
> > The remainder of the comments for this report are too long.  To view the
rest of the comments, please view the bug report online.
> >
> > ATTENTION! Do NOT reply to this email!
> > To reply, use the web interface found at
http://bugs.php.net/?id=8889&edit=2
> >
> > --
> > 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]
>
>


-- 
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] [emile@iris-advies.com: Re: [PHP-DEV] Adding URI Translation Handlers]

2001-06-22 Thread Brian Moon

Isn't this what mod_rewrite is for?

Also, what we do is have urls like:

http://dealnews.com/articles/23930.html

We use a force type on the feil articles to make it get parsed as PHP.  We
then read $PATH_INFO in which is /23930.html to set up our vars.

You could have:

http://florists.ftd.com/florists/rosebowlfloral/

Although it makes for a longer URL, it does not require all the files you
talked about and does not require any C.

Brian Moon
--
dealnews.com, Inc.
Makers of dealnews & dealmac
http://dealnews.com/ | http://dealmac.com/


- Original Message -
From: "Stephen van Egmond" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, June 22, 2001 12:09 AM
Subject: [PHP-DEV] [[EMAIL PROTECTED]: Re: [PHP-DEV] Adding URI
Translation Handlers]


> Back when the mailing lists were down, I started a discussion about
> adding a feature to PHP to do URI translating.
>
> The brief definition of URI translation is that you get to rewrite URIs
> dynamically.  This is how you you would host, for instance, 10,000
> florist home pages:
>
> http://florists.ftd.com/rosebowlfloral/
> and http://florists.ftd.com/fiveflower/
>
> without having 10,000 directoriies under the server root.  In Apache,
> these would be rewritten to a directory containing the style of page
> the florist chose, with some extra apache notes to tell you which
> florist page had been visited.
>
> The question I wanted to raise was how to do this.  And although it
> looks like initially a simple task, it generalizes to a few other
> concepts which Apache + mod_perl has done wonders with.
>
> This was the most recent post on the topic, and I wondered if there
> were other thoughts out there?
>
> Failing that, I will probably pursue the approach of building this into
> the Apache SAPI and letting other web servers follow suit.
>
>
> - Forwarded message from Emiliano <[EMAIL PROTECTED]> -
>
> Date: Thu, 31 May 2001 09:34:00 +0200 (CEST)
> From: Emiliano <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> cc: [EMAIL PROTECTED]
> Subject: Re: [PHP-DEV] Adding URI Translation Handlers
>
> Stephen van Egmond wrote:
>
> > One thing which I am bumping into is the need to do URI rewriting, kind
> > of like what mod_perl does.
> >
> > I would like to implement this myself in mod_php, and I'm looking for
> > some advice on the implementation.  I considered the following:
> >
> > a) Allowing the automatically prepended file (see php's
> > auto_prepend_file config option) to change $ENV['REQUEST_URI'] before
> > the script is actually executed. This, intuitively, seems clean, but
> > would probably happen too late in the request process (it will have
> > already decided to call the error file).
>
> Yep. This would be executed in the response phase, but apache itself
> would have decided in the translation phase way before that not to
> handle the request.
>
> > b) adding a new config directive that... what?  defines a file to be
> > read which is supposed to define a function? Is eval'ed?
>
> The way I see it you have a couple of options:
>
> - Use mod_perl, mod_python, mod_tcl(I think) to script a translation
>   handler.
> - Write a translation handler in C (we do this with Midgard)
> - Extend mod_php4 to do what mod_perl et al do so you can write
>   handlers in PHP. Conceptually, this is not too hard, but will
>   definately be more work than the other two. You set up the zend
>   engine just like the response phase handler does, set a few relevant
>   variables before you start it (like $ENV['REQUEST_URI'] for example,
>   kick off the script (either be just executing the code, or calling a
>   function therein), then read the relevant variables after the script
>   exits and act on them. You'll be doing this in C.
>
> Emile
>
>
> - End forwarded message -
>
> --
>,,,
>   (. .)
> +--ooO-(_)-Ooo- -  -- - - -  -
> | The Annotated BeBook:  http://bang.dhs.org/be/bebook/
>
> --
> 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]
>
>
>


-- 
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] Adding URI Translation Handlers

2001-06-22 Thread Brian Moon

Now as for precompiled code, I am all for that.  We have lots of bit of code
that are run on every page and I know that it is possible to rework all this
somehow to not have to do that.

I am still not clear on your problem with the rewriting.  I don't see what
the number of files in the templates has to do with anything.

Can you elaborate more on that.  Maybe some examples of what the request
would be and how you would rewrite it and why.

Brian Moon
--
dealnews.com, Inc.
Makers of dealnews & dealmac
http://dealnews.com/ | http://dealmac.com/


- Original Message -
From: "Stephen van Egmond" <[EMAIL PROTECTED]>
To: "Brian Moon" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Friday, June 22, 2001 12:50 PM
Subject: Re: [PHP-DEV] Adding URI Translation Handlers


> Brian Moon ([EMAIL PROTECTED]) wrote:
> > Isn't this what mod_rewrite is for?
>
> mod_rewrite works only in a static sense.  You set up your rules, and
> fire up your Apache.  If your rules change (as they certainly will in
> the case of 10,000 florists), you have to rewrite the rules file and
> restart apache.
>
> > http://florists.ftd.com/florists/rosebowlfloral/
>
> It also doesn't address the issue of the various files which will be
> there. Path_info will work with one file, in the case of articles.
>
> But if each (in this case) florist has a series of files in their
> templates (product detail pages, personal accounts, ordering pages,
> etc) you're out of luck.
>
> The example is real; I was the lead developer for florists.ftd.com for
> most of last year.
>
> The point I'm making is that I would like to improve the Apache SAPI
> code for PHP to support more of the Apache server's features, like the
> request rewriting step, tear-up/tear-down, and even precompiling code
> when the server forks so that it doesn't need to be recomputed on every
> hit.
>
> Are there other people interested in this that would like to get a
> hacking crew together?
>
>
>


-- 
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] Memory limit is used for all scripts instead of one?

2001-06-28 Thread Brian Moon

What version of PHP are you using?  There were some changes in 4.0.6 that
may change your results.

Brian Moon
--
dealnews.com, Inc.
Makers of dealnews, dealmac
http://dealnews.com/ | http://dealmac.com/


- Original Message -
From: "Swift" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, June 27, 2001 9:52 AM
Subject: [PHP-DEV] Memory limit is used for all scripts instead of one?


> Warning: Could not execute mail delivery program in
> /local/Web/sites/phpweb/bugs.php on line 419
> Mail not sent!
> Please send this page in a mail to [EMAIL PROTECTED] manually.
>
> --

>
> Hi there!
>
> As far as I understand, the option "memory_limit" sets the mem-limit for
>
> ONE script.
> I installed PHP as a Apache module and I set the memory_limit to 16M
> (via php.ini).
>
> When I allocate 8M of memory, all works fine. But when two different
> scripts each allocate 8M, I will get sometimes the following message:
> Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to
> allocate 4194304 bytes) in /usr/local/httpd/htdocs/testxx.php on line 6
>
> Both scripts (testx.php and testxx.php) contain the following code:
> 
>   $str = "x";
>   for($i=0; $i<23; $i++)
>   {
> $str .= $str;
> echo strlen($str) . "";
>   }
> ?>
>
> First, 1 byte will be allocated, then 2, then 4 and so on. The last
> allocated string has a size of 8M.
> It's a little difficult to reproduce the problem because I have to call
> both scripts exactly at the same time from my browser. But, as I said,
> sometimes I get the described error-message.
>
> My question is: Is this normal and memory_limit sets the limit for ALL
> scripts that are currently running or is this a bug?
>
> Thanks in advance!
>
>  ... tobias wiersch from germany
>
>
>
> --
> 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]
>
>
>


-- 
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 Bug Type: Strings related ???

2001-06-29 Thread Brian Moon

You have magic_quotes_gpc turned on.  You will need to stripslashes anything
passed in as a GET var.

You can turn this off in php.ini or Apache conf files (including .htaccess).
See the configuration portion of the manual for instructions.

Brian Moon
--
dealnews.com, Inc.
Makers of dealnews & dealmac
http://dealnews.com/ | http://dealmac.com/


- Original Message -
From: "Guido Laubner" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, June 27, 2001 12:39 PM
Subject: [PHP-DEV] PHP Bug Type: Strings related ???


>
> From: [EMAIL PROTECTED]
> Operating system: Solaris 8 / Intel
> PHP version: 4.0.4pl1
> PHP Bug Type: Strings related
> Bug description: Backslash parameter passing in Forms
>
> Here's instructions on how to reproduce :
>
> 1. Create a php-file with this content :
> 
> and call it whatever you want (eg. blah.php)
>
> 2. Next call the URL eg. http://server/blah.php?p=/
> 2a. Same with http://server/blah.php?p=%5c
> The apache access_log shows the very same url one typed into netscape or
> explorer, so this looks fine to me.
>
> 3. Look at the output page. It'll show 2 (in words : two) backslashes
> Why is this ? How do i pass just one backslash ?
>
> Thanks a lot
> Cheers
> Guido
>
> Sorry, the web page reported a bug in /local/Web/sites/phpweb/bugs.php on
> line 419
> and said : "Sorry, mail not sent!" and asked me to send this mail
manually.
> +=+
> | Guido Laubner   Phone : +49 6102 7786 618   |
> | Morse Computers Fax   : +49 6102 7786 666   |
> | Martin-Behaim-Strasse 19-21 Email : [EMAIL PROTECTED] |
> | 63263 Neu-Isenburg  WEB   : http://www.morse.com|
> +=+
>
>
>
> --
> 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]
>
>
>


-- 
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] switch, equality and preg_match

2001-07-01 Thread Brian Moon

Here is your culprit:

 RETVAL_LONG(matched);

The declaration in the docs says the function returns an int.  However, the
text of the doc says that the function returns True or False.

Changing your call to:

$match = (bool)preg_false(); /* prints alpha always */

gives you the results you want.

Andrei, you are listed as the author on this file.  What needs to change?
The return type?  That would make the most sense to me.

Brian Moon
--
dealnews.com, Inc.
Makers of dealnews, dealmac
http://dealnews.com/ | http://dealmac.com/


- Original Message -
From: "chrism" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, June 30, 2001 7:02 PM
Subject: [PHP-DEV] switch, equality and preg_match


> I encountered a problem where the result of a preg_match was FALSE.
> This was fed into a switch statement - and I believe PHP executed the
> the wrong case section.
>
> I've tracked this down to preg_match not really returning FALSE
> combined with SWITCH executing the first case statement always on either
> a numeric 0 or BOOLEAN TRUE.
>
> As a consequence of auto type conversion, you can't mix
> STRING/NUMERIC/BOOLEAN within a switch.  And with the preg_match issue,
> you can't assume all input into your switch will be of one TYPE (BOOLEAN).
>
> Aside from changing functions to return real booleans
>
> 1. Should type conversion be turned off inside switch() ?
> 2. If 0 == FALSE then why 0 == "ANYTHING" ?
>
> Chris
>
> 
> /* auto type conversion is the root of my switch problem */
>
> if (0 == "ONE") echo "one\n"; /* TRUE */
> if (1 == "TWO") echo "two\n"; /* FALSE */
> if (TRUE == "THREE") echo "three\n"; /* TRUE */
> if (FALSE == "FOUR") echo "four\n"; /* FALSE */
>
> if (TRUE == 0) echo "hopefully not\n";
>
> function preg_false() {
> return(preg_match("/no/", "dXiuehXX"));
> }
>
> /* note the difference between FALSE and preg_false() */
>
> // $match = TRUE; /* prints alpha always */
> // $match = 0; /* prints alpha always */
> // $match = FALSE; /* prints gamma section */
> $match = preg_false(); /* prints alpha always */
>
> if(is_bool($match) == TRUE)  echo "match is boolean\n";
>
> switch($match) {
> case "ALPHA":
> echo "hmm.. alpha\n";
> break;
> case "BETA":
> echo "hmm.. beta\n";
> break;
> case 0:
> echo "hmm.. gamma\n";
> break;
> case TRUE:
> echo "hmm.. TRUE\n";
> break;
> case FALSE:
> echo "hmm.. FALSE\n";
> break;
> }
>
> ?>
>
> --
> 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]
>
>
>


-- 
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] switch, equality and preg_match

2001-07-01 Thread Brian Moon

It is not the switch's fault.  That is just the way variable's work in PHP.

If you need to know for sure about the type for this, you will need to do
this:

if($match==="ALPHA") {
echo "hmm.. alpha\n";
} elseif($match==="BETA") {
echo "hmm.. beta\n";
} elseif($match===0) {
echo "hmm.. gamma\n";
} elseif($match===TRUE) {
echo "hmm.. TRUE\n";
} elseif($match===FALSE) {
echo "hmm.. FALSE\n";
}


Brian Moon
--
dealnews.com, Inc.
Makers of dealnews, dealmac
http://dealnews.com/ | http://dealmac.com/


- Original Message -
From: "chrism" <[EMAIL PROTECTED]>
To: "Brian Moon" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Sunday, July 01, 2001 11:02 AM
Subject: Re: [PHP-DEV] switch, equality and preg_match


> I wasn't intending to throw blame at preg_match - My main concern is what
> switch is doing - executing the first CASE when the input is either 0 or
> TRUE.
>
> I don't think switch should execute the first CASE whenever a numeric 0 is
> fed into it.
>
> Even TRUE gives me problems.  And with 0 == FALSE, it all seems so messed
up.
>
> Chris
>
> >
> > Here is your culprit:
> >
> >  RETVAL_LONG(matched);
> >
> > The declaration in the docs says the function returns an int.  However,
the
> > text of the doc says that the function returns True or False.
> >
> > Changing your call to:
> >
> > $match = (bool)preg_false(); /* prints alpha always */
> >
> > gives you the results you want.
> >
> > Andrei, you are listed as the author on this file.  What needs to
change?
> > The return type?  That would make the most sense to me.
> >
> > Brian Moon
> > --
> > dealnews.com, Inc.
> > Makers of dealnews, dealmac
> > http://dealnews.com/ | http://dealmac.com/
> >
> >
> > - Original Message -
> > From: "chrism" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Saturday, June 30, 2001 7:02 PM
> > Subject: [PHP-DEV] switch, equality and preg_match
> >
> >
> > > I encountered a problem where the result of a preg_match was FALSE.
> > > This was fed into a switch statement - and I believe PHP executed the
> > > the wrong case section.
> > >
> > > I've tracked this down to preg_match not really returning FALSE
> > > combined with SWITCH executing the first case statement always on
either
> > > a numeric 0 or BOOLEAN TRUE.
> > >
> > > As a consequence of auto type conversion, you can't mix
> > > STRING/NUMERIC/BOOLEAN within a switch.  And with the preg_match
issue,
> > > you can't assume all input into your switch will be of one TYPE
(BOOLEAN).
> > >
> > > Aside from changing functions to return real booleans
> > >
> > > 1. Should type conversion be turned off inside switch() ?
> > > 2. If 0 == FALSE then why 0 == "ANYTHING" ?
> > >
> > > Chris
> > >
> > >  > >
> > > /* auto type conversion is the root of my switch problem */
> > >
> > > if (0 == "ONE") echo "one\n"; /* TRUE */
> > > if (1 == "TWO") echo "two\n"; /* FALSE */
> > > if (TRUE == "THREE") echo "three\n"; /* TRUE */
> > > if (FALSE == "FOUR") echo "four\n"; /* FALSE */
> > >
> > > if (TRUE == 0) echo "hopefully not\n";
> > >
> > > function preg_false() {
> > > return(preg_match("/no/", "dXiuehXX"));
> > > }
> > >
> > > /* note the difference between FALSE and preg_false() */
> > >
> > > // $match = TRUE; /* prints alpha always */
> > > // $match = 0; /* prints alpha always */
> > > // $match = FALSE; /* prints gamma section */
> > > $match = preg_false(); /* prints alpha always */
> > >
> > > if(is_bool($match) == TRUE)  echo "match is boolean\n";
> > >
> > > switch($match) {
> > > case "ALPHA":
> > > echo "hmm.. alpha\n";
> > > break;
> > > case "BETA":
> > > echo "hmm.. beta\n";
> > > break;
> > > case 0:
> > > echo "hmm.. gamma\n";
> > > break;
> > > case TRUE:
> > > echo "hmm.. TRUE\n";
> > > break;
> > > case FALSE:
> > > echo "hmm.. FALSE\n";
> > > break;
> > > }
> > >
> > > ?>
> > >
> > > --
> > > 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]
> > >
> > >
> > >
> >
> >
>
>
>


-- 
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] switch, equality and preg_match

2001-07-02 Thread Brian Moon

IMO, I like preg_match to return a bool and preg_match_all return a count.
But that is me.  It may be thought of as inconsistent to some.  I just see
the functions has having a different purpose.

Brian Moon
--
dealnews.com, Inc.
Makers of dealnews & dealmac
http://dealnews.com/ | http://dealmac.com/


- Original Message -
From: "Andrei Zmievski" <[EMAIL PROTECTED]>
To: "Daniel Beckham" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Monday, July 02, 2001 3:47 PM
Subject: Re: [PHP-DEV] switch, equality and preg_match


> On Sun, 01 Jul 2001, Andrei Zmievski wrote:
> > At 09:06 AM 7/1/01 -0500, Daniel Beckham wrote:
> > >Someone poke me when you decide what to do and I'll change the return
type
> > >in the preg_match docs.
> >
> > I need to take a closer look at the code to see why it is that way.
>
> Okay, this is because both preg_match and preg_match_all use the same
> function internally, so the return type for both is an integer
> indicating the number of matches. Do you really think it should be
> changed?
>
> -Andrei
>
> "Tomorrow the sun will rise. And who knows what the tide will bring?"
> - Tom Hanks, in "Cast Away"
>
> --
> 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]
>
>
>


-- 
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] switch, equality and preg_match

2001-07-03 Thread Brian Moon

If you look back to the original problem, switch was matching the 0 returned
from preg_match to a string.  However, if the return value is a boolean it
would not match 0 to a string.  However, I guess it would then match the
true to a string.

Brian Moon
--
dealnews.com, Inc.
Makers of dealnews & dealmac
http://dealnews.com/ | http://dealmac.com/


- Original Message -
From: "Jon Parise" <[EMAIL PROTECTED]>
To: "Brian Moon" <[EMAIL PROTECTED]>
Cc: "Andrei Zmievski" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Monday, July 02, 2001 7:21 PM
Subject: Re: [PHP-DEV] switch, equality and preg_match


> On Mon, Jul 02, 2001 at 05:01:43PM -0500, Brian Moon wrote:
>
> > IMO, I like preg_match to return a bool and preg_match_all return a
count.
> > But that is me.  It may be thought of as inconsistent to some.  I just
see
> > the functions has having a different purpose.
>
> That would make sense.  preg_match_all() would return 1 if only
> one match is found, so there's no need for preg_match() to return
> the number of matches.
>
> However, even if preg_match() were to return a one or zero, it
> would still function the same in boolean evaluations.  That makes
> the whole thing simply a matter of "correctness".  Returning an
> 'int' would be more consistent but returning a boolean would be
> specific.
>
> --
> Jon Parise ([EMAIL PROTECTED])  .  Rochester Inst. of Technology
> http://www.csh.rit.edu/~jon/  :  Computer Science House Member
>
>


-- 
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.1 or php 5.0

2001-07-04 Thread Brian Moon

FWIW, I am +1 on PHP5.  There are a lot of things in the language that need
to be cleaned up.  People here more familiar with other closed languages
have gotten confused about things like case, underscores, haystack and
needle, the way some array functions return an array and some modify the
passed array.  There is just a lot of stuff like that.

Brian Moon
--
dealnews.com, Inc.
Makers of dealnews, dealmac
http://dealnews.com/ | http://dealmac.com/


- Original Message -
From: "Phil Driscoll" <[EMAIL PROTECTED]>
To: "php developers" <[EMAIL PROTECTED]>
Sent: Wednesday, July 04, 2001 6:21 AM
Subject: [PHP-DEV] php 4.1 or php 5.0


> When I posted the other day about tidying up the language, I was hoping to
> get some kind of feel as to whether the new Zend engine would cause us to
> move to PHP 4.1 or to 5.0, since a move to 4.1 would allow us less
> opportunity to have a clean up than 5.0. (But moving to 4.1 would give us
> more time to think things through and get things done)
>
> Does anyone have a view?
> --
> Phil Driscoll
>
> --
> 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]
>
>
>


-- 
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.1 or php 5.0

2001-07-09 Thread Brian Moon

Well, I think to start with someone or multiple people need to take a look
at the PHP code and figure out just exactly what we want to do to it.  I can
help out.  I am pretty sure that Daniel Beckham will as well.  As far as I
know, we want to:

1. convert all function names to a standard naming convention.
2. convert all function params to a standard order.
3. get rid of old aliased functions.
4. Make sure all return codes are consistent.  Some are 1 or 0 some are true
or false.

What else is there?  I am sure there is more.

Brian Moon
--
dealnews.com, Inc.
Makers of dealnews, dealmac
http://dealnews.com/ | http://dealmac.com/


- Original Message -
From: "Andi Gutmans" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; "Brian Moon" <[EMAIL PROTECTED]>; "php
developers" <[EMAIL PROTECTED]>
Sent: Thursday, July 05, 2001 4:53 PM
Subject: Re: [PHP-DEV] php 4.1 or php 5.0


> I think both for Zend 2 and for the cleanup version of PHP (if they happen
> at the same time or not) it is important to come up with how to do the
> development. We can either work in a branch or create a new CVS tree.
> They both have their pros & cons, but especially for the PHP CVS which is
a
> moving target it's going to be hard to make a cleanup and keep the patches
> in sync with the "being cleaned" version. It'll be easier for Zend because
> it is very stable and doesn't change very much.
> Any ideas?
>
> Andi
>
> At 05:27 PM 7/4/2001 +0100, Phil Driscoll wrote:
> >On Wednesday 04 July 2001 17:12, Brian Moon wrote:
> > > FWIW, I am +1 on PHP5.  There are a lot of things in the language that
need
> > > to be cleaned up.  People here more familiar with other closed
languages
> > > have gotten confused about things like case, underscores, haystack and
> > > needle, the way some array functions return an array and some modify
the
> > > passed array.  There is just a lot of stuff like that.
> >
> >
> >I'm all for making the radical changes at 5.0, its just that it seems
like
> >Zeev is keen on a shortish timeframe for the new engine, whereas I
suspect
> >that tidying up the language will take quite a bit longer.
> >
> >FWIW my vote is for us to make a concerted start on tidying the language
with
> >a realistic time frame of  1 year. If the new Zend engine is going
to
> >be ready much sooner than that, and it will only affect OO stuff and the
> >business of accessing individual characters in strings, then that change
> >should be to 4.1. If the engine is going to take a year, then we'll have
a
> >big pile of stuff to launch as 5.0
> >
> >Cheers
> >--
> >Phil Driscoll
> >
> >--
> >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]
>
>
>


-- 
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] Possible feature for current version of PHP or PHP 4.1/5.0.

2001-07-09 Thread Brian Moon

That is not completely true.  If there is a file in the included scripts dir
that has the same name as one in the including scripts dir, that would cause
some unexpected problems.

I still like the idea.

Brian Moon
--
dealnews.com, Inc.
Makers of dealnews & dealmac
http://dealnews.com/ | http://dealmac.com/


- Original Message -
From: "Andi Gutmans" <[EMAIL PROTECTED]>
To: "Vlad Krupin" <[EMAIL PROTECTED]>; "Zeev Suraski" <[EMAIL PROTECTED]>
Cc: "Andrei Zmievski" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Monday, July 09, 2001 2:46 PM
Subject: Re: [PHP-DEV] Possible feature for current version of PHP or PHP
4.1/5.0.


> At 12:03 PM 7/9/2001 -0700, Vlad Krupin wrote:
> >Is it better to break things once or twice? Ok, not completely break, but
> >now I have some code working with PHP4, later I will have some code that
> >will work with PHP4.1, and finally I will re-write it to work with the
> >latest-and-best PHP5. It is more like saying "Here is my script, you can
> >run it with this version of PHP *only*, if you want to run it with
another
> >one, I have another version of the script for you".
> >
> >On a sidenote, could we just create a different include (e.g.
> >include_relative, like there is include_once) that will incorporate the
> >desired functionality, and not touch include() at all? Or am I
suggestiong
> >yet another bloat? Or am I missing the point here? Or did we all agree
> >that the current include() operation is so buggy that it warrants a
change
> >breaking compatibility and soon?
> >
> >I do not think that going to 5.0 warrants letting the hell break loose
and
> >break everything, I would still like to be able to run at least some of
my
> >php4 scripts once php5 comes out, and I have lots of very elaborate
> >solutions to work around the current problems with include(). Such a
> >change will not break my code, but I can easily see what code that *will*
> >break, and I think there will be a lot of it.
>
> What do you think about the solution I suggested? If the file can't be
> found to then look in the current scripts directory. It solves the
problems
> and doesn't break BC.
>
> Andi
>
>
> --
> 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]
>
>
>


-- 
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] Possible feature for current version of PHP or PHP 4.1/5.0.

2001-07-09 Thread Brian Moon

It is not so much BC.  It is more like unexpected new behavior.

As of now, a bad programmer might have this:

/www/site.com/include/file.php
/www/site.com/include/config.php

/www/site.com/index.php
/www/site.com/config.php

if index.php includes include/file.php which includes "config.php", the
config in the main dir gets included.

Now, in the future, if the main config.php is not there, the one in the
include file gets included.  Now, granted, this may not be the best case,
but it would cause some confusion if someone was not well aware of this
change.

I am still +1, but think it should be at least a 4.1 thing.

Brian Moon
--
dealnews.com, Inc.
Makers of dealnews & dealmac
http://dealnews.com/ | http://dealmac.com/


- Original Message -
From: "Andi Gutmans" <[EMAIL PROTECTED]>
To: "Brian Moon" <[EMAIL PROTECTED]>; "Vlad Krupin" <[EMAIL PROTECTED]>; "Zeev
Suraski" <[EMAIL PROTECTED]>
Cc: "Andrei Zmievski" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Monday, July 09, 2001 3:44 PM
Subject: Re: [PHP-DEV] Possible feature for current version of PHP or PHP
4.1/5.0.


> At 03:43 PM 7/9/2001 -0500, Brian Moon wrote:
> >That is not completely true.  If there is a file in the included scripts
dir
> >that has the same name as one in the including scripts dir, that would
cause
> >some unexpected problems.
>
> Well as I would only resort to looking according to the current file if
all
> other things fail (cwd and include_path) I can't see how it would break
BC.
>
>
> >I still like the idea.
>
> Thanks :)
>
> Andi
>
>
>


-- 
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] Possible feature for current version of PHP or PHP 4.1/5.0.

2001-07-09 Thread Brian Moon

I am -1 on yet another new function.  Because, if you create a new
include_local or whatever, people are gonna want include_local_once and so
on and so forth.

I am alos -1 on making it an option.  Do you know what a headache it is to
try and write and app like Phorum and mess with a million different server
setups.

Brian Moon
--
dealnews.com, Inc.
Makers of dealnews & dealmac
http://dealnews.com/ | http://dealmac.com/


- Original Message -
From: "Vlad Krupin" <[EMAIL PROTECTED]>
To: "Brian Moon" <[EMAIL PROTECTED]>
Cc: "Zeev Suraski" <[EMAIL PROTECTED]>; "Andi Gutmans" <[EMAIL PROTECTED]>; "Andrei
Zmievski" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Monday, July 09, 2001 4:49 PM
Subject: Re: [PHP-DEV] Possible feature for current version of PHP or PHP
4.1/5.0.


> Andi, I definitely do like your approachl. I do not like that different
> versions of PHP will behave differently. That's what I was talking
> about. And it is a situation similar to what Brian described that
> prompted me to write to the list and see if we can come up with one
> solution which will stay, whether in version 4.1, or 5, or 5.5.
>
> I know that I have myriads of includes with a pretty extensive directory
> structure, and some scripts are having the same names. I have run into
> problems including the wrong file by mistake. I do not want to make that
> mistake easier to make. That's why I asked if it makes sense to leave
> include() as it is, and create another function/construct that will
> behave as described, and asked if that would be too much of a bloat. I
> can not judge that myself, for I do not know enough. If it is, discard
> that idea, but could we please implement something that will not change
> between verision 4.1 and 5 and hopefully later?
>
> Sorry, couldn't reply earlier - I was following up on the heated
> discussions here...
>
> Vlad
>
>
> Brian Moon wrote:
>
> >It is not so much BC.  It is more like unexpected new behavior.
> >
> >As of now, a bad programmer might have this:
> >
> >/www/site.com/include/file.php
> >/www/site.com/include/config.php
> >
> >/www/site.com/index.php
> >/www/site.com/config.php
> >
> >if index.php includes include/file.php which includes "config.php", the
> >config in the main dir gets included.
> >
> >Now, in the future, if the main config.php is not there, the one in the
> >include file gets included.  Now, granted, this may not be the best case,
> >but it would cause some confusion if someone was not well aware of this
> >change.
> >
> >I am still +1, but think it should be at least a 4.1 thing.
> >
> >Brian Moon
> >--
> >dealnews.com, Inc.
> >Makers of dealnews & dealmac
> >http://dealnews.com/ | http://dealmac.com/
> >
> >
> >- Original Message -
> >From: "Andi Gutmans" <[EMAIL PROTECTED]>
> >To: "Brian Moon" <[EMAIL PROTECTED]>; "Vlad Krupin" <[EMAIL PROTECTED]>;
"Zeev
> >Suraski" <[EMAIL PROTECTED]>
> >Cc: "Andrei Zmievski" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> >Sent: Monday, July 09, 2001 3:44 PM
> >Subject: Re: [PHP-DEV] Possible feature for current version of PHP or PHP
> >4.1/5.0.
> >
> >
> >>At 03:43 PM 7/9/2001 -0500, Brian Moon wrote:
> >>
> >>>That is not completely true.  If there is a file in the included
scripts
> >>>
> >dir
> >
> >>>that has the same name as one in the including scripts dir, that would
> >>>
> >cause
> >
> >>>some unexpected problems.
> >>>
> >>Well as I would only resort to looking according to the current file if
> >>
> >all
> >
> >>other things fail (cwd and include_path) I can't see how it would break
> >>
> >BC.
> >
> >>
> >>>I still like the idea.
> >>>
> >>Thanks :)
> >>
> >>Andi
> >>
> >>
> >>
> >
>
>
>
>
> --
> 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]
>
>
>


-- 
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] shell programming

2001-07-20 Thread Brian Moon

Have a look at the $argv variable.

Brian Moon
--
dealnews.com, Inc.
Makers of dealnews, dealmac
http://dealnews.com/ | http://dealmac.com/


- Original Message - 
From: "void" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, July 20, 2001 4:19 AM
Subject: [PHP-DEV] shell programming


> I want to send more than 9 parms to a script ..
> it doesn't like the 10th parm  :(
> asume $1 = "blue"
> --- inside the script
> ...
> ...
> echo $5 >> $7/lineinfo;
> echo $8 >> $7/lineinfo;
> echo $9 >> $7/lineinfo;
> #the tenth parm
> echo $10 >> $7/lineinfo;
> #the above line outputs "blue0"
> echo "$10" >> $7/lineinfo;
> #the above line outputs "blue0" as well
> 
> How do i refer 2 the 10th parm passed to a shell script ?
> 
> any help would be apriciated,
> 
> thanx
> 
> Cape Town,
> South Africa
> 
> 
> 
> 
> 
> 
> 
> -- 
> 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]
> 
> 
> 


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




[PHP-DEV] GD 2.0.1 and FreeType 2

2001-04-12 Thread Brian Moon

Hi guys,

A) has anyone tried PHP and gd 2.0.1?

B) If I compile gd with FreeType 2 support, do I have to compile FreeType
into PHP?

Brian Moon
-
Phorum Dev Team - http://phorum.org
Making better forums with PHP
-

Look for my presentation at ApacheCon 2001.
"Caching Dynamic Web Content to Increase Dependability and Performance"
http://www.apachecon.com/





-- 
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] GD 2.0.1 and FreeType 2

2001-04-13 Thread Brian Moon

When compiling Apache I get:

modules/php4/libphp4.a(gd.o): In function `php_imagettftext_common':
/usr/src/apache/php4-200104131045/ext/gd/gd.c:2667: undefined reference to
`gdttf'

Brian Moon
Phorum Dev Team - Making better forums with PHP
http://phorum.org/
-

- Original Message -
From: "Wez Furlong" <[EMAIL PROTECTED]>
To: "Brian Moon" <[EMAIL PROTECTED]>
Sent: Friday, April 13, 2001 5:42 AM
Subject: Re: [PHP-DEV] GD 2.0.1 and FreeType 2


> Hi Brian,
>
> > A) has anyone tried PHP and gd 2.0.1?
> Yes - me.
>
> > B) If I compile gd with FreeType 2 support, do I have to compile
FreeType
> > into PHP?
> PHP needs to be linked to any and all libraries that are used by those
libraries that you use, if you get my meaning!
> If gd has a dependency on freetype, then anything that uses that gd
library will need to be linked to freetype as well.
>
> I've attached a patch that takes care of this and enables the true color
and alpha channel code, plus a handful of line style and image brush/tile
options that have so far been missing from PHP.
>
>
./configure --with-ttf=no --with-freetype-dir --with-png-dir --with-jpeg-dir
 --with-gd
>
> The --with-ttf=no is there to prevent linking against the libttf if it is
installed.
>
> Please let me know how you get on with this!
>
> --Wez.
>
>


-- 
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] GD 2.0.1 and FreeType 2

2001-04-13 Thread Brian Moon
r before `)'
gdttf.c:704: `bbox' undeclared (first use in this function)
gdttf.c:705: `advance' undeclared (first use in this function)
gdttf.c:708: `im' undeclared (first use in this function)
gdttf.c:712: `bitmapkey' undeclared (first use in this function)
gdttf.c:712: `x1' undeclared (first use in this function)
gdttf.c:713: invalid operands to binary &
gdttf.c:718: `x' undeclared (first use in this function)
gdttf.c:719: `y' undeclared (first use in this function)
gdttf.c:719: invalid operands to binary &
gdttf.c:720: `tweencolorkey' undeclared (first use in this function)
gdttf.c:748: `tweencolor' undeclared (first use in this function)
gdttf.c: In function `gdttf':
gdttf.c:764: `TT_F26Dot6' undeclared (first use in this function)
gdttf.c:764: parse error before `ur_x'
gdttf.c:766: `TT_BBox' undeclared (first use in this function)
gdttf.c:766: `bbox' undeclared (first use in this function)
gdttf.c:766: warning: statement with no effect
gdttf.c:767: parse error before `double'
gdttf.c:769: `font' undeclared (first use in this function)
gdttf.c:769: warning: statement with no effect
gdttf.c:770: `fontkey_t' undeclared (first use in this function)
gdttf.c:770: parse error before `fontkey'
gdttf.c:777: `fontCache' undeclared (first use in this function)
gdttf.c:778: warning: implicit declaration of function `TT_Init_FreeType'
gdttf.c:778: `engine' undeclared (first use in this function)
gdttf.c:787: `fontkey' undeclared (first use in this function)
gdttf.c:791: parse error before `)'
gdttf.c:795: `sin_a' undeclared (first use in this function)
gdttf.c:796: `cos_a' undeclared (first use in this function)
gdttf.c:797: `advance_x' undeclared (first use in this function)
gdttf.c:797: `advance_y' undeclared (first use in this function)
gdttf.c:799: `next' undeclared (first use in this function)
gdttf.c:801: `ch' undeclared (first use in this function)
gdttf.c:817: `x1' undeclared (first use in this function)
gdttf.c:820: `error' undeclared (first use in this function)
gdttf.c:820: `advance' undeclared (first use in this function)
gdttf.c:823: `i' undeclared (first use in this function)
gdttf.c:824: `ll_x' undeclared (first use in this function)
gdttf.c:825: `ll_y' undeclared (first use in this function)
gdttf.c:826: `ur_x' undeclared (first use in this function)
gdttf.c:827: `ur_y' undeclared (first use in this function)
make[3]: *** [gdttf.lo] Error 1
make[3]: Leaving directory `/usr/src/apache/php4-200104131045/ext/gd'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/src/apache/php4-200104131045/ext/gd'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/apache/php4-200104131045/ext'
make: *** [all-recursive] Error 1

Brian Moon
Phorum Dev Team - Making better forums with PHP
http://phorum.org/
-

- Original Message -
From: "Wez Furlong" <[EMAIL PROTECTED]>
To: "Brian Moon" <[EMAIL PROTECTED]>
Sent: Friday, April 13, 2001 5:42 AM
Subject: Re: [PHP-DEV] GD 2.0.1 and FreeType 2


> Hi Brian,
>
> > A) has anyone tried PHP and gd 2.0.1?
> Yes - me.
>
> > B) If I compile gd with FreeType 2 support, do I have to compile
FreeType
> > into PHP?
> PHP needs to be linked to any and all libraries that are used by those
libraries that you use, if you get my meaning!
> If gd has a dependency on freetype, then anything that uses that gd
library will need to be linked to freetype as well.
>
> I've attached a patch that takes care of this and enables the true color
and alpha channel code, plus a handful of line style and image brush/tile
options that have so far been missing from PHP.
>
>
./configure --with-ttf=no --with-freetype-dir --with-png-dir --with-jpeg-dir
 --with-gd
>
> The --with-ttf=no is there to prevent linking against the libttf if it is
installed.
>
> Please let me know how you get on with this!
>
> --Wez.
>
>


-- 
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] GD 2.0.1 and FreeType 2

2001-04-17 Thread Brian Moon

Ok, I got latest CVS and tried again with:

./configure --with-apache=/usr/src/apache/apache_1.3.19 \
--with-gd \
--enable-gd-native-ttf \
--with-ttf=no \
--with-freetype-dir \
--with-png-dir=/usr/local \
--with-jpeg-dir=/usr/local \
--with-mysql=/usr \
--enable-debug --enable-track-vars=yes \
--with-zlib --with-bz2=/usr --disable-display-source \
--enable-sockets --with-imap

Everything compiles fine.  However, now I get this when calling
ImageTTFBBox:

Warning:  libgd was not built with TrueType font support

I simply installed gd and FreeType per their instructions with no problems.
Any ideas?

Brian Moon
Phorum Dev Team - Making better forums with PHP
http://phorum.org/
-

- Original Message -
From: "Wez Furlong" <[EMAIL PROTECTED]>
To: "Brian Moon" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Friday, April 13, 2001 7:26 PM
Subject: Re: [PHP-DEV] GD 2.0.1 and FreeType 2


On 2001-04-13 20:59:21, "Brian Moon" <[EMAIL PROTECTED]> wrote:
> Ok, first, I had to edit gdttf.c and change:
>
> #if HAVE_LIBTTF && !defined(USE_GD_IMGSTRTTF)
> to:
> #if (HAVE_LIBTTF|HAVE_FREETYPE) && !defined(USE_GD_IMGSTRTTF)

OK.  I was using "--enable-gd-native-ttf", so this didn't come up.

> Next I was getting complaints about not finding freetype.h.  I edited the
> configure script and fixed what I guess was a typo:
>
> FREETYPE2_INC_DIR="$i/include/freetype/freetype2"
> to
> FREETYPE2_INC_DIR="$i/include/freetype2/freetype"

Yes a typo, although I could have sworn I had written it the correct way
around.

> Then I started getting errors about freetype/config/ftheader.h not
existing.
> So, I hand edited config_vars.mk and added -I/usr/local/include/freetype2.
> It found the file fine then.
> Now I get massive parse errors.
> gdttf.c:74: parse error before `TT_Engine'
> [snip]

Ouch.  This is because gdttf.c assumes freetype 1.x.
A workaround is to use --enable-gd-native-ttf, but beware! the font size is
then measured in points whereas it was previously measured in pixels - the
fonts on your images will get bigger unless you adjust your PHP code.

I'm not sure what to do about this - the native GD routines look nicer
(fonts are smoother).  Is it worth the trouble of updating the PHP
equivalent for GD 2.0 and later?

For now, I have settled on the following behaviour:

./configure
"--with-jpeg-dir" \
"--with-png-dir" \
"--with-freetype-dir" \
"--with-gd"

If freetype2 is found, --with-ttf=no and --enable-gd-native-ttf are assumed.

This is going into CVS as we speak.

--Wez.




-- 
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] GD 2.0.1 and FreeType 2

2001-04-17 Thread Brian Moon

I found libgd.a from an old version just after sending this email.

So, all compiles and runs without error now.  I just don't get an image.

Have you actually produced an image with this?

Brian Moon
Phorum Dev Team - Making better forums with PHP
http://phorum.org/
-

- Original Message -
From: "Wez Furlong" <[EMAIL PROTECTED]>
To: "Brian Moon" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>; "Wez Furlong" <[EMAIL PROTECTED]>
Sent: Tuesday, April 17, 2001 11:48 AM
Subject: Re: [PHP-DEV] GD 2.0.1 and FreeType 2


> On 2001-04-17 15:47:09, "Brian Moon" <[EMAIL PROTECTED]> wrote:
> > Everything compiles fine.  However, now I get this when calling
> > ImageTTFBBox:
> >
> > Warning:  libgd was not built with TrueType font support
> >
> > I simply installed gd and FreeType per their instructions with no
problems.
> > Any ideas?
>
> That message comes from gd, but not from GD 2.0, so I would guess that PHP
linked to your old gd library.
>
> Try using --with-gd=/path/to/gd2
>
> where libgd.so lives in /path/to/gd2/lib, or alternatively, remove the
older gd library from your system (if it's a shared lib, make sure that
nothing else is dynamically linked to it first!).
>
> The sheer variety of places where gd gets installed makes it difficult to
pick a particular version if you have more than one installed :-/
>
> --Wez.
>
>


-- 
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 #8889 Updated: Memory is not being freed.

2001-04-30 Thread Brian Moon

The big problem is that the memory is never returned to the system.  The
Apache process holds on to it until it dies.

Brian Moon
-
Phorum Dev Team - http://phorum.org
Making better forums with PHP
-

Look for my presentation at ApacheCon 2001.
"Caching Dynamic Web Content to Increase Dependability and Performance"
http://www.apachecon.com/



- Original Message -
From: "Andi Gutmans" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Monday, April 30, 2001 1:45 PM
Subject: Re: [PHP-DEV] PHP 4.0 Bug #8889 Updated: Memory is not being freed.


> 14MB of memory in use isn't necessarily that much. Some of that memory
> might be in shared libraries (shared across the Apache processes). Are you
> doing any big SQL queries in those scripts?
> Do you have time to do some tests and let us know if things improve?
>
> Andi
>
> At 06:31 PM 4/30/2001 +, [EMAIL PROTECTED] wrote:
> >ID: 8889
> >User Update by: [EMAIL PROTECTED]
> >Status: Open
> >Bug Type: Performance problem
> >Description: Memory is not being freed.
> >
> >I am talking about nearly endless amounts.  I saw Apache processes with
as
> >much as 14MB of memory in use.
> >
> >Brian.
> >
> >Previous Comments:
>
>---
> >
> >[2001-04-29 19:59:56] [EMAIL PROTECTED]
> >What kind of sizes are we talking about here?  the Zend memory manager
> >holds a memory cache, but we're talking at around 1MB per process max.
> >
>
>---
> >
> >[2001-01-26 18:45:45] [EMAIL PROTECTED]
> >Ok, this is just like what is described in
> >http://marc.theaimsgroup.com/?l=php-dev&m=97923602322593&w=2 which
> >contains a hacked up solution.  It looks like it should be able to turn
> >into a usable end solution.
> >
>
>---
> >
> >[2001-01-24 13:21:13] [EMAIL PROTECTED]
> >Hi guys,
> >
> >I do not have much information.  I know that my Apache processes memory
is
> >growing by the minute.  If I start a separate server on another port and
> >serve only static pages and files through it, those process do not grow.
> >
> >I have tried what I remembered of gdb but have not come up with
> >anything.  I know I need to attach to a process and it seems I can `gdb
> >{pid}` but that gives me nothing.  How can I get some info for you
> >guys?  I do have --enable-debug.
> >
> >thanks,
> >
> >Brian.
> >Phorum.org
> >
>
>---
> >
> >
> >Full Bug description available at: http://bugs.php.net/?id=8889
> >
> >
> >--
> >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]
>
>


-- 
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 #8889 Updated: Memory is not being freed.

2001-04-30 Thread Brian Moon

This is the answer I had previously received.  IMHO, this sucks.  We don't
do SQL queries on our production site.  It is all cached.  So, SQL is not
the problem.  It is most likely because of the storage of large arrays or
something of that nature.

I guess we will continue to use MaxRequestsPerChild until one day the people
that wrote that memory allocation system get a clue.

Brian Moon
-
Phorum Dev Team - http://phorum.org
Making better forums with PHP
-

Look for my presentation at ApacheCon 2001.
"Caching Dynamic Web Content to Increase Dependability and Performance"
http://www.apachecon.com/



- Original Message -
From: "Andi Gutmans" <[EMAIL PROTECTED]>
To: "Brian Moon" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Monday, April 30, 2001 2:54 PM
Subject: Re: [PHP-DEV] PHP 4.0 Bug #8889 Updated: Memory is not being freed.


> Memory is never returned to the system with libc memory allocation.
> When you need memory it enlarges the address space it is using. Freeing
> memory won't make it shrink its address space.
> All I can suggest is to write your scripts in a way that if it deals with
> many SQL queries free a query before you do the next. This way the maximum
> size of your scripts memory space will hopefully be smaller.
>
> Andi
>
> At 02:37 PM 4/30/2001 -0500, Brian Moon wrote:
> >The big problem is that the memory is never returned to the system.  The
> >Apache process holds on to it until it dies.
> >
> >Brian Moon
> >-
> >Phorum Dev Team - http://phorum.org
> >Making better forums with PHP
> >-
> >
> >Look for my presentation at ApacheCon 2001.
> >"Caching Dynamic Web Content to Increase Dependability and Performance"
> >http://www.apachecon.com/
> >
> >
> >
> >- Original Message -
> >From: "Andi Gutmans" <[EMAIL PROTECTED]>
> >To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> >Sent: Monday, April 30, 2001 1:45 PM
> >Subject: Re: [PHP-DEV] PHP 4.0 Bug #8889 Updated: Memory is not being
freed.
> >
> >
> > > 14MB of memory in use isn't necessarily that much. Some of that memory
> > > might be in shared libraries (shared across the Apache processes). Are
you
> > > doing any big SQL queries in those scripts?
> > > Do you have time to do some tests and let us know if things improve?
> > >
> > > Andi
> > >
> > > At 06:31 PM 4/30/2001 +, [EMAIL PROTECTED] wrote:
> > > >ID: 8889
> > > >User Update by: [EMAIL PROTECTED]
> > > >Status: Open
> > > >Bug Type: Performance problem
> > > >Description: Memory is not being freed.
> > > >
> > > >I am talking about nearly endless amounts.  I saw Apache processes
with
> >as
> > > >much as 14MB of memory in use.
> > > >
> > > >Brian.
> > > >
> > > >Previous Comments:
> > >
> >
>---
> > > >
> > > >[2001-04-29 19:59:56] [EMAIL PROTECTED]
> > > >What kind of sizes are we talking about here?  the Zend memory
manager
> > > >holds a memory cache, but we're talking at around 1MB per process
max.
> > > >
> > >
> >
>---
> > > >
> > > >[2001-01-26 18:45:45] [EMAIL PROTECTED]
> > > >Ok, this is just like what is described in
> > > >http://marc.theaimsgroup.com/?l=php-dev&m=97923602322593&w=2 which
> > > >contains a hacked up solution.  It looks like it should be able to
turn
> > > >into a usable end solution.
> > > >
> > >
> >
>---
> > > >
> > > >[2001-01-24 13:21:13] [EMAIL PROTECTED]
> > > >Hi guys,
> > > >
> > > >I do not have much information.  I know that my Apache processes
memory
> >is
> > > >growing by the minute.  If I start a separate server on another port
and
> > > >serve only static pages and files through it, those process do not
grow.
> > > >
> > > >I have tried what I remembered of gdb but have not come up with
> > > >anything.  I kn

Re: [PHP-DEV] PHP 4.0 Bug #8889 Updated: Memory is not being freed.

2001-04-30 Thread Brian Moon

But the reverse side of this is that I might have one script out of 1000
that needs that much memory.  But since 20 of my httpd processes have run
that script, they all have that much memory and are not going to let it go
no matter what.

I basically sounds like a flaw that memory can not be freed.  Reuse in the
same process is not free memory, it is reused memory.  And it sounds like
there is nothing that the PHP team can do about it.

Brian Moon
-
Phorum Dev Team - http://phorum.org
Making better forums with PHP
-

Look for my presentation at ApacheCon 2001.
"Caching Dynamic Web Content to Increase Dependability and Performance"
http://www.apachecon.com/



- Original Message -
From: "Andi Gutmans" <[EMAIL PROTECTED]>
To: "Brian Moon" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Monday, April 30, 2001 5:02 PM
Subject: Re: [PHP-DEV] PHP 4.0 Bug #8889 Updated: Memory is not being freed.


> At 04:59 PM 4/30/2001 -0500, Brian Moon wrote:
> >This is the answer I had previously received.  IMHO, this sucks.  We
don't
> >do SQL queries on our production site.  It is all cached.  So, SQL is not
> >the problem.  It is most likely because of the storage of large arrays or
> >something of that nature.
>
> Well maybe you should try and see what in your script is taking up lots of
> memory.
>
>
> >I guess we will continue to use MaxRequestsPerChild until one day the
people
> >that wrote that memory allocation system get a clue.
>
> They are very clue full. A program which uses X MB of memory is very
likely
> to use X MB of memory again at a later time. For example, how does it help
> you if your 14 MB were shrunk back to 10 MB on each request. The next
> request would probably make it grow back to 14 MB.
> There might be some memory management libraries that shrink the memory
back
> but I doubt you can gain much from it especially as memory fragmentation
> can severally limit the amount of memory you can reclaim and because of
the
> point I made before, it's probably just not worth it.
>
> If you can find a case where you really think PHP is using much too much
> memory let me know and we can try and check together if there's a way to
> improve the situation.
> Andi
>
>


-- 
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] Bug #10598 Updated: Windows Protocol & ini file placement

2001-05-02 Thread Brian Moon

Looking at the API I think I can do this.  The only question I have is how
do I tell from inside the code whether or not PHP is a DLL or an EXE?  The
function call has to be made differently depending on that information.

Brian Moon
--
dealnews.com, Inc.
Makers of dealnews, dealmac
http://dealnews.com/ | http://dealmac.com/


- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, May 02, 2001 2:56 AM
Subject: [PHP-DEV] Bug #10598 Updated: Windows Protocol & ini file placement


> ID: 10598
> Updated by: brianlmoon
> Reported By: [EMAIL PROTECTED]
> Status: Open
> Bug Type: *Install and Config
> PHP Version: 4.0.5
> Assigned To:
> Comments:
>
> While I do agree with you that this is a pain, there is a possible
solution assuming that you can set environment variables on your machine.
Set PHPRC to the path where the php.ini file is.  Then PHP will look there
instead.
>
> Previous Comments:
> --
-
>
> [2001-05-02 03:17:12] [EMAIL PROTECTED]
> I've been running PHP with this:
>
http://www.php.net/do_download.php?download_file=php405-installer.exe&source
_site=www.php.net
>
> Basically, I have a problem with the placement of your php.ini. I would
have thought, hoped it would run from the php directory as well as the
windows directory. This is standard Windows protocol. A windows *.exe
"normally" prioritises looking in the app directory and then in the windows
directory for the location of *.ini files.
>
>  Your Msvcrt.dll was installed in my network drive: t:php and works like a
charm; so should the php.ini!.
>
> My at-work installation of windows is NT Server based and I don't have
permissions to access D:ntdir where NT was installed. I'm running a http
microweb out of a separate directory and hoped to make use of PHP at work. I
can't because I can't put the php in the windows directory. It won't work in
my network drive: t:phpphp.ini
> While my case may or may not be non-standard, your port to windows lack in
basic *.ini protocol. It "should" look in the app directory to see if the
ini exists there too!
>
> --
-
>
>
>
> ATTENTION! Do NOT reply to this email!
> To reply, use the web interface found at
http://bugs.php.net/?id=10598&edit=2
>
>
> --
> 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]
>
>
>


-- 
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] Integer casts broken or...?

2001-05-14 Thread Brian Moon

This is correct.  The type casting converts the string into its integer
value.  If there is a non-numeric character in the string, it stops at that
point.  So "09" is 9 and "09t" is 9 but "0t9" is 0.

Brian Moon
--
dealnews.com, Inc.
Makers of dealnews, dealmac
http://dealnews.com/ | http://dealmac.com/


- Original Message -
From: "Lars Torben Wilson" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, May 14, 2001 1:29 PM
Subject: [PHP-DEV] Integer casts broken or...?


>
> Type casting to int from string works only for decimal values--is this
> by design? Example:
>
> echo (int) '09' . ', ' . (int) '0x24';
>
> ...produces:
>
> 9, 0
>
> which seems intuitively wrong (I'd have expected 0, 36).
>
> Is this wrong, or should I just document it?
>
>
> Thanks,
>
> Torben
>
> --
>  Torben Wilson <[EMAIL PROTECTED]>
>  http://www.thebuttlesschaps.com
>  +1.604.709.0506
>
>
> --
> 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]
>
>
>


-- 
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] Integer casts broken or...?

2001-05-14 Thread Brian Moon

I know it would confuse me to have 0009 turned into an octal or hex if I
type cast it to (int).  When I think of (int), I only think of their
ultimate decimal value.  Perhaps there needs to be a new type cast ((hex)?
(oct)?) that will interpret variables in their hex or octal value.  I know
it is still a long integer in value, but it is a different representation of
that number.

As for why it was that way to begin with, I am not sure.  I could be that it
would be too confusing like you say or that type casting was introduced
before using hex or octal numbers was.

Brian Moon
--
dealnews.com, Inc.
Makers of dealnews, dealmac
http://dealnews.com/ | http://dealmac.com/


- Original Message -
From: "Lars Torben Wilson" <[EMAIL PROTECTED]>
To: "Brian Moon" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Monday, May 14, 2001 4:55 PM
Subject: Re: [PHP-DEV] Integer casts broken or...?


> Brian Moon writes:
> > This is correct.  The type casting converts the string into its integer
> > value.  If there is a non-numeric character in the string, it stops at
that
> > point.  So "09" is 9 and "09t" is 9 but "0t9" is 0.
> >
> > Brian Moon
>
> Yeah, I know--it winds up being a strtol() call. However, since PHP
> does interpret octal and hex integer literals, it seems odd that it
> won't interpret them when encapsulated in strings. This does look
> intentional though, since strtol() is called with a base of 10 in
> zend_operators.c (line 259 in cvs); replacing it with a base of 0
> gives the result I (personally) would have expected.
>
> So--is it intentional because it would screw some people up to have
> left-zero-padded string numbers interpreted as octals, or is there
> another deeper reason that using 0 as the base for strtol() is a bad
> idea, or is this unintentional?
>
>
> > - Original Message -
> > From: "Lars Torben Wilson" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Monday, May 14, 2001 1:29 PM
> > Subject: [PHP-DEV] Integer casts broken or...?
> >
> >
> > >
> > > Type casting to int from string works only for decimal values--is this
> > > by design? Example:
> > >
> > > echo (int) '09' . ', ' . (int) '0x24';
> > >
> > > ...produces:
> > >
> > > 9, 0
> > >
> > > which seems intuitively wrong (I'd have expected 0, 36).
> > >
> > > Is this wrong, or should I just document it?
> > >
> > >
> > > Thanks,
> > >
> > > Torben
> > >
> > > --
> > >  Torben Wilson <[EMAIL PROTECTED]>
> > >  http://www.thebuttlesschaps.com
> > >  +1.604.709.0506
> > >
> > >
> > > --
> > > 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]
> > >
> > >
> > >
> >
>
> --
>  Torben Wilson <[EMAIL PROTECTED]>
>  http://www.thebuttlesschaps.com
>  +1.604.709.0506
>
>
>


-- 
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] weird passthru() behavior

2001-05-14 Thread Brian Moon

I know that passthru only outputs what was sent to stdout and nothing else.
So, if XalanTransform is sending output to something other than stdout then
that might be it.

That is just my experience with passthru.

Brian Moon
--
dealnews.com, Inc.
Makers of dealnews, dealmac
http://dealnews.com/ | http://dealmac.com/


- Original Message -
From: "Michael Dickson" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, May 14, 2001 7:39 PM
Subject: [PHP-DEV] weird passthru() behavior


> I have a php script that looks like this:
>
>  passthru("sabcmd foo.xml foo.xsl");
> ?>
>
> It works fine.  But when I instead try:
>
>  passthru("XalanTransform foo.xml foo.xsl");
> ?>
>
> I get no output (no errors either, just nothing---if I add some html code
> around the php script then this html code comes out, but still nothing
from
> the passthru().)
>
> Some relevant facts:
>
> 1.  When run from the command line, "sabcmd foo.xml foo.xsl" and
> "XalanTransform foo.xml foo.xsl" return exactly the same thing to the
> terminal.
>
> 2.  sabcmd and XalanTransform are both C programs, and they both reside in
> /usr/bin.
>
>
> Any hints about what is going on here would be greatly appreciated!
>
>
> P.S.  In case you're wondering, sabcmd and Xalantransform are XSLT
engines.
> They translate foo.xml according to the rules in foo.xsl and send the
result
> to the terminal.
>
>
> --
> 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]
>
>
>


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




[PHP-DEV] Re: [PEAR-DEV] Comparison style

2001-05-14 Thread Brian Moon

There is another reason as well.

type casting is done right to left.  This will always ensure that the
variables type is compared to "", which will convert to 0 if $content is a
number.

Not sure if this was intentional or not, but it is true.

Brian Moon
--
dealnews.com, Inc.
Makers of dealnews, dealmac
http://dealnews.com/ | http://dealmac.com/


- Original Message -
From: "Jon Parise" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Monday, May 14, 2001 9:31 PM
Subject: [PEAR-DEV] Comparison style


> I was just perusing some of the PEAR code, and a certain
> condition caught my eye:
>
> if ("" == $content)
>
> My habit has always been to write that sort of condition using
> the style:
>
> if ($content == "")
>
> (leaving the unknown value on the left side of the comparison
> operator)
>
> Is one of these styles preferable to the other, either always or
> in certain instances?
>
> --
> Jon Parise ([EMAIL PROTECTED])  .  Rochester Inst. of Technology
> http://www.csh.rit.edu/~jon/  :  Computer Science House Member
>
> --
> PEAR Development Mailing List (http://pear.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
>


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




[PHP-DEV] removing ereg functions

2001-05-15 Thread Brian Moon

Is it possible to remove the ereg functions?  We have a strict policy to
only use preg as they are more reliable and faster.  So, I am not to happy
that PHP is bloated with these ereg functions.

Any thoughts?

Brian Moon
--
dealnews.com, Inc.
Makers of dealnews, dealmac
http://dealnews.com/ | http://dealmac.com/




-- 
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] removing ereg functions

2001-05-16 Thread Brian Moon

That is why I am asking.  Is there a core reason that the ereg functions
have to be there?  I could extend this to other functions as well of course.
But this set in particular I have wondered about.

Brian Moon
--
dealnews.com, Inc.
Makers of dealnews, dealmac
http://dealnews.com/ | http://dealmac.com/


- Original Message -
From: "Rasmus Lerdorf" <[EMAIL PROTECTED]>
To: "Brian Moon" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, May 16, 2001 2:19 AM
Subject: Re: [PHP-DEV] removing ereg functions


> > Is it possible to remove the ereg functions?  We have a strict policy to
> > only use preg as they are more reliable and faster.  So, I am not to
happy
> > that PHP is bloated with these ereg functions.
> >
> > Any thoughts?
>
> Uh, are you out of your mind?
>
> -Rasmus
>
>
>


-- 
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] removing ereg functions

2001-05-16 Thread Brian Moon

No, sorry, I think you misunderstood my question.  I would just like to see
a --disable-ereg option for configure.  I would never dream of removing ereg
from PHP as a supported function set.  It would break Phorum and lots of
stuff I have written.

I understand your reaction now Rasmus.  Sorry for the confusion.

Brian Moon
--
dealnews.com, Inc.
Makers of dealnews & dealmac
http://dealnews.com/ | http://dealmac.com/

- Original Message -
From: "Zeev Suraski" <[EMAIL PROTECTED]>
To: "Brian Moon" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, May 16, 2001 3:17 AM
Subject: Re: [PHP-DEV] removing ereg functions


> At 08:50 16/5/2001, Brian Moon wrote:
> >Is it possible to remove the ereg functions?  We have a strict policy to
> >only use preg as they are more reliable and faster.  So, I am not to
happy
> >that PHP is bloated with these ereg functions.
> >
> >Any thoughts?
>
> Wow, it's like a plague out there. :)
>
> No way.  ereg() has got to be used by millions of code lines around the
> world.  I don't see it being removed in this millennium.  These functions
> can fit nicely into the lean-and-mean approach.
>
> Zeev
>
>
>


-- 
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] removing ereg functions

2001-05-16 Thread Brian Moon

The problem is not the PHP C code.  It is the regex library.

Brian Moon
--
dealnews.com, Inc.
Makers of dealnews & dealmac
http://dealnews.com/ | http://dealmac.com/


- Original Message -
From: "John Lim" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, May 16, 2001 10:51 AM
Subject: Re: [PHP-DEV] removing ereg functions


> In my mind the problem that Brian raised is that ereg is slow.
> The solution is not to ban eregi but to fix it by performance tuning
> the C code.
>
> Just my 2c worth.
>
> John Lim
>
> Rasmus Lerdorf <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > > That is why I am asking.  Is there a core reason that the ereg
functions
> > > have to be there?  I could extend this to other functions as well of
> course.
> > > But this set in particular I have wondered about.
> >
> > 1) There was no PCRE library when I first added regex support to PHP.
> >Henry Spencer's regex library, although not my initial choice, was
> >chosen because that is what came bundled with Apache.
> >
> > 2) The ereg_* functions implement the Posix 1003.2 extended regular
> >expression standard.  The same regular expressions found in the
> >Unix command line utils like grep, egrep and fgrep.  The preg_*
> >functions support the perverted Perl-style regular expressions.
> >
> > 3) Removing the ereg_* functions would cause a backward compatibility
> >nightmare.  Thousands, if not hundreds of thousands of scripts out
> >there would have to be converted.
> >
> > 4) If you are using Apache you already have the library linked in
anyway.
> >Removing PHP support wouldn't save you any "bloat".  Not that this
> >"bloat" is at all significant on any modern OS with shared pages.
> >
> > -Rasmus
> >
> >
> > --
> > 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]
> >
>
>
>
> --
> 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]
>
>
>


-- 
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] removing ereg functions

2001-05-16 Thread Brian Moon

I guess it just seems a little odd too me that PCRE is optional and POSIX is
not.  I know the history and all.

Brian Moon
--
dealnews.com, Inc.
Makers of dealnews & dealmac
http://dealnews.com/ | http://dealmac.com/

- Original Message -
From: "Rasmus Lerdorf" <[EMAIL PROTECTED]>
To: "Brian Moon" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, May 16, 2001 11:33 AM
Subject: Re: [PHP-DEV] removing ereg functions


> > No, sorry, I think you misunderstood my question.  I would just like to
see
> > a --disable-ereg option for configure.  I would never dream of removing
ereg
> > from PHP as a supported function set.  It would break Phorum and lots of
> > stuff I have written.
>
> I just don't see the point in this.  There are other functions like
> split() that rely on the ereg code, and since removing the code isn't
> actually going to save you anything as the library is non-optional in
> Apache, removing the hooks from PHP makes no sense.  I don't think
> disabling functions in PHP is a good way to enforce coding conventions.
>
> -Rasmus
>
>
> --
> 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]
>
>
>


-- 
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] removing ereg functions

2001-05-16 Thread Brian Moon

But, that all makes sense and tells me that it is not worth pursuing.

Is the regex lib bundled with apache always as part of the core or just
included with certain modules?

Brian Moon
--
dealnews.com, Inc.
Makers of dealnews & dealmac
http://dealnews.com/ | http://dealmac.com/

- Original Message -
From: "Rasmus Lerdorf" <[EMAIL PROTECTED]>
To: "Brian Moon" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, May 16, 2001 11:33 AM
Subject: Re: [PHP-DEV] removing ereg functions


> > No, sorry, I think you misunderstood my question.  I would just like to
see
> > a --disable-ereg option for configure.  I would never dream of removing
ereg
> > from PHP as a supported function set.  It would break Phorum and lots of
> > stuff I have written.
>
> I just don't see the point in this.  There are other functions like
> split() that rely on the ereg code, and since removing the code isn't
> actually going to save you anything as the library is non-optional in
> Apache, removing the hooks from PHP makes no sense.  I don't think
> disabling functions in PHP is a good way to enforce coding conventions.
>
> -Rasmus
>
>
> --
> 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]
>
>
>



-- 
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] Echo vs in/out

2001-10-28 Thread Brian Moon

It has always been my understanding that in/out is faster as PHP does not
have to evalutate the terms for variables.  The best test would be to use an
app like apache bench (aka: ab) against the two pages.  Like this:

Test 1
---



results:
-
This is ApacheBench, Version 1.3c <$Revision: 1.45 $> apache-1.3
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright (c) 1998-2000 The Apache Group, http://www.apache.org/

Server Software:Apache/1.3.20
Server Hostname:phorum.org
Server Port:80

Document Path:  /~brian/test.php
Document Length:500 bytes

Concurrency Level:  3
Time taken for tests:   0.523 seconds
Complete requests:  100
Failed requests:0
Total transferred:  67830 bytes
HTML transferred:   51000 bytes
Requests per second:191.20
Transfer rate:  129.69 kb/s received

Connnection Times (ms)
  min   avg   max
Connect:1 4 8
Processing:12 9 7
Total: 131315


Test 2
---
Hello


results:
-
This is ApacheBench, Version 1.3c <$Revision: 1.45 $> apache-1.3
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright (c) 1998-2000 The Apache Group, http://www.apache.org/

Server Software:Apache/1.3.20
Server Hostname:phorum.org
Server Port:80

Document Path:  /~brian/test1.php
Document Length:500 bytes

Concurrency Level:  3
Time taken for tests:   0.515 seconds
Complete requests:  100
Failed requests:0
Total transferred:  67830 bytes
HTML transferred:   51000 bytes
Requests per second:194.17
Transfer rate:  131.71 kb/s received

Connnection Times (ms)
  min   avg   max
Connect:1 4 8
Processing:11 9 7
Total: 121315

---

So, as you can see, there is a difference but not that much.  Perhaps if you
were echoing an entire page it would make a large difference.  You should
read Nathan Wallace's paper "PHP: Hackers Paradise Revisited"
http://www.e-gineer.com/articles/php-hackers-paradise-revisited.phtml.  In
it he talks about speed of coding and not speed of code.  Take it with a
grain of salt but it is true.  Sometimes it is more important how long it
takes to code something than it is how fast it runs.  PHP makes it easy to
code fast while making sure the code runs fast enough.

Brian.

- Original Message -
From: "Andre Næss" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, October 28, 2001 6:11 PM
Subject: [PHP-DEV] Echo vs in/out


I'm currently in the middle of a discussion with some fellow PHP
developers regarding the speed of what we call in/out compared to
echo. With in/out we mean stuff like this:

// php code
?>
some html
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]





-- 
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] Additional ENV Vars with Apache 2.0.28 and PHP 4.1.0 RC2

2001-11-16 Thread Brian Moon

Hi all,

Doing some playing around with new stuff and I have a question.  How do I
access variables like HTTP_USER_AGENT with the above combination?  Is it PHP
or Apache that is hiding it from me?  I know some things changed in 4.1 but
I thought this stuff would still be accessible.

Thanks,

Brian Moon
--
dealnews.com, Inc.
Makers of dealnews, dealmac
http://dealnews.com/ | http://dealmac.com/




-- 
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] Additional ENV Vars with Apache 2.0.28 and PHP 4.1.0 RC2

2001-11-17 Thread Brian Moon

You should really not assume you are talking to a newbie when replying to
people.  It is rude.

As I am asking about an unreleased, RC version of PHP and it has significant
changes in how variables are access by the user, I feel my question is valid
in this area.

If you do not know the answer, please do not comment with a prepared newbie
reply.

FYI,
- Original Message -
From: "Zak Greant" <[EMAIL PROTECTED]>
To: "Brian Moon" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Saturday, November 17, 2001 12:45 AM
Subject: Re: [PHP-DEV] Additional ENV Vars with Apache 2.0.28 and PHP 4.1.0
RC2


| On November 16, 2001 11:02 pm, you wrote:
| > Hi all,
| >
| > Doing some playing around with new stuff and I have a question.  How
| > do I access variables like HTTP_USER_AGENT with the above
| > combination?  Is it PHP or Apache that is hiding it from me?  I know
| > some things changed in 4.1 but I thought this stuff would still be
| > accessible.
|
| This is not the right forum for support questions - please use PHP-
| General instead.
|
| To briefly answer your question, there are configuration directives
| that control how environment variables, post variables, get variables,
| etc. are presented to the user.  Review the manual section on
| configuration for more information.
|
| You can see where things are located using the phpinfo() function. :)
|
| --
| Zak Greant
|
| PHP Quality Assurance Team
| http://qa.php.net/
|
| "We must be the change we wish to see." - M. K. Ghandi
|
|
|


-- 
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] Additional ENV Vars with Apache 2.0.28 and PHP 4.1.0 RC2

2001-11-17 Thread Brian Moon

I just compiled with the latest CVS and yes it is there.

Thanks,

Brian.

- Original Message -
From: "Rasmus Lerdorf" <[EMAIL PROTECTED]>
To: "Sebastian Bergmann" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Saturday, November 17, 2001 5:57 AM
Subject: Re: [PHP-DEV] Additional ENV Vars with Apache 2.0.28 and PHP 4.1.0
RC2


| > Zak Greant wrote:
| > > This is not the right forum for support questions - please use
| > > PHP-General instead.
| >
| >   I think this is the right forum for this, since the Apache2Filter is
| >   still under development. AFAIK it currently does not export most of
| >   the common variables.
|
| Didn't Doug fix this just the other day in HEAD?
|
| -Rasmus
|
|
| --
| 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 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] FYI: Apache 2.0.28 and latest CVS running fine at phorum.org

2001-11-18 Thread Brian Moon

Hi all,

I am running latest CVS and Apache 2.0.28 at phorum.org on port 8080.  I
could not however run 4.1 RC2 because of some fixes that had to be made to
load environment variables.   So, FWIW, 4.1 RC2 will not work with Apache
2.0.28, the latest beta from Apache 2.0 tree.

I am running Phorum of course and have seen no errors with this setup.  Try
it if you want.  http://phorum.org:8080/

Brian.


-- 
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.1.0 Final RC QA Status

2001-11-21 Thread Brian Moon

I built it on Linux with Apache 2.0.28.  I guess no one merged the HEAD
changes in that will make it work with Apache2Filter.  Latest HEAD works
fine with 2.0.28.

Brian.

- Original Message -
From: "Derick Rethans" <[EMAIL PROTECTED]>
To: "Zak Greant" <[EMAIL PROTECTED]>
Cc: "PHP Quality Assurance Team Mailing List" <[EMAIL PROTECTED]>; "PHP
Developers Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, November 21, 2001 8:08 AM
Subject: Re: [PHP-DEV] PHP 4.1.0 Final RC QA Status


> Hello
>
> I'll be doing a build on Solaris 8 / i386 tonight, and several on Linux.
>
> regards,
> Derick
>
> On Wed, 21 Nov 2001, Zak Greant wrote:
>
> > PHP 4.1.0 Final RC QA Status
> > 
> >
> > Over the last few days, 12 people have submitted 26 build reports for
> > the latest RC. (Hopefully, I have not missed anyone. :)
> >
> > A full listing of the reports can be viewed at:
> > http://fooassociates.com/phpqa/
> >
> > --- Overview ---
> >
> > There has been a good deal of testing on various flavours of Linux:
> >
> > SuSE: 8 builds
> > Red Hat: 6 builds
> > Debian: 3 builds
> > Slackware: 1 build
> >
> > Each of these used Apache or CGI
> >
> > FreeBSD has also been built a few times using Apache and CGI
> >
> >
> > Rounding out the other OSs:
> >
> > Mac OS X + Apache
> > Sun OS 5.8 + CGI
> > Win32 + Apache + ISAPI
> >
> >
> > --- Plan? ---
> >
> > While we have had a good amount of testing for Un*x/Apache and Un*x/CGI
> > builds of the RC, we have only had a few tests of other OSs and SAPIs.
> >
> > I do not know that we have time this RC to try and find people to build
> > with other SAPIs and OSs. However, I feel that we should try to get a
> > bit more testing on the various Win platforms.
> >
> > Any comments?
> >
> > --- Finally ---
> >
> > Thanks to everyone who has taken the time to build the RC and submit a
> > report via the mailing lists and/or the PHP QA Wiki!
> >
> > --
> > Zak Greant
> >
> > PHP Quality Assurance Team
> > http://qa.php.net/
> >
> > "We must be the change we wish to see." - M. K. Ghandi
> >
> >
> > --
> > 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 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 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: [PHP-QA] Re: [PHP-DEV] Re: [PHP-QA] PHP 4.1.0 Final RC QA Status

2001-11-21 Thread Brian Moon

You might have thought it was junk, but did you look at the one from the
Nullsoft guys?

http://www.nullsoft.com/free/nsis/

Brian.

- Original Message -
From: "Phil Driscoll" <[EMAIL PROTECTED]>
To: "James Moore" <[EMAIL PROTECTED]>; "Zak Greant" <[EMAIL PROTECTED]>; "Jani
Taskinen" <[EMAIL PROTECTED]>; "Andy Woolley" <[EMAIL PROTECTED]>
Cc: "Zeev Suraski" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Wednesday, November 21, 2001 11:55 AM
Subject: Re: [PHP-DEV] Re: [PHP-QA] Re: [PHP-DEV] Re: [PHP-QA] PHP 4.1.0
Final RC QA Status


> On Wednesday 21 November 2001 4:50 pm, James Moore wrote:
>
> > Well if your happy doing the installer for now thats fine
> I'm happy doing it, but sad that I never seem to find time to make it any
> better :) It's main drawback at the moment is that it relies on an OCX
> control which is not present on a small proportion of machines, and that
it
> doesn't attempt to edit httpd.conf for an Apache installation. If we
wanted
> to extend the functionality to include PEAR then unless it is a simple
matter
> of copying the pear stuff to a particular location, I'm not familiar
enough
> with PEAR to do a decent job. I would be happy to hand over the reigns
though
> :)
>
> > I was just
> > looking at installshield for a PEAR install system due to the fact it
> > installshield developer 7 looked more extensable to me :)
>
> Maybe it is now - at the point in time I did the research (maybe 18 months
> ago) Wise seemed to be ahead of the game. What would be really great would
be
> a free Windows installer, but sadly everything I found in that regard was
> junk.
>
> Cheers
> --
> Phil Driscoll
>
> --
> 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 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.1.0

2001-11-25 Thread Brian Moon

What is the turn around for 4.2 and will the shell patch I submitted be in
it?

Brian.

- Original Message -
From: "Zeev Suraski" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Sunday, November 25, 2001 8:57 PM
Subject: [PHP-DEV] PHP 4.1.0


| I packaged PHP 4.1.0.  It's based on the RC3 tag, so post-RC3 changes to
| the tree were *not* included.  It's located on
| www.php.net/distributions/php-4.1.0.tar.gz
|
| Windows builders - if you can provide packages by tonight, it'd be
| great.  I want to announce it later this evening (in approximately 15
hours).
|
| Zeev
|
|
| --
| 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 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] BC problem

2001-11-28 Thread Brian Moon

This has already been discussed at great length in another thread.  I
believe it was decided to put it all back like it was for now and decide on
a better solution later.

Brian.

- Original Message -
From: "Markus Fischer" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, November 28, 2001 11:05 AM
Subject: [PHP-DEV] BC problem


> A small example which shows that BC seems to be broken for a
> certain (but not uncommon) case:
>
> cat include_me.php
>  if (!defined('I_AM_INCLUDED')) {
> define('I_AM_INCLUDED', 1);
> } else {
> echo "returning\n";
> return;
> }
>
> function cant_be_redefined() {
> }
> ?>
>
> cat include_it.php
>  echo "1\n";
> include 'include_me.php';
> echo "2\n";
> include 'include_me.php';
> echo "3\n";
> ?>
>
> Now run include_it.php (it doesn't matter if its CGI or
> module):
>
> On PHP 4.0.4pl1 up to 4.0.6 this gives:
> 1
> 2
> returning
> 3
>
> But now I get:
> 1
> 2
> 
> Fatal error - Cannot redeclare cant_be_redefined()
> (previously declared in include_me.php:9)
>
> [I shortened the error message to be more readable]
>
>
> If this is 'now the way it is' this should be mentioned
> somewhere very clearly I think. Doesn't seem to be fixable in
> some way? Couldn't find a reference to it e.g. in the NEWS
> file.
>
>
> I know that there should be used include_once() but
> I'm talking about existing code writing that way which
> definitely won't work without modifications.
>
> - Markus
>
> ps: thanks to Jan for verifying this!
>
> --
> Please always Cc to me when replying to me on the lists.
>
> --
> 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 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] BC problem

2001-11-28 Thread Brian Moon

This code:

$ less test.php
";

include "include.php";
include "include.php";

test();

?>

$ less include.php


With 4.0.6 I get:

4.0.6
test

With 4.1 RC3 I get:

4.1.0RC3
Fatal error:  Cannot redeclare test() in
/home/brian/public_html/include.php on line 9

with CVS I get:

4.2.0-dev
Fatal error:  Cannot redeclare test() (previously declared in
/home/brian/public_html/include.php:8) in
/home/brian/public_html/include.php on line 9


Andi, Zeev, I thought we were going to back out that change?

Brian.

- Original Message -
From: "Andi Gutmans" <[EMAIL PROTECTED]>
To: "Brian Moon" <[EMAIL PROTECTED]>; "Markus Fischer"
<[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, November 28, 2001 2:23 PM
Subject: Re: [PHP-DEV] BC problem


| Yep. As far as I remember it was reverted in 4.1.0
|
| Andi
|
| At 01:54 PM 11/28/2001 -0600, Brian Moon wrote:
| >This has already been discussed at great length in another thread.  I
| >believe it was decided to put it all back like it was for now and decide
on
| >a better solution later.
| >
| >Brian.
| >
| >- Original Message -
| >From: "Markus Fischer" <[EMAIL PROTECTED]>
| >To: <[EMAIL PROTECTED]>
| >Sent: Wednesday, November 28, 2001 11:05 AM
| >Subject: [PHP-DEV] BC problem
| >
| >
| > > A small example which shows that BC seems to be broken for a
| > > certain (but not uncommon) case:
| > >
| > > cat include_me.php
| > >  > if (!defined('I_AM_INCLUDED')) {
| > > define('I_AM_INCLUDED', 1);
| > > } else {
| > > echo "returning\n";
| > > return;
| > > }
| > >
| > > function cant_be_redefined() {
| > > }
| > > ?>
| > >
| > > cat include_it.php
| > >  > echo "1\n";
| > > include 'include_me.php';
| > > echo "2\n";
| > > include 'include_me.php';
| > > echo "3\n";
| > > ?>
| > >
| > > Now run include_it.php (it doesn't matter if its CGI or
| > > module):
| > >
| > > On PHP 4.0.4pl1 up to 4.0.6 this gives:
| > > 1
| > > 2
| > > returning
| > > 3
| > >
| > > But now I get:
| > > 1
| > > 2
| > > 
| > > Fatal error - Cannot redeclare cant_be_redefined()
| > > (previously declared in include_me.php:9)
| > >
| > > [I shortened the error message to be more readable]
| > >
| > >
| > > If this is 'now the way it is' this should be mentioned
| > > somewhere very clearly I think. Doesn't seem to be fixable in
| > > some way? Couldn't find a reference to it e.g. in the NEWS
| > > file.
| > >
| > >
| > > I know that there should be used include_once() but
| > > I'm talking about existing code writing that way which
| > > definitely won't work without modifications.
| > >
| > > - Markus
| > >
| > > ps: thanks to Jan for verifying this!
| > >
| > > --
| > > Please always Cc to me when replying to me on the lists.
| > >
| > > --
| > > 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]
| > >
| > >
| > >
| >
| >
| >--
| >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]
|
|
|


-- 
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] about php4.1.0 with apache2.x (httpd-2_0_28)

2001-11-29 Thread Brian Moon

Your best bet with Apache 2 is to compile Apache with DSO support and
compile PHP with apxs2.

Brian.

- Original Message -
From: "sam" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, November 29, 2001 3:58 AM
Subject: [PHP-DEV] about php4.1.0 with apache2.x (httpd-2_0_28)


| Try to configure php4.1.0 with apache2 in RH Linux7.2
|
|
| ./configure --with-mysql=/usr/local/mysql --with-apache=../httpd-2_0_28
| --enable-track-vars --enable-calendar  --enable-ftp --enable-sockets
| --enable-versioning
|
| I got "Cann't find httpd.h". Also, I check configure of php4.1.0 and
| find the problem may come from wrong path.
|
| Apache2.x do not have src directory and apr is under srclib/apr.
|
|
| --
| 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 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] BC problem

2001-11-29 Thread Brian Moon

Are the changes that make Apache 2.0.28 work included in those changes?

Brian.

- Original Message -
From: "Zeev Suraski" <[EMAIL PROTECTED]>
To: "Markus Fischer" <[EMAIL PROTECTED]>
Cc: "Andi Gutmans" <[EMAIL PROTECTED]>; "Brian Moon" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Thursday, November 29, 2001 4:09 AM
Subject: Re: [PHP-DEV] BC problem


| Ok then, looks like we got ourselves a winner.  We'll have an RC4 after
all :I
| I'll submit the patches to revert this change and roll RC4 today.  I want
| to hear opinions on whether this RC4 should be based on the RC3 tag, or
| whether it should also include the few fixes that were submitted to the
| branch since RC3 was rolled...  If you have one, let us know about it :)
|
| Zeev
|
| At 00:50 29/11/2001, Markus Fischer wrote:
| >On Wed, Nov 28, 2001 at 10:23:55PM +0200, Andi Gutmans wrote :
| > > Yep. As far as I remember it was reverted in 4.1.0
| >
| > No, it doesn't seem to be reverted:
| >
| > $ ~/php410/bin/php -v
| > 4.1.0
| > $ ~/php410/bin/php -f include_it.php
| > 1
| > 2
| > 
| > include_me.php(10) : Fatal error - Cannot redeclare
cant_be_redefined()
| >
| > - Markus
| >
| >--
| >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]
|
|
|


-- 
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] BC problem

2001-11-29 Thread Brian Moon

2.0.28 brought it into beta.  Current HEAD of PHP works fine.  I just
thought if there is going to be a release of PHP we might want it to work
with all the latest builds if possible.  The code is there in HEAD.

Brian.

- Original Message -
From: "Zeev Suraski" <[EMAIL PROTECTED]>
To: "Brian Moon" <[EMAIL PROTECTED]>
Cc: "Markus Fischer" <[EMAIL PROTECTED]>; "Andi Gutmans"
<[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Thursday, November 29, 2001 8:14 AM
Subject: Re: [PHP-DEV] BC problem


> I don't believe so.  They should be either, as Apache 2.0 is alpha code...
>
> Zeev
>
> At 16:09 29/11/2001, Brian Moon wrote:
> >Are the changes that make Apache 2.0.28 work included in those changes?
> >
> >Brian.
> >
> >- Original Message -
> >From: "Zeev Suraski" <[EMAIL PROTECTED]>
> >To: "Markus Fischer" <[EMAIL PROTECTED]>
> >Cc: "Andi Gutmans" <[EMAIL PROTECTED]>; "Brian Moon" <[EMAIL PROTECTED]>;
> ><[EMAIL PROTECTED]>
> >Sent: Thursday, November 29, 2001 4:09 AM
> >Subject: Re: [PHP-DEV] BC problem
> >
> >
> >| Ok then, looks like we got ourselves a winner.  We'll have an RC4 after
> >all :I
> >| I'll submit the patches to revert this change and roll RC4 today.  I
want
> >| to hear opinions on whether this RC4 should be based on the RC3 tag, or
> >| whether it should also include the few fixes that were submitted to the
> >| branch since RC3 was rolled...  If you have one, let us know about it
:)
> >|
> >| Zeev
> >|
> >| At 00:50 29/11/2001, Markus Fischer wrote:
> >| >On Wed, Nov 28, 2001 at 10:23:55PM +0200, Andi Gutmans wrote :
> >| > > Yep. As far as I remember it was reverted in 4.1.0
> >| >
> >| > No, it doesn't seem to be reverted:
> >| >
> >| > $ ~/php410/bin/php -v
> >| > 4.1.0
> >| > $ ~/php410/bin/php -f include_it.php
> >| > 1
> >| > 2
> >| > 
> >| > include_me.php(10) : Fatal error - Cannot redeclare
> >cant_be_redefined()
> >| >
> >| > - Markus
> >| >
> >| >--
> >| >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]
> >|
> >|
> >|
>
>
>


-- 
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] first bug report for 4.1.0 (was [PHP-DEV] Bug #14329: Mail() does not work)

2001-12-03 Thread Brian Moon

The next one is going have to come out so soon it won't matter.  We all know
how far behind HEAD 4.1.0 is.

Brian.

- Original Message -
From: <[EMAIL PROTECTED]>
To: "Joao Prado Maia" <[EMAIL PROTECTED]>
Cc: "Hartmut Holzgraefe" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>; "PHP
Developers Mailing List" <[EMAIL PROTECTED]>
Sent: Monday, December 03, 2001 3:16 PM
Subject: Re: [PHP-DEV] first bug report for 4.1.0 (was [PHP-DEV] Bug #14329:
Mail() does not work)


> On Mon, 3 Dec 2001, Joao Prado Maia wrote:
>
> > On Mon, 3 Dec 2001, Hartmut Holzgraefe wrote:
> > > [EMAIL PROTECTED] wrote:
> > >
> > > i'd still prefere to have the upcomming release called 4.1.1
> > >
> >
> > So do I. I get chills when I think on the support / bug emails telling
me
> > that my project doesn't work on 4.1.0. I really don't want to keep
> > emailing them back asking if 4.1.0 was the  one or the new
one?
> >
> > Just imagine having to explain the confusion with the 4.1.0 release to
> > everyone... oh my ;)
>
> The real 4.1.0 release will have zend version number 1.1.0a (while the
> old, bogus one has 1.1.0 as Zend version number).
>
> Derick
>
>
> --
> 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 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] about php4.1.0 with apache2.x (httpd-2_0_28)

2001-12-19 Thread Brian Moon

Yes, PHP 4.1 does not work with Apache 2.0.28.  You would need to use a
recent CVS snapshot.  It does however compile and appear to work fine. at
first.

Brian.

- Original Message -
From: "sheens" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: "Brian Moon" <[EMAIL PROTECTED]>
Sent: Wednesday, December 19, 2001 2:59 AM
Subject: Re: [PHP-DEV] about php4.1.0 with apache2.x (httpd-2_0_28)


| Dear Brian,
|
| Did you try Apache2.X DSO complie with PHP4 successfully? I try that and
| check every configuration, but it still doesn't work.
|
| Apache 2.0.28 configuration:
| ./configure --prefix=/usr/local/apache --enable-speling=shared
| --enable-vhost-alias --enable-rewrite=shared \
| --enable-so --enable-cgi --enable-info --enable-mime-magic
| --enable-cache --enable-file-cache --enable-auth-anon \
| --with-mpm=threaded --enable-module=so --enable-php4=shared
|
| Php4.1.0 configuration
| ./configure --with-mysql=/usr/local/mysql
| --with-apxs2=/usr/local/apache/bin/apxs --enable-track-vars \
| --enable-calendar --enable-ftp --enable-sockets --enable-versioning
| --enable-debug --enable-gd-native-ttf
|
| Brian Moon wrote:
|
| >Your best bet with Apache 2 is to compile Apache with DSO support and
| >compile PHP with apxs2.
| >
| >Brian.
| >
| >- Original Message -
| >From: "sam" <[EMAIL PROTECTED]>
| >To: <[EMAIL PROTECTED]>
| >Sent: Thursday, November 29, 2001 3:58 AM
| >Subject: [PHP-DEV] about php4.1.0 with apache2.x (httpd-2_0_28)
| >
| >
| >| Try to configure php4.1.0 with apache2 in RH Linux7.2
| >|
| >|
| >| ./configure --with-mysql=/usr/local/mysql --with-apache=../httpd-2_0_28
| >| --enable-track-vars --enable-calendar  --enable-ftp --enable-sockets
| >| --enable-versioning
| >|
| >| I got "Cann't find httpd.h". Also, I check configure of php4.1.0 and
| >| find the problem may come from wrong path.
| >|
| >| Apache2.x do not have src directory and apr is under srclib/apr.
| >|
| >|
| >| --
| >| 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]
| >|
| >|
| >|
| >
| >
|
|
|
|


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




[PHP-DEV] Custom Extensions and Super Globals

2002-06-20 Thread Brian Moon

I was just thinking about some of our code on dealnews.com and thought it
would be cool if we could write our own extension that would, among other
things, make a couple of widely used variables on out site super globals
like $_SERVER, etc.  A) Can this be done.  B) If so, can anybody give me a
push in the right direction to making it happen?

Thanks,

Brian Moon
dealnews.com
Phorum.org


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




Re: [PHP-DEV] Custom Extensions and Super Globals

2002-06-20 Thread Brian Moon

big thanks.

Brian.

- Original Message -
From: "Brad LaFountain" <[EMAIL PROTECTED]>
To: "Brian Moon" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, June 20, 2002 3:32 PM
Subject: Re: [PHP-DEV] Custom Extensions and Super Globals


| I believe you are looking for
|
| zend_register_auto_global();
|
|  - Brad
| --- Brian Moon <[EMAIL PROTECTED]> wrote:
| > I was just thinking about some of our code on dealnews.com and thought
it
| > would be cool if we could write our own extension that would, among
other
| > things, make a couple of widely used variables on out site super globals
| > like $_SERVER, etc.  A) Can this be done.  B) If so, can anybody give me
a
| > push in the right direction to making it happen?
| >
| > Thanks,
| >
| > Brian Moon
| > dealnews.com
| > Phorum.org
| >
| >
| > --
| > PHP Development Mailing List <http://www.php.net/>
| > To unsubscribe, visit: http://www.php.net/unsub.php
| >
|
|
| __
| Do You Yahoo!?
| Yahoo! - Official partner of 2002 FIFA World Cup
| http://fifaworldcup.yahoo.com
|


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




Re: [PHP-DEV] Custom Extensions and Super Globals

2002-06-20 Thread Brian Moon

Ok, now for some help.

I have this:

PHP_MINIT_FUNCTION(autoglobal)
{

ZEND_INIT_MODULE_GLOBALS(autoglobal, php_autoglobal_init_globals, NULL);
REGISTER_INI_ENTRIES();

zend_register_auto_global("_TEST2", sizeof("_TEST2")-1 TSRMLS_CC);

if(sizeof(AUTOGLOBAL_G(global_vars))>0){

printf("value of global_vars in PHP_MINIT_FUNCTION: %s\n\n",
AUTOGLOBAL_G(global_vars));

zend_register_auto_global(AUTOGLOBAL_G(global_vars),
sizeof(AUTOGLOBAL_G(global_vars))-1 TSRMLS_CC);
}

return SUCCESS;
}


$_TEST2 is auto globaled just fine.  I have a php.ini file that contains:

autoglobals.global_vars = "_TEST"

I have the following PHP script:

$_TEST="_TEST global var";
$_TEST2="_TEST2 global var";

function test()
{
echo "inside: \n";
print_r($_TEST);
echo "\n";
print_r($_TEST2);
echo "\n\n";
}

echo "outside: \n";
print_r($_TEST);
echo "\n";
print_r($_TEST2);
echo "\n\n";

test();


I get:

value of global_vars in PHP_MINIT_FUNCTION: _TEST

outside:
_TEST global var
_TEST2 global var

inside:

_TEST2 global var

So, _TEST is getting read from the ini file, but it is not getting auto
globaled.  I get no errors when compiling.

Does anybody see the error?

Brian.

- Original Message -
From: "Brad LaFountain" <[EMAIL PROTECTED]>
To: "Brian Moon" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, June 20, 2002 3:32 PM
Subject: Re: [PHP-DEV] Custom Extensions and Super Globals


| I believe you are looking for
|
| zend_register_auto_global();
|
|  - Brad
| --- Brian Moon <[EMAIL PROTECTED]> wrote:
| > I was just thinking about some of our code on dealnews.com and thought
it
| > would be cool if we could write our own extension that would, among
other
| > things, make a couple of widely used variables on out site super globals
| > like $_SERVER, etc.  A) Can this be done.  B) If so, can anybody give me
a
| > push in the right direction to making it happen?
| >
| > Thanks,
| >
| > Brian Moon
| > dealnews.com
| > Phorum.org
| >
| >
| > --
| > PHP Development Mailing List <http://www.php.net/>
| > To unsubscribe, visit: http://www.php.net/unsub.php
| >
|
|
| __
| Do You Yahoo!?
| Yahoo! - Official partner of 2002 FIFA World Cup
| http://fifaworldcup.yahoo.com
|


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




Re: [PHP-DEV] Custom Extensions and Super Globals

2002-06-20 Thread Brian Moon

Well, I kept playing with and got it to work.  I changed the
sizeof(AUTOGLOBAL_G(global_vars))-1 to strlen(AUTOGLOBAL_G(global_vars)).

Any reason not to use this.

Brian.

- Original Message -
From: "Brian Moon" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, June 20, 2002 6:32 PM
Subject: Re: [PHP-DEV] Custom Extensions and Super Globals


| Ok, now for some help.
|
| I have this:
|
| PHP_MINIT_FUNCTION(autoglobal)
| {
|
| ZEND_INIT_MODULE_GLOBALS(autoglobal, php_autoglobal_init_globals,
NULL);
| REGISTER_INI_ENTRIES();
|
| zend_register_auto_global("_TEST2", sizeof("_TEST2")-1 TSRMLS_CC);
|
| if(sizeof(AUTOGLOBAL_G(global_vars))>0){
|
| printf("value of global_vars in PHP_MINIT_FUNCTION: %s\n\n",
| AUTOGLOBAL_G(global_vars));
|
| zend_register_auto_global(AUTOGLOBAL_G(global_vars),
| sizeof(AUTOGLOBAL_G(global_vars))-1 TSRMLS_CC);
| }
|
| return SUCCESS;
| }
|
|
| $_TEST2 is auto globaled just fine.  I have a php.ini file that contains:
|
| autoglobals.global_vars = "_TEST"
|
| I have the following PHP script:
|
| $_TEST="_TEST global var";
| $_TEST2="_TEST2 global var";
|
| function test()
| {
| echo "inside: \n";
| print_r($_TEST);
| echo "\n";
| print_r($_TEST2);
| echo "\n\n";
| }
|
| echo "outside: \n";
| print_r($_TEST);
| echo "\n";
| print_r($_TEST2);
| echo "\n\n";
|
| test();
|
|
| I get:
|
| value of global_vars in PHP_MINIT_FUNCTION: _TEST
|
| outside:
| _TEST global var
| _TEST2 global var
|
| inside:
|
| _TEST2 global var
|
| So, _TEST is getting read from the ini file, but it is not getting auto
| globaled.  I get no errors when compiling.
|
| Does anybody see the error?
|
| Brian.
|
| - Original Message -
| From: "Brad LaFountain" <[EMAIL PROTECTED]>
| To: "Brian Moon" <[EMAIL PROTECTED]>
| Cc: <[EMAIL PROTECTED]>
| Sent: Thursday, June 20, 2002 3:32 PM
| Subject: Re: [PHP-DEV] Custom Extensions and Super Globals
|
|
| | I believe you are looking for
| |
| | zend_register_auto_global();
| |
| |  - Brad
| | --- Brian Moon <[EMAIL PROTECTED]> wrote:
| | > I was just thinking about some of our code on dealnews.com and thought
| it
| | > would be cool if we could write our own extension that would, among
| other
| | > things, make a couple of widely used variables on out site super
globals
| | > like $_SERVER, etc.  A) Can this be done.  B) If so, can anybody give
me
| a
| | > push in the right direction to making it happen?
| | >
| | > Thanks,
| | >
| | > Brian Moon
| | > dealnews.com
| | > Phorum.org
| | >
| | >
| | > --
| | > PHP Development Mailing List <http://www.php.net/>
| | > To unsubscribe, visit: http://www.php.net/unsub.php
| | >
| |
| |
| | __
| | Do You Yahoo!?
| | Yahoo! - Official partner of 2002 FIFA World Cup
| | http://fifaworldcup.yahoo.com
| |
|
|


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




Re: [PHP-DEV] PHP 4.0 Bug #8889: Memory is not being freed.

2001-01-29 Thread Brian Moon

That is what we are doing now.  We have it at 5.  Any higher and we are
running out.  There is only 128MB of RAM in our machine.  I am considering
switching to CGI PHP just to eliviate this problem.  Of course, that sucks.

Brian Moon
--
Phorum Dev Team - http://phorum.org
Making better forums with PHP
--


- Original Message -
From: "Rasmus Lerdorf" <[EMAIL PROTECTED]>
To: "Filip Sielimowicz" <[EMAIL PROTECTED]>
Cc: "Brian Moon" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Monday, January 29, 2001 6:56 AM
Subject: Re: [PHP-DEV] PHP 4.0 Bug #8889: Memory is not being freed.


> > Yes, yes, I agree ! But this is the problem ! Unfortunatelly "memory
> > hungry script" happens from time to time and there's no chance to
prevent
> > httpd processes from keeping memory (which is not used again in most
> > cases). Maybe it is not a problem for you, but it is for us.
>
> A quick fix would be to set your MaxRequestsPerChild to a lower value.
>
> -Rasmus
>
>


-- 
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 #8889: Memory is not being freed.

2001-01-29 Thread Brian Moon

Hi Rasmus,

It is not a leak exactly but more of a greed.  It seems to be a
semi-intentional but not necessary thing.  It seems that the way Zend/PHP is
allocating memory is not allowing it to be returned to the system.  Once PHP
has some memory it will not let it go, but it will reuse it.  So, if a
script takes up a good chunk of memory, it is never returned to the system
unless that httpd process is killed or dies.

There is a thread that describes what happens and a discussion on how to
change Zend/PHP to not do this.  Here is the link:

http://marc.theaimsgroup.com/?l=php-dev&m=97923602322593&w=2

Now, being the 133t C hacker that I am NOT, I do not dare dive into this.
However, I did use the recommendations given in this thread and it appeared
to have a definite effect on the performance of my server.  It did however,
as the author warned, make PHP unstable.

I fear that a deep look into the way that memory is being used will have to
take place to really find this problem.  I am willing to use phorum.org as a
guinea pig for test scripts that cause this or whatever I can do to help fix
this problem.

Believe me, I think you know how much I love PHP, I did everything I could
to not blame PHP for this.  I have updated Red Hat (glibc and gcc), Apache
(btw, static pages don't cause the growth), and anything else I could think
of to solve it.

Brian Moon
-
Phorum Dev Team - http://phorum.org
Making better forums with PHP
-


- Original Message -
From: "Rasmus Lerdorf" <[EMAIL PROTECTED]>
To: "Filip Sielimowicz" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Saturday, January 27, 2001 11:53 PM
Subject: Re: [PHP-DEV] PHP 4.0 Bug #8889: Memory is not being freed.


> > PS. Hey, guys from the php-dev. Don't you have anything
> > to say ? Please do that !
>
> Please do what?
>
> You should try to figure out what is leaking memory on you.  None of my
> servers are leaking.
>
> -Rasmus
>
>


-- 
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 #8889: Memory is not being freed.

2001-01-29 Thread Brian Moon

Yes, but it would be really nice if it was returned.  Systems with 128MB or
RAM run out quickly if there is a script ( like a long Phorum thread ) that
takes a good chunk.  Of course the argument can be made that the box needs
more RAM but if the memory can be returned (maybe even with a php.ini
setting that states the max amount PHP should keep) to the system why not do
it?

Brian Moon
-
Phorum Dev Team - http://phorum.org
Making better forums with PHP
-


- Original Message -
From: "Rasmus Lerdorf" <[EMAIL PROTECTED]>
To: "Brian Moon" <[EMAIL PROTECTED]>
Cc: "Filip Sielimowicz" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Sunday, January 28, 2001 12:23 AM
Subject: Re: [PHP-DEV] PHP 4.0 Bug #8889: Memory is not being freed.


> > It is not a leak exactly but more of a greed.  It seems to be a
> > semi-intentional but not necessary thing.  It seems that the way
Zend/PHP is
> > allocating memory is not allowing it to be returned to the system.  Once
PHP
> > has some memory it will not let it go, but it will reuse it.  So, if a
> > script takes up a good chunk of memory, it is never returned to the
system
> > unless that httpd process is killed or dies.
>
> Right, this is standard.  But this does not explain incremental memory
> usage.  Memory is marked as free and re-used.  It does not need to be
> returned to the system for it to be re-used.  So the memory usage for any
> one process should never exceed the memory usage of your most memory
> hungry script.
>
> -Rasmus
>
>


-- 
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 #8889: Memory is not being freed.

2001-01-29 Thread Brian Moon

Ok, so what are the benefits of not returning memory to the system?  It
seems that no one who can do it wants to so there must be a good reason.

Brian Moon
--
Phorum Dev Team - http://phorum.org
Making better forums with PHP
--


- Original Message -
From: "Rasmus Lerdorf" <[EMAIL PROTECTED]>
To: "Brian Moon" <[EMAIL PROTECTED]>
Cc: "Filip Sielimowicz" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Monday, January 29, 2001 5:03 PM
Subject: Re: [PHP-DEV] PHP 4.0 Bug #8889: Memory is not being freed.


> Seems to me like it would be a lot easier just to add more RAM.  $89 for
> 256M these days.  RAM is cheap.
>
> -Rasmus
>
> On Mon, 29 Jan 2001, Brian Moon wrote:
>
> > That is what we are doing now.  We have it at 5.  Any higher and we are
> > running out.  There is only 128MB of RAM in our machine.  I am
considering
> > switching to CGI PHP just to eliviate this problem.  Of course, that
sucks.
> >
> > Brian Moon
> > --
> > Phorum Dev Team - http://phorum.org
> > Making better forums with PHP
> > --
> >
> >
> > - Original Message -
> > From: "Rasmus Lerdorf" <[EMAIL PROTECTED]>
> > To: "Filip Sielimowicz" <[EMAIL PROTECTED]>
> > Cc: "Brian Moon" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> > Sent: Monday, January 29, 2001 6:56 AM
> > Subject: Re: [PHP-DEV] PHP 4.0 Bug #8889: Memory is not being freed.
> >
> >
> > > > Yes, yes, I agree ! But this is the problem ! Unfortunatelly "memory
> > > > hungry script" happens from time to time and there's no chance to
> > prevent
> > > > httpd processes from keeping memory (which is not used again in most
> > > > cases). Maybe it is not a problem for you, but it is for us.
> > >
> > > A quick fix would be to set your MaxRequestsPerChild to a lower value.
> > >
> > > -Rasmus
> > >
> > >
> >
>
>


-- 
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] faster serializer?

2001-08-03 Thread Brian Moon

I would love to see a faster serializer.  I think serializing has a lot of
upsides but the downside right now is performance.

Brian Moon
--
dealnews.com, Inc.
Makers of dealnews, dealmac
http://dealnews.com/ | http://dealmac.com/


- Original Message -
From: "Stig S. Bakken" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, August 03, 2001 12:34 AM
Subject: [PHP-DEV] faster serializer?


> PHP needs a faster serializer and deserializer.  It should be possible
> to make one that is at least as fast as Zend compiling and executing
> code defining the same structure.
>
> Does anyone else want a faster serializer?  Anyone interested in
> contributing to a fund so we can set up a prize for the fastest
> implementation? :-)
>
>  - Stig
>
> --
> 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]
>
>
>


-- 
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] Linux Today Article

2001-08-15 Thread Brian Moon

Could someone please tell me what other then marketing speak that .NET has
on PHP?  I guess I just don't see it.  I mean, yeah, if you want to develop
junk at a fast pace you can use MS products.  I was a VB programmer for
years.  I know the reliability and performance cost of doing things the MS
way.  I just don't get it.  It is all 1's and 0's.

Brian Moon
--
dealnews.com, Inc.
Makers of dealnews, dealmac
http://dealnews.com/ | http://dealmac.com/


- Original Message -
From: "John Donagher" <[EMAIL PROTECTED]>
To: "Edin Kadribasic" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, August 15, 2001 4:36 PM
Subject: Re: [PHP-DEV] Linux Today Article


> On Wed, 15 Aug 2001, Edin Kadribasic wrote:
>
> > >   Maybe Zend has some feedback from their enterprise clients on
> > >   what features are requested, etc.
> >
> > It would be great to hear if anyone else has had a chance to play with
the
> > new Microsoft toys.
> >
>
> As a PHP contributor and long-time user, I can say that if our company was
> starting over right now, .NET would win hands down in terms of suiting our
> needs (engineering-side), as a web application development company.
>
> This wasn't the case with a Java application framework, many of which were
> available when our company was choosing its platform.
>
> PHP has some advantages over a language like C#. However, my impressions
from
> following this list for the last year have been that it is not being
evolved
> towards medium-to-large application builders, but still towards people
writing
> "web sites" or simple scripts. We're trying to change this with
binarycloud,
> but still, we're spending countless hours reinventing what ASP.NET would
give
> you for free (or rather in exchange for selling your soul to microsoft).
>
> I don't mean to be unfair. Breaking backwards compatibility would be
required
> in many many cases in order for PHP to evolve in that sense, and as long
as
> most people don't want it to happen, it probably shouldn't happen. That's
a
> significant cost to incur and something new frameworks/languages don't
have to
> worry about.
>
> John
>
> --
>
> John Donagher
> Application Engineer, Intacct Corp.
>
> Public key available off http://www.keyserver.net
> Key fingerprint = 4024 DF50 56EE 19A3 258A  D628 22DE AD56 EEBE 8DDD
>
>
> --
> 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]
>
>
>


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

2001-08-23 Thread Brian Moon

This is a very neat function.  I may be able to use it.  Having said that I
think it is best left as a userland function.

Brian Moon
--
dealnews.com, Inc.
Makers of dealnews & dealmac
http://dealnews.com/ | http://dealmac.com/


- Original Message -
From: "Eliot Shepard" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, August 23, 2001 3:38 PM
Subject: [PHP-DEV] mysql_fetch_xml


> I have written a simple PHP function which returns all result rows
> associated with a mysql query as an XML document. I needed this to
> facilitate XSLT presentation of database records.
>
> I was thinking about reimplementing the function in C and contributing
> it to php_mysql.c. Would there be any interest in incorporating this
> into the codebase?
>
> Eliot
>
>
> The PHP function:
>
> 
> function mysql_fetch_xml($result) {
> // turn an mysql query result into an xml document.
>
> $retval = "";
> $retval .= "";
>
> while ($row = mysql_fetch_assoc($result)) {
> $retval .= "";
> while(list($key, $value) = each($row)) {
> $retval .= "<$key>$value";
> }
> $retval .= "";
> }
>
> $retval .= "";
>
> return $retval;
> }
>
> ?>
>
> Here's a usage example:
>
> $rows   = mysql_query($query, $dblink);
> $xml= mysql_fetch_xml($rows);
>
> $parser = xslt_create();
> $xsl= join ('', file ('./present_rows.xsl'));
> xslt_process($xsl, $xml, $result);
> xslt_free($parser);
>
> print $result;
>
>
> --
> Eliot Shepard
> [EMAIL PROTECTED]
>
>
>
> --
> 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]
>
>
>


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




[PHP-DEV] Error messages go to stderr

2001-09-06 Thread Brian Moon

Hi,

When using the -q option all errors are reported twice.  Once to stdout and
once to stderr like so:

test.php(3) : Warning - Invalid argument supplied for foreach()
Warning: Invalid argument supplied for foreach() in test.php on line 3

I am trying to put together a patch for a new command line option that would
in effect be what -q does plus some other things like turn off output
buffering, turn html errors off, ignore error_???pend_string settings.

If the errors are already going to stderr though, there is no reason to send
them to stdout for what I want to do.  I think this was added in 4.0.6 as my
4.0.5 install does not do it.  however I can not find any code that does it.

Any ideas.

Brian Moon
--
dealnews.com, Inc.
Makers of dealnews & dealmac
http://dealnews.com/ | http://dealmac.com/




-- 
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] Error messages go to stderr

2001-09-06 Thread Brian Moon

Well, i just tried the latest CVS and it does not do it.  So, I guess I will
forget about that.

Brian Moon
--
dealnews.com, Inc.
Makers of dealnews & dealmac
http://dealnews.com/ | http://dealmac.com/


- Original Message -
From: "Brian Moon" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, September 06, 2001 12:41 PM
Subject: [PHP-DEV] Error messages go to stderr


> Hi,
>
> When using the -q option all errors are reported twice.  Once to stdout
and
> once to stderr like so:
>
> test.php(3) : Warning - Invalid argument supplied for foreach()
> Warning: Invalid argument supplied for foreach() in test.php on line 3
>
> I am trying to put together a patch for a new command line option that
would
> in effect be what -q does plus some other things like turn off output
> buffering, turn html errors off, ignore error_???pend_string settings.
>
> If the errors are already going to stderr though, there is no reason to
send
> them to stdout for what I want to do.  I think this was added in 4.0.6 as
my
> 4.0.5 install does not do it.  however I can not find any code that does
it.
>
> Any ideas.
>
> Brian Moon
> --
> dealnews.com, Inc.
> Makers of dealnews & dealmac
> http://dealnews.com/ | http://dealmac.com/
>
>
>
>
> --
> 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]
>
>
>


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




[PHP-DEV] patch to make for better shell scripting

2001-09-06 Thread Brian Moon

Well, here is my patch finally for enabling a shell mode with the command
line.

Mainly this patch adds a -S option that will turn off html errors,
error_prepend_string, error_append_string, and output buffering.

This will keep people from having to maintain two ini files.

Now, this stuff could be added to -q, but I did not want to break anything,
so I made a new option.  I had posed a question about it a while back.  Zeev
helped me out on getting the ZPI calls correct.

It has been tested on Linux and is patched against the CVS snapshot from
this morning.

If/when this is added please let me know.

Brian Moon
--
dealnews.com, Inc.
Makers of dealnews & dealmac
http://dealnews.com/ | http://dealmac.com/



 shellmode.diff

-- 
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] patch to make for better shell scripting

2001-09-07 Thread Brian Moon

I thought about that.  But I decided against it as we have had some times
where that has saved our hides here.  I think that is best left to be added
on a per script basis.

Brian Moon
--
dealnews.com, Inc.
Makers of dealnews & dealmac
http://dealnews.com/ | http://dealmac.com/


- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; "Brian Moon" <[EMAIL PROTECTED]>
Sent: Friday, September 07, 2001 2:59 AM
Subject: re: [PHP-DEV] patch to make for better shell scripting


> Addressed to: [EMAIL PROTECTED]
>   "Brian Moon" <[EMAIL PROTECTED]>
>
> > Well, here is my patch finally for enabling a shell mode with the
> > command line.
>
> > Mainly this patch adds a -S option that will turn off html errors,
> > error_prepend_string, error_append_string, and output buffering.
>
> > This will keep people from having to maintain two ini files.
>
>
> Please consider adding the function of
>
>set_time_limit( 0 );
>
> to the -S option, usually when I run PHP from the command line I am not
> worried about how long it takes to run.  Long running programs are one
> of the common reasons for running PHP from the command line.  If you
> want a command line script to time out you can set the time limit in
> your program.
>
>
> Thanks,
> Rick
>
>
>
> Rick Widmer
> Internet Marketing Specialists
> http://www.developersdesk.com
>
>


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




  1   2   >