[PHP-DEV] CVS Account Request: jkachlik

2002-03-03 Thread Jan Kachlik

Study php, help with translations to czech language

-- 
PHP Development Mailing List http://wwwphpnet/
To unsubscribe, visit: http://wwwphpnet/unsubphp




[PHP-DEV] comparing strings values, etc.

2002-03-03 Thread Tim Martens

Hi - I'm a major newbie

 - I have a file that pulls an include into a textarea for a user to edit
 - before pulling the include, I'd like to open it and check it's value
 - if the include's value is exactly equal to the string:
div style='color: #eee; font: bold 80px Georgia, serif'Hello World/div
then I want to overwrite that string with nothing; close the include; and
then load it (now null) into the textarea
 - else, if the include's value is not equal to the above string, just load
it into the textarea

However embarrassing, I'll give what I have which hasn't been working

$noting = ;
$checkval = div style='color: #F00; font: bold 80px Georgia, serif'Hello
World/div;
$filename = thefileinc;

$fd = fopen ($filename, w);
$contents = fread ($fd, filesize ($filename));
if ($contents == fread ($checkval)) {
fwrite ($filename, $nothing);
fclose ($fd);
include($filename);
 } else {
 fclose ($fd);
 include($filename);
}
clearstatcache();//for the next time around?

Also - does thefileinc have to be CHMOD 666?
BTW - the server is running PHP4/Apache

thx//t



-- 
PHP Development Mailing List http://wwwphpnet/
To unsubscribe, visit: http://wwwphpnet/unsubphp




Re: [PHP-DEV] comparing strings values, etc.

2002-03-03 Thread derick

Hello Tim,

you should be writing to the [EMAIL PROTECTED] mailinglist. This
list is fro developing PHP, not for developing _with_ PHP.

regards,
Derick

On Sun, 3 Mar 2002, Tim Martens wrote:

 Hi - I'm a major newbie.

  - I have a file that pulls an include into a textarea for a user to edit
  - before pulling the include, I'd like to open it and check it's value
  - if the include's value is exactly equal to the string:
 div style='color: #eee; font: bold 80px Georgia, serif'Hello World/div
 then I want to overwrite that string with nothing; close the include; and
 then load it (now null) into the textarea
  - else, if the include's value is not equal to the above string, just load
 it into the textarea

 However embarrassing, I'll give what I have which hasn't been working

 $noting = ;
 $checkval = div style='color: #F00; font: bold 80px Georgia, serif'Hello
 World/div;
 $filename = thefile.inc;

 $fd = fopen ($filename, w);
 $contents = fread ($fd, filesize ($filename));
 if ($contents == fread ($checkval)) {
 fwrite ($filename, $nothing);
 fclose ($fd);
 include($filename);
  } else {
  fclose ($fd);
  include($filename);
 }
 clearstatcache();//for the next time around?

 Also - does thefile.inc have to be CHMOD 666?
 BTW - the server is running PHP4/Apache.

 thx//t



 --
 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] php + cygwin - some more

2002-03-03 Thread Stanislav Malyshev

Ok, seeing that some people indeed do use cygwin to build PHP, here's 
report about my achievements:

After upgrading cygwin to latest version (1.3.10-1) and all tools there
(autoconf 2.52, libtool 1.4e) and checking out latest CVS, it builds. Only
problems being:

1. line 187 of datetime.c - complains about timezone, since timezone is 
defined as function in headers. Changed to _timezone, seems to work.
2. A lot of undefined symbols in XML modules. Rebuilt with 
--without-xml, since no time to investigate further on this.

Besides that, builds php.exe cleanly. Still don't know if and how is 
possible to build .dll for apache with cygwin.
-- 
Stanislav Malyshev, Zend Products Engineer   
[EMAIL PROTECTED]  http://www.zend.com/ +972-3-6139665 ext.115



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




[PHP-DEV] GetImageSize,read_exif_data,Bug #6787,#14994

2002-03-03 Thread Marcus Boerger

Hi Rasmus,

today i woke up and i think the solution is to have read_exif_data
a third parameter whether or not to return information if no exif is
present. And to support TIFFs with GetImageSize we only need
a small addition of say less than 100 lines c code...

marcus
--

[sorry first one has gone to wrong mailing list - so here again]

Hi Rasmus,

i think Serge is correct because one can use standard functions for
FileName,FileDateTime and FileSize. So better reply with false.
The other solution would be adding an array entry 'EXIFPresent' (true|false)
BUT i think that is not so good.

 From my point of view i would like to discuss the difference between
getimagesize and read_exif_data a little:

We would need some function*ality* from exif.c in image.c to support TIFF.
When we have those functions we would be able to interpret APP markers
of JPEG also (see below).

I suppose we check whether or not ext/exif is present and then return
read_exif_data results in GetImageSize (i do not see the point of returning
and APP marker section which has to be interpreted). Then we should also
make ext/exif default to present and change switch from --enable-exif to
--disable-exif (prefer this).

Or we move the necessary functions from exif.c to image.c and
then make ext/exif optional for editing exif headers in the future.

If to many people use APP return info we could use a third parameter to
return interpreted values.

The real point here is that i do not know what APP markers and EXIF
headers have to do with GetImageSize but we have the information when
adding TIFF support.

what do you think?

marcus

---

#6787
[17 Sep 2000 6:07am] [EMAIL PROTECTED]
Hi Guys,

It seems that read_exif_data builds certain fields like
FileName, FileDateTime, FileSize etc .. even when no real
EXIF data exists. So read_exif_data will always return something!

This makes it a pain to test for the presence of actual EXIF data cause
I have to do something like this:

$exif_data = @read_exif_data($upload);
if (isset ($exif_data['CameraMake'])) {

Not very bullet proof 

Would be nice if it would not return anything without the presence of
actual EXIF data.

Thanks, Serge

#14994
[11 Jan 6:07am] [EMAIL PROTECTED]
I know, that Rasmus made the implementation for this function and that
he used the header readouts from an imageinfo.c, but I'm missing the
ability to identify TIFF images.
As i'm not firm with imageheaders, I'd like to ask someone to implement
this feature.




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




[PHP-DEV] CVS Account Request: morpehous

2002-03-03 Thread Vildan Hasanbegovic

I have a second year student in Science in Software Engineering and writing in PHP on 
the daily basis


-- 
PHP Development Mailing List http://wwwphpnet/
To unsubscribe, visit: http://wwwphpnet/unsubphp




Re: [PHP-DEV] GD Shared library confusion

2002-03-03 Thread Jani Taskinen


As long as the configm4's use PHP_ADD_LIBRARY_WITH_PATH()
and the other macros and don't touch LIBS themselves,
there won't be any /usr/lib entries in it

So, I'd check the la files There's propably libpspellla
which has -L/usr/lib defined in 'dependency_libs='

And then you can complain to the libtool folks about this :)
Easiest way to fix/test this is to just move all the la files
from /usr/lib to some other place

--Jani


On Sat, 2 Mar 2002, Rasmus Lerdorf wrote:

 This is the problem /usr/lib shouldn't be here
 In your working build you won't see it

Looks like ext/pspell/configm4 is the culprit

-Rasmus




-- 


-- 
PHP Development Mailing List http://wwwphpnet/
To unsubscribe, visit: http://wwwphpnet/unsubphp




Re: [PHP-DEV] GD Shared library confusion

2002-03-03 Thread Markus Fischer

On Sun, Mar 03, 2002 at 06:16:07PM +0200, Jani Taskinen wrote : 
 
 As long as the configm4's use PHP_ADD_LIBRARY_WITH_PATH()
 and the other macros and don't touch LIBS themselves,
 there won't be any /usr/lib entries in it
 
 So, I'd check the la files There's propably libpspellla
 which has -L/usr/lib defined in 'dependency_libs='
 
 And then you can complain to the libtool folks about this :)
 Easiest way to fix/test this is to just move all the la files
 from /usr/lib to some other place

