#21857 [WFx]: Perl-like delimeter needed

2003-01-24 Thread philip
 ID:   21857
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Wont fix
 Bug Type: Feature/Change Request
 Operating System: Linux 2.4x
 PHP Version:  4.3.0
 New Comment:

Or 'single "quotes"' or <

#21847 [Fbk->Opn]: php core dumps whilst retrieving images from url

2003-01-24 Thread steveh
 ID:   21847
 User updated by:  [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Feedback
+Status:   Open
 Bug Type: Reproducible crash
 Operating System: linux-2.4.20
 PHP Version:  4.3.0
 New Comment:

This is the URL for the file, I will try switching off the optimiser
and run again.

http://www.draper.co.uk/files/United%20Kingdom2002.txt


Previous Comments:


[2003-01-23 19:18:36] [EMAIL PROTECTED]

Could you please provide the draper.txt so that the bug can be
replicated. As is I cannot replicate the crash, merely get an error
opening the specified image URL.
Also, does the crash occur if you disable ZendOptimizer?



[2003-01-23 13:02:30] [EMAIL PROTECTED]

When running the following code php core dumps.

http://www.drapertools.com/draper/images/details/".trim($fields[1])."_".trim($fields[2]).".jpg";

   
$outfile="draper_images/draper_".trim($fields[1])."_".trim($fields[2]).".jpg";
print("opening $url\n");
ob_flush();
if($urlfp=fopen($url,"rb"))
{
print("Outputing to $outfile\n");
if($imagefp=fopen($outfile,"wb"))
{
print($url." -> ".$outfile."\n");
ob_flush();
fputs($good,$url." -> ".$outfile."\n");
$size=0;
while(!feof($urlfp))
{
$block=fread($urlfp,4096);
fputs($imagefp,$block);
$size+=4096;
print($url." -> ".$outfile." :
$size\n");
};
fclose($imagefp);
};
fclose($urlfp);
}
else
{
fputs($bad,$url."\n");
};
};
fclose($fp);
fclose($good);
fclose($bad);
?>

The input file is a comma delimited list, we are interested in the
filename which we then retrieve from the site (you can find the names
by going to the site or by downloading the text file from the site).

Just recompiled with debug, here is the backtrace:
#0  0x08153650 in php_hostconnect (host=0x82ef62c
"www.drapertools.com", port=80, socktype=1, timeout=0x0)
at /usr/src/php-4.3.0/main/network.c:435
#1  0x08153900 in _php_stream_sock_open_host (host=0x82ef62c
"www.drapertools.com", port=80, socktype=1, timeout=0x0, 
persistent_id=0x0) at /usr/src/php-4.3.0/main/network.c:619
#2  0x0811a497 in php_stream_url_wrap_http (wrapper=0x82491f0, 
path=0x82ed5c4
"http://www.drapertools.com/draper/images/details/002_770-SA.jpg";,
mode=0x82e97cc "rb", options=4, 
opened_path=0x0, context=0x0) at
/usr/src/php-4.3.0/ext/standard/http_fopen_wrapper.c:121
#3  0x08152d2c in _php_stream_open_wrapper_ex (path=0x82ed5c4
"http://www.drapertools.com/draper/images/details/002_770-SA.jpg";, 
mode=0x82e97cc "rb", options=12, opened_path=0x0, context=0x0) at
/usr/src/php-4.3.0/main/streams.c:2378
#4  0x080e915a in php_if_fopen (ht=2, return_value=0x82ee5ac,
this_ptr=0x0, return_value_used=1)
at /usr/src/php-4.3.0/ext/standard/file.c:1094
#5  0x404f78f0 in zend_oe () from /usr/local/Zend/lib/ZendOptimizer.so
#6  0x404f43a0 in zend_oe () from /usr/local/Zend/lib/ZendOptimizer.so
#7  0x0816f14c in zend_execute_scripts (type=8, retval=0x0,
file_count=3) at /usr/src/php-4.3.0/Zend/zend.c:864
#8  0x08148909 in php_execute_script (primary_file=0xbb40) at
/usr/src/php-4.3.0/main/main.c:1573
#9  0x08190f48 in main (argc=2, argv=0xbbe4) at
/usr/src/php-4.3.0/sapi/cli/php_cli.c:746
#10 0x40342657 in __libc_start_main (main=0x81905c8 , argc=2,
ubp_av=0xbbe4, init=0x806fe60 <_init>, 
fini=0x8196790 <_fini>, rtld_fini=0x4000dcd4 <_dl_fini>,
stack_end=0xbbdc) at ../sysdeps/generic/libc-start.c:129





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




#20857 [Com]: snmpset does not work

2003-01-24 Thread jirapat
 ID:   20857
 Comment by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Open
 Bug Type: SNMP related
 Operating System: Linux RH 7.3
 PHP Version:  4.3.0RC2
 New Comment:

on WinNT4, W2K
snmpset function said "Couldn't add variable" when I try to use it with
version 4.3.0.
But if I use same script with php version 4.2.3 it's work fine in same
environment.
I've found this error on CVS version both 4.3.x and 5.x too.
I tried to copy php_snmp.dll from version 4.2.3 to replace version
4.3.0 script is work again.
So I think this must come from snmp extension from 4.3.0 up.

PS there is no problem with snmpget and snmpwalk


Previous Comments:


[2003-01-09 08:18:32] [EMAIL PROTECTED]

This problem still exists for the php 4.3.0 release.  I am also using
net-snmp 5.0.6

The patch posted by [EMAIL PROTECTED] fixed the problem.  I updated the
offsets in his patch for the 4.3.0 sources.

The updated patch can be found at:
http://www.deinon.com/php/php-4.3.0-snmpset.patch



[2002-12-07 04:35:59] [EMAIL PROTECTED]

I tried this patch in diff -u format. Note that there is also a change
in the php_error_docref-string, becaue the output was not very
informative. Of course, I would prefer, that a php-snmp maintainer
would have a look at it.

--- snmp.c.orig Mon Nov 11 22:37:18 2002
+++ snmp.c  Sat Dec  7 11:23:24 2002
@@ -197,7 +197,7 @@
 static void php_snmp_internal(INTERNAL_FUNCTION_PARAMETERS,
int st,
struct snmp_session *session,
-   char *objid) 
+   char *objid, char type, char* value) 
 {
struct snmp_session *ss;
struct snmp_pdu *pdu=NULL, *response;
@@ -211,8 +211,6 @@
char buf[2048];
char buf2[2048];
int keepwalking=1;
-   char type = (char) 0;
-   char *value = (char *) 0;
char *err;
 
if (st >= 2) { /* walk */
@@ -267,7 +265,12 @@
} else if (st == 11) {
pdu = snmp_pdu_create(SNMP_MSG_SET);
if (snmp_add_var(pdu, name, name_length, type, value)) {
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, "Could not 
add
variable: %s", name);
+#ifdef HAVE_NET_SNMP
+   snprint_objid(buf, sizeof(buf), name, name_length);
+#else
+   sprint_objid(buf, name, name_length);
+#endif
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, "Could not 
+add
variable: %s %c %s", buf, type, value);
snmp_close(ss);
RETURN_FALSE;
}
@@ -466,7 +469,7 @@

session.authenticator = NULL;
 
-   php_snmp_internal(INTERNAL_FUNCTION_PARAM_PASSTHRU, st, &session,
Z_STRVAL_PP(a3));
+   php_snmp_internal(INTERNAL_FUNCTION_PARAM_PASSTHRU, st, &session,
Z_STRVAL_PP(a3), type, value);
 }
 /* }}} */
 
@@ -849,7 +852,7 @@
session.retries = retries;
session.timeout = timeout;
 
-   php_snmp_internal(INTERNAL_FUNCTION_PARAM_PASSTHRU, st, &session,
Z_STRVAL_PP(a8));
+   php_snmp_internal(INTERNAL_FUNCTION_PARAM_PASSTHRU, st, &session,
Z_STRVAL_PP(a8), type, value);
 }
 /* }}} */



[2002-12-06 18:37:58] [EMAIL PROTECTED]

Do you have a patch for this?




[2002-12-06 08:12:46] [EMAIL PROTECTED]

I use php-4.3.0RC2 with net-snmp-5.0.6. It works so far, but snmpset()
always shows a warning "Could not add variable: " and the variable is
not set.
I found out, that there is a bug in ext/snmp.c. Here, type and value of
the varible are not passed to php_snmp_internal(), so these variables
are always 0 and snmp_add_var() fails. So, as a solution, php_snmp and
php_snmpv3 should pass type and value to php_snmp_internal ant
everything is ok.





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




#21851 [Opn]: bizarre!: status replaced with foo1 or nothing

2003-01-24 Thread derick
 ID:   21851
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Open
 Bug Type: Scripting Engine problem
 Operating System: debian linux
 PHP Version:  4.3.0
 New Comment:

Looks fine here:



Derick


Previous Comments:


[2003-01-23 19:24:13] [EMAIL PROTECTED]

OMG! It just did it to this post! Am I missing something or just dumb?

I wrote
 tags!

snippets from my page

html 

>All

output via view source in IE 

All

php


relevant php output 
 ... and cat_id = 8 and foo1 = 'pending'

I have never seen anything like this before.  It's replacing words
outside of the php, too. Furthermore, I've used status in parts of the
same page in other sql statements (albeit for different tables), and
they were not replaced. Insight would be greatly appreciated!





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




#21847 [Opn]: php core dumps whilst retrieving images from url

2003-01-24 Thread steveh
 ID:   21847
 User updated by:  [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Open
 Bug Type: Reproducible crash
 Operating System: linux-2.4.20
 PHP Version:  4.3.0
 New Comment:

Still crashes with optmiser disabled but no core dump now, last string
printed is corrupt.


Previous Comments:


[2003-01-24 02:28:50] [EMAIL PROTECTED]

This is the URL for the file, I will try switching off the optimiser
and run again.

http://www.draper.co.uk/files/United%20Kingdom2002.txt



[2003-01-23 19:18:36] [EMAIL PROTECTED]

Could you please provide the draper.txt so that the bug can be
replicated. As is I cannot replicate the crash, merely get an error
opening the specified image URL.
Also, does the crash occur if you disable ZendOptimizer?



[2003-01-23 13:02:30] [EMAIL PROTECTED]

When running the following code php core dumps.

http://www.drapertools.com/draper/images/details/".trim($fields[1])."_".trim($fields[2]).".jpg";

   
$outfile="draper_images/draper_".trim($fields[1])."_".trim($fields[2]).".jpg";
print("opening $url\n");
ob_flush();
if($urlfp=fopen($url,"rb"))
{
print("Outputing to $outfile\n");
if($imagefp=fopen($outfile,"wb"))
{
print($url." -> ".$outfile."\n");
ob_flush();
fputs($good,$url." -> ".$outfile."\n");
$size=0;
while(!feof($urlfp))
{
$block=fread($urlfp,4096);
fputs($imagefp,$block);
$size+=4096;
print($url." -> ".$outfile." :
$size\n");
};
fclose($imagefp);
};
fclose($urlfp);
}
else
{
fputs($bad,$url."\n");
};
};
fclose($fp);
fclose($good);
fclose($bad);
?>

The input file is a comma delimited list, we are interested in the
filename which we then retrieve from the site (you can find the names
by going to the site or by downloading the text file from the site).

Just recompiled with debug, here is the backtrace:
#0  0x08153650 in php_hostconnect (host=0x82ef62c
"www.drapertools.com", port=80, socktype=1, timeout=0x0)
at /usr/src/php-4.3.0/main/network.c:435
#1  0x08153900 in _php_stream_sock_open_host (host=0x82ef62c
"www.drapertools.com", port=80, socktype=1, timeout=0x0, 
persistent_id=0x0) at /usr/src/php-4.3.0/main/network.c:619
#2  0x0811a497 in php_stream_url_wrap_http (wrapper=0x82491f0, 
path=0x82ed5c4
"http://www.drapertools.com/draper/images/details/002_770-SA.jpg";,
mode=0x82e97cc "rb", options=4, 
opened_path=0x0, context=0x0) at
/usr/src/php-4.3.0/ext/standard/http_fopen_wrapper.c:121
#3  0x08152d2c in _php_stream_open_wrapper_ex (path=0x82ed5c4
"http://www.drapertools.com/draper/images/details/002_770-SA.jpg";, 
mode=0x82e97cc "rb", options=12, opened_path=0x0, context=0x0) at
/usr/src/php-4.3.0/main/streams.c:2378
#4  0x080e915a in php_if_fopen (ht=2, return_value=0x82ee5ac,
this_ptr=0x0, return_value_used=1)
at /usr/src/php-4.3.0/ext/standard/file.c:1094
#5  0x404f78f0 in zend_oe () from /usr/local/Zend/lib/ZendOptimizer.so
#6  0x404f43a0 in zend_oe () from /usr/local/Zend/lib/ZendOptimizer.so
#7  0x0816f14c in zend_execute_scripts (type=8, retval=0x0,
file_count=3) at /usr/src/php-4.3.0/Zend/zend.c:864
#8  0x08148909 in php_execute_script (primary_file=0xbb40) at
/usr/src/php-4.3.0/main/main.c:1573
#9  0x08190f48 in main (argc=2, argv=0xbbe4) at
/usr/src/php-4.3.0/sapi/cli/php_cli.c:746
#10 0x40342657 in __libc_start_main (main=0x81905c8 , argc=2,
ubp_av=0xbbe4, init=0x806fe60 <_init>, 
fini=0x8196790 <_fini>, rtld_fini=0x4000dcd4 <_dl_fini>,
stack_end=0xbbdc) at ../sysdeps/generic/libc-start.c:129





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




#21858 [NEW]: apache uses %100 prosessor

2003-01-24 Thread mattsoft
From: [EMAIL PROTECTED]
Operating system: win2k pro
PHP version:  4.3.0
PHP Bug Type: Apache2 related
Bug description:  apache uses %100 prosessor

I've been using php 4.1.1 ever sence it came out. I just upgraded to 4.3.0.
phpmyadmin works fine with it, but when I try viewing a web page I made,
it doesn't load it. it just keeps trying to load forever. it makes apache
use 100% of my prosessor, until I hit the stop button on ie.
-- 
Edit bug report at http://bugs.php.net/?id=21858&edit=1
-- 
Try a CVS snapshot: http://bugs.php.net/fix.php?id=21858&r=trysnapshot
Fixed in CVS:   http://bugs.php.net/fix.php?id=21858&r=fixedcvs
Fixed in release:   http://bugs.php.net/fix.php?id=21858&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=21858&r=needtrace
Try newer version:  http://bugs.php.net/fix.php?id=21858&r=oldversion
Not developer issue:http://bugs.php.net/fix.php?id=21858&r=support
Expected behavior:  http://bugs.php.net/fix.php?id=21858&r=notwrong
Not enough info:http://bugs.php.net/fix.php?id=21858&r=notenoughinfo
Submitted twice:http://bugs.php.net/fix.php?id=21858&r=submittedtwice
register_globals:   http://bugs.php.net/fix.php?id=21858&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=21858&r=php3
Daylight Savings:   http://bugs.php.net/fix.php?id=21858&r=dst
IIS Stability:  http://bugs.php.net/fix.php?id=21858&r=isapi
Install GNU Sed:http://bugs.php.net/fix.php?id=21858&r=gnused




#21851 [Opn]: bizarre!: status replaced with foo1 or nothing

2003-01-24 Thread keith
 ID:   21851
 User updated by:  [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Open
 Bug Type: Scripting Engine problem
 Operating System: debian linux
 PHP Version:  4.3.0
 New Comment:

update ...
ok this may not be a php problem afterall ... although i can reproduce
it on every windows machine i've tried but on every lynx and conquerer
it comes out as expected ... the mystery continues 

additional note ... i've tried with both netscape and ie on xp and 98
problem persists from 4 different computers (2 at the office 2 at home)


Previous Comments:


[2003-01-24 03:06:41] [EMAIL PROTECTED]

Looks fine here:



Derick



[2003-01-23 19:24:13] [EMAIL PROTECTED]

OMG! It just did it to this post! Am I missing something or just dumb?

I wrote
 tags!

snippets from my page

html 

>All

output via view source in IE 

All

php


relevant php output 
 ... and cat_id = 8 and foo1 = 'pending'

I have never seen anything like this before.  It's replacing words
outside of the php, too. Furthermore, I've used status in parts of the
same page in other sql statements (albeit for different tables), and
they were not replaced. Insight would be greatly appreciated!





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




#21858 [Opn->Fbk]: apache uses %100 prosessor

2003-01-24 Thread derick
 ID:   21858
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Feedback
 Bug Type: Apache2 related
 Operating System: win2k pro
 PHP Version:  4.3.0
 New Comment:

Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.



Previous Comments:


[2003-01-24 03:17:42] [EMAIL PROTECTED]

I've been using php 4.1.1 ever sence it came out. I just upgraded to
4.3.0. phpmyadmin works fine with it, but when I try viewing a web page
I made, it doesn't load it. it just keeps trying to load forever. it
makes apache use 100% of my prosessor, until I hit the stop button on
ie.




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




#21851 [Opn]: bizarre!: status replaced with foo1 or nothing

2003-01-24 Thread keith
 ID:   21851
 User updated by:  [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Open
 Bug Type: Scripting Engine problem
 Operating System: debian linux
 PHP Version:  4.3.0
 New Comment:

derick in your email that i received when you posted i could see

using squirrelmail ... a php imap client 

BUT browsing this thread online (same computer and same browser as the
imap client, XP home and IE respectively) ... no "s t a t u s"!

anyone browsing this thread on a mac using IE perchance?


Previous Comments:


[2003-01-24 03:19:32] [EMAIL PROTECTED]

update ...
ok this may not be a php problem afterall ... although i can reproduce
it on every windows machine i've tried but on every lynx and conquerer
it comes out as expected ... the mystery continues 

additional note ... i've tried with both netscape and ie on xp and 98
problem persists from 4 different computers (2 at the office 2 at home)



[2003-01-24 03:06:41] [EMAIL PROTECTED]

Looks fine here:



Derick



[2003-01-23 19:24:13] [EMAIL PROTECTED]

OMG! It just did it to this post! Am I missing something or just dumb?

I wrote
 tags!

snippets from my page

html 

>All

output via view source in IE 

All

php


relevant php output 
 ... and cat_id = 8 and foo1 = 'pending'

I have never seen anything like this before.  It's replacing words
outside of the php, too. Furthermore, I've used status in parts of the
same page in other sql statements (albeit for different tables), and
they were not replaced. Insight would be greatly appreciated!





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




#21851 [Opn->Fbk]: bizarre!: status replaced with foo1 or nothing

2003-01-24 Thread sniper
 ID:   21851
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Feedback
 Bug Type: Scripting Engine problem
 Operating System: debian linux
 PHP Version:  4.3.0
 New Comment:

Try changing your error_reporting to E_ALL and you'll
see the problem.

And what use is it to have empty name for select tag?



Previous Comments:


[2003-01-24 03:26:50] [EMAIL PROTECTED]

derick in your email that i received when you posted i could see

using squirrelmail ... a php imap client 

BUT browsing this thread online (same computer and same browser as the
imap client, XP home and IE respectively) ... no "s t a t u s"!

anyone browsing this thread on a mac using IE perchance?



[2003-01-24 03:19:32] [EMAIL PROTECTED]

update ...
ok this may not be a php problem afterall ... although i can reproduce
it on every windows machine i've tried but on every lynx and conquerer
it comes out as expected ... the mystery continues 

additional note ... i've tried with both netscape and ie on xp and 98
problem persists from 4 different computers (2 at the office 2 at home)



[2003-01-24 03:06:41] [EMAIL PROTECTED]

Looks fine here:



Derick



[2003-01-23 19:24:13] [EMAIL PROTECTED]

OMG! It just did it to this post! Am I missing something or just dumb?

I wrote
 tags!

snippets from my page

html 

>All

output via view source in IE 

All

php


relevant php output 
 ... and cat_id = 8 and foo1 = 'pending'

I have never seen anything like this before.  It's replacing words
outside of the php, too. Furthermore, I've used status in parts of the
same page in other sql statements (albeit for different tables), and
they were not replaced. Insight would be greatly appreciated!





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




#20857 [Opn->Csd]: snmpset does not work

2003-01-24 Thread sniper
 ID:   20857
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Closed
 Bug Type: SNMP related
 Operating System: Linux RH 7.3
 PHP Version:  4.3.0RC2
 New Comment:

This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.


Patch applied, thanks!



Previous Comments:


[2003-01-24 02:36:15] [EMAIL PROTECTED]

on WinNT4, W2K
snmpset function said "Couldn't add variable" when I try to use it with
version 4.3.0.
But if I use same script with php version 4.2.3 it's work fine in same
environment.
I've found this error on CVS version both 4.3.x and 5.x too.
I tried to copy php_snmp.dll from version 4.2.3 to replace version
4.3.0 script is work again.
So I think this must come from snmp extension from 4.3.0 up.

PS there is no problem with snmpget and snmpwalk



[2003-01-09 08:18:32] [EMAIL PROTECTED]

This problem still exists for the php 4.3.0 release.  I am also using
net-snmp 5.0.6

The patch posted by [EMAIL PROTECTED] fixed the problem.  I updated the
offsets in his patch for the 4.3.0 sources.

The updated patch can be found at:
http://www.deinon.com/php/php-4.3.0-snmpset.patch



[2002-12-07 04:35:59] [EMAIL PROTECTED]

I tried this patch in diff -u format. Note that there is also a change
in the php_error_docref-string, becaue the output was not very
informative. Of course, I would prefer, that a php-snmp maintainer
would have a look at it.

--- snmp.c.orig Mon Nov 11 22:37:18 2002
+++ snmp.c  Sat Dec  7 11:23:24 2002
@@ -197,7 +197,7 @@
 static void php_snmp_internal(INTERNAL_FUNCTION_PARAMETERS,
int st,
struct snmp_session *session,
-   char *objid) 
+   char *objid, char type, char* value) 
 {
struct snmp_session *ss;
struct snmp_pdu *pdu=NULL, *response;
@@ -211,8 +211,6 @@
char buf[2048];
char buf2[2048];
int keepwalking=1;
-   char type = (char) 0;
-   char *value = (char *) 0;
char *err;
 
if (st >= 2) { /* walk */
@@ -267,7 +265,12 @@
} else if (st == 11) {
pdu = snmp_pdu_create(SNMP_MSG_SET);
if (snmp_add_var(pdu, name, name_length, type, value)) {
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, "Could not 
add
variable: %s", name);
+#ifdef HAVE_NET_SNMP
+   snprint_objid(buf, sizeof(buf), name, name_length);
+#else
+   sprint_objid(buf, name, name_length);
+#endif
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, "Could not 
+add
variable: %s %c %s", buf, type, value);
snmp_close(ss);
RETURN_FALSE;
}
@@ -466,7 +469,7 @@

session.authenticator = NULL;
 
-   php_snmp_internal(INTERNAL_FUNCTION_PARAM_PASSTHRU, st, &session,
Z_STRVAL_PP(a3));
+   php_snmp_internal(INTERNAL_FUNCTION_PARAM_PASSTHRU, st, &session,
Z_STRVAL_PP(a3), type, value);
 }
 /* }}} */
 
@@ -849,7 +852,7 @@
session.retries = retries;
session.timeout = timeout;
 
-   php_snmp_internal(INTERNAL_FUNCTION_PARAM_PASSTHRU, st, &session,
Z_STRVAL_PP(a8));
+   php_snmp_internal(INTERNAL_FUNCTION_PARAM_PASSTHRU, st, &session,
Z_STRVAL_PP(a8), type, value);
 }
 /* }}} */



[2002-12-06 18:37:58] [EMAIL PROTECTED]

Do you have a patch for this?




[2002-12-06 08:12:46] [EMAIL PROTECTED]

I use php-4.3.0RC2 with net-snmp-5.0.6. It works so far, but snmpset()
always shows a warning "Could not add variable: " and the variable is
not set.
I found out, that there is a bug in ext/snmp.c. Here, type and value of
the varible are not passed to php_snmp_internal(), so these variables
are always 0 and snmp_add_var() fails. So, as a solution, php_snmp and
php_snmpv3 should pass type and value to php_snmp_internal ant
everything is ok.





-- 
Edit this bug report at http://bugs.php.net/?id=20857&edi

#21859 [NEW]: php cant compile/make

2003-01-24 Thread sc2
From: [EMAIL PROTECTED]
Operating system: RedHat 7
PHP version:  4.3.0
PHP Bug Type: *Compile Issues
Bug description:  php cant compile/make

when i try to make "make" with php 4.3 then this comes..
on older versions there no problems with compiling / make


In file included from /usr/src/php-4.3.0/Zend/zend.h:59,
 from /usr/src/php-4.3.0/main/php.h:34,
 from /usr/src/php-4.3.0/ext/ctype/ctype.c:23:
/usr/local/include/unix.h:182: parse error before `MAILSTREAM'
/usr/local/include/unix.h:182: warning: no semicolon at end of struct or
union
/usr/local/include/unix.h:189: parse error before `}'
/usr/local/include/unix.h:189: warning: data definition has no type or
storage class
/usr/local/include/unix.h:193: parse error before `*'
/usr/local/include/unix.h:193: warning: data definition has no type or
storage class
/usr/local/include/unix.h:196: parse error before `*'
/usr/local/include/unix.h:197: parse error before `*'
/usr/local/include/unix.h:198: parse error before `*'
/usr/local/include/unix.h:199: parse error before `*'
/usr/local/include/unix.h:200: parse error before `*'
/usr/local/include/unix.h:201: parse error before `*'
/usr/local/include/unix.h:202: parse error before `*'
/usr/local/include/unix.h:202: parse error before `*'
/usr/local/include/unix.h:202: warning: data definition has no type or
storage class
/usr/local/include/unix.h:203: parse error before `*'
/usr/local/include/unix.h:204: parse error before `*'
/usr/local/include/unix.h:206: parse error before `*'
much more of the warnings then
.
.
.
make: *** [ext/ctype/ctype.lo] Error 1


-- 
Edit bug report at http://bugs.php.net/?id=21859&edit=1
-- 
Try a CVS snapshot: http://bugs.php.net/fix.php?id=21859&r=trysnapshot
Fixed in CVS:   http://bugs.php.net/fix.php?id=21859&r=fixedcvs
Fixed in release:   http://bugs.php.net/fix.php?id=21859&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=21859&r=needtrace
Try newer version:  http://bugs.php.net/fix.php?id=21859&r=oldversion
Not developer issue:http://bugs.php.net/fix.php?id=21859&r=support
Expected behavior:  http://bugs.php.net/fix.php?id=21859&r=notwrong
Not enough info:http://bugs.php.net/fix.php?id=21859&r=notenoughinfo
Submitted twice:http://bugs.php.net/fix.php?id=21859&r=submittedtwice
register_globals:   http://bugs.php.net/fix.php?id=21859&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=21859&r=php3
Daylight Savings:   http://bugs.php.net/fix.php?id=21859&r=dst
IIS Stability:  http://bugs.php.net/fix.php?id=21859&r=isapi
Install GNU Sed:http://bugs.php.net/fix.php?id=21859&r=gnused




