Re: [PHP-DEV] mcrypt & oracle 81

2001-01-21 Thread Derick Rethans

Hello,

please provide more information, such as a backtrace and the messages in
your error_log (of your webserver).

Derick

On Mon, 22 Jan 2001, Vinod Panicker wrote:

> hey..
> i'm trying to get PHP 4.0.4pl1 working with mcrypt 2.4.7 and oracle
> 8i...
> problem is that everything gets configured and make works too... but after
> that when i start apache, it just dies.  i'm using apache 1.3.14.
>
> anybody tried this before?  pls help me out if u can...
>
>
> --
> PHP Development Mailing List 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>

Derick Rethans

-
  PHP: Scripting the Web - www.php.net - [EMAIL PROTECTED]
-
JDI Media Solutions - www.jdimedia.nl - [EMAIL PROTECTED]
 H.v. Tussenbroekstraat 1 - 6952 BL Dieren - The Netherlands
-


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




[PHP-DEV] mcrypt & oracle 81

2001-01-21 Thread Vinod Panicker

hey..
i'm trying to get PHP 4.0.4pl1 working with mcrypt 2.4.7 and oracle
8i...
problem is that everything gets configured and make works too... but after
that when i start apache, it just dies.  i'm using apache 1.3.14.

anybody tried this before?  pls help me out if u can...


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




Re: [PHP-DEV] Function prototype for PHP4?

2001-01-21 Thread Matthew Hagerty

I think I posted this to soon, I think I actually found what I am looking 
for on Zend's site.  Sorry for the noise.

Matthew


At 11:31 PM 1/21/01 -0500, you wrote:
>Greetings,
>
>Is there a guide some place for adding functions to PHP4?  There seems to 
>be such a mix of old (PHP3) and new (PHP4) methods and it seems that every 
>function I look at for examples seems to do it its own way.  The PHP 
>manual only outlines PHP3 functions and does not go into passing by 
>reference very well (which is one of the things I need to do.)  Heck, even 
>the Zend page documentation only covers adding to PHP3!  At any rate, any 
>insight or direction as to where I can get the definitive rules for adding 
>to PHP4 would be greatly appreciated.
>
>Thanks!
>Matthew
>
>
>--
>PHP Development Mailing List 
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


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




[PHP-DEV] Function prototype for PHP4?

2001-01-21 Thread Matthew Hagerty

Greetings,

Is there a guide some place for adding functions to PHP4?  There seems to 
be such a mix of old (PHP3) and new (PHP4) methods and it seems that every 
function I look at for examples seems to do it its own way.  The PHP manual 
only outlines PHP3 functions and does not go into passing by reference very 
well (which is one of the things I need to do.)  Heck, even the Zend page 
documentation only covers adding to PHP3!  At any rate, any insight or 
direction as to where I can get the definitive rules for adding to PHP4 
would be greatly appreciated.

Thanks!
Matthew


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




[PHP-DEV] PHP 4.0 Bug #8831: a script works on 2 servers I use, and doesn't work on a third one

2001-01-21 Thread mage

From: [EMAIL PROTECTED]
Operating system: Debian Linux
PHP version:  4.0.4pl1
PHP Bug Type: MySQL related
Bug description:  a script works on 2 servers I use, and doesn't work on a third one

Dear Support,

One of my project were must go to another server, and I got a trouble
with my functions.

I try to write a short code to explain it.
This script works well on my computer, windows 98 se, php 4.0.3. Also
works on debian a server, php 4.0.3.
There is another debian server (that was php 4.0.3 too), and this script
crashes on it. I tried to reinstall mysql, php (the new 4.0.4pl), apache,
but that did not help. I show a short code:

--

-

That outputs nothing on my computer, nothing on the first debian server.
That's ok.
But this outputs on the server where I'd use it the below:

"Warning: Supplied argument is not a valid MySQL result resource in
/home/kepes/public_html/test/test5.php4 on line 16
Warning: 1 is not a valid MySQL-Link resource in
/home/kepes/public_html/test/test5.php4 on line 10"

I figured out this is if I use at least 2 mysql connections same time.
Another interest thing, if I comment out the:
---
  while ($row = mysql_fetch_array($data)) {
$result[] = $row;
  }