Are you sure? On my system nearly all la files contain
-L/usr/lib in the dependency_libs line 

$ grep dependency_libs /usr/lib/*la|grep -- '-L/usr/lib '|wc -l
138

Or am I missing some specific point?

-- 
Please always Cc to me when replying to me on the lists
GnuPG Key: http://gurujosefineat/~mfischer/C2272BD0asc

-- 
PHP Development Mailing List http://wwwphpnet/
To unsubscribe, visit: http://wwwphpnet/unsubphp




Re: [PHP-DEV] GD Shared library confusion

2002-03-03 Thread Jani Taskinen


Libtool version? Not all have this problem

--Jani


On Sun, 3 Mar 2002, Markus Fischer wrote:

On Sun, Mar 03, 2002 at 06:16:07PM +0200, Jani Taskinen wrote :

 As long as the configm4's use PHP_ADD_LIBRARY_WITH_PATH()
 and the other macros and don't touch LIBS themselves,
 there won't be any /usr/lib entries in it

 So, I'd check the la files There's propably libpspellla
 which has -L/usr/lib defined in 'dependency_libs='

 And then you can complain to the libtool folks about this :)
 Easiest way to fix/test this is to just move all the la files
 from /usr/lib to some other place

Are you sure? On my system nearly all la files contain
-L/usr/lib in the dependency_libs line 

$ grep dependency_libs /usr/lib/*la|grep -- '-L/usr/lib '|wc -l
138

Or am I missing some specific point?



-- 


-- 
PHP Development Mailing List http://wwwphpnet/
To unsubscribe, visit: http://wwwphpnet/unsubphp




[PHP-DEV] patches to rfc1687.c

2002-03-03 Thread Jim Segrave

 
 I will look later into the patch. But from a first look:
 the patch is bullshit. It opens up about 1000 security
 vulnerabilities because of double frees.

Yes - when I was going over the body of the code, I'd forgotten the
definition of SAFE_RETURN, which takes care of the frees. That was
carelessness on my part, I will admit.

 And: show me one system where memchr doesnt like zero as count. This
 would be a 100% misbehaviour and it is the libc programmers
 fault. If they don't write working libraries thats not our
 fault. (Hmm right now I am unsure if memchr is a gcc builtin
 function, too) And it is 100% assured that the buffer is zero
 terminated. All the complicated checks around the str* functions are
 not needed, cause those compares will fail on the terminating '\0'
 and stop. All the checks for more data aren't needed, cause the
 state maschine automaticly terminates if there is no data after a
 state swap.

Philosphical comment follows after.

I actually commented on where I was patching for this (to the effect
that it was probably overkill) and where there were other
problems. And there are other problems.

Line 233 does a memchr to find a new line. What happens if it fails?
Look at the two lines following. That portion of the submitted patch,
by any standard is not bogus nor bullshit.

  loc2 = memchr(loc + 1, '\n', rem);
  rem -= (loc2 - ptr) + 1;
  ptr = loc2 + 1;

That's bad code. 

Line 276 looks for a backslash in a submitted filename. If that
backslash is the last character, it will then call
safe_php_register_variable on an empty string. This is probably not a
good idea.

Line 308 assumes that loc2 (a pointer to a newline) is followed by at
least one more character before the terminating zero. It runs a while
loop, looking for newlines, always making this assumption. This is not
clever.

line 389 contains a peculiar if() statement which has some bits in it
which have no sense and should leave any competent programmer
wondering what in the hell the intention was. And it may well not work
in many cases.

Buf is the full line to be parsed. By the time you reach here, loc is
a pointer beyond the Content-Dispostion string and a lot else). It is
simply wrong code which happens to work.

It's not possible to guess the programmer's intention. I think it was
that either 

 Printing out 4 bytes after the terminating '\0' may crash. But its
 very unlikely and f.e. on linux, solaris it cannot happen. Maybe it
 could crash on *BSD, but thats untested.

I don't follow this at all. Unless you can be sure that this function
is always called with buf being an automatic variable of the caller,
or that it's a static global which is known not to end the data
segment, or that the memory allocate routines always add housekeeping
data after every malloced buffer, then you have no way of knowing if
buf+cnt+1 is part of the process data space. If it's not, an attempt
to read it will get a SEGV. Under Linux. Under Solaris. Under *BSD. 

And a philosophical note:

Adding extra checks to code seldom hurts.

1) It means that the next person looking at the code doesn't need to
   track all the execution paths to ensure that the following
   block of code will not cause problems.
2) Often it's cheaper to see if there's room for a string before
   initiating the search, so a check like that may be more efficient.
3) Most programmer's will spend more time looking at other people's
   code than writing new code. And every bit of that code which shows
   that the original author(s) have considered all the edge cases
   simply makes it easier for the next person.
4) Code which is 'very unlikely' to crash is code which is begging for
   a script kiddy to improve the odds. PHP is deployed on web servers
   and web servers are a popular target for defacement and/or DOS
   attacks. So the fact that you believe it's 'unlikely' that it can
   be caused to crash (instead of wanting code where it *will not*
   crash, does not speak well for the basic approach to coding. 
5) The entire php project has not released a working fix for an
   exploitable bug (it may stop the exploit, the code is still wide
   open to crashing). Worse, the entire world has been told that 4.1.2
   is a fix, and it contains, besides the points raised above, two
   attrocious non-working attempts to fix other problems (the
   memchar()+1 code). The response in the developers lists is:
   Version 4.2 has new code. The bad patch is fixed in CVS.
   This overlooks the fact that CERT and most other security services
   (like most of the Linux distributions) are putting out 4.1.2. And
   the attitude in the devlopers list appears to be a Don't care,
   it's not my problem. I already had a previous response to the
   effect that a php server core-dumping wasn't really a problem. 


At any rate, since you don't like to see any patches which aren't
provable necessary, here's a reduced set (although I simply can't, in
good conscience leave in quoted strings and 

Re: [PHP-DEV] GD Shared library confusion

2002-03-03 Thread Markus Fischer

On Sun, Mar 03, 2002 at 06:37:53PM +0200, Jani Taskinen wrote : 
 
 Libtool version? Not all have this problem

$ libtool --version
ltmainsh (GNU libtool) 14 (1920 2001/04/24 23:26:18)


I think I lost discussion point somewhere now  sorry 

-- 
Please always Cc to me when replying to me on the lists
GnuPG Key: http://gurujosefineat/~mfischer/C2272BD0asc

-- 
PHP Development Mailing List http://wwwphpnet/
To unsubscribe, visit: http://wwwphpnet/unsubphp




Re: [PHP-DEV] GD Shared library confusion

2002-03-03 Thread Jani Taskinen


Hmmit depends on so many things But the bug
exists only in some 14x versions (including 14)

--Jani

On Sun, 3 Mar 2002, Markus Fischer wrote:

On Sun, Mar 03, 2002 at 06:37:53PM +0200, Jani Taskinen wrote :

 Libtool version? Not all have this problem

$ libtool --version
ltmainsh (GNU libtool) 14 (1920 2001/04/24 23:26:18)


I think I lost discussion point somewhere now  sorry



-- 


-- 
PHP Development Mailing List http://wwwphpnet/
To unsubscribe, visit: http://wwwphpnet/unsubphp




[PHP-DEV] Re: GetImageSize,read_exif_data,Bug #6787,#14994

2002-03-03 Thread Rasmus Lerdorf

 today i woke up and i think the solution is to have read_exif_data
 a third parameter whether or not to return information if no exif is
 present And to support TIFFs with GetImageSize we only need
 a small addition of say less than 100 lines c code

Good to hear you woke up  Not waking up would have been bad

That does sound like the best approach

-Rasmus


-- 
PHP Development Mailing List http://wwwphpnet/
To unsubscribe, visit: http://wwwphpnet/unsubphp




Re: [PHP-DEV] GD Shared library confusion

2002-03-03 Thread Rasmus Lerdorf

ltmainsh (GNU libtool) 14 (1920 2001/04/24 23:26:18)

And no, none of my /usr/lib/*pspell*la files have -L/usr/lib in their
dependency_libs  Lots of other la files in /usr/lib have that, but not
pspell

-Rasmus

On Sun, 3 Mar 2002, Jani Taskinen wrote:


 Libtool version? Not all have this problem

 --Jani


 On Sun, 3 Mar 2002, Markus Fischer wrote:

 On Sun, Mar 03, 2002 at 06:16:07PM +0200, Jani Taskinen wrote :
 
  As long as the configm4's use PHP_ADD_LIBRARY_WITH_PATH()
  and the other macros and don't touch LIBS themselves,
  there won't be any /usr/lib entries in it
 
  So, I'd check the la files There's propably libpspellla
  which has -L/usr/lib defined in 'dependency_libs='
 
  And then you can complain to the libtool folks about this :)
  Easiest way to fix/test this is to just move all the la files
  from /usr/lib to some other place
 
 Are you sure? On my system nearly all la files contain
 -L/usr/lib in the dependency_libs line 
 
 $ grep dependency_libs /usr/lib/*la|grep -- '-L/usr/lib '|wc -l
 138
 
 Or am I missing some specific point?
 
 

 --



-- 
PHP Development Mailing List http://wwwphpnet/
To unsubscribe, visit: http://wwwphpnet/unsubphp




Re: [PHP-DEV] ICONV patch for bug 14423

2002-03-03 Thread Derick Rethans

Hello,

attached is a fixed diff, it works on Linux now (RH 7.1).

Derick

On Sun, 3 Mar 2002, Dan Kalowsky wrote:

 I need a review bug #14423 (http://bugs.php.net/bug.php?id=14423edit=1)

 I think I've figured out what is wrong, but unfortunately I cannot do a
 buildconf on the machine I'm on currently (libtool is limited to 1.3, not
 1.4).

 So if someone can try this patch out and comment on any corrections for
 it, I'd appriciate it :)  You'll find the patch attached to the email.
 While this bug is limited to the FreeBSD platform, this patch will effect
 the building on all machines (alters the config.m4).  So if at least one
 other OS could test it out as well, I'd appriciate it.


 ---
 Dan Kalowsky  Tonight I think I'll walk alone.
 http://www.deadmime.org/~dank  I'll find soul as I go home.
 [EMAIL PROTECTED]  - Temptation, New Order


Derick Rethans

-
PHP: Scripting the Web - www.php.net - [EMAIL PROTECTED]
 SRM: Site Resource Manager - www.vl-srm.net
-


? iconv.diff
Index: config.m4
===
RCS file: /repository/php4/ext/iconv/config.m4,v
retrieving revision 1.7
diff -u -r1.7 config.m4
--- config.m4   30 Nov 2001 18:59:38 -  1.7
+++ config.m4   3 Mar 2002 18:11:24 -
@@ -7,15 +7,27 @@
 
 if test $PHP_ICONV != no; then
 
+dnl This is a fix for why FreeBSD does not work with ICONV
+dnl It seems libtool checks for libiconv_open which only exists in
+dnl the giconv series of files under FreeBSD
+
+  ac_os_uname=`uname -s 2/dev/null`
+
+  if test $ac_os_uname = FreeBSD; then
+   lib_name=giconv
+  else
+   lib_name=iconv
+  fi
+
   for i in /usr /usr/local $PHP_ICONV; do
-test -r $i/include/iconv.h  ICONV_DIR=$i
+test -r $i/include/${lib_name}.h  ICONV_DIR=$i
   done
 
   if test -z $ICONV_DIR; then
 AC_MSG_ERROR(Please reinstall the iconv library.)
   fi
   
-  if test -f $ICONV_DIR/lib/libconv.a -o -f 
$ICONV_DIR/lib/libiconv.$SHLIB_SUFFIX_NAME ; then
+  if test -f $ICONV_DIR/lib/libconv.a -o -f 
+$ICONV_DIR/lib/lib${lib_name}.$SHLIB_SUFFIX_NAME ; then
 PHP_ADD_LIBRARY_WITH_PATH(iconv, $ICONV_DIR/lib, ICONV_SHARED_LIBADD)
 AC_CHECK_LIB(iconv, libiconv_open, [
AC_DEFINE(HAVE_ICONV, 1, [ ])
Index: php_iconv.h
===
RCS file: /repository/php4/ext/iconv/php_iconv.h,v
retrieving revision 1.9
diff -u -r1.9 php_iconv.h
--- php_iconv.h 13 Dec 2001 14:31:16 -  1.9
+++ php_iconv.h 3 Mar 2002 18:11:24 -
@@ -26,8 +26,9 @@
 #define PHP_ICONV_API
 #endif
 
+#if HAVE_ICONV
 extern zend_module_entry iconv_module_entry;
-#define phpext_iconv_ptr iconv_module_entry
+#define iconv_module_ptr iconv_module_entry
 
 PHP_MINIT_FUNCTION(miconv);
 PHP_MSHUTDOWN_FUNCTION(miconv);
@@ -53,6 +54,14 @@
 #define ICONV_INPUT_ENCODING ISO-8859-1 
 #define ICONV_OUTPUT_ENCODING ISO-8859-1
 #define ICONV_INTERNAL_ENCODING ISO-8859-1 
+
+#else
+
+#define iconv_module_ptr NULL
+
+#endif /* HAVE_ICONV */
+
+#define phpext_iconv_ptr iconv_module_ptr
 
 #endif /* PHP_ICONV_H */
 


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


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

