Re: [PHP-CVS] cvs: php4 /main rfc1867.c

2001-01-19 Thread Andi Gutmans

Are you talking about accessing it from a C extension or from a PHP script? 
Because I don't think it's accessible from a PHP script.

Andi


At 04:50 PM 1/19/2001 +0100, Sascha Schumann wrote:
On Fri, 19 Jan 2001, Rasmus Lerdorf wrote:

   -   is_arr_upload = (start_arr = 
 strrchr(namebuf,'[')) 
   +   is_arr_upload = (start_arr = 
 strchr(namebuf,'[')) 
 
  Yes, this makes more sense.

 Does anyone mind, if I bump the never used PHP_API_VERSION
 number?  I need some way to tell from the outside whether the
 above change exists in the installation.

 - Sascha


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


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




[PHP] MySQL replication

2001-01-21 Thread Andi Gutmans

Hey,

Have any of you guys worked with the latest and greatest MySQL replication?
Does it work? What are its ups and downs?

Andi


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




Re: [PHP-CVS] cvs: php4 /ext/com COM.c php_COM.h

2001-01-29 Thread Andi Gutmans

Damn, cvs.php.net is down so I can't commit changes.
Best to change the #if WIN32|WINNT to #ifdef PHP_WIN32
Also you should use BEGIN_EXTERN_C() and END_EXTERN_C()
I know it's picky, but it's good for consistency.
Andi

At 03:41 AM 1/28/2001 +, Harald Radi wrote:
phanto  Sat Jan 27 19:41:43 2001 EDT

   Removed files:
 /php4/ext/com   COM.c

   Modified files:
 /php4/ext/com   php_COM.h
   Log:
   fixed unicodeconversion and parameter passing bugs in com and dotnet 
 modules

Index: php4/ext/com/php_COM.h
diff -u php4/ext/com/php_COM.h:1.2 php4/ext/com/php_COM.h:1.3
--- php4/ext/com/php_COM.h:1.2  Sun Jul  2 16:46:38 2000
+++ php4/ext/com/php_COM.h  Sat Jan 27 19:41:43 2001
@@ -3,6 +3,10 @@

  #if WIN32|WINNT

+#ifdef __cplusplus
+extern "C" {
+#endif
+
  extern PHP_MINIT_FUNCTION(COM);
  extern PHP_MSHUTDOWN_FUNCTION(COM);
  PHP_FUNCTION(COM_load);
@@ -11,6 +15,11 @@
  PHP_FUNCTION(com_propget);
  PHP_FUNCTION(com_propput);
  extern zend_module_entry COM_module_entry;
+
+#ifdef __cplusplus
+}
+#endif
+
  #define COM_module_ptr COM_module_entry

  #else



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


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




Re: [PHP-CVS] cvs: php4 /ext/com COM.c php_COM.h

2001-01-29 Thread Andi Gutmans

Are you including php.h or zend.h? Those macro's should be defined and they 
are used in lots of places. Look at zend.h
Let me know of your progress.

Thanks,
Andi

At 03:41 AM 1/28/2001 +, Harald Radi wrote:
phanto  Sat Jan 27 19:41:43 2001 EDT

   Removed files:
 /php4/ext/com   COM.c

   Modified files:
 /php4/ext/com   php_COM.h
   Log:
   fixed unicodeconversion and parameter passing bugs in com and dotnet 
 modules

Index: php4/ext/com/php_COM.h
diff -u php4/ext/com/php_COM.h:1.2 php4/ext/com/php_COM.h:1.3
--- php4/ext/com/php_COM.h:1.2  Sun Jul  2 16:46:38 2000
+++ php4/ext/com/php_COM.h  Sat Jan 27 19:41:43 2001
@@ -3,6 +3,10 @@

  #if WIN32|WINNT

+#ifdef __cplusplus
+extern "C" {
+#endif
+
  extern PHP_MINIT_FUNCTION(COM);
  extern PHP_MSHUTDOWN_FUNCTION(COM);
  PHP_FUNCTION(COM_load);
@@ -11,6 +15,11 @@
  PHP_FUNCTION(com_propget);
  PHP_FUNCTION(com_propput);
  extern zend_module_entry COM_module_entry;
+
+#ifdef __cplusplus
+}
+#endif
+
  #define COM_module_ptr COM_module_entry

  #else



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


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




Re: [PHP] Zend Optimizer not working with @

2001-01-31 Thread Andi Gutmans

Chris,

Thanks for the report. This will be fixed in the next version of the Zend 
Optimizer.

Andi

At 12:32 PM 1/31/2001 -0800, Chris Lee wrote:
?
 echo @$test;
?

This works without Zend Optimizer installed, as soon as I turn on Zend I get
'undifined variable'. Why doesn't the @ turn this warning off when Zend
installed?

--



Chris Lee
Mediawaveonline.com
[EMAIL PROTECTED]






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


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




[PHP-CVS] cvs: php4 /ext/ingres_ii ii.c /ext/mysql php_mysql.c /ext/pgsql pgsql.c /ext/standard scanf.c

2001-01-31 Thread Andi Gutmans

andiWed Jan 31 13:53:30 2001 EDT

  Modified files:  
/php4/ext/ingres_ii ii.c 
/php4/ext/mysql php_mysql.c 
/php4/ext/pgsql pgsql.c 
/php4/ext/standard  scanf.c 
  Log:
  - Change unset() functions to null(). unset() is legacy
  
  
Index: php4/ext/ingres_ii/ii.c
diff -u php4/ext/ingres_ii/ii.c:1.13 php4/ext/ingres_ii/ii.c:1.14
--- php4/ext/ingres_ii/ii.c:1.13Mon Nov 13 14:23:15 2000
+++ php4/ext/ingres_ii/ii.c Wed Jan 31 13:53:29 2001
@@ -19,7 +19,7 @@
+--+
  */
 
-/* $Id: ii.c,v 1.13 2000/11/13 22:23:15 dbeu Exp $ */
+/* $Id: ii.c,v 1.14 2001/01/31 21:53:29 andi Exp $ */
 
 #include "php.h"
 #include "php_globals.h"
@@ -1065,10 +1065,10 @@
  if(columnData[k-1].dv_null) { /* NULL value ? */
 
if(result_type  II_NUM) {
- add_index_unset(return_value, i+k-1);
+ add_index_null(return_value, i+k-1);
}
if(result_type  II_ASSOC) {
- add_assoc_unset(return_value, php_ii_field_name(ii_link, i+k-1));
+ add_assoc_null(return_value, php_ii_field_name(ii_link, i+k-1));
}
 
  } else { /* non NULL value */
Index: php4/ext/mysql/php_mysql.c
diff -u php4/ext/mysql/php_mysql.c:1.65 php4/ext/mysql/php_mysql.c:1.66
--- php4/ext/mysql/php_mysql.c:1.65 Tue Jan 30 17:14:54 2001
+++ php4/ext/mysql/php_mysql.c  Wed Jan 31 13:53:29 2001
@@ -16,7 +16,7 @@
+--+
 */
  
-/* $Id: php_mysql.c,v 1.65 2001/01/31 01:14:54 elixer Exp $ */
+/* $Id: php_mysql.c,v 1.66 2001/01/31 21:53:29 andi Exp $ */
 
 
 /* TODO:
@@ -1425,9 +1425,9 @@
} else {
/* NULL value. */
if (result_type  MYSQL_NUM)
-   add_index_unset(return_value, i);
+   add_index_null(return_value, i);
else
-   add_assoc_unset(return_value, mysql_field-name);
+   add_assoc_null(return_value, mysql_field-name);
}
}
 }
Index: php4/ext/pgsql/pgsql.c
diff -u php4/ext/pgsql/pgsql.c:1.84 php4/ext/pgsql/pgsql.c:1.85
--- php4/ext/pgsql/pgsql.c:1.84 Sat Jan 20 02:10:50 2001
+++ php4/ext/pgsql/pgsql.c  Wed Jan 31 13:53:29 2001
@@ -17,7 +17,7 @@
+--+
  */
  
-/* $Id: pgsql.c,v 1.84 2001/01/20 10:10:50 sas Exp $ */
+/* $Id: pgsql.c,v 1.85 2001/01/31 21:53:29 andi Exp $ */
 
 #include stdlib.h
 