---
part of script, this also works on the 2nd server (but I can't use that way of course).

Because my db-scripts are based upon methods like above, I would like to
know what the problem is. I include some php info.

PHP Version 4.0.5-dev
SystemLinux ditto 2.2.17 #1 Mon Dec 4 23:29:54 CET 2000 i686 unknown
Build Date   Dec 10 2000
Configure Command './configure' '--with-mysql' '--with-apxs'
Server API Apache
Virtual Directory Support disabled
Configuration File (php.ini) Path /usr/local/lib
ZEND_DEBUG disabled
Thread Safety
disabled

-
mysql

MySQL Support enabled
Active Persistent Links 0
Active Links 0
Client API version 3.23.22-beta
MYSQL_INCLUDE
MYSQL_LFLAGS
MYSQL_LIBS

DirectiveLocal ValueMaster Value
mysql.allow_persistent  On  On
mysql.max_links  Unlimited  Unlimited
mysql.max_persistent Unlimited Unlimited

-

Thank You,

Mage






-- 
Edit Bug report at: http://bugs.php.net/?id=8831&edit=1



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




Re: [PHP-DEV] PHP 4.0 Bug #8795: Recieved POST-form-data is unexpectedly escaped with backslashes

2001-01-21 Thread Toby Butzon

I may have forgotten to post my apology to the list.

Someone already pointed out to me that sending this to the list was stupid,
and I sincerely apologize. There's no excuse for what I did and I
understand; I'll be more careful.

Regards,

--Toby

- Original Message -
From: "Jason Greene" <[EMAIL PROTECTED]>
To: "Ignacio Vazquez-Abrams" <[EMAIL PROTECTED]>; "Toby Butzon"
<[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Friday, January 19, 2001 12:27 PM
Subject: Re: [PHP-DEV] PHP 4.0 Bug #8795: Recieved POST-form-data is
unexpectedly escaped with backslashes


> From a hostile standpoint, a sendmail server allowing VRFY is considered
> bad,
> /let alone giving the hacker detailed uid/gid structure of your system.
>
> Jason
> - Original Message -
> From: "Ignacio Vazquez-Abrams" <[EMAIL PROTECTED]>
> To: "Toby Butzon" <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Friday, January 19, 2001 9:02 AM
> Subject: Re: [PHP-DEV] PHP 4.0 Bug #8795: Recieved POST-form-data is
> unexpectedly escaped with backslashes
>
>
> > On Thu, 18 Jan 2001, Toby Butzon wrote:
> >
> > > As a side note, check this link out ;)
> > > http://[removed]?file=/etc/passwd
> > >
> > > --Toby
> > >
> >
> > Oh come on. Exposing this file even with shadow passwords in place is
> still a
> > HUGE risk, because now your userids are exposed and your system is
> vulnerable
> > to a brute-force attack. Never, EVER, do something as silly as this,
> > especially in a public forum.
> >
> > --
> > Ignacio Vazquez-Abrams  <[EMAIL PROTECTED]>
> >
> >
> > --
> > PHP Development Mailing List 
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail:
[EMAIL PROTECTED]
> >
>
>


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




Re: [PHP-DEV] string replacement

2001-01-21 Thread Jan Borsodi

Cynic <[EMAIL PROTECTED]> writes:

> why is it bad?

Why?
Because it's quite normal for functions like str_replace to be *much*
faster than preg_replace, but since str_replace on arrays is slower
(due to iterating over them using PHP code) you have to use preg_replace.

I'll happily use preg_replace whenever I need to do some Regular
Expression replacement, but when I want to do normal text replacement
I expect str_replace to give me the same flexibility as preg_replace.

That's why!

-- 
- Jan Borsodi <[EMAIL PROTECTED]> - Systems Engineer @ eZ systems - Web: http://ez.no
  QtVu: http://www.qtvu.org  -  RegExplorer: http://regexplorer.sourceforge.net
  EMacro: http://emacro.sourceforge.net  -  Apollo: http://www.apolloplayer.org

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




[PHP-DEV] emulating db extension on top of dba?

2001-01-21 Thread Jim Winstead

has anyone explored emulating the old db extension on top of the dba
extension? because of the better control of which dbm library actually
gets used, it seems to me that something like this could make upgrading
from php3 easier for some people (like hosting providers, where just
upgrading every script to use the dba interface simply isn't feasible).

jim

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




Re: [PHP-DEV] string replacement

2001-01-21 Thread Cynic

why is it bad?

At 19:45 21.1. 2001, Jan Borsodi wrote the following:
-- 
>Is there any plans to extend str_replace and ereg_replace to accept
>arrays in the same manner as preg_replace does?
>
>At the moment using preg_replace on arrays are faster than iterating
>trough the arrays and passing them to str_replace, which is bad.
>
>-- 
>- Jan Borsodi <[EMAIL PROTECTED]> - Systems Engineer @ eZ systems - Web: http://ez.no
>  QtVu: http://www.qtvu.org  -  RegExplorer: http://regexplorer.sourceforge.net
>  EMacro: http://emacro.sourceforge.net  -  Apollo: http://www.apolloplayer.org
>
>-- 
>PHP Development Mailing List 
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]
--end of quote-- 




Cynic:

A member of a group of ancient Greek philosophers who taught
that virtue constitutes happiness and that self control is
the essential part of virtue.

[EMAIL PROTECTED]



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




[PHP-DEV] string replacement

2001-01-21 Thread Jan Borsodi

Is there any plans to extend str_replace and ereg_replace to accept
arrays in the same manner as preg_replace does?

At the moment using preg_replace on arrays are faster than iterating
trough the arrays and passing them to str_replace, which is bad.

-- 
- Jan Borsodi <[EMAIL PROTECTED]> - Systems Engineer @ eZ systems - Web: http://ez.no
  QtVu: http://www.qtvu.org  -  RegExplorer: http://regexplorer.sourceforge.net
  EMacro: http://emacro.sourceforge.net  -  Apollo: http://www.apolloplayer.org

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




Re: [PHP-DEV] popen() on Win32

2001-01-21 Thread Teodor Cimpoesu

Andi Gutmans wrote:
> 
> Hey,
> 
> A couple of guys here said they are working on creating a popen()
> alternative solution for Win32.
> Any progress?
> 

I remembered I wanted to suggest you to take a look on how it is
implemented in
Python. Their docs state: """
popen (command[, mode[, bufsize]]) 

Changed in version 2.0: This function worked unreliably under Windows in
earlier versions of Python. This was due to the use of the _popen()
function from the libraries provided with Windows. Newer versions of
Python do not use the broken implementation from the Windows libraries. 


Python also has popen{2,3,4}(), [ in module os, also there is a popen2
module ].

I took a peek into posixmodule.c (iirc) but didn't figure out from
_PyPopen() how they
do it cause it's a bit over my knowledge :)

One can grab the python2.0 sources and have a look if interested (I
don't have the relevant file at hand).

ciao 

-- teodor

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




Re: [PHP-DEV] popen() on Win32

2001-01-21 Thread Andi Gutmans

At 05:27 PM 1/21/2001 +0100, Derick Rethans wrote:
>Hi,
>
> > A couple of guys here said they are working on creating a popen()
> > alternative solution for Win32.
> > Any progress?
>
>I'm busy with it. I'm making progress indeed. I only have to bring the
>code into the PHP source now. BUt it looks good. I'll try to finish it
>this week, but it will be a hack, because I don't understand your V_*
>macro's quite well. But I assume some devs can assist me with this later
>on.

Great! I can assist you. Ask me questions about the V_*'s and I'll do my 
best :)

Andi


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




[PHP-DEV] RE: [PHP] PHP / NSAPI / Web server support

2001-01-21 Thread Paul Egan


The change from request_translate_uri to rq->vars "path"
also fixes the use of PATH_INFO and PHP as a default
index. Without this, PHP halts without error on
URI's like /app (with /app/index.php) or /script.php/commit.

The same problems with PATH_INFO & default index occur
when running PHP as a CGI. I've made a few changes to
cgi_main.c to fix this but havn't tested on anything but
NES 362.

I've been encountering quite a few bus error & seg faults
when using the NSAPI plugin (up to 5 a day) - these are
usually caught by uxwdog.  Anybody else found the same?

I noticed also that the latest snapshot now includes the check
for ieeefp.h.



*** sapi/cgi/cgi_main.c.origSat Jan 20 00:09:12 2001
--- sapi/cgi/cgi_main.c Sat Jan 20 00:08:42 2001
***
*** 168,174 
l += strlen(sn);
if (pi)
l += strlen(pi);
!   if (pi && sn && !strcmp(pi, sn)) {
l -= strlen(pi);
pi = NULL;
}
--- 168,174 
l += strlen(sn);
if (pi)
l += strlen(pi);
!   if (pi && sn && !strncmp(pi, sn, strlen(sn))) {
l -= strlen(pi);
pi = NULL;
}
***
*** 314,323 
--- 314,337 
  
SG(request_info).request_method = getenv("REQUEST_METHOD");
SG(request_info).query_string = getenv("QUERY_STRING");
+ /*
SG(request_info).request_uri = getenv("PATH_INFO");
if (!SG(request_info).request_uri) {
SG(request_info).request_uri = getenv("SCRIPT_NAME");
}
+ */
+   
+   SG(request_info).request_uri = getenv("SCRIPT_NAME");
+   if (SG(request_info).request_uri && SG(request_info).argv0 && 
+IS_SLASH(SG(request_info).request_uri[strlen(SG(request_info).request_uri)-1])) {
+   char *arg_file = strrchr(SG(request_info).argv0,DEFAULT_SLASH);
+   if (arg_file) {
+   char *script_name = 
+emalloc(strlen(SG(request_info).request_uri)+strlen(arg_file)+1);
+   strcpy(script_name,SG(request_info).request_uri);
+   strcat(script_name,arg_file+1);
+   SG(request_info).request_uri = script_name;
+   }
+   }
+ 
SG(request_info).path_translated = NULL; /* we have to update it later, when 
we have that information */
SG(request_info).content_type = getenv("CONTENT_TYPE");
SG(request_info).content_length = (content_length?atoi(content_length):0);
***
*** 507,518 
ap_php_optarg = orig_optarg;
}
  
init_request_info(SLS_C);
SG(server_context) = (void *) 1; /* avoid server_context==NULL checks */
CG(extended_info) = 0;
  
-   SG(request_info).argv0 = argv0;
- 
zend_llist_init(&global_vars, sizeof(char *), NULL, 0);
  
if (!cgi) { /* never execute the arguments 
if you are a CGI */
--- 521,532 
ap_php_optarg = orig_optarg;
}
  
+   SG(request_info).argv0 = argv0;
+ 
init_request_info(SLS_C);
SG(server_context) = (void *) 1; /* avoid server_context==NULL checks */
CG(extended_info) = 0;
  
zend_llist_init(&global_vars, sizeof(char *), NULL, 0);
  
if (!cgi) { /* never execute the arguments 
if you are a CGI */


*** sapi/nsapi/nsapi.c.orig Sat Jan 20 15:11:01 2001
--- sapi/nsapi/nsapi.c  Sat Jan 20 15:31:34 2001
***
*** 101,106 
--- 101,107 
{ "HTTP_ACCEPT_LANGUAGE",   "accept-language" },
{ "HTTP_AUTHORIZATION", "authorization" },
{ "HTTP_COOKIE","cookie" },
+   { "HTTP_CLIENT_IP", "client-ip" },
{ "HTTP_IF_MODIFIED_SINCE", "if-modified-since" },
{ "HTTP_REFERER",   "referer" },
{ "HTTP_USER_AGENT","user-agent" },
***
*** 445,457 
char *query_string = pblock_findval("query", NSG(rq)->reqpb);
char *uri = pblock_findval("uri", NSG(rq)->reqpb);
char *path_info = pblock_findval("path-info", NSG(rq)->vars);
!   char *path_translated = NULL;
char *request_method = pblock_findval("method", NSG(rq)->reqpb);
char *content_type = pblock_findval("content-type", NSG(rq)->headers);
char *content_length = pblock_findval("content-length", NSG(rq)->headers);
  
if (uri != NULL)
path_translated = request_translate_uri(uri, NSG(sn));
  
  #if defined(NSAPI_DEBUG)
log_error(LOG_INFORM, "nsapi_request_ctor", NSG(sn), NSG(rq),
--- 446,460 
char *query_string = pblock_findval("query", NSG(rq)->reqpb);
char *uri = pblock_findval("uri", NSG(rq)->reqpb);
char *path_info = pblock_findval("path-info",

Re: [PHP-DEV] popen() on Win32

2001-01-21 Thread Derick Rethans

Hi,

> A couple of guys here said they are working on creating a popen()
> alternative solution for Win32.
> Any progress?

I'm busy with it. I'm making progress indeed. I only have to bring the
code into the PHP source now. BUt it looks good. I'll try to finish it
this week, but it will be a hack, because I don't understand your V_*
macro's quite well. But I assume some devs can assist me with this later
on.

Regards,

Derick Rethans

-
  PHP: Scripting the Web - www.php.net - [EMAIL PROTECTED]
-
JDI Media Solutions - www.jdimedia.nl - [EMAIL PROTECTED]
 H.v. Tussenbroekstraat 1 - 6952 BL Dieren - The Netherlands
-


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




Re: [PHP-DEV] EXTENSIONS file refresh..

2001-01-21 Thread David Eriksson

On Friday 19 January 2001 16:07, Jani Taskinen wrote:
>I added some missing extensions into the EXTENSIONS file
>and some missing EXPERIMENTAL files into the extensions
>which were marked as experimental.
>
>So every author of those extensions should check that the
>information in EXTENSIONS is correct. e.g. There were some missing
>info about the primary maintainers.
>
>BTW. Why does the satellite extension use --enable-satellite??
>It does use external libraries which are not bundled with PHP.
>IIRC the --enable-* configure option is meant to be used only
>with such extensions?? (and satellite relies on some CVS version
>of ORBit?)

What would you like instead?

>Another thing: Would it be good idea to have the EXPERIMENTAL
>text in configure help for such options? This could be automated
>in the buildconf ie. it could check if the EXPERIMENTAL is in the
>extension's dir and adds the text before/after the option in
>the help display..? And maybe even a note after configure that
>there are extensions configured in which are considered experimental
>thus those might not work as expected.

Good idea!

Regards,

-\- David Eriksson -/-

"An expert in a particular computer language is really an expert
in the work-arounds necessary to use this language to perform 
useful work." - Richard B. Johnson

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




[PHP-DEV] PHP 4.0 Bug #8830: Internal Server error at random intervals

2001-01-21 Thread cronk

From: [EMAIL PROTECTED]
Operating system: Win2K
PHP version:  4.0.4pl1
PHP Bug Type: IIS related
Bug description:  Internal Server error at random intervals

I have tried this with 4.0 CGI, 4.04pl1 CGI and 4.04pl1 ISAPI and get the same thing.  
This is Win2K terminal server running IIS and MySQL.  After 12-24 hours of being up, 
PHP seems to die and give Internal Server Error responses to any PHP script.  When 
using ISAPI the event log shows:

The HTTP server encountered an unhandled exception while processing the ISAPI 
Application '
php4ts!zend_hash_copy + 0x1B
 + 0xA05C8578

.HTML works fine, MySQL is up, FTP is up, PCAnywhere is up, just PHP seems to be hung, 
and a reboot is needed to bring it back.

Does anyone have a way I can tell what is crashing it? A bug or some data that are 
being POSTED to a script, etc...

It works for 12-24 hours -- which if 10,000 to 50,000 scripts run before a crash 



-- 
Edit Bug report at: http://bugs.php.net/?id=8830&edit=1



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




[PHP-DEV] popen() on Win32

2001-01-21 Thread Andi Gutmans

Hey,

A couple of guys here said they are working on creating a popen() 
alternative solution for Win32.
Any progress?

Andi


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




[PHP-DEV] Bug #8829: bug on fopen("ftp://...

2001-01-21 Thread anthony

From: [EMAIL PROTECTED]
Operating system: 
PHP version:  3.0.13
PHP Bug Type: Other
Bug description:  bug on fopen("ftp://...

Under PHP 3.0.12 ... 13 ...
The following line code fails :

$fp = fopen("ftp://$login:$pass@$ftp_url/$filename/","w") ;

This generates a empty file when the ftp server is windows NT4 or 2000.


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




[PHP-DEV] CVS Account Request

2001-01-21 Thread root

Full name: Anderson da Silveira Fortaleza
Email: [EMAIL PROTECTED]
ID: afortaleza
Purpose: Translation of the PHP Manual to Brazilian Portuguese

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




[PHP-DEV] PHP 4.0 Bug #8828: mktime using mday<=0

2001-01-21 Thread dieter

From: [EMAIL PROTECTED]
Operating system: MacOS X (Darwin 1.2)
PHP version:  4.0.4pl1
PHP Bug Type: Date/time related
Bug description:  mktime using mday<=0

On PHP documantation:
mktime(hour,min,sec, year,0,mon) refers the last day of 
month 'mon-1'. On MacOS X this failed, there it refers 
the first day of month 'mon' and mktime(hour,min,sec, 
year,-1,mon) refers the last day of month 'mon-1'.

See the test:

[aragorn:~/Downloads] dieter% cat A.c
#include 
#include 

main()
{
struct tm mytm;
int i;

mytm.tm_sec = 0; mytm.tm_min = 0;
mytm.tm_hour = 0; mytm.tm_year = 101;
mytm.tm_wday = 0; mytm.tm_yday = 0;
mytm.tm_isdst = 0; mytm.tm_gmtoff = 0;
mytm.tm_zone = 0;

for (i = 2; i >= -2; i--)
{
mytm.tm_mday = i;
mytm.tm_mon = 2;
printf ("%02d.%02d ",
   mytm.tm_mday, mytm.tm_mon+1);
printf (" --> %ld", mktime(&mytm));
printf (" --> %02d.%02d\n",
   mytm.tm_mday, mytm.tm_mon+1);
}
}
[aragorn:~/Downloads] dieter% cc -o A A.c
[aragorn:~/Downloads] dieter% ./A
02.03  --> 983487600 --> 02.03
01.03  --> 983401200 --> 01.03
00.03  --> 983401200 --> 01.03
-1.03  --> 983314800 --> 28.02
-2.03  --> 983228400 --> 27.02
[aragorn:~/Downloads] dieter% 



-- 
Edit Bug report at: http://bugs.php.net/?id=8828&edit=1



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




Re: [PHP-DEV] RE: PHP 4.0 Bug #7360 Updated: is_a2z would be nice...

2001-01-21 Thread Cynic

At 13:55 21.1. 2001, Maxim Maletsky wrote the following:
-- 
>Great!
>
>Is it documented anywhere yet? (is my name up there as well? I know I
>haven't done much except bringing this issue up, but I would be on the 7-th
>sky seeing my name on the PHP change-logs)
>
>Cheers,
>Maxim Maletsky.

Not yet; as a matter of fact, the ctype extension is still in experimental
stage, which means that function names haven't stabilized yet etc.
See ext/ctype in the source package (http://snaps.php.net/) for details.

>ID: 7360
>Updated by: cynic
>Reported By: [EMAIL PROTECTED]
>Old-Status: Feedback
>Status: Closed
>Bug Type: Feature/Change Request
>Assigned To:
>Comments:
>
>ctype functions are now implemented
>
>Previous Comments:
>---
>
>[2000-10-20 05:59:15] [EMAIL PROTECTED]
>what about implementing the ctype.h family of functions available in C and
>stick with their namespace ?isalnum,  isalpha,  isascii,  isblank,
>iscntrl,  isdigit,isgraph,  islower,  isprint,  ispunct,  isspace,
>isupper,isxdigit
>
>---
>
>[2000-10-20 02:24:38] [EMAIL PROTECTED]
>A suggestion:  I was thinking that there are some functions that should
>exist in PHP:  1: if(eregi("[A-Z]", $string)) this could be called something
>like is_a2z (any name is OK, I just though about nl2br). Instead of using
>RegEx which is real slow when you have to check strings several times in a
>script a simple function like this would be of a BIG HELP. (I know of
>is_numeric(), but it's use will not make you sure that the string is
>esclusivelly alphabetic). A build-in function to detect whether a $string is
>entirelly made from a-z avoiding so regular expression use is really needed,
>I think.  2: Another thing (Less important) is that instead of using
>(ereg("[:alnum:]", $string)) you could just say if(!is_almun($string)), just
>to make (ereg("[:alnum:]", $string)) be a little lighter and easier for
>beginners. (few beginners use [:almun:], they usually get into writing some
>huge long expressions,) this would impress them a lot.  Thanks for your
>patience, Maxim Maletsky
>
>---
>
>
>Full Bug description available at: http://bugs.php.net/?id=7360
>
>
>
>-- 
>PHP Development Mailing List 
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]
--end of quote-- 




Cynic:

A member of a group of ancient Greek philosophers who taught
that virtue constitutes happiness and that self control is
the essential part of virtue.

[EMAIL PROTECTED]



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




[PHP-DEV] RE: PHP 4.0 Bug #7360 Updated: is_a2z would be nice...

2001-01-21 Thread Maxim Maletsky

Great!

Is it documented anywhere yet? (is my name up there as well? I know I
haven't done much except bringing this issue up, but I would be on the 7-th
sky seeing my name on the PHP change-logs)

Cheers,
Maxim Maletsky.

-Original Message-
From: Bug Database [mailto:[EMAIL PROTECTED]]
Sent: Sunday, January 21, 2001 5:44 PM
To: [EMAIL PROTECTED]
Subject: PHP 4.0 Bug #7360 Updated: is_a2z would be nice...

Great,
is it documented yet? (can my name be theree as well? I know I've not more
then bringing this issue up, but seeing my name on change-logs would send me
to the 7-th sky)

Cheers,
Maxim Maletsky



ID: 7360
Updated by: cynic
Reported By: [EMAIL PROTECTED]
Old-Status: Feedback
Status: Closed
Bug Type: Feature/Change Request
Assigned To:
Comments:

ctype functions are now implemented

Previous Comments:
---

[2000-10-20 05:59:15] [EMAIL PROTECTED]
what about implementing the ctype.h family of functions available in C and
stick with their namespace ?isalnum,  isalpha,  isascii,  isblank,
iscntrl,  isdigit,isgraph,  islower,  isprint,  ispunct,  isspace,
isupper,isxdigit

---

[2000-10-20 02:24:38] [EMAIL PROTECTED]
A suggestion:  I was thinking that there are some functions that should
exist in PHP:  1: if(eregi("[A-Z]", $string)) this could be called something
like is_a2z (any name is OK, I just though about nl2br). Instead of using
RegEx which is real slow when you have to check strings several times in a
script a simple function like this would be of a BIG HELP. (I know of
is_numeric(), but it's use will not make you sure that the string is
esclusivelly alphabetic). A build-in function to detect whether a $string is
entirelly made from a-z avoiding so regular expression use is really needed,
I think.  2: Another thing (Less important) is that instead of using
(ereg("[:alnum:]", $string)) you could just say if(!is_almun($string)), just
to make (ereg("[:alnum:]", $string)) be a little lighter and easier for
beginners. (few beginners use [:almun:], they usually get into writing some
huge long expressions,) this would impress them a lot.  Thanks for your
patience, Maxim Maletsky

---


Full Bug description available at: http://bugs.php.net/?id=7360



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




[PHP-DEV] PHP 4.0 Bug #8760 Updated: Troubles enabling extension php_curl.php

2001-01-21 Thread cynic

ID: 8760
Updated by: cynic
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Feedback
Bug Type: *Configuration Issues
Assigned To: 
Comments:

are you sure the versions match? (i. e. the dll is from the same package as php.exe 
you're using?)

Previous Comments:
---

[2001-01-17 10:23:46] [EMAIL PROTECTED]
When I enable php_curl.php extension by uncommenting

extension=php_curl.dll

no php script ever gets executed, instead it just gets stuck. However, this is not the 
case for all extensions,
 e.g. I also use php_interbase.dll without any problem.

This problem is not specific only to php_curl.dll, also
other dlls make trouble, but curl is the one i'm interested in.

I use Win32 binary downloaded from www.php.net 17.1.2001.
I din't compile myself anything. I use php with apache server, in cgi way.

Here is my php.ini causing troubles:


[PHP]

;;;
; About this file ;
;;;
;
; This is the 'optimized', PHP 4-style version of the php.ini-dist file.
; For general information about the php.ini file, please consult the php.ini-dist
; file, included in your PHP distribution.
;
; This file is different from the php.ini-dist file in the fact that it features
; different values for several directives, in order to improve performance, while
; possibly breaking compatibility with the standard out-of-the-box behavior of
; PHP 3.  Please make sure you read what's different, and modify your scripts
; accordingly, if you decide to use this file instead.
;
; - allow_call_time_pass_reference = Off
; It's not possible to decide to force a variable to be passed by reference
; when calling a function.  The PHP 4 style to do this is by making the
; function require the relevant argument by reference.
; - register_globals = Off
; Global variables are no longer registered for input data (POST, GET, cookies,
; environment and other server variables).  Instead of using $foo, you must use
; $HTTP_POST_VARS["foo"], $HTTP_GET_VARS["foo"], $HTTP_COOKIE_VARS["foo"], 
; $HTTP_ENV_VARS["foo"] or $HTTP_SERVER_VARS["foo"], depending on which kind
; of input source you're expecting 'foo' to come from.
; - register_argc_argv = Off
; Disables registration of the somewhat redundant $argv and $argc global
; variables.
; - magic_quotes_gpc = Off
; Input data is no longer escaped with slashes so that it can be sent into
; SQL databases without further manipulation.  Instead, you should use the
; function addslashes() on each input element you wish to send to a database.
; - variables_order = "GPCS"
; The environment variables are not hashed into the $HTTP_ENV_VARS[].  To access
; environment variables, you can use getenv() instead.



; Language Options ;


engine  =   On  ; Enable the PHP scripting language engine 
under Apache
short_open_tag  =   On  ; allow the  tags are recognized.
asp_tags=   Off ; allow ASP-style <% %> tags
precision   =   14  ; number of significant digits displayed in 
floating point numbers
y2k_compliance  =   Off ; whether to be year 2000 compliant (will cause 
problems with non y2k compliant browsers)
output_buffering= Off   ; Output buffering allows you to send header lines 
(including cookies)
; even after you send body 
content, in the price of slowing PHP's
; output layer a bit.
; You can enable output 
buffering by in runtime by calling the output
; buffering functions, or 
enable output buffering for all files
; by setting this directive to 
On.
output_handler  =   ; You can redirect all of the output of your 
scripts to a function,
; that can be responsible to 
process or log it.  For example,
; if you set the 
output_handler to "ob_gzhandler", than output
; will be transparently 
compressed for browsers that support gzip or
; deflate encoding.  Setting 
an output handler automatically turns on
; output buffering.
implicit_flush  = Off   ; Implicit flush tells PHP to tell the output layer to 
flush itself
; automatically after every 
output block.  This is equivalent to
   

[PHP-DEV] PHP 4.0 Bug #7796 Updated: Slow reqursive functions with MySQL

2001-01-21 Thread cynic

ID: 7796
Updated by: cynic
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Feedback
Bug Type: Performance problem
Assigned To: 
Comments:

recursion in PHP is pretty fast. could you post a (stripped down as much as possible) 
script that shows the behavior?

Previous Comments:
---

[2000-11-13 19:04:36] [EMAIL PROTECTED]
I have a PHP function that draws out a forum stored i a MySQL database. 
The function uses a reqursive call to itself, to do the next messagereply on the 
current message.

My problem is that all this works VERY slow.
All other MySQL calls works very fast...

The preformance I'm getting is about 2.2 KB/s data output (HTML formatd).
All other operations give me about 30 KB/s (may be more because there is only a 256 
Kbit connection to the server).

I'm using the supplied standard mysql.ini file

Is there a memory leaking problem? 

---


Full Bug description available at: http://bugs.php.net/?id=7796


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




Re: [PHP-DEV] PHP 4.0 Bug #8803 Updated: crazy implementation of printf/sprintf

2001-01-21 Thread Stig Venaas

On Fri, Jan 19, 2001 at 04:24:16PM +0100, Sascha Schumann wrote:
> Does %.2x work?  If not, then it is indeed not in compliance
> with C99.  7.19.6 says:

The comments in ext/standard/formatted_print.c says:

 * New sprintf implementation for PHP.
 *
 * Modifiers:
 *
 *  " "   pad integers with spaces
 *  "-"   left adjusted field
 *   nfield size
 *  "."n  precision (floats only)

I think this should be implemented as well, maybe make it a
feature request.

Stig

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




[PHP-DEV] PHP 4.0 Bug #8792 Updated: Web browser hangs when I try to access a .php file

2001-01-21 Thread cynic

ID: 8792
Updated by: cynic
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Closed
Bug Type: Reproduceable crash
Assigned To: 
Comments:

PHP and extension dlls API versions must match. Update your extensions. 
I don't see any php_msql2.dll or php_imap4r2.dll in the 4.0.4 pl1 distro, so this must 
be the case, unless, of course, you compiled it yourself. If so, reopen the bug report 
with more details.

Previous Comments:
---

[2001-01-18 14:50:22] [EMAIL PROTECTED]
This is the error I get in the error.log file when I try to access a .php script and 
the browser hangs.

[Thu Jan 18 13:50:34 2001] [error] [client 207.208.143.94] Premature end of script 
headers: c:/php/php.exe

---

[2001-01-18 13:54:26] [EMAIL PROTECTED]
I installed PHP with Apache Server 1.3 on my Windows '95 machine.  I checked to make 
sure all the needed entries were present in the configuration, according to the 
installation instruction (MIME type, Script Alias, etc.), and that all the required 
DLLs were in the windows/system directory, and I get no output when I try to run a 
.php script.  When I look at the Windows '95 task list, I see that there is a Php task 
stuck in it, so my belief is that php is locking up.  Do you know what might be 
causing this?  I'll include the php.ini file.

[PHP]

;;;
; About this file ;
;;;
; This file controls many aspects of PHP's behavior.  In order for PHP to
; read it, it must be named 'php.ini'.  PHP looks for it in the current
; working directory, in the path designated by the environment variable
; PHPRC, and in the path that was defined in compile time (in that order).
; Under Windows, the compile-time path is the Windows directory.  The
; path in which the php.ini file is looked for can be overriden using
; the -c argument in command line mode.
;
; The syntax of the file is extremely simple.  Whitespace and Lines
; beginning with a semicolon are silently ignored (as you probably guessed).
; Section headers (e.g. [Foo]) are also silently ignored, even though
; they might mean something in the future.
;
; Directives are specified using the following syntax:
; directive = value
; Directive names are *case sensitive* - foo=bar is different from FOO=bar.
;
; The value can be a string, a number, a PHP constant (e.g. E_ALL or M_PI), one
; of the INI constants (On, Off, True, False, Yes, No and None) or an expression
; (e.g. E_ALL & ~E_NOTICE), or a quoted string ("foo").
;
; Expressions in the INI file are limited to bitwise operators and parentheses:
; | bitwise OR
; & bitwise AND
; ~ bitwise NOT
; ! boolean NOT
;
; Boolean flags can be turned on using the values 1, On, True or Yes.
; They can be turned off using the values 0, Off, False or No.
;
; An empty string can be denoted by simply not writing anything after the equal
; sign, or by using the None keyword:
;
;   foo =   ; sets foo to an empty string
;   foo = none  ; sets foo to an empty string
;   foo = "none"; sets foo to the string 'none'
;
; If you use constants in your value, and these constants belong to a dynamically
; loaded extension (either a PHP extension or a Zend extension), you may only
; use these constants *after* the line that loads the extension.
;
; All the values in the php.ini-dist file correspond to the builtin
; defaults (that is, if no php.ini is used, or if you delete these lines,
; the builtin defaults will be identical).



; Language Options ;


engine  =   On  ; Enable the PHP scripting language engine 
under Apache
short_open_tag  =   On  ; allow the  tags are recognized.
asp_tags=   Off ; allow ASP-style <% %> tags
precision   =   14  ; number of significant digits displayed in 
floating point numbers
y2k_compliance  =   Off ; whether to be year 2000 compliant (will cause 
problems with non y2k compliant browsers)
output_buffering= Off   ; Output buffering allows you to send header lines 
(including cookies)
; even after you send body 
content, in the price of slowing PHP's
; output layer a bit.
; You can enable output 
buffering by in runtime by calling the output
; buffering functions, or 
enable output buffering for all files
; by setting this directive to 
On.
implicit_flush  = Off   ; Implicit 

[PHP-DEV] PHP 4.0 Bug #8732 Updated: execution function return always -1

2001-01-21 Thread cynic

ID: 8732
Updated by: cynic
Reported By: [EMAIL PROTECTED]
Status: Open
Old-Bug Type: Unknown/Other Function
Bug Type: Program Execution
Assigned To: 
Comments:

reclassifying

Previous Comments:
---

[2001-01-16 04:51:47] [EMAIL PROTECTED]
I trie to get the result code of exec, system or passthru function but i always get -1 
under linux. version of php: 4.0.3pl1 et 4.0.4pl1



I trie under winnt 4 sp6/apache 1.3.14 and it's works fine 

 

---


Full Bug description available at: http://bugs.php.net/?id=8732


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




[PHP-DEV] PHP 4.0 Bug #5350 Updated: call_function("function_name", array args); ala execv()

2001-01-21 Thread cynic

ID: 5350
Updated by: cynic
Reported By: [EMAIL PROTECTED]
Old-Status: Analyzed
Status: Closed
Bug Type: Feature/Change Request
Assigned To: 
Comments:

call_user_func_array()

Previous Comments:
---

[2000-08-15 10:45:19] [EMAIL PROTECTED]
that possibly makes sense, you´ve currently no option but using eval() to transorm 
passed array args to an argument list...

---

[2000-07-04 15:02:07] [EMAIL PROTECTED]
I am looking to use this with existing PHP functions, not user space ones.
Specifically I would like to use this with ibase_execute() for the bindings.
I am writting a little database wrapper and I need to be able to do...
$res=DB("select * from Foo where bar=?", $reallygeeky);
and that arg list is of variable length so I want to be able to do my custom stuff in 
DB() then toss the args in an array and call ibase_execute.
I have it working as it is, but it is ugly.  Right now I am building up eval() code 
and having it return the resource into a global var.  Its ugly :)
Would be much easier if I could just build up an array and call 
call_function("ibase_execute", $theargs);

---

[2000-07-04 10:36:23] [EMAIL PROTECTED]
What prevents you from doing:
$func(array("foo", "bar", "geek")) and opening that array in function?

---

[2000-07-04 04:53:47] [EMAIL PROTECTED]
$args=array("foo", "bar", "geek");
call_function("f", $args);

function f($f1, $f2, $f3) {
echo "$f1 $f2 $f3";
}

Output: foo bar geek

---


Full Bug description available at: http://bugs.php.net/?id=5350


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




[PHP-DEV] PHP 4.0 Bug #7869 Updated: parse_str produces no trapable value

2001-01-21 Thread cynic

ID: 7869
Updated by: cynic
Reported By: [EMAIL PROTECTED]
Status: Open
Bug Type: Feature/Change Request
Assigned To: 
Comments:

have parse_str return would be certainly good; as a workaround you can use 

parse_str( $s , $a ) ;
if( 0 == count( $a ) ) {
   # problem
   ...

Previous Comments:
---

[2000-11-17 22:05:57] [EMAIL PROTECTED]
 

I would submit that to maintain the elegant conventions of PHP, it would be good to 
return 
A) The number of variables parsed (I'll leave in your court how to handle counting the 
# of array variables parsed) 

or 

B) false if the string was null, corrupt or "un-parsable". 

Currently, the only way to evaluate the success of this function is to know the last 
variable that is/should be in the input stream and check to see that THAT variable 
exists after running this function = less than optimum. 

Thanks!

-Ben 

---


Full Bug description available at: http://bugs.php.net/?id=7869


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




[PHP-DEV] PHP 4.0 Bug #7360 Updated: is_a2z would be nice...

2001-01-21 Thread cynic

ID: 7360
Updated by: cynic
Reported By: [EMAIL PROTECTED]
Old-Status: Feedback
Status: Closed
Bug Type: Feature/Change Request
Assigned To: 
Comments:

ctype functions are now implemented

Previous Comments:
---

[2000-10-20 05:59:15] [EMAIL PROTECTED]
what about implementing the ctype.h family of functions
available in C and stick with their namespace ?

  isalnum,  isalpha,  isascii,  isblank,  iscntrl,  isdigit,
   isgraph,  islower,  isprint,  ispunct,  isspace,  isupper,
   isxdigit

---

[2000-10-20 02:24:38] [EMAIL PROTECTED]
A suggestion:

I was thinking that there are some functions that should exist in PHP:

1: if(eregi("[A-Z]", $string)) this could be called something like is_a2z (any name is 
OK, I just though about nl2br). Instead of using RegEx which is real slow when you 
have to check strings several times in a script a simple function like this would be 
of a BIG HELP. (I know of is_numeric(), but it's use will not make you sure that the 
string is esclusivelly alphabetic). A build-in function to detect whether a $string is 
entirelly made from a-z avoiding so regular expression use is really needed, I think.

2: Another thing (Less important) is that instead of using (ereg("[:alnum:]", 
$string)) you could just say if(!is_almun($string)), just to make (ereg("[:alnum:]", 
$string)) be a little lighter and easier for beginners. (few beginners use [:almun:], 
they usually get into writing some huge long expressions,) this would impress them a 
lot.

Thanks for your patience,
Maxim Maletsky

---


Full Bug description available at: http://bugs.php.net/?id=7360


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




[PHP-DEV] PHP 4.0 Bug #7267 Updated: Add an array function...

2001-01-21 Thread cynic

ID: 7267
Updated by: cynic
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Closed
Bug Type: Feature/Change Request
Assigned To: 
Comments:

use array_values():

$a = array( 'bla' , 3 => 1 , 5 => 3 );
print_r( array_values( $a ) ) ;

Array
(
[0] => bla
[1] => 1
[2] => 3
)



Previous Comments:
---

[2000-10-17 00:24:49] [EMAIL PROTECTED]
Hi...
A suggestion...
You should add a function that re-indexes an array, for example...
If I have:
$array = array("one","two","three",1,4,3);
and then I delete one three and 4 then i'll have this left in the array:
$array[1] = two
$array[3] = 1
$array[5] = 3
so if you do a reindexing funct let's say array_reindex() used like this:
array_reindex($array);
then the array will be converted to this:
$array[0] = two
$array[1] = 1
$array[2] = 3
so it reindexes the whole thing because if I use any kind of sort function then it 
will lose the arrays order and make it 1,3,two instead of two,1,3 or if you know any 
way that I can reindex an array, please let me know or give me some sample code please
thanks a lot

---

[2000-10-17 00:20:50] [EMAIL PROTECTED]
Hi...
A suggestion...
You should add a function that re-indexes an array, for example...
If I have:
$array = array("one","two","three",3,4,1);
and then I delete one three and 4 then i'll have this left in the array:
$array[1] = two
$array[3] = 3
$array[5] = 1
so if you do a reindexing funct let's say array_reindex() used like this:
array_reindex($array);
then the array will be converted to this:
$array[0] = two
$array[1] = 3
$array[2] = 1
so it reindexes the whole thing because if I use any kind of sort function then it 
will lose the arrays order and make it 1,3,two instead of two,3,1, or if you know any 
way that I can reindex an array, please let me know or give me some sample code please
thanks a lot

---


Full Bug description available at: http://bugs.php.net/?id=7267


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




[PHP-DEV] PHP 4.0 Bug #6927 Updated:

2001-01-21 Thread cynic

ID: 6927
Updated by: cynic
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Suspended
Bug Type: Feature/Change Request
Assigned To: 
Comments:

you can turn assertions on/off using assert_options() / .ini settings

Personally, I would kill for macros, but I don't think we'll see them in PHP in close 
future.

Previous Comments:
---

[2000-09-28 22:17:41] [EMAIL PROTECTED]
make the define able to replace the function names, ie.

#if debug
#define assert(a) (doAssert(a))
#else
#define assert(a)
#endif

This way, when code is released, the functions that aid in debugging the application 
never get called.

---


Full Bug description available at: http://bugs.php.net/?id=6927


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




[PHP-DEV] PHP 4.0 Bug #6046 Updated: preg_replace for a special pattern

2001-01-21 Thread cynic

ID: 6046
Updated by: cynic
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Closed
Bug Type: Feature/Change Request
Assigned To: 
Comments:

use non-capturing patterns.

Previous Comments:
---

[2000-08-09 07:41:24] [EMAIL PROTECTED]
hiya

if you have a regex that captures more than one pattern i'd to give a argument to the 
function which to replace

say:
regex: (a)(b)(a)
replace: test

preg_replace("'(a)(b)(a)'", "test", "abaabaaba");
normal preg_replace will replace 'aba' with 'test' outputing: testtesttest

preg_replace_pattern_no("'(a)(b)(a)'", "test", "abaabaaba", 2);
replacing pattern 2 and outputting: atestaatestaatesta

Greetz,

Wico

---


Full Bug description available at: http://bugs.php.net/?id=6046


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