2002-03-03 Thread Jan Lehnardt

Hi,
On 3 Mar 2002 15:03:00 -
Vildan Hasanbegovic [EMAIL PROTECTED] wrote:

 I have a second year student in Science in Software Engineering and
writing in PHP on the daily basis.
congratualtions ;) and what for do you need a CVS account? 

Jan
-- 
Q: Thank Jan? A: http://geschenke.an.dasmoped.net/

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




Re: [PHP-DEV] php + cygwin - some more

2002-03-03 Thread Marcus Boerger

At 15:29 03.03.2002, you wrote:
Ok, seeing that some people indeed do use cygwin to build PHP, here's
report about my achievements:

Just checked with new cygwin and it builds, compiles but does not link,
seem to be a problem with underscore generation. The cli executable
does not find its functionsmaybe i check this later

by the way i have now problems with php 4.1.1 and 4.1.2 but then came cli...

After upgrading cygwin to latest version (1.3.10-1) and all tools there
(autoconf 2.52, libtool 1.4e) and checking out latest CVS, it builds. Only
problems being:

1. line 187 of datetime.c - complains about timezone, since timezone is
defined as function in headers. Changed to _timezone, seems to work.

For me i have two errors in that file but i think we can add a type 
conversion to the resulttype.
So we only do anything for cygwin:

datetime.c: In function `php_mktime':
datetime.c:187: wrong type argument to unary minus
 gmadjust = -(is_dst ? (int)timezone - 3600 : (int)timezone);
see (int) conversion of timezone - gmadjust has type int

datetime.c: In function `php_date':
datetime.c:254: warning: assignment makes integer from pointer without a cast
 tzone = (long)timezone;
see (long) conversion of timezone - tzone has type long

  i think we can commit this to cvs anyone against? 

2. A lot of undefined symbols in XML modules. Rebuilt with
--without-xml, since no time to investigate further on this.

I do not use this with cygwin sorry

Besides that, builds php.exe cleanly. Still don't know if and how is
possible to build .dll for apache with cygwin.
--
Stanislav Malyshev, Zend Products Engineer
[EMAIL PROTECTED]  http://www.zend.com/ +972-3-6139665 ext.115