@@ -1049,11 +1049,11 @@
for (i = 0, num_fields = PQnfields(pgsql_result); inum_fields; i++) {
if (PQgetisnull(pgsql_result, Z_LVAL_PP(row), i)) {
if (result_type  PGSQL_NUM) {
-   add_index_unset(return_value, i);
+   add_index_null(return_value, i);
}
if (result_type  PGSQL_ASSOC) {
field_name = PQfname(pgsql_result, i);
-   add_assoc_unset(return_value, field_name);
+   add_assoc_null(return_value, field_name);
}
} else {
element = PQgetvalue(pgsql_result, Z_LVAL_PP(row), i);
Index: php4/ext/standard/scanf.c
diff -u php4/ext/standard/scanf.c:1.4 php4/ext/standard/scanf.c:1.5
--- php4/ext/standard/scanf.c:1.4   Mon Oct 30 08:44:01 2000
+++ php4/ext/standard/scanf.c   Wed Jan 31 13:53:30 2001
@@ -16,7 +16,7 @@
+--+
 */
 
-/* $Id: scanf.c,v 1.4 2000/10/30 16:44:01 stas Exp $ */
+/* $Id: scanf.c,v 1.5 2001/01/31 21:53:30 andi Exp $ */
 
 /*
scanf.c --
@@ -663,7 +663,7 @@
 return FAILURE;
 }
 for (i = 0; i  totalVars; i++) {
-   if (add_next_index_unset(*return_value) == FAILURE) {
+   if (add_next_index_null(*return_value) == FAILURE) {
scan_set_error_return(0, return_value);
return FAILURE;
}



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




Re: [PHP] Zend IDE

2001-02-02 Thread Andi Gutmans

Alain,

Have you tried changing your keyboard layout in the Windows Control-Panel 
to Swiss-French?
As far as I know, Java uses your systems keyboard layout.

Java will be supported by other vendors such as Sun  IBM on Windows so I 
wouldn't worry about it ;)
And of course our aim is to support UNIX platforms such as Linux which also 
have Java support.

Andi

At 10:43 AM 2/2/2001 +0100, Alain Fontaine wrote:
Hi,

Does anyone know how I can 'tell' the Zend IDE to actually use Swiss-French
keyboard layout instead of french? I know it's related to Java thinking as
I'm living in Belgium, I must have a french keyboard layout. Yet, I don't,
and I can't type correctly now :)

Oh, by the way... Zend IDE for Windows is written in Java. Microsoft is
dumping Java completely. Find the mistake.

Thanks for helping me out.



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


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




Re: [PHP-CVS] cvs: php4 /ext/sockets sockets.c

2001-02-03 Thread Andi Gutmans

By the way, often compilers change switch() to if()/else() if they know 
that it would be faster (if you only have like 2 cases) so if the code is 
much nicer you don't need to be too afraid of switch() :)

Andi

At 03:44 PM 2/3/2001 +0200, Boian Bonev wrote:
hi,


   What do you mean, switch() is expensive?
  Well, isn't it slower?

perhapse in php switch is slower. in c it sometimes is much faster than
bunch of if statements. i mean the compiler makes jump tables for
consequitive values and there are less comparisons etc. just a range check
and jump.

b.


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


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




Re: [PHP-CVS] cvs: php4 /pear pear.m4

2001-03-12 Thread Andi Gutmans

What is the reason for this? Shouldn't we keep it the way it works within 
the PHP tree? Some modules include php_config.h or do you also have that in 
PEAR?

Andi

At 09:54 AM 3/12/2001 +, Stig Bakken wrote:
ssb Mon Mar 12 01:54:26 2001 EDT

   Modified files:
 /php4/pear  pear.m4
   Log:
   HEADS UP: renamed config header file in "phpize"d extensions to
   "config.h" rather than "php_config.h".


Index: php4/pear/pear.m4
diff -u php4/pear/pear.m4:1.7 php4/pear/pear.m4:1.8
--- php4/pear/pear.m4:1.7   Mon Oct 30 10:27:46 2000
+++ php4/pear/pear.m4   Mon Mar 12 01:54:26 2001
@@ -81,6 +81,6 @@
  test -d modules || mkdir modules
  touch .deps

-AC_CONFIG_HEADER(php_config.h)
+AC_CONFIG_HEADER(config.h)

  AC_OUTPUT()



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


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




Re: [PHP-CVS] cvs: php4 /ext/yp CREDITS php_yp.h yp.c

2001-03-18 Thread Andi Gutmans

Seems to me that you can nuke the following as it will always be done in RINIT:
+static void php_yp_init_globals(YPLS_D)
+{
+   YP(error) = 0;
+}
+
+PHP_MINIT_FUNCTION(yp)
+{
+#ifdef ZTS
+   yp_globals_id = ts_allocate_id(sizeof(php_yp_globals), 
(ts_allocate_ctor) php_yp_init_globals, NULL);
+#else
+   php_yp_init_globals(YPLS_C);
+#endif

Andi

At 10:16 PM 3/18/2001 +, Fredrik hrn wrote:
ohrnSun Mar 18 14:16:46 2001 EDT

   Modified files:
 /php4/ext/ypCREDITS php_yp.h yp.c
   Log:
   Much needed cleanup and new functions added
   ---

   Cleaned up stringhandling for binary safeness.

   All functions now maintain a global 'errno' variable.

   All functions now print warning messages on failure.

   Added error code constants.

   Fixed bug #8041 while maintaining backward compatibility.

   New functions:
 yp_all traverse a map
 yp_cat retrive an entire map in one go
 yp_errno   get last error code
 yp_err_string  get a human readable error message



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


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




[PHP-CVS] cvs: php4(PHP_4_0_5) /sapi/fastcgi CREDITS Makefile.in README.FastCGI config.m4 fastcgi.c php.sym php_fastcgi.h

2001-03-20 Thread Andi Gutmans

andiTue Mar 20 10:13:21 2001 EDT

  Added files: (Branch: PHP_4_0_5)
/php4/sapi/fastcgi  CREDITS Makefile.in README.FastCGI config.m4 
fastcgi.c php.sym php_fastcgi.h 
  Log:
  - MFH
  
  


Index: php4/sapi/fastcgi/Makefile.in
+++ php4/sapi/fastcgi/Makefile.in

LTLIBRARY_NAME= libsapi.la
LTLIBRARY_SOURCES = fastcgi.c

include $(top_srcdir)/build/ltlib.mk

Index: php4/sapi/fastcgi/README.FastCGI
+++ php4/sapi/fastcgi/README.FastCGI
FastCGI module
--

This module requires the FastCGI development kit, available from
http://www.fastcgi.com/

Before building PHP, please enter the dev kit, and run:

/configure
make
make export

This will compile the library code required for the FastCGI module. All
that is then required is to configure PHP with the '--with-fastcgi' option.
After making the code, you will end up with a binary file called 'php'.
Installation of this file will depend on the web server being used, please
see their documentation for details.

Index: php4/sapi/fastcgi/config.m4
+++ php4/sapi/fastcgi/config.m4
AC_MSG_CHECKING(for FastCGI support)
AC_ARG_WITH(fastcgi,
[  --with-fastcgi=SRCDIR   Build PHP as FastCGI application],[
  if test "$withval" = "yes"; then
FASTCGIPATH=/usr/local
  else
FASTCGIPATH=$withval
  fi
  test -f "$FASTCGIPATH/lib/libfcgi.a" || AC_MSG_ERROR(Unable to find libfcgi.a in 
$FASTCGIPATH/lib)
  test -f "$FASTCGIPATH/include/fastcgi.h" || AC_MSG_ERROR(Unable to find fastcgi.h in 
$FASTCGIPATH/include)
  PHP_SAPI=fastcgi
  PHP_LIBS=$FASTCGIPATH/lib/libfcgi.a
  AC_ADD_INCLUDE($FASTCGIPATH/include)
  EXT_PROGRAM_LDADD="$EXT_PROGRAM_LDADD $FASTCGIPATH/lib/libfcgi.a"
  INSTALL_IT="\$(INSTALL) -m 0755 $SAPI_PROGRAM \$(bindir)/$SAPI_FASTCGI"
  RESULT="yes"
  PHP_SUBST(FASTCGI_LIBADD)
  PHP_SUBST(EXT_PROGRAM_LDADD)
],[
  RESULT="no"
])
AC_MSG_RESULT($RESULT)

Index: php4/sapi/fastcgi/fastcgi.c
+++ php4/sapi/fastcgi/fastcgi.c
/*
   +--+
   | PHP version 4.0  |
   +--+
   | Copyright (c) 1997-2001 The PHP Group|
   +--+
   | This source file is subject to version 2.02 of the PHP license,  |
   | that is bundled with this package in the file LICENSE, and is|
   | available at through the world-wide-web at   |
   | http://www.php.net/license/2_02.txt. |
   | If you did not receive a copy of the PHP license and are unable to   |
   | obtain it through the world-wide-web, please send a note to  |
   | [EMAIL PROTECTED] so we can mail you a copy immediately.   |
   +--+
   | Author: Ben Mansell [EMAIL PROTECTED]|
   +--+
*/

/* Debugging */
/* #define DEBUG_FASTCGI 1 */

/* Two configurables for the FastCGI runner.
 *
 * PHP_FCGI_CHILDREN - if set, the FastCGI will pre-fork this many processes
 * which will accept requests.
 *
 * PHP_FCGI_MAX_REQUESTS - if set, the runner will kill itself after handling
 * the given number of requests. This is to curb any
 * memory leaks in PHP.
 */


/* The following code is based mainly on the thttpd sapi and the original
 * CGI code, no doubt with many new and interesting bugs created... :)
 */

#include "php.h"
#include "SAPI.h"
#include "php_main.h"
#include "php_fastcgi.h"
#include "php_variables.h"

#include "fcgi_config.h"
#include "fcgiapp.h"
#include stdio.h
#include stdlib.h
#include unistd.h
#include sys/wait.h
#include sys/stat.h


#define TLS_D
#define TLS_DC
#define TLS_C
#define TLS_CC
#define TLS_FETCH()


FCGX_Stream *in, *out, *err;
FCGX_ParamArray envp;
char *path_info = NULL;

/* Our original environment from when the FastCGI first started */
char **orig_env;

/* The environment given by the FastCGI */
char **cgi_env;

/* The manufactured environment, from merging the base environ with
 * the parameters set by the per-connection environment
 */
char **merge_env;


static int sapi_fastcgi_ub_write(const char *str, uint str_length)
{
uint sent = FCGX_PutStr( str, str_length, out );
return sent;
}


static void sapi_fastcgi_flush( void *server_context )
{
if( FCGX_FFlush( out ) == -1 ) {
php_handle_aborted_connection();
}
}


static int sapi_fastcgi_send_headers(sapi_headers_struct *sapi_headers SLS_DC)
{
char buf[1024];
int n = 0;
zend_llist_position pos;
sapi_header_struct *h;

switch( sapi_headers-http_response_code ) {
case 200:
/* Default, 

[PHP-CVS] cvs: php4(PHP_4_0_5) /ext/midgard config.m4

2001-03-20 Thread Andi Gutmans

andiTue Mar 20 12:13:09 2001 EDT

  Modified files:  (Branch: PHP_4_0_5)
/php4/ext/midgard   config.m4 
  Log:
  - MFH - This is required for PHP to build. If anything else needs merging
for midgard that is related then please do it or rollback the latest
midgard fixes.
  
  
Index: php4/ext/midgard/config.m4
diff -u php4/ext/midgard/config.m4:1.13.2.1 php4/ext/midgard/config.m4:1.13.2.2
--- php4/ext/midgard/config.m4:1.13.2.1 Sun Mar 18 23:52:03 2001
+++ php4/ext/midgard/config.m4  Tue Mar 20 12:13:08 2001
@@ -1,4 +1,4 @@
-dnl $Id: config.m4,v 1.13.2.1 2001/03/19 07:52:03 ab Exp $
+dnl $Id: config.m4,v 1.13.2.2 2001/03/20 20:13:08 andi Exp $
 
 dnl  Copyright (C) 1999 Jukka Zitting [EMAIL PROTECTED]
 dnl  Copyright (C) 2000 The Midgard Project ry
@@ -32,8 +32,6 @@
   else
 AC_ADD_LIBRARY(midgard)
   fi
-  AC_DEFINE(HAVE_MIDGARD, 1, [ ])
-  PHP_EXTENSION(midgard, $ext_shared)
 
 dnl EEH/TODO: Add checks for apache-static compilation
   AC_PATH_PROG(APXS, apxs)
@@ -68,10 +66,8 @@
   fi
   
   if test "$php_always_shared" = "yes"; then
-MIDCONFIG_FILE="config.h"
-  else
-MIDCONFIG_FILE="php_config.h"
+AC_DEFINE(MGD_INCLUDE_PHP_CONFIG, 1, [ ])
   fi
-  PHP_SUBST_OLD(MIDCONFIG_FILE)
-  AC_OUTPUT(php_midgard.h, [], [])
+  AC_DEFINE(HAVE_MIDGARD, 1, [ ])
+  PHP_EXTENSION(midgard, $ext_shared)
 fi



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




[PHP-CVS] cvs: php4 /ext/pfpro pfpro.c php_pfpro.h

2001-03-21 Thread Andi Gutmans

andiWed Mar 21 12:07:18 2001 EDT

  Modified files:  
/php4/ext/pfpro pfpro.c php_pfpro.h 
  Log:
  - Fix spelling error
  
  
Index: php4/ext/pfpro/pfpro.c
diff -u php4/ext/pfpro/pfpro.c:1.9 php4/ext/pfpro/pfpro.c:1.10
--- php4/ext/pfpro/pfpro.c:1.9  Sun Feb 25 22:07:12 2001
+++ php4/ext/pfpro/pfpro.c  Wed Mar 21 12:07:18 2001
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: pfpro.c,v 1.9 2001/02/26 06:07:12 andi Exp $ */
+/* $Id: pfpro.c,v 1.10 2001/03/21 20:07:18 andi Exp $ */
 
 /* {{{ includes */
 #include "php.h"
@@ -97,7 +97,7 @@
 {
PFPROLS_FETCH();
 
-   PFPROG(initialised) = 0;
+   PFPROG(initialized) = 0;
 
 return SUCCESS;
 }
@@ -106,7 +106,7 @@
 {
PFPROLS_FETCH();
 
-   if (PFPROG(initialised) == 1) {
+   if (PFPROG(initialized) == 1) {
PNCleanup();
}
 
@@ -150,7 +150,7 @@
 
PNInit();
 
-   PFPROG(initialised) = 1;
+   PFPROG(initialized) = 1;
 
RETURN_TRUE;
 }
@@ -168,7 +168,7 @@
 
PNCleanup();
 
-   PFPROG(initialised) = 0;
+   PFPROG(initialized) = 0;
 
RETURN_TRUE;
 }
@@ -275,9 +275,9 @@
 
/* Initialise the library if needed */
 
-   if (PFPROG(initialised) == 0) {
+   if (PFPROG(initialized) == 0) {
PNInit();
-   PFPROG(initialised) = 1;
+   PFPROG(initialized) = 1;
}
 
/* Perform the transaction */
@@ -520,9 +520,9 @@
 
/* Initialise the library if needed */
 
-   if (PFPROG(initialised) == 0) {
+   if (PFPROG(initialized) == 0) {
PNInit();
-   PFPROG(initialised) = 1;
+   PFPROG(initialized) = 1;
}
 
/* Perform the transaction */
Index: php4/ext/pfpro/php_pfpro.h
diff -u php4/ext/pfpro/php_pfpro.h:1.6 php4/ext/pfpro/php_pfpro.h:1.7
--- php4/ext/pfpro/php_pfpro.h:1.6  Sun Feb 25 22:07:12 2001
+++ php4/ext/pfpro/php_pfpro.h  Wed Mar 21 12:07:18 2001
@@ -16,7 +16,7 @@
+--+
 */
 
-/* $Id: php_pfpro.h,v 1.6 2001/02/26 06:07:12 andi Exp $ */
+/* $Id: php_pfpro.h,v 1.7 2001/03/21 20:07:18 andi Exp $ */
 
 #ifndef PHP_PFPRO_H
 #define PHP_PFPRO_H
@@ -46,7 +46,7 @@
 
 typedef struct {
int le_pfpro;
-   int initialised;
+   int initialized;
char *defaulthost;
int defaultport;
int defaulttimeout;



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




Re: [PHP-CVS] cvs: php4 /ext/dbx .cvsignore LICENSE dbx.c dbx.dsp dbx.h dbx_mysql.c dbx_mysql.h dbx_odbc.c dbx_odbc.h php_dbx.h

2001-03-23 Thread Andi Gutmans

+#if !(WIN32|WINNT)
+#include "php_config.h"
+#endif

You should use PHP_WIN32 instead of (WIN32|WINNT). In any case, I think 
these three lines can be erased because php.h includes php_compat.h which 
in turn includes php_config.h when not under Windows and the Windows config 
when necessary.

Andi


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




Re: [PHP] passing by reference

2001-12-27 Thread Andi Gutmans

On Thu, 27 Dec 2001, Kancha . wrote:

 I coulnd't figure out the difference between the two:
 
 function foo(){
   $x = hello;
   return $x;
 }
 
 and 
 
 function foo(){
   $x = hello;
   return $x;
 }

return $x will give you a parser error.

Andi


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




[PHP] Re: [PHP-DEV] Re: RFE: $HTTP_POST_VARS = $_POST;

2002-01-24 Thread Andi Gutmans

PHP 5 per-class constants can already except static arrays such as
array(1, 2, 3) as their value. I'll put the issue of global constants on
my TODO and believe PHP 5 will also support these for global constants.
However, you won't be able to create a constant with a non-constant value
such as $_GET as this goes against the whole idea of constant :)

Andi

On Thu, 24 Jan 2002, Robert Ames wrote:

 Thanks for your responses (again), it is an unfortunate situation that
 $HTTP_*_VARS must be retained for backwards compatibility until at least
 the hypothetical PHPv5.0 mark.  Having also read in this group that
 define() does not support complicated constants, I'm guessing that it's
 not currently possible to force all predefined variables to be read only
 (although that seems like the best solution in the long run).
 
 Regarding the documenation- it is not clear, and is not emphasized that
 the arrays are disjoint.
 
   Note: Some of these arrays had old names, e.g. $HTTP_GET_VARS. These
   names still work, but we encourage users to switch to the new shorter,
   and auto-global versions.
 
 
   
   $HTTP_GET_VARS
 An associative array of variables passed to the current script via the
 HTTP GET method.
 
   $_GET
 An associative array of variables passed to the current script via the
 HTTP GET method. Automatically global in any scope. Introduced in PHP
 4.1.0.
   
 
 ...this will be the last message I'll bother the lists with about this
 behaviour.  I just wanted to make sure that you guys who are developing
 this stuff receive feedback about how this new behaviour is working out
 for people using the new versions of PHP.  :^)
 
 I'm 100% in favor of treating these arrays as read-only, but it would be
 very nice if E_NOTICE's were thrown when builtin arrays are modified, or
 simply to treat them as unchangeable constants.  Something to keep in
 mind if we ever get the ability to say:
 
   define( '_GET', $_GET );
 
 ...which is interesting in itself... imagine:
 
   echo _GET['blah'];
 
 ...instead of:
 
   echo $_GET['blah'];
 
 ...since _GET/etc... are already auto-globals, and you don't want them to
 be used as left-hand-side values, it seems like they're very close to
 acting like constants already.   Just a thought. ;^)
 
 Thanks a bunch!
 
 --Robert
 
 On Thu, 24 Jan 2002 16:01:24 -0600, Lars Torben Wilson wrote:
  On Thu, 2002-01-24 at 13:42, Rasmus Lerdorf wrote:
  I think the real answer here is to treat these as read-only arrays. ie.
  never use them on the left side of the '=' and you will never run into
  problems.  Or if you do, be consistent and use the same array all the
  time.  You are writing your code with the assumption that these two
  arrays are the same.  Where does this assumption come from?  Hopefully
  not the documentation.
  
  -Rasmus
  
  No, they are properly--if lightly--documented on the following pages:
  
http://www.php.net/manual/en/language.variables.predefined.php
http://www.php.net/release_4_1_0.php
  
  Robert, the $HTTP_*_VARS have, indeed, been deprecated, and this is
  noted in the manual.
 
 


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




[PHP] RE: [PHP-DEV] RE: [PHP] RE: [PHP-DEV] WEIRD, WEIRD problem with u pgrade to 4.0.5

2001-05-11 Thread Andi Gutmans

OK but in any case, I suggest not doing it on a production server but doing 
it on a development port/server.

Andi

At 04:58 PM 5/11/2001 +0900, Maxim Maletsky wrote:
OK, but I can do it only on Monday.
There's too much risk doing it this Friday night, if site goes down on the
weekend - that is our last nightmare.
It runs now on backups, but runs well.

Thanks Andi,
Maxim Maletsky


-Original Message-
From: Andi Gutmans [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 11, 2001 4:15 PM
To: [EMAIL PROTECTED]; Maxim Maletsky; 'Vlad Krupin'
Cc: 'PHP General List. (E-mail)'; [EMAIL PROTECTED];
[EMAIL PROTECTED]
Subject: Re: [PHP-DEV] RE: [PHP] RE: [PHP-DEV] WEIRD, WEIRD problem with
upgrade to 4.0.5


Can you try the latest snapshot from snaps.php.net and let us know if it
works for you now?

Andi

At 06:01 PM 5/6/2001 +0800, Jude wrote:
 wel then it's up to you.. goodluck!
 
 =)
 
 -Original Message-
 From: Maxim Maletsky [mailto:[EMAIL PROTECTED]]
 Sent: Friday, May 11, 2001 11:25 AM
 To: '[EMAIL PROTECTED]'; 'Vlad Krupin'
 Cc: 'PHP General List. (E-mail)'; [EMAIL PROTECTED];
 [EMAIL PROTECTED]
 Subject: RE: [PHP] RE: [PHP-DEV] WEIRD, WEIRD problem with upgrade to
 4.0.5
 
 
 nope, I won't give up.
 
 disabling '//' is so  bad..
 just think how much trouble I'm creating for my team.
 
 (Although, I in fact never use '//', I use '#' instead. That is why I
 noticed the problem so late = 20 minutes of downtime yesterday)
 
 Cheers,
 Maxim Maletsky
 
 
 -Original Message-
 From: Jude [mailto:[EMAIL PROTECTED]]
 Sent: Sunday, May 06, 2001 6:53 PM
 To: Maxim Maletsky; 'Vlad Krupin'
 Cc: 'PHP General List. (E-mail)'; [EMAIL PROTECTED];
 [EMAIL PROTECTED]
 Subject: RE: [PHP] RE: [PHP-DEV] WEIRD, WEIRD problem with upgrade to
 4.0.5
 
 
 or simply you can use another comment tags.. like /* */
 
 
 =)
 
 -Original Message-
 From: Maxim Maletsky [mailto:[EMAIL PROTECTED]]
 Sent: Friday, May 11, 2001 11:09 AM
 To: '[EMAIL PROTECTED]'; 'Vlad Krupin'
 Cc: 'PHP General List. (E-mail)'; [EMAIL PROTECTED];
 [EMAIL PROTECTED]
 Subject: RE: [PHP] RE: [PHP-DEV] WEIRD, WEIRD problem with upgrade to
 4.0.5
 
 
 But why?
 
 1. on 4.0.1pl2 it worked.
 2. I noticed it even on a function(); // comment as well.
 
 I will restart experimenting later again. I think I should upgrade my
apache
 first, then recompile PHP, and try it again.
 It seems to me more of a stupid problem, I have no idea why that happen.
 Everything works unless there's an '//', then it starts showing the code
up.
 
 Cheers,
 Maxim Maletsky
 
 -Original Message-
 From: Jude [mailto:[EMAIL PROTECTED]]
 Sent: Sunday, May 06, 2001 6:37 PM
 To: Maxim Maletsky; 'Vlad Krupin'
 Cc: 'PHP General List. (E-mail)'; [EMAIL PROTECTED];
 [EMAIL PROTECTED]
 Subject: RE: [PHP] RE: [PHP-DEV] WEIRD, WEIRD problem with upgrade to
 4.0.5
 
 
 hi
 
 why not try to enclose the parameters to () or try this?
 
 ?php
 echo (hello world); // please no...
 echo (BR);
 ?
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 
 --
 PHP Development Mailing List http://www.php.net/
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]


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




[PHP] RE: [PHP-DEV] RE: [PHP] RE: [PHP-DEV] WEIRD, WEIRD problem with u pgrade to 4.0.5

2001-05-11 Thread Andi Gutmans

OK, but anyway you can run another Apache web server instance on a 
different IP of that machine.

Andi

At 05:19 PM 5/11/2001 +0900, Maxim Maletsky wrote:
I know,
but the fact is that this problem might be caused by OS/web server
configuration on the production server.

It is an old and slow

 Red Hat 6.1
 Apache 1.3.9


We are first trying to set a new apache 1.3.19 on it in parallel directory,
and then we testing by switching symlinks.
I really believe it is a compatibility thing.

Do you think we would be able to reproduce the problem on some other newer
machine?
If that would be so, then we'd hear lots of such complains from users
upgrading to v4.0.5. After all it is just an '//'!

I am gonna try it now on my test linux.
I'll let you know.

Maxim Maletsky



-Original Message-
From: Andi Gutmans [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 11, 2001 4:57 PM
To: Maxim Maletsky; [EMAIL PROTECTED]; 'Vlad Krupin'
Cc: 'PHP General List. (E-mail)'; [EMAIL PROTECTED];
[EMAIL PROTECTED]
Subject: RE: [PHP-DEV] RE: [PHP] RE: [PHP-DEV] WEIRD, WEIRD problem with
u pgrade to 4.0.5


OK but in any case, I suggest not doing it on a production server but doing
it on a development port/server.

Andi

At 04:58 PM 5/11/2001 +0900, Maxim Maletsky wrote:
 OK, but I can do it only on Monday.
 There's too much risk doing it this Friday night, if site goes down on the
 weekend - that is our last nightmare.
 It runs now on backups, but runs well.
 
 Thanks Andi,
 Maxim Maletsky
 
 
 -Original Message-
 From: Andi Gutmans [mailto:[EMAIL PROTECTED]]
 Sent: Friday, May 11, 2001 4:15 PM
 To: [EMAIL PROTECTED]; Maxim Maletsky; 'Vlad Krupin'
 Cc: 'PHP General List. (E-mail)'; [EMAIL PROTECTED];
 [EMAIL PROTECTED]
 Subject: Re: [PHP-DEV] RE: [PHP] RE: [PHP-DEV] WEIRD, WEIRD problem with
 upgrade to 4.0.5
 
 
 Can you try the latest snapshot from snaps.php.net and let us know if it
 works for you now?
 
 Andi
 
 At 06:01 PM 5/6/2001 +0800, Jude wrote:
  wel then it's up to you.. goodluck!
  
  =)
  
  -Original Message-
  From: Maxim Maletsky [mailto:[EMAIL PROTECTED]]
  Sent: Friday, May 11, 2001 11:25 AM
  To: '[EMAIL PROTECTED]'; 'Vlad Krupin'
  Cc: 'PHP General List. (E-mail)'; [EMAIL PROTECTED];
  [EMAIL PROTECTED]
  Subject: RE: [PHP] RE: [PHP-DEV] WEIRD, WEIRD problem with upgrade to
  4.0.5
  
  
  nope, I won't give up.
  
  disabling '//' is so  bad..
  just think how much trouble I'm creating for my team.
  
  (Although, I in fact never use '//', I use '#' instead. That is why I
  noticed the problem so late = 20 minutes of downtime yesterday)
  
  Cheers,
  Maxim Maletsky
  
  
  -Original Message-
  From: Jude [mailto:[EMAIL PROTECTED]]
  Sent: Sunday, May 06, 2001 6:53 PM
  To: Maxim Maletsky; 'Vlad Krupin'
  Cc: 'PHP General List. (E-mail)'; [EMAIL PROTECTED];
  [EMAIL PROTECTED]
  Subject: RE: [PHP] RE: [PHP-DEV] WEIRD, WEIRD problem with upgrade to
  4.0.5
  
  
  or simply you can use another comment tags.. like /* */
  
  
  =)
  
  -Original Message-
  From: Maxim Maletsky [mailto:[EMAIL PROTECTED]]
  Sent: Friday, May 11, 2001 11:09 AM
  To: '[EMAIL PROTECTED]'; 'Vlad Krupin'
  Cc: 'PHP General List. (E-mail)'; [EMAIL PROTECTED];
  [EMAIL PROTECTED]
  Subject: RE: [PHP] RE: [PHP-DEV] WEIRD, WEIRD problem with upgrade to
  4.0.5
  
  
  But why?
  
  1. on 4.0.1pl2 it worked.
  2. I noticed it even on a function(); // comment as well.
  
  I will restart experimenting later again. I think I should upgrade my
 apache
  first, then recompile PHP, and try it again.
  It seems to me more of a stupid problem, I have no idea why that happen.
  Everything works unless there's an '//', then it starts showing the code
 up.
  
  Cheers,
  Maxim Maletsky
  
  -Original Message-
  From: Jude [mailto:[EMAIL PROTECTED]]
  Sent: Sunday, May 06, 2001 6:37 PM
  To: Maxim Maletsky; 'Vlad Krupin'
  Cc: 'PHP General List. (E-mail)'; [EMAIL PROTECTED];
  [EMAIL PROTECTED]
  Subject: RE: [PHP] RE: [PHP-DEV] WEIRD, WEIRD problem with upgrade to
  4.0.5
  
  
  hi
  
  why not try to enclose the parameters to () or try this?
  
  ?php
  echo (hello world); // please no...
  echo (BR);
  ?
  
  
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
  
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
  
  
  --
  PHP Development Mailing List http://www.php.net/
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL

[PHP] Re: [PHP-DEV] RE: [PHP] RE: [PHP-DEV] WEIRD, WEIRD problem with upgrade to 4.0.5

2001-05-11 Thread Andi Gutmans

Can you try the latest snapshot from snaps.php.net and let us know if it 
works for you now?

Andi

At 06:01 PM 5/6/2001 +0800, Jude wrote:
wel then it's up to you.. goodluck!

=)

-Original Message-
From: Maxim Maletsky [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 11, 2001 11:25 AM
To: '[EMAIL PROTECTED]'; 'Vlad Krupin'
Cc: 'PHP General List. (E-mail)'; [EMAIL PROTECTED];
[EMAIL PROTECTED]
Subject: RE: [PHP] RE: [PHP-DEV] WEIRD, WEIRD problem with upgrade to
4.0.5


nope, I won't give up.

disabling '//' is so  bad..
just think how much trouble I'm creating for my team.

(Although, I in fact never use '//', I use '#' instead. That is why I
noticed the problem so late = 20 minutes of downtime yesterday)

Cheers,
Maxim Maletsky


-Original Message-
From: Jude [mailto:[EMAIL PROTECTED]]
Sent: Sunday, May 06, 2001 6:53 PM
To: Maxim Maletsky; 'Vlad Krupin'
Cc: 'PHP General List. (E-mail)'; [EMAIL PROTECTED];
[EMAIL PROTECTED]
Subject: RE: [PHP] RE: [PHP-DEV] WEIRD, WEIRD problem with upgrade to
4.0.5


or simply you can use another comment tags.. like /* */


=)

