Re: [PHP-DEV] cant compile 4.2.1 on FreeBSD with domxml support

2002-05-17 Thread Christian Stocker

On Sat, 18 May 2002, Markus Fischer wrote:

> What version of libxml2 ? Needs to be >= 2.4.14

yep. php 4.2.1 doesn't check for the right version (it only checks for
2.4.2, but it needs functions implemented since 2.4.14). this is fixed in
CVS (HEAD and PHP_4_2_0 branch)

chregu


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




Re: [PHP-DEV] cant compile 4.2.1 on FreeBSD with domxml support

2002-05-17 Thread Rob Richards

Thanks,

That was it. I was running 2.4.3 on the BSD machine.
Just upgraded to 2.4.21 and it compiles fine.

Appreciate the help

Rob

- Original Message -
From: "Markus Fischer" <[EMAIL PROTECTED]>
To: "Rob Richards" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Friday, May 17, 2002 6:17 PM
Subject: Re: [PHP-DEV] cant compile 4.2.1 on FreeBSD with domxml support


> What version of libxml2 ? Needs to be >= 2.4.14
>
> On Fri, May 17, 2002 at 06:11:42PM -0400, Rob Richards wrote :
> > I am trying to install 4.2.1 on FreeBSD 4.4 STABLE.
> > It continues to fail during make in domxml with the following:
> >
> > Making all in domxml
> > /bin/sh
> > /usr/ports/www/mod_php4/work/php-4.2.1/libtool --silent --mode=compile
> >
c  -I. -I/usr/ports/www/mod_php4/work/php-4.2.1/ext/domxml -I/usr/ports/www/
> >
mod_php4/work/php-4.2.1/main -I/usr/ports/www/mod_php4/work/php-4.2.1 -I/usr
> >
/local/include/apache -I/usr/ports/www/mod_php4/work/php-4.2.1/Zend -I/usr/l
> >
cal/include/libxml2 -I/usr/local/include -I/usr/local/include/mysql  -DHARD
> >
_SERVER_LIMIT=512 -DDOCUMENT_LOCATION="/usr/local/www/data/" -DDEFAULT_PATH=
> >
"/usr/local/bin:/bin:/usr/bin" -DACCEPT_FILTER_NAME="httpready" -DMOD_SSL=20
> >
8106 -DEAPI -DEAPI_MM -DUSE_EXPAT -I/usr/ports/www/mod_php4/work/php-4.2.1/T
> > SRM -O -pipe -I/usr/local/include -prefer-pic  -c php_domxml.c
> > php_domxml.c: In function `zif_domxml_doc_get_element_by_id':
> > php_domxml.c:2675: warning: passing arg 2 of `xmlHashScan' from
incompatible
> > pointer type
> > php_domxml.c: In function `zif_domxml_doc_ids':
> > php_domxml.c:3292: warning: passing arg 2 of `xmlHashScan' from
incompatible
> > pointer type
> > php_domxml.c: In function `zif_xmldoc':
> > php_domxml.c:3309: `xmlDoValidityCheckingDefaultValue' undeclared (first
use
> > in this function)
> > php_domxml.c:3309: (Each undeclared identifier is reported only once
> > php_domxml.c:3309: for each function it appears in.)
> > php_domxml.c:3325: `xmlLoadExtDtdDefaultValue' undeclared (first use in
this
> > function)
> > *** Error code 1
> >
> > Stop in /usr/ports/www/mod_php4/work/php-4.2.1/ext/domxml.
> >
> > We have installed 4.2.1 on our linux machines without any problems but
just
> > cant get it to work on FreeBSD.
> > We have tried installing from the FreeBSD port and also directly from
the
> > source code, but get the same results.
> > Can anyone shed some light on what the problem could be?
> >
> > Thanks,
> >
> > Rob
> >
> >
> > --
> > PHP Development Mailing List 
> > To unsubscribe, visit: http://www.php.net/unsub.php
>
> --
> Please always Cc to me when replying to me on the lists.
> GnuPG Key: http://guru.josefine.at/~mfischer/C2272BD0.asc
> -
> "I mean "When in doubt, blame mcrypt" is more often right than wrong :)"
> "Always right, never wrong :)"
> - Two PHP developers who want to remain unnamed
>
> --
> 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] cant compile 4.2.1 on FreeBSD with domxml support

2002-05-17 Thread Markus Fischer

What version of libxml2 ? Needs to be >= 2.4.14

On Fri, May 17, 2002 at 06:11:42PM -0400, Rob Richards wrote : 
> I am trying to install 4.2.1 on FreeBSD 4.4 STABLE.
> It continues to fail during make in domxml with the following:
> 
> Making all in domxml
> /bin/sh
> /usr/ports/www/mod_php4/work/php-4.2.1/libtool --silent --mode=compile
> c  -I. -I/usr/ports/www/mod_php4/work/php-4.2.1/ext/domxml -I/usr/ports/www/
> mod_php4/work/php-4.2.1/main -I/usr/ports/www/mod_php4/work/php-4.2.1 -I/usr
> /local/include/apache -I/usr/ports/www/mod_php4/work/php-4.2.1/Zend -I/usr/l
> ocal/include/libxml2 -I/usr/local/include -I/usr/local/include/mysql  -DHARD
> _SERVER_LIMIT=512 -DDOCUMENT_LOCATION="/usr/local/www/data/" -DDEFAULT_PATH=
> "/usr/local/bin:/bin:/usr/bin" -DACCEPT_FILTER_NAME="httpready" -DMOD_SSL=20
> 8106 -DEAPI -DEAPI_MM -DUSE_EXPAT -I/usr/ports/www/mod_php4/work/php-4.2.1/T
> SRM -O -pipe -I/usr/local/include -prefer-pic  -c php_domxml.c
> php_domxml.c: In function `zif_domxml_doc_get_element_by_id':
> php_domxml.c:2675: warning: passing arg 2 of `xmlHashScan' from incompatible
> pointer type
> php_domxml.c: In function `zif_domxml_doc_ids':
> php_domxml.c:3292: warning: passing arg 2 of `xmlHashScan' from incompatible
> pointer type
> php_domxml.c: In function `zif_xmldoc':
> php_domxml.c:3309: `xmlDoValidityCheckingDefaultValue' undeclared (first use
> in this function)
> php_domxml.c:3309: (Each undeclared identifier is reported only once
> php_domxml.c:3309: for each function it appears in.)
> php_domxml.c:3325: `xmlLoadExtDtdDefaultValue' undeclared (first use in this
> function)
> *** Error code 1
> 
> Stop in /usr/ports/www/mod_php4/work/php-4.2.1/ext/domxml.
> 
> We have installed 4.2.1 on our linux machines without any problems but just
> cant get it to work on FreeBSD.
> We have tried installing from the FreeBSD port and also directly from the
> source code, but get the same results.
> Can anyone shed some light on what the problem could be?
> 
> Thanks,
> 
> Rob
> 
> 
> -- 
> PHP Development Mailing List 
> To unsubscribe, visit: http://www.php.net/unsub.php

-- 
Please always Cc to me when replying to me on the lists.
GnuPG Key: http://guru.josefine.at/~mfischer/C2272BD0.asc
-
"I mean "When in doubt, blame mcrypt" is more often right than wrong :)"
"Always right, never wrong :)"
- Two PHP developers who want to remain unnamed

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




[PHP-DEV] cant compile 4.2.1 on FreeBSD with domxml support

2002-05-17 Thread Rob Richards

I am trying to install 4.2.1 on FreeBSD 4.4 STABLE.
It continues to fail during make in domxml with the following:

Making all in domxml
/bin/sh
/usr/ports/www/mod_php4/work/php-4.2.1/libtool --silent --mode=compile
c  -I. -I/usr/ports/www/mod_php4/work/php-4.2.1/ext/domxml -I/usr/ports/www/
mod_php4/work/php-4.2.1/main -I/usr/ports/www/mod_php4/work/php-4.2.1 -I/usr
/local/include/apache -I/usr/ports/www/mod_php4/work/php-4.2.1/Zend -I/usr/l
ocal/include/libxml2 -I/usr/local/include -I/usr/local/include/mysql  -DHARD
_SERVER_LIMIT=512 -DDOCUMENT_LOCATION="/usr/local/www/data/" -DDEFAULT_PATH=
"/usr/local/bin:/bin:/usr/bin" -DACCEPT_FILTER_NAME="httpready" -DMOD_SSL=20
8106 -DEAPI -DEAPI_MM -DUSE_EXPAT -I/usr/ports/www/mod_php4/work/php-4.2.1/T
SRM -O -pipe -I/usr/local/include -prefer-pic  -c php_domxml.c
php_domxml.c: In function `zif_domxml_doc_get_element_by_id':
php_domxml.c:2675: warning: passing arg 2 of `xmlHashScan' from incompatible
pointer type
php_domxml.c: In function `zif_domxml_doc_ids':
php_domxml.c:3292: warning: passing arg 2 of `xmlHashScan' from incompatible
pointer type
php_domxml.c: In function `zif_xmldoc':
php_domxml.c:3309: `xmlDoValidityCheckingDefaultValue' undeclared (first use
in this function)
php_domxml.c:3309: (Each undeclared identifier is reported only once
php_domxml.c:3309: for each function it appears in.)
php_domxml.c:3325: `xmlLoadExtDtdDefaultValue' undeclared (first use in this
function)
*** Error code 1

Stop in /usr/ports/www/mod_php4/work/php-4.2.1/ext/domxml.

We have installed 4.2.1 on our linux machines without any problems but just
cant get it to work on FreeBSD.
We have tried installing from the FreeBSD port and also directly from the
source code, but get the same results.
Can anyone shed some light on what the problem could be?

Thanks,

Rob


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




Re: [PHP-DEV] [PATCH] add lchown as a third parameter to chown and chgrp

2002-05-17 Thread Andi Gutmans

Seems fine to me.

Andi

At 12:41 17/05/2002 +0200, Daniel BODEA wrote:
>No reaction the first time so this is a repost.
>
>Diffed against the stable 4.2.0 source tree. Adds an optional third bool to
>chown and chgrp that makes use of the lchown system call to change the owner
>and group of the symlink itself, and not the final target. The default
>behavior is unchanged.
>
>D
>
>--
>PHP Development Mailing List 
>To unsubscribe, visit: http://www.php.net/unsub.php


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




[PHP-DEV] Re: Bug #17272 Updated: Failure to read Flash MX file size

2002-05-17 Thread Derick Rethans

On Fri, 17 May 2002, Joel Johannesen wrote:

> The default format when publishing Flash files, using the new Flash 6 ("MX") 
>software, is the new Flash 6.SWF format using compression.  Users do have the option 
>of unchecking the box and NOT compressing the files, or publishing them to any 
>earlier version of the Flash.SWF format which don't even have compression as an 
>option.  But they're all saved as FLASH.SWF files.  
> 
> I suspect the biggest difference between Flash 5 and Flash 6 ("MX") .SWF files is 
>compression.
> 
> I am not aware of the .SWC format, and it certainly isn't readily apparent to users 
>of the new Flash MX.

I didn't say .swc, but swc :) It's the identifier (first three chars in 
the file) for MX files with compression it seems. But as I've no clue what 
compression scheme they used, I can't do anything about it :I

Derick

>   - Original Message - 
>   From: PHP Bug Database 
>   To: [EMAIL PROTECTED] 
>   Sent: Friday, May 17, 2002 10:27 AM
>   Subject: Bug #17272 Updated: Failure to read Flash MX file size
> 
> 
>   ATTENTION! Do NOT reply to this email!
>   To reply, use the web interface found at
>   http://bugs.php.net/?id=17272&edit=2
> 
> 
>ID:   17272
>Updated by:   [EMAIL PROTECTED]
>Reported By:  [EMAIL PROTECTED]
>   -Status:   Open
>   +Status:   Suspended
>Bug Type: Feature/Change Request
>Operating System: N/A
>PHP Version:  4.1.2
>New Comment:
> 
>   I'm suspending this until somebody can show me some documentation on
>   the new fileformat. Apperently there are two Flash 6 formats, the SWF
>   one (which works fine and is the same as Flash 5) and the SWC one,
>   which is some compressed format.
> 
>   Derick
> 
> 
>   Previous Comments:
>   
> 
>   [2002-05-16 13:22:22] [EMAIL PROTECTED]
> 
>   Not really a bug, as it was not written for this :)
>   Anyway, if you could mail me  empty flash movies with the following
>   size, I'll see what I can do:
> 
>   255x127
>   640x480
>   400x256
>   (and perhaps some more)
> 
>   Derick
> 
>   
> 
>   [2002-05-16 12:22:48] [EMAIL PROTECTED]
> 
>   The problem is with the getimagesize() function and its detection
>   routines which don't detect Flash 6/MX content.
> 
>   
> 
>   [2002-05-16 12:00:44] [EMAIL PROTECTED]
> 
>   Flash file size detection seems to not work for Flash files published
>   in the new Flash "MX" (version 6).  When published to version 5 or
>   lower, it works.
> 
>   
> 
> 
> 
> 

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



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




Re: [PHP-DEV] Garbage Collection!

2002-05-17 Thread Robert Cummings

Zeev Suraski wrote:
> 
> If you're adding elements to a hash you created using array_init(), and
> you're using the standard macros (which apparently you are) - then yes, the
> engine will take care of garbage collection for you.

Thanks a lot, this is what I needed to know, I guess somehow I have
allocation going on somewhere else.

Cheers,
Rob.
-- 
.-.
| Robert Cummings |
:-`.
| Webdeployer - Chief PHP and Java Programmer  |
:--:
| Mail  : mailto:[EMAIL PROTECTED] |
| Phone : (613) 731-4046 x.109 |
:--:
| Website : http://www.webmotion.com   |
| Fax : (613) 260-9545 |
`--'

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




Re: [PHP-DEV] Garbage Collection!

2002-05-17 Thread Zeev Suraski

If you're adding elements to a hash you created using array_init(), and 
you're using the standard macros (which apparently you are) - then yes, the 
engine will take care of garbage collection for you.

At 09:27 PM 5/17/2002, Robert Cummings wrote:
>Zeev Suraski wrote:
> >
> > At 09:04 PM 5/17/2002, Robert Cummings wrote:
> > >To be honest I'm passing the return_value into my recursion
> >
> > Not sure what you mean by that - return_value is handled by the engine as
> > soon as you return from your function implementation, if that's what you're
> > asking.  If you're using it internally, then you're responsible for it
> > until you return from your code.
>
>Well I'm creating a nested hash that I want to return ultimately, so
>at my first recursive step I pass return_value as the hash to be filled.
>However at various steps in the recursion I add elements to the hash that
>overwrite default values. So my question is whether during this recursive
>process does the garbage collector run when I overwrite a hash entry?
>Hope that clears things up.
>
>Cheers,
>Rob.
>--
>.-.
>| Robert Cummings |
>:-`.
>| Webdeployer - Chief PHP and Java Programmer  |
>:--:
>| Mail  : mailto:[EMAIL PROTECTED] |
>| Phone : (613) 731-4046 x.109 |
>:--:
>| Website : http://www.webmotion.com   |
>| Fax : (613) 260-9545 |
>`--'


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




Re: [PHP-DEV] Garbage Collection!

2002-05-17 Thread Robert Cummings

Zeev Suraski wrote:
> 
> At 09:04 PM 5/17/2002, Robert Cummings wrote:
> >To be honest I'm passing the return_value into my recursion
> 
> Not sure what you mean by that - return_value is handled by the engine as
> soon as you return from your function implementation, if that's what you're
> asking.  If you're using it internally, then you're responsible for it
> until you return from your code.

Well I'm creating a nested hash that I want to return ultimately, so
at my first recursive step I pass return_value as the hash to be filled.
However at various steps in the recursion I add elements to the hash that
overwrite default values. So my question is whether during this recursive
process does the garbage collector run when I overwrite a hash entry?
Hope that clears things up.

Cheers,
Rob.
-- 
.-.
| Robert Cummings |
:-`.
| Webdeployer - Chief PHP and Java Programmer  |
:--:
| Mail  : mailto:[EMAIL PROTECTED] |
| Phone : (613) 731-4046 x.109 |
:--:
| Website : http://www.webmotion.com   |
| Fax : (613) 260-9545 |
`--'

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




Re: [PHP-DEV] Garbage Collection!

2002-05-17 Thread Zeev Suraski

At 09:04 PM 5/17/2002, Robert Cummings wrote:
>To be honest I'm passing the return_value into my recursion

Not sure what you mean by that - return_value is handled by the engine as 
soon as you return from your function implementation, if that's what you're 
asking.  If you're using it internally, then you're responsible for it 
until you return from your code.

Zeev


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




Re: [PHP-DEV] Garbage Collection!

2002-05-17 Thread Robert Cummings

Zeev Suraski wrote:
> 
> At 08:53 PM 5/17/2002, Robert Cummings wrote:
> >Let's say I do:
> >
> > zval *newVar;
> > MAKE_STD_ZVAL( newVar );
> > ZEND_SET_SYMBOL( &EG(symbol_table), "varKey", newVar );
> >
> >and then I do:
> >
> > MAKE_STD_ZVAL( newVar );
> > ZEND_SET_SYMBOL( &EG(symbol_table), "varKey", newVar );
> >
> >This will overwrite my orignal newVar, however, will the original
> >newVar be garbaged collected or is this my responsibility now that
> >I'm out of PHP land? Also if it is auto garbage collected, is there
> >a way I can force garbage collection to run while I'm in a deep
> >recursion?
> 
> Whatever you register into the standard data structures, EG(symbol_table)
> included, is taken care of by the engine.  In that case, the old value will
> be destroyed as soon as you replace it in the 2nd SET_SYMBOL call.

To be honest I'm passing the return_value into my recursion
- is the same true of it? I ask because I watched my memory
consumption climb to over 500MB and all I use is
MAKE_STD_ZVAL( newVar ) and insert into some depth of the
recursion initially stored into return_value for the
calling function. My initial assumption was that indeed this
stuff is garbage collected... but maybe I'm doing something
wrong if this is collected at the moment of overwrite and
I'm seeing such massive allocations using top.

Cheers,
Rob.
-- 
.-.
| Robert Cummings |
:-`.
| Webdeployer - Chief PHP and Java Programmer  |
:--:
| Mail  : mailto:[EMAIL PROTECTED] |
| Phone : (613) 731-4046 x.109 |
:--:
| Website : http://www.webmotion.com   |
| Fax : (613) 260-9545 |
`--'

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




Re: [PHP-DEV] Garbage Collection!

2002-05-17 Thread Zeev Suraski

At 08:53 PM 5/17/2002, Robert Cummings wrote:
>Let's say I do:
>
> zval *newVar;
> MAKE_STD_ZVAL( newVar );
> ZEND_SET_SYMBOL( &EG(symbol_table), "varKey", newVar );
>
>and then I do:
>
> MAKE_STD_ZVAL( newVar );
> ZEND_SET_SYMBOL( &EG(symbol_table), "varKey", newVar );
>
>This will overwrite my orignal newVar, however, will the original
>newVar be garbaged collected or is this my responsibility now that
>I'm out of PHP land? Also if it is auto garbage collected, is there
>a way I can force garbage collection to run while I'm in a deep
>recursion?

Whatever you register into the standard data structures, EG(symbol_table) 
included, is taken care of by the engine.  In that case, the old value will 
be destroyed as soon as you replace it in the 2nd SET_SYMBOL call.

Zeev


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




[PHP-DEV] Garbage Collection!

2002-05-17 Thread Robert Cummings

Let's say I do:

zval *newVar;
MAKE_STD_ZVAL( newVar );
ZEND_SET_SYMBOL( &EG(symbol_table), "varKey", newVar );

and then I do:

MAKE_STD_ZVAL( newVar );
ZEND_SET_SYMBOL( &EG(symbol_table), "varKey", newVar );

This will overwrite my orignal newVar, however, will the original
newVar be garbaged collected or is this my responsibility now that
I'm out of PHP land? Also if it is auto garbage collected, is there
a way I can force garbage collection to run while I'm in a deep
recursion?

Cheers,
Rob.
-- 
.-.
| Robert Cummings |
:-`.
| Webdeployer - Chief PHP and Java Programmer  |
:--:
| Mail  : mailto:[EMAIL PROTECTED] |
| Phone : (613) 731-4046 x.109 |
:--:
| Website : http://www.webmotion.com   |
| Fax : (613) 260-9545 |
`--'

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




Re: RE: [PHP-DEV] Command line compilation under win32

2002-05-17 Thread Frank M. Kromann

Hi,

I have been building php binaries for core and extension automaticaly for more than a 
year, without any problems. I have a set of scripts (.cmd files) that updates my cvs 
tree, builds core and extensions and then copies the files to my website. The scripts 
are run each morning a 4am by the scheduler on my Windows 2000 box.

Using command line scripts with MSDEV enables you to use the build environment defined 
in your Visual Studio settings, but it also allows you to work with environment 
variables (INCLUDE and LIB) without actually changing your settings permanetly.

If you are interested in the scripts I would be happy to share.

- Frank
> From: Wez Furlong [mailto:[EMAIL PROTECTED]]
> > I'm in the process of getting a more permanent win32 build environment sorted
> > out, and one of the things I'd like to do is avoid the VS IDE as much as
> > possible, and automate builds so that I can test changes that I make under
> > unix. (Perhaps even by rshing to my win32 box).
> > 
> > I know it's possible to build projects from the command line using something
> > like "msdev xxx.dsw", but so far I've not succeeded (and have little patience
> > with win32 and the command line, because it is generally quite limited).
> 
> 
> If you try to do automated builds through "msdev" you run two risks:
> 
> 1.  The build environment is somewhat uncontrolled.  
> 2.  The IDE under some conditions will throw up dialogs and stop.
> 
> The first concern is with the global environment inherited from MSVC 
> and used in the build.  MSVC pulls in libraries and include files from
> you-don't-know-where and this makes it more difficult to know exactly
> what has changed between builds.  
> 
> If the machine used for automated builds is strictly controlled, and 
> used for nothing else this is less of a risk.
> 
> The second concern is simply that MSVC was designed as an interactive
> application and may at any time decide to ask a question of the user
> by presenting a dialog.  Naturally this brings an automated build to
> a complete stop :).  You may on occasion have to check the box doing
> the builds to make sure it has not become stopped in this fashion.
> 
> 
> There is another approach to this that is a more hassle, but is without 
> the above problems.  
> 
> In MSVC you can say "Projects | Export Makefile..." for all projects.
> This generates nmake makefiles (*.mak) for all projects in the workspace.
> 
> If you then specify the *exact* environment variables set when you run
> nmake then you know *exactly* the build environment in effect.
> 
> For my production builds (anything that might be shipped to a customer)
> and only after all the unit tests pass, I use a Perl script to:
> 
> 1)  Set the environment to use in the build.
> 2)  Update local sources from CVS.
> 3)  Bump the build number (updates version .h and .rc files).
> 4)  Run "make clean".
> 5)  Commit all changes to CVS.
> 6)  Run "make dist" to build a distribution.
> 7)  Tag the sources in CVS with the build number.
> 8)  (Optional) upload the distribution to an FTP server.
> 
> The exact same build script works in exactly the same way (with the
> exception of the platform-specific makefiles) on Unix, Windows, and
> (in one case) on OS/390.
> 
> OK - so maybe this is a lot more complicated :).
> 
> The upside is that from the build number compiled into the executables
> you know *exactly* the sources and build environment used.  There are
> no manual intermediate steps and no possibility of human error.
> 
> --
> Preston L. Bannister
> http://members.cox.net/preston.bannister/
> pbannister on Yahoo Messenger
> 
> -- 
> 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] Command line compilation under win32

2002-05-17 Thread Preston L. Bannister

From: Wez Furlong [mailto:[EMAIL PROTECTED]]
> I'm in the process of getting a more permanent win32 build environment sorted
> out, and one of the things I'd like to do is avoid the VS IDE as much as
> possible, and automate builds so that I can test changes that I make under
> unix. (Perhaps even by rshing to my win32 box).
> 
> I know it's possible to build projects from the command line using something
> like "msdev xxx.dsw", but so far I've not succeeded (and have little patience
> with win32 and the command line, because it is generally quite limited).


If you try to do automated builds through "msdev" you run two risks:

1.  The build environment is somewhat uncontrolled.  
2.  The IDE under some conditions will throw up dialogs and stop.

The first concern is with the global environment inherited from MSVC 
and used in the build.  MSVC pulls in libraries and include files from
you-don't-know-where and this makes it more difficult to know exactly
what has changed between builds.  

If the machine used for automated builds is strictly controlled, and 
used for nothing else this is less of a risk.

The second concern is simply that MSVC was designed as an interactive
application and may at any time decide to ask a question of the user
by presenting a dialog.  Naturally this brings an automated build to
a complete stop :).  You may on occasion have to check the box doing
the builds to make sure it has not become stopped in this fashion.


There is another approach to this that is a more hassle, but is without 
the above problems.  

In MSVC you can say "Projects | Export Makefile..." for all projects.
This generates nmake makefiles (*.mak) for all projects in the workspace.

If you then specify the *exact* environment variables set when you run
nmake then you know *exactly* the build environment in effect.

For my production builds (anything that might be shipped to a customer)
and only after all the unit tests pass, I use a Perl script to:

1)  Set the environment to use in the build.
2)  Update local sources from CVS.
3)  Bump the build number (updates version .h and .rc files).
4)  Run "make clean".
5)  Commit all changes to CVS.
6)  Run "make dist" to build a distribution.
7)  Tag the sources in CVS with the build number.
8)  (Optional) upload the distribution to an FTP server.

The exact same build script works in exactly the same way (with the
exception of the platform-specific makefiles) on Unix, Windows, and
(in one case) on OS/390.

OK - so maybe this is a lot more complicated :).

The upside is that from the build number compiled into the executables
you know *exactly* the sources and build environment used.  There are
no manual intermediate steps and no possibility of human error.

--
Preston L. Bannister
http://members.cox.net/preston.bannister/
pbannister on Yahoo Messenger

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




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

2002-05-17 Thread Cliff Woolley

On Fri, 17 May 2002, Rasmus Lerdorf wrote:

> > -   return sapi_add_header(cookie, strlen(cookie), 0);
> > +   return sapi_add_header_ex(cookie, strlen(cookie), 0, 0 TSRMLS_CC);
>
> Yikes, what a suspicious looking patch!  This has been wrong all along for
> all SAPI modules, but works, at least for the Apache 1.x case because
> instead of checking the replace flag we check directly for Set-Cookie and
> do an add instead of a replace in that case.

Ah... now that explains a lot.

> As long as other SAPI modules ignored this incorrectly set replace flag
> they should be ok with this change.  My fear is that we may have some
> that implemented this flag with the reverse meaning.  So heads-up sapi
> module maintainers, check your code!

I was afraid of that.  Thanks for the code review and the heads-up,
Rasmus!

--Cliff


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




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

2002-05-17 Thread Rasmus Lerdorf

>   Modified files:
> /php4/ext/standardhead.c
>   Log:
>   Only the last cookie was getting set.  (You can have
>   more than one Set-Cookie: header, as indicated by
>   http://wp.netscape.com/newsref/std/cookie_spec.html.)
>
> - return sapi_add_header(cookie, strlen(cookie), 0);
> + return sapi_add_header_ex(cookie, strlen(cookie), 0, 0 TSRMLS_CC);

Yikes, what a suspicious looking patch!  This has been wrong all along for
all SAPI modules, but works, at least for the Apache 1.x case because
instead of checking the replace flag we check directly for Set-Cookie and
do an add instead of a replace in that case.  As long as other SAPI
modules ignored this incorrectly set replace flag they should be ok with
this change.  My fear is that we may have some that implemented this flag
with the reverse meaning.  So heads-up sapi module maintainers, check your
code!

-Rasmus


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




Re: [PHP-DEV] Command line compilation under win32

2002-05-17 Thread Wez Furlong

Thanks Zeev and Edin; that's just what I needed!

--Wez.



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




Re: [PHP-DEV] CVS Account Request: deucalion

2002-05-17 Thread Michael Virnstein

there's an anonymous cvs account so you can get your local
copy of php. you also can access php cvs via web: http://cvs.php.net

you only need an cvs account if you want to do editing, not for
studying the php core code. for studying i'd suggest using the
web site cvs.php.net or the anonymous cvs account

Regards Michael

"Dan Hardiker" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > TO study
>
> To study what? You are aware you dont need a CVS account to learn PHP, use
> PHP or do anything with PHP other than develop the core of PHP and edit
> directly (with an exception for the documentation).
> Thanks for your interest in PHP and may I suggest you goto
> http://www.php.net/ to study more about PHP.
>
> --
> Dan Hardiker [[EMAIL PROTECTED]]
> ADAM Software & Systems Engineer
>
>



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




Re: [PHP-DEV] CVS Account Request: deucalion

2002-05-17 Thread Dan Hardiker

> TO study

To study what? You are aware you dont need a CVS account to learn PHP, use
PHP or do anything with PHP other than develop the core of PHP and edit
directly (with an exception for the documentation).
Thanks for your interest in PHP and may I suggest you goto
http://www.php.net/ to study more about PHP.

-- 
Dan Hardiker [[EMAIL PROTECTED]]
ADAM Software & Systems Engineer



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




Re: [PHP-DEV] [PATCH] file.c, extended ftruncate

2002-05-17 Thread Faisal Nasim

{{{ proto
part updated...

Faisal

At 07:30 PM 5/17/2002, Faisal Nasim wrote:
>Hi,
>
>I don't have access to a Linux machine at the moment so I tested
>it out only on Win32/XP.
>
>Could somebody please quickly check and commit it...?
>
>Addition: ftruncate() can take a string parameter as well... I have
>added the safe_mode check (actually borrowed from unlink).
>
>That {{{ proto thing needs to docs needs to be updated as well.
>Maybe 'mixed' instead of 'resource'?
>
>Thanks!
>
>Faisal
>
>
>--
>PHP Development Mailing List 
>To unsubscribe, visit: http://www.php.net/unsub.php


--- tests\file.cSun May 12 21:08:32 2002
+++ file.c  Fri May 17 19:44:48 2002
@@ -1748,31 +1748,65 @@
 }
 /* }}} */
 
-/* {{{ proto int ftruncate(resource fp, int size)
-   Truncate file to 'size' length */
+/* {{{ proto int ftruncate(mixed file, int size)
+   Truncate file (pathname or file pointer) to 'size' length */
 PHP_NAMED_FUNCTION(php_if_ftruncate)
 {
-   zval **fp , **size;
+   zval **file , **size;
short int ret;
-   int type;
+   int type , fd;
void *what;
+   char* filename;
 
-   if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &fp, &size) == FAILURE) {
+   if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &file, &size) == 
+FAILURE) {
WRONG_PARAM_COUNT;
}
-   /* XXX: add stream support --Wez. */
 
-   what = zend_fetch_resource(fp TSRMLS_CC,-1, "File-Handle", &type, 3, le_fopen, 
le_popen, le_socket);
-   ZEND_VERIFY_RESOURCE(what);
+   convert_to_long_ex(size);
+
+   if ( Z_TYPE_PP(file) == IS_STRING )
+   {
+   convert_to_string_ex(file);
+   filename = Z_STRVAL_PP(file);
+
+   /* Safe-mode check, borrowed from ulink */
+   if (PG(safe_mode) && !php_checkuid(Z_STRVAL_PP(file), NULL, 
+CHECKUID_CHECK_FILE_AND_DIR)) {
+   RETURN_FALSE;
+   }
 
-   if (type == le_socket) {
-   php_error(E_WARNING, "can't truncate sockets!");
-   RETURN_FALSE;
+   if ( Z_STRLEN_PP(file) == 0 )
+   {
+   php_error(E_WARNING, "ftruncate() requires non-empty string or 
+a valid file-handle");
+   RETURN_FALSE;
+   }
+   
+   /* Borrowed from the copy routine */
+#ifdef PHP_WIN32
+   if ((fd=VCWD_OPEN_MODE(filename, _O_WRONLY|_O_CREAT|_O_BINARY, 
+_S_IWRITE))==-1) {
+#else
+   if ((fd=VCWD_OPEN(filename, O_WRONLY))==-1) {
+#endif
+   php_error(E_WARNING, "Unable to open '%s':  %s", filename, 
+strerror(errno));
+   close(fd);
+   RETURN_FALSE;
+   }
+
+   ret = ftruncate ( fd , Z_LVAL_PP(size) );
+   close ( fd );
}
+   else
+   {
+   /* XXX: add stream support --Wez. */
+   what = zend_fetch_resource(file TSRMLS_CC,-1, "File-Handle", &type, 3, 
+le_fopen, le_popen, le_socket);
+   ZEND_VERIFY_RESOURCE(what);
 
-   convert_to_long_ex(size);
+   if (type == le_socket) {
+   php_error(E_WARNING, "can't truncate sockets!");
+   RETURN_FALSE;
+   }
 
-   ret = ftruncate(fileno((FILE *) what), Z_LVAL_PP(size));
+   ret = ftruncate(fileno((FILE *) what), Z_LVAL_PP(size));
+   }
RETURN_LONG(ret + 1);
 }
 /* }}} */


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


Re: [PHP-DEV] Command line compilation under win32

2002-05-17 Thread Edin Kadribasic

> I'm in the process of getting a more permanent win32 build environment
sorted
> out, and one of the things I'd like to do is avoid the VS IDE as much as
> possible, and automate builds so that I can test changes that I make under
> unix. (Perhaps even by rshing to my win32 box).
>
> I know it's possible to build projects from the command line using
something
> like "msdev xxx.dsw", but so far I've not succeeded (and have little
patience
> with win32 and the command line, because it is generally quite limited).

Hi Wez,

After you installed your win32 build environment as specified in
http://www.php.net/manual/en/install.windows.php#install.windows.build
change directory to win32 in your php source tree and issue:

cmd /c msdev php4ts.dsp /MAKE "php4ts - Win32 Release_TS"

(I use cygwin bash shell for all command line work, so cmd /c is required)

This will make php4ts.lib, php4ts.dll and php-cgi.exe. If you want to
compile cli after that:

cmd /c msdev php4ts_cli.dsp /MAKE "php4ts_cli - Win32 Release_TS"

In order to build extension change to the ext dir (in this example bz2)

cd ext/bz2
cmd /c msdev bz2.dsp /MAKE "bz2 - Win32 Release_TS"

You should now have php_bz2 in ../../Realease_TS

One more thing: mdev recognizes some env variables like INCLUDE and LIB
specifying what gcc would take under -I and -L options. In oder to make
msdev use these add /USEENV to the command line.

Hope this gets you starded. You're welcome to write to me if you stumble
across any problems.

Edin



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




Re: [PHP-DEV] Command line compilation under win32

2002-05-17 Thread Zeev Suraski

Take a look at the attached script...

At 03:58 PM 5/17/2002, Wez Furlong wrote:
>Hey,
>
>I'm in the process of getting a more permanent win32 build environment sorted
>out, and one of the things I'd like to do is avoid the VS IDE as much as
>possible, and automate builds so that I can test changes that I make under
>unix. (Perhaps even by rshing to my win32 box).
>
>I know it's possible to build projects from the command line using something
>like "msdev xxx.dsw", but so far I've not succeeded (and have little patience
>with win32 and the command line, because it is generally quite limited).
>
>Could someone give me some pointers?  (Edin or Sebastian I think?)
>
>--Wez.
>
>--
>Wez Furlong
>The Brain Room Ltd.
>
>
>--
>PHP Development Mailing List 
>To unsubscribe, visit: http://www.php.net/unsub.php


@echo off
rem Usage:  build_php  [configuration] [build/rebuild]
rem 
rem php_version - Can be:
rem 1) A real PHP version, e.g. 4.0.3pl1, in which case
remphp-4.0.3pl1 will be used as the PHP source tree
rem 2) "cvs", in which case the 'php4' directory will be used
rem 3) "cvsup", which is like "cvs", except the CVS repository
remwill be updated first
rem
rem Author:  Zeev Suraski <[EMAIL PROTECTED]>

rem Defaults
set configuration=Release_TS
set build_type=/rebuild


if "%1" == "" goto no_php_version

:determine_configuration
rem Determine the configuration
if not "%2" == "" set configuration=%2

:determine_rebuild
rem Determine if we need to rebuild or not
if "%3" == "" goto determine_dir_suffix
if "%3" == "build" set build_type=
if "%3" == "rebuild" set build_type=/rebuild

:determine_dir_suffix
rem Determine directory suffix
set php_suffix=-%1

rem Handle CVS
if "%php_suffix%" == "-cvs" goto cvs
if "%php_suffix%" == "-cvsup" goto cvs
goto common

:cvs
set php_suffix=4

if not "%1" == "cvsup" goto common

cd php%php_suffix%
echo Updating php4 CVS...
cvs update -d
cd Zend
echo Updating Zend CVS...
cvs update -d
cd ..\TSRM
echo Updating TSRM CVS...
cvs update -d
cd ..
cd ..
goto common

:common
call vcvars32.bat


echo Building PHP %1 - Win32 %configuration%
cd php%php_suffix%\win32
msdev php4ts.dsw /make "php4dllts - Win32 %configuration%" %build_type%
msdev php4ts.dsw /make "php4ts - Win32 %configuration%"
msdev php4ts.dsw /make "php4isapi - Win32 %configuration%"
cd ..
cd ..

goto end

:no_php_version
echo Usage:  build_php [php_version] [configuration] [build/rebuild]
echo (default configuration: %configuration% %build_type%)
goto end

:end



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


[PHP-DEV] [PATCH] file.c, extended ftruncate

2002-05-17 Thread Faisal Nasim

Hi,

I don't have access to a Linux machine at the moment so I tested
it out only on Win32/XP.

Could somebody please quickly check and commit it...?

Addition: ftruncate() can take a string parameter as well... I have
added the safe_mode check (actually borrowed from unlink).

That {{{ proto thing needs to docs needs to be updated as well.
Maybe 'mixed' instead of 'resource'?

Thanks!

Faisal

--- tests\file.cSun May 12 21:08:32 2002
+++ file.c  Fri May 17 19:17:58 2002
@@ -1752,27 +1752,61 @@
Truncate file to 'size' length */
 PHP_NAMED_FUNCTION(php_if_ftruncate)
 {
-   zval **fp , **size;
+   zval **file , **size;
short int ret;
-   int type;
+   int type , fd;
void *what;
+   char* filename;
 
-   if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &fp, &size) == FAILURE) {
+   if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &file, &size) == 
+FAILURE) {
WRONG_PARAM_COUNT;
}
-   /* XXX: add stream support --Wez. */
 
-   what = zend_fetch_resource(fp TSRMLS_CC,-1, "File-Handle", &type, 3, le_fopen, 
le_popen, le_socket);
-   ZEND_VERIFY_RESOURCE(what);
+   convert_to_long_ex(size);
+
+   if ( Z_TYPE_PP(file) == IS_STRING )
+   {
+   convert_to_string_ex(file);
+   filename = Z_STRVAL_PP(file);
+
+   /* Safe-mode check, borrowed from ulink */
+   if (PG(safe_mode) && !php_checkuid(Z_STRVAL_PP(file), NULL, 
+CHECKUID_CHECK_FILE_AND_DIR)) {
+   RETURN_FALSE;
+   }
 
-   if (type == le_socket) {
-   php_error(E_WARNING, "can't truncate sockets!");
-   RETURN_FALSE;
+   if ( Z_STRLEN_PP(file) == 0 )
+   {
+   php_error(E_WARNING, "ftruncate() requires non-empty string or 
+a valid file-handle");
+   RETURN_FALSE;
+   }
+   
+   /* Borrowed from the copy routine */
+#ifdef PHP_WIN32
+   if ((fd=VCWD_OPEN_MODE(filename, _O_WRONLY|_O_CREAT|_O_BINARY, 
+_S_IWRITE))==-1) {
+#else
+   if ((fd=VCWD_OPEN(filename, O_WRONLY))==-1) {
+#endif
+   php_error(E_WARNING, "Unable to open '%s':  %s", filename, 
+strerror(errno));
+   close(fd);
+   RETURN_FALSE;
+   }
+
+   ftruncate ( fd , Z_LVAL_PP(size) );
+   close ( fd );
}
+   else
+   {
+   /* XXX: add stream support --Wez. */
+   what = zend_fetch_resource(file TSRMLS_CC,-1, "File-Handle", &type, 3, 
+le_fopen, le_popen, le_socket);
+   ZEND_VERIFY_RESOURCE(what);
 
-   convert_to_long_ex(size);
+   if (type == le_socket) {
+   php_error(E_WARNING, "can't truncate sockets!");
+   RETURN_FALSE;
+   }
 
-   ret = ftruncate(fileno((FILE *) what), Z_LVAL_PP(size));
+   ret = ftruncate(fileno((FILE *) what), Z_LVAL_PP(size));
+   }
RETURN_LONG(ret + 1);
 }
 /* }}} */


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


[PHP-DEV] CVS Account Request: deucalion

2002-05-17 Thread kwang hei Hur

TO study 

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




[PHP-DEV] Command line compilation under win32

2002-05-17 Thread Wez Furlong

Hey,

I'm in the process of getting a more permanent win32 build environment sorted
out, and one of the things I'd like to do is avoid the VS IDE as much as
possible, and automate builds so that I can test changes that I make under
unix. (Perhaps even by rshing to my win32 box).

I know it's possible to build projects from the command line using something
like "msdev xxx.dsw", but so far I've not succeeded (and have little patience
with win32 and the command line, because it is generally quite limited).

Could someone give me some pointers?  (Edin or Sebastian I think?)

--Wez.

-- 
Wez Furlong
The Brain Room Ltd.


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




[PHP-DEV] Re: undocumented feature with php.ini?

2002-05-17 Thread Michael Virnstein

forgot the php version i tested it with:
4.0.6 and 4.1.2

Regards Michael

"Michael Virnstein" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi...
>
> i recently found a msg in php.genereal about the ability to load my own
> php.ini file, although i'm hosted by a hosting company.
> I tried it out and yes, it worked. all i had to do was placing
> a file called php.ini in the document_root of my domain. if i create a
file
> with phpinfo() in it, i can see:
> Configuration File (php.ini) Path:
> /homepages/6/d23442196/htdocs/mylittle.de/php.ini
> with all my settings got loaded.
> Is this intended to work like this? Never read anything about that feature
> in any
> documentation. Am I able to disable magic_quotes_gpc in the cgi version
this
> way,
> which usually is only possible with the module version of php.
> My phpinfo() call tells me so, but i don't know if it really works.
> Any infos on this feature are highly appreciated.
>
> Regards Michael
>
> P.S.: I usually post in php.general, but i think this question suits
better
> for php.dev
>
>



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




[PHP-DEV] undocumented feature with php.ini?

2002-05-17 Thread Michael Virnstein

Hi...

i recently found a msg in php.genereal about the ability to load my own
php.ini file, although i'm hosted by a hosting company.
I tried it out and yes, it worked. all i had to do was placing
a file called php.ini in the document_root of my domain. if i create a file
with phpinfo() in it, i can see:
Configuration File (php.ini) Path:
/homepages/6/d23442196/htdocs/mylittle.de/php.ini
with all my settings got loaded.
Is this intended to work like this? Never read anything about that feature
in any
documentation. Am I able to disable magic_quotes_gpc in the cgi version this
way,
which usually is only possible with the module version of php.
My phpinfo() call tells me so, but i don't know if it really works.
Any infos on this feature are highly appreciated.

Regards Michael

P.S.: I usually post in php.general, but i think this question suits better
for php.dev



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




Re: [PHP-DEV] PHP 4.2.1 build problems on Solaris (plus fix)

2002-05-17 Thread Edin Kadribasic

There is indeed a bug in autoconf 2.13, but autoconf 2.53 is even buggier.
It broke many things for people trying to install 4.2.0. The easy solution
for solaris users is to run:

CC=gcc ./configure ...

That should solve the problem.

Edin

- Original Message -
From: "Joerg Prante" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Friday, May 17, 2002 10:42 AM
Subject: [PHP-DEV] PHP 4.2.1 build problems on Solaris (plus fix)


Hi,

I got into trouble building PHP 4.2.1 with the option
'--with-openssl=[myopenssldir]' on Solaris 2.8. The 'configure'
script failed with

checking for OpenSSL version... configure failed: openssl > 0.9.5 is
required

even if a correct version of openssl 0.9.6c exists. This is
a bug because PHP 4.2.0 will build without any problems using
exactly the same 'configure' parameters.

I discovered the build failure is due to the change of the autoconf version
from PHP 4.2.0 to PHP 4.2.1 that created the 'configure' script.

The result is that PHP 4.2.1 builds may fail on Solaris.

Here is my fix. You have to install the latest GNU m4/autoconf/automake
utilities from ftp.gnu.org on your Solaris machine and re-run
'autoconf' in the  PHP 4.2.1 build directory to re-create a
correct 'configure' script.

I installed
GNU m4 1.4
GNU Autoconf 2.53
GNU Automake 1.6

Now, 'configure' will work as expected.

If this can be confirmed, a note in the INSTALL file would be appreciated.

Jörg Prante


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





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




[PHP-DEV] PHP 4.2.1 build problems on Solaris (plus fix)

2002-05-17 Thread Joerg Prante

Hi,

I got into trouble building PHP 4.2.1 with the option 
'--with-openssl=[myopenssldir]' on Solaris 2.8. The 'configure' 
script failed with

checking for OpenSSL version... configure failed: openssl > 0.9.5 is required

even if a correct version of openssl 0.9.6c exists. This is
a bug because PHP 4.2.0 will build without any problems using 
exactly the same 'configure' parameters.

I discovered the build failure is due to the change of the autoconf version 
from PHP 4.2.0 to PHP 4.2.1 that created the 'configure' script.

The result is that PHP 4.2.1 builds may fail on Solaris.

Here is my fix. You have to install the latest GNU m4/autoconf/automake 
utilities from ftp.gnu.org on your Solaris machine and re-run 
'autoconf' in the  PHP 4.2.1 build directory to re-create a 
correct 'configure' script.

I installed
GNU m4 1.4
GNU Autoconf 2.53
GNU Automake 1.6

Now, 'configure' will work as expected.

If this can be confirmed, a note in the INSTALL file would be appreciated.

Jörg Prante


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




Re: [PHP-DEV] Safe Mode

2002-05-17 Thread Zeev Suraski

At 04:38 PM 5/13/2002, Jason T. Greene wrote:


> > I do, for two simple reasons:
> > - Misperception about what it's supposed to do - it does NOT secure your
> > environment, people expect it to.  That's a 'marketing' issue, but we
> > should realize that these kinds of issues are at least as important as the
> > technical ones.
>
>
>I get the feeling that you are mainly arguing the marketing perspective.
>
>: )

Yep - safe mode is misperceived by a large number of people.  I, for one, 
can't define exactly what it does, and I'm fairly familiar with its 
spec.  I guess the closest I can get is by saying it makes tampering with 
other users' files more difficult, without being able to actually quantify 
it.  I believe that at large, it's perceived as some sort of a jail 
mechanism that allows you to let users on your shared hosting environment 
safely, which is absolutely not true.  However, if many people perceive it 
that way, then the problem is ours, not theirs.

>I completely agree that safe mode is badly named. However, I still find
>uid checking, and restricting process spawning very useful

The only problem I have with it is that by definition, it will always be 
possible to relatively easily circumvent these protections.  If it's not 
done in the OS level, then sooner or later, we would screw up and leave a 
hole.  And it only takes one hole - the thousand other holes which are 
plugged are meaningless.  Safe mode is something that virtually any buffer 
overflow exploit could work around, and my guess is that there are 
*MANY*.  We've had a big public one recently, because it was remotely 
exploitable - but I'm pretty sure that there are plenty more lurking in the 
code, that are only locally exploitable.  And that's assuming we manage to 
plug all of the 'high level' holes to begin with...

My point is simple - safe mode does uid checking and restricts process 
spawning - but it does so in a way which is inherently unreliable.  It's 
not impossible to make it reliable, but I believe it's not humanely 
possible either...

In a perfect world, ISPs would have used chroot'd environments always, 
running either CGI's or dedicated Apache's.  But then, we're on Earth...

Zeev


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




[PHP-DEV] [PATCH] add lchown as a third parameter to chown and chgrp

2002-05-17 Thread Daniel BODEA

No reaction the first time so this is a repost.

Diffed against the stable 4.2.0 source tree. Adds an optional third bool to
chown and chgrp that makes use of the lchown system call to change the owner
and group of the symlink itself, and not the final target. The default
behavior is unchanged.

D


--- TSRM/tsrm_virtual_cwd.h.origTue Dec 11 16:16:20 2001
+++ TSRM/tsrm_virtual_cwd.h Wed May  8 01:32:47 2002
@@ -132,6 +132,7 @@
 CWD_API int virtual_chmod(const char *filename, mode_t mode TSRMLS_DC);
 #ifndef TSRM_WIN32
 CWD_API int virtual_chown(const char *filename, uid_t owner, gid_t group TSRMLS_DC);
+CWD_API int virtual_lchown(const char *filename, uid_t owner, gid_t group TSRMLS_DC);
 #endif
 
 CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func 
verify_path);
@@ -181,6 +182,7 @@
 #define VCWD_CHMOD(path, mode) virtual_chmod(path, mode TSRMLS_CC)
 #ifndef TSRM_WIN32
 #define VCWD_CHOWN(path, owner, group) virtual_chown(path, owner, group TSRMLS_CC)
+#define VCWD_LCHOWN(path, owner, group) virtual_lchown(path, owner, group TSRMLS_CC)
 #endif
 
 #else
@@ -214,6 +216,7 @@
 #define VCWD_CHMOD(path, mode) chmod(path, mode)
 #ifndef TSRM_WIN32
 #define VCWD_CHOWN(path, owner, group) chown(path, owner, group)
+#define VCWD_LCHOWN(path, owner, group) lchown(path, owner, group)
 #endif
 
 #endif
--- TSRM/tsrm_virtual_cwd.c.origTue Dec 11 16:16:20 2001
+++ TSRM/tsrm_virtual_cwd.c Tue May  7 19:09:04 2002
@@ -538,6 +538,20 @@
CWD_STATE_FREE(&new_state);
return ret;
 }
+
+CWD_API int virtual_lchown(const char *filename, uid_t owner, gid_t group TSRMLS_DC)
+{
+   cwd_state new_state;
+   int ret;
+
+   CWD_STATE_COPY(&new_state, &CWDG(cwd));
+   virtual_file_ex(&new_state, filename, NULL);
+
+   ret = lchown(new_state.cwd, owner, group);
+
+   CWD_STATE_FREE(&new_state);
+   return ret;
+}
 #endif
 
 CWD_API int virtual_open(const char *path TSRMLS_DC, int flags, ...)
--- ext/standard/filestat.c.origThu Feb 28 09:26:45 2002
+++ ext/standard/filestat.c Wed May  8 03:42:11 2002
@@ -331,7 +331,7 @@
 }
 /* }}} */
 
-/* {{{ proto bool chgrp(string filename, mixed group)
+/* {{{ proto bool chgrp(string filename, mixed group [, bool no_dereference])
Change file group */
 PHP_FUNCTION(chgrp)
 {
@@ -340,10 +340,23 @@
gid_t gid;
struct group *gr=NULL;
int ret;
+   zval **no_dereference = NULL;
 
-   if (ZEND_NUM_ARGS()!=2 || zend_get_parameters_ex(2, &filename, 
&group)==FAILURE) {
+   switch (ZEND_NUM_ARGS()) {
+   case 2:
+   if (zend_get_parameters_ex(2, &filename, &group) == FAILURE)
+   WRONG_PARAM_COUNT;
+   break;
+
+   case 3:
+   if (zend_get_parameters_ex(3, &filename, &group, &no_dereference) == 
+FAILURE)
+   WRONG_PARAM_COUNT;
+   break;
+
+   default:
WRONG_PARAM_COUNT;
}
+
convert_to_string_ex(filename);
if (Z_TYPE_PP(group) == IS_STRING) {
gr = getgrnam(Z_STRVAL_PP(group));
@@ -367,7 +380,12 @@
RETURN_FALSE;
}
 
-   ret = VCWD_CHOWN(Z_STRVAL_PP(filename), -1, gid);
+   if (no_dereference && Z_BVAL_PP(no_dereference)) {
+   ret = VCWD_LCHOWN(Z_STRVAL_PP(filename), -1, gid);
+   } else {
+   ret = VCWD_CHOWN(Z_STRVAL_PP(filename), -1, gid);
+   }
+
if (ret == -1) {
php_error(E_WARNING, "chgrp failed: %s", strerror(errno));
RETURN_FALSE;
@@ -379,7 +397,7 @@
 }
 /* }}} */
 
-/* {{{ proto bool chown (string filename, mixed user)
+/* {{{ proto bool chown (string filename, mixed user [, bool no_dereference])
Change file owner */
 PHP_FUNCTION(chown)
 {
@@ -388,10 +406,23 @@
int ret;
uid_t uid;
struct passwd *pw = NULL;
+   zval **no_dereference = NULL;
 
-   if (ZEND_NUM_ARGS()!=2 || zend_get_parameters_ex(2, &filename, 
&user)==FAILURE) {
+   switch (ZEND_NUM_ARGS()) {
+   case 2:
+   if (zend_get_parameters_ex(2, &filename, &user) == FAILURE)
+   WRONG_PARAM_COUNT;
+   break;
+
+   case 3:
+   if (zend_get_parameters_ex(3, &filename, &user, &no_dereference) == 
+FAILURE)
+   WRONG_PARAM_COUNT;
+   break;
+
+   default:
WRONG_PARAM_COUNT;
}
+   
convert_to_string_ex(filename);
if (Z_TYPE_PP(user) == IS_STRING) {
pw = getpwnam(Z_STRVAL_PP(user));
@@ -415,7 +446,12 @@
RETURN_FALSE;
}
 
-   ret = VCWD_CHOWN(Z_STRVAL_PP(filename), uid, -1);
+   if (no_dereference && Z_BVAL_PP(no_dereference)) {
+   ret = VCWD_LCHOWN(Z_STRVAL_PP(filename), uid, -1);
+   } else {
+   ret = VCWD_CHOWN(Z_STRVAL_PP(filename), uid, -1);
+   }
+
if (ret == -1) {
php

Re: [PHP-DEV] [PATCH] Fix for bug 16888

2002-05-17 Thread Joseph Tate

We'll try this again.  Here's the patch in a .txt file.

- Original Message -
From: "Christian Stocker" <[EMAIL PROTECTED]>
To: "Joseph Tate" <[EMAIL PROTECTED]>
Cc: "Php-Dev List" <[EMAIL PROTECTED]>
Sent: Thursday, May 16, 2002 7:23 PM
Subject: Re: [PHP-DEV] [PATCH] Fix for bug 16888


> On Thu, 16 May 2002, Joseph Tate wrote:
>
> > The following fixes bug 16888 so that Apache and IIS no longer crash on
> > Windows when using the domxml extension with more than 128 nodes.  See
> > http://bugs.php.net/bug.php?id=16888 for details.
> >
> > Will the memory leak gurus please have a go at this and let me know what
> > problems arise?  Also, please test on non Win platforms to make sure
that no
> > functionality is lost.
>
> i certainly will (but i'm not the memory leak guru :) ), but the patch
> didn't make it through the mailing list. can you put it somewhere online?
> or send it to me personally, i can put it then on my webserver.
>
> chregu
>
>
> --
> nam...christian stockeradr...bremgartnerstr. 66, ch-8003 zurich
> pho...+41  1 451 6021  www...http://phant.ch/chregu
> mob...+41 76 561 8860  [EMAIL PROTECTED]
> wor...+41  1 240 5670  gpg...0x5CE1DECB
>
>
> --
> PHP Development Mailing List 
> To unsubscribe, visit: http://www.php.net/unsub.php


Index: php_domxml.c
===
RCS file: /repository/php4/ext/domxml/php_domxml.c,v
retrieving revision 1.151
diff -u -r1.151 php_domxml.c
--- php_domxml.c16 May 2002 21:59:24 -  1.151
+++ php_domxml.c17 May 2002 09:04:35 -
@@ -577,12 +577,11 @@
 static void php_free_xml_node(zend_rsrc_list_entry *rsrc TSRMLS_DC)
 {
xmlNodePtr node = (xmlNodePtr) rsrc->ptr;
-
-   if (node) {
-   zval *wrapper = dom_object_get_data(node);
-   if (wrapper)
-   zval_ptr_dtor(&wrapper);
-   }
+
+   node_wrapper_dtor(node);
+   //Should add a test here to make sure that refcount is 0 before setting to 
+null,
+   //and should move it to node_wrapper_dtor();
+   dom_object_set_data(node, NULL);
 }
 
 



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


RE: [PHP-DEV] Updated run-tests.php

2002-05-17 Thread Preston L. Bannister

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> testing right away on Linux :)
> 
> I've some comments:
> 
> [root@kossu php-4.3.0dev]# php run-tests.php 
> FAIL environment variable TEST_PHP_EXECUTABLE must be set to specify PHP executable!
> 
> Nice message, but I think it would be a good idea to default to the CLI if 
> it exists, and otherwise give this message. I think it's a nice thing that 
> as soon as PHP is compiled, users can do php run-tests.php without having 
> to tinker with environment variables. (And it annoyed me :)

Hopefully with something like the patch (at the end) you can just run "make test".


> After I settled the ini file problem, I encountered this:
> 
> [...(40 more extensions)...]
> 
> Will test compiled extension: dba
> Will test compiled extension: curl
> Will test compiled extension: ctype
> Will test compiled extension: zlib
> 
> =
>  directory /dat/dev/php/php-4.3.0dev/tests/basic
> Cannot open file ''!
> [root@kossu php-4.3.0dev]# 
> 
> 
> I can not dig in further right now, because I've no time.

Hmmm ...  any reason realpath() would fail?  

I'll check this out after I can convince the new Linux box to talk to 
the network.  (Don't want to push the old Linux box - after the power 
supply fan failed :).

Change that *should* be what is needed for the Unix make follows.
This is not committed (oddly enough) as it is untested.

In file Makefile.global change:

test: sapi/cli/php
   TOP_BUILDDIR=$(top_builddir) TOP_SRCDIR=$(top_srcdir) \
   $(top_builddir)/sapi/cli/php -c php.ini-dist $(top_srcdir)/run-tests.php 
$(TESTS)


to the following:
-
test: sapi/cli/php
cd $(top_srcdir) && \
TEST_PHP_EXECUTABLE=$(top_builddir)/sapi/cli/php \
TEST_PHP_DETAILED=0 \
TEST_PHP_ERROR_STYLE=EMACS \
$(TEST_PHP_EXECUTABLE) -c tests run-tests.php
-



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




Re: [PHP-DEV] Updated run-tests.php

2002-05-17 Thread derick

Hello,

testing right away on Linux :)

I've some comments:

[root@kossu php-4.3.0dev]# php run-tests.php 
FAIL environment variable TEST_PHP_EXECUTABLE must be set to specify PHP executable!

Nice message, but I think it would be a good idea to default to the CLI if 
it exists, and otherwise give this message. I think it's a nice thing that 
as soon as PHP is compiled, users can do php run-tests.php without having 
to tinker with environment variables. (And it annoyed me :)


After I setttled the ini file problem, I encountered this:

[...(40 more extensions)...]

Will test compiled extension: dba
Will test compiled extension: curl
Will test compiled extension: ctype
Will test compiled extension: zlib

=
 directory /dat/dev/php/php-4.3.0dev/tests/basic
Cannot open file ''!
[root@kossu php-4.3.0dev]# 


I can not dig in further right now, because I've no time.


Derick


On Fri, 17 May 2002, Preston L. Bannister wrote:

> Updated run-tests.php to work well on Win32.  
> 
> The changes *should* work on Unix as well, and I'll do some 
> testing once I finish getting my newer Linux box set up :).
> 
> Added some tricks I've found useful in writing unit tests:
> 
> * Require a specific explicit path to the PHP executable.
> * Require a php.ini file (to control the exact configuration).
> * Abort the test if any requirement is not met.
> * Log what exactly is being tested (version & path, etc.).
> * On failure log additional detail (to a seperate file).
> 
> Some enhancements:
> 
> * Run basic (non-extension/PEAR) tests first.
> * Added project to Win32 workspace, and made dependent on php4ts.
> * Generate compiler-style error reports that Emacs/MSVC can grok.
> 
> Put a little work into the test cases.  The entire tests.log file
> for Win32 is attached, with an abbreviated version below:
> 
> =
> TIME 2002-05-17 00:39:59 - start of test run
> CWD : C:\net.php\php4-work
> PHP : Debug_TS\\php-cgi.exe
> PHP_SAPI: cgi
> PHP_VERSION : 4.3.0-dev
> PHP_OS  : WINNT
> INI actual  : C:\net.php\php4-work\tests\php.ini
> INI wanted  : C:\net.php\php4-work\tests\php.ini
> INI tests   : C:\net.php\php4-work\Debug_TS\php.ini
> =
> Will test compiled extension: standard
> Will test compiled extension: bcmath
> Will test compiled extension: calendar
> Will test compiled extension: ctype
> Will test compiled extension: com
> Will test compiled extension: ftp
> Will test compiled extension: mbstring
> Will test compiled extension: mysql
> Will test compiled extension: odbc
> Will test compiled extension: overload
> Will test compiled extension: pcre
> Will test compiled extension: session
> Will test compiled extension: tokenizer
> Will test compiled extension: xml
> Will test compiled extension: wddx
> =
> [snip]
> =
> TIME 2002-05-17 00:40:23 - end of test run
> TEST RESULT SUMMARY
> =
> Number of tests :  223
> Tests skipped   :   70 (31.4%)
> Tests failed:   22 ( 9.9%)
> Tests passed:  131 (58.7%)
> =
> Skipped 24 extensions
> 
> 
> 

---
 Did I help you?   http://www.jdimedia.nl/derick/link.php?url=giftlist
 Frequent ranting: http://www.jdimedia.nl/derick/
---
 PHP: Scripting the Web - [EMAIL PROTECTED]
All your branches are belong to me!
SRM: Script Running Machine - www.vl-srm.net
---



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




[PHP-DEV] Updated run-tests.php

2002-05-17 Thread Preston L. Bannister

Updated run-tests.php to work well on Win32.  

The changes *should* work on Unix as well, and I'll do some 
testing once I finish getting my newer Linux box set up :).

Added some tricks I've found useful in writing unit tests:

* Require a specific explicit path to the PHP executable.
* Require a php.ini file (to control the exact configuration).
* Abort the test if any requirement is not met.
* Log what exactly is being tested (version & path, etc.).
* On failure log additional detail (to a seperate file).

Some enhancements:

* Run basic (non-extension/PEAR) tests first.
* Added project to Win32 workspace, and made dependent on php4ts.
* Generate compiler-style error reports that Emacs/MSVC can grok.

Put a little work into the test cases.  The entire tests.log file
for Win32 is attached, with an abbreviated version below:

=
TIME 2002-05-17 00:39:59 - start of test run
CWD : C:\net.php\php4-work
PHP : Debug_TS\\php-cgi.exe
PHP_SAPI: cgi
PHP_VERSION : 4.3.0-dev
PHP_OS  : WINNT
INI actual  : C:\net.php\php4-work\tests\php.ini
INI wanted  : C:\net.php\php4-work\tests\php.ini
INI tests   : C:\net.php\php4-work\Debug_TS\php.ini
=
Will test compiled extension: standard
Will test compiled extension: bcmath
Will test compiled extension: calendar
Will test compiled extension: ctype
Will test compiled extension: com
Will test compiled extension: ftp
Will test compiled extension: mbstring
Will test compiled extension: mysql
Will test compiled extension: odbc
Will test compiled extension: overload
Will test compiled extension: pcre
Will test compiled extension: session
Will test compiled extension: tokenizer
Will test compiled extension: xml
Will test compiled extension: wddx
=
[snip]
=
TIME 2002-05-17 00:40:23 - end of test run
TEST RESULT SUMMARY
=
Number of tests :  223
Tests skipped   :   70 (31.4%)
Tests failed:   22 ( 9.9%)
Tests passed:  131 (58.7%)
=
Skipped 24 extensions





=
TIME 2002-05-17 00:39:59 - start of test run
CWD : C:\net.php\php4-work
PHP : Debug_TS\\php-cgi.exe
PHP_SAPI: cgi
PHP_VERSION : 4.3.0-dev
PHP_OS  : WINNT
INI actual  : C:\net.php\php4-work\tests\php.ini
INI wanted  : C:\net.php\php4-work\tests\php.ini
INI tests   : C:\net.php\php4-work\Debug_TS\php.ini
=

Will test compiled extension: standard
Will test compiled extension: bcmath
Will test compiled extension: calendar
Will test compiled extension: ctype
Will test compiled extension: com
Will test compiled extension: ftp
Will test compiled extension: mbstring
Will test compiled extension: mysql
Will test compiled extension: odbc
Will test compiled extension: overload
Will test compiled extension: pcre
Will test compiled extension: session
Will test compiled extension: tokenizer
Will test compiled extension: xml
Will test compiled extension: wddx

=
 directory C:\net.php\php4-work\tests\basic
PASS Trivial "Hello World" test
PASS Simple POST Method test
PASS GET and POST Method combined
PASS Two variables in POST data
PASS Three variables in POST data
PASS Add 3 variables together and print result
PASS Multiply 3 variables and print result
PASS Divide 3 variables and print result
PASS Subtract 3 variables and print result
PASS Testing | and & operators
PASS Testing $argc and $argv handling
 directory C:\net.php\php4-work\tests\classes
PASS Classes general test
PASS Classes inheritance test
 directory C:\net.php\php4-work\tests
PASS dirname test
 directory C:\net.php\php4-work\tests\func
PASS Strlen() function test
PASS Static variables in functions
PASS General function test
PASS General function test
PASS Testing register_shutdown_function()
FAIL Output buffering tests (006.phpt).
C:\net.php\php4-work\tests\func\006.phpt(1) : Output buffering tests
C:\net.php\php4-work\tests\func\006.log(1) :  Output buffering tests
PASS INI functions test
 directory C:\net.php\php4-work\tests\lang
PASS Simple If condition test
PASS Simple While Loop Test
PASS Simple Switch Test
PASS Simple If/Else Test
PASS Simple If/ElseIf/Else Test
PASS Nested If/ElseIf/Else Test
PASS Function call with global and static variables
PASS Testing recursive function
PASS Testing function parameter passing
PASS Testing function parameter passing with a return value
PASS Testing nested functions
PASS Testing stack after early function return
PASS Testing eval function
PASS Testing eval functio

[PHP-DEV] Re: [PHP] Re: [PHP-DEV] Console application with PHP

2002-05-17 Thread D Lau

Sorry, I forgot to say my requirement is to make this a browser only
application.
Would all these still works?

Thanks
Dominic

- Original Message -
From: "Vail, Warren" <[EMAIL PROTECTED]>
To: "'Markus Fischer'" <[EMAIL PROTECTED]>; "DoL"
<[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Friday, May 17, 2002 5:31 AM
Subject: RE: [PHP] Re: [PHP-DEV] Console application with PHP


> Does this work on Windows, or is it restricted to Linux/unix?
>
>
> Warren Vail
> Tools, Metrics & Quality Processes
> (415) 667-7814
> Pager (877) 774-9891
> 215 Fremont 02-658
>
>
> -Original Message-
> From: Markus Fischer [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, May 16, 2002 11:58 AM
> To: DoL
> Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: [PHP] Re: [PHP-DEV] Console application with PHP
>
>
> Hi,
>
> all is possible. I suggest taking a look at
> http://gtk.php.net/ and
> http://www.php.net/manual/en/features.commandline.php for a
> start.
>
> - Markus
>
> On Fri, May 17, 2002 at 12:12:20AM +0800, DoL wrote :
> > Hi All
> >
> > I am trying to write something similar to a server console display, is
it
> a
> > good idea to use PHP?
> >
> > Wondering how things like
> > 1. server clock (similar to a clock applet)
> > 2. server status
> > can be displayed with PHP code?
> >
> > Note: I need to display the above two in a continuous fashion on the
> status
> > bar!!
> >
> > Many Thanks
> > Dominic
> >
> >
> >
> >
> > --
> > PHP Development Mailing List 
> > To unsubscribe, visit: http://www.php.net/unsub.php
>
> --
> Please always Cc to me when replying to me on the lists.
> GnuPG Key: http://guru.josefine.at/~mfischer/C2272BD0.asc
> -
> "I mean "When in doubt, blame mcrypt" is more often right than wrong :)"
> "Always right, never wrong :)"
> - Two PHP developers who want to remain unnamed
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php


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