--
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] Re: Bug #15761 Updated: IMAP-SSL Bug

2002-03-03 Thread Derick Rethans

Hola,

we really need an --enable-all :)

Derick

On 3 Mar 2002 [EMAIL PROTECTED] wrote:

  ID:   15761
  Updated by:   [EMAIL PROTECTED]
  Reported By:  [EMAIL PROTECTED]
  Status:   Feedback
  Bug Type: IMAP related
  Operating System: RedHat 7.2
  PHP Version:  4.1.1
  New Comment:

 here is my ./configure:

 ./configure --with-apxs=/usr/local/apache/bin/apxs
 --with-mysql=/usr/local/mysql --with-mcrypt=/usr/local/lib
 --with-png-dir=/usr/local/lib --with-jpeg-dir=/usr/local/lib
 --with-curl=/usr/local/lib --with-unixODBC=/usr/local/lib
 --with-zlib=/usr/local --enable-ftp --with-hyperwave --with-ming
 --with-freetype-dir=/usr/local --with-gd --with-swf
 --with-ttf=/usr/local/lib --enable-gd-native-ttf
 --with-mhash=/usr/local/lib --enable-yp --enable-versioning
 --enable-ftp --enable-apc --enable-bcmath
 --with-tiff-dir=/usr/local/lib --with-t1lib=/usr/local/lib
 --enable-sysvshm=yes --enable-sysvsem=yes --enable-calendar
 --enable-trans-sid --enable-mbregex --enable-mbstring --enable-wddx
 --enable-shmop --enable-exif --enable-memory-limit
 --enable-freetype-4bit-antialias-hack --with-bz2 --with-gettext
 --with-xpm=/usr/X11R6 --with-openssl=/usr/local/openssl
 --with-pgsql=/usr/local/pgsql --disable-debug --with-microcode=shared
 --with-dom=/usr/local/lib --enable-gd-imgstrttf --enable-pdflib
 --with-pdflib --enable-xslt --with-xslt-sablot --enable-dbase
 --with-ldap --with-zip --with-zlib-dir=/usr/local/lib --with-pspell
 --with-rtfm=shared --with-kerberos --with-imap
 --with-imap-ssl=/usr/local/openssl


 Previous Comments:
 

 [2002-03-03 12:56:53] [EMAIL PROTECTED]

 status - feedback

 

 [2002-03-03 12:54:52] [EMAIL PROTECTED]

 Show us your entire ./configure line please.  Do you have both
 --with-imap and --with-imap-ssl?

 

 [2002-03-03 12:41:36] [EMAIL PROTECTED]

 Please FIX the BUG thanx

 

 [2002-02-27 06:30:27] [EMAIL PROTECTED]

 sorry my eMail is: [EMAIL PROTECTED]

 

 [2002-02-27 06:28:59] [EMAIL PROTECTED]

 Hi,

 If I PHP with --with-imap-ssl=/usr/local/openssl install comes with
 apache start of the errors:

 Syntax error on line 240 of /usr/local/apache/conf/httpd.conf:
 Cannot load /usr/local/apache/libexec/libphp4.so into server:
 /usr/local/apache/libexec/libphp4.so: undefined symbol:
 ssl_onceonlyinit
 /usr/local/apache/bin/apachectl start: httpd could not be started

 OpenSSL Version is: OpenSSL 0.9.6c

 


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



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




Re: [PHP-DEV] php + cygwin - some more

2002-03-03 Thread Stanislav Malyshev

MB datetime.c: In function `php_mktime':
MB datetime.c:187: wrong type argument to unary minus
MB  gmadjust = -(is_dst ? (int)timezone - 3600 : (int)timezone);
MB see (int) conversion of timezone - gmadjust has type int
MB 
MB datetime.c: In function `php_date':
MB datetime.c:254: warning: assignment makes integer from pointer without a cast
MB  tzone = (long)timezone;
MB see (long) conversion of timezone - tzone has type long
MB 
MB   i think we can commit this to cvs anyone against? 

That's the same issue - timezone is a function in cygwin, and the thing 
that is meant here is _timezone. However, I don't know how to express this 
in ifdef-HAVE_THIS_AND_THAT terms. Anyone?

-- 
Stanislav Malyshev, Zend Products Engineer   
[EMAIL PROTECTED]  http://www.zend.com/ +972-3-6139665 ext.115




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




Re: [PHP-DEV] cursor focus

2002-03-03 Thread Andrew Lindeman

That's actually a javascript kinda thing, really...

--Andrew

On Saturday 02 March 2002 07:14 pm, Ralph Jarvis wrote:
 This is really a newbie question, but here goes.

 I am running PHP4 with Apache on Redhat 6.2.

 I am sure I read this somewheres, but can't find it again. When I open a
 webpage in a small password application that I wrote, the cursor is not on
 the first text box I need to fill in, I need to click on the text box to
 begin typing. How do I get the cursor to focus on this text box?

 Many thanks in advance

 Ralph

-- 
-4. Umm, did anyone have anything important in /usr?

--Top 100 things you don't want the sysadmin to say

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




[PHP-DEV] PHP 4.2 branch

2002-03-03 Thread Derick Rethans

Hello,

I just wanted to ask you to commit your pending fixes / functionality as
soon as possible There will be a branch for the PHP 42x series on
Wednesday

regards,
Derick


-- 
PHP Development Mailing List http://wwwphpnet/
To unsubscribe, visit: http://wwwphpnet/unsubphp




Re: [PHP-DEV] opendir SafeMode Multiuser Problem/Patch

2002-03-03 Thread James E. Flemer

Well actually, open_basedir is not *supposed* to check
UIDs However, safe_mode *is*, and it was not for the
opendir() function So I patched it to do so (in CVS) Also
I noticed that when the CHECKUID_ALLOW_ONLY_DIR flag is
passed to php_checkuid(), that it misses the case where you
are referring to the root directory (because the leading
slash is changed to a null, and so VCWD_STAT was being
passed a null string instead of / or \\) I fixed that
as well

-James

On Fri, 1 Mar 2002, Chand wrote:

 hi,

 Just wanted to let you guys know that the php opendir() function suffers a tiny 
security risk in a multiuser environment Say you have a server with multiple users 
having access to php Those users Homedirs are stored in the same tree (say 
/data/users/)

 With the function as it is now, the user chand (/data/users/chand) would be able to 
open and watch the contents of Rasmus' Home directory (/data/users/rasmus) because 
_php_do_opendir (in ext/standard/dirc) doesn't implement the safe_mode's 
php_checkuid function as I think it should (IMHO) It only checks the open_base_dir 
variable But on a multiuser (multi as in thousands of thousands) environment, you 
can't honestly go that way

 Hence the following patch

 --- /php-410/ext/standard/dirc Sat Aug 11 19:03:36 2001
 +++ ext/standard/dirc  Fri Mar  1 00:46:58 2002
  -151,6 +151,13 
 if (php_check_open_basedir((*arg)-valuestrval TSRMLS_CC)) {
 RETURN_FALSE;
 }
 +
 +   /* CHAND Added Checkuid so that we check a guy can't go see anything 
except from his directory up */
 +   if (!php_checkuid((*arg)-valuestrval, NULL, 3)) {
 +   php_error(E_WARNING, Permission denied to the directory : %s, 
(*arg)-valuestrval);
 +   RETURN_FALSE;
 +   }
 +   /* /CHAND */

 dirp = emalloc(sizeof(php_dir));


 Just tell me if I'm out of the blue here and if what i'm saying is making any sense 
to you Almost every security issue in such an environment i had to patch in earlier 
versions of php were patched in 410 except for this one
 If it could be from now on, it would be pretty cool :)

 Thanks for any comments and for taking my information into consideration Maybe the 