-Original Message-
From: Maxim Maletsky [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 11, 2001 11:09 AM
To: '[EMAIL PROTECTED]'; 'Vlad Krupin'
Cc: 'PHP General List. (E-mail)'; [EMAIL PROTECTED];
[EMAIL PROTECTED]
Subject: RE: [PHP] RE: [PHP-DEV] WEIRD, WEIRD problem with upgrade to
4.0.5


But why?

1. on 4.0.1pl2 it worked.
2. I noticed it even on a function(); // comment as well.

I will restart experimenting later again. I think I should upgrade my apache
first, then recompile PHP, and try it again.
It seems to me more of a stupid problem, I have no idea why that happen.
Everything works unless there's an '//', then it starts showing the code up.

Cheers,
Maxim Maletsky

-Original Message-
From: Jude [mailto:[EMAIL PROTECTED]]
Sent: Sunday, May 06, 2001 6:37 PM
To: Maxim Maletsky; 'Vlad Krupin'
Cc: 'PHP General List. (E-mail)'; [EMAIL PROTECTED];
[EMAIL PROTECTED]
Subject: RE: [PHP] RE: [PHP-DEV] WEIRD, WEIRD problem with upgrade to
4.0.5


hi

why not try to enclose the parameters to () or try this?

?php
echo (hello world); // please no...
echo (BR);
?


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

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


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


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




[PHP] Patch for PHP 4.0.6 memory limit problem posted

2001-07-01 Thread Andi Gutmans

There is a bug in PHP 4.0.6 which affects PHP users who use the memory 
limit option. (i.e. developers who include --enable-memory-limit in their 
configure line).
The patch is posted at http://www.php.net/downloads.php. If you don't use 
this option there is no need for you to download and apply the patch.

Andi 


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




Re: [PHP] Patch for PHP 4.0.6 memory limit problem posted

2001-07-01 Thread Andi Gutmans

Very strange. I just checked it and it worked for me with GNU patch 2.5.
Do you know how to apply it yourself? You just need to add those three 
lines (without the leading +).

Andi

At 07:48 PM 7/1/2001 +0300, Rouvas Stathis wrote:
Patch cannot be successfully applied. Any suggestions ?

Output from patch application:

start
rouvas@aspasia(12) /opt/ide2/rouvas/tmp/php-4.0.6/Zend patch -i
patch.zend_alloc.c
patching file zend_alloc.c
Hunk #1 FAILED at 446.
1 out of 1 hunk FAILED -- saving rejects to file zend_alloc.c.rej
rouvas@aspasia(13) /opt/ide2/rouvas/tmp/php-4.0.6/Zend cat
zend_alloc.c.rej
***
*** 446,451 
  for (i=1; iMAX_CACHED_MEMORY; i++) {
  for (j=0; jAG(cache_count)[i]; j++) {
  ptr = (zend_mem_header *)
AG(cache)[i][j];
  REMOVE_POINTER_FROM_LIST(ptr);
  free(ptr);
  }
--- 446,454 
  for (i=1; iMAX_CACHED_MEMORY; i++) {
  for (j=0; jAG(cache_count)[i]; j++) {
  ptr = (zend_mem_header *)
AG(cache)[i][j];
+ #if MEMORY_LIMIT
+AG(allocated_memory) -=
REAL_SIZE(ptr-size);
+ #endif
  REMOVE_POINTER_FROM_LIST(ptr);
  free(ptr);
  }

/start

-Stathis.

Andi Gutmans wrote:
 
  There is a bug in PHP 4.0.6 which affects PHP users who use the memory
  limit option. (i.e. developers who include --enable-memory-limit in their
  configure line).
  The patch is posted at http://www.php.net/downloads.php. If you don't use
  this option there is no need for you to download and apply the patch.
 
  Andi
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]


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




Re: [PHP] Patch for PHP 4.0.6 memory limit problem posted

2001-07-01 Thread Andi Gutmans

At 10:17 PM 7/1/2001 +0300, Rouvas Stathis wrote:
It is indeed strange, since in the sources I have (downloaded about a
week ago), I already have the exact source that the patch presents
(without the lines prefixed with +).
I'm looking at $PHPHOME/Zend/zend_alloc.c file.

Am I to suppose that there is no need to patch anything?

The official package of PHP 4.0.6 (http://www.php.net/downloads.php) does 
not have this patch. Are you sure you are looking at the release version? 
Maybe you are using a snapshot or CVS version?

Andi


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




Re: [PHP] Patch for PHP 4.0.6 memory limit problem posted

2001-07-01 Thread Andi Gutmans

At 10:49 PM 7/1/2001 +0300, Rouvas Stathis wrote:
Andi Gutmans wrote:
 
  At 10:17 PM 7/1/2001 +0300, Rouvas Stathis wrote:
  It is indeed strange, since in the sources I have (downloaded about a
  week ago), I already have the exact source that the patch presents
  (without the lines prefixed with +).
  I'm looking at $PHPHOME/Zend/zend_alloc.c file.
  
  Am I to suppose that there is no need to patch anything?
 
  The official package of PHP 4.0.6 (http://www.php.net/downloads.php) does
  not have this patch. Are you sure you are looking at the release version?
  Maybe you are using a snapshot or CVS version?

I do not use the CVS version, mainly because I do not know how to handle
CVS :-)
These are the lines from $PHPHOME/Zend/zend_alloc.c that I have.

lines-from-443-to-454
443 if (1 || clean_cache) {
444 zend_mem_header *ptr;
445
446 for (i=1; iMAX_CACHED_MEMORY; i++) {
447 for (j=0; jAG(cache_count)[i]; j++) {
448 ptr = (zend_mem_header *)
AG(cache)[i][j];
449 REMOVE_POINTER_FROM_LIST(ptr);
450 free(ptr);
451 }
452 AG(cache_count)[i] = 0;
453 }
454 }
/lines-from-443-to-454

What do you think?

This is the official PHP 4.0.6 version. After line 448 insert:

#if MEMORY_LIMIT
AG(allocated_memory) -= REAL_SIZE(ptr-size);
#endif

If you'll take a good look at the diff file the first half is what you're 
supposed to have and the second half is what it's supposed to change to. 
You probably missed the second half.

Andi


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




Re: [PHP] Zend core object creation

2001-07-01 Thread Andi Gutmans

At 06:27 PM 6/29/2001 -0500, Dean Hall wrote:
Okay, perhaps I need to spend some more time studying language
compilers/interpreters, but I've got a question regarding object creation in
the PHP core.

Basically, what, internally, is part of a PHP object (class instantiation)?
I know Zend started using reference counting a while back, so I guess all
objects are basically references, but I need to know how much of the class
information is contained in the objects themselves.

So if I have a class like so:

class foo {
 var $var1;
 var $var2;
 var $var3;

 function func1() { ... }
 function func2() { ... }
 function func3() { ... }
}

and instantiate it like so:

$foo1 = new foo;

will the internal representation of the $foo object contain definitions for
all the variables and functions? So that when I make a second object:

$foo2 = new foo;

will its internal representation duplicate all those method definitions?

My guess is that the most efficient implementation would be to have some
sort of class template that holds, at the least, definitions for the
methods, so that every instantiation refers to those method definitions in
the static template instead of storing their own method definitions.
Variables, since they can't be referenced statically in PHP, would have to
be stored in the object itself; methods, however, could simply be
implemented analogously to functions that take an object as their first
method (i.e., like functions that operate on structs in C).

This is exactly how it works. The member variables are duplicated from a 
template and the method's are saved in the same template but are pointed to 
(i.e. not copied for each object).

Andi


Any ideas? If you prefer, could you direct me to where in the source to look
for an answer?

The reason I'm worried about all this is that I'm writing a very large
application, and I have to worry about object creation time and memory
resources because I may have many distinct objects of the same type
instantiated at the same time.

Thanks.
Dean.



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


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




RE: [PHP-CVS] cvs: php4 /win32 time.c

2001-02-05 Thread Andi Gutmans

Does this variable need to be a true global?
If it does then it has to be mutexed. Having said that if two threads want 
to change it and you think it doesn't really matter which one will "win" 
then you can probably live without the mutex.

Andi

At 10:35 AM 2/5/2001 +, James Moore wrote:

  I don't think you should be using static variables in the
  functions. Don't
  forget that you might have more than one thread accessing this
  function at
  a time (unless you came to the conclusion that a race here can't
  do any harm).

I dont think race conditions here will do any real harm but then again its
probably best to be safe. Having said that I am not 100% sure on how to make
it thread safe either which I would like to do. Are there any documents or
guidlines anywhere I can read about this? Its probably a good chance to
learn.

James


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


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




[PHP-CVS] cvs: php4 /main safe_mode.c

2001-02-12 Thread Andi Gutmans

andiMon Feb 12 07:47:38 2001 EDT

  Modified files:  
/php4/main  safe_mode.c 
  Log:
  - Fix warning
  PR:
  Submitted by:
  Reviewed by:
  Obtained from:
  
  
Index: php4/main/safe_mode.c
diff -u php4/main/safe_mode.c:1.25 php4/main/safe_mode.c:1.26
--- php4/main/safe_mode.c:1.25  Tue Jan  9 03:58:57 2001
+++ php4/main/safe_mode.c   Mon Feb 12 07:47:38 2001
@@ -15,7 +15,7 @@
| Authors: Rasmus Lerdorf [EMAIL PROTECTED]   |
+--+
  */
-/* $Id: safe_mode.c,v 1.25 2001/01/09 11:58:57 thies Exp $ */
+/* $Id: safe_mode.c,v 1.26 2001/02/12 15:47:38 andi Exp $ */
 
 #include "php.h"
 
@@ -124,7 +124,7 @@
SLS_FETCH();
 
if (SG(rfc1867_uploaded_files)) {
-   if 
(zend_hash_exists(SG(rfc1867_uploaded_files),filename,strlen(filename)+1)) {
+   if (zend_hash_exists(SG(rfc1867_uploaded_files), (char *) 
+filename, strlen(filename)+1)) {
return 1;
}
}



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




Re: [PHP] foo[bar] _or_ foo['bar'] ?

2001-02-13 Thread Andi Gutmans

$foo[bar] only works for backwards compatibility. In fact writing bar 
without '' means that it's a constant and if that constant value is defined 
it will be substituted instead of the bar. If it's not defined it defaults 
to the string 'bar'.
So if you want to do it right (and faster) do $foo['bar']

Andi

At 05:48 PM 2/13/2001 +, Phil Driscoll wrote:
Bad practice alert!!!

Derek Sivers wrote:
 I had heard someone on the list say that it's always best to use quotes,
 for the same reason as XHTML, where every value MUST have quotes.
 
 But honestly I've been using only NO-quotes all year and find it much
 easier to read.  And NEVER any problem!
 
 Also makes it easier when you need to use an array variable inside a quoted
 string:
 
 print "Hello there $client[name]";

If your php error reporting level is set to show warnings (which it should
be on your development machines) then referring to
$foo[bar]
will give
Warning: Use of undefined constant bar - assumed 'bar' in
whatever/yourscript.php on line n

So php only works in this case because it couldn't find bar in it's list of
constants, and guessed at the mistake you made. This just slows things down.

I can't see any advantage at all to missing the quotes out.

Your example could be written

print "Hello there {$client['name']}";

Sorry to sound stroppy :)

Cheers
--
Phil Driscoll
Dial Solutions
+44 (0)113 294 5112
http://www.dialsolutions.com
http://www.dtonline.org


-Original Message-
From: Derek Sivers [EMAIL PROTECTED]
To: Matthias Krehl [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED] [EMAIL PROTECTED]
Date: Tuesday, February 13, 2001 5:34 PM
Subject: Re: [PHP] foo[bar] _or_ foo['bar'] ?


 
 I'd really appreciate a clear statement whether to use better
 $foo = array('bar' = 'boing');
  doWhatSoEver($foo[bar]);
 or
 $foo = array('bar' = 'boing');
  doWhatSoEver($foo['bar']);
 
 
 
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 


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


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




Re: [PHP-CVS] cvs: php4 /ext/standard basic_functions.c dir.c php_dir.h

2001-02-14 Thread Andi Gutmans

Derick,

You should not enable this function if ZEND_WIN32 is defined or ZTS=1 
(Thread Safety).

Andi

At 10:48 AM 2/14/2001 +, Derick Rethans wrote:
derick  Wed Feb 14 02:48:49 2001 EDT

   Modified files:
 /php4/ext/standard  basic_functions.c dir.c php_dir.h
   Log:
   - Added the chroot function for changing root in a script.
   #- This can be usefull when using PHP in a shell environment, or when PHP
   #  runs as CGI which needs a little more security


Index: php4/ext/standard/basic_functions.c
diff -u php4/ext/standard/basic_functions.c:1.302 
php4/ext/standard/basic_functions.c:1.303
--- php4/ext/standard/basic_functions.c:1.302   Mon Feb  5 13:59:16 2001
+++ php4/ext/standard/basic_functions.c Wed Feb 14 02:48:48 2001
@@ -17,7 +17,7 @@
 +--+
   */

-/* $Id: basic_functions.c,v 1.302 2001/02/05 21:59:16 zeev Exp $ */
+/* $Id: basic_functions.c,v 1.303 2001/02/14 10:48:48 derick Exp $ */

  #include "php.h"
  #include "php_main.h"
@@ -465,6 +465,7 @@
 PHP_FE(opendir, NULL)
 PHP_FE(closedir,NULL)
 PHP_FE(chdir,   NULL)
+   PHP_FE(chroot,  NULL)
 PHP_FE(getcwd,  NULL)
 PHP_FE(rewinddir,   NULL)
 PHP_STATIC_FE("readdir", php_if_readdir, NULL)
Index: php4/ext/standard/dir.c
diff -u php4/ext/standard/dir.c:1.52 php4/ext/standard/dir.c:1.53
--- php4/ext/standard/dir.c:1.52Sat Dec 16 12:52:43 2000
+++ php4/ext/standard/dir.c Wed Feb 14 02:48:48 2001
@@ -17,7 +17,7 @@
 +--+
   */

-/* $Id: dir.c,v 1.52 2000/12/16 20:52:43 andi Exp $ */
+/* $Id: dir.c,v 1.53 2001/02/14 10:48:48 derick Exp $ */

  /* {{{ includes/startup/misc */

@@ -219,6 +219,30 @@
 if (dirp-id == DIRG(default_dir)) {
 php_set_default_dir(-1 DIRLS_CC);
 }
+}
+
+/* }}} */
+/* {{{ proto int chroot(string directory)
+   Change root directory */
+
+PHP_FUNCTION(chroot)
+{
+   pval **arg;
+   int ret;
+
+   if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, arg) == 
FAILURE) {
+   WRONG_PARAM_COUNT;
+   }
+   convert_to_string_ex(arg);
+
+   ret = chroot((*arg)-value.str.val);
+
+   if (ret != 0) {
+   php_error(E_WARNING, "chroot: %s (errno %d)", 
strerror(errno), errno);
+   RETURN_FALSE;
+   }
+
+   RETURN_TRUE;
  }

  /* }}} */
Index: php4/ext/standard/php_dir.h
diff -u php4/ext/standard/php_dir.h:1.11 php4/ext/standard/php_dir.h:1.12
--- php4/ext/standard/php_dir.h:1.11Thu Dec  7 04:09:38 2000
+++ php4/ext/standard/php_dir.h Wed Feb 14 02:48:48 2001
@@ -17,7 +17,7 @@
 +--+
   */

-/* $Id: php_dir.h,v 1.11 2000/12/07 12:09:38 sas Exp $ */
+/* $Id: php_dir.h,v 1.12 2001/02/14 10:48:48 derick Exp $ */

  #ifndef PHP_DIR_H
  #define PHP_DIR_H
@@ -28,6 +28,7 @@
  PHP_FUNCTION(opendir);
  PHP_FUNCTION(closedir);
  PHP_FUNCTION(chdir);
+PHP_FUNCTION(chroot);
  PHP_FUNCTION(getcwd);
  PHP_FUNCTION(rewinddir);
  PHP_NAMED_FUNCTION(php_if_readdir);



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


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




Re: [PHP-CVS] cvs: php4 / configure.in /ext/standard basic_functions.c dir.c php_dir.h

2001-02-14 Thread Andi Gutmans

ZTS is 0 or 1 but always defined.
So that needs to be changed. I'd do it but I'm very late for something and 
need to run.
Andi


At 05:21 AM 2/15/2001 +, Sascha Schumann wrote:
sas Wed Feb 14 21:21:28 2001 EDT

   Modified files:
 /php4   configure.in
 /php4/ext/standard  php_dir.h dir.c basic_functions.c
   Log:
   There might be more systems which do not support chroot, so we check
   for the existence of it.

   Additionally, if chroot is not supported, the warn_not_available function
   is invoked now.


Index: php4/configure.in
diff -u php4/configure.in:1.217 php4/configure.in:1.218
--- php4/configure.in:1.217 Mon Feb  5 16:03:44 2001
+++ php4/configure.in   Wed Feb 14 21:21:27 2001
@@ -1,4 +1,4 @@
-dnl ## $Id: configure.in,v 1.217 2001/02/06 00:03:44 svanegmond Exp $ -*- 
sh -*-
+dnl ## $Id: configure.in,v 1.218 2001/02/15 05:21:27 sas Exp $ -*- sh -*-
  dnl ## Process this file with autoconf to produce a configure script.

  divert(1)
@@ -358,6 +358,7 @@
  AC_FUNC_VPRINTF
  AC_CHECK_FUNCS(
  asctime_r \
+chroot \
  crypt \
  ctime_r \
  cuserid \
Index: php4/ext/standard/php_dir.h
diff -u php4/ext/standard/php_dir.h:1.13 php4/ext/standard/php_dir.h:1.14
--- php4/ext/standard/php_dir.h:1.13Wed Feb 14 16:43:44 2001
+++ php4/ext/standard/php_dir.h Wed Feb 14 21:21:27 2001
@@ -17,7 +17,7 @@
 +--+
   */

-/* $Id: php_dir.h,v 1.13 2001/02/15 00:43:44 derick Exp $ */
+/* $Id: php_dir.h,v 1.14 2001/02/15 05:21:27 sas Exp $ */

  #ifndef PHP_DIR_H
  #define PHP_DIR_H
@@ -28,7 +28,7 @@
  PHP_FUNCTION(opendir);
  PHP_FUNCTION(closedir);
  PHP_FUNCTION(chdir);
-#if !defined(ZEND_WIN32)!defined(ZTS)
+#if defined(HAVE_CHROOT)  !defined(ZTS)
  PHP_FUNCTION(chroot);
  #endif
  PHP_FUNCTION(getcwd);
Index: php4/ext/standard/dir.c
diff -u php4/ext/standard/dir.c:1.55 php4/ext/standard/dir.c:1.56
--- php4/ext/standard/dir.c:1.55Wed Feb 14 16:43:44 2001
+++ php4/ext/standard/dir.c Wed Feb 14 21:21:27 2001
@@ -17,7 +17,7 @@
 +--+
   */

-/* $Id: dir.c,v 1.55 2001/02/15 00:43:44 derick Exp $ */
+/* $Id: dir.c,v 1.56 2001/02/15 05:21:27 sas Exp $ */

  /* {{{ includes/startup/misc */

@@ -223,7 +223,7 @@

  /* }}} */

-#if !defined(ZEND_WIN32)!defined(ZTS)
+#if defined(HAVE_CHROOT)  !defined(ZTS)
  /* {{{ proto int chroot(string directory)
 Change root directory */

Index: php4/ext/standard/basic_functions.c
diff -u php4/ext/standard/basic_functions.c:1.304 
php4/ext/standard/basic_functions.c:1.305
--- php4/ext/standard/basic_functions.c:1.304   Wed Feb 14 16:43:44 2001
+++ php4/ext/standard/basic_functions.c Wed Feb 14 21:21:27 2001
@@ -17,7 +17,7 @@
 +--+
   */

-/* $Id: basic_functions.c,v 1.304 2001/02/15 00:43:44 derick Exp $ */
+/* $Id: basic_functions.c,v 1.305 2001/02/15 05:21:27 sas Exp $ */

  #include "php.h"
  #include "php_main.h"
@@ -465,8 +465,10 @@
 PHP_FE(opendir, NULL)
 PHP_FE(closedir,NULL)
 PHP_FE(chdir,   NULL)
-#if !defined(ZEND_WIN32)!defined(ZTS)
+#if defined(HAVE_CHROOT)  !defined(ZTS)
 PHP_FE(chroot,  NULL)
+#else
+   PHP_FALIAS(chroot, warn_not_available, NULL)
  #endif
 PHP_FE(getcwd,  NULL)
 PHP_FE(rewinddir,   NULL)



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


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




Re: [PHP-CVS] cvs: php4 /ext/ircg ircg.c

2001-02-17 Thread Andi Gutmans

At 05:31 PM 2/17/2001 +, Sascha Schumann wrote:
sas Sat Feb 17 09:31:36 2001 EDT

   Modified files:
 /php4/ext/ircg  ircg.c
   Log:
   Add initial CTCP handling and fix a possible segfault in ircg_msg()


Index: php4/ext/ircg/ircg.c
diff -u php4/ext/ircg/ircg.c:1.25 php4/ext/ircg/ircg.c:1.26
--- php4/ext/ircg/ircg.c:1.25   Sat Feb 17 00:30:10 2001
+++ php4/ext/ircg/ircg.cSat Feb 17 09:31:36 2001
@@ -16,7 +16,7 @@
 +--+
   */

-/* $Id: ircg.c,v 1.25 2001/02/17 08:30:10 sas Exp $ */
+/* $Id: ircg.c,v 1.26 2001/02/17 17:31:36 sas Exp $ */

  #include "php.h"
  #include "php_ini.h"
@@ -84,6 +84,7 @@
 int irconn_id;
 php_fmt_msgs_t *fmt_msgs;
 irc_write_buf wb;
+   HashTable ctcp_msgs;
  } php_irconn_t;

  static char *fmt_msgs_default[] = {
@@ -157,6 +158,7 @@
 conn-fd = -2;
 zend_hash_index_del(h_irconn, conn-irconn_id);

+   zend_hash_destroy(conn-ctcp_msgs);
 zend_llist_destroy(conn-buffer);
 free(conn);
  }
@@ -271,14 +273,48 @@
 zend_llist_apply_with_argument(conn-buffer, msg_send_apply, conn);
  }