#21859 [Opn->Fbk]: php cant compile/make

2003-01-24 Thread sniper
 ID:   21859
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Feedback
-Bug Type: *Compile Issues
+Bug Type: Compile Failure
 Operating System: RedHat 7
 PHP Version:  4.3.0
 New Comment:

What was the configure line you used?

Also, check if you have more of them in your system:

# find /usr/include -name unix.h

This is caused by wrong install of c-client libs/headers,
you don't need unix.h there..check this manual page:

  http://www.php.net/manual/en/ref.imap.php




Previous Comments:


[2003-01-24 04:43:05] [EMAIL PROTECTED]

when i try to make "make" with php 4.3 then this comes..
on older versions there no problems with compiling / make


In file included from /usr/src/php-4.3.0/Zend/zend.h:59,
 from /usr/src/php-4.3.0/main/php.h:34,
 from /usr/src/php-4.3.0/ext/ctype/ctype.c:23:
/usr/local/include/unix.h:182: parse error before `MAILSTREAM'
/usr/local/include/unix.h:182: warning: no semicolon at end of struct
or union
/usr/local/include/unix.h:189: parse error before `}'
/usr/local/include/unix.h:189: warning: data definition has no type or
storage class
/usr/local/include/unix.h:193: parse error before `*'
/usr/local/include/unix.h:193: warning: data definition has no type or
storage class
/usr/local/include/unix.h:196: parse error before `*'
/usr/local/include/unix.h:197: parse error before `*'
/usr/local/include/unix.h:198: parse error before `*'
/usr/local/include/unix.h:199: parse error before `*'
/usr/local/include/unix.h:200: parse error before `*'
/usr/local/include/unix.h:201: parse error before `*'
/usr/local/include/unix.h:202: parse error before `*'
/usr/local/include/unix.h:202: parse error before `*'
/usr/local/include/unix.h:202: warning: data definition has no type or
storage class
/usr/local/include/unix.h:203: parse error before `*'
/usr/local/include/unix.h:204: parse error before `*'
/usr/local/include/unix.h:206: parse error before `*'
much more of the warnings then
.
.
.
make: *** [ext/ctype/ctype.lo] Error 1






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




#21860 [NEW]: $_SERVER['HTTP_REFERER']

2003-01-24 Thread renato
From: [EMAIL PROTECTED]
Operating system: Windows 2000 Server
PHP version:  4.3.0
PHP Bug Type: Variables related
Bug description:  $_SERVER['HTTP_REFERER']

I try different way to read the referer :







but in any case I never had a result.

I try with php configured as CGI and as ISAPI.



-- 
Edit bug report at http://bugs.php.net/?id=21860&edit=1
-- 
Try a CVS snapshot: http://bugs.php.net/fix.php?id=21860&r=trysnapshot
Fixed in CVS:   http://bugs.php.net/fix.php?id=21860&r=fixedcvs
Fixed in release:   http://bugs.php.net/fix.php?id=21860&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=21860&r=needtrace
Try newer version:  http://bugs.php.net/fix.php?id=21860&r=oldversion
Not developer issue:http://bugs.php.net/fix.php?id=21860&r=support
Expected behavior:  http://bugs.php.net/fix.php?id=21860&r=notwrong
Not enough info:http://bugs.php.net/fix.php?id=21860&r=notenoughinfo
Submitted twice:http://bugs.php.net/fix.php?id=21860&r=submittedtwice
register_globals:   http://bugs.php.net/fix.php?id=21860&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=21860&r=php3
Daylight Savings:   http://bugs.php.net/fix.php?id=21860&r=dst
IIS Stability:  http://bugs.php.net/fix.php?id=21860&r=isapi
Install GNU Sed:http://bugs.php.net/fix.php?id=21860&r=gnused




#21850 [Bgs]: PHP_AUTH_* unavaliable

2003-01-24 Thread xoomz
 ID:   21850
 User updated by:  [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Bogus
 Bug Type: HTTP related
 Operating System: Linux
 PHP Version:  4.3.0
 New Comment:

but don't work with Apache auth method (.htpasswd) because haven't user
auth passwd :)

thank your help


Previous Comments:


[2003-01-23 20:15:05] [EMAIL PROTECTED]

It was decided to disable PHP_AUTH_* variables when safe_mode was
enabled.  You can use REMOTE_USER for the username regardless.  Am
marking this bug as bogus.

http://www.php.net/features.http-auth

p.s. I just tried phpmyadmin in safe mode with http auth and it works
fine.



[2003-01-23 17:46:09] [EMAIL PROTECTED]

Philib disable PHP_AUTH_* on PHP 4.3.x to PHP 5, this is a problem in
many cases, howto phpmyadmin use apache auth basic... :)

Have another solution?




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




#21859 [Fbk->Opn]: php cant compile/make

2003-01-24 Thread sc2
 ID:   21859
 User updated by:  [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Feedback
+Status:   Open
 Bug Type: Compile Failure
 Operating System: RedHat 7
 PHP Version:  4.3.0
 New Comment:

./configure --with-apache=/usr/src/apache_1.3.26 --enable-track-vars
--enable-force-cgi --enable-ftp --enable-dbase --with-pear

i looked (searched) for unix.h but i dont have it in 
/usr/include or other dir


Previous Comments:


[2003-01-24 05:40:30] [EMAIL PROTECTED]

What was the configure line you used?

Also, check if you have more of them in your system:

# find /usr/include -name unix.h

This is caused by wrong install of c-client libs/headers,
you don't need unix.h there..check this manual page:

  http://www.php.net/manual/en/ref.imap.php





[2003-01-24 04:43:05] [EMAIL PROTECTED]

when i try to make "make" with php 4.3 then this comes..
on older versions there no problems with compiling / make


In file included from /usr/src/php-4.3.0/Zend/zend.h:59,
 from /usr/src/php-4.3.0/main/php.h:34,
 from /usr/src/php-4.3.0/ext/ctype/ctype.c:23:
/usr/local/include/unix.h:182: parse error before `MAILSTREAM'
/usr/local/include/unix.h:182: warning: no semicolon at end of struct
or union
/usr/local/include/unix.h:189: parse error before `}'
/usr/local/include/unix.h:189: warning: data definition has no type or
storage class
/usr/local/include/unix.h:193: parse error before `*'
/usr/local/include/unix.h:193: warning: data definition has no type or
storage class
/usr/local/include/unix.h:196: parse error before `*'
/usr/local/include/unix.h:197: parse error before `*'
/usr/local/include/unix.h:198: parse error before `*'
/usr/local/include/unix.h:199: parse error before `*'
/usr/local/include/unix.h:200: parse error before `*'
/usr/local/include/unix.h:201: parse error before `*'
/usr/local/include/unix.h:202: parse error before `*'
/usr/local/include/unix.h:202: parse error before `*'
/usr/local/include/unix.h:202: warning: data definition has no type or
storage class
/usr/local/include/unix.h:203: parse error before `*'
/usr/local/include/unix.h:204: parse error before `*'
/usr/local/include/unix.h:206: parse error before `*'
much more of the warnings then
.
.
.
make: *** [ext/ctype/ctype.lo] Error 1






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




#21803 [Fbk->Opn]: php4ts.dll crash with COM