patch I submitted is not the best way to do it (I don't master the php/Zend API) but 
it works fine with me

 Later



 --
 Mark Villemade
 Hosting Services Technical Manager
 MultiMania / Lycos Europe
 (int) +33 1 53 27 24 05





-- 
PHP Development Mailing List http://wwwphpnet/
To unsubscribe, visit: http://wwwphpnet/unsubphp




Re: [PHP-DEV] opendir SafeMode Multiuser Problem/Patch

2002-03-03 Thread Chand

At 03:54 PM 3/3/2002 -0500, James E Flemer wrote:
Well actually, open_basedir is not *supposed* to check
UIDs However, safe_mode *is*, and it was not for the
opendir() function So I patched it to do so (in CVS) Also
I noticed that when the CHECKUID_ALLOW_ONLY_DIR flag is
passed to php_checkuid(), that it misses the case where you
are referring to the root directory (because the leading
slash is changed to a null, and so VCWD_STAT was being
passed a null string instead of / or \\) I fixed that
as well

ok Thanks a lot I was gonna repost my mail thinking it had been read over and not 
taken care of :)
The strange behavior of safe_mode anad the CHECKUID_ALLOW_ONLY_DIR is something i had 
also patched before but didn't remember :)

So it's a double feature  Pretty cool :)

I'll be happy not to have to patch this next time we upgrade our php version for our 
members :)

Thanks a lot Have a nice evenin' :)
Later


--
Mark Villemade
Hosting Services Technical Manager
MultiMania / Lycos
(int) +33 1 53 27 24 05


-- 
PHP Development Mailing List http://wwwphpnet/
To unsubscribe, visit: http://wwwphpnet/unsubphp




Re: [PHP-DEV] GetImageSize,read_exif_data,Bug #6787,#14994

2002-03-03 Thread Michael Ulbrich

Marcus Boerger wrote:
 
 Hi Rasmus,
 
 today i woke up and i think the solution is to have read_exif_data
 a third parameter whether or not to return information if no exif is
 present. And to support TIFFs with GetImageSize we only need
 a small addition of say less than 100 lines c code...
 
 marcus
 --
 
 [sorry first one has gone to wrong mailing list - so here again]
 
 Hi Rasmus,
 
 i think Serge is correct because one can use standard functions for
 FileName,FileDateTime and FileSize. So better reply with false.
 The other solution would be adding an array entry 'EXIFPresent' (true|false)
 BUT i think that is not so good.
 
  From my point of view i would like to discuss the difference between
 getimagesize and read_exif_data a little:
 
 We would need some function*ality* from exif.c in image.c to support TIFF.
 When we have those functions we would be able to interpret APP markers
 of JPEG also (see below).
 
 I suppose we check whether or not ext/exif is present and then return
 read_exif_data results in GetImageSize (i do not see the point of returning
 and APP marker section which has to be interpreted). Then we should also
 make ext/exif default to present and change switch from --enable-exif to
 --disable-exif (prefer this).
 
 Or we move the necessary functions from exif.c to image.c and
 then make ext/exif optional for editing exif headers in the future.
 
 If to many people use APP return info we could use a third parameter to
 return interpreted values.
 
 The real point here is that i do not know what APP markers and EXIF
 headers have to do with GetImageSize but we have the information when
 adding TIFF support.
 
 what do you think?
 
 marcus
 
 
---
 
 #6787
 [17 Sep 2000 6:07am] [EMAIL PROTECTED]
 Hi Guys,
 
 It seems that read_exif_data builds certain fields like
 FileName, FileDateTime, FileSize etc .. even when no real
 EXIF data exists. So read_exif_data will always return something!
 
 This makes it a pain to test for the presence of actual EXIF data cause
 I have to do something like this:
 
 $exif_data = @read_exif_data($upload);
 if (isset ($exif_data['CameraMake'])) {
 
 Not very bullet proof 
 
 Would be nice if it would not return anything without the presence of
 actual EXIF data.
 
 Thanks, Serge
 
 #14994
 [11 Jan 6:07am] [EMAIL PROTECTED]
 I know, that Rasmus made the implementation for this function and that
 he used the header readouts from an imageinfo.c, but I'm missing the
 ability to identify TIFF images.
 As i'm not firm with imageheaders, I'd like to ask someone to implement
 this feature.
 
 --
 PHP Development Mailing List http://www.php.net/
 To unsubscribe, visit: http://www.php.net/unsub.php

Hi Marcus, Rasmus,

I'm rather new to this list, just lurking for some time now. Please
excuse me, if this is slightly off topic.

I've come across some weird results from GetImageSize() in $info[]
myself and have sent a comment w/ patch to bugs #15174 and #13213 of
which the latter is not that important IMO.

On the topic of EXIF headers:

The ext/exif/exif.c code does basically the same as in standard/image.c:
it parses the JPEG header structure and extracts the different markers.
In image.c we have a function iptcparse(), which further interprets the
APP13 markers content. In ext/exif/exif.c there is read_exif_data().
Since the EXIF header is identical to the APP1 marker (M_EXIF == M_APP1
== 0xe1), why not have a function exifparse() in standard/image.c which
will interpret the APP1 (aka EXIF header) marker's content and get rid
of ext/exif?

AFAIK there's a third data structure in the JPEG headers which might
become interesting to image processing apps in the future: the APP2
marker contains ICC profiles, which are needed for color management ...

Adding TIFF support:

A corresponding situation exists when adding TIFF support. Tags in TIFF
hold analogous data to the JPEG markers, especially the above mentionend
substructures will be present. So wouldn't it be great to call
GetImageSize() on a TIFF and return $info[], which has elements
$info[IPTC], $info[EXIF] and info[ICC] reliably set?

HTH ... Michael

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




[PHP-DEV] PHP and VisualStudio.Net revisited

2002-03-03 Thread Sebastian Bergmann

  Today I tried to build PHP (current CVS) with the final version of
  Microsoft's new VisualStudioNet

  Good news first: It works

  But there's still something wrong with the strtollc file from the
  bundled libmysql

  I do the following:

* Open the project

* Rebuild

* Get the errors at

http://wwwsebastian-bergmannde/strtolltxt

  and the build of libmysql fails

* I build the project (no rebuild!), and it works

  Any ideas?

  This issue might be gone once we upgraded the bundled libmysql Zak? :)

-- 
  Sebastian Bergmann
  http://sebastian-bergmannde/ http://phpOpenTrackerde/

  Did I help you? Consider a gift: http://wishlistsebastian-bergmannde/

-- 
PHP Development Mailing List http://wwwphpnet/
To unsubscribe, visit: http://wwwphpnet/unsubphp




Re[2]: [PHP-DEV] Parsing File Names

2002-03-03 Thread Daniel Lorch

hi,

 ?php

 $handle=opendir('/path/to/files');

 while (false !== ($file = readdir($handle))) {
 if (preg_match(/(*) - (*)mp3/i, $file, $matches)) { 
 $artist = $matches[1];
 $song = $matches[2];

 // insert into db
 }
 }

?

I'd suggest to write it like this:

 if (preg_match(/([^\-]+) - ([^\-]+)\mp3/i, $file, $matches)) {
 list(, $artist, $song) = $matches;

 []
 }

Match everything that's not a dash [^\-]+ , and escape \ as 
is a regular expression wildcard

Daniel Lorch



-- 
PHP Development Mailing List http://wwwphpnet/
To unsubscribe, visit: http://wwwphpnet/unsubphp




Re: [PHP-DEV] ICONV patch for bug 14423

2002-03-03 Thread Dan Kalowsky

Um yeah, this is the patch I ment to send initially :)

If no comments/concerns are heard within 24 hours, you'll find this patch
in the cvs.