+
+static void handle_ctcp(php_irconn_t *conn, const char *chan, const char 
*from,
+   smart_str *msg, smart_str *result)
+{
+   char *token_end;
+   char *real_msg;
+   char *real_msg_end;
+
+   for (token_end = msg-c + 1; *token_end; token_end++)
+   if (!isalpha(*token_end)) break;
+
+   if (*token_end != '\001') {
+   real_msg = token_end + 1;
+
+   real_msg_end = strchr(real_msg, '\001');
+   if (real_msg_end) {
+   char *fmt_msg;
+
+   *real_msg_end = '\0';
+   *token_end = '\0';
+
+   if (zend_hash_find(conn-ctcp_msgs, msg-c + 1, 
token_end - msg-c - 1, (void **) fmt_msg) != SUCCESS) {
+   return;
+   }
+
+   format_msg(fmt_msg, chan, conn-conn.username, 
from, real_msg,
+   result);
+   }
+   }
+}
+
+
  static void msg_handler(irconn_t *ircc, const char *chan, const char *from,
 smart_str *msg, void *conn_data, void *chan_data)
  {
 php_irconn_t *conn = conn_data;
 static smart_str m;

-   m.len = 0;
-   if (chan) {
+   m.len = 0;
+   if (msg-c[0] == '\001') {
+   handle_ctcp(conn, chan, from, msg, m);
+   } else if (chan) {
 format_msg(MSG(conn, FMT_MSG_CHAN), chan, ircc-username, 
 from, msg-c,
 m);
 } else {
@@ -540,20 +576,43 @@
 irc_register_hook(conn, IRCG_TOPIC, new_topic);
  }

+static int ircg_copy_ctcp_msgs(zval **array, php_irconn_t *conn)
+{
+   zval **val;
+   char *str;
+   ulong num;
+
+   zend_hash_internal_pointer_reset(Z_ARRVAL_PP(array));
+
+   while (zend_hash_get_current_key(Z_ARRVAL_PP(array), str, num, 
0) == HASH_KEY_IS_STRING) {
+   zend_hash_get_current_data(Z_ARRVAL_PP(array), (void **) 
val);
+   convert_to_string_ex(val);
+   zend_hash_add(conn-ctcp_msgs, str, strlen(str), 
Z_STRVAL_PP(val),
+   Z_STRLEN_PP(val) + 1, NULL);
+
+   zend_hash_move_forward(Z_ARRVAL_PP(array));
+   }
+
+   return 0;
+}
+
  PHP_FUNCTION(ircg_pconnect)
  {
-   zval **p1, **p2, **p3, **p4 = NULL;
+   zval **p1, **p2, **p3, **p4 = NULL, **p5 = NULL;
 const char *username;
 const char *server = "0";
 int port = 6667;
 php_fmt_msgs_t *fmt_msgs = NULL;
 php_irconn_t *conn;

-   if (ZEND_NUM_ARGS()  1 || ZEND_NUM_ARGS()  4
-   || zend_get_parameters_ex(ZEND_NUM_ARGS(), p1, 
p2, p3, p4) == FAILURE)
+   if (ZEND_NUM_ARGS()  1 || ZEND_NUM_ARGS()  5
+   || zend_get_parameters_ex(ZEND_NUM_ARGS(), p1, 
p2, p3, p4, p5) == FAILURE)
 WRONG_PARAM_COUNT;

 switch (ZEND_NUM_ARGS()) {
+   case 5:
+   if (Z_TYPE_PP(p5) != IS_ARRAY)
+   WRONG_PARAM_COUNT;
 case 4:
 convert_to_string_ex(p4);
 fmt_msgs = lookup_fmt_msgs(p4);
@@ -575,11 +634,15 @@
 conn = malloc(sizeof(*conn));
 conn-fd = -1;

+   zend_hash_init(conn-ctcp_msgs, 10, NULL, NULL, 1);
 if (irc_connect(username, register_hooks,
 conn, server, port, conn-conn)) {
 free(conn);
 RETURN_FALSE;
 }
+   if (p5) {
+   ircg_copy_ctcp_msgs(p5, conn);
+   }
 conn-fmt_msgs = fmt_msgs;
 irconn_id++;
 conn-irconn_id = irconn_id;
@@ -646,7 +709,6 @@

 irc_msg(conn-conn, Z_STRVAL_PP(recipient), Z_STRVAL_PP(msg));
 smart_str_setl(l, Z_STRVAL_PP(msg), 

Re: [PHP-CVS] cvs: php4 /ext/midgard midgard.c

2001-02-22 Thread Andi Gutmans

You only have the module globals during requests (rinit/rshutdown). You 
can't access them in module init/module shutdown.

Andi

At 11:35 PM 2/20/2001 +, Emiliano Heyns wrote:
emile   Tue Feb 20 15:35:35 2001 EDT

   Modified files:
 /php4/ext/midgard   midgard.c
   Log:
   Initialize globals to NULL at module init


Index: php4/ext/midgard/midgard.c
diff -u php4/ext/midgard/midgard.c:1.5 php4/ext/midgard/midgard.c:1.6
--- php4/ext/midgard/midgard.c:1.5  Sun Feb 18 10:45:24 2001
+++ php4/ext/midgard/midgard.c  Tue Feb 20 15:35:35 2001
@@ -1,4 +1,4 @@
-/* $Id: midgard.c,v 1.5 2001/02/18 18:45:24 davidg Exp $
+/* $Id: midgard.c,v 1.6 2001/02/20 23:35:35 emile Exp $
  Copyright (C) 1999 Jukka Zitting [EMAIL PROTECTED]
  Copyright (C) 2000 The Midgard Project ry
  Copyright (C) 2000 Emile Heyns, Aurora SA [EMAIL PROTECTED]
@@ -319,6 +319,10 @@
  PHP_MINIT_FUNCTION(midgard)
  {
 MidgardClassPtr *midgard_class;
+
+   MGDLS_FETCH();
+   MGDG(rcfg) = NULL;
+   MGDG(dcfg) = NULL;

 ZEND_INIT_MODULE_GLOBALS(midgard, php_midgard_init_globals, NULL);
  /* Remove comments if you have entries in php.ini



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


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




Re: [PHP-CVS] cvs: php4 /ext/midgard midgard.c

2001-02-22 Thread Andi Gutmans

Because thread-wide globals are only available when you're actually in the 
thread (during a request) and not when the process starts up. If you need 
true globals you can just use globals.

Andi

At 12:34 PM 2/22/2001 +0100, Thies C. Arntzen wrote:
On Thu, Feb 22, 2001 at 01:26:45PM +0200, Andi Gutmans wrote:
  You only have the module globals during requests (rinit/rshutdown). You
  can't access them in module init/module shutdown.

 could you explain why? ok the the midgard PHP_MINIT_FUNCTION
 does not allocate a tsrm_id for the module (which is wrong)
 but apart from that i see no reason why the globals should
 not be available all-time.

 tc

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


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




Re: [PHP-CVS] cvs: php4 /ext/midgard midgard.c

2001-02-22 Thread Andi Gutmans

Yes. It will call your init_globals just in time, usually on your first 
access to the data if I remember correctly. Your fix is correct. I didn't 
see it when I sent that Email.

Andi

At 12:37 PM 2/22/2001 +0100, Emiliano wrote:
Andi Gutmans wrote:
 
  You only have the module globals during requests (rinit/rshutdown). You
  can't access them in module init/module shutdown.

Yeah, I realized that moments later and removed it. But
ZEND_INIT_MODULE_GLOBALS
will call the init_globals function before the request starts, right?

PHP_MINIT_FUNCTION(midgard)
{
   MidgardClassPtr *midgard_class;
  +
  +   MGDLS_FETCH();
  +   MGDG(rcfg) = NULL;
  +   MGDG(dcfg) = NULL;
  
   ZEND_INIT_MODULE_GLOBALS(midgard, php_midgard_init_globals, 
 NULL);

Emile

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


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




Re: [PHP-CVS] cvs: php4 /ext/midgard midgard.c

2001-02-25 Thread Andi Gutmans

Are you sure you shouldn't be using zval_ptr_dtor(args[0]) as opposed to 
zval_dtor(). I see you guys doing this a lot and usually you'd want to use 
zval_ptr_dtor(). It reduces reference count and only if the zval really 
needs freeing does it run zval_dtor() and efree(). In any case, you guys 
seem to forget the final free.

Andi

At 11:34 PM 2/25/2001 +, David Guerizec wrote:
davidg  Sun Feb 25 15:34:48 2001 EDT

   Modified files:
 /php4/ext/midgard   midgard.c
   Log:
   force user to pass $xparam by reference (from mgd_walk_xxx_tree() 
 functions)


Index: php4/ext/midgard/midgard.c
diff -u php4/ext/midgard/midgard.c:1.18 php4/ext/midgard/midgard.c:1.19
--- php4/ext/midgard/midgard.c:1.18 Sun Feb 25 11:31:17 2001
+++ php4/ext/midgard/midgard.c  Sun Feb 25 15:34:48 2001
@@ -1,4 +1,4 @@
-/* $Id: midgard.c,v 1.18 2001/02/25 19:31:17 davidg Exp $
+/* $Id: midgard.c,v 1.19 2001/02/25 23:34:48 davidg Exp $
  Copyright (C) 1999 Jukka Zitting [EMAIL PROTECTED]
  Copyright (C) 2000 The Midgard Project ry
  Copyright (C) 2000 Emile Heyns, Aurora SA [EMAIL PROTECTED]
@@ -751,22 +751,28 @@
 zval ** xp = (zval **)xparam;
 zval *return_value;

+   if(!PZVAL_IS_REF(xp[0])) {
+   /* DG: Do we force the user to pass it by reference ? */
+   php_error(E_WARNING,"You must pass the fourth parameter by 
reference.");
+   return;
+   }
 ALLOC_ZVAL(return_value);   ZVAL_NULL(return_value);
 ALLOC_ZVAL(args[0]);ZVAL_LONG(args[0], id);
 ALLOC_ZVAL(args[1]);ZVAL_LONG(args[1], level);
-   args[2] = xp[0];// DG: is this needed ? -
-   zval_copy_ctor(args[2]);
+   args[2] = xp[0];// DG: is this needed ? 
-zval_copy_ctor(args[2]);

 if(call_user_function(CG(function_table), NULL,
   xp[1], return_value, 3,
   args) != SUCCESS) {
 php_error(E_WARNING,"Unable to call %s() - function does 
 not exist",
   (xp[1])-value.str.val);
+   zval_dtor(return_value);
+   zval_dtor(args[0]); zval_dtor(args[1]);
 return;
 }
+
 zval_dtor(return_value);
-   zval_dtor(args[0]);
-   zval_dtor(args[1]);
+   zval_dtor(args[0]); zval_dtor(args[1]);
  }

  #if YOU_WANT_TO_TEST



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


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




[PHP-CVS] cvs: php4 / dynlib.m4 run-tests.php /ext/aspell aspell.c php_aspell.h /ext/bcmath bcmath.c php_bcmath.h /ext/bz2 bz2.c php_bz2.h /ext/calendar cal_unix.c calendar.c easter.c /ext/ccvs ccvs.c ccvs.h /ext/com COM.c typedef_VARIANT.c /ext/ctype ctype.c php_ctype.h /ext/curl curl.c php_curl.h /ext/db db.c php_db.h /ext/dbase dbase.c php_dbase.h /ext/domxml php_domxml.c php_domxml.h /ext/dotnet dotnet.cpp /ext/exif exif.c php_exif.h /ext/fdf fdf.c php_fdf.h /ext/filepro filepro.c php_filepro.h /ext/fribidi fribidi.c php_fribidi.h /ext/gd gd.c gdt1.c gdt1.h php_gd.h /ext/gettext gettext.c php_gettext.h /ext/gmp gmp.c php_gmp.h /ext/hyperwave hg_comm.c hg_comm.h hw.c hw_error.h php_hyperwave.h /ext/iconv iconv.c php_iconv.h /ext/iisfunc iisfunc.cpp iisfunc.h setup.c setup.h /ext/imap php_imap.c /ext/informix ifx.ec /ext/ingres_ii ii.c ii.h php_ii.h /ext/interbase interbase.c php_interbase.h /ext/ircg ircg.c ircg_scanner.c ircg_scanner.re php_ircg.h /ext/java java.c reflect.java /ext/ldap ldap.c php_ldap.h /ext/mcal php_mcal.c /ext/mcrypt mcrypt.c /ext/mhash mhash.c /ext/ming ming.c php_ming.h /ext/msql php_msql.c php_msql.h /ext/mssql php_mssql.c php_mssql.h /ext/mysql php_mysql.c php_mysql.h /ext/notes php_notes.c php_notes.h /ext/oci8 oci8.c php_oci8.h /ext/odbc php_odbc.c php_odbc.h php_velocis.h velocis.c /ext/openssl openssl.c php_openssl.h /ext/oracle oracle.c /ext/ovrimos ovrimos.c /ext/pcre php_pcre.c php_pcre.h /ext/pdf pdf.c php_pdf.h /ext/pfpro pfpro.c php_pfpro.h /ext/pgsql pgsql.c php_pgsql.h /ext/printer php_printer.h printer.c /ext/pspell php_pspell.h pspell.c /ext/qtdom qtdom.c qtdom.h /ext/readline php_readline.h readline.c /ext/recode php_recode.h /ext/sablot php_sablot.h sablot.c /ext/satellite Makefile.in class.c class.h common.c common.h corba.c corba.h enum.c enum.h findtype.c findtype.h hashtable.c hashtable.h namedvalue_to_zval.c namedvalue_to_zval.h object.c object.h php_orbit.c php_orbit.h struct.c struct.h typecode.c typecode.h typemanager.c typemanager.h zval_to_namedvalue.c zval_to_namedvalue.h /ext/session mod_files.c mod_mm.c mod_user.c mod_user.h session.c /ext/shmop php_shmop.h shmop.c /ext/snmp php_snmp.h snmp.c /ext/sockets php_sockets.h sockets.c /ext/standard array.c assert.c base64.c base64.h basic_functions.c basic_functions.h browscap.c crc32.c credits.c credits.h crypt.c cyr_convert.c cyr_convert.h datetime.c datetime.h dir.c dl.c dl.h dns.c dns.h exec.c exec.h file.c file.h filestat.c flock_compat.c flock_compat.h formatted_print.c fsock.c fsock.h ftp_fopen_wrapper.c head.c head.h html.c html.h http_fopen_wrapper.c image.c incomplete_class.c info.c info.h iptc.c lcg.c levenshtein.c link.c mail.c math.c md5.c md5.h metaphone.c microtime.c microtime.h output.c pack.c pack.h pageinfo.c pageinfo.h php_array.h php_assert.h php_browscap.h php_crypt.h php_dir.h php_ext_syslog.h php_filestat.h php_fopen_wrapper.c php_fopen_wrappers.h php_image.h php_incomplete_class.h php_iptc.h php_lcg.h php_link.h php_mail.h php_math.h php_metaphone.h php_output.h php_parsedate.h php_rand.h php_smart_str.h php_smart_str_public.h php_standard.h php_string.h php_var.h quot_print.c quot_print.h rand.c reg.c reg.h scanf.c scanf.h soundex.c string.c syslog.c type.c type.h uniqid.c uniqid.h url.c url.h url_scanner.c url_scanner.h url_scanner_ex.c url_scanner_ex.h url_scanner_ex.re var.c /ext/swf php_swf.h swf.c /ext/sybase php_sybase_db.c php_sybase_db.h /ext/sybase_ct php_sybase_ct.c php_sybase_ct.h /ext/sysvsem php_sysvsem.h sysvsem.c /ext/sysvshm php_sysvshm.h sysvshm.c /ext/vpopmail php_vpopmail.h /ext/wddx php_wddx_api.h /ext/xml php_xml.h xml.c /ext/yaz php_yaz.c php_yaz.h /ext/yp php_yp.h yp.c /ext/zlib php_zlib.h zlib.c zlib_fopen_wrapper.c /ext/zziplib php_zziplib.h zziplib.c /main SAPI.c SAPI.h build-defs.h.in fopen_wrappers.c fopen_wrappers.h internal_functions.c.in internal_functions_registry.h internal_functions_win32.c main.c network.c php.h php_content_types.c php_globals.h php_ini.c php_ini.h php_logos.c php_main.h php_network.h php_open_temporary_file.c php_open_temporary_file.h php_reentrancy.h php_sprintf.c php_ticks.c php_ticks.h php_variables.c php_variables.h reentrancy.c rfc1867.c safe_mode.c snprintf.h /sapi/aolserver aolserver.c /sapi/apache mod_php4.c mod_php4.h php_apache.c sapi_apache.c /sapi/apache2filter apache_config.c php_apache.h php_functions.c sapi_apache2.c /sapi/caudium caudium.c /sapi/cgi cgi_main.c /sapi/fhttpd fhttpd.c /sapi/isapi php4isapi.c /sapi/nsapi nsapi.c /sapi/phttpd php_phttpd.h phttpd.c /sapi/pi3web pi3web_sapi.c /sapi/roxen roxen.c /sapi/servlet formatter.java servlet.c servlet.java /sapi/thttpd php_thttpd.h thttpd.c /scripts conv_z_macros

2001-02-25 Thread Andi Gutmans

andiSun Feb 25 22:07:42 2001 EDT

  Modified files:  
/php4   dynlib.m4 run-tests.php 
/php4/ext/aspellaspell.c php_aspell.h 
/php4/ext/bcmathbcmath.c php_bcmath.h 
/php4/ext/bz2   bz2.c php_bz2.h 
/php4/ext/calendar  cal_unix.c calendar.c easter.c 
/php4/ext/ccvs  ccvs.c ccvs.h 
/php4/ext/com   COM.c typedef_VARIANT.c 
/php4/ext/ctype ctype.c php_ctype.h 
/php4/ext/curl  curl.c php_curl.h 
/php4/ext/dbdb.c php_db.h 
/php4/ext/dbase dbase.c php_dbase.h 
/php4/ext/domxmlphp_domxml.c php_domxml.h 
/php4/ext/dotnetdotnet.cpp 
/php4/ext/exif  exif.c php_exif.h 
/php4/ext/fdf   fdf.c php_fdf.h 
/php4/ext/filepro   filepro.c php_filepro.h 
/php4/ext/fribidi   fribidi.c php_fribidi.h 
/php4/ext/gdgd.c gdt1.c gdt1.h php_gd.h 
/php4/ext/gettext   gettext.c php_gettext.h 
/php4/ext/gmp   gmp.c php_gmp.h 
/php4/ext/hyperwave hg_comm.c hg_comm.h hw.c hw_error.h 
php_hyperwave.h 
/php4/ext/iconv iconv.c php_iconv.h 
/php4/ext/iisfunc   iisfunc.cpp iisfunc.h setup.c setup.h 
/php4/ext/imap  php_imap.c 
/php4/ext/informix  ifx.ec 
/php4/ext/ingres_ii ii.c ii.h php_ii.h 
/php4/ext/interbase interbase.c php_interbase.h 
/php4/ext/ircg  ircg.c ircg_scanner.c ircg_scanner.re php_ircg.h 
/php4/ext/java  java.c reflect.java 
/php4/ext/ldap  ldap.c php_ldap.h 
/php4/ext/mcal  php_mcal.c 
/php4/ext/mcryptmcrypt.c 
/php4/ext/mhash mhash.c 
/php4/ext/ming  ming.c php_ming.h 
/php4/ext/msql  php_msql.c php_msql.h 
/php4/ext/mssql php_mssql.c php_mssql.h 
/php4/ext/mysql php_mysql.c php_mysql.h 
/php4/ext/notes php_notes.c php_notes.h 
/php4/ext/oci8  oci8.c php_oci8.h 
/php4/ext/odbc  php_odbc.c php_odbc.h php_velocis.h velocis.c 
/php4/ext/openssl   openssl.c php_openssl.h 
/php4/ext/oracleoracle.c 
/php4/ext/ovrimos   ovrimos.c 
/php4/ext/pcre  php_pcre.c php_pcre.h 
/php4/ext/pdf   pdf.c php_pdf.h 
/php4/ext/pfpro pfpro.c php_pfpro.h 
/php4/ext/pgsql pgsql.c php_pgsql.h 
/php4/ext/printer   php_printer.h printer.c 
/php4/ext/pspellphp_pspell.h pspell.c 
/php4/ext/qtdom qtdom.c qtdom.h 
/php4/ext/readline  php_readline.h readline.c 
/php4/ext/recodephp_recode.h 
/php4/ext/sablotphp_sablot.h sablot.c 
/php4/ext/satellite Makefile.in class.c class.h common.c common.h 
corba.c corba.h enum.c enum.h findtype.c 
findtype.h hashtable.c hashtable.h 
namedvalue_to_zval.c namedvalue_to_zval.h 
object.c object.h php_orbit.c php_orbit.h 
struct.c struct.h typecode.c typecode.h 
typemanager.c typemanager.h 
zval_to_namedvalue.c zval_to_namedvalue.h 
/php4/ext/session   mod_files.c mod_mm.c mod_user.c mod_user.h 
session.c 
/php4/ext/shmop php_shmop.h shmop.c 
/php4/ext/snmp  php_snmp.h snmp.c 
/php4/ext/sockets   php_sockets.h sockets.c 
/php4/ext/standard  array.c assert.c base64.c base64.h 
basic_functions.c basic_functions.h browscap.c 
crc32.c credits.c credits.h crypt.c 
cyr_convert.c cyr_convert.h datetime.c 
datetime.h dir.c dl.c dl.h dns.c dns.h exec.c 
exec.h file.c file.h filestat.c flock_compat.c 
flock_compat.h formatted_print.c fsock.c fsock.h 
ftp_fopen_wrapper.c head.c head.h html.c html.h 
http_fopen_wrapper.c image.c incomplete_class.c 
info.c info.h iptc.c lcg.c levenshtein.c link.c 
mail.c math.c md5.c md5.h metaphone.c 
microtime.c microtime.h output.c pack.c pack.h 
pageinfo.c pageinfo.h php_array.h php_assert.h 
php_browscap.h php_crypt.h php_dir.h 
php_ext_syslog.h php_filestat.h 
php_fopen_wrapper.c php_fopen_wrappers.h 
php_image.h php_incomplete_class.h php_iptc.h 
php_lcg.h php_link.h php_mail.h php_math.h 
php_metaphone.h php_output.h php_parsedate.h 
php_rand.h php_smart_str.h 
php_smart_str_public.h php_standard.h 
php_string.h php_var.h quot_print.c quot_print.h 
rand.c reg.c reg.h scanf.c scanf.h soundex.c 
string.c syslog.c type.c type.h uniqid.c 
uniqid.h url.c url.h url_scanner.c url_scanner.h 
   

[PHP-CVS] cvs: php4 /ext/standard string.c

2001-02-26 Thread Andi Gutmans

andiMon Feb 26 07:49:38 2001 EDT

  Modified files:  
/php4/ext/standard  string.c 
  Log:
  - Fix whitespace
  
  
Index: php4/ext/standard/string.c
diff -u php4/ext/standard/string.c:1.192 php4/ext/standard/string.c:1.193
--- php4/ext/standard/string.c:1.192Mon Feb 26 05:04:00 2001
+++ php4/ext/standard/string.c  Mon Feb 26 07:49:38 2001
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: string.c,v 1.192 2001/02/26 13:04:00 jmoore Exp $ */
+/* $Id: string.c,v 1.193 2001/02/26 15:49:38 andi Exp $ */
 
 /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */
 
@@ -378,7 +378,7 @@
l = 0;
while (newtext[i+l] != breakchar[0]) {
if (newtext[i+l] == '\0') {
-   l --;
+   l--;
break;
}
l++;
@@ -392,7 +392,7 @@
newtext[i+l] = breakchar[0];
break;
}
-   l --;
+   l--;
}
if (l == -1) {
/* couldn't break is backwards, try looking 
forwards */
@@ -402,7 +402,7 @@
newtext[i+l] = breakchar[0];
break;
}
-   l ++;
+   l++;
}
}
}
@@ -425,7 +425,7 @@
if (breakcharlen == 1 || strncmp(text+i+l, 
breakchar, breakcharlen)==0)
break;
}
-   l ++;
+   l++;
}
if (l = linelength) {
pgr = l;
@@ -439,7 +439,7 @@
last = i + l + 1;
break;
}
-   l --;
+   l--;
}
if (l == -1) {
/* couldn't break it backwards, try looking 
forwards */
@@ -463,7 +463,7 @@
break;
}
}
-   l ++;
+   l++;
}
}
i += l+1;



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