2003-01-24 Thread cubo23
 ID:   21803
 User updated by:  [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Feedback
+Status:   Open
 Bug Type: COM related
 Operating System: Win Me
 PHP Version:  4.3.0
 New Comment:

hey!
today (24/1/03) i tried the latest stable version, which is 4.3.2dev...
and i still got the same problem. i then installed php4.2.3 and
everything worked fine!
maybe this is a bug that needs to be fixed...
anyway thanx 4 the help
c u


Previous Comments:


[2003-01-22 21:56:56] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip



[2003-01-21 13:13:30] [EMAIL PROTECTED]

hello,
while trying to run a script that opens a msaccess database, i get an
"access violation" error for php4ts.dll and php crashes.
this is the point where the error occurs:
$conn = new COM("ADODB.Connection");
I am using Windows Me, PHP 4.3.0 on an Apache 2.0
can someone please help?
thank u




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




#21861 [NEW]: set_time_limit does not Limit the maximum execution time with safe_mode off

2003-01-24 Thread luc . stroobants
From: [EMAIL PROTECTED]
Operating system: SunOS sirius 5.8 Generic_
PHP version:  4.3.0
PHP Bug Type: *General Issues
Bug description:  set_time_limit does not Limit the maximum execution time with 
safe_mode off

--- problem in php 4.3.0
set_time_limit() does not change the maximum execution time with
safe_mode=off.

When the default maximum execution time (30 seconds in php.ini), the
result HTML page contains no data (NS) and vannot be displayed (IE)


Note: The application is completely written in PHP and does not use
system(). 


--- configure line
'./configure' '--with-apxs=/local/etc/apache/bin/apxs'
'--with-config-file-path=/local/lib/php'
'--with-oci8=/u01/app/product/932' 
-- 
Edit bug report at http://bugs.php.net/?id=21861&edit=1
-- 
Try a CVS snapshot: http://bugs.php.net/fix.php?id=21861&r=trysnapshot
Fixed in CVS:   http://bugs.php.net/fix.php?id=21861&r=fixedcvs
Fixed in release:   http://bugs.php.net/fix.php?id=21861&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=21861&r=needtrace
Try newer version:  http://bugs.php.net/fix.php?id=21861&r=oldversion
Not developer issue:http://bugs.php.net/fix.php?id=21861&r=support
Expected behavior:  http://bugs.php.net/fix.php?id=21861&r=notwrong
Not enough info:http://bugs.php.net/fix.php?id=21861&r=notenoughinfo
Submitted twice:http://bugs.php.net/fix.php?id=21861&r=submittedtwice
register_globals:   http://bugs.php.net/fix.php?id=21861&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=21861&r=php3
Daylight Savings:   http://bugs.php.net/fix.php?id=21861&r=dst
IIS Stability:  http://bugs.php.net/fix.php?id=21861&r=isapi
Install GNU Sed:http://bugs.php.net/fix.php?id=21861&r=gnused




#21861 [Opn]: set_time_limit does not Limit the maximum execution time with safe_mode off

2003-01-24 Thread luc . stroobants
 ID:   21861
 User updated by:  [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Open
 Bug Type: *General Issues
 Operating System: SunOS sirius 5.8 Generic_
 PHP Version:  4.3.0
 New Comment:

--- 
I also try init_set (max_execution_time,1000) for overwriting the
default value. The function returns the previous value but does not
change the timeout problem.


Previous Comments:


[2003-01-24 06:27:34] [EMAIL PROTECTED]

--- problem in php 4.3.0
set_time_limit() does not change the maximum execution time with
safe_mode=off.

When the default maximum execution time (30 seconds in php.ini), the
result HTML page contains no data (NS) and vannot be displayed (IE)


Note: The application is completely written in PHP and does not use
system(). 


--- configure line
'./configure' '--with-apxs=/local/etc/apache/bin/apxs'
'--with-config-file-path=/local/lib/php'
'--with-oci8=/u01/app/product/932' 




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




#21853 [Opn]: includes stopped working

2003-01-24 Thread magnus
 ID:   21853
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Open
 Bug Type: *Directory/Filesystem functions
 Operating System: Windows XP
 PHP Version:  4.3.0
 New Comment:

When you use include("/some/path"); you are using
the absolute path in the file system, not the relative
path to your webroot.

With your example the file have to be located in
X:\includes\login_code.php where X is the drive where
your webroot is located.


Previous Comments:


[2003-01-23 19:53:08] [EMAIL PROTECTED]

Since I upgraded to PHP 4.3, all of the includes on my Web sites quite
working (hundereds of them).

I've tried poking around in the php/ini file; modifying include_path
and what not and finally had to give up and go back to last 4.2
version.

Here is an example of what does not work (I get a warning saying that
it cannot find the file).


If I modify this so that the link to relative to the current document
it works fine.


What gives?




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




#16057 [Com]: ftp_nlist() and ftp_rawlist() return nothing

2003-01-24 Thread falk
 ID:   16057
 Comment by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Closed
 Bug Type: FTP related
 Operating System: Windows 2000 Advanced Server
 PHP Version:  4.1.2
 New Comment:

It definitely works on Windows but not in combination with IIS. Try the
same scripts using the shell, e. g. "c:\php\php PATH_TO_SCRIPT".

Unfortunately I've got no solution either.


Previous Comments:


[2003-01-20 05:08:40] [EMAIL PROTECTED]

workaround:

if you try a »ftp_chdir($connectionpointer, "/");« first, there's no
longer a problem to run ftp_nlist under my configuration.



[2003-01-20 04:27:12] [EMAIL PROTECTED]

translation error

it would result nothing, of course, not something :P



[2003-01-20 04:25:04] [EMAIL PROTECTED]

ola!

i have the same problem under linux (kernel 2.4), Apache/1.3.23, PHP
4.2.2

my script is similar to much others posted here, any list-command will
result something

who can help me



[2002-12-29 11:31:21] [EMAIL PROTECTED]

Re: my previous post ...
Cockpit Error ..
It appears to work fine now.  The problem was that I was connecting to
the FTP service on the local by giving it a fully qualified DNS name. 
The localhost sits behind a NAT firewall.  Obviously, Apache/PHP
connecting to FTP on the same machine got somehow messed up. When using
the local machine name, or localhost, the problem resolved itself. 
Then I tried to connect to one of my FTP servers running on a different
host OUTSIDE the local domain, and Bingo .. It just wokred fine.
Hope this helps someone.
PHP Rocks!



[2002-12-29 11:06:22] [EMAIL PROTECTED]

Just downloaded & installed php 4.3.0 win32.
Neither rawlost or nlist work!
The system appears to hang for a while, and then returns nothing.
My setup
Server
OS Win2k Prof
Web Server: Apache 1.3.20
ftp Service: War FTP 1.65
Tested both local and remote.  Neither works.



The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/16057

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




#21862 [NEW]: CGI SAPI header("HTTP/1.1 CODE Response") not passed

2003-01-24 Thread mario17
From: [EMAIL PROTECTED]
Operating system: Debian/libc-2.3.1,-2.2.5
PHP version:  4.3.0
PHP Bug Type: HTTP related
Bug description:  CGI SAPI header("HTTP/1.1 CODE Response") not passed

With PHP-CGI 4.3.0 a header("HTTP/1.x NNN Response"); is not passed from
within the script. I discovered that using Nanoweb (the PHP webserver)
running below an Apache 1.3.xx (using a wrapper script to accomplish
that).

I've used the CGI SAPI in a more usual .cgi fashion: the script was called
"nph-nww.cgi" (containing a "#!/usr/local/bin/php430" interpreter line at
the top, and it was correctly chmoded 755). Such "nph-.cgi" scripts
are treated specially by Apache. Apache does not reparse the header()s of
such .cgi's as it usually does. And now the script  actually did send a
header("HTTP/1.1 200 OK\n"); but this was not passed by this PHP-CGI-4.3.0
and Apache (because enforced not to parse this .cgi's headers for
performance reasons) did not add it of course -> so the whole HTTP
response now violates the HTTP (because the response then begun with an
arbitrary header - "Date:" in my case).

This bug occourse for PHP-CGI-5.0.0-dev as well, while previous versions
(I tested 4.2.3) passed the "HTTP/1.1" header correctly (same script - no
changes!!).

The script does something like this:
(Note it must be called "nph-whatever.cgi" to test the bug it with
Apache):
#!/usr/local/bin/php5
";
?>

Even if Apache gracefully adds the HTTP/1.1 header, this is a bug - and I
really would dislike to be enforced to use the CLI SAPI version for CGI
scripting from now on :(

-- 
Edit bug report at http://bugs.php.net/?id=21862&edit=1
-- 
Try a CVS snapshot: http://bugs.php.net/fix.php?id=21862&r=trysnapshot
Fixed in CVS:   http://bugs.php.net/fix.php?id=21862&r=fixedcvs
Fixed in release:   http://bugs.php.net/fix.php?id=21862&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=21862&r=needtrace
Try newer version:  http://bugs.php.net/fix.php?id=21862&r=oldversion
Not developer issue:http://bugs.php.net/fix.php?id=21862&r=support
Expected behavior:  http://bugs.php.net/fix.php?id=21862&r=notwrong
Not enough info:http://bugs.php.net/fix.php?id=21862&r=notenoughinfo
Submitted twice:http://bugs.php.net/fix.php?id=21862&r=submittedtwice
register_globals:   http://bugs.php.net/fix.php?id=21862&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=21862&r=php3
Daylight Savings:   http://bugs.php.net/fix.php?id=21862&r=dst
IIS Stability:  http://bugs.php.net/fix.php?id=21862&r=isapi
Install GNU Sed:http://bugs.php.net/fix.php?id=21862&r=gnused




#20406 [Com]: defined() does not work properly within function or class

2003-01-24 Thread yarex
 ID:   20406
 Comment by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Bogus
 Bug Type: Variables related
 Operating System: Windows XP
 PHP Version:  4.2.0
 New Comment:

Please help, i got a session problem.
When i define session variable on one page and then i use a link or
form submit to another page, session variable is not set.

I use version 4.3.0 and in previous versions it works.
All other things are ok and system is not showing errors.

Here are my files content and php.ii content:
note:directories set in the [session] section exists and php system is
writing there files.

[index.php]

linka na vypis



[test.php]




[php.ini content]

[PHP]

;;;
; About this file ;
;;;
;
; This is the recommended, PHP 4-style version of the php.ini-dist
file.  It
; sets some non standard settings, that make PHP more efficient, more
secure,
; and encourage cleaner coding.
; The price is that with these settings, PHP may be incompatible with
some
; applications, and sometimes, more difficult to develop with.  Using
this
; file is warmly recommended for production sites.  As all of the
changes from
; the standard settings are thoroughly documented, you can go over each
one,
; and decide whether you want to use it or not.
;
; 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.
;
; - register_globals = Off [Security, Performance]
; Global variables are no longer registered for input data (POST,
GET, cookies,
; environment and other server variables).  Instead of using $foo,
you must use
; you can use $_REQUEST["foo"] (includes any variable that arrives
through the
; request, namely, POST, GET and cookie variables), or use one of
the specific
; $_GET["foo"], $_POST["foo"], $_COOKIE["foo"] or $_FILES["foo"],
depending
; on where the input originates.  Also, you can look at the
; import_request_variables() function.
; Note that register_globals is going to be depracated (i.e.,
turned off by
; default) in the next version of PHP, because it often leads to
security bugs.
; Read http://php.net/manual/en/security.registerglobals.php for
further
; information.
; - display_errors = Off   [Security]
; With this directive set to off, errors that occur during the
execution of
; scripts will no longer be displayed as a part of the script
output, and thus,
; will no longer be exposed to remote users.  With some errors, the
error message
; content may expose information about your script, web server, or
database
; server that may be exploitable for hacking.  Production sites
should have this
; directive set to off.
; - log_errors = On[Security]
; This directive complements the above one.  Any errors that occur
during the
; execution of your script will be logged (typically, to your
server's error log,
; but can be configured in several ways).  Along with setting
display_errors to off,
; this setup gives you the ability to fully understand what may
have gone wrong,
; without exposing any sensitive information to remote users.
; - output_buffering = 4096[Performance]
; Set a 4KB output buffer.  Enabling output buffering typically
results in less
; writes, and sometimes less packets sent on the wire, which can
often lead to
; better performance.  The gain this directive actually yields
greatly depends
; on which Web server you're working with, and what kind of scripts
you're using.
; - register_argc_argv = Off   [Performance]
; Disables registration of the somewhat redundant $argv and $argc
global
; variables.
; - magic_quotes_gpc = Off [Performance]
; 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"   [Performance]
; The environment variables are not hashed into the
$HTTP_ENV_VARS[].  To access
; environment variables, you can use getenv() instead.
; - error_reporting = E_ALL[Code Cleanliness, Security(?)]
; By default, PHP surpresses errors of type E_NOTICE.  These error
messages
; are emitted for non-critical errors, but that c

#19649 [Com]: Nested [] in browscap.ini cause PHP to crash

2003-01-24 Thread ronstk
 ID:   19649
 Comment by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Closed
 Bug Type: Reproducible crash
 Operating System: Linux
 PHP Version:  4.3.0-dev
 Assigned To:  zeev
 New Comment:

>From the browsecap.ini included v4.2.3.

[AE/2.1 (linux)]
browser=AE/2.1(Linux)
;browser="AE/2.1(Linux)"
version=2.1

gives me the error in dosbox:
PHP:  Error parsing E:\Iservers\PHP\browscap\browscap.ini on line
8206.
The fault here are the '(' and ')' 
This is.nt working with 4.3.x also


Previous Comments:


[2002-10-14 13:23:44] [EMAIL PROTECTED]

This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.





[2002-10-01 18:00:17] [EMAIL PROTECTED]

verified & updated version.

The problem occurs because 'arg2' passed to php_browscap_parser_cb() is
NULL and there are no checks for it, which causes Z_STRLEN_P(arg2) to
core.



[2002-09-28 10:58:17] [EMAIL PROTECTED]

An entry in browscap.ini similar to the following:
  [Mozilla/4.76 (Macintosh;US;PPC) Opera 4.?  [en]]
.. will cause Apache/PHP to fail to start (segmentation fault) due to
the nested [] symbols.

The following complete browscap.ini would be enough to reproduce this:

   [Opera 4.0]
   
   [Mozilla/4.76 (Macintosh;US;PPC) Opera 4.?  [en]]
   parent=Opera 4.0
   platform=MacPPC

Interestingly, without a correctly formed entry on the first line PHP
reports a warning instead.




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




#19292 [Com]: random error: open_basedir restriction in effect. File is in wrong directory

2003-01-24 Thread sanry
 ID:   19292
 Comment by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Critical
 Bug Type: Apache related
 Operating System: linux
 PHP Version:  4.2.3,4.3.0
 New Comment:

I use redhat8.0   and upgrade from php4.12 to php4.2.3

and the file have open_basedir restriction,  and after
all the include file is inside the basedir not outside


Previous Comments:


[2003-01-20 13:16:28] [EMAIL PROTECTED]

Same problem FreeBSD 4.7p3 PHP 4.3.0 PHP 4.2.3 Apache 1.3.27 (bug
20190)



[2003-01-17 13:57:47] [EMAIL PROTECTED]

The same probleme is in php4-STABLE-200301171630

Please correct that

Warning: Unknown(): open_basedir restriction in effect.
File(/home/ovh/www/forum/list.php) is not within the allowed path(s):
(/home/users/xiaoping) in Unknown on line 0

Warning: Unknown(/home/ovh/www/forum/list.php): failed to create
stream: Operation not permitted in Unknown on line 0

Warning: (null)() [function.include]: Failed opening
'/home/ovh/www/forum/list.php' for inclusion
(include_path='.:/upload/') in Unknown on line 0



[2003-01-12 05:40:52] [EMAIL PROTECTED]

Same problem with php 4.3.0 / apache 1.3.27 / Slackware
The problem seems to appear when a virtual host has a open_basedir
defined, but not in other virtualhost. In this case others virtual
hosts take the value of one of defined  open_basedir. (maybe the value
come from another http child open in same time)

Seems to have same behaviour with auto_append.

Hope it will help to solve this bug.

Fred



[2003-01-11 21:33:19] [EMAIL PROTECTED]

I have 2 FreeBSD servers with the same problem. Both have /www as
symlink. Real path is /home/www.
I also have a Windows machine, with no symlink ;-) - no problem there.
/www is c:/www there, and all works.
All machines have same httpd.conf, same Apache, same 4.2.3



[2003-01-11 05:16:38] [EMAIL PROTECTED]

4.3.o stills has the same problem, the test suite I posted on 30 Oct
2002 12:56am fails with this messages:

Warning: main() [function.main]: open_basedir restriction in effect.
File(/usr/local/lib/php/hello.php) is not within the allowed path(s):
(/usr/local/http-docs/common/scripts/) in
/usr/local/http-docs/common/lib/test/test.php on line 5

Warning: main(hello.php) [function.main]: failed to create stream: Not
owner in /usr/local/http-docs/common/lib/test/test.php on line 5

Fatal error: main() [function.main]: Failed opening required
'hello.php'
(include_path='./:/usr/local/http-docs/common/lib:/usr/local/lib/php:/usr/local/http-docs/common/lib/phpwhois')
in /usr/local/http-docs/common/lib/test/test.php on
line 5

where test.php tries to include hello.php which is in
/usr/local/http-docs/common/lib/test that is a path that's
included in include_path



The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/19292

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




#21862 [Opn->Fbk]: includes stopped working

2003-01-24 Thread magnus
 ID:   21862
 Updated by:   [EMAIL PROTECTED]
-Summary:  CGI SAPI header("HTTP/1.1 CODE Response") not passed
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Feedback
 Bug Type: HTTP related
 Operating System: Debian/libc-2.3.1,-2.2.5
 PHP Version:  4.3.0
 New Comment:

This is probably because you are using the CLI version
and not the CGI version.

Could you please post a /usr/local/bin/php430 -v ?


Previous Comments:


[2003-01-24 08:04:52] [EMAIL PROTECTED]

With PHP-CGI 4.3.0 a header("HTTP/1.x NNN Response"); is not passed
from within the script. I discovered that using Nanoweb (the PHP
webserver) running below an Apache 1.3.xx (using a wrapper script to
accomplish that).

I've used the CGI SAPI in a more usual .cgi fashion: the script was
called "nph-nww.cgi" (containing a "#!/usr/local/bin/php430"
interpreter line at the top, and it was correctly chmoded 755). Such
"nph-.cgi" scripts are treated specially by Apache. Apache does not
reparse the header()s of such .cgi's as it usually does. And now the
script  actually did send a header("HTTP/1.1 200 OK\n"); but this was
not passed by this PHP-CGI-4.3.0 and Apache (because enforced not to
parse this .cgi's headers for performance reasons) did not add it of
course -> so the whole HTTP response now violates the HTTP (because the
response then begun with an arbitrary header - "Date:" in my case).

This bug occourse for PHP-CGI-5.0.0-dev as well, while previous
versions (I tested 4.2.3) passed the "HTTP/1.1" header correctly (same
script - no changes!!).

The script does something like this:
(Note it must be called "nph-whatever.cgi" to test the bug it with
Apache):
#!/usr/local/bin/php5
";
?>

Even if Apache gracefully adds the HTTP/1.1 header, this is a bug - and
I really would dislike to be enforced to use the CLI SAPI version for
CGI scripting from now on :(





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




#21853 [Opn->Fbk]: includes stopped working

2003-01-24 Thread magnus
 ID:   21853
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Feedback
 Bug Type: *Directory/Filesystem functions
 Operating System: Windows XP
 PHP Version:  4.3.0


Previous Comments:


[2003-01-24 07:51:33] [EMAIL PROTECTED]

When you use include("/some/path"); you are using
the absolute path in the file system, not the relative
path to your webroot.

With your example the file have to be located in
X:\includes\login_code.php where X is the drive where
your webroot is located.



[2003-01-23 19:53:08] [EMAIL PROTECTED]

Since I upgraded to PHP 4.3, all of the includes on my Web sites quite
working (hundereds of them).

I've tried poking around in the php/ini file; modifying include_path
and what not and finally had to give up and go back to last 4.2
version.

Here is an example of what does not work (I get a warning saying that
it cannot find the file).


If I modify this so that the link to relative to the current document
it works fine.


What gives?




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




#21856 [Opn->Fbk]: make fails with Undefined symbol errors

2003-01-24 Thread iliaa
 ID:   21856
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Feedback
 Bug Type: Compile Failure
 Operating System: Solaris 7
 PHP Version:  4.3.0
 New Comment:

Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip

Try the unstable snap, it comes with bundled gd 2.0.11


Previous Comments:


[2003-01-23 21:52:30] [EMAIL PROTECTED]

I want to build php 4.3.0 with pgsql and gd2 support using the php
version of gd2. Configure seems to work w/o any trouble. I don't get
any errors, but when I get to the link stage, make fails.

The error is:
Undefined   first referenced
 symbol in file
gdImageJpegCtx  ext/gd/gd.lo
gdImageCreateFromJpeg   ext/gd/gd.lo
gdImageCreateFromJpegCtxext/gd/gd.lo
ld: fatal: Symbol referencing errors. No output written to
sapi/cli/php
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1

I used this configure command:

./configure --with-apxs=/usr/local/apache/bin/apxs --disable-short-tags
\
--with-gd --with-freetype-dir=/usr/local --enable-gd-native-ttf \
--enable-gd-imgstrttf --with-jpeg-dir=/usr/local --with-zlib \
--with-png-dir=/usr/local

When I search for the missing symbols, I find them in gd.h,
but it looks like those are the ones the linker is complaining about. I
downloaded gd 2.0.10 to see if I could
find the missing symbols and they appear as prototype defs in
gd.h. There is no gd.h in my distribution. Should there be?
As a last resort, I just downloaded the 4.3.0.tar.gz distro
again this evening, wiped out the old area and started fresh.
It hasn't made a difference. I also tried all of the posts in the
support section, but none of those pointers made any 
difference. I have a number of other configs that also did not work, if
you need those.




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




#21855 [Opn->Fbk]: Likely threading issue: Crash when using Apache 2.0 (worker model)

2003-01-24 Thread iliaa
 ID:   21855
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Feedback
 Bug Type: Reproducible crash
 Operating System: HPUX 11.00
 PHP Version:  4.2.3
 New Comment:

What php modules do you have compiled?


Previous Comments:


[2003-01-23 20:24:24] [EMAIL PROTECTED]

Following Problem noticed when using Apache 2.0 built with the worker
model. This problem is not seen on Apache 2.0 (prefork) or Apache 1.3.

A crash is noticed with the following entry in the Apache error_log
when main page (index.php) of phpMyAdmin is accessed...

[notice] child pid 26712 exit signal Illegal instruction (4)


-- GDB analysis --


Here's a short analysis. I attached with gdb to the httpd process and
then reloaded the page:

Program received signal SIGBUS, Bus error.
[Switching to thread 2 (system thread 4353)]
0xc0208700 in __thread_mutex_lock+0x10 () from /usr/lib/libc.2
(gdb) info threads
  27 system thread 4378  0xc01f9cc8 in _semop_sys+0x10 () from
/usr/lib/libc.2
  26 system thread 4377  warning: reading `r3' register: No data
0xc01f5100 in __ksleep+0x10 () from /usr/lib/libc.2
   :
0xc01f5100 in __ksleep+0x10 () from /usr/lib/libc.2
  3 system thread 4354  warning: reading `r3' register: No data
0xc01f5100 in __ksleep+0x10 () from /usr/lib/libc.2
* 2 system thread 4353  0xc0208700 in __thread_mutex_lock+0x10 () from
/usr/lib/libc.2
  1 system thread 4351  warning: reading `r3' register: No data
0xc01f6ed0 in _read_sys+0x10 () from /usr/lib/libc.2

(gdb) bt
#0  0xc0208700 in __thread_mutex_lock+0x10 () from /usr/lib/libc.2
#1  0xc0184690 in mallinfo+0xa04 () from /usr/lib/libc.2
#2  0xc0182330 in __thread_callback_np+0x624 () from /usr/lib/libc.2
#3  0xc0187e7c in malloc+0x198 () from /usr/lib/libc.2
#4  0xc267fb24 in virtual_file_ex+0xb4 () from
/opt/hpapache2/modules/libphp4.so
#5  0xc25b5d64 in expand_filepath+0x74 () from
/opt/hpapache2/modules/libphp4.so
#6  0xc25b4d78 in php_fopen_and_set_opened_path+0x78 () from
/opt/hpapache2/modules/libphp4.so
#7  0xc25b58a8 in php_fopen_with_path+0x2f0 () from
/opt/hpapache2/modules/libphp4.so
#8  0xc25b5b70 in php_fopen_url_wrapper+0x250 () from
/opt/hpapache2/modules/libphp4.so
#9  0xc25b4f14 in php_fopen_wrapper+0x124 () from
/opt/hpapache2/modules/libphp4.so
#10 0xc25b031c in php_fopen_wrapper_for_zend+0x84 () from
/opt/hpapache2/modules/libphp4.so
#11 0xc2567034 in open_file_for_scanning+0x54 () from
/opt/hpapache2/modules/libphp4.so
#12 0xc2567368 in compile_file+0xc8 () from
/opt/hpapache2/modules/libphp4.so
#13 0xc2567644 in compile_filename+0xac () from
/opt/hpapache2/modules/libphp4.so
#14 0xc258acd8 in execute+0x7ad8 () from
/opt/hpapache2/modules/libphp4.so
(gdb) disas
0xc02086f0 <__thread_mutex_lock>:   stw %rp,-0x14(%sp)
0xc02086f4 <__thread_mutex_lock+4>: ldo 0x40(%sp),%sp
0xc02086f8 <__thread_mutex_lock+8>: addil L'-0x800,%r19,%r1
0xc02086fc <__thread_mutex_lock+12>:ldw 0x390(%r1),%r24
0xc0208700 <__thread_mutex_lock+16>:stw %r19,-0x20(%sp)
0xc0208704 <__thread_mutex_lock+20>:ldw 0(%r24),%r31
   :
(gdb)p/x $sp
$1 = 0x7eedd030
(gdb) x/x $sp
0x7eedd030: Error accessing memory address 0x7eedd030: Bad
address.

Is 0x7eedd030 a valid stack address?

0x8000 - 0x7eedd030 = 0x01122FD0
maxssiz   0X0100

So not for the process stack. Maybe it is within a thread stack?

(gdb) info frame
Stack level 0, frame at 0x7eedcff0:
 pcoqh = 0xc0208700 in __thread_mutex_lock; saved pcoqh 0xc0184690
 called by frame at 0x7eedceb0
 Arglist at 0x7eedcff0, args:last
known
 Locals at 0x7eedcff0, Previous frame's sp cis 0x7eedcff0 <== valid
stack
 Saved registers:address
  rp at 0x7eedcfdc
(gdb) x/x 0x7eedcff0
0x7eedcff0: 0x
(gdb) x/x 0x7eedd000
0x7eedd000: Error accessing memory address 0x7eedd000: Bad
address.

So 0x7eedcff0 is valid, but 0x7eedd000 is not (only 16 bytes
difference). Looks like we crossed the end of the thread stack. 




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




#21859 [Com]: php cant compile/make

2003-01-24 Thread james
 ID:   21859
 Comment by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Open
 Bug Type: Compile Failure
 Operating System: RedHat 7
 PHP Version:  4.3.0
 New Comment:

I found this problem too, and it took me a little while to work out not
only what's going on but also the 'right' way to fix it. I'm no expert,
but this seemed to be what's happening:

- That rogue unix.h has probably come from installing the imap
c-client.

Q: Ok, but what should we have there instead? Where's the 'right'
unix.h? Why are we trying to use it in building PHP? Is it important?

A: When you ./configure PHP, it looks to see if it can find a unix.h
lying around, and if it can, it decides it really ought to include it.
That means in our case, the 'rogue' unix.h is marked for inclusion.
Only when you come to 'make' does it discover it's not the expected
kind of unix.h at all, and things fall over.

Fix:
1. Shove the rogue unix.h out of the way 
   # cd /usr/local/include
   # mv unix.h unix_.h
2. Return to your php directory
   # cd /usr/local/lib/php-xxx  ( OR /usr/src/php-xxx OR wherever your
php install lives )
3. If you've already experienced the error, chances are the 'Yes we
should include a unix.h' information is cached, so we need to remove
that.
   # rm config.cache
4. Repeat your ./configure
   # ./configure --with-... --enable-... etc.
5. Do the make - now it won't be expecting to include the unix.h file
and so everything will run fine without it.
6. If you're in the mood, remember to move the unix_.h back to unix.h

HTH, it worked for me.

James
-- proudly sponsoring online youth support at tscnow.com --


Previous Comments:


[2003-01-24 06:14:58] [EMAIL PROTECTED]

./configure --with-apache=/usr/src/apache_1.3.26 --enable-track-vars
--enable-force-cgi --enable-ftp --enable-dbase --with-pear

i looked (searched) for unix.h but i dont have it in 
/usr/include or other dir



[2003-01-24 05:40:30] [EMAIL PROTECTED]

What was the configure line you used?

Also, check if you have more of them in your system:

# find /usr/include -name unix.h

This is caused by wrong install of c-client libs/headers,
you don't need unix.h there..check this manual page:

  http://www.php.net/manual/en/ref.imap.php





[2003-01-24 04:43:05] [EMAIL PROTECTED]

when i try to make "make" with php 4.3 then this comes..
on older versions there no problems with compiling / make


In file included from /usr/src/php-4.3.0/Zend/zend.h:59,
 from /usr/src/php-4.3.0/main/php.h:34,
 from /usr/src/php-4.3.0/ext/ctype/ctype.c:23:
/usr/local/include/unix.h:182: parse error before `MAILSTREAM'
/usr/local/include/unix.h:182: warning: no semicolon at end of struct
or union
/usr/local/include/unix.h:189: parse error before `}'
/usr/local/include/unix.h:189: warning: data definition has no type or
storage class
/usr/local/include/unix.h:193: parse error before `*'
/usr/local/include/unix.h:193: warning: data definition has no type or
storage class
/usr/local/include/unix.h:196: parse error before `*'
/usr/local/include/unix.h:197: parse error before `*'
/usr/local/include/unix.h:198: parse error before `*'
/usr/local/include/unix.h:199: parse error before `*'
/usr/local/include/unix.h:200: parse error before `*'
/usr/local/include/unix.h:201: parse error before `*'
/usr/local/include/unix.h:202: parse error before `*'
/usr/local/include/unix.h:202: parse error before `*'
/usr/local/include/unix.h:202: warning: data definition has no type or
storage class
/usr/local/include/unix.h:203: parse error before `*'
/usr/local/include/unix.h:204: parse error before `*'
/usr/local/include/unix.h:206: parse error before `*'
much more of the warnings then
.
.
.
make: *** [ext/ctype/ctype.lo] Error 1






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




#21847 [Opn->Fbk]: php core dumps whilst retrieving images from url

2003-01-24 Thread iliaa
 ID:   21847
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Feedback
 Bug Type: Reproducible crash
 Operating System: linux-2.4.20
 PHP Version:  4.3.0
 New Comment:

Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip

Cannot replicate the crash with latest CVS.


Previous Comments:


[2003-01-24 03:16:03] [EMAIL PROTECTED]

Still crashes with optmiser disabled but no core dump now, last string
printed is corrupt.



[2003-01-24 02:28:50] [EMAIL PROTECTED]

This is the URL for the file, I will try switching off the optimiser
and run again.

http://www.draper.co.uk/files/United%20Kingdom2002.txt



[2003-01-23 19:18:36] [EMAIL PROTECTED]

Could you please provide the draper.txt so that the bug can be
replicated. As is I cannot replicate the crash, merely get an error
opening the specified image URL.
Also, does the crash occur if you disable ZendOptimizer?



[2003-01-23 13:02:30] [EMAIL PROTECTED]

When running the following code php core dumps.

http://www.drapertools.com/draper/images/details/".trim($fields[1])."_".trim($fields[2]).".jpg";

   
$outfile="draper_images/draper_".trim($fields[1])."_".trim($fields[2]).".jpg";
print("opening $url\n");
ob_flush();
if($urlfp=fopen($url,"rb"))
{
print("Outputing to $outfile\n");
if($imagefp=fopen($outfile,"wb"))
{
print($url." -> ".$outfile."\n");
ob_flush();
fputs($good,$url." -> ".$outfile."\n");
$size=0;
while(!feof($urlfp))
{
$block=fread($urlfp,4096);
fputs($imagefp,$block);
$size+=4096;
print($url." -> ".$outfile." :
$size\n");
};
fclose($imagefp);
};
fclose($urlfp);
}
else
{
fputs($bad,$url."\n");
};
};
fclose($fp);
fclose($good);
fclose($bad);
?>

The input file is a comma delimited list, we are interested in the
filename which we then retrieve from the site (you can find the names
by going to the site or by downloading the text file from the site).

Just recompiled with debug, here is the backtrace:
#0  0x08153650 in php_hostconnect (host=0x82ef62c
"www.drapertools.com", port=80, socktype=1, timeout=0x0)
at /usr/src/php-4.3.0/main/network.c:435
#1  0x08153900 in _php_stream_sock_open_host (host=0x82ef62c
"www.drapertools.com", port=80, socktype=1, timeout=0x0, 
persistent_id=0x0) at /usr/src/php-4.3.0/main/network.c:619
#2  0x0811a497 in php_stream_url_wrap_http (wrapper=0x82491f0, 
path=0x82ed5c4
"http://www.drapertools.com/draper/images/details/002_770-SA.jpg";,
mode=0x82e97cc "rb", options=4, 
opened_path=0x0, context=0x0) at
/usr/src/php-4.3.0/ext/standard/http_fopen_wrapper.c:121
#3  0x08152d2c in _php_stream_open_wrapper_ex (path=0x82ed5c4
"http://www.drapertools.com/draper/images/details/002_770-SA.jpg";, 
mode=0x82e97cc "rb", options=12, opened_path=0x0, context=0x0) at
/usr/src/php-4.3.0/main/streams.c:2378
#4  0x080e915a in php_if_fopen (ht=2, return_value=0x82ee5ac,
this_ptr=0x0, return_value_used=1)
at /usr/src/php-4.3.0/ext/standard/file.c:1094
#5  0x404f78f0 in zend_oe () from /usr/local/Zend/lib/ZendOptimizer.so
#6  0x404f43a0 in zend_oe () from /usr/local/Zend/lib/ZendOptimizer.so
#7  0x0816f14c in zend_execute_scripts (type=8, retval=0x0,
file_count=3) at /usr/src/php-4.3.0/Zend/zend.c:864
#8  0x08148909 in php_execute_script (primary_file=0xbb40) at
/usr/src/php-4.3.0/main/main.c:1573
#9  0x08190f48 in main (argc=2, argv=0xbbe4) at
/usr/src/php-4.3.0/sapi/cli/php_cli.c:746
#10 0x40342657 in __libc_start_main (main=0x81905c8 , argc=2,
ubp_av=0xbbe4, init=0x806fe60 <_init>, 
fini=0x8196790 <_fini>, rtld_fini=0x4000dcd4 <_dl_fini>,
stack_end=0xbbdc) at ../sysdeps/generic/libc-start.c:129





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




#21860 [Opn->Bgs]: $_SERVER['HTTP_REFERER']

2003-01-24 Thread iliaa
 ID:   21860
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Bogus
 Bug Type: Variables related
 Operating System: Windows 2000 Server
 PHP Version:  4.3.0
 New Comment:

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

A browser may choose not to send the referrer variable, infact in some
browsers you can specifically specify that the browser should not send
this variable.


Previous Comments:


[2003-01-24 06:07:32] [EMAIL PROTECTED]

I try different way to read the referer :







but in any case I never had a result.

I try with php configured as CGI and as ISAPI.







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




#21862 [Fbk]: includes stopped working

2003-01-24 Thread edink
 ID:   21862
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Feedback
 Bug Type: HTTP related
 Operating System: Debian/libc-2.3.1,-2.2.5
 PHP Version:  4.3.0
 New Comment:

Please see cgi.rfc2616_headers setting in your php.ini and see if
turning than on will solve your problem?


Previous Comments:


[2003-01-24 09:18:37] [EMAIL PROTECTED]

This is probably because you are using the CLI version
and not the CGI version.

Could you please post a /usr/local/bin/php430 -v ?



[2003-01-24 08:04:52] [EMAIL PROTECTED]

With PHP-CGI 4.3.0 a header("HTTP/1.x NNN Response"); is not passed
from within the script. I discovered that using Nanoweb (the PHP
webserver) running below an Apache 1.3.xx (using a wrapper script to
accomplish that).

I've used the CGI SAPI in a more usual .cgi fashion: the script was
called "nph-nww.cgi" (containing a "#!/usr/local/bin/php430"
interpreter line at the top, and it was correctly chmoded 755). Such
"nph-.cgi" scripts are treated specially by Apache. Apache does not
reparse the header()s of such .cgi's as it usually does. And now the
script  actually did send a header("HTTP/1.1 200 OK\n"); but this was
not passed by this PHP-CGI-4.3.0 and Apache (because enforced not to
parse this .cgi's headers for performance reasons) did not add it of
course -> so the whole HTTP response now violates the HTTP (because the
response then begun with an arbitrary header - "Date:" in my case).

This bug occourse for PHP-CGI-5.0.0-dev as well, while previous
versions (I tested 4.2.3) passed the "HTTP/1.1" header correctly (same
script - no changes!!).

The script does something like this:
(Note it must be called "nph-whatever.cgi" to test the bug it with
Apache):
#!/usr/local/bin/php5
";
?>

Even if Apache gracefully adds the HTTP/1.1 header, this is a bug - and
I really would dislike to be enforced to use the CLI SAPI version for
CGI scripting from now on :(





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




#19436 [Opn]: zlib.output_compression causing corruption

2003-01-24 Thread steveh
 ID:   19436
 User updated by:  [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Open
 Bug Type: Zlib Related
 Operating System: redhat linux 7.3
 PHP Version:  4CVS-2002-09-16
 New Comment:

Any news?  
Is it worth trying this again on the latest CVS?


Previous Comments:


[2003-01-07 07:17:19] [EMAIL PROTECTED]

Opening it back then.



[2003-01-07 07:14:36] [EMAIL PROTECTED]

This is still happening with php 4.3.0 and zend optimiser 2.0.3, I
turned zlib.output_compression=on, tested and the downloaded file (a
zip file) was corrupt, set zlib.output_compression=off and then the
download worked fine.



[2002-10-20 23:25:01] [EMAIL PROTECTED]

No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.





[2002-10-05 09:49:20] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php4-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-latest.zip

I am unable to replicate the bug, it is more then likely that one of
the recent changes in output handling code has resolved this issue.



[2002-09-16 08:23:56] [EMAIL PROTECTED]

When using php to supply data for a file download from a database the
resultant file is shortened, switching off output_compression resolves
this issue.

Had to update to the latest CVS version to fix truncation issues on
4.2.3 of text fields.

Using code very similar to that listed on the sybase functions page
(search for hex2bin)





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




#21859 [Opn]: php cant compile/make

2003-01-24 Thread sc2
 ID:   21859
 User updated by:  [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Open
 Bug Type: Compile Failure
 Operating System: RedHat 7
 PHP Version:  4.3.0
 New Comment:

that worked :-) 
thanks

ps: what means 
In function `my_tempnam':
/usr/src/php-4.3.0/ext/mysql/libmysql/my_tempnam.c:103: the use of
`tempnam' is dangerous, better use `mkstemp'

this is for the coders of php, or?


Previous Comments:


[2003-01-24 09:56:33] [EMAIL PROTECTED]

I found this problem too, and it took me a little while to work out not
only what's going on but also the 'right' way to fix it. I'm no expert,
but this seemed to be what's happening:

- That rogue unix.h has probably come from installing the imap
c-client.

Q: Ok, but what should we have there instead? Where's the 'right'
unix.h? Why are we trying to use it in building PHP? Is it important?

A: When you ./configure PHP, it looks to see if it can find a unix.h
lying around, and if it can, it decides it really ought to include it.
That means in our case, the 'rogue' unix.h is marked for inclusion.
Only when you come to 'make' does it discover it's not the expected
kind of unix.h at all, and things fall over.

Fix:
1. Shove the rogue unix.h out of the way 
   # cd /usr/local/include
   # mv unix.h unix_.h
2. Return to your php directory
   # cd /usr/local/lib/php-xxx  ( OR /usr/src/php-xxx OR wherever your
php install lives )
3. If you've already experienced the error, chances are the 'Yes we
should include a unix.h' information is cached, so we need to remove
that.
   # rm config.cache
4. Repeat your ./configure
   # ./configure --with-... --enable-... etc.
5. Do the make - now it won't be expecting to include the unix.h file
and so everything will run fine without it.
6. If you're in the mood, remember to move the unix_.h back to unix.h

HTH, it worked for me.

James
-- proudly sponsoring online youth support at tscnow.com --



[2003-01-24 06:14:58] [EMAIL PROTECTED]

./configure --with-apache=/usr/src/apache_1.3.26 --enable-track-vars
--enable-force-cgi --enable-ftp --enable-dbase --with-pear

i looked (searched) for unix.h but i dont have it in 
/usr/include or other dir



[2003-01-24 05:40:30] [EMAIL PROTECTED]

What was the configure line you used?

Also, check if you have more of them in your system:

# find /usr/include -name unix.h

This is caused by wrong install of c-client libs/headers,
you don't need unix.h there..check this manual page:

  http://www.php.net/manual/en/ref.imap.php





[2003-01-24 04:43:05] [EMAIL PROTECTED]

when i try to make "make" with php 4.3 then this comes..
on older versions there no problems with compiling / make


In file included from /usr/src/php-4.3.0/Zend/zend.h:59,
 from /usr/src/php-4.3.0/main/php.h:34,
 from /usr/src/php-4.3.0/ext/ctype/ctype.c:23:
/usr/local/include/unix.h:182: parse error before `MAILSTREAM'
/usr/local/include/unix.h:182: warning: no semicolon at end of struct
or union
/usr/local/include/unix.h:189: parse error before `}'
/usr/local/include/unix.h:189: warning: data definition has no type or
storage class
/usr/local/include/unix.h:193: parse error before `*'
/usr/local/include/unix.h:193: warning: data definition has no type or
storage class
/usr/local/include/unix.h:196: parse error before `*'
/usr/local/include/unix.h:197: parse error before `*'
/usr/local/include/unix.h:198: parse error before `*'
/usr/local/include/unix.h:199: parse error before `*'
/usr/local/include/unix.h:200: parse error before `*'
/usr/local/include/unix.h:201: parse error before `*'
/usr/local/include/unix.h:202: parse error before `*'
/usr/local/include/unix.h:202: parse error before `*'
/usr/local/include/unix.h:202: warning: data definition has no type or
storage class
/usr/local/include/unix.h:203: parse error before `*'
/usr/local/include/unix.h:204: parse error before `*'
/usr/local/include/unix.h:206: parse error before `*'
much more of the warnings then
.
.
.
make: *** [ext/ctype/ctype.lo] Error 1






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




#21859 [Opn->Bgs]: php cant compile/make

2003-01-24 Thread iliaa
 ID:   21859
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Bogus
 Bug Type: Compile Failure
 Operating System: RedHat 7
 PHP Version:  4.3.0
 New Comment:

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

The problem was a result of a bad unix.h due to c-client installation.

The compile warning you are seeing can be safely ignored, it occures in
the libmysql, which is bundled by PHP and will go away once MySQL
developers choose to address this issue.


Previous Comments:


[2003-01-24 10:51:40] [EMAIL PROTECTED]

that worked :-) 
thanks

ps: what means 
In function `my_tempnam':
/usr/src/php-4.3.0/ext/mysql/libmysql/my_tempnam.c:103: the use of
`tempnam' is dangerous, better use `mkstemp'

this is for the coders of php, or?



[2003-01-24 09:56:33] [EMAIL PROTECTED]

I found this problem too, and it took me a little while to work out not
only what's going on but also the 'right' way to fix it. I'm no expert,
but this seemed to be what's happening:

- That rogue unix.h has probably come from installing the imap
c-client.

Q: Ok, but what should we have there instead? Where's the 'right'
unix.h? Why are we trying to use it in building PHP? Is it important?

A: When you ./configure PHP, it looks to see if it can find a unix.h
lying around, and if it can, it decides it really ought to include it.
That means in our case, the 'rogue' unix.h is marked for inclusion.
Only when you come to 'make' does it discover it's not the expected
kind of unix.h at all, and things fall over.

Fix:
1. Shove the rogue unix.h out of the way 
   # cd /usr/local/include
   # mv unix.h unix_.h
2. Return to your php directory
   # cd /usr/local/lib/php-xxx  ( OR /usr/src/php-xxx OR wherever your
php install lives )
3. If you've already experienced the error, chances are the 'Yes we
should include a unix.h' information is cached, so we need to remove
that.
   # rm config.cache
4. Repeat your ./configure
   # ./configure --with-... --enable-... etc.
5. Do the make - now it won't be expecting to include the unix.h file
and so everything will run fine without it.
6. If you're in the mood, remember to move the unix_.h back to unix.h

HTH, it worked for me.

James
-- proudly sponsoring online youth support at tscnow.com --



[2003-01-24 06:14:58] [EMAIL PROTECTED]

./configure --with-apache=/usr/src/apache_1.3.26 --enable-track-vars
--enable-force-cgi --enable-ftp --enable-dbase --with-pear

i looked (searched) for unix.h but i dont have it in 
/usr/include or other dir



[2003-01-24 05:40:30] [EMAIL PROTECTED]

What was the configure line you used?

Also, check if you have more of them in your system:

# find /usr/include -name unix.h

This is caused by wrong install of c-client libs/headers,
you don't need unix.h there..check this manual page:

  http://www.php.net/manual/en/ref.imap.php





[2003-01-24 04:43:05] [EMAIL PROTECTED]

when i try to make "make" with php 4.3 then this comes..
on older versions there no problems with compiling / make


In file included from /usr/src/php-4.3.0/Zend/zend.h:59,
 from /usr/src/php-4.3.0/main/php.h:34,
 from /usr/src/php-4.3.0/ext/ctype/ctype.c:23:
/usr/local/include/unix.h:182: parse error before `MAILSTREAM'
/usr/local/include/unix.h:182: warning: no semicolon at end of struct
or union
/usr/local/include/unix.h:189: parse error before `}'
/usr/local/include/unix.h:189: warning: data definition has no type or
storage class
/usr/local/include/unix.h:193: parse error before `*'
/usr/local/include/unix.h:193: warning: data definition has no type or
storage class
/usr/local/include/unix.h:196: parse error before `*'
/usr/local/include/unix.h:197: parse error before `*'
/usr/local/include/unix.h:198: parse error before `*'
/usr/local/include/unix.h:199: parse error before `*'
/usr/local/include/unix.h:200: parse error before `*'
/usr/local/include/unix.h:201: parse error before `*'
/usr/local/include/unix.h:202: parse error before `*'
/usr/local/include/unix.h:202: parse error before `*'
/usr/local/include/unix.h:202: warning: data definition has no type or
storage class
/usr/local/include/unix.h:203: parse error before `*'
/usr/local/include/unix.h:204: parse error before `*'
/usr/local/include/unix.h:206: parse error

#21863 [NEW]: PHP as SAPI under IIS brings down all web services trying to find php_mhash.dll

2003-01-24 Thread fishrunsrap
From: [EMAIL PROTECTED]
Operating system: windows
PHP version:  4.3.0
PHP Bug Type: Reproducible crash
Bug description:  PHP as SAPI under IIS brings down all web services trying to find 
php_mhash.dll

IIS hangs when starting up with PHP 4.3.0 running as a SAPI module if I try
to load php_mhash.dll as an extension. The event viewer gives the
following message, classified as 'Information':

Application popup: Warning : Unknown(): Unable to load dynamic library
'D:\php-4.3.0-Win32\extensions\php_mhash.dll' - The specified module could
not be found.

... the World Wide Web Publishing Service then freezes, saying it's
'starting'. it does not respond to control messages from either 'net stop'
on the command line or other GUI controls. 

this is a bug because no other extensions fail in this manner, and they're
all in the same place, and everything works just fine with exactly the
same setup with PHP 4.2.3, also running in IIS as a SAPI. 

-fish 
-- 
Edit bug report at http://bugs.php.net/?id=21863&edit=1
-- 
Try a CVS snapshot: http://bugs.php.net/fix.php?id=21863&r=trysnapshot
Fixed in CVS:   http://bugs.php.net/fix.php?id=21863&r=fixedcvs
Fixed in release:   http://bugs.php.net/fix.php?id=21863&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=21863&r=needtrace
Try newer version:  http://bugs.php.net/fix.php?id=21863&r=oldversion
Not developer issue:http://bugs.php.net/fix.php?id=21863&r=support
Expected behavior:  http://bugs.php.net/fix.php?id=21863&r=notwrong
Not enough info:http://bugs.php.net/fix.php?id=21863&r=notenoughinfo
Submitted twice:http://bugs.php.net/fix.php?id=21863&r=submittedtwice
register_globals:   http://bugs.php.net/fix.php?id=21863&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=21863&r=php3
Daylight Savings:   http://bugs.php.net/fix.php?id=21863&r=dst
IIS Stability:  http://bugs.php.net/fix.php?id=21863&r=isapi
Install GNU Sed:http://bugs.php.net/fix.php?id=21863&r=gnused




#21776 [Opn->Fbk]: Heisenbug after database code changes.

2003-01-24 Thread iliaa
 ID:   21776
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Feedback
 Bug Type: Unknown/Other Function
 Operating System: Windows and Linux
 PHP Version:  4.2.3
 New Comment:

Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip




Previous Comments:


[2003-01-23 14:07:28] [EMAIL PROTECTED]

Cannot get a backtrace from the instructions on bug submission. The PHP
session does not actually crash, generating a core dump, but exits with
a fatal error. The text of the error is gibberish, but nevertheless it
does not die.

How can we stop or investigate the process at the point of the error.

It looks like PHP's symbol table gets corrupted during an earler part
of the code. Is there anyway we can investigate this further.

yours, Marcus.



[2003-01-20 10:46:44] [EMAIL PROTECTED]

Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.




[2003-01-20 10:31:29] [EMAIL PROTECTED]

This is the bug from hell.

It is random crashing in a section of our unit tests. On Windows the
crash manifests itself as...

The instruction "(1)" referenced memory at "(2)" which is not writable
where (1) is :0x77fcb9b1 (once), 0x77fcb892 (twice), 0x77fcb9fb (once)
on a random attempt of two dozen tries.

There is too much code to post here and we cannot yet isolate it - our
individual unit tests all pass. We are working on a backtrace from a
Linux machine and will add to this bug soon.

The code that was changed that started generating these problems was
mysql related. There are a lot of references in that code (it is a
persistent object library).

The problem manifests itself in Linux with random fatal errors such as
unknown function where the function name is simply "<()" !? It also
happens both with version 3 and 4 of  MySQL and versions 4.2.3 and
4.3.0 of PHP.

It is a complete show stopper.

yours, Marcus.





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




#21863 [Opn->Fbk]: PHP as SAPI under IIS brings down all web services trying to find php_mhash.dll

2003-01-24 Thread iliaa
 ID:   21863
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Feedback
 Bug Type: Reproducible crash
 Operating System: windows
 PHP Version:  4.3.0
 New Comment:

Do you get an error loading php_mhash.dll with the CLI sapi?


Previous Comments:


[2003-01-24 11:05:34] [EMAIL PROTECTED]

IIS hangs when starting up with PHP 4.3.0 running as a SAPI module if I
try to load php_mhash.dll as an extension. The event viewer gives the
following message, classified as 'Information':

Application popup: Warning : Unknown(): Unable to load dynamic library
'D:\php-4.3.0-Win32\extensions\php_mhash.dll' - The specified module
could not be found.

... the World Wide Web Publishing Service then freezes, saying it's
'starting'. it does not respond to control messages from either 'net
stop' on the command line or other GUI controls. 

this is a bug because no other extensions fail in this manner, and
they're all in the same place, and everything works just fine with
exactly the same setup with PHP 4.2.3, also running in IIS as a SAPI. 

-fish 




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




#21861 [Opn->Fbk]: set_time_limit does not Limit the maximum execution time with safe_mode off

2003-01-24 Thread sniper
 ID:   21861
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Feedback
 Bug Type: *General Issues
 Operating System: SunOS sirius 5.8 Generic_
 PHP Version:  4.3.0
 New Comment:

Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.





Previous Comments:


[2003-01-24 06:34:08] [EMAIL PROTECTED]

--- 
I also try init_set (max_execution_time,1000) for overwriting the
default value. The function returns the previous value but does not
change the timeout problem.



[2003-01-24 06:27:34] [EMAIL PROTECTED]

--- problem in php 4.3.0
set_time_limit() does not change the maximum execution time with
safe_mode=off.

When the default maximum execution time (30 seconds in php.ini), the
result HTML page contains no data (NS) and vannot be displayed (IE)


Note: The application is completely written in PHP and does not use
system(). 


--- configure line
'./configure' '--with-apxs=/local/etc/apache/bin/apxs'
'--with-config-file-path=/local/lib/php'
'--with-oci8=/u01/app/product/932' 




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




#21862 [Fbk]: CGI SAPI header("HTTP/1.1 CODE Response") not passed

2003-01-24 Thread sniper
 ID:   21862
 Updated by:   [EMAIL PROTECTED]
-Summary:  includes stopped working
 Reported By:  [EMAIL PROTECTED]
 Status:   Feedback
 Bug Type: HTTP related
 Operating System: Debian/libc-2.3.1,-2.2.5
 PHP Version:  4.3.0
 New Comment:

restored mangled summary.


Previous Comments:


[2003-01-24 10:38:06] [EMAIL PROTECTED]

Please see cgi.rfc2616_headers setting in your php.ini and see if
turning than on will solve your problem?



[2003-01-24 09:18:37] [EMAIL PROTECTED]

This is probably because you are using the CLI version
and not the CGI version.

Could you please post a /usr/local/bin/php430 -v ?



[2003-01-24 08:04:52] [EMAIL PROTECTED]

With PHP-CGI 4.3.0 a header("HTTP/1.x NNN Response"); is not passed
from within the script. I discovered that using Nanoweb (the PHP
webserver) running below an Apache 1.3.xx (using a wrapper script to
accomplish that).

I've used the CGI SAPI in a more usual .cgi fashion: the script was
called "nph-nww.cgi" (containing a "#!/usr/local/bin/php430"
interpreter line at the top, and it was correctly chmoded 755). Such
"nph-.cgi" scripts are treated specially by Apache. Apache does not
reparse the header()s of such .cgi's as it usually does. And now the
script  actually did send a header("HTTP/1.1 200 OK\n"); but this was
not passed by this PHP-CGI-4.3.0 and Apache (because enforced not to
parse this .cgi's headers for performance reasons) did not add it of
course -> so the whole HTTP response now violates the HTTP (because the
response then begun with an arbitrary header - "Date:" in my case).

This bug occourse for PHP-CGI-5.0.0-dev as well, while previous
versions (I tested 4.2.3) passed the "HTTP/1.1" header correctly (same
script - no changes!!).

The script does something like this:
(Note it must be called "nph-whatever.cgi" to test the bug it with
Apache):
#!/usr/local/bin/php5
";
?>

Even if Apache gracefully adds the HTTP/1.1 header, this is a bug - and
I really would dislike to be enforced to use the CLI SAPI version for
CGI scripting from now on :(





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




#21853 [Fbk->Bgs]: includes stopped working

2003-01-24 Thread sniper
 ID:   21853
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Feedback
+Status:   Bogus
 Bug Type: *Directory/Filesystem functions
 Operating System: Windows XP
 PHP Version:  4.3.0
 New Comment:

Not a bug, expected behaviour.



Previous Comments:


[2003-01-24 07:51:33] [EMAIL PROTECTED]

When you use include("/some/path"); you are using
the absolute path in the file system, not the relative
path to your webroot.

With your example the file have to be located in
X:\includes\login_code.php where X is the drive where
your webroot is located.



[2003-01-23 19:53:08] [EMAIL PROTECTED]

Since I upgraded to PHP 4.3, all of the includes on my Web sites quite
working (hundereds of them).

I've tried poking around in the php/ini file; modifying include_path
and what not and finally had to give up and go back to last 4.2
version.

Here is an example of what does not work (I get a warning saying that
it cannot find the file).


If I modify this so that the link to relative to the current document
it works fine.


What gives?




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




#21444 [Opn->Bgs]: Asort output not fully sorted in mixed type array with BOOLEANs

2003-01-24 Thread sniper
 ID:   21444
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Bogus
 Bug Type: Arrays related
 Operating System: Windows XP Pro Build 2600
 PHP Version:  4.3.0
 New Comment:

NOT a bug.



Previous Comments:


[2003-01-21 06:01:13] [EMAIL PROTECTED]

Following on from my comments in Bug #21728, I've analysed this sort
tooo and, believe it or not, this is actually a correct sort for the
default SORT_REGULAR sort type!!  This is because of the non-sequential
order that comparisons are done, and the automatic type-conversion that
occurs for those comparisons.

In this case, all non-null strings are cast to (bool)true when
comparing with a bool, so that true=="a" and true=="b" and true=="c"
and  This gives you the strange result you see, where your genuine
Boolean true values can be distributed anywhere within your otherwise
correctly sorted strings.

Producing the same breakdown for (a slightly shortened version of) this
array as I did for the arrays in #21728 gives:

  'a'  : 'a'   ==>  (string) 'a'  == 'a'
  'a'  : true  ==>  (bool)   true == true
  true : 'a'   ==>  (bool)   true == true
  'a'  : true  ==>  (bool)   true == true
  true : 'a'   ==>  (bool)   true == true
  'a'  : 'a'   ==>  (string) 'a'  == 'a'
  'a'  : true  ==>  (bool)   true == true
  true : 'b'   ==>  (bool)   true == true
  'b'  : 'b'   ==>  (string) 'b'  == 'b'
  'b'  : true  ==>  (bool)   true == true
  true : 'b'   ==>  (bool)   true == true
  'b'  : true  ==>  (bool)   true == true
  true : true  ==>  (bool)   true == true
  true : 'b'   ==>  (bool)   true == true
  'b'  : 'b'   ==>  (string) 'b'  == 'b'

And yet another surprise -- every comparison of neighbouring elements
in that sorted array is an equality -- no single comparison yields a
less-than result, even though the 'a's are all correctly sorted before
the 'b's!!

I think the moral here is not to use the SORT_REGULAR sort type when
you have mixed-type elements in the array.  In this case, you might
possibly get an acceptable result by specifying the SORT_STRING sort
type, as false would compare as "" and true as "1" -- only a problem if
those values also occur naturally (either as strings or numbers) in the
array.  The other option would be to use usort() with a callback that
checks types before doing a value comparison.

But anyway, I agree, not a PHP bug -- more a curiosity of its design!

Cheers!

Mike



[2003-01-18 12:07:14] [EMAIL PROTECTED]

I have to disagree with you. Indeed, if it is the array you tested,
these results are correct. Fill an array with multiple instances of
identical values like the ones in the original example, and the boolean
trues (output as '1') are distributed in a unpredictable way across
some -not all- of the subsets of other values. Example:
a a a a 1 a a 1 a a a 1 b b b b b b 1 b 1 1 b b b  and so on.

I agree with you using multiple types in an array can be tricky, but
the results I got just should not occur. Another (unrealistic imho)
option would be to just say: don't use mixed type arrays, but I would
expect this is not the way PHP should be heading.



[2003-01-18 10:15:10] [EMAIL PROTECTED]

  IMO this is not PHP problem but the way the compares are done. You
have to master the type juggling to see that the result is correct. I
have reduced your testcase to this :


The output is :
array(10) {
  [0]=>
  bool(true)
  [1]=>
  int(4)
  [2]=>
  string(1) "4"
  [3]=>
  string(4) "TRUE"
  [4]=>
  string(1) "a"
  [5]=>
  string(1) "b"
  [6]=>
  string(1) "c"
  [7]=>
  string(1) "d"
  [8]=>
  string(4) "true"
  [9]=>
  int(5)
}
It may look strange - why (int)5 is after all the strings. This is
because "4" is lower than (int) 5, "4" is before "true" and "true" is
before 5. The first 2 are obvious, the third one is not. But it is ok.
It's better not to mix types in the array. If 5 is changed to "5" then
"5" goes right after "4".

Bogusifying




[2003-01-05 16:44:32] [EMAIL PROTECTED]

Last addition: I meant sort() where I used asort(), but the result is
the same



[2003-01-05 16:32:32] [EMAIL PROTECTED]

Well, it appears to be only related to the BOOLEAN array item. Removing
that from the original array leaves a perfectly sorted array as far as
I can see now.



The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/21444

-- 
Edit this bug report at http://bu

#21795 [Opn->Csd]: Undeclared statement in oci8.c

2003-01-24 Thread sniper
 ID:   21795
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Closed
 Bug Type: OCI8 related
 Operating System: Redhat 7.1
 PHP Version:  4.3.0
 New Comment:

This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.




Previous Comments:


[2003-01-24 01:28:33] [EMAIL PROTECTED]

Oracle8i Enterprise Edition Release 8.1.5.0.0 - Production
With the Partitioning and Java options
PL/SQL Release 8.1.5.0.0 - Production



[2003-01-23 10:34:09] [EMAIL PROTECTED]

And the used Oracle version here is?




[2003-01-21 08:37:57] [EMAIL PROTECTED]

When building php4.3.0 with option --with-oci8 I get the following
error message when running 'make'

/bin/sh libtool --silent --mode=compile gcc  -Iext/oci8/
-I/usr/src/php-4.3.0/ext/oci8/ -DPHP_ATOM_INC
-I/usr/src/php-4.3.0/include -I/usr/src/php-4.3.0/main
-I/usr/src/php-4.3.0 -I/usr/src/php-4.3.0/Zend
-I/usr/local/include/libxml2 -I/usr/local/include
-I/usr/oracle/rdbms/demo -I/usr/oracle/network/public
-I/usr/oracle/plsql/public -I/usr/src/php-4.3.0/ext/xml/expat 
-DLINUX=22 -DEAPI -DEAPI_MM -DEAPI_MM_CORE_PATH=/var/run/httpd.mm
-I/usr/src/php-4.3.0/TSRM  -g -O2  -prefer-pic -c
/usr/src/php-4.3.0/ext/oci8/oci8.c -o ext/oci8/oci8.lo 
/usr/src/php-4.3.0/ext/oci8/oci8.c: In function `zif_ocierror':
/usr/src/php-4.3.0/ext/oci8/oci8.c:4266: `OCI_ATTR_STATEMENT'
undeclared (first use in this function)
/usr/src/php-4.3.0/ext/oci8/oci8.c:4266: (Each undeclared identifier is
reported only once
/usr/src/php-4.3.0/ext/oci8/oci8.c:4266: for each function it appears
in.)
make: *** [ext/oci8/oci8.lo] Error 1

PHP 4.2.3 works fine with the same configure options.

(./configure --prefix=/usr --with-config-file-path=/etc --enable-pic
--enable-shared --enable-inline-optimization --with-apxs=/usr/sbin/apxs
--with-exec-dir=/usr/bin --with-regex=system --with-gettext --with-gd
--with-jpeg=/usr --with-png --with-zlib --with-gdbm --enable-debugger
--enable-magic-quotes --enable-safe-mode --enable-sockets
--enable-sysvsem --enable-sysvshm --enable-track-vars --enable-yp
--enable-ftp --enable-wddx --with-mysql --with-oci8 --with-xml
--enable-sigchild --with-ldap --with-expat --enable-xslt
--with-xslt-sablot --with-dom --with-pear)




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




#20320 [Opn->Csd]: _call() crashes with bus error in some circumstances

2003-01-24 Thread sniper
 ID:   20320
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Closed
 Bug Type: Zend Engine 2 problem
 Operating System: OS X 10.2
 PHP Version:  4CVS-2002-11-08
 New Comment:

works -> closed.



Previous Comments:


[2003-01-23 14:41:53] [EMAIL PROTECTED]

All test cases work fine now.



[2003-01-22 17:50:09] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip





[2002-11-08 16:52:04] [EMAIL PROTECTED]

some kind of hashtable problem, looks like. variations on a simple
command-line class definition crash with a bus error, trying to catch
undefined method call with a __call() method.
here is backtrace showing some things that work and some that don't:

(gdb) r -r 'class foo { function __call($m,$a) { echo "abcdefg\n";
return; } } $x = new foo; $x->nothere();'
Starting program: /usr/local/book/php4-ze2/sapi/cli/php -r 'class foo {
function __call($m,$a) { echo "abcdefg\n"; return; } } $x = new foo;
$x->nothere();'
[Switching to process 21057 thread 0x3413]
abcdefg

Program exited normally.
(gdb) r -r 'class foo { function __call($m,$a) { echo "abcdef\n";
return; } } $x = new foo; $x->nothere();'
Starting program: /usr/local/book/php4-ze2/sapi/cli/php -r 'class foo {
function __call($m,$a) { echo "abcdef\n"; return; } } $x = new foo;
$x->nothere();'
[Switching to process 21062 thread 0x3713]

Program received signal EXC_BAD_ACCESS, Could not access memory.
0x001c06e0 in _zend_is_inconsistent (ht=0x0, file=0x208d38
"/Users/tater/book/php4-ze2/Zend/zend_hash.c", line=871) at
/Users/tater/book/php4-ze2/Zend/zend_hash.c:78
78  if (ht->inconsistent==HT_OK) {
(gdb) bt
#0  0x001c06e0 in _zend_is_inconsistent (ht=0x0, file=0x208d38
"/Users/tater/book/php4-ze2/Zend/zend_hash.c", line=871) at
/Users/tater/book/php4-ze2/Zend/zend_hash.c:78
#1  0x001c3a9c in zend_hash_find (ht=0x0, arKey=0x6eda60 "__call",
nKeyLength=7, pData=0xb284) at
/Users/tater/book/php4-ze2/Zend/zend_hash.c:871
#2  0x001aab38 in call_user_function_ex (function_table=0x0,
object_pp=0x0, function_name=0xb340, retval_ptr_ptr=0xb360,
param_count=2, params=0xb358, no_separation=0, symbol_table=0x0) at
/Users/tater/book/php4-ze2/Zend/zend_execute_API.c:558
#3  0x001cfb54 in zend_std_call_user_call (ht=0, return_value=0x6ed958,
this_ptr=0x0, return_value_used=0) at
/Users/tater/book/php4-ze2/Zend/zend_object_handlers.c:353
#4  0x001da1f0 in zend_do_fcall_common_helper (execute_data=0xb5c8,
op_array=0x6ed1b8) at
/Users/tater/book/php4-ze2/Zend/zend_execute.c:2422
#5  0x001da900 in zend_do_fcall_by_name_handler
(execute_data=0xb5c8, op_array=0x6ed1b8) at
/Users/tater/book/php4-ze2/Zend/zend_execute.c:2514
#6  0x001d3adc in execute (op_array=0x6ed1b8) at
/Users/tater/book/php4-ze2/Zend/zend_execute.c:1194
#7  0x001ab8b0 in zend_eval_string (str=0xbbf1 "class foo {
function __call($m,$a) { echo \"abcdef\\n\"; return; } } $x = new foo;
$x->nothere();", retval_ptr=0x0, string_name=0x20a790 "Command line
code") at /Users/tater/book/php4-ze2/Zend/zend_execute_API.c:757
#8  0x001e47c0 in main (argc=3, argv=0xbb1c) at
/Users/tater/book/php4-ze2/sapi/cli/php_cli.c:743
#9  0x1a44 in _start ()
#10 0x1874 in start ()
(gdb) r -r 'class foo { function __call($m,$a) { echo "abcdefg\n";  } }
$x = new foo; $x->nothere();'
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /usr/local/book/php4-ze2/sapi/cli/php -r 'class foo {
function __call($m,$a) { echo "abcdefg\n";  } } $x = new foo;
$x->nothere();'
[Switching to process 21067 thread 0x3d0f]

Program received signal EXC_BAD_ACCESS, Could not access memory.
0x001c06e0 in _zend_is_inconsistent (ht=0x0, file=0x208d38
"/Users/tater/book/php4-ze2/Zend/zend_hash.c", line=871) at
/Users/tater/book/php4-ze2/Zend/zend_hash.c:78
78  if (ht->inconsistent==HT_OK) {
(gdb) r -r 'class foo { function __call($m,$a) { echo "abcdef\n";  } }
$x = new foo; $x->nothere();'
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /usr/local/book/php4-ze2/sapi/cli/php -r 'class foo {
function __call($m,$a) { echo "abcdef\n";  } } $x = new foo;
$x->nothere();'
[Switching to process 21072 thread 0x400b]

Program received signal EXC_BAD_ACCESS, Could not access memory.
0x001c06e0 in _zend_is_inconsistent (ht=0x0, file=0x208d38
"/Users/tater/book/php4-ze2/Zend/zend_hash.c", line=871) at
/Users/tater/book/php4-ze2/Zend/zend_hash.c:78
78  if (ht->inconsistent==HT_OK) {
(gdb) r -r 'clas

#21864 [NEW]: Apache 1.3.27 core dumps when PHP 4.3.0 is activated via LoadModule

2003-01-24 Thread purerory
From: [EMAIL PROTECTED]
Operating system: AIX 5.1
PHP version:  4.3.0
PHP Bug Type: Apache related
Bug description:  Apache 1.3.27 core dumps when PHP 4.3.0 is activated via LoadModule

PHP configured with IBM DB2, operating fine as a CLI
Compiled with VAC, no gcc or gdb on this system
(Bug #20677 - compile probs, shows build history)
---
./configure --with-apxs=/opt/freeware/apache/bin/apxs \
--enable-track-vars --enable-versioning \
--with-ibm-db2=/home/db2inst1/sqllib --sysconfdir=/etc \
--enable-force-cgi-redirect --enable-c9x-inline \
--with-openssl --with-mysql=/opt/freeware/
---
/usr/sbin/apachectl[163]: 29560 Segmentation fault(coredump)
# dbx /opt/freeware/apache/bin/httpd core
Type 'help' for help.
reading symbolic information ...
[using memory image in core]

Segmentation fault in php_xbithack_handler_52_28 at 0xd4d68cd4 ($t1)
0xd4d68cd4 (php_xbithack_handler_52_28+0xdc) 800clwz  
r0,0x0(r12)
(dbx) where 
php_xbithack_handler_52_28() at 0xd4d68cd4
php_create_dir() at 0xd4d675b8
ap_single_module_configure() at 0x1000eae0
load_module() at 0x10043a8c
invoke_cmd() at 0x1000b414
ap_handle_command() at 0x1000cdfc
ap_srm_command_loop() at 0x1000eb5c
ap_process_resource_config() at 0x1000d7e0
ap_read_config() at 0x1000e9c4
http_main.main() at 0x1740
(dbx)
--
Output of phpinfo (commandline)

PHP Version => 4.3.0-dev

System => AIX camoabdc01 1 5 000762384C00
Build Date => Dec 12 2002 10:39:08
Configure Command =>  './configure'
'--with-apxs=/opt/freeware/apache/bin/apxs' '--enable-track-vars'
'--enable-versioning' '--with-ibm-db2=
/home/db2inst1/sqllib' '--sysconfdir=/etc' '--enable-force-cgi-redirect'
'--enable-c9x-inline' '--with-openssl' '--with-mysql=/opt/freeware/
'
Server API => Command Line Interface
Virtual Directory Support => disabled
Configuration File (php.ini) Path => /etc/php.ini
PHP API => 20020918
PHP Extension => 20020429
Zend Extension => 20021010
Debug Build => no
Thread Safety => disabled
Registered PHP Streams => php, http, ftp, https, ftps 
-- 
Edit bug report at http://bugs.php.net/?id=21864&edit=1
-- 
Try a CVS snapshot: http://bugs.php.net/fix.php?id=21864&r=trysnapshot
Fixed in CVS:   http://bugs.php.net/fix.php?id=21864&r=fixedcvs
Fixed in release:   http://bugs.php.net/fix.php?id=21864&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=21864&r=needtrace
Try newer version:  http://bugs.php.net/fix.php?id=21864&r=oldversion
Not developer issue:http://bugs.php.net/fix.php?id=21864&r=support
Expected behavior:  http://bugs.php.net/fix.php?id=21864&r=notwrong
Not enough info:http://bugs.php.net/fix.php?id=21864&r=notenoughinfo
Submitted twice:http://bugs.php.net/fix.php?id=21864&r=submittedtwice
register_globals:   http://bugs.php.net/fix.php?id=21864&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=21864&r=php3
Daylight Savings:   http://bugs.php.net/fix.php?id=21864&r=dst
IIS Stability:  http://bugs.php.net/fix.php?id=21864&r=isapi
Install GNU Sed:http://bugs.php.net/fix.php?id=21864&r=gnused




#21862 [Com]: CGI SAPI header("HTTP/1.1 CODE Response") not passed

2003-01-24 Thread mario17
 ID:   21862
 Comment by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Feedback
 Bug Type: HTTP related
 Operating System: Debian/libc-2.3.1,-2.2.5
 PHP Version:  4.3.0
 New Comment:

I've (now) tried the
cgi.rfc2616_headers=1
(also using "on" and "On") but it didn't work anyway, and PHP
really did read the php.ini containing this setting.

I've tried the switch also with the 5.0.0-dev-lastweek but this
didn't show any changes too.

So these are the headers, if I use the "nph-script" to run Nanoweb
below Apache with all scripts running inside CGI-4.3.0:
(This is the "page info" from the w3m browser, as wget refused to work
due to the missing HTTP/1.x)

Date: Fri, 24 Jan 2003 17:49:27 GMT
Server: aEGiS_nanoweb/2.0.1.dev.20030113 (Linux; PHP/4.3.0)
X-Subserver-Wrapper: cgi-nanoweb/2.0.1-dev
Content-type: text/html; charset=iso-8859-1
X-Powered-By: PHP/4.3.0
Last-Modified: Fri, 24 Jan 2003 17:49:26 GMT
Expires: Sat, 25 Jan 2003 01:49:26 GMT
Connection: close


This is the same wrapper script running inside the CGI-4.2.3:
- the Powered-By is from another subsubscript (this really does not
matter for the problem)
- I've changed the "OK" to "OK-FROM-NANOWEB" to show that this really
comes from Nanoweb, as I feared Apache overwriting this field

HTTP/1.1 200 OK-FROM-NANOWEB
Date: Fri, 24 Jan 2003 18:05:43 GMT
Server: aEGiS_nanoweb/2.0.1.dev.20030113 (Linux; PHP/4.2.3)
X-Subserver-Wrapper: cgi-nanoweb/2.0.1-dev
Content-type: text/html; charset=iso-8859-1
X-Powered-By: PHP/4.3.0
Last-Modified: Fri, 24 Jan 2003 18:05:42 GMT


So if I don't use the "nph-" feature of apache, and run the script
as ordinary cgi (with 4.3.0) apache then will reparse the headers
and will gracefuly fix it by prepending a "HTTP/1.1 200 OK" on top
of it.
Because from inside the script (4.3.0) never such a CGI headline
reaches Apache the response will always contain "200 OK" regardless
of what the script says.

-

Here is the (shortened) output of phpinfo() inside the nph-script,
yes it is really the CGI version:


System => Linux yoco.erphesfurt.de 2.4.18 #17 Mit Dez 25 19:01:37 CET
2002 i586
Build Date => Jan 10 2003 00:34:31
Configure Command =>  './configure' '--prefix=/usr/local/'
'--sysconfdir=/etc/php4' '--with-config-file-path=/etc/php4'
'--disable-cli' '--with-cgi' '--without-pear' '--disable-magic-quotes'
'--with-zlib' '--with-dba' '--with-dio' '--with-dom' '--enable-ftp'
'--with-gd' '--with-ming' '--with-mysql'
'--with-mysql-sock=/var/run/mysqld/mysqld.sock' '--with-ncurses'
'--with-pcre-regex' '--enable-pcntl' '--enable-posix'
'--enable-sockets' '--enable-yp' '--with-gnu-ld'
'--with-tsrm-pthreads'
Server API => CGI
Virtual Directory Support => disabled
Configuration File (php.ini) Path => /etc/php4/php.ini
PHP API => 20020918
PHP Extension => 20020429
Zend Extension => 20021010
Debug Build => no
Thread Safety => disabled
Registered PHP Streams => php, http, ftp, compress.zlib

This program makes use of the Zend Scripting Language Engine:
Zend Engine v1.3.0, Copyright (c) 1998-2002 Zend Technologies

Configuration

PHP Core

Directive => Local Value => Master Value
allow_call_time_pass_reference => Off => Off
always_populate_raw_post_data => On => On
define_syslog_variables => On => On
disable_functions => no value => no value
display_errors => On => On
display_startup_errors => On => On
doc_root => no value => no value
enable_dl => On => On
expose_php => On => On
extension_dir => /etc/php4/ => /etc/php4/
file_uploads => On => On
gpc_order => GPC => GPC
ignore_user_abort => Off => Off
implicit_flush => On => On
include_path => .: => .:
magic_quotes_gpc => Off => Off
magic_quotes_runtime => Off => Off
max_execution_time => 30 => 30
max_input_time => -1 => -1
output_buffering => no value => no value
output_handler => no value => no value
register_argc_argv => On => On
register_globals => On => On
report_memleaks => On => On
safe_mode => Off => Off
short_open_tag => On => On
track_errors => On => On
unserialize_callback_func => no value => no value
variables_order => GPCS => GPCS
y2k_compliance => Off => Off

ctype functions => enabled
FTP support => enabled
ncurses support => enabled
User-Space Object Overloading Support => enabled
pcntl support => enabled
posix Revision => $Revision: 1.51 $
Sockets Support => enabled
YP Support => enabled
ZLib Support => enabled Compiled Version => 1.1.4


Previous Comments:


[2003-01-24 11:26:53] [EMAIL PROTECTED]

restored mangled summary.



[2003-01-24 10:38:06] [EMAIL PROTECTED]

Please see cgi.rfc2616_headers setting in your php.ini and see if
turning than on will solve your problem?



[2003-01-24 09:18:37] [EMA

#21855 [Fbk->Opn]: Likely threading issue: Crash when using Apache 2.0 (worker model)

2003-01-24 Thread roshan_naik
 ID:   21855
 User updated by:  [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Feedback
+Status:   Open
 Bug Type: Reproducible crash
 Operating System: HPUX 11.00
 PHP Version:  4.2.3
 New Comment:

No modules (besides the default) have been compiled into php. 

Why has the bug report status been changed to "Feedback" ?


Previous Comments:


[2003-01-24 09:50:11] [EMAIL PROTECTED]

What php modules do you have compiled?



[2003-01-23 20:24:24] [EMAIL PROTECTED]

Following Problem noticed when using Apache 2.0 built with the worker
model. This problem is not seen on Apache 2.0 (prefork) or Apache 1.3.

A crash is noticed with the following entry in the Apache error_log
when main page (index.php) of phpMyAdmin is accessed...

[notice] child pid 26712 exit signal Illegal instruction (4)


-- GDB analysis --


Here's a short analysis. I attached with gdb to the httpd process and
then reloaded the page:

Program received signal SIGBUS, Bus error.
[Switching to thread 2 (system thread 4353)]
0xc0208700 in __thread_mutex_lock+0x10 () from /usr/lib/libc.2
(gdb) info threads
  27 system thread 4378  0xc01f9cc8 in _semop_sys+0x10 () from
/usr/lib/libc.2
  26 system thread 4377  warning: reading `r3' register: No data