On Sun, 3 Mar 2002, Derick Rethans wrote:

 Hello,

 attached is a fixed diff, it works on Linux now (RH 7.1).

 Derick

 On Sun, 3 Mar 2002, Dan Kalowsky wrote:

  I need a review bug #14423 (http://bugs.php.net/bug.php?id=14423edit=1)
 
  I think I've figured out what is wrong, but unfortunately I cannot do a
  buildconf on the machine I'm on currently (libtool is limited to 1.3, not
  1.4).
 
  So if someone can try this patch out and comment on any corrections for
  it, I'd appriciate it :)  You'll find the patch attached to the email.
  While this bug is limited to the FreeBSD platform, this patch will effect
  the building on all machines (alters the config.m4).  So if at least one
  other OS could test it out as well, I'd appriciate it.
 
 
  ---
  Dan KalowskyTonight I think I'll walk alone.
  http://www.deadmime.org/~dankI'll find soul as I go home.
  [EMAIL PROTECTED]- Temptation, New Order
 

 Derick Rethans

 -
 PHP: Scripting the Web - www.php.net - [EMAIL PROTECTED]
  SRM: Site Resource Manager - www.vl-srm.net
 -


---
Dan KalowskyTonight I think I'll walk alone.
http://www.deadmime.org/~dankI'll find soul as I go home.
[EMAIL PROTECTED]- Temptation, New Order


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




[PHP-DEV] linking shared lib in new extension

2002-03-03 Thread Keyser Soze

Hi,

I'm developing a new extension for php, and I need to compile it with a
shared libin PHP I added the lines in config.m4:

PHP_ADD_LIBRARY(mylib,,MYEXT_SHARED_LIBADD)

and Makefile.in:

MYEXT_SHARED_LIBADD = -lmylib
LTLIBRARY_SHARED_LIBADD = $(MYEXT_SHARED_LIBADD)

In php it compiles wellbut when I'm going to compile the apache it
doesn't link with mylib, I must put it manually in src/Makefile

How can I make this automatic???


Thanks,
Keyser Soze


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




Re: [PHP-DEV] GetImageSize,read_exif_data,Bug #6787,#14994

2002-03-03 Thread Marcus Börger

At 22:04 03.03.2002, Michael Ulbrich wrote:

Ah - not off topic

Comment on : Tags in TIFF hold analogous data to the JPEG markers,

Its just the other way round JPEG APP1 sections contains a TIFF header
including IFD0 structure and TIFF6.0 Tags.

As i wrote today morgning (my one) i would prefer adding TIFF support
for GetImageSize and leave it as it is besides that. The new exif module
has some extensions, maybe i split up the information to seperate arrays
to inform where the data comes from...but next version.

marcus

Marcus Boerger wrote:
 
  Hi Rasmus,
 
  today i woke up and i think the solution is to have read_exif_data
  a third parameter whether or not to return information if no exif is
  present. And to support TIFFs with GetImageSize we only need
  a small addition of say less than 100 lines c code...
 
  marcus
  --
 
  [sorry first one has gone to wrong mailing list - so here again]
 
  Hi Rasmus,
 
  i think Serge is correct because one can use standard functions for
  FileName,FileDateTime and FileSize. So better reply with false.
  The other solution would be adding an array entry 'EXIFPresent' 
 (true|false)
  BUT i think that is not so good.
 
   From my point of view i would like to discuss the difference between
  getimagesize and read_exif_data a little:
 
  We would need some function*ality* from exif.c in image.c to support TIFF.
  When we have those functions we would be able to interpret APP markers
  of JPEG also (see below).
 
  I suppose we check whether or not ext/exif is present and then return
  read_exif_data results in GetImageSize (i do not see the point of returning
  and APP marker section which has to be interpreted). Then we should also
  make ext/exif default to present and change switch from --enable-exif to
  --disable-exif (prefer this).
 
  Or we move the necessary functions from exif.c to image.c and
  then make ext/exif optional for editing exif headers in the future.
 
  If to many people use APP return info we could use a third parameter to
  return interpreted values.
 
  The real point here is that i do not know what APP markers and EXIF
  headers have to do with GetImageSize but we have the information when
  adding TIFF support.
 
  what do you think?
 
  marcus
 
  
 
---
 
  #6787
  [17 Sep 2000 6:07am] [EMAIL PROTECTED]
  Hi Guys,
 
  It seems that read_exif_data builds certain fields like
  FileName, FileDateTime, FileSize etc .. even when no real
  EXIF data exists. So read_exif_data will always return something!
 
  This makes it a pain to test for the presence of actual EXIF data cause
  I have to do something like this:
 
  $exif_data = @read_exif_data($upload);
  if (isset ($exif_data['CameraMake'])) {
 
  Not very bullet proof 
 
  Would be nice if it would not return anything without the presence of
  actual EXIF data.
 
  Thanks, Serge
 
  #14994
  [11 Jan 6:07am] [EMAIL PROTECTED]
  I know, that Rasmus made the implementation for this function and that
  he used the header readouts from an imageinfo.c, but I'm missing the
  ability to identify TIFF images.
  As i'm not firm with imageheaders, I'd like to ask someone to implement
  this feature.
 
  --
  PHP Development Mailing List http://www.php.net/
  To unsubscribe, visit: http://www.php.net/unsub.php

Hi Marcus, Rasmus,

I'm rather new to this list, just lurking for some time now. Please
excuse me, if this is slightly off topic.

I've come across some weird results from GetImageSize() in $info[]
myself and have sent a comment w/ patch to bugs #15174 and #13213 of
which the latter is not that important IMO.

On the topic of EXIF headers:

The ext/exif/exif.c code does basically the same as in standard/image.c:
it parses the JPEG header structure and extracts the different markers.
In image.c we have a function iptcparse(), which further interprets the
APP13 markers content. In ext/exif/exif.c there is read_exif_data().
Since the EXIF header is identical to the APP1 marker (M_EXIF == M_APP1
== 0xe1), why not have a function exifparse() in standard/image.c which
will interpret the APP1 (aka EXIF header) marker's content and get rid
of ext/exif?

AFAIK there's a third data structure in the JPEG headers which might
become interesting to image processing apps in the future: the APP2
marker contains ICC profiles, which are needed for color management ...

Adding TIFF support:

A corresponding situation exists when adding TIFF support. Tags in TIFF
hold analogous data to the JPEG markers, especially the above mentionend
substructures will be present. So wouldn't it be great to call
GetImageSize() on a TIFF and return $info[], which has elements
$info[IPTC], $info[EXIF] and info[ICC] reliably set?

HTH ... Michael


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




Re: [PHP-DEV] php + cygwin - some more

2002-03-03 Thread Marcus Börger

At 19:58 03.03.2002, Stanislav Malyshev wrote:
MB datetime.c: In function `php_mktime':
MB datetime.c:187: wrong type argument to unary minus
MB  gmadjust = -(is_dst ? (int)timezone - 3600 : (int)timezone);
MB see (int) conversion of timezone - gmadjust has type int
MB
MB datetime.c: In function `php_date':
MB datetime.c:254: warning: assignment makes integer from pointer 
without a cast
MB  tzone = (long)timezone;
MB see (long) conversion of timezone - tzone has type long
MB
MB   i think we can commit this to cvs anyone against? 

That's the same issue - timezone is a function in cygwin, and the thing
that is meant here is _timezone. However, I don't know how to express this
in ifdef-HAVE_THIS_AND_THAT terms. Anyone?

#ifdef __CYGWIN__
  gmadjust = -(is_dst ? (int)timezone - 3600 : (int)timezone);
#else
  gmadjust = -(is_dst ? timezone - 3600 : timezone);
#endif

But do **not ** worry it is **not** necessary


--
Stanislav Malyshev, Zend Products Engineer
[EMAIL PROTECTED]  http://www.zend.com/ +972-3-6139665 ext.115




--
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] PHP module creation

2002-03-03 Thread topside

