#22197 [Asn]: inline functions cannot use static identifier

2003-02-26 Thread sniper
 ID:   22197
 Updated by:   [EMAIL PROTECTED]
 Reported By:  j_vanveelen at jea dot ca
 Status:   Assigned
 Bug Type: Compile Failure
 Operating System: UnixWare 7.1.1
 PHP Version:  4CVS-2003-02-12 (stable)
-Assigned To:  sniper
+Assigned To:  sas
 New Comment:

Sascha, if you don't want to fix this, please explain why?



Previous Comments:


[2003-02-25 12:23:50] j_vanveelen at jea dot ca

I managed to get 4.2.3 installed and here are my notes.

I used gcc, gnu sed instead of the native cc and sed

./configure --with-apxs=/usr/local/apache/bin/apxs 

edited libtool

vi +/deplibs_check_method libtool
change it to deplibs_check_method=pass_all

make
make install

And it worked, but I doubt it'll work for newer versions.  And it's a
pain to insist that all UnixWare admins must use gcc/gnu sed because it
doesn't come installed or packaged.

Hopefully this helps for future considerations.

Thanks and keep up the great job guys! :)



[2003-02-25 04:43:23] [EMAIL PROTECTED]

Here's a pretty good explanation why this happens:
http://archives.postgresql.org/pgsql-hackers/2002-10/msg01248.php

Assigned to Sascha who's code this is..




[2003-02-17 18:00:33] j_vanveelen at jea dot ca

see above.



[2003-02-13 10:50:40] j_vanveelen at jea dot ca

No 4.3.0 crashes before then I think.  Here's the output:

bash-2.04# make
/bin/sh libtool --silent --mode=compile cc -Xb  -Iext/standard/
-I/home/vanj/php-4.3.0/ext/standard/ -DPHP_ATOM_INC
-I/home/vanj/php-4.3.0/include -I/home/vanj/php-4.3.0/main
-I/home/vanj/php-4.3.0 -I/home/vanj/php-4.3.0/Zend
-I/home/vanj/php-4.3.0/ext/xml/expat  -DUW=700 -DUSE_HSREGEX
-DUSE_EXPAT -I/home/vanj/php-4.3.0/TSRM  -g  -prefer-pic -c
/home/vanj/php-4.3.0/ext/standard/info.c -o ext/standard/info.lo
UX:acomp: WARNING: /home/vanj/php-4.3.0/main/php_streams.h, line 321:
no macro replacement within a string literal
UX:acomp: WARNING: /home/vanj/php-4.3.0/main/php_streams.h, line 322:
no macro replacement within a string literal
UX:acomp: WARNING: /home/vanj/php-4.3.0/ext/standard/info.c, line
198: argument #1 incompatible with prototype:
php_escape_html_entities()
UX:acomp: WARNING: /home/vanj/php-4.3.0/ext/standard/info.c, line
440: argument #3 incompatible with prototype:
zend_hash_get_current_key_ex()
/bin/sh libtool --silent --mode=compile cc -Xb
-I/usr/local/apache/include -Isapi/apache/
-I/home/vanj/php-4.3.0/sapi/apache/ -DPHP_ATOM_INC
-I/home/vanj/php-4.3.0/include -I/home/vanj/php-4.3.0/main
-I/home/vanj/php-4.3.0 -I/home/vanj/php-4.3.0/Zend
-I/home/vanj/php-4.3.0/ext/xml/expat  -DUW=700 -DUSE_HSREGEX
-DUSE_EXPAT -I/home/vanj/php-4.3.0/TSRM  -g  -prefer-pic -c
/home/vanj/php-4.3.0/sapi/apache/mod_php4.c -o sapi/apache/mod_php4.lo
UX:acomp: WARNING: /home/vanj/php-4.3.0/main/php_streams.h, line 321:
no macro replacement within a string literal
UX:acomp: WARNING: /home/vanj/php-4.3.0/main/php_streams.h, line 322:
no macro replacement within a string literal
UX:acomp: ERROR: /home/vanj/php-4.3.0/sapi/apache/mod_php4.c, line
780: undefined struct/union member: shutdown
UX:acomp: ERROR: /home/vanj/php-4.3.0/sapi/apache/mod_php4.c, line
780: function designator is not of function type
UX:acomp: ERROR: /home/vanj/php-4.3.0/sapi/apache/mod_php4.c, line
801: undefined struct/union member: shutdown
UX:acomp: ERROR: /home/vanj/php-4.3.0/sapi/apache/mod_php4.c, line
801: function designator is not of function type
*** Error code 1 (bu21)
UX:make: ERROR: fatal error.



[2003-02-12 21:40:07] [EMAIL PROTECTED]

does PHP 4.3.0 have the same error?




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/22197

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



#22427 [NEW]: Missing Form Post Data

2003-02-26 Thread jroland at uow dot edu dot au
From: jroland at uow dot edu dot au
Operating system: Windows XP / 2000
PHP version:  4.2.3
PHP Bug Type: Unknown/Other Function
Bug description:  Missing Form Post Data

I am currently experincing some problems with missing post form data. 

There seem two be 2 problems:
1) When a variable is long (for example a textarea and lots of text is in
it), the post data is not sent.
2) Sometimes even with small textarea, the post is still not outputed, but
if you hit refresh and click reload post data, it sometimes works. 

I have also set the max post size to 20MB which should be plenty for just
text.

I seem to have this problems on all browsers / computers.

Ay ideas?

Thanks

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



#22427 [Opn-Fbk]: Missing Form Post Data

2003-02-26 Thread sniper
 ID:   22427
 Updated by:   [EMAIL PROTECTED]
 Reported By:  jroland at uow dot edu dot au
-Status:   Open
+Status:   Feedback
 Bug Type: Unknown/Other Function
 Operating System: Windows XP / 2000
 PHP Version:  4.2.3
 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-02-26 05:17:57] jroland at uow dot edu dot au

I am currently experincing some problems with missing post form data. 

There seem two be 2 problems:
1) When a variable is long (for example a textarea and lots of text is
in it), the post data is not sent.
2) Sometimes even with small textarea, the post is still not outputed,
but if you hit refresh and click reload post data, it sometimes works.


I have also set the max post size to 20MB which should be plenty for
just text.

I seem to have this problems on all browsers / computers.

Ay ideas?

Thanks

Joel




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



#22263 [Opn-Asn]: socket_read() crashes on client close

2003-02-26 Thread sniper
 ID:   22263
 Updated by:   [EMAIL PROTECTED]
 Reported By:  caesar_iv4 at yahoo dot com
-Status:   Open
+Status:   Assigned
 Bug Type: Sockets related
 Operating System: win 98 SE
 PHP Version:  4.3.2-dev
-Assigned To:  
+Assigned To:  wez


Previous Comments:


[2003-02-18 23:00:24] [EMAIL PROTECTED]

correct PHP version..




[2003-02-17 23:51:11] caesar_iv4 at yahoo dot com

I use php 4.3.2 latest cvs 
even php 5 and it stil occurs

i am trying to write a small php-based httpdeamon and when i was
testing it with IE6, open the connection and the page starts loading,
but when i click on stop i get the usual crashed program box

here's the script:
?
function sock() {
global $SRV;
if (($sock = socket_create (AF_INET, SOCK_STREAM, 0))  0)
sock_err($sock,socket_create());
if (($ret = socket_bind ($sock, $SRV[IP], $SRV[PORT]))  0)
sock_err($sock,socket_bind());
if (($ret = socket_listen ($sock, $SRV[MAX_CL]))  0)
sock_err($sock,socket_listen());
return $sock;
}
function send($sock,$msg,$echo=true) {
global $CORE_DUMP;
//  socket_write($sock,$msg,strlen($msg));
fwrite($CORE_DUMP,$msg,strlen($msg));
if($echo)
echo $msg;
}
function log_access($ip) {
global $LOG_ACCESS;
$str = date(r).  .$ip.\n;
fwrite($LOG_ACCESS,$str,strlen($str));
}
function sock_err($sock,$fn) {
global $LOG_ERROR;
$str = $fn. failed, reason:
.socket_strerror(socket_last_error($sock));
echo $str;
fwrite($LOG_ERROR,$str,strlen($str));
}

error_reporting (E_ALL); 

set_time_limit (0);
ob_implicit_flush();
echo 07\n;
$sock = sock();
echo 09\n;
do {
echo 11\n;
if (($msgsock = socket_accept(@$sock))  0)
sock_err(@$msgsock,socket_accept());
echo 14\n;
socket_getpeername(@$msgsock,$ip);
echo 15\n;
log_access($ip);
echo 16\n;
$str = ;
echo 18\n;
$i = 0;
echo 20\n;
while ($msgsock) {
echo 23\n;
if (!$msgsock)
break;
echo $msgsock;
$buf = socket_read($msgsock, 2048, PHP_BINARY_READ);
echo 25\n;
if (!$buf) { 
sock_err(@$msgsock,socket_read());
break;
}
echo 26\n;
echo 28\n;
} 
echo 38\n;
socket_close (@$msgsock);
echo 40\n;
} while (@$sock);

socket_close (@$sock); 
?

the echoes were to pin-point the problem






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



#22178 [Com]: file_exists() outputs warnings if file does not exist

2003-02-26 Thread xeniac at animanga dot at
 ID:   22178
 Comment by:   xeniac at animanga dot at
 Reported By:  marchart at marchart dot at
 Status:   No Feedback
 Bug Type: Filesystem function related
 Operating System: solaris8
 PHP Version:  4.3.0
 New Comment:

This cosmetic problem also appears under Winodws.
Message:
Warning: file_exists() [function.file-exists]: Unable to access
themes/light/theme.class.php in
c:\work\html\nukeevent\includes\session.class.php on line 73

Using: PHP4.3.0


Previous Comments:


[2003-02-20 08:18:05] [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.





[2003-02-11 22:45:50] [EMAIL PROTECTED]

Was this last comment for the PHP 4.3.1-dev version?
(the latest STABLE snapshot) If so, please update the
version to be '4.3.1-dev'.

One thing you could check is that all the directories
in the path to the file have the same uid/gid/permission
that is required for the file.

(This is actually another bug which I can't find now.)





[2003-02-11 16:36:35] marchart at marchart dot at

The warnings disappear when specifying the
full path of the file.

Same problem also with function is_file()

Best Regards!



[2003-02-11 16:32:13] [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

At least one bug associated with warnings in file_exists  safe_mode
has been fixed in latest CVS. So, try the latest CVS and see if that
fixes the problem, if it does not please reply with all of the errors
generated by the function.



[2003-02-11 16:12:11] marchart at marchart dot at

Yes!

safe_mode   = On
safe_mode_exec_dir  = /usr/local/php/bin
open_basedir= /www

Filesystemlayout, usernames/uids/gids and 
php.ini are ident to my linux box, where this is 
running fine



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/22178

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



#18708 [Bgs]: Header(Location:) doesn't work after setCookie()?

2003-02-26 Thread hholzgra
 ID:   18708
 Updated by:   [EMAIL PROTECTED]
 Reported By:  andywright28 at hotmail dot com
 Status:   Bogus
 Bug Type: HTTP related
 Operating System: Win2000 sp6a
 PHP Version:  4.2.2
 New Comment:

to bandit_109 at hotmailc dot om:

it is your code that is doing something wrong,
as it is relying on client behaviour that 
simply doesn't exist (besides the fact that
your Location: header violates RFC2616 anyway)

Location: and Set-Cookie: handlers within a 
single reply just don't work, there's *nothing*
PHP can do about it ...

what you can do is using the SID constant to
add the session id to the Location: redirect
URL as a GET parameter (and change the relative
URL to an absolute one) 




Previous Comments:


[2003-02-25 18:04:31] bandit_109 at hotmailc dot om

I have the same problem except this is an BAD issue for me because my
code looks like this:

?
session_name(woot);
session_start();
if (isset($_SESSION[access]))
echo Session was registered with:  . $_SESSION[access];
else
{
$access = session variable;
$_SESSION[access]=$access;
}
header(Location: test2.php);
?

Now obviously if the cookie does not get sent, then I cannot send the
session id. I'm trying to migrate an application to IIS and this borks
the entire site. I suppose I can get away with replacing all my header
redirects with 
echo meta http-equiv='refresh' content='0;test2.php';
but I wish there was some way that was better than that.



[2002-08-05 05:03:44] [EMAIL PROTECTED]

php sends both the SetCookie: and the Location: header,
and changes the HTTP status code to 302 to indicate
the redirect 

the actual redirect may happen on the server or the
client side depending on server api and server settings,
in which case the client will never know about the
SetCookie: header as it doesn't even see it

and even if the redirect is processed on the client
side the client might just look for the Location:
line due to the redirect status of the request result
and not process any other headers like esp. SetCookie:
as a redirect is not supposed to have any other payload
than the redirection target address

(i won't comment on the code quality of phpnuke here ;)



[2002-08-02 11:56:58] andywright28 at hotmail dot com

Does Header() not use echo() to print text out? Essentially doing the
same thing (with a few checks)? I'm just guessing, as I haven't looked
at the source. It just seems strange not to work on a server like IIS.
I ran the code originally on Linux/Apache (Mandrake 8.0) and it all
worked fine out of the box, using the same machine/browser
(Win2k/IE5.5) to browse the web site.

And thanks on the info for the Location: header. I think the guys doing
a href=www.phpnuke.netPHPNuke/a should take note since its their
code I'm quoting from!



[2002-08-02 11:33:28] [EMAIL PROTECTED]

this is not a PHP issue, it is either the webserver or the browser that
ignores the SetCookie header on HTTP redirects

btw: your Location: header usage is dangerous, the RFC
clearly says that you have to use *absolute* URLs
in Location: headers



[2002-08-02 10:57:38] andywright28 at hotmail dot com

?
//some processing
$info = base64encode($information);
setcookie(user,$info,time()+15552000);
Header(Location: file.php);
?

The cookie doesn't get set if a Header() function is used straight
after it. If I comment out the header function then the cookie is set
ok. I can also replace the Header() function with an echo() as in:
echo meta http-equiv='refresh' content='0;file.php';
and this works fine also.

The PHP installed is the 4.2.2 precompiled binary for Windows, running
php.exe from IIS version 5. The piece of code is actually used in
PHPNuke. Line 502 of /modules/Your_Account/index.php.

Am I missing something?

Andy




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



#22428 [NEW]: sum of values results in unexpected value

2003-02-26 Thread bnieuwen at hio dot hen dot nl
From: bnieuwen at hio dot hen dot nl
Operating system: linux
PHP version:  4.2.3
PHP Bug Type: Math related
Bug description:  sum of values results in unexpected value

I have a problem summing values. 
The very simple script
?
echo Total =  . (10.00 - 10.01);
?

produces:
Total = -0.0098

I expected the following result: 
Total = -0,01

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



#22403 [Fbk-Opn]: PHP crashes when executing a sql procedure without parameters

2003-02-26 Thread cesararnold at yahoo dot com dot br
 ID:   22403
 User updated by:  cesararnold at yahoo dot com dot br
 Reported By:  cesararnold at yahoo dot com dot br
-Status:   Feedback
+Status:   Open
 Bug Type: Sybase-ct (ctlib) related
 Operating System: Win2000
 PHP Version:  4.3.2-dev
 New Comment:

Hi, thanks for your reply.

sybase did not stop. If I ran the query with null parameter (as
mentioned) directly into the database, nothing wrong happens. Also,
using differente interfaces to run that query using null, everything
goes well. the db returns a error message saying that that the query
does not accept null values and returns, something like:

Server Message:  Number  201, Severity  16
Procedure 'procedure_name', Line 0:
Procedure procedure_name expects parameter @ID, which was not supplied.

(return status = -6)

So, the problem, on my oppinion, is not on the db. 
Could it be on php or on the native dll, on this case :
php_sybase_ct.dll, when receiving the error message from the database
?

I hope this can help.
Thanks again.


Previous Comments:


[2003-02-25 15:34:09] [EMAIL PROTECTED]

What crashes in particular PHP or Sybase? Given the nature of your
error I could see how the query would fail, which could trigger a crash
in sybase if this particular condition is not handled. However, if that
is the case there is nothing PHP could do to prevent such a thing from
happening.



[2003-02-25 02:13:02] [EMAIL PROTECTED]

Assuming this is sybase related..plus correct PHP version.




[2003-02-24 15:38:45] cesararnold at yahoo dot com dot br

Hi,

we are using PHP 4.3.2 (latest STABLE version) and found a possible bug
when trying to execute a sql command (a procedure). the procedure needs
1 (one) argument and does not accept null values when is called. 
On our case, the variable $varID was infortunatelly = NULL. after ran
the code we got two strange behaviors:

1) using pear object
$cmd_sql = exec procedure_name  . $varID;

if (DB::isError($query_proc = $db_conn-query($cmd_sql))) 
{
// get the native backend error
// and the last query
exit($query_proc-getMessage());
}
the system crashes and stops the web server! restarting the web server,
evething restarts to work. 

2) using native functions
like @sybase_query( $cmd_sql, $db_conn );

the system crashes but does NOT stop the web server.

for both cases php gives the message:
PHP has encountered an Access Violation at 01E436B9

I know that this can be fixed just sending a non-null value to the
procedure, but PHP could not crash, on my single oppinion.

Is there some fix to this case?
Thanks a lot.




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



#22401 [Fbk-Opn]: ob_start callback function isn't called when script exceeds max_execution_time

2003-02-26 Thread php at andyuhl dot com
 ID:   22401
 User updated by:  php at andyuhl dot com
 Reported By:  php at andyuhl dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Output Control
 Operating System: Win2K
 PHP Version:  4.3.0
 New Comment:

The original server running 4.3.0 is using a slightly customized
version of php.ini-dist.  When I installed the CVS snapshot yesterday,
I used php.ini-dist with no changes and was able to reproduce the
problem on a second machine.

Another thing I discovered is that it seems to work properly if I call
ob_gzhandler as the callback function.  It only seems to fail when
supplying your own function as I did in the example code in my original
post.


Previous Comments:


[2003-02-26 01:07:39] [EMAIL PROTECTED]

Which php.ini are you using? php.ini-dist or php.ini-recommended? Have
you made any changes to it?




[2003-02-25 09:32:46] php at andyuhl dot com

Problem still occurs with latest snapshot.  

It should be noted that not only does the replaced output not appear,
but the original output containing the timeout error message and
whatever your original output should be also does not appear.  It is
simply empty.

I tested this on a different machine as I am not able to upgrade the
original machine at this time.  This machine is WinXP instead of Win2K
and it is now running the latest snapshot.



[2003-02-25 02:20:50] [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

Can not reproduce using latest CVS snapshot..




[2003-02-24 13:07:56] php at andyuhl dot com

The ob_start callback function doesn't seem to get called when the
script runs long.  To reproduce:

?php
function callback($buffer) {
return callback function executed successfully.;
}

set_time_limit(5);
ob_start(callback);

while (1) {
// do nothing
}

ob_end_flush();
?


This results in empty output for me.  You can see my environment here:
http://www.andyuhl.com/phpinfo.php




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



#22433 [NEW]: [chm] bug on function.range.html

2003-02-26 Thread sergey at sociology dot kharkov dot ua
From: sergey at sociology dot kharkov dot ua
Operating system: windows
PHP version:  4.3.0
PHP Bug Type: *General Issues
Bug description:  [chm] bug on function.range.html

I have found a bug on page function.range.html
[chm date: 2002-12-27]...

Server hand-ups when I use russian letters:

foreach(range('à','ÿ') as $letter) { 
   echo $letter; 
} 
-- 
Edit bug report at http://bugs.php.net/?id=22433edit=1
-- 
Try a CVS snapshot: http://bugs.php.net/fix.php?id=22433r=trysnapshot
Fixed in CVS:   http://bugs.php.net/fix.php?id=22433r=fixedcvs
Fixed in release:   http://bugs.php.net/fix.php?id=22433r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=22433r=needtrace
Try newer version:  http://bugs.php.net/fix.php?id=22433r=oldversion
Not developer issue:http://bugs.php.net/fix.php?id=22433r=support
Expected behavior:  http://bugs.php.net/fix.php?id=22433r=notwrong
Not enough info:http://bugs.php.net/fix.php?id=22433r=notenoughinfo
Submitted twice:http://bugs.php.net/fix.php?id=22433r=submittedtwice
register_globals:   http://bugs.php.net/fix.php?id=22433r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=22433r=php3
Daylight Savings:   http://bugs.php.net/fix.php?id=22433r=dst
IIS Stability:  http://bugs.php.net/fix.php?id=22433r=isapi
Install GNU Sed:http://bugs.php.net/fix.php?id=22433r=gnused



#22434 [NEW]: Overload hides properties in class methods, too

2003-02-26 Thread phpbugs at liwing dot de
From: phpbugs at liwing dot de
Operating system: FreeBSD 5.0-CURRENT
PHP version:  4.3.1
PHP Bug Type: Feature/Change Request
Bug description:  Overload hides properties in class methods, too

More complex classes which's properties should become protected may need to
modify / initializes some of their management properties in constructor or
in an important member method.

Imagine a central factory manager using a list of meta objects . Or a
public/private key manager class, which has to manager 3 lists, public
keys, private keys and passphrases.

If the list aren't hard-coded in each class but list objects as members
are used, a constructor like
class CertMgr
{
var $PublicKeys;
var $PrivateKeys;

function CertMgr()
{
  $this-PublicKeys =  new List();
  $this-PrivateKeys =  new List();
  $this-PublicKeys-SetValue( mine, abcdefg );
  $this-PrivateKeys-SetValue( mine, secret-of-abcdefg );
}

function __get( $pn, $pv )
{
  if( $this-PublicKeys-KeyExists( $pn ) )
  {
$pv = $this-PublicKeys-GetValue( $pn );
return TRUE;
  }
  else
  {
return FALSE;
  }
}

} // end of class CertMgr

overload( CertMgr );

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



#22112 [Opn]: When Php compiled with support for openssl it broke the SIHUP of apache

2003-02-26 Thread sysadmin at destination dot ca
 ID:   22112
 User updated by:  sysadmin at destination dot ca
 Reported By:  sysadmin at destination dot ca
 Status:   Open
 Bug Type: Apache related
 Operating System: Linux Redhat 6.2
 PHP Version:  4.3.0
 New Comment:

Hi,

There is the test i have run today.

TEST 1 :

Apache 1.3.27
Mod_ssl 2.8.12
Openssl 0.9.6i

PHP version tried :
php4.3.1 :
[Wed Feb 26 08:28:52 2003] [notice] SIGHUP received.  Attempting to
restart - but never restart
php4-200302261230
[Wed Feb 26 08:54:42 2003] [notice] SIGHUP received.  Attempting to
restart - but never restart
php4-STABLE-200302261230
[Wed Feb 26 08:59:32 2003] [notice] SIGHUP received.  Attempting to
restart - but never restart

So i confirm you that the latest stable release don't correct that
problem.

Regars
Configuration file for php:

./configure \
--with-mysql=/usr/local/mysql \
--enable-calendar \
--enable-gettext \
--enable-ftp \
--enable-bcmath \
--enable-trans-sid \
--enable-gd-imgstrttf \
--enable-gd-native-ttf \
--enable-debug \
--with-dom \
--with-gd=/usr/gd-with_gif \
--with-jpeg-dir=/usr/lib \
--with-freetype-dir=/usr/local/freetype2 \
--with-png-dir=/usr/lib \
--with-gettext \
--with-zlib \
--with-mm=/usr/lib \
--with-zlib-dir=/usr/lib \
--with-pdflib=/usr/local/pdflib \
--with-config-file-path=/usr/local/apache/conf \
--with-apxs=/usr/local/apache/bin/apxs \
--with-mcrypt=/usr/local/libmcrypt \
--with-openssl=/usr/local/ssl \
--with-snmp \
--with-kerberos \
--with-imap \
--with-imap-ssl=/usr/local/ssl \
--prefix=/usr/local/php


TEST 2 :






Previous Comments:


[2003-02-24 09:24:12] sysadmin at destination dot ca

no i have say i will try tomorrow with the lastest cvs snapshot ...
with the latest cvs snapsot of friday it was not working.

I will keep you inform.

Regards



[2003-02-24 08:43:05] [EMAIL PROTECTED]

I think I didn't understand you correctly..but didn't you just say in
your last comment that it did work?

And next release (4.3.2) will be out in couple of weeks.
(hopefully mid-march)




[2003-02-24 08:34:51] sysadmin at destination dot ca

Latest question.

I will try the latest snapshot today the one of friday still have the
problem.

If the problem is corrected in the cvs-snaptsnot, how long till you
release a new version ? since i can't run a cvs code on production
server.

Regards



[2003-02-24 08:28:05] [EMAIL PROTECTED]

If the problem that you opened this bug report for is fixed in latest
cvs snapshot - closed.

(check the bug database for reports about open_basedir problems and
that openssl 0.9.7 problem. Add your comments to the existing reports
and if you can't find any, submit new reports.)




[2003-02-24 08:22:36] sysadmin at destination dot ca

MODSSL :
./configure --with-apache=../apache_1.3.27 --with-ssl=/usr/local/ssl
APACHE :
./configure \
--prefix=/usr/local/apache \
--enable-module=log_agent \
--enable-module=log_referer \
--enable-module=info \
--enable-module=vhost_alias \
--enable-module=speling \
--enable-module=rewrite \
--enable-module=so \
--enable-module=ssl
OpenSSL 0.9.6i ( since OpenSSL 0.9.7 or 0.9.7a ) don't compile with php
4.3.1 or lastest stable snapshot )
./config --openssldir=/usr/local/ssl;make;make test;make install
PHP 4.3.1 or lastest stable snapshot
./configure \
--with-mysql=/usr/local/mysql \
--enable-calendar \
--enable-gettext \
--enable-ftp \
--enable-bcmath \
--enable-trans-sid \
--enable-gd-imgstrttf \
--enable-gd-native-ttf \
--with-dom \
--with-gd=/usr/gd-with_gif \
--with-jpeg-dir=/usr/lib \
--with-freetype-dir=/usr/local/freetype2 \
--with-png-dir=/usr/lib \
--with-gettext \
--with-zlib \
--with-mm=/usr/lib \
--with-zlib-dir=/usr/lib \
--with-pdflib=/usr/local/pdflib \
--with-config-file-path=/usr/local/apache/conf \
--with-apxs=/usr/local/apache/bin/apxs \
--with-mcrypt=/usr/local/libmcrypt \
--with-openssl=/usr/local/ssl \
--with-snmp \
--with-kerberos \
--with-imap \
--with-imap-ssl=/usr/local/ssl \
--prefix=/usr/local/php

RESUME :
As far as i know the problem exist for up to php 4.2.0
with this setup if you don't setup any open_basedir config in
httpd.conf it look like there's no problem, if you setup a open_basedir
for one virtual host the problem start to happen in the error log you
see a website trying to load php file with the open_basedir of another
virtualhost, the work around is to setup a open_basedir for every
virtualhost.

This seem to 

#22421 [Bgs-Opn]: Problems compiling PHP with LDAP

2003-02-26 Thread gustavo at radiumsystems dot com dot br
 ID:   22421
 User updated by:  gustavo at radiumsystems dot com dot br
 Reported By:  gustavo at radiumsystems dot com dot br
-Status:   Bogus
+Status:   Open
 Bug Type: LDAP related
-Operating System: Linux Conectriva 8.0
+Operating System: Linux Conectiva 8.0
 PHP Version:  4.2.3
 New Comment:

The main problem is to know wich file I have to put the directory way
in ld.so.conf.

The libraries libldap.so and libldap_r.so have their directory ways
listed in ld.so.conf. I run ldconfig command too.

Sorry about it but I didn´t understand your last comment. Can you
explain me with more details.


Previous Comments:


[2003-02-26 01:02:20] [EMAIL PROTECTED]

(and you're supposed to pass the --with-ldap the INSTALL prefix of the
ldap libs..)




[2003-02-26 01:01:25] [EMAIL PROTECTED]

You're supposed to search the bug-db BEFORE you submit new reports:

http://www.phpbuilder.com/mail/php-install/2001032/0047.php




[2003-02-25 15:58:23] gustavo at radiumsystems dot com dot br

I've compiled PHP like this:

#! /bin/sh
#
# Created by configure

'./configure' \
'--enable-track-vars' \
'--with-mhash=../mhash-0.8.17' \
'--with-mcrypt' \
'--enable-dbase' \
'--with-gdbm' \
'--enable-dba=shared' \
'--enable-sockets' \
'--with-dba' \
'--with-pgsql' \
'--with-apxs=/opt/apache/bin/apxs' \
'--with-png-dir' \
'--with-jpeg-dir' \
'--with-imap=../imap-2002b' \
'--with-java=/usr/local/jdk' \
'--with-ldap=../openldap-2.0.25' \
$@

All occurs right when I type make and make install commands.

But when I tried to start apache, this message appers:

[EMAIL PROTECTED] php-4.2.3]# /opt/apache/bin/apachectl start
Syntax error on line 205 of /opt/apache/conf/httpd.conf:
Cannot load /opt/apache/libexec/libphp4.so into server:
/opt/apache/libexec/libphp4.so: undefined symbol: ldap_value_free
/opt/apache/bin/apachectl start: httpd could not be started

I've checked the libphp4.so and it returns:
[EMAIL PROTECTED] php-4.2.3]# ldd /opt/apache/libexec/libphp4.so
libdl.so.2 = /lib/libdl.so.2 (0x40167000)
libimap.so.4 = /usr/lib/libimap.so.4 (0x4016b000)
libpq.so.2 = /usr/lib/libpq.so.2 (0x40228000)
libmhash.so.2 = /usr/lib/libmhash.so.2 (0x40239000)
libmcrypt.so.4 = /usr/lib/libmcrypt.so.4 (0x4025c000)
libltdl.so.0 = /usr/lib/libltdl.so.0 (0x40262000)
libcrypt.so.1 = /lib/libcrypt.so.1 (0x40266000)
libresolv.so.2 = /lib/libresolv.so.2 (0x40294000)
libm.so.6 = /lib/libm.so.6 (0x402a7000)
libnsl.so.1 = /lib/libnsl.so.1 (0x402ca000)
libc.so.6 = /lib/libc.so.6 (0x402e1000)
libpam.so.0 = /lib/libpam.so.0 (0x40408000)
libgssapi_krb5.so.2 = /usr/lib/krb5/libgssapi_krb5.so.2
(0x4041)
libkrb5.so.3 = /usr/lib/krb5/libkrb5.so.3 (0x40426000)
libcrypto.so.0.9.6 = /usr/lib/libcrypto.so.0.9.6 (0x40492000)
libcom_err.so.3 = /usr/lib/krb5/libcom_err.so.3 (0x4054b000)
libssl.so.0.9.6 = /usr/lib/libssl.so.0.9.6 (0x4054e000)
libltdl.so.3 = /usr/lib/libltdl.so.3 (0x4057c000)
/lib/ld-linux.so.2 = /lib/ld-linux.so.2 (0x8000)
libk5crypto.so.3 = /usr/lib/krb5/libk5crypto.so.3
(0x40583000)