0xc01f5100 in __ksleep+0x10 () from /usr/lib/libc.2
   :
0xc01f5100 in __ksleep+0x10 () from /usr/lib/libc.2
  3 system thread 4354  warning: reading `r3' register: No data
0xc01f5100 in __ksleep+0x10 () from /usr/lib/libc.2
* 2 system thread 4353  0xc0208700 in __thread_mutex_lock+0x10 () from
/usr/lib/libc.2
  1 system thread 4351  warning: reading `r3' register: No data
0xc01f6ed0 in _read_sys+0x10 () from /usr/lib/libc.2

(gdb) bt
#0  0xc0208700 in __thread_mutex_lock+0x10 () from /usr/lib/libc.2
#1  0xc0184690 in mallinfo+0xa04 () from /usr/lib/libc.2
#2  0xc0182330 in __thread_callback_np+0x624 () from /usr/lib/libc.2
#3  0xc0187e7c in malloc+0x198 () from /usr/lib/libc.2
#4  0xc267fb24 in virtual_file_ex+0xb4 () from
/opt/hpapache2/modules/libphp4.so
#5  0xc25b5d64 in expand_filepath+0x74 () from
/opt/hpapache2/modules/libphp4.so
#6  0xc25b4d78 in php_fopen_and_set_opened_path+0x78 () from
/opt/hpapache2/modules/libphp4.so
#7  0xc25b58a8 in php_fopen_with_path+0x2f0 () from
/opt/hpapache2/modules/libphp4.so
#8  0xc25b5b70 in php_fopen_url_wrapper+0x250 () from
/opt/hpapache2/modules/libphp4.so
#9  0xc25b4f14 in php_fopen_wrapper+0x124 () from
/opt/hpapache2/modules/libphp4.so
#10 0xc25b031c in php_fopen_wrapper_for_zend+0x84 () from
/opt/hpapache2/modules/libphp4.so
#11 0xc2567034 in open_file_for_scanning+0x54 () from
/opt/hpapache2/modules/libphp4.so
#12 0xc2567368 in compile_file+0xc8 () from
/opt/hpapache2/modules/libphp4.so
#13 0xc2567644 in compile_filename+0xac () from
/opt/hpapache2/modules/libphp4.so
#14 0xc258acd8 in execute+0x7ad8 () from
/opt/hpapache2/modules/libphp4.so
(gdb) disas
0xc02086f0 <__thread_mutex_lock>:   stw %rp,-0x14(%sp)
0xc02086f4 <__thread_mutex_lock+4>: ldo 0x40(%sp),%sp
0xc02086f8 <__thread_mutex_lock+8>: addil L'-0x800,%r19,%r1
0xc02086fc <__thread_mutex_lock+12>:ldw 0x390(%r1),%r24
0xc0208700 <__thread_mutex_lock+16>:stw %r19,-0x20(%sp)
0xc0208704 <__thread_mutex_lock+20>:ldw 0(%r24),%r31
   :
(gdb)p/x $sp
$1 = 0x7eedd030
(gdb) x/x $sp
0x7eedd030: Error accessing memory address 0x7eedd030: Bad
address.

Is 0x7eedd030 a valid stack address?

0x8000 - 0x7eedd030 = 0x01122FD0
maxssiz   0X0100

So not for the process stack. Maybe it is within a thread stack?

(gdb) info frame
Stack level 0, frame at 0x7eedcff0:
 pcoqh = 0xc0208700 in __thread_mutex_lock; saved pcoqh 0xc0184690
 called by frame at 0x7eedceb0
 Arglist at 0x7eedcff0, args:last
known
 Locals at 0x7eedcff0, Previous frame's sp cis 0x7eedcff0 <== valid
stack
 Saved registers:address
  rp at 0x7eedcfdc
(gdb) x/x 0x7eedcff0
0x7eedcff0: 0x
(gdb) x/x 0x7eedd000
0x7eedd000: Error accessing memory address 0x7eedd000: Bad
address.

So 0x7eedcff0 is valid, but 0x7eedd000 is not (only 16 bytes
difference). Looks like we crossed the end of the thread stack. 




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




#21865 [NEW]: ifx_pconnect caused segmentation fault

2003-01-24 Thread novicky
From: [EMAIL PROTECTED]
Operating system: Solaris
PHP version:  4.3.0
PHP Bug Type: Reproducible crash
Bug description:  ifx_pconnect caused segmentation fault

When using ifx_pconnect with no user provided and if there is no default
user defined, than the user is treat as NULL pointer. This pointer is
passed to sprintf to construct unique ID of persistant connection. This
would cause segmentation fault on Solaris libc.
-- 
Edit bug report at http://bugs.php.net/?id=21865&edit=1
-- 
Try a CVS snapshot: http://bugs.php.net/fix.php?id=21865&r=trysnapshot
Fixed in CVS:   http://bugs.php.net/fix.php?id=21865&r=fixedcvs
Fixed in release:   http://bugs.php.net/fix.php?id=21865&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=21865&r=needtrace
Try newer version:  http://bugs.php.net/fix.php?id=21865&r=oldversion
Not developer issue:http://bugs.php.net/fix.php?id=21865&r=support
Expected behavior:  http://bugs.php.net/fix.php?id=21865&r=notwrong
Not enough info:http://bugs.php.net/fix.php?id=21865&r=notenoughinfo
Submitted twice:http://bugs.php.net/fix.php?id=21865&r=submittedtwice
register_globals:   http://bugs.php.net/fix.php?id=21865&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=21865&r=php3
Daylight Savings:   http://bugs.php.net/fix.php?id=21865&r=dst
IIS Stability:  http://bugs.php.net/fix.php?id=21865&r=isapi
Install GNU Sed:http://bugs.php.net/fix.php?id=21865&r=gnused




#21865 [Opn->Asn]: ifx_pconnect caused segmentation fault

2003-01-24 Thread iliaa
 ID:   21865
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Assigned
 Bug Type: Reproducible crash
 Operating System: Solaris
 PHP Version:  4.3.0
-Assigned To:  
+Assigned To:  iliaa


Previous Comments:


[2003-01-24 12:46:49] [EMAIL PROTECTED]

When using ifx_pconnect with no user provided and if there is no
default user defined, than the user is treat as NULL pointer. This
pointer is passed to sprintf to construct unique ID of persistant
connection. This would cause segmentation fault on Solaris libc.




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




#16043 [Com]: $_SESSION can't use in PHP 4.1.2

2003-01-24 Thread sbeam
 ID:   16043
 Comment by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Closed
 Bug Type: Session related
 Operating System: Windows XP
 PHP Version:  4.1.2
 New Comment:

rant rant rant rant rant rant rant. I have a splitting headache thanks
to this bug - thought it was DESIGNED that way until I found this
report. You should send out aspirin and cake to everyone who uses
Redhat 7.3 as the php RPM as of RIGHT NOW is 4.1.2.


Previous Comments:


[2003-01-15 00:33:55] [EMAIL PROTECTED]

OK - Here's what I'm getting on my windows box running PHP 4.0.5 , and
also, the simple scripted fix I came up with for it:

Symptoms:

It looks like the $HTTP_SESSION_VARS array does indeed contain values
from the session, but values set in the array during the process are
not written into the session. You can only update the session data by
modifying the global literals.

So:

session_register('arse');
$arse = 'working';

Would add $arse to the session data, and the $HTTP_SESSION_VARS;

But:

$HTTP_SESSION_VARS['arse'] = 'working';

Only adds it to the $HTTP_SESSION_VARS array, and not the actual
session data, so the value only exists for the duration of the script
execution.


HERE'S MY FIX
This works on my scripts:
Do a kind of backwards iteration over the $HTTP_SERVER_VARS array at
the end of the script. I've placed the following into the end of /cms
and /content on my windows machine:

// $HTTP_SESSION_VARS bugfix
while(list($key , $value) = each($HTTP_SESSION_VARS)){
session_register($key);
$$key = $value;
}


Hope this helps somebody.

--
Bluefoot
http://bluefootproject.com



[2002-04-11 13:55:02] [EMAIL PROTECTED]

Same problem, running W2k sp2, IIS5 and PHP 4.1.2 as CGI module

Only first $_SESSION variable appear. Subsequent session variables are
ignored (not set)



[2002-03-21 19:51:52] [EMAIL PROTECTED]

Everyone,
Please note what didn't work with what kind of code/configuration.

There are many cases that session does not work as it should.

DO NOT ADD ANY ADDIOTIONA COMMENTS.
Report _NEW_ one if you are sure, your problem is _NEW_.




[2002-03-21 18:47:02] [EMAIL PROTECTED]

FYI:

I've tried 4.2 RC1 and (at least for me) It is not solving this
problem.  Has anyone else gotten sessions to work properly on win2000
platform, apache module, and 4.2RC1 ?

Erik



[2002-03-20 04:37:08] [EMAIL PROTECTED]

This bug is closed, because it's fixed in the development branch. You
can't expect us to make patches for every bug for every release.
4.2.0RC1 is coming out today, windows binaries will follow shortly.
With this RC you can if the bug is fixed without having to play with
building PHP yourself.

Derick



The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/16043

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




#16043 [Com]: $_SESSION can't use in PHP 4.1.2

2003-01-24 Thread sbeam
 ID:   16043
 Comment by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Closed
 Bug Type: Session related
 Operating System: Windows XP
 PHP Version:  4.1.2
 New Comment:

ok I will ask Redhat to send the aspirin and cake


Previous Comments:


[2003-01-24 13:12:16] [EMAIL PROTECTED]

rant rant rant rant rant rant rant. I have a splitting headache thanks
to this bug - thought it was DESIGNED that way until I found this
report. You should send out aspirin and cake to everyone who uses
Redhat 7.3 as the php RPM as of RIGHT NOW is 4.1.2.



[2003-01-15 00:33:55] [EMAIL PROTECTED]

OK - Here's what I'm getting on my windows box running PHP 4.0.5 , and
also, the simple scripted fix I came up with for it:

Symptoms:

It looks like the $HTTP_SESSION_VARS array does indeed contain values
from the session, but values set in the array during the process are
not written into the session. You can only update the session data by
modifying the global literals.

So:

session_register('arse');
$arse = 'working';

Would add $arse to the session data, and the $HTTP_SESSION_VARS;

But:

$HTTP_SESSION_VARS['arse'] = 'working';

Only adds it to the $HTTP_SESSION_VARS array, and not the actual
session data, so the value only exists for the duration of the script
execution.


HERE'S MY FIX
This works on my scripts:
Do a kind of backwards iteration over the $HTTP_SERVER_VARS array at
the end of the script. I've placed the following into the end of /cms
and /content on my windows machine:

// $HTTP_SESSION_VARS bugfix
while(list($key , $value) = each($HTTP_SESSION_VARS)){
session_register($key);
$$key = $value;
}


Hope this helps somebody.

--
Bluefoot
http://bluefootproject.com



[2002-04-11 13:55:02] [EMAIL PROTECTED]

Same problem, running W2k sp2, IIS5 and PHP 4.1.2 as CGI module

Only first $_SESSION variable appear. Subsequent session variables are
ignored (not set)



[2002-03-21 19:51:52] [EMAIL PROTECTED]

Everyone,
Please note what didn't work with what kind of code/configuration.

There are many cases that session does not work as it should.

DO NOT ADD ANY ADDIOTIONA COMMENTS.
Report _NEW_ one if you are sure, your problem is _NEW_.




[2002-03-21 18:47:02] [EMAIL PROTECTED]

FYI:

I've tried 4.2 RC1 and (at least for me) It is not solving this
problem.  Has anyone else gotten sessions to work properly on win2000
platform, apache module, and 4.2RC1 ?

Erik



The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/16043

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




#21865 [Asn->Csd]: ifx_pconnect caused segmentation fault

2003-01-24 Thread iliaa
 ID:   21865
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Assigned
+Status:   Closed
 Bug Type: Reproducible crash
 Operating System: Solaris
 PHP Version:  4.3.0
 Assigned To:  iliaa
 New Comment:

This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.

The source snapshot with a fix for this bug should become avaliable on
http://snaps.php.net in about an hour.


Previous Comments:


[2003-01-24 12:46:49] [EMAIL PROTECTED]

When using ifx_pconnect with no user provided and if there is no
default user defined, than the user is treat as NULL pointer. This
pointer is passed to sprintf to construct unique ID of persistant
connection. This would cause segmentation fault on Solaris libc.




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




#21855 [Opn->Fbk]: Likely threading issue: Crash when using Apache 2.0 (worker model)

2003-01-24 Thread iliaa
 ID:   21855
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Feedback
 Bug Type: Reproducible crash
 Operating System: HPUX 11.00
 PHP Version:  4.2.3
 New Comment:

First of all please try PHP 4.3.0 or better yet the latest (stable)
snapshot. When you compile it, please use --enable-debug, as that would
produce more meaningful backtraces if the code cores.


Previous Comments:


[2003-01-24 12:45:46] [EMAIL PROTECTED]

No modules (besides the default) have been compiled into php. 

Why has the bug report status been changed to "Feedback" ?



[2003-01-24 09:50:11] [EMAIL PROTECTED]

What php modules do you have compiled?



[2003-01-23 20:24:24] [EMAIL PROTECTED]

Following Problem noticed when using Apache 2.0 built with the worker
model. This problem is not seen on Apache 2.0 (prefork) or Apache 1.3.

A crash is noticed with the following entry in the Apache error_log
when main page (index.php) of phpMyAdmin is accessed...

[notice] child pid 26712 exit signal Illegal instruction (4)


-- GDB analysis --


Here's a short analysis. I attached with gdb to the httpd process and
then reloaded the page:

Program received signal SIGBUS, Bus error.
[Switching to thread 2 (system thread 4353)]
0xc0208700 in __thread_mutex_lock+0x10 () from /usr/lib/libc.2
(gdb) info threads
  27 system thread 4378  0xc01f9cc8 in _semop_sys+0x10 () from
/usr/lib/libc.2
  26 system thread 4377  warning: reading `r3' register: No data
0xc01f5100 in __ksleep+0x10 () from /usr/lib/libc.2
   :
0xc01f5100 in __ksleep+0x10 () from /usr/lib/libc.2
  3 system thread 4354  warning: reading `r3' register: No data