Where can I get information/documentation on creating my own PHP modules in
C? I basicly just want to use some C functions within PHP - so I figure I
can write a PHP module with functions which use the C functions I need

thanks
--topside



-- 
PHP Development Mailing List http://wwwphpnet/
To unsubscribe, visit: http://wwwphpnet/unsubphp




Re: [PHP-DEV] PHP module creation

2002-03-03 Thread Brian Foddy

This is a good place to start

http://wwwzendcom/apidoc/


Brian



On Sun, 3 Mar 2002 19:30:09 -0600, topside wrote:

st want to use some C functions with



-- 
PHP Development Mailing List http://wwwphpnet/
To unsubscribe, visit: http://wwwphpnet/unsubphp




Re: [PHP-DEV] PHP module creation

2002-03-03 Thread Lars Torben Wilson

On Sun, 2002-03-03 at 17:30, topside wrote:
 Where can I get information/documentation on creating my own PHP modules in
 C? I basicly just want to use some C functions within PHP - so I figure I
 can write a PHP module with functions which use the C functions I need.
 
 thanks
 --topside

The manual is a good place to start:

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


Cheers and happy hacking!

Torben


-- 
 Torben Wilson [EMAIL PROTECTED]
 http://www.thebuttlesschaps.com
 http://www.hybrid17.com
 http://www.inflatableeye.com
 +1.604.709.0506


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




Re: [PHP-DEV] PHP module creation

2002-03-03 Thread Steven J. Sobol

On 3 Mar 2002, Lars Torben Wilson wrote:

 On Sun, 2002-03-03 at 17:30, topside wrote:
  Where can I get information/documentation on creating my own PHP modules in
  C? I basicly just want to use some C functions within PHP - so I figure I
  can write a PHP module with functions which use the C functions I need.
  
  thanks
  --topside
 
 The manual is a good place to start:
 
   http://www.php.net/manual/en/zend.php

I've followed the instructions at http://www.zend.com/apidoc/
and generated test code for a php extension, and can get it to compile
into a PHP binary, but I'm having difficulty finding the info I need to
get it to compile as a shared library.

Help?

TIA.

-- 
JustThe.net LLC - Steve Web Dude Sobol, CTO  ICQ: 56972932/WebDude216
website: http://JustThe.net  email: [EMAIL PROTECTED]  phone: 216.619.2NET 
postal: 5686 Davis Drive, Mentor On The Lake, OH 44060-2752  DalNet: ZX-2



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




[PHP-DEV] makerpm script in source distri

2002-03-03 Thread Arjen Lentz

Hi, (particularly Zak)

I sometimes create RPMs from the source distri (any 4x version), so I
can do an easy install on some RH machines The 'makerpm' script in the
root of the source tree does this quite nicely, except it hasn't been
changed for a while and therefore has a few probs I needed to fix to
make it work

Diff posted below one path was wrong, and --with-imap often doesn't
work because of its Kerberos dependencies

Another thing is, the script isn't executable straight from the targz,
so a chmod +x is required Since other scripts in the source distri are
executable, perhaps make that so for this one too?


Regards,
Arjen


*** makerpm~Fri Jun 29 12:32:19 2001
--- makerpm Fri Mar  1 11:32:21 2002
***
*** 63,69 
--enable-safe-mode \
--with-exec-dir=/usr/bin \
--with-mysql=/usr \
-   --with-imap=/usr \
--with-pdflib=/usr \
--with-zlib=/usr \
--enable-xml \
--- 63,68 
***
*** 81,87 
--enable-safe-mode \
--with-exec-dir=/usr/bin \
--with-mysql=/usr \
-   --with-imap=/usr \
--with-pdflib=/usr \
--with-zlib=/usr \
--enable-xml \
--- 80,85 
***
*** 95,101 
  %install
  rm -rf $RPM_BUILD_ROOT
  mkdir -p $RPM_BUILD_ROOT/usr/lib/apache
! install -m 755 libphp4so $RPM_BUILD_ROOT/usr/lib/apache
  mkdir -p $RPM_BUILD_ROOT/usr/bin
  install -m 755 php $RPM_BUILD_ROOT/usr/bin

--- 93,99 
  %install
  rm -rf $RPM_BUILD_ROOT
  mkdir -p $RPM_BUILD_ROOT/usr/lib/apache
! install -m 755 libs/libphp4so $RPM_BUILD_ROOT/usr/lib/apache
  mkdir -p $RPM_BUILD_ROOT/usr/bin
  install -m 755 php $RPM_BUILD_ROOT/usr/bin





-- 
PHP Development Mailing List http://wwwphpnet/
To unsubscribe, visit: http://wwwphpnet/unsubphp




Re: [PHP-DEV] php + cygwin - some more

2002-03-03 Thread Marcus Börger

hi,

i checked timezone and _timezone works for me

if have no idea who can do this but after checking compilation with
cygwin i now have *.o files. Maybe this is the problem why it did not
compile but nether the less adding this type would be a good idea.

Could anyone add
*.o
to .cvsignore files?

marcus

At 23:39 03.03.2002, you wrote:
At 19:58 03.03.2002, Stanislav Malyshev wrote:
MB datetime.c: In function `php_mktime':
MB datetime.c:187: wrong type argument to unary minus
MB  gmadjust = -(is_dst ? (int)timezone - 3600 : 
(int)timezone);
MB see (int) conversion of timezone - gmadjust has type int
MB
MB datetime.c: In function `php_date':
MB datetime.c:254: warning: assignment makes integer from pointer 
without a cast
MB  tzone = (long)timezone;
MB see (long) conversion of timezone - tzone has type long
MB
MB   i think we can commit this to cvs anyone against? 

That's the same issue - timezone is a function in cygwin, and the thing
that is meant here is _timezone. However, I don't know how to express this
in ifdef-HAVE_THIS_AND_THAT terms. Anyone?

#ifdef __CYGWIN__
  gmadjust = -(is_dst ? (int)timezone - 3600 : (int)timezone);
#else
  gmadjust = -(is_dst ? timezone - 3600 : timezone);
#endif

Sorry did it wrong
#ifdef __CYGWIN__
  gmadjust = -(is_dst ? _timezone - 3600 : _timezone);
#else
  gmadjust = -(is_dst ? timezone - 3600 : timezone);
#endif

And yes it compiles this way.

But do **not ** worry it is **not** necessary


--
Stanislav Malyshev, Zend Products Engineer
[EMAIL PROTECTED]  http://www.zend.com/ +972-3-6139665 ext.115




--
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] PHP module creation

2002-03-03 Thread Markus Fischer

On Sun, Mar 03, 2002 at 10:25:14PM -0500, Steven J Sobol wrote : 
 I've followed the instructions at http://wwwzendcom/apidoc/
 and generated test code for a php extension, and can get it to compile
 into a PHP binary, but I'm having difficulty finding the info I need to
 get it to compile as a shared library

Most likely because it isn't documented Going for other
modules m4 and makefilein sources is the way to go
currently

-- 
Please always Cc to me when replying to me on the lists
GnuPG Key: http://gurujosefineat/~mfischer/C2272BD0asc

-- 
PHP Development Mailing List http://wwwphpnet/
To unsubscribe, visit: http://wwwphpnet/unsubphp




[PHP-DEV] parse_str and session vars

2002-03-03 Thread Thomas Wentzel

Hi,

I have encountered an issue with parse_str, that I believe needs to
be addressed - allthough I might be mistaken, and in that case feel
free to ridicule me - and tell me to go to the general list :)

Well I want to be able to do something like this:

file1php:
  ?
  session_start();
  session_register(foo);
  $foo=bar;
  ?
  form action=file2php?foo=foobar method=post
  input type=submit name=Go
  /form

file2php:
  ?
  session_start();
  $old=$foo;
  parse_str($QUERY_STRING);

  Header(Location: file3php?old=$oldfoo=$foo);
  ?