As you can see the result, it doesn't returned anythig about Ldap
libraries, so it probably explains Apache error when I try to start
it.

Does anyone know something about this problem?




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



#22435 [NEW]: count() is slow when used with large arrays

2003-02-26 Thread carl at topthetable dot com
From: carl at topthetable dot com
Operating system: Redhat 7.2
PHP version:  4.3.1
PHP Bug Type: Performance problem
Bug description:  count() is slow when used with large arrays

count() is increasingly slow when used to count large arrays.  This is
using 4.3.1 (compiled from source) on a Redhat 7.2 box.  The box has about
80Mb free, so it's not a paging issue.  It works as expected on Mac OS X
running 4.3.1-dev.

Looking at PHP's and Zend's source, I would expect the time taken to
return the count() of an array to be similar regardless of the size of the
array.

Below is a script to demonstrate the problem.  


?
  $st = microtime();

  echo Script started:.microtime().\n;

  dosize( 10 );
  dosize( 20 );
  dosize( 50 );
  dosize( 100 );
  dosize( 200 );
  dosize( 500 );
  dosize( 1000 );
  dosize( 5000 );
  dosize( 1 );

  function dosize( $y ) {

echo Doing size $y\n;

echo   Starting array building:.microtime().\n;

$t = array();
for ( $i=0; $i$y; $i++ ) {
  $t[] = array( array( 3, 1 ), 3, array( array ( 5, 1, 8 )
) );
}

echo   Array built:.microtime().\n;

count( $t );

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



#22436 [NEW]: Valid solution for working with 1969 dates

2003-02-26 Thread ivo at ibuildings dot nl
From: ivo at ibuildings dot nl
Operating system: Redhat Linux 
PHP version:  4.3.0
PHP Bug Type: Date/time related
Bug description:  Valid solution for working with  1969 dates

Hi,

working with dates before 1970 with mktime sometimes works, sometimes
doesn't.

There are several bugs in the bug database describing this problem: bug
#18802, bug #22163 and bug #20280.

All are answered with stuff like behaviour of mktime before 1970 is
undefined, it's not a php bug because it's due to glibc etc.

While all of these are most certainly true, it's not really a helpful
answer to php users. PHP users just want to do stuff with dates. When
working with birthdates, dates from before 1970 are quite common.
Therefor, I request that the php date/time functions will be made such
that they *work*, regardless of the operating system, the glibc version
etc.

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



#22437 [NEW]: Segmentation violation

2003-02-26 Thread olle at compound dot se
From: olle at compound dot se
Operating system: Redhat7.2/kernel 2.4.9
PHP version:  4.3.1
PHP Bug Type: Reproducible crash
Bug description:  Segmentation violation

We are running a commercial flight-booking website based upon Apache 1.3.27
and php 4.3.1, querying a PostgresQL 7.1.3 database via ODBC (UnixODBC).
The php-interpeter is run as a Apache-module.

Occasionally (30 times a day?) a httpd server process dies caused by
segmentation violation. We have collected and looked at 30 dumped cores
and the calling stack appear to be somewhat different each time. Our
conclusion is that the segmentation violations are probably not a result
of the functions appearing on the stack of the dumped cores, but more
likely caused by corrupted datastructures which may have been around for
some time.

In an attempt to isolate the cause of our problems we ran a single httpd
server in control of valgrind (an I386 emulator/memory allocation analyser
in software). Valgrind indicates that the PHP 4.3.1 ODBC-functions
repeatedly write and read from invalid memory adresses. Typically 4 bytes
beyond a malloced block of memory. We believe these writes (or reads?) may
be the cause of our crashing httpd processes.

Below is a quote of the Valgrind output. Furter down you will fins our PHP
configuration.

==29000== Invalid write of size 4
==29000==at 0x4664821F: CLConnect (SQLConnect.c:258)
==29000==by 0x43D0: ??? (SQLConnect.c:1852)
==29000==by 0x43D13555: SQLConnect (SQLConnect.c:3483)
==29000==by 0x44B4DE09: odbc_sqlconnect
(/opt/tools/php/php-4.3.1/ext/odbc/php_odbc.c:2136)
==29000==Address 0x40FC254C is 4 bytes after a block of size 4
alloc'd
==29000==at 0x400483E4: malloc (vg_clientfuncs.c:100)
==29000==by 0x466481EB: CLConnect (SQLConnect.c:241)
==29000==by 0x43D0: ??? (SQLConnect.c:1852)
==29000==by 0x43D13555: SQLConnect (SQLConnect.c:3483)
==29000==
==29000== Invalid write of size 4
==29000==at 0x46648393: CLConnect (SQLConnect.c:341)
==29000==by 0x43D0: ??? (SQLConnect.c:1852)
==29000==by 0x43D13555: SQLConnect (SQLConnect.c:3483)
==29000==by 0x44B4DE09: odbc_sqlconnect
(/opt/tools/php/php-4.3.1/ext/odbc/php_odbc.c:2136)
==29000==Address 0x40FC2548 is 0 bytes after a block of size 4
alloc'd
==29000==at 0x400483E4: malloc (vg_clientfuncs.c:100)
==29000==by 0x466481EB: CLConnect (SQLConnect.c:241)
==29000==by 0x43D0: ??? (SQLConnect.c:1852)
==29000==by 0x43D13555: SQLConnect (SQLConnect.c:3483)
==29000==
==29000== Invalid read of size 4
==29000==at 0x466483B7: CLConnect (SQLConnect.c:350)
==29000==by 0x43D0: ??? (SQLConnect.c:1852)
==29000==by 0x43D13555: SQLConnect (SQLConnect.c:3483)
==29000==by 0x44B4DE09: odbc_sqlconnect
(/opt/tools/php/php-4.3.1/ext/odbc/php_odbc.c:2136)
==29000==Address 0x40FC2548 is 0 bytes after a block of size 4
alloc'd
==29000==at 0x400483E4: malloc (vg_clientfuncs.c:100)
==29000==by 0x466481EB: CLConnect (SQLConnect.c:241)
==29000==by 0x43D0: ??? (SQLConnect.c:1852)
==29000==by 0x43D13555: SQLConnect (SQLConnect.c:3483)
==29000==
==29000== Invalid write of size 2
==29000==at 0x4676214C: SQLGetInfo (info.c:671)
==29000==by 0x466483BF: CLConnect (SQLConnect.c:360)
==29000==by 0x43D0: ??? (SQLConnect.c:1852)
==29000==by 0x43D13555: SQLConnect (SQLConnect.c:3483)
==29000==Address 0x40FC2554 is 12 bytes after a block of size 4
alloc'd
==29000==at 0x400483E4: malloc (vg_clientfuncs.c:100)
==29000==by 0x466481EB: CLConnect (SQLConnect.c:241)
==29000==by 0x43D0: ??? (SQLConnect.c:1852)
==29000==by 0x43D13555: SQLConnect (SQLConnect.c:3483)

#! /bin/sh
#
# Created by configure

'./configure' \
'--enable-shared' \
'--with-apxs' \
'--with-unixODBC' \
'--with-xml' \
'--enable-xslt' \
'--with-xslt-sablot=/usr/local' \
'--enable-sablot-errors-descriptive' \
'--with-dom=/usr/local' \
'--with-zlib' \
'--enable-trans-sid' \
'--with-iconv=/usr/local' \
'--with-imap' \
'--with-gettext' \
'--with-tsrm-pthreads' \
'--enable-roxen-zts' \
'--with-mysql' \
'-with-kerberos=/usr/kerberos' \
$@

-- 
Edit bug report at http://bugs.php.net/?id=22437edit=1
-- 
Try a CVS snapshot: http://bugs.php.net/fix.php?id=22437r=trysnapshot
Fixed in CVS:   http://bugs.php.net/fix.php?id=22437r=fixedcvs
Fixed in release:   http://bugs.php.net/fix.php?id=22437r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=22437r=needtrace
Try newer version:  http://bugs.php.net/fix.php?id=22437r=oldversion
Not developer issue:http://bugs.php.net/fix.php?id=22437r=support
Expected behavior:  http://bugs.php.net/fix.php?id=22437r=notwrong
Not enough info:http://bugs.php.net/fix.php?id=22437r=notenoughinfo
Submitted twice:http://bugs.php.net/fix.php?id=22437r=submittedtwice
register_globals:   http://bugs.php.net/fix.php?id=22437r=globals
PHP 3 support 

#22421 [Opn-Bgs]: Problems compiling PHP with LDAP

2003-02-26 Thread sniper
 ID:   22421
 Updated by:   [EMAIL PROTECTED]
 Reported By:  gustavo at radiumsystems dot com dot br
-Status:   Open
+Status:   Bogus
 Bug Type: LDAP related
 Operating System: Linux Conectiva 8.0
 PHP Version:  4.2.3
 New Comment:

First of all, this is not any bug. Second, you should use PHP 4.3.1,
third, read  the configure --help sometimes.

And last but not least, ask support questions elsewhere.
Thank you.

Hint: I use --with-ldap=/www/openldap
Where /www/openldap is the --prefix path I used when I configured
openldap.



Previous Comments:


[2003-02-26 08:05:54] gustavo at radiumsystems dot com dot br

The main problem is to know wich file I have to put the directory way
in ld.so.conf.

The libraries libldap.so and libldap_r.so have their directory ways
listed in ld.so.conf. I run ldconfig command too.

Sorry about it but I didn´t understand your last comment. Can you
explain me with more details.



[2003-02-26 01:02:20] [EMAIL PROTECTED]

(and you're supposed to pass the --with-ldap the INSTALL prefix of the
ldap libs..)




[2003-02-26 01:01:25] [EMAIL PROTECTED]

You're supposed to search the bug-db BEFORE you submit new reports:

http://www.phpbuilder.com/mail/php-install/2001032/0047.php




[2003-02-25 15:58:23] gustavo at radiumsystems dot com dot br

I've compiled PHP like this:

#! /bin/sh
#
# Created by configure

'./configure' \
'--enable-track-vars' \
'--with-mhash=../mhash-0.8.17' \
'--with-mcrypt' \
'--enable-dbase' \
'--with-gdbm' \
'--enable-dba=shared' \
'--enable-sockets' \
'--with-dba' \
'--with-pgsql' \
'--with-apxs=/opt/apache/bin/apxs' \
'--with-png-dir' \
'--with-jpeg-dir' \
'--with-imap=../imap-2002b' \
'--with-java=/usr/local/jdk' \
'--with-ldap=../openldap-2.0.25' \
$@

All occurs right when I type make and make install commands.

But when I tried to start apache, this message appers:

[EMAIL PROTECTED] php-4.2.3]# /opt/apache/bin/apachectl start
Syntax error on line 205 of /opt/apache/conf/httpd.conf:
Cannot load /opt/apache/libexec/libphp4.so into server:
/opt/apache/libexec/libphp4.so: undefined symbol: ldap_value_free
/opt/apache/bin/apachectl start: httpd could not be started

I've checked the libphp4.so and it returns:
[EMAIL PROTECTED] php-4.2.3]# ldd /opt/apache/libexec/libphp4.so
libdl.so.2 = /lib/libdl.so.2 (0x40167000)
libimap.so.4 = /usr/lib/libimap.so.4 (0x4016b000)
libpq.so.2 = /usr/lib/libpq.so.2 (0x40228000)
libmhash.so.2 = /usr/lib/libmhash.so.2 (0x40239000)
libmcrypt.so.4 = /usr/lib/libmcrypt.so.4 (0x4025c000)
libltdl.so.0 = /usr/lib/libltdl.so.0 (0x40262000)
libcrypt.so.1 = /lib/libcrypt.so.1 (0x40266000)
libresolv.so.2 = /lib/libresolv.so.2 (0x40294000)
libm.so.6 = /lib/libm.so.6 (0x402a7000)
libnsl.so.1 = /lib/libnsl.so.1 (0x402ca000)
libc.so.6 = /lib/libc.so.6 (0x402e1000)
libpam.so.0 = /lib/libpam.so.0 (0x40408000)
libgssapi_krb5.so.2 = /usr/lib/krb5/libgssapi_krb5.so.2
(0x4041)
libkrb5.so.3 = /usr/lib/krb5/libkrb5.so.3 (0x40426000)
libcrypto.so.0.9.6 = /usr/lib/libcrypto.so.0.9.6 (0x40492000)
libcom_err.so.3 = /usr/lib/krb5/libcom_err.so.3 (0x4054b000)
libssl.so.0.9.6 = /usr/lib/libssl.so.0.9.6 (0x4054e000)
libltdl.so.3 = /usr/lib/libltdl.so.3 (0x4057c000)
/lib/ld-linux.so.2 = /lib/ld-linux.so.2 (0x8000)
libk5crypto.so.3 = /usr/lib/krb5/libk5crypto.so.3
(0x40583000)

As you can see the result, it doesn't returned anythig about Ldap
libraries, so it probably explains Apache error when I try to start
it.

Does anyone know something about this problem?




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



#22394 [Fbk-Opn]: No libphp4.so module for Apache 2.0.43

2003-02-26 Thread apiotr at itm dot pcz dot czest dot pl
 ID:   22394
 User updated by:  apiotr at itm dot pcz dot czest dot pl
 Reported By:  apiotr at itm dot pcz dot czest dot pl
-Status:   Feedback
+Status:   Open
 Bug Type: Compile Failure
 Operating System: UnixWare 7.1.1
 PHP Version:  4.3.1
 New Comment:

In this CVS version is the same problem.


Previous Comments:


[2003-02-24 09:47:55] [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-02-24 09:23:59] apiotr at itm dot pcz dot czest dot pl

I have big problem with PHP 4.3.1 on UnixWare 7.1.1. After compilation
source version of PHP 4.3.1 I don't have the libphp4.so module for
Apache 2.0.43. I have only library files libphp4.a and libphp4.la.
During compilation I don't 
have any errors messages.

My configuration options:
./configure \
--with-mysql=/usr/local/mysql --with-zlib --with-openssl \
--enable-sysvmsg --enable-sysvsem --enable-sysvshm \
--with-java=/opt/java2-1.2.2 --enable-ftp --enable-dba \
--with-dom=/usr/local/lib --with-gd --with-jpeg-dir --with-png-dir \
--enable-filepro --enable-safe-mode --with-exec-dir --with-bz2 \
--enable-track-vars --enable-force-cgi-redirect --with-gettext \
--with-gdbm --enable-cgi --enable-cli \
--with-apxs2=/usr/local/apache2/bin/apxs




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



#22438 [NEW]: ODBC Stored Procedure Return

2003-02-26 Thread rpreti at ig dot com dot br
From: rpreti at ig dot com dot br
Operating system: Linux
PHP version:  4.2.3
PHP Bug Type: ODBC related
Bug description:  ODBC Stored Procedure Return

I use the code below to get a CHAR from a stored procedure. My system is
PHP4+DB2+LINUX.

I have heard that php just support input parameters to stored procedures.
I need to know how to get output parameters if is possible.
===
$result=odbc_prepare($conn,{CALL DSMTD.S6S006(?,?)});
$par[0]=$pim.$num_rand;
$par[1]='';
odbc_execute($result,$par);
print_r($par);


Thanks,

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



#13655 [NoF-Csd]: undefined symbol: stat

2003-02-26 Thread nobbie
 ID:   13655
 Updated by:   [EMAIL PROTECTED]
-Reported By:  francois at be dot wanadoo dot com
+Reported By:  [EMAIL PROTECTED]
-Status:   No Feedback
+Status:   Closed
 Bug Type: Informix related
 Operating System: RedHat Linux/Alpha 7.1
 PHP Version:  4.0.6
 New Comment:

The issue is with glibc. 'stat', 'lstat' and a few others have moved to
a libc_nonshared.a archive, and out of libc. 

Check your /usr/lib/libc.so file, it should look something like: GROUP
( /lib/libc.so.6 /usr/lib/libc_nonshared.a )

if that still doesn't work, you need to recompile your libifgen.so from
the libifgen.a.

Here's how:

mkdir /tmp/ifx
cd /tmp/ifx
ar x $INFORMIXDIR/lib/esql/libifgen.a
gcc -shared -o libifgen.so *.o
cp libifgen.so $INFORMIXDIR/lib/esql


Previous Comments:


[2002-07-16 01:00:08] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a month, 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.



[2002-06-17 07:09:31] john at astarte dot de

Same problem with Suse 8.2, regardless of whether latest snapshot or
stable version is used.



[2002-06-15 20:38:33] [EMAIL PROTECTED]

This snapshot _should_ fix the problem:

http://snaps.php.net/php4-latest.tar.gz

It works fine for me with the 2.70.UC3 which is the latest I found from
the informix site. (it's same as 9.30.UC1, wierd versions they have :)


--Jani




[2002-03-30 08:54:51] frederic dot diverrez at steria dot com

same problem whith mandrake 8.1



[2002-03-11 07:29:39] gilles at nedostoupof dot be

Syntax error on line 205 of /usr/local/apache/conf/httpd.conf:
Cannot load /usr/local/apache/libexec/libphp4.so into server:
/usr/local/informix/lib/esql/libifgen.so: undefined symbol: stat

esql -V:
INFORMIX-ESQL Version 9.51.UC3

Apache: 1.3.22
PHP: 4.1.1
Linux Mandrake: 8.1
glibc: 2.2.4

Same problem and no fix for that ;-)

Gilles.



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/13655

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



#13655 [Csd]: undefined symbol: stat

2003-02-26 Thread sniper
 ID:   13655
 Updated by:   [EMAIL PROTECTED]
-Reported By:  [EMAIL PROTECTED]
+Reported By:  francois at be dot wanadoo dot com
 Status:   Closed
 Bug Type: Informix related
 Operating System: RedHat Linux/Alpha 7.1
 PHP Version:  4.0.6
 New Comment:

restore original email..



Previous Comments:


[2003-02-26 08:47:40] [EMAIL PROTECTED]

The issue is with glibc. 'stat', 'lstat' and a few others have moved to
a libc_nonshared.a archive, and out of libc. 

Check your /usr/lib/libc.so file, it should look something like: GROUP
( /lib/libc.so.6 /usr/lib/libc_nonshared.a )

if that still doesn't work, you need to recompile your libifgen.so from
the libifgen.a.

Here's how:

mkdir /tmp/ifx
cd /tmp/ifx
ar x $INFORMIXDIR/lib/esql/libifgen.a
gcc -shared -o libifgen.so *.o
cp libifgen.so $INFORMIXDIR/lib/esql



[2002-07-16 01:00:08] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a month, 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.



[2002-06-17 07:09:31] john at astarte dot de

Same problem with Suse 8.2, regardless of whether latest snapshot or
stable version is used.



[2002-06-15 20:38:33] [EMAIL PROTECTED]

This snapshot _should_ fix the problem:

http://snaps.php.net/php4-latest.tar.gz

It works fine for me with the 2.70.UC3 which is the latest I found from
the informix site. (it's same as 9.30.UC1, wierd versions they have :)


--Jani




[2002-03-30 08:54:51] frederic dot diverrez at steria dot com

same problem whith mandrake 8.1



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/13655

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



#15688 [NoF-Csd]: undefined symbol:stat

2003-02-26 Thread nobbie
 ID:   15688
 Updated by:   [EMAIL PROTECTED]
-Reported By:  wleyer at compuserve dot com
+Reported By:  [EMAIL PROTECTED]
-Status:   No Feedback
+Status:   Closed
 Bug Type: Informix related
 Operating System: SuSe Linux 7.3
 PHP Version:  4.1.1
 New Comment:

Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. Because of this, we hope you add your comments
to the existing bug instead.

Thank you for your interest in PHP.

Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. Because of this, we hope you add your comments
to the existing bug instead.

Thank you for your interest in PHP.

See Bug: #13655


Previous Comments:


[2002-07-16 01:00:09] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a month, 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.



[2002-06-15 20:35:07] [EMAIL PROTECTED]

This snapshot _should_ fix the problem:

http://snaps.php.net/php4-latest.tar.gz

It works fine for me with the 2.70.UC3 which is the latest I found from
the informix site.

--Jani





[2002-06-13 04:25:12] michael at ettl dot at

the problem only occurs when configuring as dynamic module.
i built the php executable with
# ./configure --with-informix
and dumped my php-File containing some Informix-Selects on php
# ./php  test.php 
and it worked fine.

Linux   version: Suse 7.3
Informix cdsk   version: 9.51UC1
httpd   version: 1.3.24
php version: 4.2.1

Then i tried to compile php as static into apache - but this didn't
work with php 4.2.1 as i got the error
libtool: link: only absolute run-paths are allowed on linking.

So i took php 4.1.2 and compiled it into apache and it worked.



[2002-05-25 09:14:29] [EMAIL PROTECTED]

Dup of #13655



[2002-04-25 05:10:18] isaac dot hopley at no_spam dot morton-fraser dot
com

I have constantly had similar problems.  The only comination of
Platform I can successfully compile on is:
SuSe 7.2
PHP 4.06
Apache 1.3.19

Using the CSDK 2.70 UC1

Very annoying as I would like to be using the latest versions of all
these.

Anyone have a copy of CSDK I could have to try ??



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/15688

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



#15688 [Csd]: undefined symbol:stat

2003-02-26 Thread sniper
 ID:   15688
 Updated by:   [EMAIL PROTECTED]
-Reported By:  [EMAIL PROTECTED]
+Reported By:  wleyer at compuserve dot com
 Status:   Closed
 Bug Type: Informix related
 Operating System: SuSe Linux 7.3
 PHP Version:  4.1.1
 New Comment:

restore original email address..



Previous Comments:


[2003-02-26 08:56:05] [EMAIL PROTECTED]

Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. Because of this, we hope you add your comments
to the existing bug instead.

Thank you for your interest in PHP.

Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. Because of this, we hope you add your comments
to the existing bug instead.

Thank you for your interest in PHP.

See Bug: #13655



[2002-07-16 01:00:09] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a month, 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.



[2002-06-15 20:35:07] [EMAIL PROTECTED]

This snapshot _should_ fix the problem:

http://snaps.php.net/php4-latest.tar.gz

It works fine for me with the 2.70.UC3 which is the latest I found from
the informix site.

--Jani





[2002-06-13 04:25:12] michael at ettl dot at

the problem only occurs when configuring as dynamic module.
i built the php executable with
# ./configure --with-informix
and dumped my php-File containing some Informix-Selects on php
# ./php  test.php 
and it worked fine.

Linux   version: Suse 7.3
Informix cdsk   version: 9.51UC1
httpd   version: 1.3.24
php version: 4.2.1

Then i tried to compile php as static into apache - but this didn't
work with php 4.2.1 as i got the error
libtool: link: only absolute run-paths are allowed on linking.

So i took php 4.1.2 and compiled it into apache and it worked.



[2002-05-25 09:14:29] [EMAIL PROTECTED]

Dup of #13655



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/15688

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



#16518 [NoF-Csd]: undefined symbol: stat

2003-02-26 Thread nobbie
 ID:   16518
 Updated by:   [EMAIL PROTECTED]
 Reported By:  mitch at youngfamily dot org
-Status:   No Feedback
+Status:   Closed
 Bug Type: Informix related
 Operating System: RedHat 7.2 / Debian 3.0
 PHP Version:  4.0CVS-2002-04-09
 New Comment:

Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. Because of this, we hope you add your comments
to the existing bug instead.

Thank you for your interest in PHP.

See bug: #13655


Previous Comments:


[2002-10-01 08:37:21] fish at iface dot co dot uk

I can confirm that it's an Informix problem - got identical error
running make test while building DBD-Informix 1.00.PC2



[2002-07-16 01:00:09] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a month, 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.



[2002-06-15 20:42:12] [EMAIL PROTECTED]

This snapshot _should_ fix the problem:

http://snaps.php.net/php4-latest.tar.gz

It works fine for me with the 2.70.UC3 which is the latest I found from
the informix site.

--Jani




[2002-04-09 15:35:43] mitch at youngfamily dot org

I have successfully got apache-2.0.35  php4.2-CVS to work fine
together, but when I recompile php with informix support it compiles
fine but when 

I try to start apache2 I get the folloing message.
 
[EMAIL PROTECTED] bin]# ./apachectl start
Syntax error on line 217 of /usr/local/apache/conf/httpd.conf:
 Cannot load /usr/local/apache/modules/libphp4.so into server:
/opt/informix/lib/esql/libthgen.so: undefined symbol: stat
./apachectl start: httpd could not be started
[EMAIL PROTECTED] bin]#


It appears to be a problem with the latest version of the Informix CSDK
2.70 because I downgraded to 2.60 and everything compiled and runs fine
after the downgrade!




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



#15342 [NoF-Csd]: Informix ifx_num_rows

2003-02-26 Thread nobbie
 ID:   15342
 Updated by:   [EMAIL PROTECTED]
 Reported By:  manente at interlogica dot it
-Status:   No Feedback
+Status:   Closed
 Bug Type: Informix related
 Operating System: linux Mandrake 8.1
 PHP Version:  4.0.6
 New Comment:

Informix doesn't have support for returning the number of rows in a
result set/cursor. The closest thing to it is to use sqlerrd[3] which
is IMHO an inaccurate estimate.

ifx_num_rows() returns the number of rows processed or retrieved by
ifx_fetch_row()




Previous Comments:


[2002-10-20 01:45: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





[2002-09-18 02:59:55] chuakialoong at yahoo dot com

Dear PHP Developer,

I am facing same problem with ifx_num_rows() as well. It always return
Zero.

(1) PHP Syntax:
$conn_id  = ifx_pconnect($dbname, $dbuser, $dbpass) OR die (Connection
error!);

$res_id   = ifx_query($sql_stat, $conn_id) OR die (SQL Error!);

#-- It always return 0, even there is records found --#
echo Numrow =  . ifx_num_rows($res_id);


(2) This is my spec:
HP-UX 11.00
Informix Dynamic Server Version 7.31.UC6AX7
Informix CSDK 2.40.HC1
INFORMIX-ESQL Version 9.30.HC1
PHP 4.1.2 release
Apache 1.3.23

(3) Appreciate if this bug (if it has been justified as bug) can be
fixed as soon. Thank you.

Regards,
Koma



[2002-02-02 06:44:15] manente at interlogica dot it

? 
$connid=ifx_connect([EMAIL PROTECTED], informix, 
z) or die(Error); 

$result = ifx_query(SELECT * FROM tabel, $connid) or 
die(Error); 

$rc = ifx_num_rows($result); 
echo $rc; // --- $a is always 0 


ifx_free_result($result); 


? 




The result of ifx_num_rows($result) is always 0! 




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



#22435 [Opn-Bgs]: count() is slow when used with large arrays

2003-02-26 Thread sniper
 ID:   22435
 Updated by:   [EMAIL PROTECTED]
 Reported By:  carl at topthetable dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Performance problem
 Operating System: Redhat 7.2
 PHP Version:  4.3.1
 New Comment:

Try this script which actually shows the time _spend_ for count:

?php

function getmicrotime(){ 
list($usec, $sec) = explode( ,microtime()); 
return ((float)$usec + (float)$sec); 
}

$tot = 0;

for ($j=0; $j  10; $j++) {
$time = dosize($j * 1000);
echo $time,\n;
$tot += $time;
}

echo Avg: , $tot/$j, \n;

function dosize( $y )
{
$t = array();

for ( $i=0; $i$y; $i++ ) {
$t[] = array( array( 3, 1 ), 3, array(
array ( 5, 1, 8 )) );
}

$start = getmicrotime();
count( $t );
$end = getmicrotime();

return $end - $start;
}
?

Results for me:

Linux (double Celeron 500Mhz): 

0.00995302200317
0.000295042991638
0.000288963317871
0.000303030014038
0.000295042991638
0.000295042991638
0.000294089317322
0.000292062759399
0.000293016433716
0.000355005264282
Avg: 0.00126643180847

MacOSX, PowerPC (1Ghz or faster, not sure):

0.00011193752288818
9.0956687927246E-05
0.00010311603546143
0.00010299682617188
0.00010395050048828
0.00010097026824951
0.00011003017425537
0.00013697147369385
0.00010299682617188
0.00010597705841064
Avg: 0.00010699033737183

Nothing wrong here..



Previous Comments:


[2003-02-26 08:11:50] carl at topthetable dot com

count() is increasingly slow when used to count large arrays.  This is
using 4.3.1 (compiled from source) on a Redhat 7.2 box.  The box has
about 80Mb free, so it's not a paging issue.  It works as expected on
Mac OS X running 4.3.1-dev.

Looking at PHP's and Zend's source, I would expect the time taken to
return the count() of an array to be similar regardless of the size of
the array.

Below is a script to demonstrate the problem.  


?
  $st = microtime();

  echo Script started:.microtime().\n;

  dosize( 10 );
  dosize( 20 );
  dosize( 50 );
  dosize( 100 );
  dosize( 200 );
  dosize( 500 );
  dosize( 1000 );
  dosize( 5000 );
  dosize( 1 );

  function dosize( $y ) {

echo Doing size $y\n;

echo   Starting array building:.microtime().\n;

$t = array();
for ( $i=0; $i$y; $i++ ) {
  $t[] = array( array( 3, 1 ), 3, array( array ( 5, 1,
8 ) ) );
}

echo   Array built:.microtime().\n;

count( $t );

echo   Count finished: .microtime().\n;
  }
?




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



#21674 [Com]: Warning: main(lang.php) [function.main]: failed to create stream: No such file

2003-02-26 Thread hmm dot hmm at firemail dot de
 ID:   21674
 Comment by:   hmm dot hmm at firemail dot de
 Reported By:  moderator at blackpeeps dot com
 Status:   No Feedback
 Bug Type: *URL Functions
 Operating System: Cobalt RAQ4 Apache/Linux
 PHP Version:  4.3.0
 New Comment:

Hi

I have the some problem


Warning: main(shop/indexmain_kat=11nr=.php) [function.main]: failed
to create stream: No such file or directory in
/home/admin/lala.com/index.php on line 260

Warning: main() [function.main]: Failed opening
'shop/indexmain_kat=11nr=.php' for inclusion
(include_path='.:/usr/local/lib/php') in /home/admin/lala.com/index.php
on line 260

Can anyone help me?


Previous Comments:


[2003-02-12 01:18:49] xilord at yahoo dot com

Make sure you have the file names exactly correct and paths or you'll
get the same error messages.



[2003-02-04 16:49:32] [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.





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

The point of asking for var_dump(ini_get('include_path')); is so you'll
show the output of it.  This is a form of debugging.

The problem has to do with the include_path directive.  Now we're
trying to figure out why/where it gets set to '' before doing some of
these includes as this seems to be the case.

So, whenever you get this error:

Warning: main() [function.main]: Failed opening 'foo.php'...

Add this line above the include:

var_dump(array(ini_get('include_path'),__LINE__,__FILE));

This way we'll know some useful information.  Basically put this line
above EVERY one of these failed includes, such as the inclusion
config.php, extra.php, and lang.php.  

Please do this and show the output in your next reply.  Btw, I modified
Wez's debug dump a little so we can be a little more specific :)  Also,
be 100% sure you are not setting this directive in either httpd.conf or
.htaccess.



[2003-01-22 10:38:48] moderator at blackpeeps dot com

Hello Wez:

Not it does not look like that.  I was asked to include
var_dump(ini_get('include_path'));

before the require_once statement in the primary script,
phpbug21674.php

Remember there are two scripts located in different paths representing
two different virtual domains.

/home/site3/phpbug21674.php (contains a require_once
(/home/sites/site2/web/IV/config.php);

and /home/sites/site2/web/IV/config.php --- contains
include_once ('lang.php');
include ('extras.php'); 

However, I did go back and also added the var_dump to config.php to
reflect as follows:

var_dump(ini_get('include_path'));
include_once ('lang.php');
include ('extras.php'); 


Results: Same results = Failed to create stream:

Again, this script worked fine on PHP 4.1.2 Now it seems to get it to
work, I have to reference the absolute path.



[2003-01-22 05:00:55] [EMAIL PROTECTED]

Just to be extra sure:

in config.php, do lines 97 and 98 look like this:

var_dump(ini_get('include_path'));
include ('extras.php');

If not, please make sure they do and report back.
If they do, then something really strange is going on.



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/21674

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



#22437 [Opn-Asn]: Segmentation violation

2003-02-26 Thread kalowsky
 ID:   22437
 Updated by:   [EMAIL PROTECTED]
 Reported By:  olle at compound dot se
-Status:   Open
+Status:   Assigned
-Bug Type: ODBC related
+Bug Type: Reproducible crash
 Operating System: Redhat7.2/kernel 2.4.9
 PHP Version:  4.3.1
-Assigned To:  
+Assigned To:  kalowsky
 New Comment:

sounds like a problem on my end... icky...


Previous Comments:


[2003-02-26 08:29:50] olle at compound dot se

We are running a commercial flight-booking website based upon Apache
1.3.27 and php 4.3.1, querying a PostgresQL 7.1.3 database via ODBC
(UnixODBC). The php-interpeter is run as a Apache-module.

Occasionally (30 times a day?) a httpd server process dies caused by
segmentation violation. We have collected and looked at 30 dumped cores
and the calling stack appear to be somewhat different each time. Our
conclusion is that the segmentation violations are probably not a
result of the functions appearing on the stack of the dumped cores, but
more likely caused by corrupted datastructures which may have been
around for some time.

In an attempt to isolate the cause of our problems we ran a single
httpd server in control of valgrind (an I386 emulator/memory allocation
analyser in software). Valgrind indicates that the PHP 4.3.1
ODBC-functions repeatedly write and read from invalid memory adresses.
Typically 4 bytes beyond a malloced block of memory. We believe these
writes (or reads?) may be the cause of our crashing httpd processes.

Below is a quote of the Valgrind output. Furter down you will fins our
PHP configuration.

==29000== Invalid write of size 4
==29000==at 0x4664821F: CLConnect (SQLConnect.c:258)
==29000==by 0x43D0: ??? (SQLConnect.c:1852)
==29000==by 0x43D13555: SQLConnect (SQLConnect.c:3483)
==29000==by 0x44B4DE09: odbc_sqlconnect
(/opt/tools/php/php-4.3.1/ext/odbc/php_odbc.c:2136)
==29000==Address 0x40FC254C is 4 bytes after a block of size 4
alloc'd
==29000==at 0x400483E4: malloc (vg_clientfuncs.c:100)
==29000==by 0x466481EB: CLConnect (SQLConnect.c:241)
==29000==by 0x43D0: ??? (SQLConnect.c:1852)
==29000==by 0x43D13555: SQLConnect (SQLConnect.c:3483)
==29000==
==29000== Invalid write of size 4
==29000==at 0x46648393: CLConnect (SQLConnect.c:341)
==29000==by 0x43D0: ??? (SQLConnect.c:1852)
==29000==by 0x43D13555: SQLConnect (SQLConnect.c:3483)
==29000==by 0x44B4DE09: odbc_sqlconnect
(/opt/tools/php/php-4.3.1/ext/odbc/php_odbc.c:2136)
==29000==Address 0x40FC2548 is 0 bytes after a block of size 4
alloc'd
==29000==at 0x400483E4: malloc (vg_clientfuncs.c:100)
==29000==by 0x466481EB: CLConnect (SQLConnect.c:241)
==29000==by 0x43D0: ??? (SQLConnect.c:1852)
==29000==by 0x43D13555: SQLConnect (SQLConnect.c:3483)
==29000==
==29000== Invalid read of size 4
==29000==at 0x466483B7: CLConnect (SQLConnect.c:350)
==29000==by 0x43D0: ??? (SQLConnect.c:1852)
==29000==by 0x43D13555: SQLConnect (SQLConnect.c:3483)
==29000==by 0x44B4DE09: odbc_sqlconnect
(/opt/tools/php/php-4.3.1/ext/odbc/php_odbc.c:2136)
==29000==Address 0x40FC2548 is 0 bytes after a block of size 4
alloc'd
==29000==at 0x400483E4: malloc (vg_clientfuncs.c:100)
==29000==by 0x466481EB: CLConnect (SQLConnect.c:241)
==29000==by 0x43D0: ??? (SQLConnect.c:1852)
==29000==by 0x43D13555: SQLConnect (SQLConnect.c:3483)
==29000==
==29000== Invalid write of size 2
==29000==at 0x4676214C: SQLGetInfo (info.c:671)
==29000==by 0x466483BF: CLConnect (SQLConnect.c:360)
==29000==by 0x43D0: ??? (SQLConnect.c:1852)
==29000==by 0x43D13555: SQLConnect (SQLConnect.c:3483)
==29000==Address 0x40FC2554 is 12 bytes after a block of size 4
alloc'd
==29000==at 0x400483E4: malloc (vg_clientfuncs.c:100)
==29000==by 0x466481EB: CLConnect (SQLConnect.c:241)
==29000==by 0x43D0: ??? (SQLConnect.c:1852)
==29000==by 0x43D13555: SQLConnect (SQLConnect.c:3483)

#! /bin/sh
#
# Created by configure

'./configure' \
'--enable-shared' \
'--with-apxs' \
'--with-unixODBC' \
'--with-xml' \
'--enable-xslt' \
'--with-xslt-sablot=/usr/local' \
'--enable-sablot-errors-descriptive' \
'--with-dom=/usr/local' \
'--with-zlib' \
'--enable-trans-sid' \
'--with-iconv=/usr/local' \
'--with-imap' \
'--with-gettext' \
'--with-tsrm-pthreads' \
'--enable-roxen-zts' \
'--with-mysql' \
'-with-kerberos=/usr/kerberos' \
$@





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



#22437 [Asn-Opn]: Segmentation violation

2003-02-26 Thread olle at compound dot se
 ID:   22437
 User updated by:  olle at compound dot se
 Reported By:  olle at compound dot se
-Status:   Assigned
+Status:   Open
-Bug Type: Reproducible crash
+Bug Type: ODBC related
 Operating System: Redhat7.2/kernel 2.4.9
 PHP Version:  4.3.1
 Assigned To:  kalowsky
 New Comment:

I have run the Valgrind test with PHP 4.2.3 instead of 4.3.1. The 4.2.3
test produced none of the Invalid write messages that 4.3.1 produced.
PHP 4.2.3 was built with an identical config-file as 4.3.1.
Unfortunately I believe we upgraded from 4.2.3 to get rid of
ODBC-problems...


Previous Comments:


[2003-02-26 09:42:23] [EMAIL PROTECTED]

sounds like a problem on my end... icky...



[2003-02-26 08:29:50] olle at compound dot se

We are running a commercial flight-booking website based upon Apache
1.3.27 and php 4.3.1, querying a PostgresQL 7.1.3 database via ODBC
(UnixODBC). The php-interpeter is run as a Apache-module.

Occasionally (30 times a day?) a httpd server process dies caused by
segmentation violation. We have collected and looked at 30 dumped cores
and the calling stack appear to be somewhat different each time. Our
conclusion is that the segmentation violations are probably not a
result of the functions appearing on the stack of the dumped cores, but
more likely caused by corrupted datastructures which may have been
around for some time.

In an attempt to isolate the cause of our problems we ran a single
httpd server in control of valgrind (an I386 emulator/memory allocation
analyser in software). Valgrind indicates that the PHP 4.3.1
ODBC-functions repeatedly write and read from invalid memory adresses.
Typically 4 bytes beyond a malloced block of memory. We believe these
writes (or reads?) may be the cause of our crashing httpd processes.

Below is a quote of the Valgrind output. Furter down you will fins our
PHP configuration.

==29000== Invalid write of size 4
==29000==at 0x4664821F: CLConnect (SQLConnect.c:258)
==29000==by 0x43D0: ??? (SQLConnect.c:1852)
==29000==by 0x43D13555: SQLConnect (SQLConnect.c:3483)
==29000==by 0x44B4DE09: odbc_sqlconnect
(/opt/tools/php/php-4.3.1/ext/odbc/php_odbc.c:2136)
==29000==Address 0x40FC254C is 4 bytes after a block of size 4
alloc'd
==29000==at 0x400483E4: malloc (vg_clientfuncs.c:100)
==29000==by 0x466481EB: CLConnect (SQLConnect.c:241)
==29000==by 0x43D0: ??? (SQLConnect.c:1852)
==29000==by 0x43D13555: SQLConnect (SQLConnect.c:3483)
==29000==
==29000== Invalid write of size 4
==29000==at 0x46648393: CLConnect (SQLConnect.c:341)
==29000==by 0x43D0: ??? (SQLConnect.c:1852)
==29000==by 0x43D13555: SQLConnect (SQLConnect.c:3483)
==29000==by 0x44B4DE09: odbc_sqlconnect
(/opt/tools/php/php-4.3.1/ext/odbc/php_odbc.c:2136)
==29000==Address 0x40FC2548 is 0 bytes after a block of size 4
alloc'd
==29000==at 0x400483E4: malloc (vg_clientfuncs.c:100)
==29000==by 0x466481EB: CLConnect (SQLConnect.c:241)
==29000==by 0x43D0: ??? (SQLConnect.c:1852)
==29000==by 0x43D13555: SQLConnect (SQLConnect.c:3483)
==29000==
==29000== Invalid read of size 4
==29000==at 0x466483B7: CLConnect (SQLConnect.c:350)
==29000==by 0x43D0: ??? (SQLConnect.c:1852)
==29000==by 0x43D13555: SQLConnect (SQLConnect.c:3483)
==29000==by 0x44B4DE09: odbc_sqlconnect
(/opt/tools/php/php-4.3.1/ext/odbc/php_odbc.c:2136)
==29000==Address 0x40FC2548 is 0 bytes after a block of size 4
alloc'd
==29000==at 0x400483E4: malloc (vg_clientfuncs.c:100)
==29000==by 0x466481EB: CLConnect (SQLConnect.c:241)
==29000==by 0x43D0: ??? (SQLConnect.c:1852)
==29000==by 0x43D13555: SQLConnect (SQLConnect.c:3483)
==29000==
==29000== Invalid write of size 2
==29000==at 0x4676214C: SQLGetInfo (info.c:671)
==29000==by 0x466483BF: CLConnect (SQLConnect.c:360)
==29000==by 0x43D0: ??? (SQLConnect.c:1852)
==29000==by 0x43D13555: SQLConnect (SQLConnect.c:3483)
==29000==Address 0x40FC2554 is 12 bytes after a block of size 4
alloc'd
==29000==at 0x400483E4: malloc (vg_clientfuncs.c:100)
==29000==by 0x466481EB: CLConnect (SQLConnect.c:241)
==29000==by 0x43D0: ??? (SQLConnect.c:1852)
==29000==by 0x43D13555: SQLConnect (SQLConnect.c:3483)

#! /bin/sh
#
# Created by configure

'./configure' \
'--enable-shared' \
'--with-apxs' \
'--with-unixODBC' \
'--with-xml' \
'--enable-xslt' \
'--with-xslt-sablot=/usr/local' \
'--enable-sablot-errors-descriptive' \
'--with-dom=/usr/local' \
'--with-zlib' \
'--enable-trans-sid' \
'--with-iconv=/usr/local' \
'--with-imap' \
'--with-gettext' \
'--with-tsrm-pthreads' \
'--enable-roxen-zts' \
'--with-mysql' \
'-with-kerberos=/usr/kerberos' \
$@





-- 
Edit this bug report at 

#21697 [Fbk-Bgs]: imap_get_quota and imap_get_quotaroot are gone?

2003-02-26 Thread sniper
 ID:   21697
 Updated by:   [EMAIL PROTECTED]
 Reported By:  gkopp at ideastar dot com
-Status:   Feedback
+Status:   Bogus
 Bug Type: IMAP related
 Operating System: RH 6.2
 PHP Version:  4.3.0
 New Comment:

Most likely just too old version of c-client OR mixed header files of
old one with new library..



Previous Comments:


[2003-02-25 01:53:42] [EMAIL PROTECTED]

And make sure you have latest c-client installed.




[2003-02-25 01:53:05] [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-17 00:48:12] [EMAIL PROTECTED]

duplicate of 21464



[2003-01-16 16:49:31] gkopp at ideastar dot com

using IMP 3.1, if I uncomment the section to display user quota, I
get:

Fatal error: Call to undefined function: imap_get_quota() in
/usr/local/www/ideastar_mail/horde/imp/config/conf.php on line 391

I get the same result if I change the function call to
imap_get_quotaroot.




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



#22439 [NEW]: fsockopen - Segmentation fault

2003-02-26 Thread tom at linuxsystems dot be
From: tom at linuxsystems dot be
Operating system: Linux 2.4.20
PHP version:  4.3.1
PHP Bug Type: Sockets related
Bug description:  fsockopen - Segmentation fault

Hi all,

I compiled a new webserver (Apache/1.3.27 (Unix) PHP/4.3.1 mod_perl/1.27)
and moved my scripts (from a Apache/1.3.27 (Unix) PHP/4.3.0 mod_perl/1.27)
to the new server.

One of my scripts contains following code:

$webport = fsockopen (www.linuxsystems.be, 80, $errno, $errstr, 2);
if ($webport)
print(table class=\text\trtdWeb server:/tdtd [ font
color=\#0B9839\ON/font ] /td/tr);
else
print(trtdWeb server:/tdtd [ font
color=\#CE\OFF/font ] /td/tr);

$dnsport = fsockopen (ns1.linuxsystems.be, 53, $errno, $errstr, 2);
if ($dnsport)
print(trtdDNS server:/tdtd [ font
color=\#0B9839\ON/font ] /td/tr);
else
print(trtdDNS server:/tdtd [ font
color=\#CE\OFF/font ] /td/tr);



What happens:

When a service is not on (and fsockopen can not connect) I get a
Segmentation fault in Apache:

[Wed Feb 26 16:25:08 2003] [notice] child pid 32070 exit 
signal Segmentation fault (11)

I copied to my other webserver (with 4.3.0) and there everythings run
fine.

My phpinfo (new machine): http://customer.linuxsystems.be/phpinfo.php

Old phpinfo (where script can run on):
http://www.internetgids.be/phpinfo.php

Help is welcome :-)

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



#22439 [Opn-Fbk]: fsockopen - Segmentation fault

2003-02-26 Thread sniper
 ID:   22439
 Updated by:   [EMAIL PROTECTED]
 Reported By:  tom at linuxsystems dot be
-Status:   Open
+Status:   Feedback
 Bug Type: Sockets related
 Operating System: Linux 2.4.20
 PHP Version:  4.3.1
 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-02-26 09:46:56] tom at linuxsystems dot be

Hi all,

I compiled a new webserver (Apache/1.3.27 (Unix) PHP/4.3.1
mod_perl/1.27) and moved my scripts (from a Apache/1.3.27 (Unix)
PHP/4.3.0 mod_perl/1.27) to the new server.

One of my scripts contains following code:

$webport = fsockopen (www.linuxsystems.be, 80, $errno, $errstr, 2);
if ($webport)
print(table class=\text\trtdWeb server:/tdtd [
font color=\#0B9839\ON/font ] /td/tr);
else
print(trtdWeb server:/tdtd [ font
color=\#CE\OFF/font ] /td/tr);

$dnsport = fsockopen (ns1.linuxsystems.be, 53, $errno, $errstr, 2);
if ($dnsport)
print(trtdDNS server:/tdtd [ font
color=\#0B9839\ON/font ] /td/tr);
else
print(trtdDNS server:/tdtd [ font
color=\#CE\OFF/font ] /td/tr);



What happens:

When a service is not on (and fsockopen can not connect) I get a
Segmentation fault in Apache:

[Wed Feb 26 16:25:08 2003] [notice] child pid 32070 exit 
signal Segmentation fault (11)

I copied to my other webserver (with 4.3.0) and there everythings run
fine.

My phpinfo (new machine): http://customer.linuxsystems.be/phpinfo.php

Old phpinfo (where script can run on):
http://www.internetgids.be/phpinfo.php

Help is welcome :-)

Kind Regards,
Tom Myny




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



#22437 [Opn-Asn]: Segmentation violation

2003-02-26 Thread sniper
 ID:   22437
 Updated by:   [EMAIL PROTECTED]
 Reported By:  olle at compound dot se
-Status:   Open
+Status:   Assigned
 Bug Type: ODBC related
 Operating System: Redhat7.2/kernel 2.4.9
 PHP Version:  4.3.1
 Assigned To:  kalowsky
 New Comment:

don't change the status..



Previous Comments:


[2003-02-26 09:44:13] olle at compound dot se

I have run the Valgrind test with PHP 4.2.3 instead of 4.3.1. The 4.2.3
test produced none of the Invalid write messages that 4.3.1 produced.
PHP 4.2.3 was built with an identical config-file as 4.3.1.
Unfortunately I believe we upgraded from 4.2.3 to get rid of
ODBC-problems...



[2003-02-26 09:42:23] [EMAIL PROTECTED]

sounds like a problem on my end... icky...



[2003-02-26 08:29:50] olle at compound dot se

We are running a commercial flight-booking website based upon Apache
1.3.27 and php 4.3.1, querying a PostgresQL 7.1.3 database via ODBC
(UnixODBC). The php-interpeter is run as a Apache-module.

Occasionally (30 times a day?) a httpd server process dies caused by
segmentation violation. We have collected and looked at 30 dumped cores
and the calling stack appear to be somewhat different each time. Our
conclusion is that the segmentation violations are probably not a
result of the functions appearing on the stack of the dumped cores, but
more likely caused by corrupted datastructures which may have been
around for some time.

In an attempt to isolate the cause of our problems we ran a single
httpd server in control of valgrind (an I386 emulator/memory allocation
analyser in software). Valgrind indicates that the PHP 4.3.1
ODBC-functions repeatedly write and read from invalid memory adresses.
Typically 4 bytes beyond a malloced block of memory. We believe these
writes (or reads?) may be the cause of our crashing httpd processes.

Below is a quote of the Valgrind output. Furter down you will fins our
PHP configuration.

==29000== Invalid write of size 4
==29000==at 0x4664821F: CLConnect (SQLConnect.c:258)
==29000==by 0x43D0: ??? (SQLConnect.c:1852)
==29000==by 0x43D13555: SQLConnect (SQLConnect.c:3483)
==29000==by 0x44B4DE09: odbc_sqlconnect
(/opt/tools/php/php-4.3.1/ext/odbc/php_odbc.c:2136)
==29000==Address 0x40FC254C is 4 bytes after a block of size 4
alloc'd
==29000==at 0x400483E4: malloc (vg_clientfuncs.c:100)
==29000==by 0x466481EB: CLConnect (SQLConnect.c:241)
==29000==by 0x43D0: ??? (SQLConnect.c:1852)
==29000==by 0x43D13555: SQLConnect (SQLConnect.c:3483)
==29000==
==29000== Invalid write of size 4
==29000==at 0x46648393: CLConnect (SQLConnect.c:341)
==29000==by 0x43D0: ??? (SQLConnect.c:1852)
==29000==by 0x43D13555: SQLConnect (SQLConnect.c:3483)
==29000==by 0x44B4DE09: odbc_sqlconnect
(/opt/tools/php/php-4.3.1/ext/odbc/php_odbc.c:2136)
==29000==Address 0x40FC2548 is 0 bytes after a block of size 4
alloc'd
==29000==at 0x400483E4: malloc (vg_clientfuncs.c:100)
==29000==by 0x466481EB: CLConnect (SQLConnect.c:241)
==29000==by 0x43D0: ??? (SQLConnect.c:1852)
==29000==by 0x43D13555: SQLConnect (SQLConnect.c:3483)
==29000==
==29000== Invalid read of size 4
==29000==at 0x466483B7: CLConnect (SQLConnect.c:350)
==29000==by 0x43D0: ??? (SQLConnect.c:1852)
==29000==by 0x43D13555: SQLConnect (SQLConnect.c:3483)
==29000==by 0x44B4DE09: odbc_sqlconnect
(/opt/tools/php/php-4.3.1/ext/odbc/php_odbc.c:2136)
==29000==Address 0x40FC2548 is 0 bytes after a block of size 4
alloc'd
==29000==at 0x400483E4: malloc (vg_clientfuncs.c:100)
==29000==by 0x466481EB: CLConnect (SQLConnect.c:241)
==29000==by 0x43D0: ??? (SQLConnect.c:1852)
==29000==by 0x43D13555: SQLConnect (SQLConnect.c:3483)
==29000==
==29000== Invalid write of size 2
==29000==at 0x4676214C: SQLGetInfo (info.c:671)
==29000==by 0x466483BF: CLConnect (SQLConnect.c:360)
==29000==by 0x43D0: ??? (SQLConnect.c:1852)
==29000==by 0x43D13555: SQLConnect (SQLConnect.c:3483)
==29000==Address 0x40FC2554 is 12 bytes after a block of size 4
alloc'd
==29000==at 0x400483E4: malloc (vg_clientfuncs.c:100)
==29000==by 0x466481EB: CLConnect (SQLConnect.c:241)
==29000==by 0x43D0: ??? (SQLConnect.c:1852)
==29000==by 0x43D13555: SQLConnect (SQLConnect.c:3483)

#! /bin/sh
#
# Created by configure

'./configure' \
'--enable-shared' \
'--with-apxs' \
'--with-unixODBC' \
'--with-xml' \
'--enable-xslt' \
'--with-xslt-sablot=/usr/local' \
'--enable-sablot-errors-descriptive' \
'--with-dom=/usr/local' \
'--with-zlib' \
'--enable-trans-sid' \
'--with-iconv=/usr/local' \
'--with-imap' \
'--with-gettext' \
'--with-tsrm-pthreads' \
'--enable-roxen-zts' \
'--with-mysql' \
'-with-kerberos=/usr/kerberos' \
$@



#22435 [Bgs-Opn]: count() is slow when used with large arrays

2003-02-26 Thread carl at topthetable dot com
 ID:   22435
 User updated by:  carl at topthetable dot com
 Reported By:  carl at topthetable dot com
-Status:   Bogus
+Status:   Open
 Bug Type: Performance problem
 Operating System: Redhat 7.2
 PHP Version:  4.3.1
 New Comment:

Thanks for your reply, and better script.

Here are my results, showing the times on the Redhat and OSX boxes
respectively ...

Redhat 7.2 (PIII 700Mhz):
0.000356078147888
3.09110200405
24.5502359867
55.3548690081
136.626052976
... Gave up waiting.  As you can see, this is not correct behaviour. 
You can clearly see that the time isn't constant, nor increasingly
linearly.  I therefore say there is something wrong.

OSX (iBook, 500Mhz):
0.00040602684021
0.000491976737976
0.000488996505737
0.000484943389893
0.000471949577332
0.000415086746216
0.000434041023254
0.00104403495789
0.000488996505737
0.000432014465332
Avg: 0.00051580667495

This is as per your results.


Previous Comments:


[2003-02-26 09:24:56] [EMAIL PROTECTED]

Try this script which actually shows the time _spend_ for count:

?php

function getmicrotime(){ 
list($usec, $sec) = explode( ,microtime()); 
return ((float)$usec + (float)$sec); 
}

$tot = 0;

for ($j=0; $j  10; $j++) {
$time = dosize($j * 1000);
echo $time,\n;
$tot += $time;
}

echo Avg: , $tot/$j, \n;

function dosize( $y )
{
$t = array();

for ( $i=0; $i$y; $i++ ) {
$t[] = array( array( 3, 1 ), 3, array(
array ( 5, 1, 8 )) );
}

$start = getmicrotime();
count( $t );
$end = getmicrotime();

return $end - $start;
}
?

Results for me:

Linux (double Celeron 500Mhz): 

0.00995302200317
0.000295042991638
0.000288963317871
0.000303030014038
0.000295042991638
0.000295042991638
0.000294089317322
0.000292062759399
0.000293016433716
0.000355005264282
Avg: 0.00126643180847

MacOSX, PowerPC (1Ghz or faster, not sure):

0.00011193752288818
9.0956687927246E-05
0.00010311603546143
0.00010299682617188
0.00010395050048828
0.00010097026824951
0.00011003017425537
0.00013697147369385
0.00010299682617188
0.00010597705841064
Avg: 0.00010699033737183

Nothing wrong here..




[2003-02-26 08:11:50] carl at topthetable dot com

count() is increasingly slow when used to count large arrays.  This is
using 4.3.1 (compiled from source) on a Redhat 7.2 box.  The box has
about 80Mb free, so it's not a paging issue.  It works as expected on
Mac OS X running 4.3.1-dev.

Looking at PHP's and Zend's source, I would expect the time taken to
return the count() of an array to be similar regardless of the size of
the array.

Below is a script to demonstrate the problem.  


?
  $st = microtime();

  echo Script started:.microtime().\n;

  dosize( 10 );
  dosize( 20 );
  dosize( 50 );
  dosize( 100 );
  dosize( 200 );
  dosize( 500 );
  dosize( 1000 );
  dosize( 5000 );
  dosize( 1 );

  function dosize( $y ) {

echo Doing size $y\n;

echo   Starting array building:.microtime().\n;

$t = array();
for ( $i=0; $i$y; $i++ ) {
  $t[] = array( array( 3, 1 ), 3, array( array ( 5, 1,
8 ) ) );
}

echo   Array built:.microtime().\n;

count( $t );

echo   Count finished: .microtime().\n;
  }
?




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



#22437 [Asn]: Segmentation violation

2003-02-26 Thread mboeren
 ID:   22437
 Updated by:   [EMAIL PROTECTED]
 Reported By:  olle at compound dot se
 Status:   Assigned
 Bug Type: ODBC related
 Operating System: Redhat7.2/kernel 2.4.9
 PHP Version:  4.3.1
 Assigned To:  kalowsky
 New Comment:


From php_odbc.c:
void odbc_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent) 

...
len = strlen(db) + strlen(uid) + strlen(pwd) + sizeof(ODBC_TYPE) + 5;
hashed_details = emalloc(len);
hashed_len = sprintf(hashed_details, %s_%s_%s_%s_%d, ODBC_TYPE, db,
uid, pwd, cur_opt);

== shouldn't len include the length of the string representation of
cur_opt?

Hope this helps, Marc.




Previous Comments:


[2003-02-26 09:48:57] [EMAIL PROTECTED]

don't change the status..




[2003-02-26 09:44:13] olle at compound dot se

I have run the Valgrind test with PHP 4.2.3 instead of 4.3.1. The 4.2.3
test produced none of the Invalid write messages that 4.3.1 produced.
PHP 4.2.3 was built with an identical config-file as 4.3.1.
Unfortunately I believe we upgraded from 4.2.3 to get rid of
ODBC-problems...



[2003-02-26 09:42:23] [EMAIL PROTECTED]

sounds like a problem on my end... icky...



[2003-02-26 08:29:50] olle at compound dot se

We are running a commercial flight-booking website based upon Apache
1.3.27 and php 4.3.1, querying a PostgresQL 7.1.3 database via ODBC
(UnixODBC). The php-interpeter is run as a Apache-module.

Occasionally (30 times a day?) a httpd server process dies caused by
segmentation violation. We have collected and looked at 30 dumped cores
and the calling stack appear to be somewhat different each time. Our
conclusion is that the segmentation violations are probably not a
result of the functions appearing on the stack of the dumped cores, but
more likely caused by corrupted datastructures which may have been
around for some time.

In an attempt to isolate the cause of our problems we ran a single
httpd server in control of valgrind (an I386 emulator/memory allocation
analyser in software). Valgrind indicates that the PHP 4.3.1
ODBC-functions repeatedly write and read from invalid memory adresses.
Typically 4 bytes beyond a malloced block of memory. We believe these
writes (or reads?) may be the cause of our crashing httpd processes.

Below is a quote of the Valgrind output. Furter down you will fins our
PHP configuration.

==29000== Invalid write of size 4
==29000==at 0x4664821F: CLConnect (SQLConnect.c:258)
==29000==by 0x43D0: ??? (SQLConnect.c:1852)
==29000==by 0x43D13555: SQLConnect (SQLConnect.c:3483)
==29000==by 0x44B4DE09: odbc_sqlconnect
(/opt/tools/php/php-4.3.1/ext/odbc/php_odbc.c:2136)
==29000==Address 0x40FC254C is 4 bytes after a block of size 4
alloc'd
==29000==at 0x400483E4: malloc (vg_clientfuncs.c:100)
==29000==by 0x466481EB: CLConnect (SQLConnect.c:241)
==29000==by 0x43D0: ??? (SQLConnect.c:1852)
==29000==by 0x43D13555: SQLConnect (SQLConnect.c:3483)
==29000==
==29000== Invalid write of size 4
==29000==at 0x46648393: CLConnect (SQLConnect.c:341)
==29000==by 0x43D0: ??? (SQLConnect.c:1852)
==29000==by 0x43D13555: SQLConnect (SQLConnect.c:3483)
==29000==by 0x44B4DE09: odbc_sqlconnect
(/opt/tools/php/php-4.3.1/ext/odbc/php_odbc.c:2136)
==29000==Address 0x40FC2548 is 0 bytes after a block of size 4
alloc'd
==29000==at 0x400483E4: malloc (vg_clientfuncs.c:100)
==29000==by 0x466481EB: CLConnect (SQLConnect.c:241)
==29000==by 0x43D0: ??? (SQLConnect.c:1852)
==29000==by 0x43D13555: SQLConnect (SQLConnect.c:3483)
==29000==
==29000== Invalid read of size 4
==29000==at 0x466483B7: CLConnect (SQLConnect.c:350)
==29000==by 0x43D0: ??? (SQLConnect.c:1852)
==29000==by 0x43D13555: SQLConnect (SQLConnect.c:3483)
==29000==by 0x44B4DE09: odbc_sqlconnect
(/opt/tools/php/php-4.3.1/ext/odbc/php_odbc.c:2136)
==29000==Address 0x40FC2548 is 0 bytes after a block of size 4
alloc'd
==29000==at 0x400483E4: malloc (vg_clientfuncs.c:100)
==29000==by 0x466481EB: CLConnect (SQLConnect.c:241)
==29000==by 0x43D0: ??? (SQLConnect.c:1852)
==29000==by 0x43D13555: SQLConnect (SQLConnect.c:3483)
==29000==
==29000== Invalid write of size 2
==29000==at 0x4676214C: SQLGetInfo (info.c:671)
==29000==by 0x466483BF: CLConnect (SQLConnect.c:360)
==29000==by 0x43D0: ??? (SQLConnect.c:1852)
==29000==by 0x43D13555: SQLConnect (SQLConnect.c:3483)
==29000==Address 0x40FC2554 is 12 bytes after a block of size 4
alloc'd
==29000==at 0x400483E4: malloc (vg_clientfuncs.c:100)
==29000==by 0x466481EB: CLConnect (SQLConnect.c:241)
==29000==by 0x43D0: ??? (SQLConnect.c:1852)
==29000==by 0x43D13555: 

#22439 [Fbk-Csd]: fsockopen - Segmentation fault

2003-02-26 Thread tom at linuxsystems dot be
 ID:   22439
 User updated by:  tom at linuxsystems dot be
 Reported By:  tom at linuxsystems dot be
-Status:   Feedback
+Status:   Closed
 Bug Type: Sockets related
 Operating System: Linux 2.4.20
 PHP Version:  4.3.1
 New Comment:

New code works perfect!

Thx Sniper, i will see this code in 4.3.2 then ;-)

Kind Regards,
Tom Myny


Previous Comments:


[2003-02-26 09:47:42] [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-02-26 09:46:56] tom at linuxsystems dot be

Hi all,

I compiled a new webserver (Apache/1.3.27 (Unix) PHP/4.3.1
mod_perl/1.27) and moved my scripts (from a Apache/1.3.27 (Unix)
PHP/4.3.0 mod_perl/1.27) to the new server.

One of my scripts contains following code:

$webport = fsockopen (www.linuxsystems.be, 80, $errno, $errstr, 2);
if ($webport)
print(table class=\text\trtdWeb server:/tdtd [
font color=\#0B9839\ON/font ] /td/tr);
else
print(trtdWeb server:/tdtd [ font
color=\#CE\OFF/font ] /td/tr);

$dnsport = fsockopen (ns1.linuxsystems.be, 53, $errno, $errstr, 2);
if ($dnsport)
print(trtdDNS server:/tdtd [ font
color=\#0B9839\ON/font ] /td/tr);
else
print(trtdDNS server:/tdtd [ font
color=\#CE\OFF/font ] /td/tr);



What happens:

When a service is not on (and fsockopen can not connect) I get a
Segmentation fault in Apache:

[Wed Feb 26 16:25:08 2003] [notice] child pid 32070 exit 
signal Segmentation fault (11)

I copied to my other webserver (with 4.3.0) and there everythings run
fine.

My phpinfo (new machine): http://customer.linuxsystems.be/phpinfo.php

Old phpinfo (where script can run on):
http://www.internetgids.be/phpinfo.php

Help is welcome :-)

Kind Regards,
Tom Myny




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



#22440 [NEW]: Bug with cookie in CGI not in ISAPI

2003-02-26 Thread garfield_fr at tiscali dot fr
From: garfield_fr at tiscali dot fr
Operating system: Windows 2000 pro SP3
PHP version:  4.3.0
PHP Bug Type: IIS related
Bug description:  Bug with cookie in CGI not in ISAPI

I don't know if it's a real bug but 

Config :
Windows 2K pro + SP3
Serveur IIS
PHP 4.3.0
this is my php.ini (full version for testing purpose) :
[PHP]
cgi.force_redirect = 0
cgi.rfc2616_headers = 1
[Session]
session.save_handler = files
session.save_path = C:\PHP\sessions\

I'm trying to use PHPNuke 6.0.17 and I found this bug :
When you want to login under PHPNuke you enter your name/password. if your
login is ok the script send a cookie and redirect to an URL (your personal
page).
With PHP in CGI mode, no cookie are send/receive (?) to the browser (IE6
SP1) and you are not connect to PHPNuke BUT if PHP run in ISAPI mode the
cookie is well receive by browser and you are connected to PHPNuke

I don't test under Apache because I don't know how to run PHP in CGI mode
under Apache, but Apache+PHP module work fine (W2K)
-- 
Edit bug report at http://bugs.php.net/?id=22440edit=1
-- 
Try a CVS snapshot: http://bugs.php.net/fix.php?id=22440r=trysnapshot
Fixed in CVS:   http://bugs.php.net/fix.php?id=22440r=fixedcvs
Fixed in release:   http://bugs.php.net/fix.php?id=22440r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=22440r=needtrace
Try newer version:  http://bugs.php.net/fix.php?id=22440r=oldversion
Not developer issue:http://bugs.php.net/fix.php?id=22440r=support
Expected behavior:  http://bugs.php.net/fix.php?id=22440r=notwrong
Not enough info:http://bugs.php.net/fix.php?id=22440r=notenoughinfo
Submitted twice:http://bugs.php.net/fix.php?id=22440r=submittedtwice
register_globals:   http://bugs.php.net/fix.php?id=22440r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=22440r=php3
Daylight Savings:   http://bugs.php.net/fix.php?id=22440r=dst
IIS Stability:  http://bugs.php.net/fix.php?id=22440r=isapi
Install GNU Sed:http://bugs.php.net/fix.php?id=22440r=gnused



#22435 [Opn-Fbk]: count() is slow when used with large arrays

2003-02-26 Thread sniper
 ID:   22435
 Updated by:   [EMAIL PROTECTED]
 Reported By:  carl at topthetable dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Performance problem
 Operating System: Redhat 7.2
 PHP Version:  4.3.1
 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

I tested using this and got pretty same results on both linux and
macosx. Please test it..



Previous Comments:


[2003-02-26 09:55:39] carl at topthetable dot com

Thanks for your reply, and better script.

Here are my results, showing the times on the Redhat and OSX boxes
respectively ...

Redhat 7.2 (PIII 700Mhz):
0.000356078147888
3.09110200405
24.5502359867
55.3548690081
136.626052976
... Gave up waiting.  As you can see, this is not correct behaviour. 
You can clearly see that the time isn't constant, nor increasingly
linearly.  I therefore say there is something wrong.

OSX (iBook, 500Mhz):
0.00040602684021
0.000491976737976
0.000488996505737
0.000484943389893
0.000471949577332
0.000415086746216
0.000434041023254
0.00104403495789
0.000488996505737
0.000432014465332
Avg: 0.00051580667495

This is as per your results.



[2003-02-26 09:24:56] [EMAIL PROTECTED]

Try this script which actually shows the time _spend_ for count:

?php

function getmicrotime(){ 
list($usec, $sec) = explode( ,microtime()); 
return ((float)$usec + (float)$sec); 
}

$tot = 0;

for ($j=0; $j  10; $j++) {
$time = dosize($j * 1000);
echo $time,\n;
$tot += $time;
}

echo Avg: , $tot/$j, \n;

function dosize( $y )
{
$t = array();

for ( $i=0; $i$y; $i++ ) {
$t[] = array( array( 3, 1 ), 3, array(
array ( 5, 1, 8 )) );
}

$start = getmicrotime();
count( $t );
$end = getmicrotime();

return $end - $start;
}
?

Results for me:

Linux (double Celeron 500Mhz): 

0.00995302200317
0.000295042991638
0.000288963317871
0.000303030014038
0.000295042991638
0.000295042991638
0.000294089317322
0.000292062759399
0.000293016433716
0.000355005264282
Avg: 0.00126643180847

MacOSX, PowerPC (1Ghz or faster, not sure):

0.00011193752288818
9.0956687927246E-05
0.00010311603546143
0.00010299682617188
0.00010395050048828
0.00010097026824951
0.00011003017425537
0.00013697147369385
0.00010299682617188
0.00010597705841064
Avg: 0.00010699033737183

Nothing wrong here..




[2003-02-26 08:11:50] carl at topthetable dot com

count() is increasingly slow when used to count large arrays.  This is
using 4.3.1 (compiled from source) on a Redhat 7.2 box.  The box has
about 80Mb free, so it's not a paging issue.  It works as expected on
Mac OS X running 4.3.1-dev.

Looking at PHP's and Zend's source, I would expect the time taken to
return the count() of an array to be similar regardless of the size of
the array.

Below is a script to demonstrate the problem.  


?
  $st = microtime();

  echo Script started:.microtime().\n;

  dosize( 10 );
  dosize( 20 );
  dosize( 50 );
  dosize( 100 );
  dosize( 200 );
  dosize( 500 );
  dosize( 1000 );
  dosize( 5000 );
  dosize( 1 );

  function dosize( $y ) {

echo Doing size $y\n;

echo   Starting array building:.microtime().\n;

$t = array();
for ( $i=0; $i$y; $i++ ) {
  $t[] = array( array( 3, 1 ), 3, array( array ( 5, 1,
8 ) ) );
}

echo   Array built:.microtime().\n;

count( $t );

echo   Count finished: .microtime().\n;
  }
?




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



#22440 [Opn-Fbk]: Bug with cookie in CGI not in ISAPI

2003-02-26 Thread sniper
 ID:   22440
 Updated by:   [EMAIL PROTECTED]
 Reported By:  garfield_fr at tiscali dot fr
-Status:   Open
+Status:   Feedback
 Bug Type: IIS related
 Operating System: Windows 2000 pro SP3
 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


Previous Comments:


[2003-02-26 10:13:23] garfield_fr at tiscali dot fr

I don't know if it's a real bug but 

Config :
Windows 2K pro + SP3
Serveur IIS
PHP 4.3.0
this is my php.ini (full version for testing purpose) :
[PHP]
cgi.force_redirect = 0
cgi.rfc2616_headers = 1
[Session]
session.save_handler = files
session.save_path = C:\PHP\sessions\

I'm trying to use PHPNuke 6.0.17 and I found this bug :
When you want to login under PHPNuke you enter your name/password. if
your login is ok the script send a cookie and redirect to an URL (your
personal page).
With PHP in CGI mode, no cookie are send/receive (?) to the browser
(IE6 SP1) and you are not connect to PHPNuke BUT if PHP run in ISAPI
mode the cookie is well receive by browser and you are connected to
PHPNuke

I don't test under Apache because I don't know how to run PHP in CGI
mode under Apache, but Apache+PHP module work fine (W2K)




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



#22112 [Opn-Fbk]: When Php compiled with support for openssl it broke the SIHUP of apache

2003-02-26 Thread sniper
 ID:   22112
 Updated by:   [EMAIL PROTECTED]
 Reported By:  sysadmin at destination dot ca
-Status:   Open
+Status:   Feedback
 Bug Type: Apache related
 Operating System: Linux Redhat 6.2
 PHP Version:  4.3.0
 New Comment:

Is mod_ssl compiled as static module into Apache or is it DSO? (see bug
#22213)



Previous Comments:


[2003-02-26 08:00:10] sysadmin at destination dot ca

Hi,

There is the test i have run today.

TEST 1 :

Apache 1.3.27
Mod_ssl 2.8.12
Openssl 0.9.6i

PHP version tried :
php4.3.1 :
[Wed Feb 26 08:28:52 2003] [notice] SIGHUP received.  Attempting to
restart - but never restart
php4-200302261230
[Wed Feb 26 08:54:42 2003] [notice] SIGHUP received.  Attempting to
restart - but never restart
php4-STABLE-200302261230
[Wed Feb 26 08:59:32 2003] [notice] SIGHUP received.  Attempting to
restart - but never restart

So i confirm you that the latest stable release don't correct that
problem.

Regars
Configuration file for php:

./configure \
--with-mysql=/usr/local/mysql \
--enable-calendar \
--enable-gettext \
--enable-ftp \
--enable-bcmath \
--enable-trans-sid \
--enable-gd-imgstrttf \
--enable-gd-native-ttf \
--enable-debug \
--with-dom \
--with-gd=/usr/gd-with_gif \
--with-jpeg-dir=/usr/lib \
--with-freetype-dir=/usr/local/freetype2 \
--with-png-dir=/usr/lib \
--with-gettext \
--with-zlib \
--with-mm=/usr/lib \
--with-zlib-dir=/usr/lib \
--with-pdflib=/usr/local/pdflib \
--with-config-file-path=/usr/local/apache/conf \
--with-apxs=/usr/local/apache/bin/apxs \
--with-mcrypt=/usr/local/libmcrypt \
--with-openssl=/usr/local/ssl \
--with-snmp \
--with-kerberos \
--with-imap \
--with-imap-ssl=/usr/local/ssl \
--prefix=/usr/local/php


TEST 2 :







[2003-02-24 09:24:12] sysadmin at destination dot ca

no i have say i will try tomorrow with the lastest cvs snapshot ...
with the latest cvs snapsot of friday it was not working.

I will keep you inform.

Regards



[2003-02-24 08:43:05] [EMAIL PROTECTED]

I think I didn't understand you correctly..but didn't you just say in
your last comment that it did work?

And next release (4.3.2) will be out in couple of weeks.
(hopefully mid-march)




[2003-02-24 08:34:51] sysadmin at destination dot ca

Latest question.

I will try the latest snapshot today the one of friday still have the
problem.

If the problem is corrected in the cvs-snaptsnot, how long till you
release a new version ? since i can't run a cvs code on production
server.

Regards



[2003-02-24 08:28:05] [EMAIL PROTECTED]

If the problem that you opened this bug report for is fixed in latest
cvs snapshot - closed.

(check the bug database for reports about open_basedir problems and
that openssl 0.9.7 problem. Add your comments to the existing reports
and if you can't find any, submit new reports.)




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/22112

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



#22112 [Fbk-Opn]: When Php compiled with support for openssl it broke the SIHUP of apache

2003-02-26 Thread sysadmin at destination dot ca
 ID:   22112
 User updated by:  sysadmin at destination dot ca
 Reported By:  sysadmin at destination dot ca
-Status:   Feedback
+Status:   Open
 Bug Type: Apache related
 Operating System: Linux Redhat 6.2
 PHP Version:  4.3.0
 New Comment:

static

And it look like you have no solution.

That will become verry hard to maintaint a web server with php since
4.2.0 it give me hugues headhache.

How can i help you find the problem of the sighup with mod_ssl compiled
in apache not as a module, since i truly need it to work that way.

Regards


Previous Comments:


[2003-02-26 10:31:58] [EMAIL PROTECTED]

Is mod_ssl compiled as static module into Apache or is it DSO? (see bug
#22213)




[2003-02-26 08:00:10] sysadmin at destination dot ca

Hi,

There is the test i have run today.

TEST 1 :

Apache 1.3.27
Mod_ssl 2.8.12
Openssl 0.9.6i

PHP version tried :
php4.3.1 :
[Wed Feb 26 08:28:52 2003] [notice] SIGHUP received.  Attempting to
restart - but never restart
php4-200302261230
[Wed Feb 26 08:54:42 2003] [notice] SIGHUP received.  Attempting to
restart - but never restart
php4-STABLE-200302261230
[Wed Feb 26 08:59:32 2003] [notice] SIGHUP received.  Attempting to
restart - but never restart

So i confirm you that the latest stable release don't correct that
problem.

Regars
Configuration file for php:

./configure \
--with-mysql=/usr/local/mysql \
--enable-calendar \
--enable-gettext \
--enable-ftp \
--enable-bcmath \
--enable-trans-sid \
--enable-gd-imgstrttf \
--enable-gd-native-ttf \
--enable-debug \
--with-dom \
--with-gd=/usr/gd-with_gif \
--with-jpeg-dir=/usr/lib \
--with-freetype-dir=/usr/local/freetype2 \
--with-png-dir=/usr/lib \
--with-gettext \
--with-zlib \
--with-mm=/usr/lib \
--with-zlib-dir=/usr/lib \
--with-pdflib=/usr/local/pdflib \
--with-config-file-path=/usr/local/apache/conf \
--with-apxs=/usr/local/apache/bin/apxs \
--with-mcrypt=/usr/local/libmcrypt \
--with-openssl=/usr/local/ssl \
--with-snmp \
--with-kerberos \
--with-imap \
--with-imap-ssl=/usr/local/ssl \
--prefix=/usr/local/php


TEST 2 :







[2003-02-24 09:24:12] sysadmin at destination dot ca

no i have say i will try tomorrow with the lastest cvs snapshot ...
with the latest cvs snapsot of friday it was not working.

I will keep you inform.

Regards



[2003-02-24 08:43:05] [EMAIL PROTECTED]

I think I didn't understand you correctly..but didn't you just say in
your last comment that it did work?

And next release (4.3.2) will be out in couple of weeks.
(hopefully mid-march)




[2003-02-24 08:34:51] sysadmin at destination dot ca

Latest question.

I will try the latest snapshot today the one of friday still have the
problem.

If the problem is corrected in the cvs-snaptsnot, how long till you
release a new version ? since i can't run a cvs code on production
server.

Regards



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/22112

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



#22441 [Opn-Fbk]: SSL and cURL SSL break with pfpro

2003-02-26 Thread sniper
 ID:   22441
 Updated by:   [EMAIL PROTECTED]
 Reported By:  eric at vlender dot com
-Status:   Open
+Status:   Feedback
 Bug Type: OpenSSL related
 Operating System: GNU/Linux (slackware)
 PHP Version:  4.3.1
 New Comment:

You most likely have too old version of the pfpro SDK.
(old ones have some ssl funcs in it which clash with openssl)



Previous Comments:


[2003-02-26 10:30:04] eric at vlender dot com

php-4.3.1 / apache 1.3.27 / openssl-0.9.6g / curl-7.10.2
When ever I use the --with-pfpro configure option to compile in payflow
pro support, it breaks the cURL (--with-curl) SSL connectability, as
well as fsockopen(ssl://somehost.hst)(--with-openssl=/usr/local/ssl)
functionality.  

If I recompile with out the payflow-pro extension I can use
curl_init(); and fsockopen(ssl:) again.   It took me quite awhile to
figure this one out, since curl_init() and fsockopen(ssl:) don't return
any errors when --pfpro is compiled in.  They just do not work at all. 
No errors, no initalization, nothing.   

Thanks for your time.




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



#22112 [Opn-Bgs]: When Php compiled with support for openssl it broke the SIHUP of apache

2003-02-26 Thread sniper
 ID:   22112
 Updated by:   [EMAIL PROTECTED]
 Reported By:  sysadmin at destination dot ca
-Status:   Open
+Status:   Bogus
 Bug Type: Apache related
 Operating System: Linux Redhat 6.2
 PHP Version:  4.3.0
 New Comment:

Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. Because of this, we hope you add your comments
to the existing bug instead.

Thank you for your interest in PHP.

Same as bug #22213, solution is to compile both as DSO, then it works.
(add any further comments to 22213, there's no use to have several
reports about same issue)



Previous Comments:


[2003-02-26 10:36:10] sysadmin at destination dot ca

static

And it look like you have no solution.

That will become verry hard to maintaint a web server with php since
4.2.0 it give me hugues headhache.

How can i help you find the problem of the sighup with mod_ssl compiled
in apache not as a module, since i truly need it to work that way.

Regards



[2003-02-26 10:31:58] [EMAIL PROTECTED]

Is mod_ssl compiled as static module into Apache or is it DSO? (see bug
#22213)




[2003-02-26 08:00:10] sysadmin at destination dot ca

Hi,

There is the test i have run today.

TEST 1 :

Apache 1.3.27
Mod_ssl 2.8.12
Openssl 0.9.6i

PHP version tried :
php4.3.1 :
[Wed Feb 26 08:28:52 2003] [notice] SIGHUP received.  Attempting to
restart - but never restart
php4-200302261230
[Wed Feb 26 08:54:42 2003] [notice] SIGHUP received.  Attempting to
restart - but never restart
php4-STABLE-200302261230
[Wed Feb 26 08:59:32 2003] [notice] SIGHUP received.  Attempting to
restart - but never restart

So i confirm you that the latest stable release don't correct that
problem.

Regars
Configuration file for php:

./configure \
--with-mysql=/usr/local/mysql \
--enable-calendar \
--enable-gettext \
--enable-ftp \
--enable-bcmath \
--enable-trans-sid \
--enable-gd-imgstrttf \
--enable-gd-native-ttf \
--enable-debug \
--with-dom \
--with-gd=/usr/gd-with_gif \
--with-jpeg-dir=/usr/lib \
--with-freetype-dir=/usr/local/freetype2 \
--with-png-dir=/usr/lib \
--with-gettext \
--with-zlib \
--with-mm=/usr/lib \
--with-zlib-dir=/usr/lib \
--with-pdflib=/usr/local/pdflib \
--with-config-file-path=/usr/local/apache/conf \
--with-apxs=/usr/local/apache/bin/apxs \
--with-mcrypt=/usr/local/libmcrypt \
--with-openssl=/usr/local/ssl \
--with-snmp \
--with-kerberos \
--with-imap \
--with-imap-ssl=/usr/local/ssl \
--prefix=/usr/local/php


TEST 2 :







[2003-02-24 09:24:12] sysadmin at destination dot ca

no i have say i will try tomorrow with the lastest cvs snapshot ...
with the latest cvs snapsot of friday it was not working.

I will keep you inform.

Regards



[2003-02-24 08:43:05] [EMAIL PROTECTED]

I think I didn't understand you correctly..but didn't you just say in
your last comment that it did work?

And next release (4.3.2) will be out in couple of weeks.
(hopefully mid-march)




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/22112

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



#22428 [Opn-Bgs]: sum of values results in unexpected value

2003-02-26 Thread sniper
 ID:   22428
 Updated by:   [EMAIL PROTECTED]
 Reported By:  bnieuwen at hio dot hen dot nl
-Status:   Open
+Status:   Bogus
 Bug Type: Math related
 Operating System: linux
 PHP Version:  4.2.3
 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

http://www.php.net/manual/en/language.types.float.php#AEN3375


Previous Comments:


[2003-02-26 06:37:23] bnieuwen at hio dot hen dot nl

I have a problem summing values. 
The very simple script
?
echo Total =  . (10.00 - 10.01);
?

produces:
Total = -0.0098

I expected the following result: 
Total = -0,01

What's happening??




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



#22349 [Fbk-NoF]: W2K Server, Apache 2.0.44, FireBird 1.5 (IB6 clone)

2003-02-26 Thread sniper
 ID:   22349
 Updated by:   [EMAIL PROTECTED]
 Reported By:  nicon49nicon at mail dot ru
-Status:   Feedback
+Status:   No Feedback
 Bug Type: InterBase related
 Operating System: W2K Server
 PHP Version:  4.3.0
 New Comment:

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.




Previous Comments:


[2003-02-21 03:31: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-02-21 03:28:04] nicon49nicon at mail dot ru

Anythings work fine, but this:

$dbh = ibase_connect($DBAlias, $DBUser, $DBPassword,'WIN1251',0,3);
 if (is_null($dbh)):
 echo FB error;
 else:
echo FB Ok;
 endif;

both: if $DBAlias - correct, or not i have FB Ok;
also i try is_int(),pconnect,gettype, etc - without effect. 
In Apache's log i see correct line:
PHP Warning:  ibase_connect(): I/O error for file
D:\ph1p_objects.gdb Error while trying to open file The system cannot
find the file specified...




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



#22440 [Opn-Fbk]: Bug with cookie in CGI not in ISAPI

2003-02-26 Thread sniper
 ID:   22440
 Updated by:   [EMAIL PROTECTED]
 Reported By:  garfield_fr at tiscali dot fr
-Status:   Open
+Status:   Feedback
 Bug Type: IIS related
 Operating System: Windows 2000 pro SP3
-PHP Version:  4.3.0
+PHP Version:  4.3.2-dev
 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-02-26 10:46:25] garfield_fr at tiscali dot fr

No change  same problem ...
PHPNuke doesn't work with CGI but it works with ISAPI ...



[2003-02-26 10:23: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



[2003-02-26 10:13:23] garfield_fr at tiscali dot fr

I don't know if it's a real bug but 

Config :
Windows 2K pro + SP3
Serveur IIS
PHP 4.3.0
this is my php.ini (full version for testing purpose) :
[PHP]
cgi.force_redirect = 0
cgi.rfc2616_headers = 1
[Session]
session.save_handler = files
session.save_path = C:\PHP\sessions\

I'm trying to use PHPNuke 6.0.17 and I found this bug :
When you want to login under PHPNuke you enter your name/password. if
your login is ok the script send a cookie and redirect to an URL (your
personal page).
With PHP in CGI mode, no cookie are send/receive (?) to the browser
(IE6 SP1) and you are not connect to PHPNuke BUT if PHP run in ISAPI
mode the cookie is well receive by browser and you are connected to
PHPNuke

I don't test under Apache because I don't know how to run PHP in CGI
mode under Apache, but Apache+PHP module work fine (W2K)




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



#22442 [NEW]: auto_prepend_file not consistant

2003-02-26 Thread jstanley at cenicola-helvin dot com
From: jstanley at cenicola-helvin dot com
Operating system: Redhat 7.3
PHP version:  4.3.1
PHP Bug Type: Unknown/Other Function
Bug description:  auto_prepend_file not consistant

Apache 1.3.27 
.htaccess file
php_value auto_prepend_file '/path/to/function/file'
php_value auto_append_file '/path/to/cleanup/file'

I keep reloading a phpinfo.php script
?php phpinfo(); ?

Browser displays value randomly

Directive = Local Value, Master Value

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



#22441 [Fbk-Opn]: SSL and cURL SSL break with pfpro

2003-02-26 Thread eric at vlender dot com
 ID:   22441
 User updated by:  eric at vlender dot com
 Reported By:  eric at vlender dot com
-Status:   Feedback
+Status:   Open
 Bug Type: OpenSSL related
 Operating System: GNU/Linux (slackware)
 PHP Version:  4.3.1
 New Comment:

I don't think that is the case.  I am using the following shared
library from the sdk:
-rwxrwxr-x1 501  501690560 Jun 11  2002 libpfpro.so*

I went and redownloaded the SDK this morning, and the lib in their
download is the same as this one.  Here are my configure statements. 
(Also, in the meantime I have upgraded to openssl-0.9.7)

apache-1.3.27:  ./configure --prefix=/usr/local/apache
--server-uid=daemon --server-gid=daemon
--activate-module=src/modules/php4/libphp4.a:

php-4.3.1: ./configure --with-apache=../apache_1.3.27 --enable-bcmath
--with-curl --with-gettext --with-mysql=/usr/local/mysql
--with-mcrypt=../libmcrypt-2.5.0 --with-openssl=/usr/local/ssl
--with-pear --disable-cgi --with-gd --with-zlib
--with-jpeg-dir=/usr/lib --with-pfpro

With just the --with-pfpro  option I believe it uses the PHP internal
pfpro extension, is this the issue, and should I be pointing it to the
pfpro shared library instead?  

If so, will I need to recompile everything as shared?  I prefer static
for the raw performance, but will switch to shared if that will solve
this issue.

Thanks again.


Previous Comments:


[2003-02-26 10:36:31] [EMAIL PROTECTED]

You most likely have too old version of the pfpro SDK.
(old ones have some ssl funcs in it which clash with openssl)




[2003-02-26 10:30:04] eric at vlender dot com

php-4.3.1 / apache 1.3.27 / openssl-0.9.6g / curl-7.10.2
When ever I use the --with-pfpro configure option to compile in payflow
pro support, it breaks the cURL (--with-curl) SSL connectability, as
well as fsockopen(ssl://somehost.hst)(--with-openssl=/usr/local/ssl)
functionality.  

If I recompile with out the payflow-pro extension I can use
curl_init(); and fsockopen(ssl:) again.   It took me quite awhile to
figure this one out, since curl_init() and fsockopen(ssl:) don't return
any errors when --pfpro is compiled in.  They just do not work at all. 
No errors, no initalization, nothing.   

Thanks for your time.




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



#22441 [Opn]: SSL and cURL SSL break with pfpro

2003-02-26 Thread eric at vlender dot com
 ID:   22441
 User updated by:  eric at vlender dot com
 Reported By:  eric at vlender dot com
 Status:   Open
 Bug Type: OpenSSL related
 Operating System: GNU/Linux (slackware)
 PHP Version:  4.3.1
 New Comment:

One other note that I realized should probally be taken into account
with this.  I am using apache-ssl Ben-SSL/1.48 and not mod_ssl.


Previous Comments:


[2003-02-26 11:12:34] eric at vlender dot com

I don't think that is the case.  I am using the following shared
library from the sdk:
-rwxrwxr-x1 501  501690560 Jun 11  2002 libpfpro.so*

I went and redownloaded the SDK this morning, and the lib in their
download is the same as this one.  Here are my configure statements. 
(Also, in the meantime I have upgraded to openssl-0.9.7)

apache-1.3.27:  ./configure --prefix=/usr/local/apache
--server-uid=daemon --server-gid=daemon
--activate-module=src/modules/php4/libphp4.a:

php-4.3.1: ./configure --with-apache=../apache_1.3.27 --enable-bcmath
--with-curl --with-gettext --with-mysql=/usr/local/mysql
--with-mcrypt=../libmcrypt-2.5.0 --with-openssl=/usr/local/ssl
--with-pear --disable-cgi --with-gd --with-zlib
--with-jpeg-dir=/usr/lib --with-pfpro

With just the --with-pfpro  option I believe it uses the PHP internal
pfpro extension, is this the issue, and should I be pointing it to the
pfpro shared library instead?  

If so, will I need to recompile everything as shared?  I prefer static
for the raw performance, but will switch to shared if that will solve
this issue.

Thanks again.



[2003-02-26 10:36:31] [EMAIL PROTECTED]

You most likely have too old version of the pfpro SDK.
(old ones have some ssl funcs in it which clash with openssl)




[2003-02-26 10:30:04] eric at vlender dot com

php-4.3.1 / apache 1.3.27 / openssl-0.9.6g / curl-7.10.2
When ever I use the --with-pfpro configure option to compile in payflow
pro support, it breaks the cURL (--with-curl) SSL connectability, as
well as fsockopen(ssl://somehost.hst)(--with-openssl=/usr/local/ssl)
functionality.  

If I recompile with out the payflow-pro extension I can use
curl_init(); and fsockopen(ssl:) again.   It took me quite awhile to
figure this one out, since curl_init() and fsockopen(ssl:) don't return
any errors when --pfpro is compiled in.  They just do not work at all. 
No errors, no initalization, nothing.   

Thanks for your time.




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



#21480 [Com]: COM crashes in PHP4.3.0

2003-02-26 Thread engineering at userinterfacehelp dot com
 ID:   21480
 Comment by:   engineering at userinterfacehelp dot com
 Reported By:  jadair at adairservices dot net
 Status:   Closed
 Bug Type: COM related
 Operating System: Windows 2000 Pro
 PHP Version:  4.3.0
 New Comment:

This is a Windows-specific bug that crashes Apache.

I politely suggest to please look into incorporating this fix into the
Windows binary distribution in a sooner than later time frame.


Previous Comments:


[2003-02-25 01:54:22] [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.





[2003-01-11 10:14:22] andrusso at libero dot it

Php 4.3.0 crashes also with COM.ADODB see bug #21517



[2003-01-07 09:21:46] jadair at adairservices dot net

It's a simple Excel application.

Apache.exe - Application Error says, The memory could not be
'written'.

?
function do_Excel ($results, $UserDir)
{
$excel = new COM(Excel.Application);
$excel-sheetsinnewworkbook=1;
$excel-Workbooks-Add();

$book=$excel-Workbooks(1);
$sheet=$book-Worksheets(1);

$sheet-Name=Sheet1;
$sheet-activate;
$cell=$sheet-range(A2);
$cell-activate;
$cell-value=Generic;
//  putVariable($sheet, B, Dchains, 48);
putVariable($sheet, B, Dchains, $results['partwidth']);
//  putVariable($sheet, C, HtSlats, 36);
putVariable($sheet, C, HtSlats, $results['partheight']);
putVariable($sheet, D, SlatThickness, 0.25);
putVariable($sheet, E, HeadShaftCC5PD, 15.679);
putVariable($sheet, F, HeadShaftDiameter, 1.9375);
putVariable($sheet, G, HeadShaftLength,
DS1+DS2+Dchains+DS3+DS4+2);
putVariable($sheet, H, DS1, 1.75);
putVariable($sheet, I, DS2, 3.75);
putVariable($sheet, J, DS3, 3.75);
putVariable($sheet, K, DS4, 5.1875);
putVariable($sheet, L, DS5, 3);
putVariable($sheet, M, TS1, 1.75);
putVariable($sheet, N, TS2, 3.75);
putVariable($sheet, O, TS3, 3.75);
putVariable($sheet, P, TS4, 1.75);
putVariable($sheet, Q, SplitTailShaft, 0);
putVariable($sheet, R, TailShaftCC5PD, 15.679);
//  putVariable($sheet, S, DLength, 216);
putVariable($sheet, S, DLength, $results['partlength']);
putVariable($sheet, T, TailShaftDiameter, 1.4375);
putVariable($sheet, U, HeadShaftKey, 0.5);
putVariable($sheet, V, TailShaftKey, 0.375);
putVariable($sheet, W, TailShaftLength,
TS1+TS2+TS3+TS4+Dchains);

$book-saveas($UserDir.'/GlobalVariables.xls');
echo_gray ( 'brSaved as '.$UserDir.'/GlobalVariables.xls');

$book-Close(false);
unset($sheet);
unset($book);
$excel-Workbooks-Close();
$excel-Quit();
unset($excel);
}
function putVariable ($sheet,$this_cell,$value,$value2)
{
$cell=$sheet-range($this_cell.'1');
$cell-activate;
$cell-value=$value;
$cell=$sheet-range($this_cell.'2');
$cell-activate;
$cell-value=$value2;
}
?



[2003-01-07 05:41:53] [EMAIL PROTECTED]

Can you include the script so we can try to reproduce the problem? If
you can't include the whole script just include the part where it
hangs...

(+ changing summary/category).

Thank you for your report.



[2003-01-07 01:34:19] jadair at adairservices dot net

A working script written using COM now crashes Apache 1.3.26 after
upgrading to PHP 4.3.0.

It also hangs Apache 1.3.27.

Excel zombies wander.

I was using a snap dated sometime later than 10/17/2002.  And according
to CVS no changes have been made to the COM extension since then other
than bumping of the copyright year.




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



#22443 [NEW]: Reference problem inside constructor

2003-02-26 Thread oracle16 at freemail dot hu
From: oracle16 at freemail dot hu
Operating system: Windows
PHP version:  4.3.1
PHP Bug Type: Class/Object related
Bug description:  Reference problem inside constructor

I have a problem when using two-way references.
The simplest case I could dig out:


pre

class B
{
  var $a;
  function B( $a)
  {
$this-a =  $a;
  }
}

class A
{
  var $b;
  function A()
  {
$this-b =  new B($this);
  }
}

$a = new A();

$a-x = ax;

print $a-b-a-x;

pre

I think this should print out ax. However it doesn't.

If I add the following line after constructing $a:

$a-b-a = $a;

then it works, it prints out ax.

Or, if I define A like this:

pre

class A
{
  var $b;
  function A()
  {
$this-b =  new B($this);
  }
  function setBsA()
  {
$this-b-a =  $this;
  }
}

/pre

and call setBsA() after contructing, it still works.

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



#22441 [Fbk-Opn]: SSL and cURL SSL break with pfpro

2003-02-26 Thread eric at vlender dot com
 ID:   22441
 User updated by:  eric at vlender dot com
 Reported By:  eric at vlender dot com
-Status:   Feedback
+Status:   Open
 Bug Type: OpenSSL related
 Operating System: GNU/Linux (slackware)
 PHP Version:  4.3.1
 New Comment:

On a quick side note, Payflow pro is working perfectly.  We use it for
our signups, and the signup procedure is functioning perfectly.  Just
cURL and fsockopen() are not happy..  :(

I placed them in /usr/lib and /usr/local/include respectfully. 
/usr/local/lib/pfpro.h is a symlink to the header in
/usr/local/include

~ locate pfpro | sort
/usr/lib/libpfpro.so
/usr/local/include/pfpro.h
/usr/local/lib/pfpro.h
/usr/local/src/php-4.3.1/ext/pfpro
/usr/local/src/php-4.3.1/ext/pfpro/CREDITS
/usr/local/src/php-4.3.1/ext/pfpro/TODO
/usr/local/src/php-4.3.1/ext/pfpro/config.m4
/usr/local/src/php-4.3.1/ext/pfpro/pfpro.c
/usr/local/src/php-4.3.1/ext/pfpro/pfpro.lo
/usr/local/src/php-4.3.1/ext/pfpro/pfpro.o
/usr/local/src/php-4.3.1/ext/pfpro/php_pfpro.h
/usr/local/src/php-4.3.1/tests/testpfpro.php


Previous Comments:


[2003-02-26 11:25:56] [EMAIL PROTECTED]

Where are the pfpro libs and headers installed then?
And you're absolutely sure you don't have any older versions
laying around? (I somewhat remember there being some problems before
with pfpro and openssl..)




[2003-02-26 11:19:14] eric at vlender dot com

One other note that I realized should probally be taken into account
with this.  I am using apache-ssl Ben-SSL/1.48 and not mod_ssl.



[2003-02-26 11:12:34] eric at vlender dot com

I don't think that is the case.  I am using the following shared
library from the sdk:
-rwxrwxr-x1 501  501690560 Jun 11  2002 libpfpro.so*

I went and redownloaded the SDK this morning, and the lib in their
download is the same as this one.  Here are my configure statements. 
(Also, in the meantime I have upgraded to openssl-0.9.7)

apache-1.3.27:  ./configure --prefix=/usr/local/apache
--server-uid=daemon --server-gid=daemon
--activate-module=src/modules/php4/libphp4.a:

php-4.3.1: ./configure --with-apache=../apache_1.3.27 --enable-bcmath
--with-curl --with-gettext --with-mysql=/usr/local/mysql
--with-mcrypt=../libmcrypt-2.5.0 --with-openssl=/usr/local/ssl
--with-pear --disable-cgi --with-gd --with-zlib
--with-jpeg-dir=/usr/lib --with-pfpro

With just the --with-pfpro  option I believe it uses the PHP internal
pfpro extension, is this the issue, and should I be pointing it to the
pfpro shared library instead?  

If so, will I need to recompile everything as shared?  I prefer static
for the raw performance, but will switch to shared if that will solve
this issue.

Thanks again.



[2003-02-26 10:36:31] [EMAIL PROTECTED]

You most likely have too old version of the pfpro SDK.
(old ones have some ssl funcs in it which clash with openssl)




[2003-02-26 10:30:04] eric at vlender dot com

php-4.3.1 / apache 1.3.27 / openssl-0.9.6g / curl-7.10.2
When ever I use the --with-pfpro configure option to compile in payflow
pro support, it breaks the cURL (--with-curl) SSL connectability, as
well as fsockopen(ssl://somehost.hst)(--with-openssl=/usr/local/ssl)
functionality.  

If I recompile with out the payflow-pro extension I can use
curl_init(); and fsockopen(ssl:) again.   It took me quite awhile to
figure this one out, since curl_init() and fsockopen(ssl:) don't return
any errors when --pfpro is compiled in.  They just do not work at all. 
No errors, no initalization, nothing.   

Thanks for your time.




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



#22444 [NEW]: [IMAP] Implement c-client's nntp_mail

2003-02-26 Thread nathan at dstatement dot com
From: nathan at dstatement dot com
Operating system: any
PHP version:  4.2.3
PHP Bug Type: Feature/Change Request
Bug description:  [IMAP] Implement c-client's nntp_mail

Hi!

Currently the imap_* functions do not have any way to post a article to a
newsgroup/NNTP stream even though the library supports reading NNTP groups
and is quite good at it.  

The UW c-client library (on which the php imap_* functions are based)
provides a function for this called nntp_mail, documentation of which can
be found at:
http://www.washington.edu/imap/documentation/internal.txt.html)

The specific reference is:

--- SNIP
long nntp_mail (NNTPSTREAM *stream,ENVELOPE *msg,BODY *body);
stream  stream to transmit mail
msg message envelope
bodymessage body

  This function negotiates an NNTP posting transaction to deliver the
specified news message.  This function returns T if success or NIL if
there is any failure.  The text reason for the failure is in stream-reply
item; if it is associated with a recipient it is also in that address'
address-error item.
--- PINS

I humbly ask that this function be implemented.  Currently the only way to
post is by fsockopen()'ing a connection to the news server which is
contradictory to using the imap_* functions in the first place.

Thanks!

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



#22154 [NoF-Opn]: fpassthru() fails with files larger than a few hundered KB

2003-02-26 Thread malekjo at aphrodite dot com
 ID:   22154
 User updated by:  malekjo at aphrodite dot com
 Reported By:  malekjo at aphrodite dot com
-Status:   No Feedback
+Status:   Open
 Bug Type: Apache related
 Operating System: Linux 2.4.18-10
 PHP Version:  4.3.0
 New Comment:

In php.ini:
zlib.output_compression = Off
memory_limit = 8M
output_handler =

I get the errors with any 'modern' graphical browser (Mozilla,
Netscape, IE...).  Links works just fine though.  I'm now leaning
towards something wrong between fpassthru() and session_start().

Also, in my apache logs I'm getting something similar to:

[Tue Feb 25 15:35:06 2003] [info] [client XXX.XXX.XXX.XXX]
(104)Connection reset by peer: client stopped connection before rwrite

every time a download fails.  And its not my users hitting the stop
button.


Previous Comments:


[2003-02-20 08:13:55] [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.





[2003-02-11 20:30:59] [EMAIL PROTECTED]

Hmm...do you have zlib.output_compression=On ?
Or output_handler=ob_gzhandler ?? 
(in your php.ini)

What is your memory_limit setting in php.ini?

And does the bug occur with any browser..? 




[2003-02-11 15:55:38] malekjo at aphrodite dot com

even with the simple fpassthru() to load content into the browser
window?

?php

session_start();

$fp = fopen('wordlist.txt','r');

if ($fp)
{
  header(Cache-control: public);
  header(Content-Type: application/octet-stream);
  header(Content-Length:
.(string)filesize(/home/joem/public_html/php/wordlist.txt));
  header(Content-Disposition: attachment;
filename=\wordlist.txt\);
  header(Connection: close);
  fpassthru($fp);
  fclose($fp);
}

else
{
  print File not found\n;
}

?

Doesn't work either.



[2003-02-11 15:43:15] [EMAIL PROTECTED]

I think I've had same problem myself too. I got it solved
by sending the content-length header with the size of the file to be
downloaded..





[2003-02-11 13:06:53] malekjo at aphrodite dot com

Interesting...at least my test case script sometimes responds now.  Not
often though.  Here's a trace:

GET /php/test2.php HTTP/1.1
Host: client hostname
User-Agent: Mozilla/5.0 Galeon/1.2.5 (X11; Linux i586; U;) Gecko/0
Accept:
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,video/x-mng,image/png,image/jpeg,image/gif;q=0.2,text/css,*/*;q=0.1
Accept-Language: en
Accept-Encoding: gzip, deflate, compress;q=0.9
Accept-Charset: ISO-8859-1, utf-8;q=0.66, *;q=0.66
Keep-Alive: 300
Connection: keep-alive

HTTP/1.1 200 OK
Date: Tue, 11 Feb 2003 19:50:35 GMT
Server: IBM_HTTP_SERVER/1.3.19.2  Apache/1.3.20 (Unix) PHP/4.3.1-dev
X-Powered-By: PHP/4.3.1-dev
Set-Cookie: PHPSESSID=7691fe3e49b7a476fca1e0f32bc6f33e; expires=Tue,
11-Feb-03 20:00:35 GMT; path=/; domain=.domain.
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0,
pre-check=0
Pragma: no-cache
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/html

0



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/22154

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



#22416 [Fbk-Opn]: failed to create stream: Too many open files in Unknown on line 0

2003-02-26 Thread jhalla at legion dot org
 ID:   22416
 User updated by:  jhalla at legion dot org
 Reported By:  jhalla at legion dot org
-Status:   Feedback
+Status:   Open
 Bug Type: iPlanet related
 Operating System: Solaris 8
 PHP Version:  4.3.0
 New Comment:

We have found that there is no resolution to this issue of PHPv4.3
running on Solaris 8 or 9, with Sun One Web Server (formerly iPlanet;
we have tried w/ both SP4 and SP5).

The issue _seems_ like a memory leak, but that is just our assessment
based on observation under a limited number of server environments.

Our only course of action to resolve this issue at this time has been
to downgrade to PHP v4.2.2, which is the last known version of PHP to
both install correctly (we had issues installing v4.2.3) as well as to
have no problems running.

With any luck, a patched version of PHP v4.3 will be released that
resolves this issue for Solaris/SunOne users.

Thank you.

 - Jason Halla
[EMAIL PROTECTED]


Previous Comments:


[2003-02-25 10:01:49] [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-02-25 09:15:03] jhalla at legion dot org

Running: Solaris 8, iPlanet 6sp4 enterprise, PHP 4.3

All PHP pages get this error:


Warning: Unknown(/web_sites/doc_root/public_html/index.php): failed to
create stream: Too many open files in Unknown on line 0

Warning: Unknown(): Failed opening
'/web_sites/doc_root/public_html/index.php' for inclusion
(include_path='.:/php/includes:/web_sites/doc_root:/home/web_sites/doc_root/public_html')
in Unknown on line 0



Files which are basically just all HTML w/ no PHP code in them
whatsoever, but w/ the .php extension, will also produce the above
error.

PHP 4.2.3 appears to be the only workable release for iPlanet 6 on
Solaris - at least, according to feedback from other users on this Bug
List, so we are going back to that release.

This is a serious issue w/ PHP 4.3.0 and iPlanet, and needs to be
addressed. Thank you. 






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



#22416 [Com]: failed to create stream: Too many open files in Unknown on line 0

2003-02-26 Thread webmaster at telearmenia dot net dot co
 ID:   22416
 Comment by:   webmaster at telearmenia dot net dot co
 Reported By:  jhalla at legion dot org
 Status:   Open
 Bug Type: iPlanet related
 Operating System: Solaris 8
 PHP Version:  4.3.0
 New Comment:

We are running php4.3.0 with Sun One Web Server 6.0sp5 on 
Solaris 8. It was compiled with gcc 2.95.3 using './configure' 
'--with-nsapi=/path/to/iplanet/web/server' 

It compiled successfully and runs fine for a few hours or minutes but
accessing pages soon reports the following:

==
Warning: Unknown(/path/to/doc-root/index.php): failed to create
stream:
Too many open files in Unknown on line 0

Warning: Failed opening '/path/to/doc-root/index.php' for inclusion
(include_path='.:/usr/local/lib/php') in Unknown on line 0
==
We increased our kernel file descriptor limit, but shows the same
mistake. 

A quick fix is to setup a cron job to restart the web server hourly,but
this is not desired.

Please if you can provide information with since this problem solves

Thanks


Previous Comments:


[2003-02-26 13:21:20] jhalla at legion dot org

We have found that there is no resolution to this issue of PHPv4.3
running on Solaris 8 or 9, with Sun One Web Server (formerly iPlanet;
we have tried w/ both SP4 and SP5).

The issue _seems_ like a memory leak, but that is just our assessment
based on observation under a limited number of server environments.

Our only course of action to resolve this issue at this time has been
to downgrade to PHP v4.2.2, which is the last known version of PHP to
both install correctly (we had issues installing v4.2.3) as well as to
have no problems running.

With any luck, a patched version of PHP v4.3 will be released that
resolves this issue for Solaris/SunOne users.

Thank you.

 - Jason Halla
[EMAIL PROTECTED]



[2003-02-25 10:01:49] [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-02-25 09:15:03] jhalla at legion dot org

Running: Solaris 8, iPlanet 6sp4 enterprise, PHP 4.3

All PHP pages get this error:


Warning: Unknown(/web_sites/doc_root/public_html/index.php): failed to
create stream: Too many open files in Unknown on line 0

Warning: Unknown(): Failed opening
'/web_sites/doc_root/public_html/index.php' for inclusion
(include_path='.:/php/includes:/web_sites/doc_root:/home/web_sites/doc_root/public_html')
in Unknown on line 0



Files which are basically just all HTML w/ no PHP code in them
whatsoever, but w/ the .php extension, will also produce the above
error.

PHP 4.2.3 appears to be the only workable release for iPlanet 6 on
Solaris - at least, according to feedback from other users on this Bug
List, so we are going back to that release.

This is a serious issue w/ PHP 4.3.0 and iPlanet, and needs to be
addressed. Thank you. 






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



#12061 [Com]: CGI Error

2003-02-26 Thread garlandj at hotmail dot com
 ID:   12061
 Comment by:   garlandj at hotmail dot com
 Reported By:  peters at connection dot ca
 Status:   Bogus
 Bug Type: IIS related
 Operating System: Win 2K
 PHP Version:  4.0.6
 New Comment:

The misbehaving error is generated from working with notepad, then
saving the file:
myphpfile.php

What actually gets saved is this:
myphpfile.php.txt

Be sure to drop down the menu to All Files *.* to eliminate the default
.txt extension from be appended. Alternatively, enable viewing of
file-extensions and delete the .txt from the end of the file.

I cannot however figure out the undefined variable problem with
Windows 2000/XP.  If you have a form and create a post action, the data
should be passed so that:
I should be able to use HTML like this:
input type=text size=5 value= name=myvar
And then use PHP in the same, or separate PHP file to reference the
variable with $myvar.  This does NOT work with Windows.  When this
variable is referenced in the code, an undefined variable error
results.  Editing the php.ini file is NOT a solution, but does get rid
of the error (of course!)  Instead of displaying the error, the data is
non-existent/empty/not displayed/inacessible.

I found a webpage that used the following to obtain all variables, so
the data IS being processed and IS accessible, but not as it should
be.

This code (found elsewhere) will list all variables and correctly
display their contents:
?php 
print Posted variables: br;
foreach($HTTP_POST_VARS as $key=$value)
print $key .  =  . $value . br;
?
I suppose one could use this as a work-around.
Any ideas?


Previous Comments:


[2003-01-24 22:11:48] ecorriel at hotmail dot com

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.



[2003-01-05 04:09:32] wyared at yahoo dot com

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] codingforums at couchfort dot org

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] JoeHa at gmx dot de

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] dnocito at accelesoft dot com

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.



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=12061edit=1



#21931 [Opn-Csd]: Mail() fifth parameter

2003-02-26 Thread derick
 ID:   21931
 Updated by:   [EMAIL PROTECTED]
 Reported By:  php dot net at spamfilter dot friendlydude dot com
-Status:   Open
+Status:   Closed
 Bug Type: Feature/Change Request
 Operating System: Linux 2.4.19
 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.

It is NOT enabled now in safe mode, but atleast you can force it with
the ini setting mail_force_extra_parameters, see also:
http://news.php.net/article.php?group=php.cvsarticle=19210

Derick



Previous Comments:


[2003-01-29 13:40:26] [EMAIL PROTECTED]

This is a feature/change request. 



[2003-01-29 03:10:55] php dot net at spamfilter dot friendlydude dot
com

The fifth parameter of the mail() function is disabled in safe_mode,
but the changelog says the security issue is already fixed:

Changed mail() to use escape_shell_cmd() to allow multiple extra
parameters to the invocation of the mailer as used in the fifth
parameter. (Derick)

Can it be enabled in the next version of php?




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



#17513 [Opn-Csd]: Default Additional command of mail()

2003-02-26 Thread derick
 ID:   17513
 Updated by:   [EMAIL PROTECTED]
 Reported By:  eurower at eurower dot com
-Status:   Open
+Status:   Closed
 Bug Type: Feature/Change Request
 Operating System: Redhat 7.1
 PHP Version:  4.1.2
 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 PHP 5 you can force it with the ini setting
mail_force_extra_parameters, see also:
http://news.php.net/article.php?group=php.cvsarticle=19210

Derick



Previous Comments:


[2002-05-29 15:21:01] eurower at eurower dot com

Hello,

when a user put in his script the mail() function, the mail is sent and
we see in the log from: [EMAIL PROTECTED]
If we set the additional command [EMAIL PROTECTED] so the log become
from: [EMAIL PROTECTED] and any error return mail will be send to
fromme (and no more apache)...
Meanwhile, this news feature is not implemented by all projets in php,
of course, a user can not set this additional command, so, the mail
will be send from apache and it's not recommanded ...
The best will be that if the additional header is not set, so the
mail() function serach the From line in the header and put it as
additional header ...(the Error-to line is not always set, but the from
is always)
So, the very best will that if the additional header is not set AND
there is no From line in the normal header, so the mail() return
false.
This option can for example, be activated from the php.ini.
So, if a administrator want it, it can force user to set the From line
in the header and/or a additional command to identify mail in the log
files and for not error mal return to apache (and not user)

Thank you very much ...

Best regards,




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



#20244 [Opn]: Multiple cmdline args for mail()'s fifth parameter

2003-02-26 Thread derick
 ID:   20244
 Updated by:   [EMAIL PROTECTED]
 Reported By:  pgb at qbfox dot com
 Status:   Open
 Bug Type: Feature/Change Request
 Operating System: Linux, RedHat 7.3
 PHP Version:  4.2.3
 New Comment:

From PHP 5 you can force the extra parameters in safemode with the ini
setting mail_force_extra_parameters, see also:
http://news.php.net/article.php?group=php.cvsarticle=19210


Derick



Previous Comments:


[2002-11-04 06:26:42] pgb at qbfox dot com

(Please see closed bug 15509.)

I'd like to make a feature request for mail(), whereby
multiple commandline arguments can be passed on to the
underlying MTA.  The easiest is to simply allow an
arbitrary string, with whitespace, as the fifth argument
to mail(), passing it on more or less as is (quoting of
individual arguments is fine).

I think the security issue of the fifth parameter is a
red herring, as the parameter will rarely (never) contain
anything not explicitly written by the programmer.  That
is, it will never contain arbitrary web page input.

I need to do -odd [EMAIL PROTECTED], which, with the
current restriction, means that I have to write my own
mail() function, which shouldn't really be necessary for
something like this (odd sets deferred delivery, dumping
mail in the queue for the daemon to pick up later).

I have in fact made a (very clean) patch against PHP-4.2.3
ext/standard/mail.c to allow multiple params, adding
quotes, so that if somebody were to pass a parameter of

; killall -9 httpd

it comes out as

';' 'killall' '-9' 'httpd'

Surely, this must be safe enough, in particular
considering where the contents for the fifth parameter
would normally come from (PHP coder, not web site user).

Cheers.

  -- Per




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



#20244 [Opn-Csd]: Multiple cmdline args for mail()'s fifth parameter

2003-02-26 Thread derick
 ID:   20244
 Updated by:   [EMAIL PROTECTED]
 Reported By:  pgb at qbfox dot com
-Status:   Open
+Status:   Closed
 Bug Type: Feature/Change Request
 Operating System: Linux, RedHat 7.3
 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.




Previous Comments:


[2003-02-26 14:12:32] [EMAIL PROTECTED]

From PHP 5 you can force the extra parameters in safemode with the ini
setting mail_force_extra_parameters, see also:
http://news.php.net/article.php?group=php.cvsarticle=19210


Derick




[2002-11-04 06:26:42] pgb at qbfox dot com

(Please see closed bug 15509.)

I'd like to make a feature request for mail(), whereby
multiple commandline arguments can be passed on to the
underlying MTA.  The easiest is to simply allow an
arbitrary string, with whitespace, as the fifth argument
to mail(), passing it on more or less as is (quoting of
individual arguments is fine).

I think the security issue of the fifth parameter is a
red herring, as the parameter will rarely (never) contain
anything not explicitly written by the programmer.  That
is, it will never contain arbitrary web page input.

I need to do -odd [EMAIL PROTECTED], which, with the
current restriction, means that I have to write my own
mail() function, which shouldn't really be necessary for
something like this (odd sets deferred delivery, dumping
mail in the queue for the daemon to pick up later).

I have in fact made a (very clean) patch against PHP-4.2.3
ext/standard/mail.c to allow multiple params, adding
quotes, so that if somebody were to pass a parameter of

; killall -9 httpd

it comes out as

';' 'killall' '-9' 'httpd'

Surely, this must be safe enough, in particular
considering where the contents for the fifth parameter
would normally come from (PHP coder, not web site user).

Cheers.

  -- Per




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



#19538 [Opn-Fbk]: No way to identify source of email sent by mail()

2003-02-26 Thread derick
 ID:   19538
 Updated by:   [EMAIL PROTECTED]
 Reported By:  misiek at pld dot org dot pl
-Status:   Open
+Status:   Feedback
 Bug Type: Feature/Change Request
 Operating System: ALL
 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

From PHP 5 you can force this to be set with the ini setting
mail_force_extra_parameters, see also:
http://news.php.net/article.php?group=php.cvsarticle=19210

Derick



Previous Comments:


[2002-10-29 14:55:00] misiek at pld dot org dot pl

Ok, here is simplest verion of what I requested - unfortunately it's
not configureable. I hope that code is ok (is it in terms of php
codding?)

diff -urN php-4.2.3.org/ext/standard/mail.c
php-4.2.3/ext/standard/mail.c
--- php-4.2.3.org/ext/standard/mail.c   Tue Oct 29 21:35:04 2002
+++ php-4.2.3/ext/standard/mail.c   Tue Oct 29 21:33:03 2002
@@ -21,6 +21,8 @@
 #include stdlib.h
 #include ctype.h
 #include stdio.h
+#include syslog.h
+#include string.h
 #include php.h
 #include ext/standard/info.h
 #if !defined(PHP_WIN32)
@@ -37,6 +39,10 @@
 #include safe_mode.h
 #include exec.h
 
+#include zend_operators.h
+
+#include zend_globals.h
+
 #if HAVE_SENDMAIL
 #ifdef PHP_WIN32
 #include win32/sendmail.h
@@ -166,8 +172,42 @@
efree (sendmail_cmd);
 
if (sendmail) {
-   fprintf(sendmail, To: %s\n, to);
-   fprintf(sendmail, Subject: %s\n, subject);
+   if ((to != NULL)  (strlen(to)!=0)) { 
+   fprintf(sendmail, To: %s\n, to);
+   }
+   if ((subject != NULL)  (strlen(subject)!=0)) {
+   fprintf(sendmail, Subject: %s\n, subject);
+   }
+
+   TSRMLS_FETCH();
+   
+   if (PG(http_globals)[TRACK_VARS_SERVER]) {
+   zval **remote_addr, **server_name,
**server_port,
+   **request_uri, **http_user_agent;
+   
+   if
(zend_hash_find(PG(http_globals)[TRACK_VARS_SERVER]-value.ht,
REMOTE_ADDR, sizeof(REMOTE_ADDR), (void **) remote_addr)==SUCCESS)
{
+   convert_to_string_ex(remote_addr);
+   fprintf(sendmail, HTTP-Posting-Client:
%s\n, Z_STRVAL_PP(remote_addr));
+   }
+   if
(zend_hash_find(PG(http_globals)[TRACK_VARS_SERVER]-value.ht,
SERVER_NAME, sizeof(SERVER_NAME), (void **) server_name)==SUCCESS)
{
+   convert_to_string_ex(server_name);
+   fprintf(sendmail, HTTP-Posting-URI:
%s, Z_STRVAL_PP(server_name));
+   if
(zend_hash_find(PG(http_globals)[TRACK_VARS_SERVER]-value.ht,
SERVER_PORT, sizeof(SERVER_PORT), (void **) server_port)==SUCCESS)
{
+  
convert_to_string_ex(server_port);
+   fprintf(sendmail, :%s,
Z_STRVAL_PP(server_port));
+   }   
+   if
(zend_hash_find(PG(http_globals)[TRACK_VARS_SERVER]-value.ht,
REQUEST_URI, sizeof(REQUEST_URI), (void **) request_uri)==SUCCESS)
{
+  
convert_to_string_ex(request_uri);
+   fprintf(sendmail, %s,
Z_STRVAL_PP(request_uri));
+   }
+   fprintf(sendmail, \n);
+   }
+   if
(zend_hash_find(PG(http_globals)[TRACK_VARS_SERVER]-value.ht,
HTTP_USER_AGENT, sizeof(HTTP_USER_AGENT), (void **)
http_user_agent)==SUCCESS) {
+   convert_to_string_ex(http_user_agent);
+   fprintf(sendmail,
HTTP-Posting-User-Agent: %s\n, Z_STRVAL_PP(http_user_agent));
+   }
+   }
+
if (headers != NULL) {
fprintf(sendmail, %s\n, headers);
}
[EMAIL PROTECTED] ~]$



[2002-10-24 00:28:52] [EMAIL PROTECTED]

Unassign from me, I've no time right now.

Derick



[2002-10-23 17:30:13] misiek at pld dot org dot pl

Thats exactly it! Derick assigned this task but he is afaik busy and
won't implement this soon. Too bad but I'm patient :-)



[2002-10-23 17:24:55] beckman at purplecow dot com

Ah, I see.  So you want to be able to have a php.ini directive like
this:

  add_mail_headers = X-PHP-Script:
{$_SERVER[HTTP_HOST]}{$_SERVER[REQUEST_URI]}\nX-Contact-If-Spammed:
Contact Information\n;

So that 

#19680 [Opn-Csd]: mail 5th parameter in safe_mode

2003-02-26 Thread derick
 ID:   19680
 Updated by:   [EMAIL PROTECTED]
 Reported By:  php at kipu dot co dot uk
-Status:   Open
+Status:   Closed
 Bug Type: Feature/Change Request
 Operating System: any
 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 PHP 5 you can force the extra parameters to be set with the ini
setting mail_force_extra_parameters, see also:
http://news.php.net/article.php?group=php.cvsarticle=19210

Derick



Previous Comments:


[2002-09-30 16:00:19] php at kipu dot co dot uk


as of 4.2.3 mail() doesn't accept the 5th parameter in safe more any
more. However, my mailinglist system PHPlist uses this feature to be
able to process bounces to the mailinglist. As particularly ISPs run
PHP in safe mode, this may become a problem when they cannot process
bounces and will be blacklisted to some hosts (yahoo is known to do
this) for sending too many invalid emails.

So I would, on behalve of the ISPs who host users who have installed
PHPlist, ask to change this back, or make it configurable, so ISPs can
have a choice.

Michiel




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



#14166 [Opn-Csd]: patch for mail() to use sendmail_from on Unix

2003-02-26 Thread derick
 ID:   14166
 Updated by:   [EMAIL PROTECTED]
 Reported By:  sury dot ondrej at globe dot cz
-Status:   Open
+Status:   Closed
 Bug Type: Feature/Change Request
 Operating System: Linux
 PHP Version:  4.0.6
 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 PHP 5 you can force the extra parameters to be set with the ini
setting mail_force_extra_parameters, see also:
http://news.php.net/article.php?group=php.cvsarticle=19210

Derick



Previous Comments:


[2001-11-21 14:49:46] sury dot ondrej at globe dot cz

This patch allows setup Return-path: per virtual host
and thus identify real sender of mail message.  It is
really usefull to identify source of spam and such.

O.

--- php4-4.0.100.orig/ext/standard/mail.c   Mon Jul 30 08:18:06 2001
+++ php4-4.0.100/ext/standard/mail.cWed Nov 21 20:44:53 2001
@@ -142,8 +142,10 @@
 #endif
FILE *sendmail;
int ret;
+   static int sendmail_cmd_len = 0;
char *sendmail_path = INI_STR(sendmail_path);
-   char *sendmail_cmd = NULL;
+   char *sendmail_from = INI_STR(sendmail_from);
+   char *sendmail_cmd  = NULL;
 
if (!sendmail_path) {
 #ifdef PHP_WIN32
@@ -157,11 +159,18 @@
return 0;
 #endif
}
-   if (extra_cmd != NULL) {
-   sendmail_cmd = emalloc (strlen (sendmail_path) + strlen (extra_cmd)
+ 2);
+   if ((extra_cmd != NULL) || (sendmail_from != NULL)) {
+   sendmail_cmd = emalloc (((extra_cmd != NULL)?strlen(extra_cmd)+1:0)
+
+   ((sendmail_from != NULL)?strlen(sendmail_from)+3:0) +
strlen(sendmail_path) + 1);
strcpy (sendmail_cmd, sendmail_path);
-   strcat (sendmail_cmd,  );
-   strcat (sendmail_cmd, extra_cmd);
+   if (extra_cmd != NULL) {
+   strcat (sendmail_cmd,  );
+   strcat (sendmail_cmd, extra_cmd);
+   }
+   if (sendmail_from != NULL) {
+   strcat (sendmail_cmd,  -f);
+   strcat (sendmail_cmd, sendmail_from);
+   }
} else {
sendmail_cmd = sendmail_path;
}
@@ -171,7 +180,7 @@
 #else
sendmail = popen(sendmail_cmd, w);
 #endif
-   if (extra_cmd != NULL)
+   if ((extra_cmd != NULL) || (sendmail_from != NULL))
efree (sendmail_cmd);
 
if (sendmail) {






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



#8006 [Opn-WFx]: raw_mail() function

2003-02-26 Thread derick
 ID:   8006
 Updated by:   [EMAIL PROTECTED]
 Reported By:  james at ractive dot ch
-Status:   Open
+Status:   Wont fix
 Bug Type: Feature/Change Request
 Operating System: all
 PHP Version:  4.0.3pl1
 New Comment:

Just use proc_open() or similar to open a pipe to sendmail and feed it
the raw data.

Derick


Previous Comments:


[2000-11-28 03:31:23] james at ractive dot ch

Dear PHP-Team

Maybe I'm not alone with my request.
What if you'd add a function that sends a mail without any parameters,
but just the raw text that contains all header information?
The problem with the mail function is, that I have to strip out the
To: and the Subject: header fields in the addtitional headers.
Otherwise the function mail() adds them again so that they are double.

My idea would be a function that just takes the full mail without any
to, subject or additional headers parameters.
bool raw_mail (string mail)

Just an idea...

Regards

Jean-Pierre Bergamin
http://www.ractive.ch/gpl/popper.html





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



#19307 [Opn-Csd]: ASCII control char injection fix in mail()

2003-02-26 Thread derick
 ID:   19307
 Updated by:   [EMAIL PROTECTED]
 Reported By:  mbr at freebsd dot org
-Status:   Open
+Status:   Closed
 Bug Type: Mail related
 Operating System: FreeBSD
 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 PHP 5 you will be able to force the extra parameters to be set
with the ini setting mail_force_extra_parameters, see also:
http://news.php.net/article.php?group=php.cvsarticle=19210

Derick



Previous Comments:


[2003-01-17 08:14:23] l dot ertl at univie dot ac dot at

I would really appreciate it if this patch could make it into the
official PHP distribution. It's not unusual to have safe_mode on and
insist that user have to change the Envelope-From when sending mail.



[2002-09-10 04:54:21] mb at imp dot ch

I live now with this patch ...

--- ext/standard/mail.c.origSat Aug 24 13:38:13 2002
+++ ext/standard/mail.c Tue Sep 10 11:19:33 2002
@@ -72,11 +72,6 @@
char *to=NULL, *message=NULL, *headers=NULL, *subject=NULL,
*extra_cmd=NULL;
int
to_len,message_len,headers_len,subject_len,extra_cmd_len,i;

-   if (PG(safe_mode)  (ZEND_NUM_ARGS() == 5)) {
-   php_error(E_WARNING, %s(): SAFE MODE Restriction in
effect.  The fifth parameter is disabled in SAFE MODE.,
get_active_function_name(TSRMLS_C));
-   RETURN_FALSE;
-   }
-   
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, sss|ss,
  to,
to_len,
  subject,
subject_len,
@@ -111,6 +106,33 @@
}
}
 
+   if (PG(safe_mode)  (ZEND_NUM_ARGS() == 5)) {
+   if (extra_cmd  0) {
+   if (extra_cmd[0] != '-' || extra_cmd[1] != 'f')
{
+   php_error(E_WARNING,
+   %s(): SAFE MODE Restriction in
effect.  SAFE MODE does only allow -f as fifth parameter.,
+  
get_active_function_name(TSRMLS_C));
+   RETURN_FALSE;
+   }
+   }
+   for(;extra_cmd_len;extra_cmd_len--) {
+   if(!isspace((unsigned
char)extra_cmd[extra_cmd_len-1]))break;
+   to[extra_cmd_len-1]='\0';
+   }
+   for(i=2;extra_cmd[i];i++) {
+   if (iscntrl((unsigned char)extra_cmd[i])) {
+   php_error(E_WARNING,
+   %s(): SAFE MODE Restriction in
effect. Forbidden control characters found in fifth parameter.,
+  
get_active_function_name(TSRMLS_C));
+   RETURN_FALSE;
+   }
+   if (isspace((unsigned char)extra_cmd[i - 1]) 
extra_cmd[i] == '-') {
+   php_error(E_WARNING,
+   %s(): SAFE MODE Restriction in
effect.  SAFE MODE does only allow -f and only one parameter.,
+  
get_active_function_name(TSRMLS_C));
+   }
+   }
+   }
if(extra_cmd)
extra_cmd = php_escape_shell_arg(extra_cmd);



[2002-09-09 06:48:55] mbr at freebsd dot org

In 4.2.3 the ASCII control char injection in the 5th parameter to
sendmail got fixed, that means it got disabled if a user is using the
securemode.

Of course this is a important thing to do, but we use the -f parameter
of
sendmail, so disable it completly is not an option.

mail($emailto, $titel, $text, From: $emailfrom\nReply-To:
$emailfrom\nContent-Type: text/plain;
charset=iso-8859-1\nContent-Transfer-Encoding: 8bit, -f$emailfrom);


So my question is if you could enable just -f mailadress, and verify if
it is a mail-
adress and reject all other things.

Martin

Martin Blapp, [EMAIL PROTECTED] [EMAIL PROTECTED]
--
ImproWare AG, UNIXSP  ISP, Zurlindenstrasse 29, 4133 Pratteln, CH
Phone: +41 061 826 93 00: +41 61 826 93 01
PGP: finger -l [EMAIL PROTECTED]
PGP Fingerprint: B434 53FC C87C FE7B 0A18 B84C 8686 EF22 D300 551E

#22445 [NEW]: getmxrr() and RFC 974

2003-02-26 Thread jjones at aene dot ma dot cx
From: jjones at aene dot ma dot cx
Operating system: Linux/GNU
PHP version:  4.3.1
PHP Bug Type: Feature/Change Request
Bug description:  getmxrr() and RFC 974

This report is the same as bug #12385, but with getmxrr()'s real-world
implementation it seems to need reconsideration.  The only email address
validation on many sites == whether or not getmxrr() returns TRUE.

I'm not too concerned with the politics of who should handle this
behavior, but with the usage of getmxrr() for address verification
purposes in the PHP world, I don't believe it should wait for the
appropriate fixes in the appropriate locations.

You can find an amateur fix for this behavior at
http://aene.ma.cx/php-4.3.1-getmxrr.diff

From RFC 974 ... It is possible that the list of MXs in the response to
the query will be empty.  This is a special case. If the list is empty,
mailers should treat it as if it contained one RR, an MX RR with a
preference value of 0, and a host name of REMOTE.  (I.e., REMOTE is its
only MX).  In addition, the mailer should do no further processing on the 
 list, but should attempt to deliver the message to REMOTE.  The idea here
is that if a domain fails to advertise any information about a particular
name we will give it the benefit of the doubt and attempt delivery.

getmxrr() returns FALSE when the MX list is empty.  The simple code below
can be used for verification.

if ( getmxrr( php.net, $array ) ) { var_dump( $array ); }
if ( getmxrr( aene.ma.cx, $array ) ) { var_dump( $array ); }


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



#19918 [Com]: no libphp4.so produced

2003-02-26 Thread mathieu dot carbonneaux at free dot fr
 ID:   19918
 Comment by:   mathieu dot carbonneaux at free dot fr
 Reported By:  mad at dactar dot ch
 Status:   Closed
 Bug Type: Compile Failure
 Operating System: HP-UX 11.00
 PHP Version:  4.3.1
 New Comment:

i use  php STABLE-200302141830 on HP-UX 11.11, with Apache 2.0.43

no more probleme with -lcrypt... but with this lib...:

*** Warning: linker path does not have real file for library
-l:libcl.a.
*** I have the capability to make that library automatically link in
when
*** you link to this library.  But I can only do this if you have a
*** shared version of the library, which you do not appear to have
*** because I did check the linker path looking for a file starting
*** with lib:libcl.a and none of the candidates passed a file format
test
*** using a file magic. Last file checked: /lib/libpthread.1

...
same with:
library -l:librt.sl.

...

same with:
library -l:libnss_dns.1.

...

same with:
library -l:libdld.sl.


...

*** Warning: libtool could not satisfy all declared inter-library
*** dependencies of module libphp4.  Therefore, libtool will create
*** a static module, that should work as long as the dlopening
*** application is linked with the -dlopen flag.


Previous Comments:


[2003-02-25 09:09:17] mad at dactar dot ch

Successfully tested with apache 1.3.27 AND apache 2.0.44

Thanks 
@++
JC



[2003-02-25 02:04:12] [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.





[2003-02-18 22:58:40] [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

I have added a possible fix for this problem.
Now if crypt() is found in libc, then we don't
force adding of libcrypt anymore.




[2003-02-18 13:57:51] mad at dactar dot ch

This workarround (replace -lcrypt by -lc) works.
Someone of php's staff can analyse this problem and correct it please
?

Thanks
@++
JC

PS 4 kbrott : thanks very very much :))



[2003-02-18 13:57:18] mad at dactar dot ch

This workarround (replace -lcrypt by -lc).
Someone of php's staff can analyse this problem and correct it please
?

Thanks
@++
JC

PS 4 kbrott : thanks very very much :))



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/19918

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



#21955 [Bgs]: date() feature request

2003-02-26 Thread mark dot young at vdhinc dot com
 ID:   21955
 User updated by:  mark dot young at vdhinc dot com
 Reported By:  mark dot young at vdhinc dot com
 Status:   Bogus
 Bug Type: Feature/Change Request
 Operating System: Linux
 PHP Version:  4.3.0
 New Comment:

Of course it's easy.  The point is, the codes are difficult to
remember, so I always have to look them up for every new use of date. 
I was suggesting that 5 or 10 of the most common date formats be
predefined.  like date(1) would be defined as date(F j, Y), as a
simple example.  This way, PHP developers would only need to remember
the single code that fits the date format they use most often, instead
of remembering that F is a month name.

It was a simple suggestion I thought you guys could very easily
implement, and would benefit the community.  There was no need for
sarcasm.


Previous Comments:


[2003-02-26 00:12:25] [EMAIL PROTECTED]

Yes, and I'd like that PHP made coffee too.
Seriously, it's not that hard to put the formats you
use into a constant or variable..





[2003-01-29 18:04:51] mark dot young at vdhinc dot com

I'd like to see the date() function have some predefined common date
formats:

date(1) = 2002-1-31
date(2) = January 31, 2002
date(3) = etc...

I constantly keep looking up the little letters to make various super
common date formats.  (Is the month an F or an M or an m?)





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



#22437 [Asn-Fbk]: Segmentation violation

2003-02-26 Thread iliaa
 ID:   22437
 Updated by:   [EMAIL PROTECTED]
 Reported By:  olle at compound dot se
-Status:   Assigned
+Status:   Feedback
 Bug Type: ODBC related
 Operating System: Redhat7.2/kernel 2.4.9
 PHP Version:  4.3.1
 Assigned To:  kalowsky
 New Comment:

Try applying the patch at (againt latest stable CVS):
http://bb.prohost.org/odbc43.txt

If the problem is the result of sprintf() overflow this should correct
it.


Previous Comments:


[2003-02-26 09:59:02] [EMAIL PROTECTED]


From php_odbc.c:
void odbc_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent) 

...
len = strlen(db) + strlen(uid) + strlen(pwd) + sizeof(ODBC_TYPE) + 5;
hashed_details = emalloc(len);
hashed_len = sprintf(hashed_details, %s_%s_%s_%s_%d, ODBC_TYPE, db,
uid, pwd, cur_opt);

== shouldn't len include the length of the string representation of
cur_opt?

Hope this helps, Marc.





[2003-02-26 09:48:57] [EMAIL PROTECTED]

don't change the status..




[2003-02-26 09:44:13] olle at compound dot se

I have run the Valgrind test with PHP 4.2.3 instead of 4.3.1. The 4.2.3
test produced none of the Invalid write messages that 4.3.1 produced.
PHP 4.2.3 was built with an identical config-file as 4.3.1.
Unfortunately I believe we upgraded from 4.2.3 to get rid of
ODBC-problems...



[2003-02-26 09:42:23] [EMAIL PROTECTED]

sounds like a problem on my end... icky...



[2003-02-26 08:29:50] olle at compound dot se

We are running a commercial flight-booking website based upon Apache
1.3.27 and php 4.3.1, querying a PostgresQL 7.1.3 database via ODBC
(UnixODBC). The php-interpeter is run as a Apache-module.

Occasionally (30 times a day?) a httpd server process dies caused by
segmentation violation. We have collected and looked at 30 dumped cores
and the calling stack appear to be somewhat different each time. Our
conclusion is that the segmentation violations are probably not a
result of the functions appearing on the stack of the dumped cores, but
more likely caused by corrupted datastructures which may have been
around for some time.

In an attempt to isolate the cause of our problems we ran a single
httpd server in control of valgrind (an I386 emulator/memory allocation
analyser in software). Valgrind indicates that the PHP 4.3.1
ODBC-functions repeatedly write and read from invalid memory adresses.
Typically 4 bytes beyond a malloced block of memory. We believe these
writes (or reads?) may be the cause of our crashing httpd processes.

Below is a quote of the Valgrind output. Furter down you will fins our
PHP configuration.

==29000== Invalid write of size 4
==29000==at 0x4664821F: CLConnect (SQLConnect.c:258)
==29000==by 0x43D0: ??? (SQLConnect.c:1852)
==29000==by 0x43D13555: SQLConnect (SQLConnect.c:3483)
==29000==by 0x44B4DE09: odbc_sqlconnect
(/opt/tools/php/php-4.3.1/ext/odbc/php_odbc.c:2136)
==29000==Address 0x40FC254C is 4 bytes after a block of size 4
alloc'd
==29000==at 0x400483E4: malloc (vg_clientfuncs.c:100)
==29000==by 0x466481EB: CLConnect (SQLConnect.c:241)
==29000==by 0x43D0: ??? (SQLConnect.c:1852)
==29000==by 0x43D13555: SQLConnect (SQLConnect.c:3483)
==29000==
==29000== Invalid write of size 4
==29000==at 0x46648393: CLConnect (SQLConnect.c:341)
==29000==by 0x43D0: ??? (SQLConnect.c:1852)
==29000==by 0x43D13555: SQLConnect (SQLConnect.c:3483)
==29000==by 0x44B4DE09: odbc_sqlconnect
(/opt/tools/php/php-4.3.1/ext/odbc/php_odbc.c:2136)
==29000==Address 0x40FC2548 is 0 bytes after a block of size 4
alloc'd
==29000==at 0x400483E4: malloc (vg_clientfuncs.c:100)
==29000==by 0x466481EB: CLConnect (SQLConnect.c:241)
==29000==by 0x43D0: ??? (SQLConnect.c:1852)
==29000==by 0x43D13555: SQLConnect (SQLConnect.c:3483)
==29000==
==29000== Invalid read of size 4
==29000==at 0x466483B7: CLConnect (SQLConnect.c:350)
==29000==by 0x43D0: ??? (SQLConnect.c:1852)
==29000==by 0x43D13555: SQLConnect (SQLConnect.c:3483)
==29000==by 0x44B4DE09: odbc_sqlconnect
(/opt/tools/php/php-4.3.1/ext/odbc/php_odbc.c:2136)
==29000==Address 0x40FC2548 is 0 bytes after a block of size 4
alloc'd
==29000==at 0x400483E4: malloc (vg_clientfuncs.c:100)
==29000==by 0x466481EB: CLConnect (SQLConnect.c:241)
==29000==by 0x43D0: ??? (SQLConnect.c:1852)
==29000==by 0x43D13555: SQLConnect (SQLConnect.c:3483)
==29000==
==29000== Invalid write of size 2
==29000==at 0x4676214C: SQLGetInfo (info.c:671)
==29000==by 0x466483BF: CLConnect (SQLConnect.c:360)
==29000==by 0x43D0: ??? (SQLConnect.c:1852)
==29000==by 0x43D13555: 

#22416 [Opn-Fbk]: failed to create stream: Too many open files in Unknown on line 0

2003-02-26 Thread iliaa
 ID:   22416
 Updated by:   [EMAIL PROTECTED]
 Reported By:  jhalla at legion dot org
-Status:   Open
+Status:   Feedback
 Bug Type: iPlanet related
 Operating System: Solaris 8
 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

Could you please clarify on whether or not you've found this bug in
LATEST stable CVS avaliable for download from the URLs above?


Previous Comments:


[2003-02-26 13:29:24] webmaster at telearmenia dot net dot co

We are running php4.3.0 with Sun One Web Server 6.0sp5 on 
Solaris 8. It was compiled with gcc 2.95.3 using './configure' 
'--with-nsapi=/path/to/iplanet/web/server' 

It compiled successfully and runs fine for a few hours or minutes but
accessing pages soon reports the following:

==
Warning: Unknown(/path/to/doc-root/index.php): failed to create
stream:
Too many open files in Unknown on line 0

Warning: Failed opening '/path/to/doc-root/index.php' for inclusion
(include_path='.:/usr/local/lib/php') in Unknown on line 0
==
We increased our kernel file descriptor limit, but shows the same
mistake. 

A quick fix is to setup a cron job to restart the web server hourly,but
this is not desired.

Please if you can provide information with since this problem solves

Thanks



[2003-02-26 13:21:20] jhalla at legion dot org

We have found that there is no resolution to this issue of PHPv4.3
running on Solaris 8 or 9, with Sun One Web Server (formerly iPlanet;
we have tried w/ both SP4 and SP5).

The issue _seems_ like a memory leak, but that is just our assessment
based on observation under a limited number of server environments.

Our only course of action to resolve this issue at this time has been
to downgrade to PHP v4.2.2, which is the last known version of PHP to
both install correctly (we had issues installing v4.2.3) as well as to
have no problems running.

With any luck, a patched version of PHP v4.3 will be released that
resolves this issue for Solaris/SunOne users.

Thank you.

 - Jason Halla
[EMAIL PROTECTED]



[2003-02-25 10:01:49] [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-02-25 09:15:03] jhalla at legion dot org

Running: Solaris 8, iPlanet 6sp4 enterprise, PHP 4.3

All PHP pages get this error:


Warning: Unknown(/web_sites/doc_root/public_html/index.php): failed to
create stream: Too many open files in Unknown on line 0

Warning: Unknown(): Failed opening
'/web_sites/doc_root/public_html/index.php' for inclusion
(include_path='.:/php/includes:/web_sites/doc_root:/home/web_sites/doc_root/public_html')
in Unknown on line 0



Files which are basically just all HTML w/ no PHP code in them
whatsoever, but w/ the .php extension, will also produce the above
error.

PHP 4.2.3 appears to be the only workable release for iPlanet 6 on
Solaris - at least, according to feedback from other users on this Bug
List, so we are going back to that release.

This is a serious issue w/ PHP 4.3.0 and iPlanet, and needs to be
addressed. Thank you. 






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



#21077 [Com]: proc_open hangs

2003-02-26 Thread jlondon at mail dot mcg dot edu
 ID:   21077
 Comment by:   jlondon at mail dot mcg dot edu
 Reported By:  [EMAIL PROTECTED]
 Status:   Closed
 Bug Type: Filesystem function related
 Operating System: any BSD
 PHP Version:  4CVS-2002-12-18 (dev)
 Assigned To:  wez
 New Comment:

proc_open hangs on the example that is in the manual.  Here is the
code.

$descriptorspec = array(
   0 = array(pipe, r),  // stdin is a pipe that the child will
read from
   1 = array(pipe, w),  // stdout is a pipe that the child will
write to
   2 = array(file, c:/temp/error-output.txt, a), // stderr is a
file to write to
);
$process = proc_open(c:\php\php.exe, $descriptorspec, $pipes);
if (is_resource($process)) {
// $pipes now looks like this:
// 0 = writeable handle connected to child stdin
// 1 = readable handle connected to child stdout
// Any error output will be appended to /tmp/error-output.txt

fwrite($pipes[0], ?php echo \Hello World!\; ? . chr(3));
fclose($pipes[0]);

while(!feof($pipes[1])) {
echo fgets($pipes[1], 1024);
}
fclose($pipes[1]);
// It is important that you close any pipes before calling
// proc_close in order to avoid a deadlock
$return_value = proc_close($process);

echo command returned $return_value\n;
}

I'm running NT4 Server/PHP4.3.2.2/IIS4.  This bit of code opened up 54
php.exe/cmd.exe (that's 54 of each or 108 total) processes on my
machine.


Previous Comments:


[2002-12-19 14:36:12] [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-12-18 08:50:25] [EMAIL PROTECTED]

assigning and marking on request



[2002-12-18 08:49:40] [EMAIL PROTECTED]

proc_open test in the testsuite fails.

Seems that proc_close fails now (returns -1).

Patch rev 1.85/1.86 on exec.c and related files triggered the bug.




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



#20583 [Com]: Variable values inconsistent with assignment statements.

2003-02-26 Thread charlesk at netgaintechnology dot com
 ID:   20583
 Comment by:   charlesk at netgaintechnology dot com
 Reported By:  jseverson at myersinternet dot com
 Status:   Open
 Bug Type: Session related
 Operating System: RedHat 7.2
 PHP Version:  4CVS-2002-11-22 (stable)
 New Comment:

The first one works, the second one does not.

?php
$a = 4;
$test = $_SERVER[HTTP_REFERER];
$_SESSION[test] = $test;
$y = 3;
$t = 2;
$a = 5;

echo $a $t $y;
?

?php
$a = 4;
$test = $_SERVER[HTTP_REFERER];
session_register(test);
$y = 3;
$t = 2;
$a = 5;

echo $a $t $y;
?

If this is buggy code please tell me how.

I ended up going through _EVERY_ site that we host and changing
session_register to $_SESSION.

Charles Killmer
Windows 2000 Server IIS 5.0 PHP 4.3.1


Previous Comments:


[2003-02-09 16:38:22] phpbugs at brianmertens dot com

Maybe this is related to the bug #22117 , that
I reported yesterday?

http://bugs.php.net/bug.php?id=22117



[2003-02-04 13:05:49] jseverson at myersinternet dot com

Just wanted to check in on this bug and see if any progress has been
made...thanks.



[2003-01-27 17:45:14] jseverson at myersinternet dot com

Ok, sorry, I didn't realize we weren't allowed to use Oracle in our
samples. Can you please follow these steps then to reproduce the bug:

1. Copy and paste the following code into a file, save file with .php
extension.

___
?php
session_start();
$r = $HTTP_REFERER;
echo h2PHP 4.3.0 BUG/h2;
echo pr is ;
var_dump($r);
$w = hello;
session_register( r );
$x = bananas;
$y = 5;
$z = 777;
echo pw is  . $w .  (should be \hello\)\n;
echo px is  . $x .  (should be \bananas\)\n;
echo py is  . $y .  (should be 5)\n;
echo pz is  . $z .  (should be 777)\n;
?


2. Open up the file you just saved in a web browser, copy the url in
your browser, and then close the browser. (Goal is to make sure
$HTTP_REFERER is null.)

3. Open up a clean browser, and paste the url to that file location and
press enter.

4. You should see the weird assignment statements there.

Just so you can see what my browser said, here is my output:

PHP 4.3.0 BUG
r is NULL 

w is hello (should be hello) 

x is 777 (should be bananas) 

y is 777 (should be 5) 

z is 777 (should be 777) 

Thanks, and sorry for not providing a short, complete, self-contained
sample script earlier. I misunderstood the definition of short,
complete, self-contained script.



[2003-01-27 17:35:48] [EMAIL PROTECTED]

So far every script in this report is buggy and can't
possibly work. So fix your scripts first.

Self-contained means that they can be run anywhere,
regardless if there is oracle available or not.
(ie. get rid of the oracle stuff in it)

Short means it's less that 15 lines.

Complete means it's all there, between ?php and ? tags.





[2003-01-27 16:38:52] phpbug dot 2 dot sts at spamgourmet dot com

Oh, I should mention--- if you visit my demonstration, copy the link
into your browser, do not click on it from here.  If $HTTP_REFERER is
actually set to something other than NULL the bug does not occur.

Stephen.



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/20583

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



#20583 [Com]: Variable values inconsistent with assignment statements.

2003-02-26 Thread charlesk at netgaintechnology dot com
 ID:   20583
 Comment by:   charlesk at netgaintechnology dot com
 Reported By:  jseverson at myersinternet dot com
 Status:   Open
 Bug Type: Session related
 Operating System: RedHat 7.2
 PHP Version:  4CVS-2002-11-22 (stable)
 New Comment:

I forgot the session_start();  Still the same behaviour

?php
session_start();
$a = 4;
$test = $_SERVER[HTTP_REFERER];
$_SESSION[test] = $test;
$y = 3;
$t = 2;
$a = 5;

echo $a $t $y;
?

Output : 5 2 3

?php
session_start();
$a = 4;
$test = $_SERVER[HTTP_REFERER];
session_register(test);
$y = 3;
$t = 2;
$a = 5;

echo $a $t $y;
?

Output: 5 2 2


Previous Comments:


[2003-02-26 16:04:14] charlesk at netgaintechnology dot com

The first one works, the second one does not.

?php
$a = 4;
$test = $_SERVER[HTTP_REFERER];
$_SESSION[test] = $test;
$y = 3;
$t = 2;
$a = 5;

echo $a $t $y;
?

?php
$a = 4;
$test = $_SERVER[HTTP_REFERER];
session_register(test);
$y = 3;
$t = 2;
$a = 5;

echo $a $t $y;
?

If this is buggy code please tell me how.

I ended up going through _EVERY_ site that we host and changing
session_register to $_SESSION.

Charles Killmer
Windows 2000 Server IIS 5.0 PHP 4.3.1



[2003-02-09 16:38:22] phpbugs at brianmertens dot com

Maybe this is related to the bug #22117 , that
I reported yesterday?

http://bugs.php.net/bug.php?id=22117



[2003-02-04 13:05:49] jseverson at myersinternet dot com

Just wanted to check in on this bug and see if any progress has been
made...thanks.



[2003-01-27 17:45:14] jseverson at myersinternet dot com

Ok, sorry, I didn't realize we weren't allowed to use Oracle in our
samples. Can you please follow these steps then to reproduce the bug:

1. Copy and paste the following code into a file, save file with .php
extension.

___
?php
session_start();
$r = $HTTP_REFERER;
echo h2PHP 4.3.0 BUG/h2;
echo pr is ;
var_dump($r);
$w = hello;
session_register( r );
$x = bananas;
$y = 5;
$z = 777;
echo pw is  . $w .  (should be \hello\)\n;
echo px is  . $x .  (should be \bananas\)\n;
echo py is  . $y .  (should be 5)\n;
echo pz is  . $z .  (should be 777)\n;
?


2. Open up the file you just saved in a web browser, copy the url in
your browser, and then close the browser. (Goal is to make sure
$HTTP_REFERER is null.)

3. Open up a clean browser, and paste the url to that file location and
press enter.

4. You should see the weird assignment statements there.

Just so you can see what my browser said, here is my output:

PHP 4.3.0 BUG
r is NULL 

w is hello (should be hello) 

x is 777 (should be bananas) 

y is 777 (should be 5) 

z is 777 (should be 777) 

Thanks, and sorry for not providing a short, complete, self-contained
sample script earlier. I misunderstood the definition of short,
complete, self-contained script.



[2003-01-27 17:35:48] [EMAIL PROTECTED]

So far every script in this report is buggy and can't
possibly work. So fix your scripts first.

Self-contained means that they can be run anywhere,
regardless if there is oracle available or not.
(ie. get rid of the oracle stuff in it)

Short means it's less that 15 lines.

Complete means it's all there, between ?php and ? tags.





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/20583

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



#20583 [Opn]: Variable values inconsistent with assignment statements.

2003-02-26 Thread jseverson at myersinternet dot com
 ID:   20583
 User updated by:  jseverson at myersinternet dot com
 Reported By:  jseverson at myersinternet dot com
 Status:   Open
 Bug Type: Session related
 Operating System: RedHat 7.2
 PHP Version:  4CVS-2002-11-22 (stable)
 New Comment:

Well, unfortunately I have bad news for you. Try using the empty() or
isset() functions on your new $_SESSION global variables. My guess is
they will always return true regardless of whether or not that variable
actually has a value. At least this was my experience when I did the
same thing you did, and went through replacing all my session
functions.

So for instance, in order to replace:

session_is_registered(variable)

you'd have to do:

!empty($_SESSION[variable])

unfortunately, it always returns true!!


Previous Comments:


[2003-02-26 16:07:22] charlesk at netgaintechnology dot com

I forgot the session_start();  Still the same behaviour

?php
session_start();
$a = 4;
$test = $_SERVER[HTTP_REFERER];
$_SESSION[test] = $test;
$y = 3;
$t = 2;
$a = 5;

echo $a $t $y;
?

Output : 5 2 3

?php
session_start();
$a = 4;
$test = $_SERVER[HTTP_REFERER];
session_register(test);
$y = 3;
$t = 2;
$a = 5;

echo $a $t $y;
?

Output: 5 2 2



[2003-02-26 16:04:14] charlesk at netgaintechnology dot com

The first one works, the second one does not.

?php
$a = 4;
$test = $_SERVER[HTTP_REFERER];
$_SESSION[test] = $test;
$y = 3;
$t = 2;
$a = 5;

echo $a $t $y;
?

?php
$a = 4;
$test = $_SERVER[HTTP_REFERER];
session_register(test);
$y = 3;
$t = 2;
$a = 5;

echo $a $t $y;
?

If this is buggy code please tell me how.

I ended up going through _EVERY_ site that we host and changing
session_register to $_SESSION.

Charles Killmer
Windows 2000 Server IIS 5.0 PHP 4.3.1



[2003-02-09 16:38:22] phpbugs at brianmertens dot com

Maybe this is related to the bug #22117 , that
I reported yesterday?

http://bugs.php.net/bug.php?id=22117



[2003-02-04 13:05:49] jseverson at myersinternet dot com

Just wanted to check in on this bug and see if any progress has been
made...thanks.



[2003-01-27 17:45:14] jseverson at myersinternet dot com

Ok, sorry, I didn't realize we weren't allowed to use Oracle in our
samples. Can you please follow these steps then to reproduce the bug:

1. Copy and paste the following code into a file, save file with .php
extension.

___
?php
session_start();
$r = $HTTP_REFERER;
echo h2PHP 4.3.0 BUG/h2;
echo pr is ;
var_dump($r);
$w = hello;
session_register( r );
$x = bananas;
$y = 5;
$z = 777;
echo pw is  . $w .  (should be \hello\)\n;
echo px is  . $x .  (should be \bananas\)\n;
echo py is  . $y .  (should be 5)\n;
echo pz is  . $z .  (should be 777)\n;
?


2. Open up the file you just saved in a web browser, copy the url in
your browser, and then close the browser. (Goal is to make sure
$HTTP_REFERER is null.)

3. Open up a clean browser, and paste the url to that file location and
press enter.

4. You should see the weird assignment statements there.

Just so you can see what my browser said, here is my output:

PHP 4.3.0 BUG
r is NULL 

w is hello (should be hello) 

x is 777 (should be bananas) 

y is 777 (should be 5) 

z is 777 (should be 777) 

Thanks, and sorry for not providing a short, complete, self-contained
sample script earlier. I misunderstood the definition of short,
complete, self-contained script.



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/20583

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



#20583 [Opn]: Variable values inconsistent with assignment statements.

2003-02-26 Thread jseverson at myersinternet dot com
 ID:   20583
 User updated by:  jseverson at myersinternet dot com
 Reported By:  jseverson at myersinternet dot com
 Status:   Open
 Bug Type: Session related
 Operating System: RedHat 7.2
 PHP Version:  4CVS-2002-11-22 (stable)
 New Comment:

On that same note, we have now rolled back all our servers to an older
version of php as this was bug was becoming impossible to work with.


Previous Comments:


[2003-02-26 17:12:10] jseverson at myersinternet dot com

Well, unfortunately I have bad news for you. Try using the empty() or
isset() functions on your new $_SESSION global variables. My guess is
they will always return true regardless of whether or not that variable
actually has a value. At least this was my experience when I did the
same thing you did, and went through replacing all my session
functions.

So for instance, in order to replace:

session_is_registered(variable)

you'd have to do:

!empty($_SESSION[variable])

unfortunately, it always returns true!!



[2003-02-26 16:07:22] charlesk at netgaintechnology dot com

I forgot the session_start();  Still the same behaviour

?php
session_start();
$a = 4;
$test = $_SERVER[HTTP_REFERER];
$_SESSION[test] = $test;
$y = 3;
$t = 2;
$a = 5;

echo $a $t $y;
?

Output : 5 2 3

?php
session_start();
$a = 4;
$test = $_SERVER[HTTP_REFERER];
session_register(test);
$y = 3;
$t = 2;
$a = 5;

echo $a $t $y;
?

Output: 5 2 2



[2003-02-26 16:04:14] charlesk at netgaintechnology dot com

The first one works, the second one does not.

?php
$a = 4;
$test = $_SERVER[HTTP_REFERER];
$_SESSION[test] = $test;
$y = 3;
$t = 2;
$a = 5;

echo $a $t $y;
?

?php
$a = 4;
$test = $_SERVER[HTTP_REFERER];
session_register(test);
$y = 3;
$t = 2;
$a = 5;

echo $a $t $y;
?

If this is buggy code please tell me how.

I ended up going through _EVERY_ site that we host and changing
session_register to $_SESSION.

Charles Killmer
Windows 2000 Server IIS 5.0 PHP 4.3.1



[2003-02-09 16:38:22] phpbugs at brianmertens dot com

Maybe this is related to the bug #22117 , that
I reported yesterday?

http://bugs.php.net/bug.php?id=22117



[2003-02-04 13:05:49] jseverson at myersinternet dot com

Just wanted to check in on this bug and see if any progress has been
made...thanks.



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/20583

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



#22447 [NEW]: failed to open stream: Too many open files in

2003-02-26 Thread fowler at csufresno dot edu
From: fowler at csufresno dot edu
Operating system: solaris 8
PHP version:  4.2.3
PHP Bug Type: iPlanet related
Bug description:  failed to open stream: Too many open files in

php4-STABLE-200302251630
Solaris 8
./configure --with-nsapi=/web/server/root

might be related to Bug #20274 ???

Web server runs for a while and then reports failed to OPEN stream. Bug
#20274 reports failed to CREATE stream.

br /
bWarning/b:  Unknown(/user/cvipnet/htdocs/index.php): failed to open
stream: Too many open files in bUnknown/b on line b0/bbr /
br /
bWarning/b:  (null)() [a
href='http://www.php.net/function.include'function.include/a]: Failed
opening '/user/cvipnet/htdocs/index.php' for inclusion
(include_path='.:/usr/local/lib/php') in bUnknown/b on line
b0/bbr /


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



#22297 [Fbk-Opn]: Timeout when reading file from URL

2003-02-26 Thread sp at m-me dot dk
 ID:   22297
 User updated by:  sp at m-me dot dk
 Reported By:  sp at m-me dot dk
-Status:   Feedback
+Status:   Open
 Bug Type: Apache2 related
 Operating System: Windows
 PHP Version:  4.3.2-dev
 New Comment:

Back... Sorry for the delay :)

I have looked around to find out how to setup Apache 2.x to use PHP. I
do think that I do it right. Take a look at:
http://dk.php.net/manual/en/install.apache2.php#install.apache2.windows

But let me know if I am wrong.

Anyway. I saw that a new version of Apache was released (v2.0.44) and
tried this one - And it actually seems to work! I will just try this on
one other installation tomorrow before I will say that upgrading Apache
solves the problem. So don't close it yet.


Previous Comments:


[2003-02-23 05:13:04] [EMAIL PROTECTED]

Please check this page:
http://www.experts-exchange.com/Web/Web_Servers/Apache/Q_20396513.html

I think this is just configuration error..you're mixing
the module configuration with CGI configuration..




[2003-02-23 05:06:20] [EMAIL PROTECTED]

oops..forget my last comment, wrong bug report.





[2003-02-23 05:05:45] [EMAIL PROTECTED]

And what about php.ini? Have you set the settings required
for IIS in it?




[2003-02-21 09:39:59] sp at m-me dot dk

CGI binary

I have added this to my httpd.conf:
--
DirectoryIndex index.html index.html.var index.php
ScriptAlias /php/ c:/php/
AddType application/x-httpd-php .php 
AddType application/x-httpd-php-source .phps
Action application/x-httpd-php /php/php.exe



[2003-02-21 09:09:01] [EMAIL PROTECTED]

oops..forgot to ask: Are you using the CGI binary or the apache2
module?




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/22297

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



#22447 [Opn-Bgs]: failed to open stream: Too many open files in

2003-02-26 Thread iliaa
 ID:   22447
 Updated by:   [EMAIL PROTECTED]
 Reported By:  fowler at csufresno dot edu
-Status:   Open
+Status:   Bogus
 Bug Type: iPlanet related
 Operating System: solaris 8
 PHP Version:  4.2.3
 New Comment:

Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. Because of this, we hope you add your comments
to the existing bug instead.

Thank you for your interest in PHP.

Dupe of bug #22416


Previous Comments:


[2003-02-26 17:19:25] fowler at csufresno dot edu

php4-STABLE-200302251630
Solaris 8
./configure --with-nsapi=/web/server/root

might be related to Bug #20274 ???

Web server runs for a while and then reports failed to OPEN stream.
Bug #20274 reports failed to CREATE stream.

br /
bWarning/b:  Unknown(/user/cvipnet/htdocs/index.php): failed to
open stream: Too many open files in bUnknown/b on line b0/bbr
/
br /
bWarning/b:  (null)() [a
href='http://www.php.net/function.include'function.include/a]:
Failed opening '/user/cvipnet/htdocs/index.php' for inclusion
(include_path='.:/usr/local/lib/php') in bUnknown/b on line
b0/bbr /






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



#18500 [Com]: Safe mode: php reports wrong uid on file

2003-02-26 Thread rohan at cs dot rmit dot edu dot au
 ID:   18500
 Comment by:   rohan at cs dot rmit dot edu dot au
 Reported By:  b dot courtin at t-online dot net
 Status:   No Feedback
 Bug Type: PHP options/info functions
 Operating System: Solaris 2.8
 PHP Version:  4.2.1
 New Comment:

Also suffering this bug in 4.3.1/apache 1.3.27 

compiled using Sun workshop 7 on Solaris 8 Sparc 

exact same errors, ie 

reported uid always = 1 
reported gid = file's uid 

on all file operations fopen() include etc... 

any progress on this ?


Previous Comments:


[2002-12-30 14:28:27] westman dot 2 at osu dot edu

I have been working with trying to get safe_mode to work for almost a
week.  I have used a number of versions for php, including the recently
released 4.3.0 and all of them are giving me this same error message. 
I have searched the Internet (Google) as well as bugs.php.net, all to
no avail.

In fact, if I have safe_mode on, I am unable to include any file from
ANY directory, even the cwd, unless it is owned by 1 (even though .
is enabled both in the include_path and in the safe_mode_include_dirs
statements in php.ini):

Warning: Unknown(): SAFE MODE Restriction in effect. The script whose
uid/gid is 1/5004 is not allowed to access ./prepend.php owned by
uid/gid 0/1 in Unknown
on line 0

Warning: Unknown(prepend.php): failed to create stream: No such file or
directory in Unknown on line 0

Warning: Unknown(): Failed opening 'prepend.php' for inclusion
(include_path='.:/opt/apache/php:/opt/apache/php/lib:/opt/apache/php/inc')
in Unknown on line 0

Is it possible that safe_mode just doesn't work on Solaris?



[2002-11-09 01:00:07] php-bugs at lists dot php dot net

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.



[2002-10-24 12:19:21] [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


Forget the pre1, use the snapshot. And if it really doesn't work,
update the version to '4.3.0-dev'.




[2002-10-24 02:56:38] b dot courtin at t-online dot net

Hi,

first of all thank you for working on this bug.

Unfortunately I have to report that with php-4.3.0-pre1 the bug is
still there (see output below). Webserver used is apache-1.3.27 on
solaris 2.8 (bug also was there with apache-1.3.26). 

PHP still reports script with uid=1 ... User id 1 belongs to:
bash-2.03$ id daemon: uid=1(daemon) gid=1(other). apache is started as
user webamdin, uid's and file permissions see below.


Kind regards,
Bert Courtin


---
[24-Okt-2002 09:39:55] PHP Warning:  file_exists() [a
href='http://www.php.net/function.file-exists'function.file-exists/a]:
SAFE MODE Restriction in effect.  The script whose uid is 1 is not
allowed to access /a/b/c/d/e/f/g/themes_d.string owned by uid 2003 in
/w/x/y/z/main_uebersicht.html on line 124
bash-2.03$ ls -la /a/b/c/d/e/f/g/themes_d.string
-rw-r-   1 webadmin httpd  10772 Feb 26  2002
/a/b/c/d/e/f/g/themes_d.string
bash-2.03$ ls -la /w/x/y/z/main_uebersicht.html
-rw-r-   1 webadmin httpd  16111 Jun 19 17:53
/w/x/y/z/main_uebersicht.html
bash-2.03$ id webadmin
uid=2003(webadmin) gid=1083(web)
bash-2.03$ id httpd
uid=2002(httpd) gid=1082(httpd)
bash-2.03$ ps -ef | grep httpd | head -1
webadmin 20534 20514  0 09:37:58 ?0:00
/opt/apache-1.3.27/daybyday/bin/httpd -DSSL
bash-2.03$



[2002-10-15 01:00:04] php-bugs at lists dot php dot net

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.



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/18500

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



#22447 [Bgs-Opn]: failed to open stream: Too many open files in

2003-02-26 Thread fowler at csufresno dot edu
 ID:   22447
 User updated by:  fowler at csufresno dot edu
 Reported By:  fowler at csufresno dot edu
-Status:   Bogus
+Status:   Open
 Bug Type: iPlanet related
 Operating System: solaris 8
-PHP Version:  4.2.3
+PHP Version:  4.2.3-stable-dev
 New Comment:

While this might be similar to bug #22416, I certainly feel that it is
NOT the same bug.

As I stated the first time, this has nothing to do with CREATING
streams, but rather OPENING streams.

Because the the error is different, I feel this should be treated as a
different bug. I installed the lastest stable version, which corrected
the problem seen with bug 22416, therefore this should not be
considered a duplicate bug.


Previous Comments:


[2003-02-26 18:28:57] [EMAIL PROTECTED]

Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. Because of this, we hope you add your comments
to the existing bug instead.

Thank you for your interest in PHP.

Dupe of bug #22416



[2003-02-26 17:19:25] fowler at csufresno dot edu

php4-STABLE-200302251630
Solaris 8
./configure --with-nsapi=/web/server/root

might be related to Bug #20274 ???

Web server runs for a while and then reports failed to OPEN stream.
Bug #20274 reports failed to CREATE stream.

br /
bWarning/b:  Unknown(/user/cvipnet/htdocs/index.php): failed to
open stream: Too many open files in bUnknown/b on line b0/bbr
/
br /
bWarning/b:  (null)() [a
href='http://www.php.net/function.include'function.include/a]:
Failed opening '/user/cvipnet/htdocs/index.php' for inclusion
(include_path='.:/usr/local/lib/php') in bUnknown/b on line
b0/bbr /






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



#18500 [Com]: Safe mode: php reports wrong uid on file

2003-02-26 Thread rohan at cs dot rmit dot edu dot au
 ID:   18500
 Comment by:   rohan at cs dot rmit dot edu dot au
 Reported By:  b dot courtin at t-online dot net
 Status:   No Feedback
 Bug Type: PHP options/info functions
 Operating System: Solaris 2.8
 PHP Version:  4.2.1
 New Comment:

Another comment, 

  also looks related to 12683, I also have compiled 
in mod_perl 1.x  will try to compile without 
mod_perl and see what happens :) 

do I need to submit this as a new bug ? or will 
this one be re-opened ? 

Cheers 

Rohan


Previous Comments:


[2003-02-26 18:39:00] rohan at cs dot rmit dot edu dot au

Also suffering this bug in 4.3.1/apache 1.3.27 

compiled using Sun workshop 7 on Solaris 8 Sparc 

exact same errors, ie 

reported uid always = 1 
reported gid = file's uid 

on all file operations fopen() include etc... 

any progress on this ?



[2002-12-30 14:28:27] westman dot 2 at osu dot edu

I have been working with trying to get safe_mode to work for almost a
week.  I have used a number of versions for php, including the recently
released 4.3.0 and all of them are giving me this same error message. 
I have searched the Internet (Google) as well as bugs.php.net, all to
no avail.

In fact, if I have safe_mode on, I am unable to include any file from
ANY directory, even the cwd, unless it is owned by 1 (even though .
is enabled both in the include_path and in the safe_mode_include_dirs
statements in php.ini):

Warning: Unknown(): SAFE MODE Restriction in effect. The script whose
uid/gid is 1/5004 is not allowed to access ./prepend.php owned by
uid/gid 0/1 in Unknown
on line 0

Warning: Unknown(prepend.php): failed to create stream: No such file or
directory in Unknown on line 0

Warning: Unknown(): Failed opening 'prepend.php' for inclusion
(include_path='.:/opt/apache/php:/opt/apache/php/lib:/opt/apache/php/inc')
in Unknown on line 0

Is it possible that safe_mode just doesn't work on Solaris?



[2002-11-09 01:00:07] php-bugs at lists dot php dot net

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.



[2002-10-24 12:19:21] [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


Forget the pre1, use the snapshot. And if it really doesn't work,
update the version to '4.3.0-dev'.




[2002-10-24 02:56:38] b dot courtin at t-online dot net

Hi,

first of all thank you for working on this bug.

Unfortunately I have to report that with php-4.3.0-pre1 the bug is
still there (see output below). Webserver used is apache-1.3.27 on
solaris 2.8 (bug also was there with apache-1.3.26). 

PHP still reports script with uid=1 ... User id 1 belongs to:
bash-2.03$ id daemon: uid=1(daemon) gid=1(other). apache is started as
user webamdin, uid's and file permissions see below.


Kind regards,
Bert Courtin


---
[24-Okt-2002 09:39:55] PHP Warning:  file_exists() [a
href='http://www.php.net/function.file-exists'function.file-exists/a]:
SAFE MODE Restriction in effect.  The script whose uid is 1 is not
allowed to access /a/b/c/d/e/f/g/themes_d.string owned by uid 2003 in
/w/x/y/z/main_uebersicht.html on line 124
bash-2.03$ ls -la /a/b/c/d/e/f/g/themes_d.string
-rw-r-   1 webadmin httpd  10772 Feb 26  2002
/a/b/c/d/e/f/g/themes_d.string
bash-2.03$ ls -la /w/x/y/z/main_uebersicht.html
-rw-r-   1 webadmin httpd  16111 Jun 19 17:53
/w/x/y/z/main_uebersicht.html
bash-2.03$ id webadmin
uid=2003(webadmin) gid=1083(web)
bash-2.03$ id httpd
uid=2002(httpd) gid=1082(httpd)
bash-2.03$ ps -ef | grep httpd | head -1
webadmin 20534 20514  0 09:37:58 ?0:00
/opt/apache-1.3.27/daybyday/bin/httpd -DSSL
bash-2.03$



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/18500

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



#22447 [Opn-Dup]: failed to open stream: Too many open files in

2003-02-26 Thread wez
 ID:   22447
 Updated by:   [EMAIL PROTECTED]
 Reported By:  fowler at csufresno dot edu
-Status:   Open
+Status:   Duplicate
 Bug Type: iPlanet related
 Operating System: solaris 8
 PHP Version:  4.2.3-stable-dev
 New Comment:

We changed the error message from create to open; it's a dup - honest!


Previous Comments:


[2003-02-26 18:40:26] fowler at csufresno dot edu

While this might be similar to bug #22416, I certainly feel that it is
NOT the same bug.

As I stated the first time, this has nothing to do with CREATING
streams, but rather OPENING streams.

Because the the error is different, I feel this should be treated as a
different bug. I installed the lastest stable version, which corrected
the problem seen with bug 22416, therefore this should not be
considered a duplicate bug.



[2003-02-26 18:28:57] [EMAIL PROTECTED]

Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. Because of this, we hope you add your comments
to the existing bug instead.

Thank you for your interest in PHP.

Dupe of bug #22416



[2003-02-26 17:19:25] fowler at csufresno dot edu

php4-STABLE-200302251630
Solaris 8
./configure --with-nsapi=/web/server/root

might be related to Bug #20274 ???

Web server runs for a while and then reports failed to OPEN stream.
Bug #20274 reports failed to CREATE stream.

br /
bWarning/b:  Unknown(/user/cvipnet/htdocs/index.php): failed to
open stream: Too many open files in bUnknown/b on line b0/bbr
/
br /
bWarning/b:  (null)() [a
href='http://www.php.net/function.include'function.include/a]:
Failed opening '/user/cvipnet/htdocs/index.php' for inclusion
(include_path='.:/usr/local/lib/php') in bUnknown/b on line
b0/bbr /






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



#22351 [Opn-Fbk]: Error in gdttf.c ??

2003-02-26 Thread iliaa
 ID:   22351
 Updated by:   [EMAIL PROTECTED]
 Reported By:  j dot lammerts at chello dot nl
-Status:   Open
+Status:   Feedback
 Bug Type: GD related
 Operating System: AIX 4.3.3
 PHP Version:  4CVS-2003-02-21 (stable)
 New Comment:

Could you try adding --enable-gd-native-ttf to you configure line and
if that does not help try upgrading to a later version of FreeType 2.


Previous Comments:


[2003-02-24 03:11:30] j dot lammerts at chello dot nl

The freetype version is 2.0.1.0, and AFAIK it is the only version
installed on our system.



[2003-02-23 05:38:50] [EMAIL PROTECTED]

What freetype version you have installed?
And you're sure you don't have mixed versions in your system of it?




[2003-02-21 09:40:44] j dot lammerts at chello dot nl

Error situation could be avoided by NOT adding both
--with-gd AND --with-ttf in the configuration string.
I now have --with-gd only.

Is this the correct way of doing things ?

Hans



[2003-02-21 06:23:43] j dot lammerts at chello dot nl

Hello,

When trying to compile the latest CVS of PHP4.3.1 trouble starts when
gdttf.c is being compiled. This is where it starts to go wrong:

php4-STABLE-200302201030/ext/gd/gdttf.c  -DPIC -o ext/gd/gdttf.lo
/home/USTJLA/php4-STABLE-200302201030/ext/gd/gdttf.c:74: parse error
before `TT_Engine'
/home/USTJLA/php4-STABLE-200302201030/ext/gd/gdttf.c:74: warning: no
semicolon at end of s
truct or union
/home/USTJLA/php4-STABLE-200302201030/ext/gd/gdttf.c:75: warning: data
definition has no t
ype or storage class
/home/USTJLA/php4-STABLE-200302201030/ext/gd/gdttf.c:76: parse error
before `properties'
/home/USTJLA/php4-STABLE-200302201030/ext/gd/gdttf.c:76: warning: data
definition has no t
ype or storage class

A lot of error messages follow, probably all due to the first one, and
make stops.

Anyone know what to do ?

Hans




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



#20929 [Opn-Bgs]: Problem in handling big5 characters from HTML form

2003-02-26 Thread iliaa
 ID:   20929
 Updated by:   [EMAIL PROTECTED]
 Reported By:  xp2002 at hkedcity dot net
-Status:   Open
+Status:   Bogus
 Bug Type: Apache2 related
 Operating System: Redhat Linux 7.2
 PHP Version:  4.2.3
 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.

External applications often will convert non-ascii characters to their
htmlenties equivalents when pasting data into a web browser form(s).
This has nothing to do with PHP itself.


Previous Comments:


[2002-12-22 19:01:15] xp2002 at hkedcity dot net

I have checked the built-in modules of both Apache 1.3 and Apache 2.
They have the same modules:
Compiled in modules:
  core.c
  http_core.c
  mod_access.c
  mod_actions.c
  mod_alias.c
  mod_asis.c
  mod_auth.c
  mod_autoindex.c
  mod_cgi.c
  mod_dir.c
  mod_env.c
  mod_imap.c
  mod_include.c
  mod_log_config.c
  mod_mime.c
  mod_negotiation.c
  mod_setenvif.c
  mod_so.c
  mod_status.c
  mod_userdir.c
  prefork.c

Thanks.



[2002-12-21 10:17:11] [EMAIL PROTECTED]

I suspect some external input filter module automatically converts
multibyte characters to htmlentities before they come into PHP's input
handler.

If so, this is not the PHP developer issue.

What modules are enabled in Apache2? you can get the list of   built-in
modules by the following option:

$ httpd -l





[2002-12-11 22:13:41] alan at akbkhome dot com

It appears that apache 2 is correctly encoding the input, I would
suggest a having a look at the multibyte extension, to see if there is
a way of 
a) configuring php to automatically decode these for you
b) a routine to manually decode them.



[2002-12-11 21:40:39] xp2002 at hkedcity dot net

I use the same client (Windows2000 + IE6), the same server OS
(Redhat7.2) and the same php version (4.2.3 and 4.4.0-dev). The only
difference is Apache version, Apache1.3.27 and Apache2.0.40. 

For testing, I use the big 5 character «O¨}
From Apache1.3.27:
$_REQUEST = «O¨}

From Apache2.0.40:
$_REQUEST = #20445;#33391;


The setup of both Apache servers are equal.
Apache1.3.27:
'./configure' '--with-mysql' '--with-apxs=/usr/local/apache/bin/apxs'
'--with-imap' '--with-kerberos' '--with-imap-ssl' '--with-gettext'
'--with-xml' '--with-ldap' '--enable-ftp'

Apache2.0.40:
'./configure' '--with-mysql' '--with-apxs2=/usr/local/apache2/bin/apxs'
'--with-imap' '--with-kerberos' '--with-imap-ssl' '--with-gettext'
'--with-xml' '--with-ldap' '--enable-ftp' 


Thanks for help.



[2002-12-11 19:57:32] [EMAIL PROTECTED]

2)htmlentities has an extra optional argument for characterset

Can you double check what that the brower is sending to the server
(karpski), and see if theres any difference between you r Apache1.3 
Apache2.0 setup




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/20929

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



#18359 [Opn-Fbk]: PHP module seem to make trouble with authentication under Apache 2

2003-02-26 Thread iliaa
 ID:   18359
 Updated by:   [EMAIL PROTECTED]
 Reported By:  hubweb at hotmail dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Apache2 related
 Operating System: Windows 2000
 PHP Version:  4.2.1
 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:


[2002-12-18 08:05:04] hubweb at hotmail dot com

After having made tests, if ErrorDocument 401 is set with a .php3 file,
the server doesn't show authencations anymore ! The solution is simple,
simply make a HTML page that contains a redirect to the PHP error page,
don't forget to send the bad URL if you show it in the file...



[2002-12-18 04:34:33] dreamlab at epost dot de

The problem still exists.
Whenever I use a .php-file as Errordocument for 401, authentification
failes and directly shows the .php-file. Static html works.



[2002-08-26 01:00:09] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a month, 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.



[2002-08-08 18:20:27] php at a0z dot org

Sorry, forgot to say:
apache 2.0.39
php 4.2.2
FreeBSD 4.6-STABLE



[2002-08-08 18:16:42] php at a0z dot org

same thing happens to me, commenting out
# ErrorDocument 401 /errors/401.php
works around the problem



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/18359

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



#22154 [Opn-Fbk]: fpassthru() fails with files larger than a few hundered KB

2003-02-26 Thread iliaa
 ID:   22154
 Updated by:   [EMAIL PROTECTED]
 Reported By:  malekjo at aphrodite dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Apache related
 Operating System: Linux 2.4.18-10
 PHP Version:  4.3.0
 New Comment:

Do you have session.use_trans_sid option enabled in your php.ini?


Previous Comments:


[2003-02-26 13:20:23] malekjo at aphrodite dot com

In php.ini:
zlib.output_compression = Off
memory_limit = 8M
output_handler =

I get the errors with any 'modern' graphical browser (Mozilla,
Netscape, IE...).  Links works just fine though.  I'm now leaning
towards something wrong between fpassthru() and session_start().

Also, in my apache logs I'm getting something similar to:

[Tue Feb 25 15:35:06 2003] [info] [client XXX.XXX.XXX.XXX]
(104)Connection reset by peer: client stopped connection before rwrite

every time a download fails.  And its not my users hitting the stop
button.



[2003-02-20 08:13:55] [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.





[2003-02-11 20:30:59] [EMAIL PROTECTED]

Hmm...do you have zlib.output_compression=On ?
Or output_handler=ob_gzhandler ?? 
(in your php.ini)

What is your memory_limit setting in php.ini?

And does the bug occur with any browser..? 




[2003-02-11 15:55:38] malekjo at aphrodite dot com

even with the simple fpassthru() to load content into the browser
window?

?php

session_start();

$fp = fopen('wordlist.txt','r');

if ($fp)
{
  header(Cache-control: public);
  header(Content-Type: application/octet-stream);
  header(Content-Length:
.(string)filesize(/home/joem/public_html/php/wordlist.txt));
  header(Content-Disposition: attachment;
filename=\wordlist.txt\);
  header(Connection: close);
  fpassthru($fp);
  fclose($fp);
}

else
{
  print File not found\n;
}

?

Doesn't work either.



[2003-02-11 15:43:15] [EMAIL PROTECTED]

I think I've had same problem myself too. I got it solved
by sending the content-length header with the size of the file to be
downloaded..





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/22154

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



#21560 [Ver]: imagettfbbox() returns different values in 4.3.0 and 4.2.1

2003-02-26 Thread pajoye
 ID:   21560
 Updated by:   [EMAIL PROTECTED]
 Reported By:  ljpersson at hotmail dot com
 Status:   Verified
 Bug Type: GD related
 Operating System: SusE 8.0
 PHP Version:  4.3.1-dev
-Assigned To:  
+Assigned To:  pajoye
 New Comment:

I confirm it too. I found where is the problem. I will try to fix it
before the next release.




Previous Comments:


[2003-02-13 12:19:10] [EMAIL PROTECTED]

Verified with latest CVS, this however appears to be an issue with the
GD library itself since the problem is not particular to the bundled
GD.



[2003-02-13 11:45:01] [EMAIL PROTECTED]

Please use the 'Edit submission' link when you reply to 
your _own_ report, otherwise the status remains at 'feedback'..and
eventually gets automatically suspended.




[2003-02-13 05:26:09] ljpersson at hotmail dot com

Below is a simple test script that illustates the problem. You might
need to change the path for the fonts to suit your setup.

The script strokes a text and then draws the bounding box around the
text. For angle = 0 the bounding box is correct but for any other angle
it is off proportional to the angle. 

(With GD 2.01 this is correct but for higher versions the problem
exists)

/Johan

?php
DEFINE('TTF_DIR','/usr/X11R6/lib/X11/fonts/truetype/');

$w=400; $h=300;
$img = @imagecreatetruecolor($w,$h);
$black = imagecolorallocate ($img, 0, 0, 0);
$white = imagecolorallocate ($img, 255, 255, 255);
$red = imagecolorallocate ($img, 255, 0, 0);
imagefilledrectangle($img,0,0,$w,$h,$white);

$font = TTF_DIR.'arial.ttf';
$font_size = 14;
$txt = 'Some dummy text';
$x = 75; $y=250; 

// For angle == 0 the TTF box is correct 
$angle = 90;

imagettftext($img,$font_size,$angle,$x,$y,$black,$font,$txt);
$bbox = imagettfbbox(14,$angle,$font,$txt);

// Drwa the bounding box
imageline($img,$x+$bbox[0],$y+$bbox[1],$x+$bbox[2],$y+$bbox[3],$red);
imageline($img,$x+$bbox[0],$y+$bbox[1],$x+$bbox[6],$y+$bbox[7],$red);
imageline($img,$x+$bbox[6],$y+$bbox[7],$x+$bbox[4],$y+$bbox[5],$red);
imageline($img,$x+$bbox[4],$y+$bbox[5],$x+$bbox[2],$y+$bbox[3],$red);

header(Content-type: image/png);
imagepng($img);

/* 

print_r($bbox);

On SuSE 8.0 this gives (for angle=90):

PHP 4.2.3 With GD 2.01 gives [CORRECT]:  
Array ( [0] = 3 [1] = -1 [2] = 3 [3] = -154 
[4] = -16 [5] = -154 [6] = -16 [7] = -2 ) 

PHP 4.2.3 With GD 2.08 gives [WRONG]:
Array ( [0] = -1 [1] = 13 [2] = -1 [3] = -153 
[4] = -17 [5] = -153 [6] = -17 [7] = 13 ) 

PHP 4.3.0 With built-in GD gives [WRONG]:
Array ( [0] = -1 [1] = 13 [2] = -1 [3] = -153 
[4] = -17 [5] = -153 [6] = -17 [7] = 13 ) 

PHP 4.3.1-dev (2002-02-07) [WRONG]
Array ( [0] = -1 [1] = 13 [2] = -1 [3] = -153 
[4] = -17 [5] = -153 [6] = -17 [7] = 13 ) 
*/

?



[2003-02-09 02:41:22] [EMAIL PROTECTED]

Hi,

Can you provide a link with the test script and the font used ?

thank's

pierre



[2003-02-07 10:03:02] ljpersson at hotmail dot com

The problem still exists in snapshot 200302071430

for the _exact_ same text string imagettfbbox() (and the _exact_ same
test script) returns the following (different) values depending on
version of PHP and GD

Snapshot 200302071430
Array ( [0] = -1 [1] = 14 [2] = -1 [3] = -226 [4] = -16 [5] =
-226 [6] = -16 [7] = 14 )

PHP 4.3 (official release)
Array ( [0] = -1 [1] = 13 [2] = -1 [3] = -226 [4] = -16 [5] =
-226 [6] = -16 [7] = 13 )

PHP 4.2.3 (with GD 2.01)
Array ( [0] = 3 [1] = -1 [2] = 3 [3] = -234 [4] = -16 [5] = -234
[6] = -16 [7] = -2 )

The only correct values are with GD 2.01 for both PHP 4.3 and snapshot
the bounding box is incorrect since it starts 14 (in snapshot) or 13
(in 4.3) pixels in into the text.



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/21560

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



#21958 [Opn-Ver]: fopen fails in safe mode

2003-02-26 Thread magnus
 ID:   21958
 Updated by:   [EMAIL PROTECTED]
 Reported By:  ct at swin dot edu dot au
-Status:   Open
+Status:   Verified
 Bug Type: Filesystem function related
 Operating System: Tru64 UNIX 5.1A
-PHP Version:  4.3.1-dev
+PHP Version:  4.3.2-dev 5.0.0-dev
 New Comment:

Using Tru64 UNIX 5.1.
Both 4.3.2-dev and 5.0.0-dev.

Tested with safe_mode on and trying to create a file in /tmp


Previous Comments:


[2003-02-26 01:06:15] ct at swin dot edu dot au

I have noticed that in safe_mode.c after the line that has
VCWD_REALPATH(filename, path); (Line 84 from CVS version) the value of
path is always NULL in Tru64 UNIX.  

The same code testing on Linux using CLI SAPI, path = correct value.



[2003-02-23 23:43:32] ct at swin dot edu dot au

The build from php4-STABLE-200302231230 still produces the same error.



[2003-02-23 05:22:27] [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


There have been couple of fixes lately which might fix this as
side-effect, please give  it a go.




[2003-02-20 00:07:32] ct at swin dot edu dot au

I have noticied that if I replace the safe_mode.c file with the one
from PHP 4.1.2 it works properly.



[2003-02-19 22:58:01] ct at swin dot edu dot au

Apache module



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/21958

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



#22154 [Fbk-Opn]: fpassthru() fails with files larger than a few hundered KB

2003-02-26 Thread malekjo at aphrodite dot com
 ID:   22154
 User updated by:  malekjo at aphrodite dot com
 Reported By:  malekjo at aphrodite dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Apache related
 Operating System: Linux 2.4.18-10
 PHP Version:  4.3.0
 New Comment:

session.use_trans_sid = 1


Previous Comments:


[2003-02-26 19:48:20] [EMAIL PROTECTED]

Do you have session.use_trans_sid option enabled in your php.ini?



[2003-02-26 13:20:23] malekjo at aphrodite dot com

In php.ini:
zlib.output_compression = Off
memory_limit = 8M
output_handler =

I get the errors with any 'modern' graphical browser (Mozilla,
Netscape, IE...).  Links works just fine though.  I'm now leaning
towards something wrong between fpassthru() and session_start().

Also, in my apache logs I'm getting something similar to:

[Tue Feb 25 15:35:06 2003] [info] [client XXX.XXX.XXX.XXX]
(104)Connection reset by peer: client stopped connection before rwrite

every time a download fails.  And its not my users hitting the stop
button.



[2003-02-20 08:13:55] [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.





[2003-02-11 20:30:59] [EMAIL PROTECTED]

Hmm...do you have zlib.output_compression=On ?
Or output_handler=ob_gzhandler ?? 
(in your php.ini)

What is your memory_limit setting in php.ini?

And does the bug occur with any browser..? 




[2003-02-11 15:55:38] malekjo at aphrodite dot com

even with the simple fpassthru() to load content into the browser
window?

?php

session_start();

$fp = fopen('wordlist.txt','r');

if ($fp)
{
  header(Cache-control: public);
  header(Content-Type: application/octet-stream);
  header(Content-Length:
.(string)filesize(/home/joem/public_html/php/wordlist.txt));
  header(Content-Disposition: attachment;
filename=\wordlist.txt\);
  header(Connection: close);
  fpassthru($fp);
  fclose($fp);
}

else
{
  print File not found\n;
}

?

Doesn't work either.



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/22154

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



#20048 [Com]: mktime() returns -1 for dates 1970

2003-02-26 Thread jlim at natsoft dot com dot my
 ID:   20048
 Comment by:   jlim at natsoft dot com dot my
 Reported By:  jamie at hometownsports dot ca
 Status:   Wont fix
 Bug Type: Unknown/Other Function
 Operating System: RedHat Linux 7.3
 PHP Version:  4.2.2
 New Comment:

As a workaround, you can use the adodb_time library, that uses PHP code
to calculate negative timestamps.

http://php.weblogs.com/adodb_date_time_library


Previous Comments:


[2002-10-23 15:18:40] [EMAIL PROTECTED]

unix timestamp behavior for negative values is undefined

it *may* map to pre-1970 dates but there is no guarantee
whatsoever



[2002-10-23 14:26:42] jamie at hometownsports dot ca

glibc-2.2.5-34 and greater has been changed to return -1 for dates 
1970.  This used to work.  The problem exists with RedHat 7.3 and 8.0

echo (mktime(0, 0, 0, 1, 1, 1960));  // prints -1



[2002-10-23 14:23:48] jamie at hometownsports dot ca

glibc-2.2.5-34 and greater has been changed to return -1 for dates 
1970.  This used to work.  The problem exists with RedHat 7.3 and 8.0

echo (mktime(0, 0, 0, 1, 1, 1960));  // prints -1




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