[PHP-CVS] cvs: php4 / configure.in /ext/gettext php_gettext.h /ext/icap php_icap.c /ext/imap php_imap.h /ext/mcal php_mcal.c /ext/mcrypt php_mcrypt.h /ext/mhash php_mhash.h /ext/midgard php_midgard.h /ext/ovrimos php_ovrimos.h /main internal_functions.c.in internal_functions_win32.c php.h /sapi/cgi cgi_main.c

2001-02-26 Thread Andi Gutmans

andiMon Feb 26 10:14:32 2001 EDT

  Modified files:  
/php4   configure.in 
/php4/ext/gettext   php_gettext.h 
/php4/ext/icap  php_icap.c 
/php4/ext/imap  php_imap.h 
/php4/ext/mcal  php_mcal.c 
/php4/ext/mcryptphp_mcrypt.h 
/php4/ext/mhash php_mhash.h 
/php4/ext/midgard   php_midgard.h 
/php4/ext/ovrimos   php_ovrimos.h 
/php4/main  internal_functions.c.in internal_functions_win32.c php.h 
/php4/sapi/cgi  cgi_main.c 
  Log:
  - Finally rename modules.h to zend_modules.h for consistency (first try
was 2000-03-11).
  - Remove the first_arg_force_ref[]; and friends extern from php.h as they
are included via zend_API.h
  
  
Index: php4/configure.in
diff -u php4/configure.in:1.218 php4/configure.in:1.219
--- php4/configure.in:1.218 Wed Feb 14 21:21:27 2001
+++ php4/configure.in   Mon Feb 26 10:14:27 2001
@@ -1,4 +1,4 @@
-dnl ## $Id: configure.in,v 1.218 2001/02/15 05:21:27 sas Exp $ -*- sh -*-
+dnl ## $Id: configure.in,v 1.219 2001/02/26 18:14:27 andi Exp $ -*- sh -*-
 dnl ## Process this file with autoconf to produce a configure script.
 
 divert(1)
@@ -699,7 +699,7 @@
   PART2=non-zts
 fi
 
-ZEND_MODULE_API_NO=`egrep '#define ZEND_MODULE_API_NO ' $srcdir/Zend/modules.h|sed 
's/#define ZEND_MODULE_API_NO //'`
+ZEND_MODULE_API_NO=`egrep '#define ZEND_MODULE_API_NO ' 
+$srcdir/Zend/zend_modules.h|sed 's/#define ZEND_MODULE_API_NO //'`
 
 EXTENSION_DIR="$prefix/lib/php/extensions/$PART1-$PART2-$ZEND_MODULE_API_NO"
 
Index: php4/ext/gettext/php_gettext.h
diff -u php4/ext/gettext/php_gettext.h:1.10 php4/ext/gettext/php_gettext.h:1.11
--- php4/ext/gettext/php_gettext.h:1.10 Sun Feb 25 22:06:56 2001
+++ php4/ext/gettext/php_gettext.h  Mon Feb 26 10:14:28 2001
@@ -16,14 +16,14 @@
+--+
 */
 
-/* $Id: php_gettext.h,v 1.10 2001/02/26 06:06:56 andi Exp $ */
+/* $Id: php_gettext.h,v 1.11 2001/02/26 18:14:28 andi Exp $ */
 
 #ifndef PHP_GETTEXT_H
 #define PHP_GETTEXT_H
 
 #if HAVE_LIBINTL
 #ifndef INIT_FUNC_ARGS
-#include "modules.h"
+#include "zend_modules.h"
 #endif
 
 extern zend_module_entry php_gettext_module_entry;
Index: php4/ext/icap/php_icap.c
diff -u php4/ext/icap/php_icap.c:1.21 php4/ext/icap/php_icap.c:1.22
--- php4/ext/icap/php_icap.c:1.21   Wed Oct 25 10:43:51 2000
+++ php4/ext/icap/php_icap.cMon Feb 26 10:14:28 2001
@@ -45,7 +45,7 @@
 #include stdarg.h
 #include "cal.h"
 #include "php_icap.h"
-#include "modules.h"
+#include "zend_modules.h"
 #include "ext/standard/info.h"
 #include "ext/standard/basic_functions.h"
 #ifdef PHP_WIN32
Index: php4/ext/imap/php_imap.h
diff -u php4/ext/imap/php_imap.h:1.7 php4/ext/imap/php_imap.h:1.8
--- php4/ext/imap/php_imap.h:1.7Mon Feb 26 07:17:12 2001
+++ php4/ext/imap/php_imap.hMon Feb 26 10:14:28 2001
@@ -15,7 +15,7 @@
  #include "rfc822.h" 
 #endif
 
-#include "modules.h"
+#include "zend_modules.h"
 
 extern zend_module_entry imap_module_entry;
 #define imap_module_ptr imap_module_entry
Index: php4/ext/mcal/php_mcal.c
diff -u php4/ext/mcal/php_mcal.c:1.40 php4/ext/mcal/php_mcal.c:1.41
--- php4/ext/mcal/php_mcal.c:1.40   Sun Feb 25 22:07:01 2001
+++ php4/ext/mcal/php_mcal.cMon Feb 26 10:14:28 2001
@@ -34,7 +34,7 @@
 #include stdarg.h
 #include "mcal.h"
 #include "php_mcal.h"
-#include "modules.h"
+#include "zend_modules.h"
 #include "ext/standard/info.h"
 #include "ext/standard/basic_functions.h"
 #ifdef PHP_WIN32
Index: php4/ext/mcrypt/php_mcrypt.h
diff -u php4/ext/mcrypt/php_mcrypt.h:1.15 php4/ext/mcrypt/php_mcrypt.h:1.16
--- php4/ext/mcrypt/php_mcrypt.h:1.15   Sun Aug 13 04:53:04 2000
+++ php4/ext/mcrypt/php_mcrypt.hMon Feb 26 10:14:29 2001
@@ -9,7 +9,7 @@
 
 #if PHP_API_VERSION  19990421
 #define  zend_module_entry zend_module_entry
-#include "modules.h"
+#include "zend_modules.h"
 #include "internal_functions.h"
 #endif
 
Index: php4/ext/mhash/php_mhash.h
diff -u php4/ext/mhash/php_mhash.h:1.6 php4/ext/mhash/php_mhash.h:1.7
--- php4/ext/mhash/php_mhash.h:1.6  Wed Oct 25 11:09:23 2000
+++ php4/ext/mhash/php_mhash.h  Mon Feb 26 10:14:29 2001
@@ -5,7 +5,7 @@
 
 #if PHP_API_VERSION  19990421
 #define  zend_module_entry zend_module_entry
-#include "modules.h"
+#include "zend_modules.h"
 #include "internal_functions.h"
 #endif
 
Index: php4/ext/midgard/php_midgard.h
diff -u php4/ext/midgard/php_midgard.h:1.6 php4/ext/midgard/php_midgard.h:1.7
--- php4/ext/midgard/php_midgard.h:1.6  Sat Feb 24 13:12:11 2001
+++ php4/ext/midgard/php_midgard.h  Mon Feb 26 10:14:29 2001
@@ -1,4 +1,4 @@
-/* $Id: php_midgard.h,v 1.6 2001/02/24 21:12:11 davidg Exp $
+/* $Id: php_midgard.h,v 1.7 2001/02/26 18:14:29 andi Exp $
 Copyright (C) 1999 Jukka Zitting [EMAIL PROTECTED]
 Copyright (C) 2000 The Midgard Project ry
 Copyright (C) 2000 Emile Heyns, Aurora SA [EMAIL PROTECTED]
@@ -31,7 +31,7 @@
 #include php.h
 #include midgard/midgard.h
 #include midgard/apache.h

[PHP-CVS] cvs: php4 /ext/oci8 oci8.c /ext/readline readline.c /ext/sablot sablot.c /ext/session mod_user.c /ext/standard assert.c /ext/xml xml.c

2001-02-27 Thread Andi Gutmans

andiTue Feb 27 12:16:36 2001 EDT

  Modified files:  
/php4/ext/oci8  oci8.c 
/php4/ext/readline  readline.c 
/php4/ext/sablotsablot.c 
/php4/ext/session   mod_user.c 
/php4/ext/standard  assert.c 
/php4/ext/xml   xml.c 
  Log:
  - Pointed out by Andrei. zval_ptr_dtor() should be used instead of the
zval_del_ref() function which should be nuked.
  
  
Index: php4/ext/oci8/oci8.c
diff -u php4/ext/oci8/oci8.c:1.111 php4/ext/oci8/oci8.c:1.112
--- php4/ext/oci8/oci8.c:1.111  Sun Feb 25 22:07:08 2001
+++ php4/ext/oci8/oci8.cTue Feb 27 12:16:34 2001
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: oci8.c,v 1.111 2001/02/26 06:07:08 andi Exp $ */
+/* $Id: oci8.c,v 1.112 2001/02/27 20:16:34 andi Exp $ */
 
 /* TODO list:
  *
@@ -489,7 +489,7 @@
 
php_info_print_table_start();
php_info_print_table_row(2, "OCI8 Support", "enabled");
-   php_info_print_table_row(2, "Revision", "$Revision: 1.111 $");
+   php_info_print_table_row(2, "Revision", "$Revision: 1.112 $");
 #ifndef PHP_WIN32
php_info_print_table_row(2, "Oracle Version", PHP_OCI8_VERSION );
php_info_print_table_row(2, "Compile-time ORACLE_HOME", PHP_OCI8_DIR );
@@ -509,7 +509,7 @@
 
oci_debug("_oci_define_hash_dtor: %s",define-name);
 
-   zval_del_ref(define-zval);
+   zval_ptr_dtor(define-zval);
 
if (define-name) {
efree(define-name);
@@ -527,7 +527,7 @@
 
oci_debug("_oci_bind_hash_dtor:");
 
-   zval_del_ref((bind-zval));
+   zval_ptr_dtor((bind-zval));
 }
 
 /* }}} */
Index: php4/ext/readline/readline.c
diff -u php4/ext/readline/readline.c:1.18 php4/ext/readline/readline.c:1.19
--- php4/ext/readline/readline.c:1.18   Sun Feb 25 22:07:14 2001
+++ php4/ext/readline/readline.cTue Feb 27 12:16:35 2001
@@ -16,7 +16,7 @@
+--+
 */
 
-/* $Id: readline.c,v 1.18 2001/02/26 06:07:14 andi Exp $ */
+/* $Id: readline.c,v 1.19 2001/02/27 20:16:35 andi Exp $ */
 
 /* {{{ includes  prototypes */
 
@@ -397,7 +397,7 @@
}

for (i = 0; i  4; i++) {
-   zval_del_ref(params[i]);
+   zval_ptr_dtor(params[i]);
}
zval_dtor(_readline_array);

Index: php4/ext/sablot/sablot.c
diff -u php4/ext/sablot/sablot.c:1.35 php4/ext/sablot/sablot.c:1.36
--- php4/ext/sablot/sablot.c:1.35   Sun Feb 25 22:07:15 2001
+++ php4/ext/sablot/sablot.cTue Feb 27 12:16:35 2001
@@ -71,7 +71,7 @@
 
 /* Free macros */
 #define S_FREE(__var) if (__var) efree(__var);
-#define FUNCH_FREE(__var) if (__var) zval_del_ref((__var));
+#define FUNCH_FREE(__var) if (__var) zval_ptr_dtor((__var));
 
 /* ERROR Macros */
 
@@ -1136,7 +1136,7 @@
 default:
 convert_to_string_ex(handler);
 php_error(E_WARNING, "Sorry, too many elements, %s discarded", 
Z_STRVAL_PP(handler));
-zval_del_ref(handler);
+zval_ptr_dtor(handler);
 break;
 }
 item++;
@@ -1161,7 +1161,7 @@
 efree(retval);
 
 for (i=0; iargc; i++) {
-zval_del_ref((args[i]));
+zval_ptr_dtor((args[i]));
 }
 }
 /* }}} */
@@ -1460,7 +1460,7 @@
 efree(retval);
 
for (i = 1; i  argc; i++) {
-   zval_del_ref(argv[i]);
+   zval_ptr_dtor(argv[i]);
}
 } else {
if (level == MH_LEVEL_CRITICAL ||
@@ -1541,7 +1541,7 @@
*byteCount = Z_STRLEN_P(argv[3]);
 
for (idx = 1; idx  3; idx++) {
-   zval_del_ref((argv[idx]));
+   zval_ptr_dtor((argv[idx]));
}
}
 
Index: php4/ext/session/mod_user.c
diff -u php4/ext/session/mod_user.c:1.13 php4/ext/session/mod_user.c:1.14
--- php4/ext/session/mod_user.c:1.13Sun Feb 25 22:07:15 2001
+++ php4/ext/session/mod_user.c Tue Feb 27 12:16:35 2001
@@ -107,7 +107,7 @@
retval = ps_call_handler(PSF(close), 0, NULL);
 
for (i = 0; i  6; i++)
-   zval_del_ref(mdata-names[i]);
+   zval_ptr_dtor(mdata-names[i]);
efree(mdata);
 
PS_SET_MOD_DATA(NULL);
Index: php4/ext/standard/assert.c
diff -u php4/ext/standard/assert.c:1.27 php4/ext/standard/assert.c:1.28
--- php4/ext/standard/assert.c:1.27 Sun Feb 25 22:07:16 2001
+++ php4/ext/standard/assert.c  Tue Feb 27 12:16:35 2001
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: assert.c,v 1.27 2001/02/26 06:07:16 andi Exp $ */
+/* $Id: assert.c,v 1.28 2001/02/27 20:16:35 andi Exp $ */
 
 /* {{{ includes/startup/misc */
 
@@ -227,9 +227,9 @@
call_user_function(CG(function_table), NULL, args[0], retval, 3, 
args+1);
 
for (i = 0; i  4; i++) {
-   

[PHP-CVS] cvs: php4 /sapi/nsapi nsapi.c

2001-03-02 Thread Andi Gutmans

andiFri Mar  2 07:25:52 2001 EDT

  Modified files:  
/php4/sapi/nsapinsapi.c 
  Log:
  - Commit NSAPI patches.
  
  

Index: php4/sapi/nsapi/nsapi.c
diff -u php4/sapi/nsapi/nsapi.c:1.16 php4/sapi/nsapi/nsapi.c:1.17
--- php4/sapi/nsapi/nsapi.c:1.16Sun Feb 25 22:07:37 2001
+++ php4/sapi/nsapi/nsapi.c Fri Mar  2 07:25:51 2001
@@ -94,15 +94,16 @@
 } nsapi_equiv;
 
 static nsapi_equiv nsapi_headers[] = {
-   { "CONTENT_LENGTH", "content-length" },
-   { "CONTENT_TYPE",   "content-type" },
-   { "HTTP_ACCEPT","accept" },
+   { "CONTENT_LENGTH", "content-length" },
+   { "CONTENT_TYPE",   "content-type" },
+   { "HTTP_ACCEPT","accept" },
{ "HTTP_ACCEPT_ENCODING",   "accept-encoding" },
{ "HTTP_ACCEPT_LANGUAGE",   "accept-language" },
+   { "HTTP_ACCEPT_CHARSET","accept-charset" },
{ "HTTP_AUTHORIZATION", "authorization" },
-   { "HTTP_COOKIE","cookie" },
+   { "HTTP_COOKIE","cookie" },
{ "HTTP_IF_MODIFIED_SINCE", "if-modified-since" },
-   { "HTTP_REFERER",   "referer" },
+   { "HTTP_REFERER",   "referer" },
{ "HTTP_USER_AGENT","user-agent" },
{ "HTTP_USER_DEFINED",  "user-defined" }
 };
@@ -113,20 +114,22 @@
{ "REQUEST_LINE",   "clf-request" },
{ "REQUEST_METHOD", "method" },
{ "SCRIPT_NAME","uri" },
-   { "SCRIPT_PROTOCOL","protocol" }
+   { "SERVER_PROTOCOL","protocol" }
 };
 static size_t nsapi_reqpb_size = sizeof(nsapi_reqpb)/sizeof(nsapi_reqpb[0]);
 
 static nsapi_equiv nsapi_vars[] = {
-   { "AUTH_TYPE",  "auth-type" },
{ "PATH_INFO",  "path-info" },
+   { "PATH_TRANSLATED","path" },
+   { "AUTH_TYPE",  "auth-type" },
+   { "CLIENT_CERT","auth-cert" },
{ "REMOTE_USER","auth-user" }
 };
 static size_t nsapi_vars_size = sizeof(nsapi_vars)/sizeof(nsapi_vars[0]);
 
 static nsapi_equiv nsapi_client[] = {
{ "HTTPS_KEYSIZE",  "keysize" },
-   { "HTTPS_SECRETSIZE",   "secret-keysize" },
+   { "HTTPS_SECRETSIZE",   "secret-keysize" },
{ "REMOTE_ADDR","ip" }
 };
 static size_t nsapi_client_size = sizeof(nsapi_client)/sizeof(nsapi_client[0]);