0xc01f5100 in __ksleep+0x10 () from /usr/lib/libc.2
* 2 system thread 4353  0xc0208700 in __thread_mutex_lock+0x10 () from
/usr/lib/libc.2
  1 system thread 4351  warning: reading `r3' register: No data
0xc01f6ed0 in _read_sys+0x10 () from /usr/lib/libc.2

(gdb) bt
#0  0xc0208700 in __thread_mutex_lock+0x10 () from /usr/lib/libc.2
#1  0xc0184690 in mallinfo+0xa04 () from /usr/lib/libc.2
#2  0xc0182330 in __thread_callback_np+0x624 () from /usr/lib/libc.2
#3  0xc0187e7c in malloc+0x198 () from /usr/lib/libc.2
#4  0xc267fb24 in virtual_file_ex+0xb4 () from
/opt/hpapache2/modules/libphp4.so
#5  0xc25b5d64 in expand_filepath+0x74 () from
/opt/hpapache2/modules/libphp4.so
#6  0xc25b4d78 in php_fopen_and_set_opened_path+0x78 () from
/opt/hpapache2/modules/libphp4.so
#7  0xc25b58a8 in php_fopen_with_path+0x2f0 () from
/opt/hpapache2/modules/libphp4.so
#8  0xc25b5b70 in php_fopen_url_wrapper+0x250 () from
/opt/hpapache2/modules/libphp4.so
#9  0xc25b4f14 in php_fopen_wrapper+0x124 () from
/opt/hpapache2/modules/libphp4.so
#10 0xc25b031c in php_fopen_wrapper_for_zend+0x84 () from
/opt/hpapache2/modules/libphp4.so
#11 0xc2567034 in open_file_for_scanning+0x54 () from
/opt/hpapache2/modules/libphp4.so
#12 0xc2567368 in compile_file+0xc8 () from
/opt/hpapache2/modules/libphp4.so
#13 0xc2567644 in compile_filename+0xac () from
/opt/hpapache2/modules/libphp4.so
#14 0xc258acd8 in execute+0x7ad8 () from
/opt/hpapache2/modules/libphp4.so
(gdb) disas
0xc02086f0 <__thread_mutex_lock>:   stw %rp,-0x14(%sp)
0xc02086f4 <__thread_mutex_lock+4>: ldo 0x40(%sp),%sp
0xc02086f8 <__thread_mutex_lock+8>: addil L'-0x800,%r19,%r1
0xc02086fc <__thread_mutex_lock+12>:ldw 0x390(%r1),%r24
0xc0208700 <__thread_mutex_lock+16>:stw %r19,-0x20(%sp)
0xc0208704 <__thread_mutex_lock+20>:ldw 0(%r24),%r31
   :
(gdb)p/x $sp
$1 = 0x7eedd030
(gdb) x/x $sp
0x7eedd030: Error accessing memory address 0x7eedd030: Bad
address.

Is 0x7eedd030 a valid stack address?

0x8000 - 0x7eedd030 = 0x01122FD0
maxssiz   0X0100

So not for the process stack. Maybe it is within a thread stack?

(gdb) info frame
Stack level 0, frame at 0x7eedcff0:
 pcoqh = 0xc0208700 in __thread_mutex_lock; saved pcoqh 0xc0184690
 called by frame at 0x7eedceb0
 Arglist at 0x7eedcff0, args:last
known
 Locals at 0x7eedcff0, Previous frame's sp cis 0x7eedcff0 <== valid
stack
 Saved registers:address
  rp at 0x7eedcfdc
(gdb) x/x 0x7eedcff0
0x7eedcff0: 0x
(gdb) x/x 0x7eedd000
0x7eedd000: Error accessing memory address 0x7eedd000: Bad
address.

So 0x7eedcff0 is valid, but 0x7eedd000 is not (only 16 bytes
difference). Looks like we crossed the end of the thread stack. 




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




#21864 [Opn->Fbk]: Apache 1.3.27 core dumps when PHP 4.3.0 is activated via LoadModule

2003-01-24 Thread iliaa
 ID:   21864
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Feedback
 Bug Type: Apache related
 Operating System: AIX 5.1
 PHP Version:  4.3.0
 New Comment:

Please compile PHP with --enable-debug so that the backtrace contains
more information.


Previous Comments:


[2003-01-24 12:09:09] [EMAIL PROTECTED]

PHP configured with IBM DB2, operating fine as a CLI
Compiled with VAC, no gcc or gdb on this system
(Bug #20677 - compile probs, shows build history)
---
./configure --with-apxs=/opt/freeware/apache/bin/apxs \
--enable-track-vars --enable-versioning \
--with-ibm-db2=/home/db2inst1/sqllib --sysconfdir=/etc \
--enable-force-cgi-redirect --enable-c9x-inline \
--with-openssl --with-mysql=/opt/freeware/
---
/usr/sbin/apachectl[163]: 29560 Segmentation fault(coredump)
# dbx /opt/freeware/apache/bin/httpd core
Type 'help' for help.
reading symbolic information ...
[using memory image in core]

Segmentation fault in php_xbithack_handler_52_28 at 0xd4d68cd4 ($t1)
0xd4d68cd4 (php_xbithack_handler_52_28+0xdc) 800clwz  
r0,0x0(r12)
(dbx) where 
php_xbithack_handler_52_28() at 0xd4d68cd4
php_create_dir() at 0xd4d675b8
ap_single_module_configure() at 0x1000eae0
load_module() at 0x10043a8c
invoke_cmd() at 0x1000b414
ap_handle_command() at 0x1000cdfc
ap_srm_command_loop() at 0x1000eb5c
ap_process_resource_config() at 0x1000d7e0
ap_read_config() at 0x1000e9c4
http_main.main() at 0x1740
(dbx)
--
Output of phpinfo (commandline)

PHP Version => 4.3.0-dev

System => AIX camoabdc01 1 5 000762384C00
Build Date => Dec 12 2002 10:39:08
Configure Command =>  './configure'
'--with-apxs=/opt/freeware/apache/bin/apxs' '--enable-track-vars'
'--enable-versioning' '--with-ibm-db2=
/home/db2inst1/sqllib' '--sysconfdir=/etc'
'--enable-force-cgi-redirect' '--enable-c9x-inline' '--with-openssl'
'--with-mysql=/opt/freeware/
'
Server API => Command Line Interface
Virtual Directory Support => disabled
Configuration File (php.ini) Path => /etc/php.ini
PHP API => 20020918
PHP Extension => 20020429
Zend Extension => 20021010
Debug Build => no
Thread Safety => disabled
Registered PHP Streams => php, http, ftp, https, ftps 




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




#21866 [NEW]: Secure LDAP bind fails

2003-01-24 Thread fehr
From: [EMAIL PROTECTED]
Operating system: Win2000
PHP version:  4CVS-2003-01-24 (stable)
PHP Bug Type: LDAP related
Bug description:  Secure LDAP bind fails

There seems to be a bug to connect SECURE to an LDAP server.

The following script is working fine if I connect using the ldap://
protocol. However, connecting to the LDAP server through SSL (ldaps://)
the bind fails with the error "DSA is unwilling to perform (Error 53)"

The LDAP server is configured for SSL.

function checkerror( $ldap, $stepinfo )
{
if (ldap_errno($ldap) != 0) { 
$ldaperr = ldap_errno( $ldap );
$ldapmsg = ldap_error( $ldap );
print "ERROR at $stepinfo: $ldapmsg
($ldaperr)\n";
return FALSE;
}
return TRUE;
}

function doit( $ldap_server )
{
$basedn  = "dc=mydc,o=myorg";
$searcharg   = "sn=F*";
$ldap_rdn= "uid=myname,cn=users,dc=mydc,o=myorg";
$ldap_passwd = "mypassword";

print "Connecting to ldap server $ldap_server at port
$ldap_port\n";
$ldap = ldap_connect( $ldap_server );

if( checkerror( $ldap, "ldap_connect" ) == FALSE ) { return; }

print "Binding to ldap server using rdn $ldap_rdn\n";
$bind = ldap_bind($ldap, $ldap_rdn, $ldap_passwd );

if( checkerror( $ldap, "ldap_bind" ) == FALSE ) { return; }

$mysuccess = ldap_search( $ldap, $basedn, $searcharg );

if( checkerror( $ldap, "ldap_search" ) == FALSE ) { return; }

   $sr = $mysuccess;
   $ds = $ldap;

   echo "Number of entires returned is
".ldap_count_entries($ds,$sr)."\n"; 

   $info = ldap_get_entries($ds, $sr); 
   echo "Data for ".$info["count"]." items returned:"; 

   for ($i=0; $i<$info["count"]; $i++) { 
   echo "dn is: ". $info[$i]["dn"] ."\n"; 
   echo "first cn entry is: ". $info[$i]["cn"][0] ."\n"; 
   echo "first email entry is: ". $info[$i]["mail"][0] ."\n"; 
   } 

ldap_close($ldap);
return TRUE;
}

doit( "ldap://myserver/"; );
doit( "ldaps://myserver/" );

-- 
Edit bug report at http://bugs.php.net/?id=21866&edit=1
-- 
Try a CVS snapshot: http://bugs.php.net/fix.php?id=21866&r=trysnapshot
Fixed in CVS:   http://bugs.php.net/fix.php?id=21866&r=fixedcvs
Fixed in release:   http://bugs.php.net/fix.php?id=21866&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=21866&r=needtrace
Try newer version:  http://bugs.php.net/fix.php?id=21866&r=oldversion
Not developer issue:http://bugs.php.net/fix.php?id=21866&r=support
Expected behavior:  http://bugs.php.net/fix.php?id=21866&r=notwrong
Not enough info:http://bugs.php.net/fix.php?id=21866&r=notenoughinfo
Submitted twice:http://bugs.php.net/fix.php?id=21866&r=submittedtwice
register_globals:   http://bugs.php.net/fix.php?id=21866&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=21866&r=php3
Daylight Savings:   http://bugs.php.net/fix.php?id=21866&r=dst
IIS Stability:  http://bugs.php.net/fix.php?id=21866&r=isapi
Install GNU Sed:http://bugs.php.net/fix.php?id=21866&r=gnused




#21856 [Fbk->Csd]: make fails with Undefined symbol errors

2003-01-24 Thread ghammar
 ID:   21856
 User updated by:  [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Feedback
+Status:   Closed
 Bug Type: Compile Failure
 Operating System: Solaris 7
 PHP Version:  4.3.0
 New Comment:

I am trying the latest stable version now. So far, so good. (I have a
SPARC2, so it is pretty slow.) Last night, I downloaded the 4.3.0
version again, deleted the original install area, configured it and ran
make this morning. It worked as advertized! Not sure why-something must
have been corrupted during my 15-20 previous attempts. Thanks for your
help.


Previous Comments:


[2003-01-24 09:49:39] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip

Try the unstable snap, it comes with bundled gd 2.0.11



[2003-01-23 21:52:30] [EMAIL PROTECTED]

I want to build php 4.3.0 with pgsql and gd2 support using the php
version of gd2. Configure seems to work w/o any trouble. I don't get
any errors, but when I get to the link stage, make fails.

The error is:
Undefined   first referenced
 symbol in file
gdImageJpegCtx  ext/gd/gd.lo
gdImageCreateFromJpeg   ext/gd/gd.lo
gdImageCreateFromJpegCtxext/gd/gd.lo
ld: fatal: Symbol referencing errors. No output written to
sapi/cli/php
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1

I used this configure command:

./configure --with-apxs=/usr/local/apache/bin/apxs --disable-short-tags
\
--with-gd --with-freetype-dir=/usr/local --enable-gd-native-ttf \
--enable-gd-imgstrttf --with-jpeg-dir=/usr/local --with-zlib \
--with-png-dir=/usr/local

When I search for the missing symbols, I find them in gd.h,
but it looks like those are the ones the linker is complaining about. I
downloaded gd 2.0.10 to see if I could
find the missing symbols and they appear as prototype defs in
gd.h. There is no gd.h in my distribution. Should there be?
As a last resort, I just downloaded the 4.3.0.tar.gz distro
again this evening, wiped out the old area and started fresh.
It hasn't made a difference. I also tried all of the posts in the
support section, but none of those pointers made any 
difference. I have a number of other configs that also did not work, if
you need those.




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




#21533 [Opn->Csd]: Trouble building PHP w/ GD and including ImageTTFxxx functions

2003-01-24 Thread iliaa
 ID:   21533
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Closed
 Bug Type: GD related
 Operating System: RH 7.2
 PHP Version:  4.3.0
 New Comment:

This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.




Previous Comments:


[2003-01-22 17:30:55] [EMAIL PROTECTED]

I would like to help you, but it would take some time to get my server
back in the state where the error was occurring. I have since installed
FreeType 2.x so that now things do build and work correctly.

So, I can't confirm the fact that the crash would go away. But, since
variable "error" is undefined, it easily could cause a crash. Certainly
initializing it to NULL would improve the "random" nature of undefined
variables.

My original post was meant to help out the development of PHP by
relaying my experience and pointing to specific lines of code that seem
problematic. There is clearly a mistake in the gd.c code. You may
choose not to do anything about it. And, it may not affect too many
installations, but any decent software engineer would say that the code
is risky at best.



[2003-01-22 17:08:34] [EMAIL PROTECTED]

If you change char *error; to char *error = NULL; does the segmentation
fault you are seeing go away?



[2003-01-22 13:57:11] [EMAIL PROTECTED]

The version of gd.c that I have is supposed to be 4.3.0. I still
believe it is incorrect.

If you are referring to the statement:

Line 2951:   #else /* !USE_GD_IMGSTRTTF */

that 'else' is related to a "USE_GD_IMGSTRTTF" and is not the same as
any "HAVE_GD_STRINGxxx" defines.

I'm saying that if USE_GD_IMGSTRTTF *is* defined, but neither
HAVE_GD_STRINGFT nor HAVE_GD_STRINGTTF is defined, it will leave the
variable 'error' undefined, and then try to use it (resulting in the
possibility of a crash).

Do you still disagree?



[2003-01-21 14:20:13] [EMAIL PROTECTED]

The ifdef is correct, because no matter what the value will be assigned
to error. There is another ifdef surrounding this code which has an
else condition that is used to set a value to error. So the crash you
are seeing comes from elsewhere.



[2003-01-21 09:28:38] [EMAIL PROTECTED]

PHP build:
configure --with-apxs=/usr/local/apache/bin/apxs
--with-mysql=/usr/local/mysql --enable-track-vars
--with-imap=/usr/local/imap --with-gd --enable-ftp --enable-sysvsem
--enable-sysvshm --enable-sockets --with-gettext
--with-mm=/usr/local/lib/mm --with-jpeg-dir=/usr/lib
--with-zlib-dir=/usr/local --with-openssl=/usr/local/ssl --with-ttf
--enable-gd-native-ttf --enable-gd-imgstrttf
--with-freetype-dir=/usr/local --with-dom

FreeType:
freetype-1.3.1.tar.gz was untarred and built and installed with:
configure
make
make install



The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/21533

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




#21867 [NEW]: Compile error on mysql when using mssql

2003-01-24 Thread thiele
From: [EMAIL PROTECTED]
Operating system: RedHat Linux 7.2 (2.4.18)
PHP version:  4.3.0
PHP Bug Type: MSSQL related
Bug description:  Compile error on mysql when using mssql

My configure line is:
# ./configure --with-apxs --with-mysql --with-imap=../imap-2002
--enable-track-vars --enable-calendar --with-imap-ssl
--with-mssql=../freetds-0.60

When I try to make, got the error above:
In file included from
/usr/src/telecorp/php4-STABLE-200301241830/ext/mysql/libmysql/libmysql.c:4:
/usr/src/telecorp/php4-STABLE-200301241830/ext/mysql/libmysql/global.h:260:
warning: redefinition of `uint'
/usr/include/sys/types.h:152: warning: `uint' previously declared here
/usr/src/telecorp/php4-STABLE-200301241830/ext/mysql/libmysql/global.h:261:
warning: redefinition of `ushort'
/usr/include/sys/types.h:151: warning: `ushort' previously declared here
In file included from
/usr/src/telecorp/php4-STABLE-200301241830/ext/mysql/libmysql/libmysql.c:11:
/usr/src/telecorp/php4-STABLE-200301241830/ext/mysql/libmysql/m_string.h:183:
parse error before `__extension__'
/usr/src/telecorp/php4-STABLE-200301241830/ext/mysql/libmysql/m_string.h:183:
parse error before `&&'
make: ** [ext/mysql/libmysql/libmysql.lo] Erro 1

My mysql pakages are:
mysql-devel-3.23.54a-3.72
mysql-3.23.54a-3.72
mysql-server-3.23.54a-3.72
mysqlclient9-3.23.22-8

Without the --with-mssql option I can compile php normally.


-- 
Edit bug report at http://bugs.php.net/?id=21867&edit=1
-- 
Try a CVS snapshot: http://bugs.php.net/fix.php?id=21867&r=trysnapshot
Fixed in CVS:   http://bugs.php.net/fix.php?id=21867&r=fixedcvs
Fixed in release:   http://bugs.php.net/fix.php?id=21867&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=21867&r=needtrace
Try newer version:  http://bugs.php.net/fix.php?id=21867&r=oldversion
Not developer issue:http://bugs.php.net/fix.php?id=21867&r=support
Expected behavior:  http://bugs.php.net/fix.php?id=21867&r=notwrong
Not enough info:http://bugs.php.net/fix.php?id=21867&r=notenoughinfo
Submitted twice:http://bugs.php.net/fix.php?id=21867&r=submittedtwice
register_globals:   http://bugs.php.net/fix.php?id=21867&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=21867&r=php3
Daylight Savings:   http://bugs.php.net/fix.php?id=21867&r=dst
IIS Stability:  http://bugs.php.net/fix.php?id=21867&r=isapi
Install GNU Sed:http://bugs.php.net/fix.php?id=21867&r=gnused




#21215 [Opn->Csd]: OCI8 calls not taking advantage of SHARED_MODE

2003-01-24 Thread maxim
 ID:   21215
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Closed
 Bug Type: OCI8 related
 Operating System: Linux 2.4
 PHP Version:  4.2.3
 New Comment:

This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.


>From what I see in CVS ldixon has already fixed this one himself. Will
mark it as closed.


Previous Comments:


[2002-12-27 11:23:15] [EMAIL PROTECTED]

OCIServerAttach() is used, implying that the module should take
advantage of shared data mode, but OCIInitilize() was not passed
SHARED_MODE flag (#define PHP_OCI_INIT_MODE OCI_DEFAULT), so I don't
believe it's really taking advantage of shared data mode.  Excerpt from
OCI8 docs:


To trigger OCI shared mode functionality, process handle parameters
must be set and OCIInitialize() must be called with the mode flag set
to OCI_SHARED. For example: 

ub4 mode = OCI_SHARED | OCI_THREADED;
OCIInitialize (mode, 0, 0, 0, 0);

The first application that initializes OCI in shared mode starts up the
shared subsystem using the parameters set by that OCI application. When
subsequent applications initialize using the shared mode, they use the
previously started shared subsystem.


Using this should reduce memory usage when large number of simultaneous
connections are open and large numbers of concurrent statements
(differing only by bind values) are running.

ref:
http://www.csee.umbc.edu/help/oracle8/server.815/a67846/basics.htm#425685




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




#19983 [Com]: Compile/Link failure w/Sablotron

2003-01-24 Thread llaguno
 ID:   19983
 Comment by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Bogus
 Bug Type: Compile Failure
 Operating System: Mac OS X 10.2
 PHP Version:  4.3.0-pre1
 New Comment:

Notes: fix for the libsablot.so compile errors during php-4.3.0 make:

[sablotron-0.97 with php-4.3.0 on redhat linux 8.0]

1. rpm -U expat-1.95.5-1.i386.rpm
2. rpm -i sablotron-0.97-1.i386.rpm
3. rpm -i sablotron-devel-0.97-1.i386.rpm
4. rpm -e php   //current version 4.2.2
5. remove the packages dependent on php-4.2.2 if preceding command
fails because of dependencies

6. install httpd-2.0.44
// this fixes the error related to missing file 'instdso'. note that
apache2 

7. add following line to /root/.bashrc
export LDFLAGS='-lstdc++'

// as explained earlier in this bug report, the undefined references
are in the stdc++ libraries. Pavel Hlavnicka from Ginger Alliance
suggested exporting the c++ compiler flag.

7. cd /usr/local/php/php-4.3.0
8. .configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql
--with-zlib --with-dom --with-gd --enable-xslt --with-xslt-sablot
--with-sablot-js
9. make
10. make install


Previous Comments:


[2003-01-22 23:25:58] [EMAIL PROTECTED]

Compile errors with Sablotron during php make on Redhat linux 8.0

I was just wondering if you can help me figure out the following errors

during php make.  


Note that environment is as follows:

expat-1.95.5-1

sablotron-0.97-1

php-4.2.2-8.0.5 (current, want to upgrade to 4.3.0)

httpd-2.0.40-8 (redhat linux 8.0)

The  problem occurs even after I erased the php-4.2 rpm.
-





 >  cd /usr/local/php/php-4.3.0

 > ./configure --enable-xslt --with-xslt-sablot --with-zlib

 

 > make

ext/mysql/libmysql/my_tempnam.o: In function `my_tempnam':

/usr/local/php/php-4.3.0/ext/mysql/libmysql/my_tempnam.c:103: the use
of 

`tempnam' is dangerous, better use `mkstemp'

/usr/local/lib/libsablot.so: undefined reference to `operator 

new[](unsigned)'

/usr/local/lib/libsablot.so: undefined reference to `vtable for 

__cxxabiv1::__si_class_type_info'

/usr/local/lib/libsablot.so: undefined reference to `operator
delete(void*)'

/usr/local/lib/libsablot.so: undefined reference to
`__gxx_personality_v0'

/usr/local/lib/libsablot.so: undefined reference to
`__cxa_pure_virtual'

/usr/local/lib/libsablot.so: undefined reference to `vtable for 

__cxxabiv1::__class_type_info'

/usr/local/lib/libsablot.so: undefined reference to `operator 

delete[](void*)'

/usr/local/lib/libsablot.so: undefined reference to `vtable for 

__cxxabiv1::__vmi_class_type_info'

/usr/local/lib/libsablot.so: undefined reference to `operator
new(unsigned)'

collect2: ld returned 1 exit status

make: *** [sapi/cgi/php] Error 1




> make install  --> same results as above

I would really appreciate your help.  



Thanks in advance, Manny



[2002-12-27 15:07:38] [EMAIL PROTECTED]

Just got the first 4.3.0 release and cannot build
under Solaris due to "line too long" when attempting 
make.  That is followed, of course, with millions of
undefined symbols.

my configure:

./configure \
  --with-apache=/apa/ \
  --with-jpeg-dir=/usr/local \
  --with-zlib-dir=/usr/local \
  --with-jpeg-dir=/usr/local \
  --with-png-dir=/usr/local \
  --with-gd \
  --with-oci8=/export/home/orahome \
  --enable-ftp \
  --enable-sockets \
  --with-pdflib \
  --with-ming >configure.log 2>&1 &
all goes fine until attempt "make"
(both solaris and gnu makes same)

NO DICE.



[2002-12-18 11:55:34] [EMAIL PROTECTED]

The problem __really__ is, combining gcc3 and gcc2 suite, as outlined
in this document:
http://fink.sourceforge.net/doc/porting/preparing.php

Secondly - if any warnings/errors occur as mentioned in the document
above (libtool stuff), the links to patches for those are provided. PHP
already has this covered.

The following works:
1) configure expat, using gcc2 explicetely:
CC=gcc2 \
./configure \
--prefix=/your/prefix

2) configure libiconv, the same way:
CC=gcc2 \
./configure \
--prefix=/your/prefix

3) configure Sablotron (tested with 0.97RC2) using:
CC=gcc2 \
CXX=g++2 \
./configure \
--prefix=/your/prefix \
--with-expat-prefix=/your/prefix \
--with-iconv-prefix=/your/prefix

PHP can then be configured, using:
CC=gcc2 \
CXX=g++2 \
./configure \
--prefix=/your/prefix \
--disable-cgi \
--enable-xslt \
--with-xslt-sablot=/your/prefix \
--with-expat-dir=/your/prefix \
--with-iconv-dir=/your/prefix 

I guess the same applies to gcc3, but you have to make sure, that all
libs you inclu

#21789 [Com]: GCC 3.2.1 needs stdc++ linked

2003-01-24 Thread llaguno
 ID:   21789
 Comment by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Open
 Bug Type: Compile Failure
 Operating System: Solaris 8
 PHP Version:  4.3.0
 New Comment:

Duplicate: bug 19983

Notes: fix for the libsablot.so compile errors during php-4.3.0 make:

[sablotron-0.97 with php-4.3.0 on redhat linux 8.0]

1. rpm -U expat-1.95.5-1.i386.rpm
2. rpm -i sablotron-0.97-1.i386.rpm
3. rpm -i sablotron-devel-0.97-1.i386.rpm
4. rpm -e php   //current version 4.2.2
5. remove the packages dependent on php-4.2.2 if preceding command
fails
because of dependencies

6. install httpd-2.0.44
// this fixes the error related to missing file 'instdso'. note that
apache2 

7. add following line to /root/.bashrc
export LDFLAGS='-lstdc++'

// as explained earlier in this bug report, the undefined references
are
in the stdc++ libraries. Pavel Hlavnicka from Ginger Alliance
suggested
exporting the c++ compiler flag.

7. cd /usr/local/php/php-4.3.0
8. .configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql
--with-zlib --with-dom --with-gd --enable-xslt --with-xslt-sablot
--with-sablot-js
9. make
10. make install


Previous Comments:


[2003-01-21 07:30:51] [EMAIL PROTECTED]

Yes, Sablotron was compiled with the same version of GCC.



[2003-01-21 01:15:41] [EMAIL PROTECTED]

Was the sablot compiled also with that same GCC version?




[2003-01-20 23:43:57] [EMAIL PROTECTED]

With GCC 3.2.1 these symbols can be found in libstdc++. When php 4.3.0
is linked with -lsablot, there is no easy way to link it to stdc++, to
account for the changes of the locations of these functions in the new
GCC API. I would recommend a configure option like --enable-stdc++ to
allow the user to link this manually like --enable-libgcc. 

excerpt from compile :

.lo main/internal_functions_cli.lo -lsablot -liconv -lexpat -liconv
-lcurl -lcrypt -lresolv -lm -ldl -lnsl -lsocket -lgcc -lcrypt -lcurl
-lz -lssl -lcrypto -ldl -lsocket -lnsl -lz  -o sapi/cli/php
Undefined   first referenced
 symbol in file
__cxa_pure_virtual  /usr/local/lib/libsablot.so
vtable for __cxxabiv1::__si_class_type_info/usr/local/lib/libsablot.so
vtable for
__cxxabiv1::__vmi_class_type_info/usr/local/lib/libsablot.so
operator new[](unsigned)/usr/local/lib/libsablot.so
vtable for __cxxabiv1::__class_type_info/usr/local/lib/libsablot.so
operator delete(void*)  /usr/local/lib/libsablot.so
operator new(unsigned)  /usr/local/lib/libsablot.so
__gxx_personality_v0/usr/local/lib/libsablot.so
operator delete[](void*)/usr/local/lib/libsablot.so
ld: fatal: Symbol referencing errors. No output written to
sapi/cli/php
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1
bash-2.03# gcc --version
gcc (GCC) 3.2.1
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is
NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.

bash-2.03# 






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




#21868 [NEW]: include()/require() bug

2003-01-24 Thread omikorn
From: [EMAIL PROTECTED]
Operating system: Windoze
PHP version:  4.2.1
PHP Bug Type: Unknown/Other Function
Bug description:  include()/require() bug

A BIG ATTENTION!
let`s say that we have this 2 files include.php & test.php:
include.php

and now test.php:
";} else {echo
"bang foo is not set if called from function";}
}