file3php:
  ?
  session_start();
  echo foo: $foobr;
  ?

From the manual: (explanation for parse_str)
  Parses str as if it were the query string passed via an URL and sets
variables in the current scope If the second
  parameter arr is present, variables are stored in this variable as an
array elements instead

I would expect that the script would result in file3php echoing, foo:
foobar - but that's not the case, instead I get: foo: bar, but the
url is: file3php?old=barfoo=foobar Doesn't session_start introduce
all the registered vars into the current scope - and since parse_str
sets varibles in the current scope why doesn't this scheme work?

Thanks for listening
  Thomas


-- 
PHP Development Mailing List http://wwwphpnet/
To unsubscribe, visit: http://wwwphpnet/unsubphp




Re: [PHP-DEV] parse_str and session vars

2002-03-03 Thread Rasmus Lerdorf

You are posting to the wrong list  And why are you using parse_str()?
PHP automatically imports these variables for you  Use
$foo=$HTTP_GET_VARS['foo'] in that second script of yours

Next time send your user-level question like this to php-general

-Rasmus

On Mon, 4 Mar 2002, Thomas Wentzel wrote:

 Hi,

 I have encountered an issue with parse_str, that I believe needs to
 be addressed - allthough I might be mistaken, and in that case feel
 free to ridicule me - and tell me to go to the general list :)

 Well I want to be able to do something like this:

 file1php:
   ?
   session_start();
   session_register(foo);
   $foo=bar;
   ?
   form action=file2php?foo=foobar method=post
   input type=submit name=Go
   /form

 file2php:
   ?
   session_start();
   $old=$foo;
   parse_str($QUERY_STRING);

   Header(Location: file3php?old=$oldfoo=$foo);
   ?

 file3php:
   ?
   session_start();
   echo foo: $foobr;
   ?

 From the manual: (explanation for parse_str)
   Parses str as if it were the query string passed via an URL and sets
 variables in the current scope If the second
   parameter arr is present, variables are stored in this variable as an
 array elements instead

 I would expect that the script would result in file3php echoing, foo:
 foobar - but that's not the case, instead I get: foo: bar, but the
 url is: file3php?old=barfoo=foobar Doesn't session_start introduce
 all the registered vars into the current scope - and since parse_str
 sets varibles in the current scope why doesn't this scheme work?

 Thanks for listening
   Thomas


 --
 PHP Development Mailing List http://wwwphpnet/
 To unsubscribe, visit: http://wwwphpnet/unsubphp



-- 
PHP Development Mailing List http://wwwphpnet/
To unsubscribe, visit: http://wwwphpnet/unsubphp




Re: [PHP-DEV] PHP module creation

2002-03-03 Thread Rasmus Lerdorf

Make sure you have:

PHP_EXTENSION(exif, $ext_shared)

in your config.m4 and then simply do:

  ./configure --with-foo=shared

You will find it in your ./modules directory.

-Rasmus

On Sun, 3 Mar 2002, Steven J. Sobol wrote:

 On 3 Mar 2002, Lars Torben Wilson wrote:

  On Sun, 2002-03-03 at 17:30, topside wrote:
   Where can I get information/documentation on creating my own PHP modules in
   C? I basicly just want to use some C functions within PHP - so I figure I
   can write a PHP module with functions which use the C functions I need.
  
   thanks
   --topside
 
  The manual is a good place to start:
 
http://www.php.net/manual/en/zend.php

 I've followed the instructions at http://www.zend.com/apidoc/
 and generated test code for a php extension, and can get it to compile
 into a PHP binary, but I'm having difficulty finding the info I need to
 get it to compile as a shared library.

 Help?

 TIA.

 --
 JustThe.net LLC - Steve Web Dude Sobol, CTO  ICQ: 56972932/WebDude216
 website: http://JustThe.net  email: [EMAIL PROTECTED]  phone: 216.619.2NET
 postal: 5686 Davis Drive, Mentor On The Lake, OH 44060-2752  DalNet: ZX-2



 --
 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] parse_str and session vars

2002-03-03 Thread Markus Fischer

On Mon, Mar 04, 2002 at 08:49:09AM +0100, Thomas Wentzel wrote : 
 file2php:
   ?
   session_start();
   $old=$foo;
   parse_str($QUERY_STRING);
 
   Header(Location: file3php?old=$oldfoo=$foo);
   ?
 
 file3php:
   ?
   session_start();
   echo foo: $foobr;
   ?
 
 From the manual: (explanation for parse_str)
   Parses str as if it were the query string passed via an URL and sets
 variables in the current scope If the second
   parameter arr is present, variables are stored in this variable as an
 array elements instead
 
 I would expect that the script would result in file3php echoing, foo:
 foobar - but that's not the case, instead I get: foo: bar, but the
 url is: file3php?old=barfoo=foobar Doesn't session_start introduce
 all the registered vars into the current scope - and since parse_str
 sets varibles in the current scope why doesn't this scheme work?

Session variables (in global scope) are set AFTER Post/Get
vars (the other way around would be a big problem since
everyone could easily modifiy your holy session variables)

- Markus

-- 
Please always Cc to me when replying to me on the lists
GnuPG Key: http://gurujosefineat/~mfischer/C2272BD0asc

-- 
PHP Development Mailing List http://wwwphpnet/
To unsubscribe, visit: http://wwwphpnet/unsubphp




Re: [PHP-DEV] parse_str and session vars]

2002-03-03 Thread Thomas Wentzel

Sure, Rasmus!
But
I'm using parse_str because file2 in my example is supposed to be
a generic handler for all other scripts on my site Offcourse I could
use 15 million $HTTP_GET_VARS for each registered session variable
(as
I wouldn't know what to expect)
The reason I did write to this list - is because there obviously is 
something wrong with the way parse_str works and how it is supposed to
work
Not because I don't know how to get around this obstacle


Rasmus Lerdorf wrote:
 
 You are posting to the wrong list  And why are you using parse_str()?
 PHP automatically imports these variables for you  Use
 $foo=$HTTP_GET_VARS['foo'] in that second script of yours
 
 Next time send your user-level question like this to php-general
 
 -Rasmus
 
 On Mon, 4 Mar 2002, Thomas Wentzel wrote:
 
  Hi,
 
  I have encountered an issue with parse_str, that I believe needs to
  be addressed - allthough I might be mistaken, and in that case feel
  free to ridicule me - and tell me to go to the general list :)
 
  Well I want to be able to do something like this:
 
  file1php:
?
session_start();
session_register(foo);
$foo=bar;
?
form action=file2php?foo=foobar method=post
input type=submit name=Go
/form
 
  file2php:
?
session_start();
$old=$foo;
parse_str($QUERY_STRING);
 
Header(Location: file3php?old=$oldfoo=$foo);
?
 
  file3php:
?
session_start();
echo foo: $foobr;
?
 
  From the manual: (explanation for parse_str)
Parses str as if it were the query string passed via an URL and sets
  variables in the current scope If the second
parameter arr is present, variables are stored in this variable as an
  array elements instead
 
  I would expect that the script would result in file3php echoing, foo:
  foobar - but that's not the case, instead I get: foo: bar, but the
  url is: file3php?old=barfoo=foobar Doesn't session_start introduce
  all the registered vars into the current scope - and since parse_str
  sets varibles in the current scope why doesn't this scheme work?
 
  Thanks for listening
Thomas
 
 
  --
  PHP Development Mailing List http://wwwphpnet/
  To unsubscribe, visit: http://wwwphpnet/unsubphp
 
 
 --
 PHP Development Mailing List http://wwwphpnet/
 To unsubscribe, visit: http://wwwphpnet/unsubphp


-- 
PHP Development Mailing List http://wwwphpnet/
To unsubscribe, visit: http://wwwphpnet/unsubphp