@@ -279,47 +282,67 @@
 {
nsapi_request_context *rc = (nsapi_request_context *)SG(server_context);
size_t i;
-   char *value = NULL;
+   char *value;
char buf[128];
 
-   *buf = 0;
for (i = 0; i  nsapi_reqpb_size; i++) {
-   if ((value = pblock_findval(nsapi_reqpb[i].nsapi_eq, rc-rq-reqpb)) 
== NULL) {
-   value = buf;
+   value = pblock_findval(nsapi_reqpb[i].nsapi_eq, rc-rq-reqpb);
+   if (value) {
+   php_register_variable( (char *)nsapi_reqpb[i].env_var, value, 
+track_vars_array ELS_CC PLS_CC );
}
-   php_register_variable( (char *)nsapi_reqpb[i].env_var, value, 
track_vars_array ELS_CC PLS_CC );
}

for (i = 0; i  nsapi_headers_size; i++) {
-   if ((value = pblock_findval(nsapi_headers[i].nsapi_eq, 
rc-rq-headers)) == NULL) {
-   value = buf;
+   value = pblock_findval(nsapi_headers[i].nsapi_eq, rc-rq-headers);
+   if (value) {
+   php_register_variable( (char *)nsapi_headers[i].env_var, 
+value, track_vars_array ELS_CC PLS_CC );
}
-   php_register_variable( (char *)nsapi_headers[i].env_var, value, 
track_vars_array ELS_CC PLS_CC );
}
 
for (i = 0; i  nsapi_vars_size; i++) {
-   if ((value = pblock_findval(nsapi_vars[i].nsapi_eq, rc-rq-vars)) == 
NULL) {
-   value = buf;
+   value = pblock_findval(nsapi_vars[i].nsapi_eq, rc-rq-vars);
+   if (value) {
+   php_register_variable( (char *)nsapi_vars[i].env_var, value, 
+track_vars_array ELS_CC PLS_CC );
}
-   php_register_variable( (char *)nsapi_vars[i].env_var, value, 
track_vars_array ELS_CC PLS_CC );
}
 
for (i = 0; i  nsapi_client_size; i++) {
-   if ((value = pblock_findval(nsapi_client[i].nsapi_eq, rc-sn-client)) 
== NULL) {
-   value = buf;
+   value = pblock_findval(nsapi_client[i].nsapi_eq, rc-sn-client);
+   if (value) {
+   php_register_variable( (char *)nsapi_client[i].env_var, value, 
+track_vars_array ELS_CC PLS_CC );
}
-   php_register_variable( (char *)nsapi_client[i].env_var, value, 

Re: [PHP-CVS] cvs: php4 /ext/exif exif.c

2001-04-03 Thread Andi Gutmans

Daniel,

Why not use virtual_filepath() always and make one case out of your code. 
It also works in non VIRTUAL_DIR mode. There shouldn't really be #ifdef's 
in the PHP code (TSRM takes care of it). If it's a specific problem we can 
think of how to fix it.

Andi

At 09:39 PM 4/3/2001 +, Daniel Beulshausen wrote:
dbeuTue Apr  3 14:39:18 2001 EDT

   Modified files:
 /php4/ext/exif  exif.c
   Log:
   resolve realpath if in v-dir mode

Index: php4/ext/exif/exif.c
diff -u php4/ext/exif/exif.c:1.12 php4/ext/exif/exif.c:1.13
--- php4/ext/exif/exif.c:1.12   Sun Feb 25 22:06:54 2001
+++ php4/ext/exif/exif.cTue Apr  3 14:39:18 2001
@@ -1060,7 +1060,7 @@
  pval **p_name;
  int ac = ZEND_NUM_ARGS(), ret;
 ImageInfoType ImageInfo;
-   char tmp[64];
+   char tmp[64], *file;

 /*ImageInfo.Thumbnail = NULL;
 ImageInfo.ThumbnailSize = 0;
@@ -1070,7 +1070,14 @@
 WRONG_PARAM_COUNT;

 convert_to_string_ex(p_name);
-   ret = php_read_jpeg_exif(ImageInfo, (*p_name)-value.str.val,1);
+
+#ifdef VIRTUAL_DIR
+   virtual_filepath(Z_STRVAL_PP(p_name), file);
+   ret = php_read_jpeg_exif(ImageInfo, file,1);
+#else
+   ret = php_read_jpeg_exif(ImageInfo, Z_STRVAL_PP(p_name),1);
+#endif
+
 if (array_init(return_value) == FAILURE) {
 RETURN_FALSE;
 }



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


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




Re: [PHP-CVS] cvs: php4 / NEWS php.ini-dist php.ini-optimized /ext/standard url_scanner.c url_scanner_ex.c url_scanner_ex.re /main main.c php_globals.h php_variables.c

2001-04-04 Thread Andi Gutmans

Can we roll an RC7 soon and get this 4.0.5 over with? :)
Maybe we should get people to test the latest CVS first to make sure your 
patch didn't break anything.
We need a working 4.0.5.

Thanks!
Andi

At 08:46 PM 4/4/2001 +, Jani Taskinen wrote:
sniper  Wed Apr  4 13:46:27 2001 EDT

   Modified files:
 /php4   php.ini-dist php.ini-optimized NEWS
 /php4/ext/standard  url_scanner.c url_scanner_ex.re url_scanner_ex.c
 /php4/main  main.c php_globals.h php_variables.c
   Log:
   Added new configuration directives:
   arg_separator.input and arg_separator.output


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


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




[PHP-CVS] cvs: php4(PHP_4_0_5) / README.BCMATH

2001-04-05 Thread Andi Gutmans

andiThu Apr  5 06:22:02 2001 EDT

  Removed files:   (Branch: PHP_4_0_5)
/php4   README.BCMATH 
  Log:
  Remove README.BCMATH
  
  



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




[PHP-CVS] cvs: php4 / README.BCMATH

2001-04-05 Thread Andi Gutmans

andiThu Apr  5 06:23:33 2001 EDT

  Removed files:   
/php4   README.BCMATH 
  Log:
  - Nuke README.BCMATH
  
  



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




[PHP] RE: [PHP-DEV] FastCGI optmized Windows build of 5.2.1RC2

2007-01-05 Thread Andi Gutmans
Edin,

Thanks for taking care of this!

Andi 

 -Original Message-
 From: Edin Kadribasic [mailto:[EMAIL PROTECTED] 
 Sent: Friday, January 05, 2007 5:28 AM
 To: PHP internals; php-general@lists.php.net
 Subject: [PHP-DEV] FastCGI optmized Windows build of 5.2.1RC2
 
 Hello,
 
 I have made a second build of 5.2.1RC2 for Windows with no 
 thread safety enabled. This will only work for non threaded 
 SAPIs such as CGI/FastCGI and CLI. The reason for this is 
 that managing per thread state takes some CPU time from the 
 main task of running PHP scripts making non thread safe PHP 
 significantly faster. My initial benchmarks show 20-30% 
 performance increase.
 
 This, together with the new fastcgi implementation for IIS 
 from Microsoft should bring PHP performance on Windows to a new level.
 
 http://downloads.php.net/edink/php-5.2.1RC2-nts-Win32.zip
 (76aa90a7fdb0bd2eb62c1172501d6c6e)
 http://downloads.php.net/edink/pecl-5.2.1RC2-nts-Win32.zip
 (a493bdf794a5d44d749f6dcd2a55f9da)
 http://downloads.php.net/edink/php-debug-pack-5.2.1RC2-nts-Win32.zip
 (cbfd474fcdb61522d4c750b5c02d3df9)
 
 Edin
 
 --
 PHP Internals - PHP Runtime Development Mailing List To 
 unsubscribe, visit: http://www.php.net/unsub.php
 

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



[PHP] RE: [PHP-DEV] Re: [PHP] PHP 5.3.0alpha2

2008-09-03 Thread Andi Gutmans
Btw, contrary to what many believe, 32bit PHP tends to perform better
than 64bit PHP.
So unless there's a really good reason why you want 64bit I wouldn't
waste too much time on that.

Andi




 -Original Message-
 From: steve [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, September 03, 2008 3:56 PM
 To: Lukas Kahwe Smith
 Cc: PHP Internals List; php-general@lists.php.net
 Subject: [PHP-DEV] Re: [PHP] PHP 5.3.0alpha2
 
 That's great! I like all the different builds. Two things that pop
 out: 1) What are some recommended non-official builds of Apache2 in
 x64? and 2) Will there be PECL builds also?
 
 On Tue, Sep 2, 2008 at 3:27 PM, Lukas Kahwe Smith [EMAIL PROTECTED]
wrote:
  Hello!
 
  Johannes has packed PHP 5.3.0alpha2 yesterday, which you can find
here:
  http://downloads.php.net/johannes/
 
  Windows binaries (optimized for various versions of Windows) are
available
  from the new website dedicated to PHP's windows binaries:
  http://windows.php.net/downloads.php
 
  Please test it carefully, and report any bugs in the bug system, but
only if
  you have a short reproducable test case.
 
  If everything goes well, we can release it somewhere at the end of
next
  week.
 
  regards,
  Lukas and Johannes
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 
 --
 PHP Internals - PHP Runtime Development Mailing List
 To unsubscribe, visit: http://www.php.net/unsub.php


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



Re: [PHP-CVS] cvs: php4 /ext/sockets sockets.c

2001-04-11 Thread Andi Gutmans

Just curious. What does their pragma do?

Andi

At 03:16 AM 4/10/2001 +, Jason Greene wrote:
jason   Mon Apr  9 20:16:06 2001 EDT

   Modified files:
 /php4/ext/sockets   sockets.c
   Log:
   Fix for PR #9729, 9664, 9656, 8667.
   All compilers on Solaris should build this extension correctly now.
   It turns out the SUN CC, by default, enables a define that enables the 
 use of
   #pragma redefine extname in sun header files. This is why cc would work,
   and gcc wouldn't.

   -Jason


Index: php4/ext/sockets/sockets.c
diff -u php4/ext/sockets/sockets.c:1.33 php4/ext/sockets/sockets.c:1.34
--- php4/ext/sockets/sockets.c:1.33 Thu Mar 22 05:16:58 2001
+++ php4/ext/sockets/sockets.c  Mon Apr  9 20:16:05 2001
@@ -17,7 +17,7 @@
 +--+
   */

-/* $Id: sockets.c,v 1.33 2001/03/22 13:16:58 sniper Exp $ */
+/* $Id: sockets.c,v 1.34 2001/04/10 03:16:05 jason Exp $ */

  #include "php.h"

@@ -34,6 +34,10 @@
  #define _XOPEN_SOURCE_EXTENDED
  #define _XPG4_2
  #define __EXTENSIONS__
+
+#ifndef __PRAGMA_REDEFINE_EXTNAME
+#define __PRAGMA_REDEFINE_EXTNAME
+#endif

  #include "ext/standard/info.h"
  #include "php_sockets.h"



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


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




Re: [PHP-CVS] cvs: pear /Science Chemistry.php /Science/Chemistry Atom.php Atom_PDB.php Coordinates.php Element.php Macromolecule.php Macromolecule_PDB.php Molecule.php Molecule_XYZ.php PDBFile.php PDBPa

2001-04-12 Thread Andi Gutmans

Oh is all of pear out of the PHP CVS now?

Andi


At 01:42 AM 4/12/2001 -0400, Stig Sther Bakken wrote:
[Andrei Zmievski [EMAIL PROTECTED]]
  On Tue, 10 Apr 2001, Derick Rethans wrote:
   hrm,
  
   is it really needed to add 3.6MB of stuff to the PHP cvs?
 
  Grr, I agree. Maybe it can wait until PEAR is out of PHP's CVS.

Hey hey, take a closer look before reacting.  This stuff _is_ out of
PHP's CVS.  "Subject: cvs: pear "

  - Stig

--
   Stig Sther Bakken [EMAIL PROTECTED]
   Fast Search  Transfer ASA, Trondheim, Norway

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


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




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

2001-04-17 Thread Andi Gutmans

This should go into 4.0.5 if it's in that branch because it's quite a bug.

Andi

At 07:03 PM 4/15/2001 +, Alexander Feldman wrote:
sasha   Sun Apr 15 12:03:13 2001 EDT

   Modified files:
 /php4/ext/standard  file.c
   Log:
   Fixed typo.


Index: php4/ext/standard/file.c
diff -u php4/ext/standard/file.c:1.151 php4/ext/standard/file.c:1.152
--- php4/ext/standard/file.c:1.151  Sun Apr 15 11:42:50 2001
+++ php4/ext/standard/file.cSun Apr 15 12:03:12 2001
@@ -20,7 +20,7 @@
 +--+
   */

-/* $Id: file.c,v 1.151 2001/04/15 18:42:50 sasha Exp $ */
+/* $Id: file.c,v 1.152 2001/04/15 19:03:12 sasha Exp $ */

  /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */

@@ -1816,7 +1816,7 @@

 if (!issock) {
  #ifdef HAVE_FLUSHIO
-   if (type == le_fopen)
+   if (type == le_fopen) {
 fseek((FILE*)what, 0, SEEK_CUR);
 }
  #endif



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


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




[PHP-CVS] cvs: php4 /ext/iconv iconv.c

2001-04-18 Thread Andi Gutmans

andiWed Apr 18 21:02:03 2001 EDT

  Modified files:  
/php4/ext/iconv iconv.c 
  Log:
  - WS
  
  
Index: php4/ext/iconv/iconv.c
diff -u php4/ext/iconv/iconv.c:1.10 php4/ext/iconv/iconv.c:1.11
--- php4/ext/iconv/iconv.c:1.10 Thu Mar 29 01:37:09 2001
+++ php4/ext/iconv/iconv.c  Wed Apr 18 21:02:03 2001
@@ -106,7 +106,8 @@
DISPLAY_INI_ENTRIES();
 }
 
-int php_iconv_string(char *in_p, char **out, char *in_charset, char *out_charset) {
+int php_iconv_string(char *in_p, char **out, char *in_charset, char *out_charset)
+{
 unsigned int in_size, out_size;
 char *out_buffer, *out_p;
 iconv_t cd;



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




Re: [PHP-CVS] cvs: php4 /ext/odbc php_odbc.c

2001-04-18 Thread Andi Gutmans

Why do you need that SEPARATE_ZVAL()? You seem to be using pv_row as read-only.
Also can you please try not to commit \r\n but only \n?

Thanks,

Andi

At 02:31 AM 4/19/2001 +, Dan Kalowsky wrote:
kalowskyWed Apr 18 19:31:23 2001 EDT

   Modified files:
 /php4/ext/odbc  php_odbc.c
   Log:
   corrects bug #7488, patch supplied by submitter ([EMAIL PROTECTED]).
   quick local tests show it to work.


Index: php4/ext/odbc/php_odbc.c
diff -u php4/ext/odbc/php_odbc.c:1.78 php4/ext/odbc/php_odbc.c:1.79
--- php4/ext/odbc/php_odbc.c:1.78   Mon Apr 16 19:02:36 2001
+++ php4/ext/odbc/php_odbc.cWed Apr 18 19:31:23 2001
@@ -15,11 +15,12 @@
 | Authors: Stig Sther Bakken [EMAIL PROTECTED]|
 |  Andreas Karajannis [EMAIL PROTECTED]  |
 |  Frank M. Kromann [EMAIL PROTECTED] Support for DB/2 CLI |
-   | Kevin N. Shallow [EMAIL PROTECTED] Velocis Support |
+   | Kevin N. Shallow [EMAIL PROTECTED] Velocis Support |
+   | Daniel R. Kalowsky 
[EMAIL PROTECTED]   |
 +--+
   */

-/* $Id: php_odbc.c,v 1.78 2001/04/17 02:02:36 kalowsky Exp $ */
+/* $Id: php_odbc.c,v 1.79 2001/04/19 02:31:23 kalowsky Exp $ */

  #include "php.h"
  #include "php_globals.h"
@@ -64,7 +65,7 @@

  #define SAFE_SQL_NTS(n) ((SWORD) ((n)?(SQL_NTS):0))

-static unsigned char a3_arg3_force_ref[] = { 3, BYREF_NONE, BYREF_ALLOW, 
BYREF_FORCE };
+static unsigned char a3_arg3_and_3_force_ref[] = { 3, BYREF_NONE, 
BYREF_FORCE, BYREF_FORCE };

  function_entry odbc_functions[] = {
  PHP_FE(odbc_error, NULL)
@@ -85,7 +86,7 @@
 PHP_FE(odbc_prepare, NULL)
 PHP_FE(odbc_execute, NULL)
 PHP_FE(odbc_fetch_row, NULL)
-   PHP_FE(odbc_fetch_into, a3_arg3_force_ref)
+   PHP_FE(odbc_fetch_into, a3_arg3_and_3_force_ref)
 PHP_FE(odbc_field_len, NULL)
 PHP_FE(odbc_field_scale, NULL)
 PHP_FE(odbc_field_name, NULL)
@@ -1363,7 +1364,8 @@
 break;
 case 3:
 if (zend_get_parameters_ex(3, pv_res, pv_row, 
 pv_res_arr) == FAILURE)
-   WRONG_PARAM_COUNT;
+   WRONG_PARAM_COUNT;
+   SEPARATE_ZVAL(pv_row);
 convert_to_long_ex(pv_row);
 rownum = (*pv_row)-value.lval;
 break;
@@ -1380,11 +1382,6 @@
 WRONG_PARAM_COUNT;
 }
  #endif
-
-   if (!ParameterPassedByReference(ht, numArgs)) {
-   php_error(E_WARNING, "Array not passed by reference in 
call to odbc_fetch_into()");
-   RETURN_FALSE;
-   }

 ZEND_FETCH_RESOURCE(result, odbc_result *, pv_res, -1, "ODBC 
 result", le_result);

@@ -1922,7 +1919,11 @@
 return FALSE;
 }
 }
-#ifdef HAVE_EMPRESS
+/*  Possible fix for bug #
+ *  Needs testing on UnixODBC  2.0.5 though.
+ * #if defined(HAVE_EMPRESS) || defined(HAVE_UNIXODBC)
+ *  Uncomment the line above, and comment line below to fully test */
+#ifdef HAVE_EMPRESS
 {
 int direct = 0;
 chardsnbuf[300];



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


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




[PHP-CVS] cvs: php4 /ext/odbc php_odbc.c

2001-04-18 Thread Andi Gutmans

andiWed Apr 18 21:16:28 2001 EDT

  Modified files:  
/php4/ext/odbc  php_odbc.c 
  Log:
  - \r\n - \n
  
  
Index: php4/ext/odbc/php_odbc.c
diff -u php4/ext/odbc/php_odbc.c:1.79 php4/ext/odbc/php_odbc.c:1.80
--- php4/ext/odbc/php_odbc.c:1.79   Wed Apr 18 19:31:23 2001
+++ php4/ext/odbc/php_odbc.cWed Apr 18 21:16:27 2001
@@ -15,12 +15,12 @@
| Authors: Stig Sæther Bakken [EMAIL PROTECTED]|
|  Andreas Karajannis [EMAIL PROTECTED]  |
|  Frank M. Kromann [EMAIL PROTECTED] Support for DB/2 CLI |
-   | Kevin N. Shallow [EMAIL PROTECTED] Velocis Support |
+   | Kevin N. Shallow [EMAIL PROTECTED] Velocis Support |
| Daniel R. Kalowsky [EMAIL PROTECTED]
   |
+--+
  */
 
-/* $Id: php_odbc.c,v 1.79 2001/04/19 02:31:23 kalowsky Exp $ */
+/* $Id: php_odbc.c,v 1.80 2001/04/19 04:16:27 andi Exp $ */
 
 #include "php.h"
 #include "php_globals.h"
@@ -65,7 +65,7 @@
 
 #define SAFE_SQL_NTS(n) ((SWORD) ((n)?(SQL_NTS):0))
 
-static unsigned char a3_arg3_and_3_force_ref[] = { 3, BYREF_NONE, BYREF_FORCE, 
BYREF_FORCE };
+static unsigned char a3_arg3_and_3_force_ref[] = { 3, BYREF_NONE, BYREF_FORCE, 
+BYREF_FORCE };
 
 function_entry odbc_functions[] = {
 PHP_FE(odbc_error, NULL)
@@ -1364,7 +1364,7 @@
break;
case 3:
if (zend_get_parameters_ex(3, pv_res, pv_row, pv_res_arr) 
== FAILURE)
-   WRONG_PARAM_COUNT;
+   WRONG_PARAM_COUNT;
SEPARATE_ZVAL(pv_row);
convert_to_long_ex(pv_row);
rownum = (*pv_row)-value.lval;
@@ -1919,11 +1919,11 @@
return FALSE;
}
}
-/*  Possible fix for bug #
- *  Needs testing on UnixODBC  2.0.5 though.
- *  #if defined(HAVE_EMPRESS) || defined(HAVE_UNIXODBC)
- *  Uncomment the line above, and comment line below to fully test */
-#ifdef HAVE_EMPRESS
+/*  Possible fix for bug #
+ *  Needs testing on UnixODBC  2.0.5 though.
+ *  #if defined(HAVE_EMPRESS) || defined(HAVE_UNIXODBC)
+ *  Uncomment the line above, and comment line below to fully test */
+#ifdef HAVE_EMPRESS
{
int direct = 0;
chardsnbuf[300];



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




[PHP-CVS] cvs: php4 /ext/odbc php_odbc.c

2001-04-19 Thread Andi Gutmans

andiThu Apr 19 14:42:45 2001 EDT

  Modified files:  
/php4/ext/odbc  php_odbc.c 
  Log:
  - Use memcpy() instead of strlcpy() which is faster.
  
  
Index: php4/ext/odbc/php_odbc.c
diff -u php4/ext/odbc/php_odbc.c:1.81 php4/ext/odbc/php_odbc.c:1.82
--- php4/ext/odbc/php_odbc.c:1.81   Thu Apr 19 12:55:05 2001
+++ php4/ext/odbc/php_odbc.cThu Apr 19 14:42:45 2001
@@ -20,7 +20,7 @@
+--+
  */
 
-/* $Id: php_odbc.c,v 1.81 2001/04/19 19:55:05 kalowsky Exp $ */
+/* $Id: php_odbc.c,v 1.82 2001/04/19 21:42:45 andi Exp $ */
 
 #include "php.h"
 #include "php_globals.h"
@@ -1933,14 +1933,13 @@
 
if (strstr((char*)db, ";")) {
direct = 1;
-   if (uid  !strstr ((char*)db, "uid") 
-   !strstr((char*)db, "UID")) {
-   ldb = (char*)emalloc(strlen(db) + strlen(uid) + 
strlen(pwd) + 12);
+   if (uid  !strstr ((char*)db, "uid")  !strstr((char*)db, 
+"UID")) {
+   ldb = (char*) emalloc(strlen(db) + strlen(uid) + 
+strlen(pwd) + 12);
sprintf(ldb, "%s;UID=%s;PWD=%s", db, uid, pwd);
} else {
-   ldb_len = (strlen(db)+1);
-   ldb = (char*)emalloc(ldb_len);
-   strlcpy(ldb, db, ldb_len);
+   ldb_len = strlen(db)+1;
+   ldb = (char*) emalloc(ldb_len);
+   memcpy(ldb, db, ldb_len);
}
}
 



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




[PHP-CVS] cvs: php4 /main php_ini.c

2001-04-21 Thread Andi Gutmans

andiSat Apr 21 04:40:05 2001 EDT

  Modified files:  
/php4/main  php_ini.c 
  Log:
  - Get rid of warning.
  
  
Index: php4/main/php_ini.c
diff -u php4/main/php_ini.c:1.55 php4/main/php_ini.c:1.56
--- php4/main/php_ini.c:1.55Sat Mar 17 15:35:32 2001
+++ php4/main/php_ini.c Sat Apr 21 04:40:04 2001
@@ -185,8 +185,8 @@
return FAILURE;
}
 
-   zend_llist_init(extension_lists.engine, sizeof(zval), free_estring, 1);
-   zend_llist_init(extension_lists.functions, sizeof(zval), ZVAL_DESTRUCTOR, 1);
+   zend_llist_init(extension_lists.engine, sizeof(zval), (llist_dtor_func_t) 
+free_estring, 1);
+   zend_llist_init(extension_lists.functions, sizeof(zval), (llist_dtor_func_t)  
+ZVAL_DESTRUCTOR, 1);

safe_mode_state = PG(safe_mode);
open_basedir = PG(open_basedir);



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




RE: [PHP-CVS] cvs: php4(PHP_4_0_5) /ext/ircg config.m4 ircg.c php_ircg.h

2001-04-22 Thread Andi Gutmans

I don't want to get into it but you had a big problem with config.m4 
changes during RC's when I added the fastcgi support.
Anyway no need to make a big deal about it but you almost killed me back 
then as config.m4 could potentially create problems for the whole release.

Andi

At 09:47 PM 4/22/2001 +0200, Sascha Schumann wrote:
On Sun, 22 Apr 2001, Zeev Suraski wrote:

  I'm going to base 4.0.5 on the RC7 tag, so this won't make it in anyway.

 It would be really inconvenient for users of PHP, if PHP
 4.0.5 would not be compatible with existing web-servers.
 Would you mind explaining how you came to the conclusion that
 PHP 4.0.5 needs to be based on the RC7 tag?

 - Sascha Experience IRCG
   http://schumann.cx/http://schumann.cx/ircg


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


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




Re: [PHP-CVS] cvs: php4 /ext/ccvs ccvs.c

2001-04-23 Thread Andi Gutmans

Are you sure this patch is right? It seems a bit odd. You shouldn't really 
have NULL pointers in strings which are passed to convert_to_string_ex().

Andi

At 11:40 PM 4/22/2001 +, Sterling Hughes wrote:
sterlingSun Apr 22 16:40:34 2001 EDT

   Modified files:
 /php4/ext/ccvs  ccvs.c
   Log:
   Fix bug #10447.




Index: php4/ext/ccvs/ccvs.c
diff -u php4/ext/ccvs/ccvs.c:1.13 php4/ext/ccvs/ccvs.c:1.14
--- php4/ext/ccvs/ccvs.c:1.13   Sun Feb 25 22:06:48 2001
+++ php4/ext/ccvs/ccvs.cSun Apr 22 16:40:34 2001
@@ -17,7 +17,7 @@
 +--+
   */
  /*
-*  cvvs.c $Revision: 1.13 $ - PHP4 Interface to the RedHat CCVS API
+*  cvvs.c $Revision: 1.14 $ - PHP4 Interface to the RedHat CCVS API
  *  ---
  *  Interfaces RedHat's CCVS [Credit Card Verification System] 
 http://www.redhat.com/products/ccvs/
  *  This code is ported from an original php3 interface written by 
 RedHat's Doug DeJulio [EMAIL PROTECTED]
@@ -27,10 +27,10 @@

  /*
  *  Code started on [EMAIL PROTECTED] by Brendan W. McAdams 
 [EMAIL PROTECTED]
-*  $Revision: 1.13 $
+*  $Revision: 1.14 $
  */

-static char const cvsid[] = $Id: ccvs.c,v 1.13 2001/02/26 06:06:48 andi 
Exp $;
+static char const cvsid[] = $Id: ccvs.c,v 1.14 2001/04/22 23:40:34 
sterling Exp $;

  #include php.h
  #include stdlib.h
@@ -193,6 +193,11 @@
}

convert_to_string_ex(psess);
+  if (!Z_STRVAL_PP(psess)) {
+php_error(E_WARNING, Invalid session to ccvs_new());
+RETURN_FALSE;
+  }
+
sess = hks_ptr_stringtoptr((*psess)-value.str.val);

convert_to_string_ex(pinvoice);



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


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




Re: Re[3]: [PHP-CVS] cvs: php4 /main config.w32.h php_ini.c

2001-04-24 Thread Andi Gutmans

I don't think there are any problems with the space in the path name.
If there are we are better off finding them and fixing them instead of 
defaulting to c:\php4. I think we should follow the Windows standard on 
Windows. I know that I hate when programs want to install themselves in c:\ 
on Windows.

Andi

At 09:29 AM 4/24/2001 +0100, Phil Driscoll wrote:
When I did the windows installer there was some talk of defaulting to
install in 'Program files' (I think Zeev suggested it), but there was a
significant body of opinion which thought that there would be problems at
least with parts of php with respect to the space in the filename. I just
listened to the opinion and chickened out defaulting the installation to
C:\php (easily overridden by the user). I never did any tests on the space
issue, but it may be worth considering here before coming to a conclusion.

Cheers
--
Phil Driscoll
Dial Solutions
+44 (0)113 294 5112
http://www.dialsolutions.com
http://www.dtonline.org



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


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




[PHP-CVS] cvs: php4 /ext/standard filestat.c

2001-04-24 Thread Andi Gutmans

andiTue Apr 24 21:22:30 2001 EDT

  Modified files:  
/php4/ext/standard  filestat.c 
  Log:
  - Fix problem with is_link(), there seem to be at least another couple of
  - bugs lurking around though.
  - Cleaned up code a bit and optimized it a bit too.
  
  
Index: php4/ext/standard/filestat.c
diff -u php4/ext/standard/filestat.c:1.57 php4/ext/standard/filestat.c:1.58
--- php4/ext/standard/filestat.c:1.57   Tue Apr  3 03:51:16 2001
+++ php4/ext/standard/filestat.cTue Apr 24 21:22:29 2001
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: filestat.c,v 1.57 2001/04/03 10:51:16 sniper Exp $ */
+/* $Id: filestat.c,v 1.58 2001/04/25 04:22:29 andi Exp $ */
 
 #include php.h
 #include safe_mode.h
@@ -447,7 +447,7 @@
 /* }}} */
 
 
-static void php_stat(const char *filename, int type, pval *return_value)
+static void php_stat(const char *filename, int filename_length, int type, pval 
+*return_value)
 {
struct stat *stat_sb;
int rmask=S_IROTH,wmask=S_IWOTH,xmask=S_IXOTH; /* access rights defaults to 
other */
@@ -455,25 +455,28 @@
 
stat_sb = BG(sb);
 
-   if (!BG(CurrentStatFile) || strcmp(filename,BG(CurrentStatFile))) {
-   if (!BG(CurrentStatFile)
-   || strlen(filename)  BG(CurrentStatLength)) {
-   if (BG(CurrentStatFile)) efree(BG(CurrentStatFile));
-   BG(CurrentStatLength) = strlen(filename);
-   BG(CurrentStatFile) = estrndup(filename,BG(CurrentStatLength));
+   if (!BG(CurrentStatFile) || strcmp(filename, BG(CurrentStatFile))) {
+   if (!BG(CurrentStatFile) || filename_length  BG(CurrentStatLength)) {
+   if (BG(CurrentStatFile)) {
+   efree(BG(CurrentStatFile));
+   }
+   BG(CurrentStatLength) = filename_length;
+   BG(CurrentStatFile) = estrndup(filename, filename_length);
} else {
-   strcpy(BG(CurrentStatFile),filename);
+   memcpy(BG(CurrentStatFile), filename, filename_length+1);
}
 #if HAVE_SYMLINK
BG(lsb).st_mode = 0; /* mark lstat buf invalid */
 #endif
-   if (V_STAT(BG(CurrentStatFile),BG(sb))==-1) {
-   if (type != 15 || errno != ENOENT) { /* fileexists() test must 
print no error */
-   php_error(E_NOTICE,stat failed for %s (errno=%d - 
%s),BG(CurrentStatFile),errno,strerror(errno));
+   if (V_STAT(BG(CurrentStatFile), BG(sb)) == -1) {
+   if ((type != 14)  (type != 15 || errno != ENOENT)) { /* 
+fileexists() test must print no error */
+   php_error(E_NOTICE,stat failed for %s (errno=%d - 
+%s), BG(CurrentStatFile), errno, strerror(errno));
}
efree(BG(CurrentStatFile));
-   BG(CurrentStatFile)=NULL;
-   RETURN_FALSE;
+   BG(CurrentStatFile) = NULL;
+   if (type != 14) { /* Don't require success for is link */
+   RETURN_FALSE;
+   }
}
}
 
@@ -485,8 +488,8 @@
/* do lstat if the buffer is empty */
 
if (!BG(lsb).st_mode) {
-   if (V_LSTAT(BG(CurrentStatFile),BG(lsb)) == -1) {
-   php_error(E_NOTICE,lstat failed for %s (errno=%d - 
%s),BG(CurrentStatFile),errno,strerror(errno));
+   if (V_LSTAT(BG(CurrentStatFile), BG(lsb)) == -1) {
+   php_error(E_NOTICE, lstat failed for %s (errno=%d - 
+%s), BG(CurrentStatFile), errno, strerror(errno));
RETURN_FALSE;
}
}
@@ -494,35 +497,37 @@
 #endif
 
 
-   if(BG(sb).st_uid==getuid()) {
-   rmask=S_IRUSR;
-   wmask=S_IWUSR;
-   xmask=S_IXUSR;
-   } else if(BG(sb).st_gid==getgid()) {
-   rmask=S_IRGRP;
-   wmask=S_IWGRP;
-   xmask=S_IXGRP;
-   } else {
-   int   groups,n,i;
-   gid_t *gids;
+   if (type = 9  type = 11) {
+   if(BG(sb).st_uid==getuid()) {
+   rmask=S_IRUSR;
+   wmask=S_IWUSR;
+   xmask=S_IXUSR;
+   } else if(BG(sb).st_gid==getgid()) {
+   rmask=S_IRGRP;
+   wmask=S_IWGRP;
+   xmask=S_IXGRP;
+   } else {
+   int   groups,n,i;
+   gid_t *gids;
 
-   groups = getgroups(0,NULL);
-   if(groups) {
-   gids=(gid_t *)emalloc(groups*sizeof(gid_t));
-   

[PHP-CVS] cvs: php4 /ext/standard filestat.c

2001-04-24 Thread Andi Gutmans

andiTue Apr 24 22:43:31 2001 EDT

  Modified files:  
/php4/ext/standard  filestat.c 
  Log:
  - Nuke warning. This signed/unsigned stuff gets really annoying sometimes.
  
  
Index: php4/ext/standard/filestat.c
diff -u php4/ext/standard/filestat.c:1.58 php4/ext/standard/filestat.c:1.59
--- php4/ext/standard/filestat.c:1.58   Tue Apr 24 21:22:29 2001
+++ php4/ext/standard/filestat.cTue Apr 24 22:43:30 2001
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: filestat.c,v 1.58 2001/04/25 04:22:29 andi Exp $ */
+/* $Id: filestat.c,v 1.59 2001/04/25 05:43:30 andi Exp $ */
 
 #include php.h
 #include safe_mode.h
@@ -447,7 +447,7 @@
 /* }}} */
 
 
-static void php_stat(const char *filename, int filename_length, int type, pval 
*return_value)
+static void php_stat(const char *filename, php_stat_len filename_length, int type, 
+pval *return_value)
 {
struct stat *stat_sb;
int rmask=S_IROTH,wmask=S_IWOTH,xmask=S_IXOTH; /* access rights defaults to 
other */
@@ -637,7 +637,7 @@
WRONG_PARAM_COUNT; \
} \
convert_to_string_ex(filename); \
-   php_stat(Z_STRVAL_PP(filename), Z_STRLEN_PP(filename), funcnum, return_value); 
\
+   php_stat(Z_STRVAL_PP(filename), (php_stat_len) Z_STRLEN_PP(filename), funcnum, 
+return_value); \
 }
 
 /* {{{ proto int fileperms(string filename)



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




[PHP-CVS] cvs: php4 /ext/standard filestat.c

2001-04-24 Thread Andi Gutmans

andiTue Apr 24 22:53:45 2001 EDT

  Modified files:  
/php4/ext/standard  filestat.c 
  Log:
  - Another fix
  
  
Index: php4/ext/standard/filestat.c
diff -u php4/ext/standard/filestat.c:1.59 php4/ext/standard/filestat.c:1.60
--- php4/ext/standard/filestat.c:1.59   Tue Apr 24 22:43:30 2001
+++ php4/ext/standard/filestat.cTue Apr 24 22:53:45 2001
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: filestat.c,v 1.59 2001/04/25 05:43:30 andi Exp $ */
+/* $Id: filestat.c,v 1.60 2001/04/25 05:53:45 andi Exp $ */
 
 #include php.h
 #include safe_mode.h
@@ -488,8 +488,8 @@
/* do lstat if the buffer is empty */
 
if (!BG(lsb).st_mode) {
-   if (V_LSTAT(BG(CurrentStatFile), BG(lsb)) == -1) {
-   php_error(E_NOTICE, lstat failed for %s (errno=%d - 
%s), BG(CurrentStatFile), errno, strerror(errno));
+   if (V_LSTAT(filename, BG(lsb)) == -1) {
+   php_error(E_NOTICE, lstat failed for %s (errno=%d - 
+%s), filename, errno, strerror(errno));
RETURN_FALSE;
}
}



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




[PHP-CVS] cvs: php4 /ext/standard filestat.c

2001-04-25 Thread Andi Gutmans

andiTue Apr 24 23:30:24 2001 EDT

  Modified files:  
/php4/ext/standard  filestat.c 
  Log:
  - Fix filetype() and lstat() too.
  
  
Index: php4/ext/standard/filestat.c
diff -u php4/ext/standard/filestat.c:1.60 php4/ext/standard/filestat.c:1.61
--- php4/ext/standard/filestat.c:1.60   Tue Apr 24 22:53:45 2001
+++ php4/ext/standard/filestat.cTue Apr 24 23:30:24 2001
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: filestat.c,v 1.60 2001/04/25 05:53:45 andi Exp $ */
+/* $Id: filestat.c,v 1.61 2001/04/25 06:30:24 andi Exp $ */
 
 #include php.h
 #include safe_mode.h
@@ -446,6 +446,7 @@
 }
 /* }}} */
 
+#define IS_LINK_OPERATION() (type == 8 /* filetype */ || type == 14 /* is_link */ || 
+type == 16 /* lstat */)
 
 static void php_stat(const char *filename, php_stat_len filename_length, int type, 
pval *return_value)
 {
@@ -469,29 +470,23 @@
BG(lsb).st_mode = 0; /* mark lstat buf invalid */
 #endif
if (V_STAT(BG(CurrentStatFile), BG(sb)) == -1) {
-   if ((type != 14)  (type != 15 || errno != ENOENT)) { /* 
fileexists() test must print no error */
+   if (!IS_LINK_OPERATION()  (type != 15 || errno != ENOENT)) { 
+/* fileexists() test must print no error */
php_error(E_NOTICE,stat failed for %s (errno=%d - 
%s), BG(CurrentStatFile), errno, strerror(errno));
}
efree(BG(CurrentStatFile));
BG(CurrentStatFile) = NULL;
-   if (type != 14) { /* Don't require success for is link */
+   if (!IS_LINK_OPERATION()) { /* Don't require success for link 
+operation */
RETURN_FALSE;
}
}
}
 
 #if HAVE_SYMLINK
-   if (8 == type /* filetype */
-   || 14 == type /* is link */
-   || 16 == type) { /* lstat */
-
+   if (IS_LINK_OPERATION()  !BG(lsb).st_mode) {
/* do lstat if the buffer is empty */
-
-   if (!BG(lsb).st_mode) {
-   if (V_LSTAT(filename, BG(lsb)) == -1) {
-   php_error(E_NOTICE, lstat failed for %s (errno=%d - 
%s), filename, errno, strerror(errno));
-   RETURN_FALSE;
-   }
+   if (V_LSTAT(filename, BG(lsb)) == -1) {
+   php_error(E_NOTICE, lstat failed for %s (errno=%d - %s), 
+filename, errno, strerror(errno));
+   RETURN_FALSE;
}
}
 #endif



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




Re: [PHP-CVS] cvs: php4 /ext/fbsql php_fbsql.c

2001-04-25 Thread Andi Gutmans

Frank,

Don't forget not to use C++ comments.
Thanks,

Andi

At 06:01 PM 4/25/2001 +, Frank M. Kromann wrote:
fmk Wed Apr 25 11:01:23 2001 EDT

   Modified files:
 /php4/ext/fbsql php_fbsql.c
   Log:
   make fbsql_field_flags return a value

Index: php4/ext/fbsql/php_fbsql.c
diff -u php4/ext/fbsql/php_fbsql.c:1.12 php4/ext/fbsql/php_fbsql.c:1.13
--- php4/ext/fbsql/php_fbsql.c:1.12 Tue Apr 17 10:39:43 2001
+++ php4/ext/fbsql/php_fbsql.c  Wed Apr 25 11:01:22 2001
@@ -16,7 +16,7 @@
 +--+
   */

-/* $Id: php_fbsql.c,v 1.12 2001/04/17 17:39:43 fmk Exp $ */
+/* $Id: php_fbsql.c,v 1.13 2001/04/25 18:01:22 fmk Exp $ */

  /* TODO:
   *
@@ -525,7 +525,7 @@
 {
 php_error(E_WARNING,Cannot connect to host 
 '%s',hostName);
 php_error(E_WARNING,fbcehClassErrorMessage());
-   return NULL;
+// return NULL;
 }
 result = malloc(sizeof(PHPFBLink));
 result-retainCount = 1;
@@ -2780,17 +2780,16 @@
 add_property_string(return_value, 
 name, 
 (char*)fbccmdLabelName(fbcmdColumnMetaDataAtIndex(result-metaData, 
 column)),1);
 add_property_string(return_value, 
 table, 
 (char*)fbccmdTableName(fbcmdColumnMetaDataAtIndex(result-metaData,column)),1);
 add_property_long(return_value,   max_length, 
 fbcdmdLength(fbccmdDatatype(fbcmdColumnMetaDataAtIndex(result-metaData,column;
-   add_property_string(return_value, 
type,   (char*)fbcdmdDatatypeString 
(fbcmdDatatypeMetaDataAtIndex(result-metaData, column)),1);
+   add_property_string(return_value, 
type, 
(char*)fbcdmdDatatypeString(fbcmdDatatypeMetaDataAtIndex(result-metaData, 
column)),1);
+   add_property_long(return_value,   not_null, 
!fbccmdIsNullable(fbcmdColumnMetaDataAtIndex(result-metaData, column)));
  /* Remember to add the rest */
-/* add_property_long(return_value, 
not_null,IS_NOT_NULL(mysql_field-flags)?1:0); */
-/* add_property_long(return_value, 
primary_key,IS_PRI_KEY(mysql_field-flags)?1:0); */
-/* add_property_long(return_value, 
multiple_key,(mysql_field-flagsMULTIPLE_KEY_FLAG?1:0)); */
-/* add_property_long(return_value, 
unique_key,(mysql_field-flagsUNIQUE_KEY_FLAG?1:0)); */
-/* add_property_long(return_value, 
numeric,IS_NUM(mysql_field-type)?1:0); */
-/* add_property_long(return_value, 
blob,IS_BLOB(mysql_field-flags)?1:0); */
-/* add_property_string(return_value, 
type,php_mysql_get_field_name(mysql_field-type), 1); */
-/* add_property_long(return_value, 
unsigned,(mysql_field-flagsUNSIGNED_FLAG?1:0)); */
-/* add_property_long(return_value, 
zerofill,(mysql_field-flagsZEROFILL_FLAG?1:0)); */
+/* add_property_long(return_value, 
primary_key,IS_PRI_KEY(fbsql_field-flags)?1:0); */
+/* add_property_long(return_value, 
multiple_key,(fbsql_field-flagsMULTIPLE_KEY_FLAG?1:0)); */
+/* add_property_long(return_value, 
unique_key,(fbsql_field-flagsUNIQUE_KEY_FLAG?1:0)); */
+/* add_property_long(return_value, 
numeric,IS_NUM(fbsql_field-type)?1:0); */
+/* add_property_long(return_value, 
blob,IS_BLOB(fbsql_field-flags)?1:0); */
+/* add_property_long(return_value, 
unsigned,(fbsql_field-flagsUNSIGNED_FLAG?1:0)); */
+/* add_property_long(return_value, 
zerofill,(fbsql_field-flagsZEROFILL_FLAG?1:0)); */
  }
  /* }}} */

@@ -2843,7 +2842,7 @@
  /* }}} */


-/* {{{ proto string mysql_field_name(int result, int field_index)
+/* {{{ proto string fbsql_field_name(int result, int field_index)
 */
  PHP_FUNCTION(fbsql_field_name)
  {
@@ -3069,7 +3068,7 @@
  /* }}} */


-/* {{{ proto string fbsql_field_flags(int result, int field_index)
+/* {{{ proto string string fbsql_field_flags(int result[, int field_index])
 */
  PHP_FUNCTION(fbsql_field_flags)
  {
@@ -3078,6 +3077,8 @@
 int resultIndex;
 PHPFBResult* result;
 int column;
+   char buf[512];
+   int  len;
 FBSQLLS_FETCH();

 resultIndex = FB_SQL_G(resultIndex);
@@ -3109,12 +3110,51 @@
 RETURN_FALSE;
 }
 }
-   if (array_init(return_value)==FAILURE)
-   {
-   RETURN_FALSE;
+   strcpy(buf, );
+   if (!fbccmdIsNullable(fbcmdColumnMetaDataAtIndex(result-metaData, 
column))) {
+   strcat(buf, not_null );
 }
-   /* We should create the result -- currently empty */
-
+#if 0
+   if (IS_PRI_KEY(fbsql_field-flags)) {
+   strcat(buf, primary_key );
+   }
+   if (fbsql_field-flagsUNIQUE_KEY_FLAG) {
+   strcat(buf, unique_key );
+   }
+   if (fbsql_field-flagsMULTIPLE_KEY_FLAG) {
+   strcat(buf, multiple_key );
+   }
+   if (IS_BLOB(fbsql_field-flags)) {
+   strcat(buf, blob );
+   }
+   if 

Re: [PHP] how to include() a string

2001-04-29 Thread Andi Gutmans

Do you mean eval()? It evaluates code which is a string, for example:
eval ('print(2);');

If you can develop your application without using eval() you're better off 
as it is very slow.

Andi

At 11:29 AM 4/29/2001 +, ~~~i LeoNid ~~ wrote:
require(?)

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


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




Re: [PHP] how to include() a string

2001-04-29 Thread Andi Gutmans

At 04:57 PM 4/29/2001 +0200, Luca wrote:
Andi Gutmans [EMAIL PROTECTED] wrote:

  Do you mean eval()? It evaluates code which is a string, for example:
  eval ('print(2);');
 
  If you can develop your application without using eval() you're better off
  as it is very slow.

Unfortunately eval() is not what I need. I want the string to be
parsed *in HTML mode* [1], just like include() and require() do. The
problem is they work with files, while what I have is a variable.
I could write the string to a temp file, and then use include(), but
that would be kind of slow. It would be done in every page, so it
needs to be reasonably fast (my application is already slowed down
by the use of XSLT).

[1] see http://www.php.net/manual/en/function.include.php,
 3rd paragraph

Why not just stick a ? in the beginning of your string?

Andi


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




Re: [PHP] how to include() a string

2001-04-29 Thread Andi Gutmans

At 05:13 PM 4/29/2001 +0200, Luca wrote:
Luca [EMAIL PROTECTED] wrote:

  Unfortunately eval() is not what I need.

I was wrong. From a user contributed note in the online manual:

To include HTML in the string passed to eval, precede it with a PHP
closing tag. Once you have finished your HTML block, insert a PHP
opening tag. [the following note suggests that the trailing opening
tag is not needed]

I guess it answered my question. But...

  If you can develop your application without using eval() you're
  better off as it is very slow.

So, can think of faster solutions?

Sometimes eval() is the right solution.
I can't think of a solution if I don't know *exactly* what you are trying 
to do and why you need eval().

Andi


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




Re: [PHP] how to include() a string

2001-04-29 Thread Andi Gutmans

At 06:42 PM 4/29/2001 +0200, Luca wrote:
Andi Gutmans [EMAIL PROTECTED] wrote:

  Sometimes eval() is the right solution.
  I can't think of a solution if I don't know *exactly* what you are
  trying to do and why you need eval().

Yes, I'm sorry, I should have explained myself better. I'm just a
beginner, it's very likely that I'm doing things the complicated
way. Here's what I'm trying to do: all requests on my site (just
a personal site for testing, it's not even online) are 'redirected'
by mod_rewrite to a single script, which builds the pages by putting
together a header file, a navbar file, a footer file, and a specific
content file. The actual processing is a bit more complex, but this
should give an idea. The content is in XML: it contains the HTML
code (XHTML 1.0 compliant), along with the information needed to
build the head/head section of the page (title, description,
keywords, etc.). I retrieve the HTML as a string by using
xslt_process() and an appropriate XSL stylesheet. Then I need to
include it in the page, but I cannot just print() it as it may
have PHP tags in it: that's why I need to use eval().

I hope my explanation makes sense, though I'm afraid it's not
that clear...

If it may have PHP code in it then you are indeed best off using eval().

Andi


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




Re: [PHP] lex error in make of PHP_4.0.2/Zend

2001-04-30 Thread Andi Gutmans

You are best off using flex instead of your system lex. You can download it 
from ftp.gnu.org

Andi

At 07:59 AM 4/30/2001 -0700, Surinder Singh wrote:
Hi,

I got problem while building PHP on Solaris8/SPARC.

I tried buildconf, then configure and then make. I got stuch at make. But 
giving here the output of buildconf and configure also as it may help you 
to help me.

moon:/workspace/trial/installserver/php_4.0.2/Zend 134 % \rm aclocal.m4 
configure
moon:/workspace/trial/installserver/php_4.0.2/Zend 135 % buildconf
buildconf: created or modified aclocal.m4
buildconf: created or modified configure
moon:/workspace/trial/installserver/php_4.0.2/Zend 136 %
moon:/workspace/trial/installserver/php_4.0.2/Zend 136 % configure
loading cache ./config.cache
checking for a BSD compatible install... ./../install-sh -c
checking whether build environment is sane... yes
checking whether make sets ${MAKE}... (cached) yes
checking for working aclocal... found
checking for working autoconf... found
checking for working automake... found
checking for working autoheader... found
checking for working makeinfo... missing
checking whether build environment is sane... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for gcc... (cached) /usr/dist/share/devpro,v4.0/5.x/SC4.0/bin/cc
checking whether the C compiler 
(/usr/dist/share/devpro,v4.0/5.x/SC4.0/bin/cc  ) works... yes
checking whether the C compiler 
(/usr/dist/share/devpro,v4.0/5.x/SC4.0/bin/cc  ) is a cross-compiler... no
checking whether we are using GNU C... (cached) no
checking whether /usr/dist/share/devpro,v4.0/5.x/SC4.0/bin/cc accepts 
-g... (cached) yes
checking how to run the C preprocessor... (cached) 
/usr/dist/share/devpro,v4.0/5.x/SC4.0/bin/cc -E
checking for flex... (cached) lex
checking for flex... (cached) lex
checking for yywrap in -ll... (cached) yes
checking lex output file root... (cached) lex.yy
checking whether yytext is a pointer... (cached) no
checking for /usr/dist/share/devpro,v4.0/5.x/SC4.0/bin/cc option to accept 
ANSI C... (cached) none needed
checking for bison... (cached) bison -y
checking whether /usr/dist/share/devpro,v4.0/5.x/SC4.0/bin/cc and cc 
understand -c and -o together... (cached) yes
checking for ANSI C header files... (cached) yes
checking bison version... 1.28 (ok)
checking for limits.h... (cached) yes
checking for malloc.h... (cached) yes
checking for string.h... (cached) yes
checking for unistd.h... (cached) yes
checking for stdarg.h... (cached) yes
checking for sys/types.h... (cached) yes
checking for signal.h... (cached) yes
checking for unix.h... (cached) no
checking for dlfcn.h... (cached) yes
checking for size_t... (cached) yes
checking return type of signal handlers... (cached) void
checking for dlopen in -ldl... (cached) yes
checking for dlopen... (cached) yes
checking for uint... (cached) yes
checking for ulong... (cached) yes
checking for vprintf... (cached) yes
checking for 8-bit clean memcmp... (cached) yes
checking for working alloca.h... (cached) yes
checking for alloca... (cached) yes
checking for memcpy... (cached) yes
checking for strdup... (cached) yes
checking for getpid... (cached) yes
checking for kill... (cached) yes
checking for strtod... (cached) yes
checking for strtol... (cached) yes
checking for finite... (cached) yes
checking whether sprintf is broken... (cached) no
checking for finite... (cached) yes
checking for isfinite... (cached) no
checking for isinf... (cached) no
checking for isnan... (cached) yes
checking whether fp_except is defined... (cached) no
checking host system type... sparc-sun-solaris2.8
checking build system type... sparc-sun-solaris2.8
checking for ranlib... (cached) ranlib
checking for non-GNU ld... (cached) /usr/ucb/ld
checking if the linker (/usr/ucb/ld) is GNU ld... (cached) no
checking for BSD-compatible nm... (cached) /usr/ccs/bin/nm -p
checking whether ln -s works... (cached) yes
loading cache ./config.cache within ltconfig
checking whether we are using GNU C... no
checking for object suffix... o
checking for executable suffix... (cached) no
checking for /usr/dist/share/devpro,v4.0/5.x/SC4.0/bin/cc option to 
produce PIC... -KPIC
checking if /usr/dist/share/devpro,v4.0/5.x/SC4.0/bin/cc PIC flag -KPIC 
works... yes
checking if /usr/dist/share/devpro,v4.0/5.x/SC4.0/bin/cc supports -c -o 
file.o... yes
checking if /usr/dist/share/devpro,v4.0/5.x/SC4.0/bin/cc supports -c -o 
file.lo... no
checking if /usr/dist/share/devpro,v4.0/5.x/SC4.0/bin/cc static flag 
-Bstatic works... none
checking if the linker (/usr/ucb/ld) is GNU ld... no
checking whether the linker (/usr/ucb/ld) supports shared libraries... yes
checking command to parse /usr/ccs/bin/nm -p output... ok
checking how to hardcode library paths into programs... immediate
checking for /usr/ucb/ld option to reload object files... -r
checking dynamic linker characteristics... solaris2.8 ld.so
checking if libtool supports shared libraries... yes
checking whether to build shared 

Re: [PHP] lex error in make of PHP_4.0.2/Zend

2001-04-30 Thread Andi Gutmans

By the way, while you're at it get bison too (instead of YACC :)

Andi

At 07:59 AM 4/30/2001 -0700, Surinder Singh wrote:
Hi,

I got problem while building PHP on Solaris8/SPARC.

I tried buildconf, then configure and then make. I got stuch at make. But 
giving here the output of buildconf and configure also as it may help you 
to help me.

moon:/workspace/trial/installserver/php_4.0.2/Zend 134 % \rm aclocal.m4 
configure
moon:/workspace/trial/installserver/php_4.0.2/Zend 135 % buildconf
buildconf: created or modified aclocal.m4
buildconf: created or modified configure
moon:/workspace/trial/installserver/php_4.0.2/Zend 136 %
moon:/workspace/trial/installserver/php_4.0.2/Zend 136 % configure
loading cache ./config.cache
checking for a BSD compatible install... ./../install-sh -c
checking whether build environment is sane... yes
checking whether make sets ${MAKE}... (cached) yes
checking for working aclocal... found
checking for working autoconf... found
checking for working automake... found
checking for working autoheader... found
checking for working makeinfo... missing
checking whether build environment is sane... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for gcc... (cached) /usr/dist/share/devpro,v4.0/5.x/SC4.0/bin/cc
checking whether the C compiler 
(/usr/dist/share/devpro,v4.0/5.x/SC4.0/bin/cc  ) works... yes
checking whether the C compiler 
(/usr/dist/share/devpro,v4.0/5.x/SC4.0/bin/cc  ) is a cross-compiler... no
checking whether we are using GNU C... (cached) no
checking whether /usr/dist/share/devpro,v4.0/5.x/SC4.0/bin/cc accepts 
-g... (cached) yes
checking how to run the C preprocessor... (cached) 
/usr/dist/share/devpro,v4.0/5.x/SC4.0/bin/cc -E
checking for flex... (cached) lex
checking for flex... (cached) lex
checking for yywrap in -ll... (cached) yes
checking lex output file root... (cached) lex.yy
checking whether yytext is a pointer... (cached) no
checking for /usr/dist/share/devpro,v4.0/5.x/SC4.0/bin/cc option to accept 
ANSI C... (cached) none needed
checking for bison... (cached) bison -y
checking whether /usr/dist/share/devpro,v4.0/5.x/SC4.0/bin/cc and cc 
understand -c and -o together... (cached) yes
checking for ANSI C header files... (cached) yes
checking bison version... 1.28 (ok)
checking for limits.h... (cached) yes
checking for malloc.h... (cached) yes
checking for string.h... (cached) yes
checking for unistd.h... (cached) yes
checking for stdarg.h... (cached) yes
checking for sys/types.h... (cached) yes
checking for signal.h... (cached) yes
checking for unix.h... (cached) no
checking for dlfcn.h... (cached) yes
checking for size_t... (cached) yes
checking return type of signal handlers... (cached) void
checking for dlopen in -ldl... (cached) yes
checking for dlopen... (cached) yes
checking for uint... (cached) yes
checking for ulong... (cached) yes
checking for vprintf... (cached) yes
checking for 8-bit clean memcmp... (cached) yes
checking for working alloca.h... (cached) yes
checking for alloca... (cached) yes
checking for memcpy... (cached) yes
checking for strdup... (cached) yes
checking for getpid... (cached) yes
checking for kill... (cached) yes
checking for strtod... (cached) yes
checking for strtol... (cached) yes
checking for finite... (cached) yes
checking whether sprintf is broken... (cached) no
checking for finite... (cached) yes
checking for isfinite... (cached) no
checking for isinf... (cached) no
checking for isnan... (cached) yes
checking whether fp_except is defined... (cached) no
checking host system type... sparc-sun-solaris2.8
checking build system type... sparc-sun-solaris2.8
checking for ranlib... (cached) ranlib
checking for non-GNU ld... (cached) /usr/ucb/ld
checking if the linker (/usr/ucb/ld) is GNU ld... (cached) no
checking for BSD-compatible nm... (cached) /usr/ccs/bin/nm -p
checking whether ln -s works... (cached) yes
loading cache ./config.cache within ltconfig
checking whether we are using GNU C... no
checking for object suffix... o
checking for executable suffix... (cached) no
checking for /usr/dist/share/devpro,v4.0/5.x/SC4.0/bin/cc option to 
produce PIC... -KPIC
checking if /usr/dist/share/devpro,v4.0/5.x/SC4.0/bin/cc PIC flag -KPIC 
works... yes
checking if /usr/dist/share/devpro,v4.0/5.x/SC4.0/bin/cc supports -c -o 
file.o... yes
checking if /usr/dist/share/devpro,v4.0/5.x/SC4.0/bin/cc supports -c -o 
file.lo... no
checking if /usr/dist/share/devpro,v4.0/5.x/SC4.0/bin/cc static flag 
-Bstatic works... none
checking if the linker (/usr/ucb/ld) is GNU ld... no
checking whether the linker (/usr/ucb/ld) supports shared libraries... yes
checking command to parse /usr/ccs/bin/nm -p output... ok
checking how to hardcode library paths into programs... immediate
checking for /usr/ucb/ld option to reload object files... -r
checking dynamic linker characteristics... solaris2.8 ld.so
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to 

Re: [PHP] PHP 4.3.0 and Zend Engine 2

2002-11-09 Thread Andi Gutmans
On Tue, 5 Nov 2002 [EMAIL PROTECTED] wrote:
 Can anybody tell me if PHP 4.3.0 will use Zend Engine 2?

Hi,

The Zend Engine 2 is likely to appear officially only in PHP 5.
However, I have released a couple of alphas with the Engine 2 bundled
against the latest CVS of PHP (i.e. almost PHP 4.3.0).
Hopefully within the next few weeks I'll bundle another alpha based on the
latest version of the engine 2 and the latest CVS version.

Andi


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




Re: [PHP] PHP 5

2003-11-02 Thread Andi Gutmans
Hi,

We tried to keep PHP 5 as much backwards compatible as possible.
However, due to the object model change and major improvements in the XML
extensions there might be some issues which you'll need to address.
IIRC, mysqladmin runs out of the box with PHP 5 and so do many other
applications.
In any case, porting apps over to PHP 5 will most probably not be a lot of
work.

Andi

On Sat, 1 Nov 2003, Leonel Nunez wrote:

 On Sat, 01 Nov 2003 23:42:06 +0100, Marek Kilimajer wrote:
 
  There will certainly be security updates, but it will not be futher 
  enhanced.
  
  Leonel Nunez wrote:
  hello :
  
  When php 5 is released  will there be support for  php 4.3.x ?
  
  thanks
  
  leonel
 
 
 this is what I needed to now
 
 Security updates  
 
 thanks  I hope so
 
 Leonel
 
 

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



[PHP] PHP 5 Release Candidate 1

2004-03-18 Thread Andi Gutmans
The PHP development team is proud to announce the release of PHP 5 Release 
Candidate 1.
Some of the key features of PHP 5 include:

- The Zend Engine II with a new object model and dozens of new features.
- XML support has been completely redone in PHP 5, all extensions are now 
focused around the excellent libxml2 library (http://www.xmlsoft.org/).
- A new MySQL extension named MySQLi for developers using MySQL 4.1 and 
later. Additionally to a functional interface this new extension also 
includes an object-oriented interfaced and support for many of MySQL's new 
features such as prepared statements.
- SQLite has been bundled with PHP. For more information on SQLite, please 
visit their website.
- A brand new built-in SOAP extension for interoperability with Web Services.
- A new SimpleXML extension for easily accessing and manipulating XML as 
PHP objects. It can also interface with the DOM extension and vice-versa.
- Streams have been greatly improved, including the ability to access 
low-level socket operations on streams.
- And lots more...

PHP 5 is now feature complete and quite stable. The purpose of the release 
candidate is to start widespread testing and use in non-mission critical 
applications.

Enjoy! 

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


[PHP] Re: COM Bug in PHP 4.3.10

2004-12-30 Thread Andi Gutmans
We are looking into it right now. Hopefully we will have a new version or 
at least a release candidate within 2 weeks.

At 11:08 AM 12/30/2004 +0200, Tohar Trabinovitch wrote:
--
Hi,

I need to know when will be the next PHP 4.3.x release with the fix for 
the COM bug which was in 4.3.10.

This is CRITICAL for us, because we run our application over windows using 
COM object and we use earlier version of PHP which has security bugs.


COM Bug URL:
http://bugs.php.net/bug.php?id=31159http://bugs.php.net/bug.php?id=31159

Thanks,

Tohar Trabinovitch
Software Engineer
E: [EMAIL PROTECTED]
T: 972-3-9008269
C: 054-777 30 43

This message is intended only for the person(s) to which it is addressed 
and may contain Sphera Corporation privileged, confidential and/or 
proprietary information. If you have received this communication in error, 
please notify us immediately by replying to the message and deleting it 
from your computer. Any disclosure, copying, distribution, or the taking 
of any action concerning the contents of this message and any 
attachment(s) by anyone other than the named recipient(s) is strictly 
prohibited.


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


[PHP] PHP 5.0.0 Released!

2004-07-13 Thread Andi Gutmans
The PHP development team is proud to announce the official release of PHP 5.
Some of the key features of PHP 5 include:
- The Zend Engine II with a new object model and dozens of new features.
- XML support has been completely redone in PHP 5, all extensions are now 
focused around the excellent libxml2 library (http://www.xmlsoft.org/).
- A new SimpleXML extension for easily accessing and manipulating XML as 
PHP objects. It can also interface with the DOM extension and vice-versa.
- A brand new built-in SOAP extension for interoperability with Web Services.
- A new MySQL extension named MySQLi for developers using MySQL 4.1 and 
later. This new extension includes an object-oriented interface in addition 
to a traditional interface; as well as support for many of MySQL's new 
features, such as prepared statements.
- SQLite has been bundled with PHP. For more information on SQLite, please 
visit their website (http://www.sqlite.org/).
- Streams have been greatly improved, including the ability to access 
low-level socket operations on streams.
- And lots more...

Enjoy!
PHP Development Team
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] PHP 5.0.1 Released!

2004-08-13 Thread Andi Gutmans
The PHP Development Team is glad to announce the release of PHP 5.0.1.
This release is a maintenance release consisting mainly of bug fixes. It 
also includes new installation docs which are
now auto-generated directly from the PHP Manual (INSTALL in the UNIX source 
package, install.txt in the Windows binary distribution both available at 
http://www.php.net/downloads.php)

A full list of changes can be found at http://www.php.net/ChangeLog-5.php#5.0.1
Enjoy,
PHP Development Team
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] PHP 5.0.2 Released

2004-09-24 Thread Andi Gutmans
The PHP Development Team is proud to announce the immediate release of PHP 
5.0.2.
This is a maintenance release that in addition to many non-critical bug 
fixes, addresses a problem with GPC input processing.

All Users of PHP 5 are encouraged to upgrade to this release as soon as 
possible.

For changes since PHP 5.0.1, please consult the Changelog 
(http://www.php.net/ChangeLog-5.php#5.0.2)

Enjoy,
PHP Development Team
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php