do_test();
if ($foo) {echo "foo is set if called from main";} else {echo "bang
foo is not set if called from main";}
Result of the program is:
bang foo is not set if called from function.
foo is set if called from main

Bug?
Server: Apache/1.3.26 (Win32) PHP/4.2.3
-- 
Edit bug report at http://bugs.php.net/?id=21868&edit=1
-- 
Try a CVS snapshot: http://bugs.php.net/fix.php?id=21868&r=trysnapshot
Fixed in CVS:   http://bugs.php.net/fix.php?id=21868&r=fixedcvs
Fixed in release:   http://bugs.php.net/fix.php?id=21868&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=21868&r=needtrace
Try newer version:  http://bugs.php.net/fix.php?id=21868&r=oldversion
Not developer issue:http://bugs.php.net/fix.php?id=21868&r=support
Expected behavior:  http://bugs.php.net/fix.php?id=21868&r=notwrong
Not enough info:http://bugs.php.net/fix.php?id=21868&r=notenoughinfo
Submitted twice:http://bugs.php.net/fix.php?id=21868&r=submittedtwice
register_globals:   http://bugs.php.net/fix.php?id=21868&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=21868&r=php3
Daylight Savings:   http://bugs.php.net/fix.php?id=21868&r=dst
IIS Stability:  http://bugs.php.net/fix.php?id=21868&r=isapi
Install GNU Sed:http://bugs.php.net/fix.php?id=21868&r=gnused




#4312 [Com]: -2147467259 (0x80004005)

2003-01-24 Thread gugelhupf78
 ID:   4312
 Comment by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Closed
 Bug Type: Scripting Engine problem
 Operating System: Windows 2000 Advanced Server
 PHP Version:  4.0 Release Candidate 1
 New Comment:

I had the same problem. Every PHP-srcipt just gave me that -2147467259
(0x80004005) output and the IIS-service crashed. I changed the IIS
access-mode from 'anonymous access' to 'integrated athentification' and
voila, everything worked fine...

After a while now the anonyouse modus works, too - BUT I DON'T KNOW
WHY?

IIS5, Win2K Advanced Server
PHP 4.3.0 ISAPI


Previous Comments:


[2000-07-24 17:29:18] [EMAIL PROTECTED]

No feedback. Please reopen this bug and give further details if you
still have trouble after upgrading to PHP 4.0.1pl2.



[2000-05-22 05:28:38] [EMAIL PROTECTED]

So you are saying the script:


prints
-2147467259 (0x80004005)
in your browser? Or it causes a crash? Can you try a more recent
version?



[2000-05-22 05:09:46] [EMAIL PROTECTED]

the error is in the subject, when run the php code the page that
generated is only : -2147467259 (0x80004005)



[2000-05-21 17:25:57] [EMAIL PROTECTED]

and the bug is?



[2000-05-04 01:44:00] [EMAIL PROTECTED]




This content of my php.ini :
[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 and No) 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 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.
;
; 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 flush tells PHP to tell the output
layer to flush itself
; automatically after every output block.  
This is equiv

#21868 [Opn->Bgs]: include()/require() bug

2003-01-24 Thread moriyoshi
 ID:   21868
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Bogus
 Bug Type: Unknown/Other Function
 Operating System: Windoze
 PHP Version:  4.2.1
 New Comment:

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

You should use "global" declarations when you want to use global
variables
in the functions.



Previous Comments:


[2003-01-24 15:57:30] [EMAIL PROTECTED]

A BIG ATTENTION!
let`s say that we have this 2 files include.php & test.php:
include.php

and now test.php:
";} else {echo
"bang foo is not set if called from function";}
}

do_test();
if ($foo) {echo "foo is set if called from main";} else {echo "bang
foo is not set if called from main";}
Result of the program is:
bang foo is not set if called from function.
foo is set if called from main

Bug?
Server: Apache/1.3.26 (Win32) PHP/4.2.3




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




#21869 [NEW]: Link and Mailto parsing functions

2003-01-24 Thread spoon
From: [EMAIL PROTECTED]
Operating system: XP Pro
PHP version:  5CVS-2003-01-24 (dev)
PHP Bug Type: Feature/Change Request
Bug description:  Link and Mailto parsing functions

First, this task can be accomplished with a regex, but it is only _so_
effective.

If there was some way to make functions that would take in a string, and
return a string that has all links, and all email addresses (2 seperate
functions, or one with a set of switches) properly formatted to work as
links.

The reason it is hard with regex, is becuase it is impossible to search
for a link when it can be formatted so many ways.



/** simple **/
$string = "Hey, check out http://www.spoonified.com, and email me at
[EMAIL PROTECTED]";

$linkified = hrefparse($string);

echo $linkified;
/***/

returns this:

Hey, check out http://www.spoonified.com";>http://www.spoonified.com, and email
me at mailto:[EMAIL PROTECTED]";>[EMAIL PROTECTED]



of course, the link, the main reason regex is bad, could have many things
in it, it could point to a file, have a query string in it, have no www,
have many PERIODS (multiple subdomains), be https://, and also not be
seperated from other text (such as "OMFGwww.spoonified.comRULES"), and the
list goes on.

Email addresses follow the same conditions i mentioned above (minus a few
of course, and plus a few also).

Maybe im just overlooking a complex enough regex to do this.

I DO know it can be done. Many IRC/Instant Message programs do a wonderful
job of it. They take a link, no matter what conditions, or an email
address, and will show an active link once sent. Obviously there is a
rexeg im too lame to understand, or a better way to accomplish it.



(also, you 5.0.xCVS is still having an error on the php4apache2.dll
compile, just a sidenote, no comments needed, i think you guys are already
aware)


-- 
Edit bug report at http://bugs.php.net/?id=21869&edit=1
-- 
Try a CVS snapshot: http://bugs.php.net/fix.php?id=21869&r=trysnapshot
Fixed in CVS:   http://bugs.php.net/fix.php?id=21869&r=fixedcvs
Fixed in release:   http://bugs.php.net/fix.php?id=21869&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=21869&r=needtrace
Try newer version:  http://bugs.php.net/fix.php?id=21869&r=oldversion
Not developer issue:http://bugs.php.net/fix.php?id=21869&r=support
Expected behavior:  http://bugs.php.net/fix.php?id=21869&r=notwrong
Not enough info:http://bugs.php.net/fix.php?id=21869&r=notenoughinfo
Submitted twice:http://bugs.php.net/fix.php?id=21869&r=submittedtwice
register_globals:   http://bugs.php.net/fix.php?id=21869&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=21869&r=php3
Daylight Savings:   http://bugs.php.net/fix.php?id=21869&r=dst
IIS Stability:  http://bugs.php.net/fix.php?id=21869&r=isapi
Install GNU Sed:http://bugs.php.net/fix.php?id=21869&r=gnused




#21869 [Com]: Link and Mailto parsing functions

2003-01-24 Thread spoon
 ID:   21869
 Comment by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Open
 Bug Type: Feature/Change Request
 Operating System: XP Pro
 PHP Version:  5CVS-2003-01-24 (dev)
 New Comment:

THIS PAGE DOES IT! (NOT THE EMAIL THOUGH) (but it is a non full proof
regex?)

Still, if it is a GOOD regex, that almost never messes up, a function
would be ... easier :D


Previous Comments:


[2003-01-24 16:11:32] [EMAIL PROTECTED]

First, this task can be accomplished with a regex, but it is only _so_
effective.

If there was some way to make functions that would take in a string,
and return a string that has all links, and all email addresses (2
seperate functions, or one with a set of switches) properly formatted
to work as links.

The reason it is hard with regex, is becuase it is impossible to search
for a link when it can be formatted so many ways.



/** simple **/
$string = "Hey, check out http://www.spoonified.com, and email me at
[EMAIL PROTECTED]";

$linkified = hrefparse($string);

echo $linkified;
/***/

returns this:

Hey, check out http://www.spoonified.com";>http://www.spoonified.com, and
email me at mailto:[EMAIL PROTECTED]";>[EMAIL PROTECTED]



of course, the link, the main reason regex is bad, could have many
things in it, it could point to a file, have a query string in it, have
no www, have many PERIODS (multiple subdomains), be https://, and also
not be seperated from other text (such as
"OMFGwww.spoonified.comRULES"), and the list goes on.

Email addresses follow the same conditions i mentioned above (minus a
few of course, and plus a few also).

Maybe im just overlooking a complex enough regex to do this.

I DO know it can be done. Many IRC/Instant Message programs do a
wonderful job of it. They take a link, no matter what conditions, or an
email address, and will show an active link once sent. Obviously there
is a rexeg im too lame to understand, or a better way to accomplish
it.



(also, you 5.0.xCVS is still having an error on the php4apache2.dll
compile, just a sidenote, no comments needed, i think you guys are
already aware)






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




#21076 [Opn->Bgs]: ODBC_TABLES and ODBC_COLUMNS cannot be called together

2003-01-24 Thread kalowsky
 ID:   21076
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Bogus
 Bug Type: ODBC related
 Operating System: Win2000, IIS-CGI
 PHP Version:  4.3.0RC3
 New Comment:

Marking as bogus.  

Using Win2k, and the CGI build I cannot reproduce this at all.  My
attempts to showed nothing wrong with the code base that I could find. 



Previous Comments:


[2002-12-22 00:56:28] [EMAIL PROTECTED]

Updating version.



[2002-12-19 05:57:03] [EMAIL PROTECTED]

yes it still happens with 4.3.0 rc3.

Regards, John



[2002-12-18 14:00:48] [EMAIL PROTECTED]

Can you please try one of the RCs?



[2002-12-18 07:54:50] [EMAIL PROTECTED]

The following code:
";
print "ODBC_Tables"; 
$trs = odbc_tables($conn); 
odbc_free_result($trs);
print "ODBC_Columns"; 
$colrs = odbc_columns($conn); 
odbc_free_result($colrs);
print "Done";
?>

Will generate the output:

Connected 
ODBC_Tables
ODBC_Columns

Warning: SQL error: , SQL state 0 in SQLColumns in
d:\inetpub\wwwroot\php\hs~a.php on line 10

Warning: odbc_free_result(): supplied argument is not a valid ODBC
result resource in d:\inetpub\wwwroot\php\hs~a.php on line 11
Done

However, the following code with odbc_tables commented out:

";
/*print "ODBC_Tables"; 
$trs = odbc_tables($conn); 
odbc_free_result($trs);*/
print "ODBC_Columns"; 
$colrs = odbc_columns($conn); 
odbc_free_result($colrs);
print "Done";
?>

Works fine with the output:

Connected 
ODBC_Columns
Done

Hope this was clear.

Regards, John Lim




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




#21869 [Opn->Dup]: Link and Mailto parsing functions

2003-01-24 Thread tal
 ID:   21869
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Duplicate
 Bug Type: Feature/Change Request
 Operating System: XP Pro
 PHP Version:  5CVS-2003-01-24 (dev)
 New Comment:

Dup of #6893.


Previous Comments:


[2003-01-24 16:13:37] [EMAIL PROTECTED]

THIS PAGE DOES IT! (NOT THE EMAIL THOUGH) (but it is a non full proof
regex?)

Still, if it is a GOOD regex, that almost never messes up, a function
would be ... easier :D



[2003-01-24 16:11:32] [EMAIL PROTECTED]

First, this task can be accomplished with a regex, but it is only _so_
effective.

If there was some way to make functions that would take in a string,
and return a string that has all links, and all email addresses (2
seperate functions, or one with a set of switches) properly formatted
to work as links.

The reason it is hard with regex, is becuase it is impossible to search
for a link when it can be formatted so many ways.



/** simple **/
$string = "Hey, check out http://www.spoonified.com, and email me at
[EMAIL PROTECTED]";

$linkified = hrefparse($string);

echo $linkified;
/***/

returns this:

Hey, check out http://www.spoonified.com";>http://www.spoonified.com, and
email me at mailto:[EMAIL PROTECTED]";>[EMAIL PROTECTED]



of course, the link, the main reason regex is bad, could have many
things in it, it could point to a file, have a query string in it, have
no www, have many PERIODS (multiple subdomains), be https://, and also
not be seperated from other text (such as
"OMFGwww.spoonified.comRULES"), and the list goes on.

Email addresses follow the same conditions i mentioned above (minus a
few of course, and plus a few also).

Maybe im just overlooking a complex enough regex to do this.

I DO know it can be done. Many IRC/Instant Message programs do a
wonderful job of it. They take a link, no matter what conditions, or an
email address, and will show an active link once sent. Obviously there
is a rexeg im too lame to understand, or a better way to accomplish
it.



(also, you 5.0.xCVS is still having an error on the php4apache2.dll
compile, just a sidenote, no comments needed, i think you guys are
already aware)






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




#21869 [Com]: Link and Mailto parsing functions

2003-01-24 Thread spoon
 ID:   21869
 Comment by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Duplicate
 Bug Type: Feature/Change Request
 Operating System: XP Pro
 PHP Version:  5CVS-2003-01-24 (dev)
 New Comment:

Pear does not have this ability, as far as i can see from pear.php.net


Previous Comments:


[2003-01-24 16:21:03] [EMAIL PROTECTED]

Dup of #6893.



[2003-01-24 16:13:37] [EMAIL PROTECTED]

THIS PAGE DOES IT! (NOT THE EMAIL THOUGH) (but it is a non full proof
regex?)

Still, if it is a GOOD regex, that almost never messes up, a function
would be ... easier :D



[2003-01-24 16:11:32] [EMAIL PROTECTED]

First, this task can be accomplished with a regex, but it is only _so_
effective.

If there was some way to make functions that would take in a string,
and return a string that has all links, and all email addresses (2
seperate functions, or one with a set of switches) properly formatted
to work as links.

The reason it is hard with regex, is becuase it is impossible to search
for a link when it can be formatted so many ways.



/** simple **/
$string = "Hey, check out http://www.spoonified.com, and email me at
[EMAIL PROTECTED]";

$linkified = hrefparse($string);

echo $linkified;
/***/

returns this:

Hey, check out http://www.spoonified.com";>http://www.spoonified.com, and
email me at mailto:[EMAIL PROTECTED]";>[EMAIL PROTECTED]



of course, the link, the main reason regex is bad, could have many
things in it, it could point to a file, have a query string in it, have
no www, have many PERIODS (multiple subdomains), be https://, and also
not be seperated from other text (such as
"OMFGwww.spoonified.comRULES"), and the list goes on.

Email addresses follow the same conditions i mentioned above (minus a
few of course, and plus a few also).

Maybe im just overlooking a complex enough regex to do this.

I DO know it can be done. Many IRC/Instant Message programs do a
wonderful job of it. They take a link, no matter what conditions, or an
email address, and will show an active link once sent. Obviously there
is a rexeg im too lame to understand, or a better way to accomplish
it.



(also, you 5.0.xCVS is still having an error on the php4apache2.dll
compile, just a sidenote, no comments needed, i think you guys are
already aware)






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




#21844 [Fbk->Csd]: ODBC_CULUMNS problems

2003-01-24 Thread kalowsky
 ID:   21844
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Feedback
+Status:   Closed
 Bug Type: ODBC related
 Operating System: W2K
 PHP Version:  4.2.3
 New Comment:

Fixed in the 4.3.0 branch... 
5.0 branch patch in local CVS, not yet uploaded...


Previous Comments:


[2003-01-23 22:42:50] [EMAIL PROTECTED]

Thanks for that although Im sure thats not it.

Ive tried every variation of;

--
$cols = odbc_columns($conn, "%", "", "[table]");
--

as reported on this site and phpbuilder.

Also, elsewhere Im using

--
$query =  "WHERE Surname LIKE '$search_val%';"
  ^
--

with no problems.  But maybe it handles this differantly.  I have seen
hoards of postings about this but no official line from the good people
at php.net.  Knock up a quick access table and test it yourself...
you'll see what I mean.

Rick.



[2003-01-23 10:25:56] [EMAIL PROTECTED]

If I remember correctly the issue isn't the MS driver, or the code, but
the Access JET engine.  The '%' driver I believe is not supported by
the JET engine and as such fails on all attempts.  Unfortunately I
can't test to prove it right now, so give that a try.



[2003-01-23 09:23:25] [EMAIL PROTECTED]


Im using Access 2k with PHP 4.2 win32 binary.

Im simply trying to query the columns in a table, thus;

--
$conn = odbc_connect( 'DSN_NAME', 'root', '' );

$cols = odbc_columns($conn, "%", "", "[table]");
--

This returns the error;

--
Warning: SQL error: , SQL state 0 in SQLColumns in ..
--

I have seen previous postings in various places regarding this issue
but no mentions of a fix/workaround anywhere???

Whats the problem with this?  Is it the odbc drivers for windoze or
somthing code related (although the above follows the manual to a
't')?

Cheers,

Rick.





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




#21869 [Com]: Link and Mailto parsing functions

2003-01-24 Thread spoon
 ID:   21869
 Comment by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Duplicate
 Bug Type: Feature/Change Request
 Operating System: XP Pro
 PHP Version:  5CVS-2003-01-24 (dev)
 New Comment:

In the source of your bug.php, at the very bottom it has a line:

$note =
addlinks(preg_replace("/(\r?\n){3,}/","\n\n",wordwrap($comment,72,"\n",1)));


addlinks is not defined in the source, so i am assuming it is in
prepend.inc (?), but unfortunatley, we cannot view .inc files using
source.php, any help?


Previous Comments:


[2003-01-24 16:32:41] [EMAIL PROTECTED]

Pear does not have this ability, as far as i can see from pear.php.net



[2003-01-24 16:21:03] [EMAIL PROTECTED]

Dup of #6893.



[2003-01-24 16:13:37] [EMAIL PROTECTED]

THIS PAGE DOES IT! (NOT THE EMAIL THOUGH) (but it is a non full proof
regex?)

Still, if it is a GOOD regex, that almost never messes up, a function
would be ... easier :D



[2003-01-24 16:11:32] [EMAIL PROTECTED]

First, this task can be accomplished with a regex, but it is only _so_
effective.

If there was some way to make functions that would take in a string,
and return a string that has all links, and all email addresses (2
seperate functions, or one with a set of switches) properly formatted
to work as links.

The reason it is hard with regex, is becuase it is impossible to search
for a link when it can be formatted so many ways.



/** simple **/
$string = "Hey, check out http://www.spoonified.com, and email me at
[EMAIL PROTECTED]";

$linkified = hrefparse($string);

echo $linkified;
/***/

returns this:

Hey, check out http://www.spoonified.com";>http://www.spoonified.com, and
email me at mailto:[EMAIL PROTECTED]";>[EMAIL PROTECTED]



of course, the link, the main reason regex is bad, could have many
things in it, it could point to a file, have a query string in it, have
no www, have many PERIODS (multiple subdomains), be https://, and also
not be seperated from other text (such as
"OMFGwww.spoonified.comRULES"), and the list goes on.

Email addresses follow the same conditions i mentioned above (minus a
few of course, and plus a few also).

Maybe im just overlooking a complex enough regex to do this.

I DO know it can be done. Many IRC/Instant Message programs do a
wonderful job of it. They take a link, no matter what conditions, or an
email address, and will show an active link once sent. Obviously there
is a rexeg im too lame to understand, or a better way to accomplish
it.



(also, you 5.0.xCVS is still having an error on the php4apache2.dll
compile, just a sidenote, no comments needed, i think you guys are
already aware)






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




#21869 [Com]: Link and Mailto parsing functions

2003-01-24 Thread spoon
 ID:   21869
 Comment by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Duplicate
 Bug Type: Feature/Change Request
 Operating System: XP Pro
 PHP Version:  5CVS-2003-01-24 (dev)
 New Comment:

/include/functions.inc  (i was forgetting /include)

function addlinks($text) 
{
$text = htmlspecialchars($text);
$text =
preg_replace("/((mailto|http|ftp|nntp|news):.+?)(>|\\s|\\)|\\.\\s|$)/i","\\1\\3",$text);
# what the heck is this for?
$text = preg_replace("/[.,]?-=-\"/", '"', $text);
return $text;
}


W. PHP.NET RULES!


Previous Comments:


[2003-01-24 16:45:00] [EMAIL PROTECTED]

In the source of your bug.php, at the very bottom it has a line:

$note =
addlinks(preg_replace("/(\r?\n){3,}/","\n\n",wordwrap($comment,72,"\n",1)));


addlinks is not defined in the source, so i am assuming it is in
prepend.inc (?), but unfortunatley, we cannot view .inc files using
source.php, any help?



[2003-01-24 16:32:41] [EMAIL PROTECTED]

Pear does not have this ability, as far as i can see from pear.php.net



[2003-01-24 16:21:03] [EMAIL PROTECTED]

Dup of #6893.



[2003-01-24 16:13:37] [EMAIL PROTECTED]

THIS PAGE DOES IT! (NOT THE EMAIL THOUGH) (but it is a non full proof
regex?)

Still, if it is a GOOD regex, that almost never messes up, a function
would be ... easier :D



[2003-01-24 16:11:32] [EMAIL PROTECTED]

First, this task can be accomplished with a regex, but it is only _so_
effective.

If there was some way to make functions that would take in a string,
and return a string that has all links, and all email addresses (2
seperate functions, or one with a set of switches) properly formatted
to work as links.

The reason it is hard with regex, is becuase it is impossible to search
for a link when it can be formatted so many ways.



/** simple **/
$string = "Hey, check out http://www.spoonified.com, and email me at
[EMAIL PROTECTED]";

$linkified = hrefparse($string);

echo $linkified;
/***/

returns this:

Hey, check out http://www.spoonified.com";>http://www.spoonified.com, and
email me at mailto:[EMAIL PROTECTED]";>[EMAIL PROTECTED]



of course, the link, the main reason regex is bad, could have many
things in it, it could point to a file, have a query string in it, have
no www, have many PERIODS (multiple subdomains), be https://, and also
not be seperated from other text (such as
"OMFGwww.spoonified.comRULES"), and the list goes on.

Email addresses follow the same conditions i mentioned above (minus a
few of course, and plus a few also).

Maybe im just overlooking a complex enough regex to do this.

I DO know it can be done. Many IRC/Instant Message programs do a
wonderful job of it. They take a link, no matter what conditions, or an
email address, and will show an active link once sent. Obviously there
is a rexeg im too lame to understand, or a better way to accomplish
it.



(also, you 5.0.xCVS is still having an error on the php4apache2.dll
compile, just a sidenote, no comments needed, i think you guys are
already aware)






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




#21869 [Dup->Csd]: Link and Mailto parsing functions

2003-01-24 Thread spoon
 ID:   21869
 User updated by:  [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Duplicate
+Status:   Closed
 Bug Type: Feature/Change Request
 Operating System: XP Pro
 PHP Version:  5CVS-2003-01-24 (dev)
 New Comment:

closed


Previous Comments:


[2003-01-24 16:48:07] [EMAIL PROTECTED]

/include/functions.inc  (i was forgetting /include)

function addlinks($text) 
{
$text = htmlspecialchars($text);
$text =
preg_replace("/((mailto|http|ftp|nntp|news):.+?)(>|\\s|\\)|\\.\\s|$)/i","\\1\\3",$text);
# what the heck is this for?
$text = preg_replace("/[.,]?-=-\"/", '"', $text);
return $text;
}


W. PHP.NET RULES!



[2003-01-24 16:45:00] [EMAIL PROTECTED]

In the source of your bug.php, at the very bottom it has a line:

$note =
addlinks(preg_replace("/(\r?\n){3,}/","\n\n",wordwrap($comment,72,"\n",1)));


addlinks is not defined in the source, so i am assuming it is in
prepend.inc (?), but unfortunatley, we cannot view .inc files using
source.php, any help?



[2003-01-24 16:32:41] [EMAIL PROTECTED]

Pear does not have this ability, as far as i can see from pear.php.net



[2003-01-24 16:21:03] [EMAIL PROTECTED]

Dup of #6893.



[2003-01-24 16:13:37] [EMAIL PROTECTED]

THIS PAGE DOES IT! (NOT THE EMAIL THOUGH) (but it is a non full proof
regex?)

Still, if it is a GOOD regex, that almost never messes up, a function
would be ... easier :D



The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/21869

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




#21866 [Opn->Bgs]: Secure LDAP bind fails

2003-01-24 Thread iliaa
 ID:   21866
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Bogus
 Bug Type: LDAP related
 Operating System: Win2000
 PHP Version:  4CVS-2003-01-24 (stable)
 New Comment:

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

LDAP error, you may be able to fix it by upgrading to a later version
of ldap. The error you are seeing is given by the ldap library itself
and has nothing to do with PHP itself.


Previous Comments:


[2003-01-24 13:21:33] [EMAIL PROTECTED]

There seems to be a bug to connect SECURE to an LDAP server.

The following script is working fine if I connect using the ldap://
protocol. However, connecting to the LDAP server through SSL (ldaps://)
the bind fails with the error "DSA is unwilling to perform (Error 53)"

The LDAP server is configured for SSL.

function checkerror( $ldap, $stepinfo )
{
if (ldap_errno($ldap) != 0) { 
$ldaperr = ldap_errno( $ldap );
$ldapmsg = ldap_error( $ldap );
print "ERROR at $stepinfo: $ldapmsg
($ldaperr)\n";
return FALSE;
}
return TRUE;
}

function doit( $ldap_server )
{
$basedn  = "dc=mydc,o=myorg";
$searcharg   = "sn=F*";
$ldap_rdn= "uid=myname,cn=users,dc=mydc,o=myorg";
$ldap_passwd = "mypassword";

print "Connecting to ldap server $ldap_server at port
$ldap_port\n";
$ldap = ldap_connect( $ldap_server );

if( checkerror( $ldap, "ldap_connect" ) == FALSE ) { return; }

print "Binding to ldap server using rdn $ldap_rdn\n";
$bind = ldap_bind($ldap, $ldap_rdn, $ldap_passwd );

if( checkerror( $ldap, "ldap_bind" ) == FALSE ) { return; }

$mysuccess = ldap_search( $ldap, $basedn, $searcharg );

if( checkerror( $ldap, "ldap_search" ) == FALSE ) { return; }

   $sr = $mysuccess;
   $ds = $ldap;

   echo "Number of entires returned is
".ldap_count_entries($ds,$sr)."\n"; 

   $info = ldap_get_entries($ds, $sr); 
   echo "Data for ".$info["count"]." items returned:"; 

   for ($i=0; $i<$info["count"]; $i++) { 
   echo "dn is: ". $info[$i]["dn"] ."\n"; 
   echo "first cn entry is: ". $info[$i]["cn"][0] ."\n"; 
   echo "first email entry is: ". $info[$i]["mail"][0] ."\n"; 
   } 

ldap_close($ldap);
return TRUE;
}

doit( "ldap://myserver/"; );
doit( "ldaps://myserver/" );





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




#21625 [Opn->Asn]: --with-config-file-scan-dir

2003-01-24 Thread iliaa
 ID:   21625
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Assigned
 Bug Type: PHP options/info functions
 Operating System: Mandrake Linux 9.0/Cooker
 PHP Version:  4.3.0
-Assigned To:  
+Assigned To:  iliaa


Previous Comments:


[2003-01-14 00:44:11] [EMAIL PROTECTED]

oops, sorry



[2003-01-14 00:43:27] [EMAIL PROTECTED]

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php



[2003-01-13 19:46:35] [EMAIL PROTECTED]

Is there a way to cleanly add a patch to bugs.php.net? 

I e-mailed it to sniper and oden, but anyways, here it is. Hope it's
readable...

--- php-4.3.0/main/php_ini.c.orig   2003-01-13 18:17:18.0
-0400
+++ php-4.3.0/main/php_ini.c2003-01-13 19:03:23.0 -0400
@@ -30,6 +30,9 @@
 #include "zend_highlight.h"
 #include "SAPI.h"
 #include "php_main.h"
+#include 
+#include 
+extern  int alphasort();
=20
 #ifndef S_ISREG
 #define S_ISREG(mode)   (((mode) & S_IFMT) =3D=3D S_IFREG)
@@ -232,6 +235,8 @@
zend_file_handle fh;
DIR *dirp =3D NULL;
struct dirent *dir_entry;
+   struct dirent **inifiles;
+   int inicount,i;
struct stat sb;
char ini_file[MAXPATHLEN];
char *p;
@@ -400,10 +405,11 @@
dirp =3D VCWD_OPENDIR(PHP_CONFIG_FILE_SCAN_DIR);
if (dirp) {
fh.type =3D ZEND_HANDLE_FP;
-   while ((dir_entry =3D readdir(dirp)) !=3D NULL)
{
+   inicount =3D scandir(PHP_CONFIG_FILE_SCAN_DIR,
&inifiles, NULL, alphaso=
rt);
+   for(i=3D1;id_name,'.')) && strcmp(p,".ini")) contin=
ue;
-   snprintf(ini_file, MAXPATHLEN,
"%s%c%s", PHP_CONFIG_FILE_SCAN_DIR, DEF=
AULT_SLASH, dir_entry->d_name);
+   if ((p =3D
strrchr(inifiles[i-1]->d_name,'.')) && strcmp(p,".ini")) co=
ntinue;
+   snprintf(ini_file, MAXPATHLEN,
"%s%c%s", PHP_CONFIG_FILE_SCAN_DIR, DEF=
AULT_SLASH, inifiles[i-1]->d_name);
if (VCWD_STAT(ini_file, &sb) =3D=3D 0)
{
if (S_ISREG(sb.st_mode)) {
if ((fh.handle.fp =3D
VCWD_FOPEN(ini_file, "r"))) {



[2003-01-13 19:42:35] [EMAIL PROTECTED]

php_ini.c uses readdir, which gives all the files on the directory,
*but
in the order of the filesystem*. ie, it's acting like "ls -U", instead
of just "ls".

The problem is that there is no way of knowing which file will be
loaded
first and which one will be loaded last, with causes problems with the
way Mandrake loads extensions, as we create ini files in the format
16_dba.ini ... 52_xslt.ini. Those files contain the "extention =3D"
directive, so that modules can be loaded in the right order.

For tricky extensions, like recode (who has to be loaded first), apc
and
pspell (who have to be loaded last), we need to be able to control the
load order of the ini files.

I enclose a small hack I made using scandir and alphasort. It should
work on BSD and Linux systems, maybe on other platforms, so we should
use ifdefines on platforms that do not support it.

Regards,

Jean-Michel Dault
MandrakeSoft Apache/PHP packager



[2003-01-13 19:03:07] [EMAIL PROTECTED]

What do you mean with 'randomly listed' ?
Listed in random order or only some files are listed..?




The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/21625

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




#21870 [NEW]: Core Predefinded with wrong paths

2003-01-24 Thread cg
From: [EMAIL PROTECTED]
Operating system: XP Pro
PHP version:  4CVS-2003-01-24 (stable)
PHP Bug Type: *General Issues
Bug description:  Core Predefinded with wrong paths

The following predefined constants do not reflect the settings on my ws
(all PHP is on E:\ and F:\):

[PEAR_INSTALL_DIR] => c:\php4\pear
[PEAR_EXTENSION_DIR] => c:\php4
[PHP_EXTENSION_DIR] => c:\php4
[PHP_PREFIX] => c:\php4
[PHP_BINDIR] => c:\php4
[PHP_LIBDIR] => c:\php4
[PHP_DATADIR] => c:\php4
[PHP_SYSCONFDIR] => c:\php4
[PHP_LOCALSTATEDIR] => c:\php4
[PHP_CONFIG_FILE_PATH] => C:\

Maybe this is the cause for PEAR install problems on Windows (see
http://bugs.php.net#21558,http://bugs.php.net/21787 and some recent
messages on pear-general and pear-dev) - anyway, they're not correctly
defined and make IMHO no sense if they aren't.

Christoph
-- 
Edit bug report at http://bugs.php.net/?id=21870&edit=1
-- 
Try a CVS snapshot: http://bugs.php.net/fix.php?id=21870&r=trysnapshot
Fixed in CVS:   http://bugs.php.net/fix.php?id=21870&r=fixedcvs
Fixed in release:   http://bugs.php.net/fix.php?id=21870&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=21870&r=needtrace
Try newer version:  http://bugs.php.net/fix.php?id=21870&r=oldversion
Not developer issue:http://bugs.php.net/fix.php?id=21870&r=support
Expected behavior:  http://bugs.php.net/fix.php?id=21870&r=notwrong
Not enough info:http://bugs.php.net/fix.php?id=21870&r=notenoughinfo
Submitted twice:http://bugs.php.net/fix.php?id=21870&r=submittedtwice
register_globals:   http://bugs.php.net/fix.php?id=21870&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=21870&r=php3
Daylight Savings:   http://bugs.php.net/fix.php?id=21870&r=dst
IIS Stability:  http://bugs.php.net/fix.php?id=21870&r=isapi
Install GNU Sed:http://bugs.php.net/fix.php?id=21870&r=gnused




#19971 [Com]: file() function extremally slow

2003-01-24 Thread jamie
 ID:   19971
 Comment by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Closed
 Bug Type: *Directory/Filesystem functions
 Operating System: any
 PHP Version:  4.3.0-dev
 New Comment:

Please reopen. 
 
PHP 4.2.2 and 4.2.1 appeared to cause delays as well but   
PHP 4.3.0 made Squirrelmail unusable. phpMyAdmin appeared   
to be affected as well. Downgrading to PHP 4.0.6 resolved   
problem. Not clear if this file() function is culprit, but   
system load remained low and Cyrus and MySQL do not appear   
to be culprit of the application-level slowdown. (Command   
line clients do not experience problems.) NOTE: This does   
NOT appear to be resolved by CVS snapshot as of 2002 01-23,   
which is contrary to above PHP bug!  
  
Additional information:  
Gentoo Linux 1.2, nightly update (gcc 2.95)  
Cyrus IMAPd 2.1.11  
MySQL 3.23.54a  
PHP 4.3.0, 4.2.2, 4.2.1  
SquirrelMail 1.2.10  
phpMyAdmin 2.3.2 (Gentoo rev 1)  
  
Please also see  
http://bugs.gentoo.org/show_bug.cgi?id=14513


Previous Comments:


[2002-10-18 15:40:14] [EMAIL PROTECTED]

This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.





[2002-10-18 09:59:58] [EMAIL PROTECTED]

I got the following times from a tests I've run on PHP.
The test involved openning a 2.5 meg binary file 1000 times.
The results are everages of several runs.
 
file_get_contents() - 30.4 seconds (4.3 HEAD)
file() - 99.2 seconds (4.3 HEAD)
file() - 40.3 seconds (4.2.3)

Looks like a VERY  serious performance loss to me, I'd even go as far
as to say this is a critical issue that should be resolved before
release.

For reference perpouses a simple C program that freads() entire file to
memory took only 18.5 seconds to run (1000 runs on the same file).



[2002-10-18 07:04:36] [EMAIL PROTECTED]

fgets() is fast.

yohgaki@dev DEV]$ cat t.php
 setMarker('Start');

$fp = fopen($filename,'r');
for ($i = 0; $i<100; $i++)
  $s = explode("\n", fread($fp, filesize($filename)));
fclose($fp);

$time -> setMarker('fread'); 

for ($i = 0; $i<100; $i++)
  $s = file($filename);
$time -> setMarker('file'); 

for ($i = 0; $i<100; $i++)
  $s = file_get_contents($filename);
$time -> setMarker('file_get_contents'); 

$fp = fopen($filename,'r');
for ($i = 0; $i<100; $i++)
  $s = fgets($fp,filesize($filename));
$time -> setMarker('fgets'); 
fclose($fp);

[yohgaki@dev DEV]$ ./sapi/cli/php  t.php 
-
markertime indexex time  
perct
-
Start 1034942600.41311100   -  
0.00%
-
fread 1034942600.43045000   0.017338991165161  
2.68%
-
file  1034942600.95939400   0.52894401550293  
81.66%
-
file_get_contents 1034942601.04506900   0.085675001144409 
13.23%
-
fgets 1034942601.06049200   0.015423059463501  
2.38%
-
Stop  1034942601.06084500   0.00035297870635986
0.05%
-
total - 0.64773404598236 
100.00%
-


[yohgaki@dev DEV]$ 




[2002-10-18 06:50:52] [EMAIL PROTECTED]

Damn Mozilla wont work with buffer normally :(
Lets try again.
Problem: read from a text file into array
1. using fread()+explode()
2. using file()

Here my tests

 setMarker('Start');
$fp = fopen("access.log", "r");
$s  = explode("\n", fread($fp, filesize("access.log") ) ) ;
fclose($fp);
$time -> setMarker('fread+explode'); 
$s = file("access.log");
$time -> setMarker('file'); 
$time -> setMarker('Stop');
$time -> display(); 
?

#21871 [NEW]: class_exists() doesn't work for nested classes

2003-01-24 Thread yoglets
From: [EMAIL PROTECTED]
Operating system: RedHat 7.3
PHP version:  5CVS-2003-01-24 (dev)
PHP Bug Type: Zend Engine 2 problem
Bug description:  class_exists() doesn't work for nested classes

Given an instance of a nested class, get_class() returns the ":: separated"
name for it, as expected. However, passing that value right back to
class_exists() always fails -- i.e., returns FALSE.



In addition, get_declared_classes() will only report on the top-level
classes, leaving out any that are nested. In this example, it would report
"Foo", but not "Foo::Bar".
-- 
Edit bug report at http://bugs.php.net/?id=21871&edit=1
-- 
Try a CVS snapshot: http://bugs.php.net/fix.php?id=21871&r=trysnapshot
Fixed in CVS:   http://bugs.php.net/fix.php?id=21871&r=fixedcvs
Fixed in release:   http://bugs.php.net/fix.php?id=21871&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=21871&r=needtrace
Try newer version:  http://bugs.php.net/fix.php?id=21871&r=oldversion
Not developer issue:http://bugs.php.net/fix.php?id=21871&r=support
Expected behavior:  http://bugs.php.net/fix.php?id=21871&r=notwrong
Not enough info:http://bugs.php.net/fix.php?id=21871&r=notenoughinfo
Submitted twice:http://bugs.php.net/fix.php?id=21871&r=submittedtwice
register_globals:   http://bugs.php.net/fix.php?id=21871&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=21871&r=php3
Daylight Savings:   http://bugs.php.net/fix.php?id=21871&r=dst
IIS Stability:  http://bugs.php.net/fix.php?id=21871&r=isapi
Install GNU Sed:http://bugs.php.net/fix.php?id=21871&r=gnused




#15637 [Fbk->Opn]: if using URI, ldap_connect() returns resource ID when server does not exist

2003-01-24 Thread philip
 ID:   15637
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Feedback
+Status:   Open
 Bug Type: LDAP related
 Operating System: Linux - RedHat 7.2
 PHP Version:  4.4.0-dev
 New Comment:

Yes, I still get ldap resources everytime except when passing in "/" or
a wrong parameter count.


Previous Comments:


[2003-01-20 16:12:25] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip

With latest CVS it returns FALSE when appropriate, cannot replicate the
problem.



[2003-01-17 22:26:57] [EMAIL PROTECTED]

I cannot get ldap_connect() to return false under ANY conditions,
including with the examples provided in this bug report.  I find this
behavior impossible to document, please have another look at this. 
Reclassifying -> ldap related.

Shouldn't these return false?  They are not URI's:
var_dump(ldap_connect('foo'));
var_dump(ldap_connect('does.not.exist'));

I get resources with both.  apache1.3.26/php4.4/openldap2.0.23



[2003-01-06 11:28:38] [EMAIL PROTECTED]

when using an ip address ldap_connect doesn't work as described.

$server = "10.1.1.100";
$port = "389";

$ds = ldap_connect($server, $port);

the result is true even if the server does not exist or the service is
not running.



[2002-12-27 16:27:34] [EMAIL PROTECTED]

I have observed something like this (in php-4.30rc3):
The whole script:



regards.



[2002-11-29 09:07:12] [EMAIL PROTECTED]

Hello,

in php-4.30rcX, the ldap_connect doesn't perform the connection, so
documentation should be updated.
But, the documention (on zend site) for ldap_connect is:

ldap_connect() establishes a connection to a LDAP server on a
specified
hostname and port. Both the arguments are optional. --> If no
arguments
are specified then the link identifier of the already opened link will
be returned. 

In my script i don't have any previous opened link, so i think the
function would return FALSE. 
Or the documention is wrong and need correction.




Sincerely



The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/15637

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




#21872 [NEW]: MSSQL/ODBC produce CGI Error:

2003-01-24 Thread khoker
From: [EMAIL PROTECTED]
Operating system: Windows 2000
PHP version:  4.3.0
PHP Bug Type: Reproducible crash
Bug description:  MSSQL/ODBC produce CGI Error:  

When calling a PHP script that is using MSSQL or ODBC calls, I can
reporduce this error at least one out of every ten tries, on multiple
machines.  I'm at the end of my rope trying to figure it out myself.  If I
can reproduce the error, I figure I am a prime candidate to help solve it.
 The error states:
 
CGI Error
The specified CGI application misbehaved by not returning a complete set
of HTTP headers. The headers it did return are:

And that's it.  There is nothing after "are:"  

This is how I reproduce (test for) the error:  I have a PHP script that
generates a webpage.  That webpage contains 4 iframes.  (The iframes are
nothing more than a php page that echoes x.  The
main page prints the code to invoke the iframes, and it also makes an
MSSQL or ODBC query.  NOTE:  I can also reproduce this error when making a
database call in conjuction with a header("location: ...") redirect as
well, but that's a little more annoying to test than the iframes since it
doesn't happen every time.
 
So, every reload on the main page is essentially 5 PHP requests (1 main +
4 iframes).  If I refresh this test page, I can get at least one of the
iframes to error every 5 tries.  Which, of course, is at least one error
every 25 requests.  
 
Now on to the DB.  If I comment out the DB call (be it an MSSQL or ODBC
query) I cannot reproduce the error.  This is my guess...  the bug happens
when PHP attempts to service a request at the exact moment something
closes in the DB call.  I'm sorry I can't do any better than that for
troubleshooting.  But, logically, the error is random enough that it
doesn't happen EVERY time, so all I can guess is that it is a pure timing
issue, which happens more frequently the more you hit the server as it is
making a DB request.
 
Any other info I can offer...  I can reproduce this with IIS  on three
Win2000 Servers and one Win2000 Professional box.  I am not using Named
Pipes.  I've tried several versions of ntwdblib.dll and am currently using
the one included with PHP 4.3.0 (12/27/2002).  I only have SQL 2000
servers to connect to, but I've reproduced this bug with the three of them
that I use regularly.
 
My desktop (the Windows 2000 Professional) box is what I test with most
often, and it is running Service Pack 3 and is using the current MDAC (2.7
I believe).
 
I did not use the Win32 'installer' ... rather installed via the latest
.zip and my production boxes are SMP machines, so until SAPI is given the
thread-safe go-ahead I have to stick with the .exe
 
I can't think of anything more off the top of my head, but I would be more
than willing to give whatever feedback is requested.  Unfortunately, I
thought this bug was only MSSQL related for some reason, so I've been
putting off switching everything to ODBC.  I was very saddened today when
I experienced the error with ODBC as well.  I've got approximately one
week to solve this before I have to launch a new site with my company, and
while the lauch will go either way, I don't want the executives to
question my decision to use PHP instead of VBscript (as the other
developers here know VB, and my argument/skills seemed strong enough to
sway to the PHP side).  I'm not trying to pull any heart strings here,
like I said, the site is going to launch CGI errors or not, I'd just
rather have it flawless (and not field end-user calls on the issue to
boot). 
-- 
Edit bug report at http://bugs.php.net/?id=21872&edit=1
-- 
Try a CVS snapshot: http://bugs.php.net/fix.php?id=21872&r=trysnapshot
Fixed in CVS:   http://bugs.php.net/fix.php?id=21872&r=fixedcvs
Fixed in release:   http://bugs.php.net/fix.php?id=21872&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=21872&r=needtrace
Try newer version:  http://bugs.php.net/fix.php?id=21872&r=oldversion
Not developer issue:http://bugs.php.net/fix.php?id=21872&r=support
Expected behavior:  http://bugs.php.net/fix.php?id=21872&r=notwrong
Not enough info:http://bugs.php.net/fix.php?id=21872&r=notenoughinfo
Submitted twice:http://bugs.php.net/fix.php?id=21872&r=submittedtwice
register_globals:   http://bugs.php.net/fix.php?id=21872&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=21872&r=php3
Daylight Savings:   http://bugs.php.net/fix.php?id=21872&r=dst
IIS Stability:  http://bugs.php.net/fix.php?id=21872&r=isapi
Install GNU Sed:http://bugs.php.net/fix.php?id=21872&r=gnused




#21872 [Com]: MSSQL/ODBC produce CGI Error:

2003-01-24 Thread khoker
 ID:   21872
 Comment by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Open
 Bug Type: Reproducible crash
 Operating System: Windows 2000
 PHP Version:  4.3.0
 New Comment:

Additionally, I can offer the test script.  Here is a bare-bones
example.  Testing this just now, it will error on at least one of the 6
iframes EVERY refresh.  1/6 requests is an error.  Sorry the actual DSN
and SQL query does no good, but if you really wanted to try this it
will save a little hassle.
 
x";
  exit();
}

$sql_params = array(
  'DSN' => 'myDSN',
  'user' => 'user',
  'pass' => 'pass',
  'query' => 'SELECT DISTINCT field1 FROM table1',
);


$conn = odbc_connect($sql_params['DSN'], $sql_params['user'],
$sql_params['pass']) or die("Couldn't connect to SQL Server on
{$sql_params['DSN']}");
$conn_id = odbc_exec($conn, $sql_params['query']);
print odbc_num_fields($conn_id);
odbc_free_result($conn_id);
?>










Previous Comments:


[2003-01-24 21:36:18] [EMAIL PROTECTED]

When calling a PHP script that is using MSSQL or ODBC calls, I can
reporduce this error at least one out of every ten tries, on multiple
machines.  I'm at the end of my rope trying to figure it out myself. 
If I can reproduce the error, I figure I am a prime candidate to help
solve it.  The error states:
 
CGI Error
The specified CGI application misbehaved by not returning a complete
set of HTTP headers. The headers it did return are:

And that's it.  There is nothing after "are:"  

This is how I reproduce (test for) the error:  I have a PHP script that
generates a webpage.  That webpage contains 4 iframes.  (The iframes
are nothing more than a php page that echoes
x.  The main page prints the code to invoke
the iframes, and it also makes an MSSQL or ODBC query.  NOTE:  I can
also reproduce this error when making a database call in conjuction
with a header("location: ...") redirect as well, but that's a little
more annoying to test than the iframes since it doesn't happen every
time.
 
So, every reload on the main page is essentially 5 PHP requests (1 main
+ 4 iframes).  If I refresh this test page, I can get at least one of
the iframes to error every 5 tries.  Which, of course, is at least one
error every 25 requests.  
 
Now on to the DB.  If I comment out the DB call (be it an MSSQL or ODBC
query) I cannot reproduce the error.  This is my guess...  the bug
happens when PHP attempts to service a request at the exact moment
something closes in the DB call.  I'm sorry I can't do any better than
that for troubleshooting.  But, logically, the error is random enough
that it doesn't happen EVERY time, so all I can guess is that it is a
pure timing issue, which happens more frequently the more you hit the
server as it is making a DB request.
 
Any other info I can offer...  I can reproduce this with IIS  on three
Win2000 Servers and one Win2000 Professional box.  I am not using Named
Pipes.  I've tried several versions of ntwdblib.dll and am currently
using the one included with PHP 4.3.0 (12/27/2002).  I only have SQL
2000 servers to connect to, but I've reproduced this bug with the three
of them that I use regularly.
 
My desktop (the Windows 2000 Professional) box is what I test with most
often, and it is running Service Pack 3 and is using the current MDAC
(2.7 I believe).
 
I did not use the Win32 'installer' ... rather installed via the latest
.zip and my production boxes are SMP machines, so until SAPI is given
the thread-safe go-ahead I have to stick with the .exe
 
I can't think of anything more off the top of my head, but I would be
more than willing to give whatever feedback is requested. 
Unfortunately, I thought this bug was only MSSQL related for some
reason, so I've been putting off switching everything to ODBC.  I was
very saddened today when I experienced the error with ODBC as well. 
I've got approximately one week to solve this before I have to launch a
new site with my company, and while the lauch will go either way, I
don't want the executives to question my decision to use PHP instead of
VBscript (as the other developers here know VB, and my argument/skills
seemed strong enough to sway to the PHP side).  I'm not trying to pull
any heart strings here, like I said, the site is going to launch CGI
errors or not, I'd just rather have it flawless (and not field end-user
calls on the issue to boot). 




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




#12061 [Com]: CGI Error

2003-01-24 Thread ecorriel
 ID:   12061
 Comment by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Bogus
 Bug Type: IIS related
 Operating System: Win 2K
 PHP Version:  4.0.6
 New Comment:

regarding the entry: [24 Apr 2002 10:37am] [EMAIL PROTECTED]

this is not a bug, you are just using dlls from previous versions of
PHP. get the new dlls and overwrite the old ones.  i just posted a note
about this under the Installation for Windows section of the Manual.


Previous Comments:


[2003-01-05 04:09:32] [EMAIL PROTECTED]

I was facing this problem when writing a code on the w9x Notepad and
modifying it by win2k editors or viseversa ... seems to be a problem
converting between unicode and ASCII.. in my humble openion (donno if
it's even right!) do it all on one editor.



[2003-01-02 09:12:54] [EMAIL PROTECTED]

I have the same problems with phpmyadmin producing a CGI error in both
panes after locking the anonymous IIS user out of the phpmyadmin
directory. I provide a credentials for a user with proper permissions
to that folder when accesssing it, but I still get the CGI errors. I
don't think it's reasonable to grany anonymous users access to this
administrative tool...

Any ideas?



[2002-10-22 08:14:01] [EMAIL PROTECTED]

I had this error when I use php myAdmin.

The problem was:
I had edit the config.inc.php with wordpad.

The sollution:
editing with textPad

...so long, Joe



[2002-10-16 16:10:48] [EMAIL PROTECTED]

I have W2k Server IIS5/PHP4
I was able to fix this issue simply by doing the following:

Open Internet Service Manager
Right Click Default Web Site (or any website using php)
Goto Properties
Click the HOME DIRECTORY tab
Click the CONFIGURATION button
Scroll down the list and select .php
Click Edit button
enable the CHECK THAT FILE EXISTS checkbox.
ok your way out.

This eliminated my problems with this error.



[2002-08-24 12:08:29] [EMAIL PROTECTED]

For those of you getting a CGI ERROR when trying to run PHPmyAdmin from
IIS (e.g. http://localhost/path_to_your_phpmyadmin_install/  .. 
Look at your config.inc file under "$cfg['PmaAbsoluteUri'] = " and make
sure that you have not included and extra space between the ending /
and the closing quotation mark.
Do this: ... ='http://localhost/phpmyadmin/'
Not This: ... ='http://localhost/phpmyadmin/  '
If this is the cause of your problem you will see a /%20%/ between
localhost and /phpmyadmin. All that is happening is an extra space is
being input into your html. Simple fix. Hope this helps some of you.



The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/12061

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




#13659 [Com]: Boolean values from a dbase file are not read corectly

2003-01-24 Thread hbrindis
 ID:   13659
 Comment by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Closed
 Bug Type: dBase related
 Operating System: Linux 2.4.x
 PHP Version:  4.0.6
 New Comment:

is there any way around in 4.0.6?

-Hector


Previous Comments:


[2001-10-13 10:49:03] [EMAIL PROTECTED]

This is already fixed in CVS.

--Jani




[2001-10-13 08:11:22] [EMAIL PROTECTED]

Reading the boolean fields from a dbase database does not work. 

I cannot submit a dbase file example but is easy to see whenever your
dbase file has a boolean field the returned field is equal with 0
regardless of the value of the dbase field.

I used a simple loop to read all records from the dbase file.

$dbf=dbase_open("/tmp/dbase_file", 0));
$num_rows=dbase_numrecords($dbf);
$nf  = dbase_numfields($dbf);

while ( $j<$num_rows) {
$k=0;
$rec=dbase_get_record($dbf, $j);
while($k < $nf) {
  print "$rec[$k],";
  $k++;
}
$j++;
print "";
}


Any boolean value read by  dbase_get_record returns 0  which is wrong.




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




#19022 [Com]: PHP Warning: Failed to write session data (files)

2003-01-24 Thread oscar
 ID:   19022
 Comment by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   No Feedback
 Bug Type: Session related
 Operating System: linux (rh7.3), apache 1.3.26
 PHP Version:  4.2.2
 New Comment:

ALL READ THIS PLEASE !!! SOLUTION TO
Failed to write session data
(files). Please verify that the current setting of session.save_path
is
correct (/tmp) in Unknown on line 0

In this case an many other, working with Linux or FreeBSD, remember
that applications are users too. I am not an expert on this OS, but I
know something. When a user does not have a home directory, he can not
do a lot of things, among them is to execute many commands (why? do not
ask) you may check, create a user with no home dir and test. So that is
the problem with mysql and www, (PHP is working as www because apache),
SO, assign a home dir to www and you will see the error no more. The
same may happen with some mysql change settings. Thanks.


Previous Comments:


[2003-01-23 14:28:50] [EMAIL PROTECTED]

Hello, had the same error on a low-traffice development server (one
processor) with pretty standart php (4.2.3) + apache (1.3.26) set-up. I
noticed that I forgot the SID on one page and that somehow messed up
the session and created the error on all pages that tried to access
this same session. After I put the missing SID in, everything worked
fine...



[2002-12-12 18:25:45] [EMAIL PROTECTED]

You can work around this bug by changing the session saver to "mm"
(without the quotes).

There are no known solutions to this problem that I can see out there.
The only people with solutions are the windows people who didn't change
the php.ini file to have a windows path in it. FOr the Linux people,
this may well be a library compatibility problem, which is the best
guess so far but is probably wrong!



[2002-12-07 20:32:26] [EMAIL PROTECTED]

Okay, I think I solved this bug for me at least.

I would receive this error:

Failed to write session data (files). Please verify that the current
setting of session.save_path is correct (c:\windows\temp) in Unknown on
line 0

and I finally tracked it down to being I was sometimes setting the
session_id(""); to blank, aka, to nothing. That would cause it to fail.
I still think this is a bug, because you shouldn't be able to break it
by setting it to nothing.

The reason I was unable to track this down quicker was because I had no
idea I was passing a blank variable to the session_id. So I looked into
that, and it turns out PHP fails to delete cookies.

I think their is a bug with the delete cookie functions...you might
want to check into that. To solve this, instead of deleting the
cookies, I just set them to -1, and then checked if they were -1, and
if so, treated them as if they weren't there.

I hope this helps,
Nate



[2002-12-07 20:05:38] [EMAIL PROTECTED]

I receive this bug too...I have traced it back to breaking as soon as I
use session_id(); function, and then working fine again once use of
that function is removed.



[2002-11-12 14:33:57] [EMAIL PROTECTED]

Another data point. I've recently moved a system from a hosted server
running 4.06 to a server under my control running redhat 7.3 and php
4.2.3 Since the move I've been getting very occasional cases of users
logging in and receiving someone else's session. The session handling
is very simple.

On login 
  session_name($db_name);
  session_start();
  $user = new User($userid, $passwd);
  session_register("user");

On return
  session_name($db_name);
  session_start();

I've tried various workarounds like 
  session.entropy_length= 512
  session.entropy_file  = /dev/urandom
in the belief that somehow the two people were getting the same ID and
hence temp file

But all this was just thrashing at the problem. Then I checked my own
cookies and discovered the same as 
[EMAIL PROTECTED] The cookie contained two session IDs. So I deleted
all relevant cookies. Logged out and in and now I'm back to the
expected single ID in the cookie. 

I have logging turned on but have not yet seen any errors.



The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/19022

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




#20920 [Fbk->NoF]: mssql.datetimeconvert=0 doesn't work for smalldatetime

2003-01-24 Thread php-bugs
 ID:   20920
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Feedback
+Status:   No Feedback
 Bug Type: MSSQL related
 Operating System: Windows 2000
 PHP Version:  4CVS-2002-12-10 (dev)
 New Comment:

No feedback was provided for this bug for over 2 weeks, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".


Previous Comments:


[2003-01-09 12:22:41] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php4-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-latest.zip

The handling of boolean ini settings did not always work due to wrong
initialization of data types. This has been fixed in cvs.



[2002-12-10 05:39:48] [EMAIL PROTECTED]

When setting:

   ini_set('mssql.datetimeconvert', 0);

fields of type 'smalldatetime' are still converted to a
local date format.  The above setting only seems to apply
to fields of type 'datetime'.
For example, leaving 'mssql.datetimeconvert = 1' and
displaying two fields DATETIME and SMALLDATETIME would
result in:

   Dec 31 2002 12:00AM  // DATETIME
   Dec 31 2002 12:00AM  // SMALLDATETIME

whereas, setting 'mssql.datetimeconvert = 0' would result
in:

   2002-12-31 00:00:00  // DATETIME
   Dec 31 2002 12:00AM  // SMALLDATETIME

See also: http://bugs.php.net/bug.php?id=12655




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




#21485 [Fbk->NoF]: feof() doesn't returns true on a socket stream

2003-01-24 Thread php-bugs
 ID:   21485
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Feedback
+Status:   No Feedback
 Bug Type: Sockets related
 Operating System: Win2K/Linux
 PHP Version:  4.3.0
 Assigned To:  wez
 New Comment:

No feedback was provided for this bug for over 2 weeks, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".


Previous Comments:


[2003-01-09 04:33:57] [EMAIL PROTECTED]

The following works for me:

$fp = fsockopen("localhost", 25);
stream_set_blocking($fp, false);
fwrite($fp, "QUIT\r\n");
while(!feof($fp)) {
  $data = fgets($fp);
  var_dump($data);
}
echo "\nAll done\n";

Under Win2000, WinXP, Linux2.4.19 (with IPv6), FreeBSD4.5 (with
IPv6)...

Not verified at all for me.



[2003-01-09 04:23:45] [EMAIL PROTECTED]

The following works for me:

$fp = fsockopen("localhost", 25);
stream_set_blocking($fp, false);
fwrite($fp, "QUIT\r\n");
while(!feof($fp)) {
  $data = fgets($fp);
  var_dump($data);
}
echo "\nAll done\n";

Remember that feof() will only return true when there is no more data
in the internal buffer held by the stream, so you need to drain off any
input by consuming it all first.



[2003-01-09 04:05:25] [EMAIL PROTECTED]

The nature of non-blocking sockets means that your script must always
be prepared to handle a false or zero length return from fgets/fread,
so I'm not worried about that aspect.
However, the feof() does seem to be a problem.
Looking into it...



[2003-01-09 02:48:19] [EMAIL PROTECTED]

I've noticed that I need the sleep() in order to retrieve the data.

The behaviour with blocking/non blocking sockets haven't changed
though, its still the same in php 4.3.0 as it were in previous php
versions.

What has changed is the feof() that never return true.

Regards
/Bjarne



[2003-01-08 21:40:39] [EMAIL PROTECTED]

It seems that socket_set_blocking($fp,FALSE); results in other peculiar
behaviour.
When connecting to SMTP server, the server sends some data across the
socket right away, usually something identifying the server.

$fp = fsockopen("mail_server", 25);
var_dump(fgets($fp, 1024));
fclose($fp);
returns the server identify string

$fp = fsockopen("mail_server", 25);
socket_set_blocking($fp,FALSE);
var_dump(fgets($fp, 1024));
fclose($fp);

returns (false) 

$fp = fsockopen("mail_server", 25);
sleep(1);
socket_set_blocking($fp,FALSE);
var_dump(fgets($fp, 1024));
fclose($fp);

returns identify string.

The position of the sleep() call can be after socket_set_blocking() as
well.



The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/21485

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