#41072 [Opn]: Make instanceof work without the need of creating the object first

2007-04-29 Thread stas
 ID:   41072
 Updated by:   [EMAIL PROTECTED]
 Reported By:  atomo64 at gmail dot com
 Status:   Open
 Bug Type: Feature/Change Request
 Operating System: Linux 2.6.18 SMP i686
 PHP Version:  5.2.1
 New Comment:

I'd suggest you use reflection for this:
http://www.php.net/reflection


Previous Comments:


[2007-04-13 00:49:11] atomo64 at gmail dot com

Description:

At the moment instanceof requires the first 'parameter' to be an object
of the class which is to be compared.
It would be useful to be able to check without creating the object.

Reproduce code:
---
?php
class MyClass {}

$class = 'MyClass';

var_dump($class instanceof MyClass);
var_dump($$class instanceof MyClass);
var_dump(MyClass instanceof MyClass);
?

Expected result:

bool(false)
bool(true)
bool(true)

Actual result:
--
bool(false)
bool(false)
bool(false)





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


#41137 [Bgs]: is_a() for interfaces

2007-04-29 Thread stas
 ID:   41137
 Updated by:   [EMAIL PROTECTED]
 Reported By:  amadeusz dot jasak at gmail dot com
 Status:   Bogus
 Bug Type: Feature/Change Request
 Operating System: -
 PHP Version:  5.2.1
 New Comment:

I think reflection extension allows to do such checks.


Previous Comments:


[2007-04-19 15:18:18] amadeusz dot jasak at gmail dot com

So, maybe new function for checking interface implementation for
classes?? Like bool is_implementing(mixed $class_or_object, string
$interface)



[2007-04-19 15:01:33] [EMAIL PROTECTED]

quoting the manual (http://php.net/is_a):

bool is_a ( object $object, string $class_name )

Checks if the given object is of this class or has this class as one 
of its parents.

'foo' is not an object (it is a string), and therefore is_a() 
returns false.

is_a('foo', 'foo')

is also false for the same reason.



[2007-04-19 06:31:39] amadeusz dot jasak at gmail dot com

Description:

is_a function will be works if first argument is class name and next
argument is interface name. Currently it isn't working... I can't check
for class (not object) is implementing some interface

Reproduce code:
---
?php

inteface factory
{
  public static function _factory($params);
}

class foo implements factory
{
  public static function _factory($params)
  {
$t = new foo();
return $t; // Sweet use of factory ;)
  }
}

var_dump
(
  is_a('foo', 'factory'), // Currently return false, but true is
expected
  is_a($foo = new foo(), 'factory') // It is working but it isn't
practicly
);
?

Expected result:

bool(true)
bool(true)

Actual result:
--
bool(false)
bool(true)





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


#41137 [Bgs]: is_a() for interfaces

2007-04-29 Thread amadeusz dot jasak at gmail dot com
 ID:   41137
 User updated by:  amadeusz dot jasak at gmail dot com
 Reported By:  amadeusz dot jasak at gmail dot com
 Status:   Bogus
 Bug Type: Feature/Change Request
 Operating System: -
 PHP Version:  5.2.1
 New Comment:

Yes, I know, but not everyone has Reflection API, reflection slow...


Previous Comments:


[2007-04-29 12:38:19] [EMAIL PROTECTED]

I think reflection extension allows to do such checks.



[2007-04-19 15:18:18] amadeusz dot jasak at gmail dot com

So, maybe new function for checking interface implementation for
classes?? Like bool is_implementing(mixed $class_or_object, string
$interface)



[2007-04-19 15:01:33] [EMAIL PROTECTED]

quoting the manual (http://php.net/is_a):

bool is_a ( object $object, string $class_name )

Checks if the given object is of this class or has this class as one 
of its parents.

'foo' is not an object (it is a string), and therefore is_a() 
returns false.

is_a('foo', 'foo')

is also false for the same reason.



[2007-04-19 06:31:39] amadeusz dot jasak at gmail dot com

Description:

is_a function will be works if first argument is class name and next
argument is interface name. Currently it isn't working... I can't check
for class (not object) is implementing some interface

Reproduce code:
---
?php

inteface factory
{
  public static function _factory($params);
}

class foo implements factory
{
  public static function _factory($params)
  {
$t = new foo();
return $t; // Sweet use of factory ;)
  }
}

var_dump
(
  is_a('foo', 'factory'), // Currently return false, but true is
expected
  is_a($foo = new foo(), 'factory') // It is working but it isn't
practicly
);
?

Expected result:

bool(true)
bool(true)

Actual result:
--
bool(false)
bool(true)





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



#39216 [Asn]: call_user_func and friends don't accept array($this, func) callback anymore

2007-04-29 Thread stas
 ID:   39216
 Updated by:   [EMAIL PROTECTED]
 Reported By:  hannes dot magnusson at gmail dot com
 Status:   Assigned
 Bug Type: Scripting Engine problem
 Operating System: FreeBSD
 PHP Version:  6CVS-2006-10-20 (CVS)
 Assigned To:  helly
 New Comment:

Can someone enlighten me how the reproduce code is supposed to do
anything? You can't call methods on non-existing objects...


Previous Comments:


[2007-04-23 13:26:34] [EMAIL PROTECTED]

The Zend/tests/bug19859.phpt is still broken, others seem to be fixed.
Marcus, your fcall_info stuff breaks it, please look into it.
I tried to fix it, but got lost in the code you wrote.
zend_call_function() should detect if __call() is used and pass the
real function name as the first param.



[2006-10-21 16:15:43] hannes dot magnusson at gmail dot com

ext/standard/tests/general_functions/bug35229.php

#0  0x083aaf1e in zend_call_function (fci=0xbfbfd010, 
fci_cache=0xbfbfd000, tsrm_ls=0x85742e0) 
at /usr/src/php/6.0/Zend/zend_execute_API.c:957
#1  0x082a3082 in zif_call_user_func (ht=31, 
return_value=0x87f395c, return_value_ptr=0x0, 
this_ptr=0x0, return_value_used=0, tsrm_ls=0x85742e0)

at /usr/src/php/6.0/ext/standard/basic_functions.c:5030
#2  0x083e9da1 in zend_do_fcall_common_helper_SPEC 
(execute_data=0xbfbfd170, tsrm_ls=0x85742e0) at 
zend_vm_execute.h:209
#3  0x083ef52c in ZEND_DO_FCALL_SPEC_CONST_HANDLER 
(execute_data=0xbfbfd170, tsrm_ls=0x85742e0) at 
zend_vm_execute.h:1648
#4  0x083e98d1 in execute (op_array=0x87f19c8, 
tsrm_ls=0x85742e0) at zend_vm_execute.h:92
#5  0x083bee9e in zend_execute_scripts (type=8, 
tsrm_ls=0x85742e0, retval=0x0, file_count=3) 
at /usr/src/php/6.0/Zend/zend.c:1616
#6  0x08356e16 in php_execute_script 
(primary_file=0xbfbfe900, tsrm_ls=0x85742e0) 
at /usr/src/php/6.0/main/main.c:1922
#7  0x084382f3 in main (argc=2, argv=0xbfbfe974) 
at /usr/src/php/6.0/sapi/cli/php_cli.c:1119



[2006-10-21 08:44:38] judas dot iscariote at gmail dot com

reproduced with preg_replace_callback too .. ;-)



[2006-10-20 17:00:35] hannes dot magnusson at gmail dot com

Description:

call_user_func()/array_walk() doesn't accept 
array($obj, func) callback anymore...

(See Zend/tests/bug31720.phpt  Zend/tests/bug19859.phpt)

Reproduce code:
---
?php
$array = array('at least one element');

array_walk($array, array($nonesuchvar,'show'));
?


Expected result:

Notice: Undefined variable: nonesuchvar in %s on line %d

Notice: Non-callable array passed to zend_call_function() 
in %s on line %d

Warning: array_walk(): Unable to call Array() - function 
does not exist in %s on line %d


Actual result:
--
Notice: Undefined variable: nonesuchvar 
in /usr/src/php/6.0/Zend/tests/bug31720.php on line 4

Warning: array_walk() expects parameter 2 to be valid 
callback, array given 
in /usr/src/php/6.0/Zend/tests/bug31720.php on line 4






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


#41137 [Bgs]: is_a() for interfaces

2007-04-29 Thread stas
 ID:   41137
 Updated by:   [EMAIL PROTECTED]
 Reported By:  amadeusz dot jasak at gmail dot com
 Status:   Bogus
 Bug Type: Feature/Change Request
 Operating System: -
 PHP Version:  5.2.1
 New Comment:

I don't think reflection is really much slower than is_a - it adds a
couple of object creations, but that's it. Not sure what you mean by
not everyone has - what could be the reason not to have it?


Previous Comments:


[2007-04-29 12:48:34] amadeusz dot jasak at gmail dot com

Yes, I know, but not everyone has Reflection API, reflection slow...



[2007-04-29 12:38:19] [EMAIL PROTECTED]

I think reflection extension allows to do such checks.



[2007-04-19 15:18:18] amadeusz dot jasak at gmail dot com

So, maybe new function for checking interface implementation for
classes?? Like bool is_implementing(mixed $class_or_object, string
$interface)



[2007-04-19 15:01:33] [EMAIL PROTECTED]

quoting the manual (http://php.net/is_a):

bool is_a ( object $object, string $class_name )

Checks if the given object is of this class or has this class as one 
of its parents.

'foo' is not an object (it is a string), and therefore is_a() 
returns false.

is_a('foo', 'foo')

is also false for the same reason.



[2007-04-19 06:31:39] amadeusz dot jasak at gmail dot com

Description:

is_a function will be works if first argument is class name and next
argument is interface name. Currently it isn't working... I can't check
for class (not object) is implementing some interface

Reproduce code:
---
?php

inteface factory
{
  public static function _factory($params);
}

class foo implements factory
{
  public static function _factory($params)
  {
$t = new foo();
return $t; // Sweet use of factory ;)
  }
}

var_dump
(
  is_a('foo', 'factory'), // Currently return false, but true is
expected
  is_a($foo = new foo(), 'factory') // It is working but it isn't
practicly
);
?

Expected result:

bool(true)
bool(true)

Actual result:
--
bool(false)
bool(true)





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


#41224 [NEW]: Quotes don't work on a program's path.

2007-04-29 Thread boen dot robot at gmail dot com
From: boen dot robot at gmail dot com
Operating system: Windows XP Professional SP2
PHP version:  5CVS-2007-04-29 (snap)
PHP Bug Type: Program Execution
Bug description:  Quotes don't work on a program's path.

Description:

When executing a command with system(), exec(), passthru() or
shell_exec(), quotes in the program's path are not accepted and nothing is
returned (except error code 1). The same command with quotes around the
path works from the command line. Without quotes, the program only works if
there are no spaces in the paths, which is where the real problem lies.

Reproduce code:
---
?php
ini_set('display_errors','On');
ini_set('error_reporting',1);
print system('D:\vasko\Software\XSLT2\saxonsa8-8n\bin\transform.exe -a
D:\htdocs\XML\_benchmark\reference.xml',$status);
print $status;
?
Returns 1 (because of the print $status - otherwise it's an empty
default HTML).

?php
ini_set('display_errors','On');
ini_set('error_reporting',1);
print system('D:\vasko\Software\XSLT2\saxonsa8-8n\bin\transform.exe -a
D:\htdocs\XML\_benchmark\reference.xml',$status);
print $status;
?
Returns the output of the program, and 0 after it. This particular case
works, but if the path had spaces, there would be no way to execute the
program... not withing PHP anyway (a bat file could be a solution, but
still...).

Expected result:

The program should run even if the path to it has quotes and it's output
should be then printed.

Actual result:
--
The first code, when executed results in an error, which wouldn't be
raised with the same command executed directly from the command line.

-- 
Edit bug report at http://bugs.php.net/?id=41224edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=41224r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=41224r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=41224r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=41224r=fixedcvs
Fixed in release: 
http://bugs.php.net/fix.php?id=41224r=alreadyfixed
Need backtrace:   http://bugs.php.net/fix.php?id=41224r=needtrace
Need Reproduce Script:http://bugs.php.net/fix.php?id=41224r=needscript
Try newer version:http://bugs.php.net/fix.php?id=41224r=oldversion
Not developer issue:  http://bugs.php.net/fix.php?id=41224r=support
Expected behavior:http://bugs.php.net/fix.php?id=41224r=notwrong
Not enough info:  
http://bugs.php.net/fix.php?id=41224r=notenoughinfo
Submitted twice:  
http://bugs.php.net/fix.php?id=41224r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=41224r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=41224r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=41224r=dst
IIS Stability:http://bugs.php.net/fix.php?id=41224r=isapi
Install GNU Sed:  http://bugs.php.net/fix.php?id=41224r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=41224r=float
No Zend Extensions:   http://bugs.php.net/fix.php?id=41224r=nozend
MySQL Configuration Error:http://bugs.php.net/fix.php?id=41224r=mysqlcfg


#41225 [NEW]: installation problem

2007-04-29 Thread t_ravilly at hotmail dot com
From: t_ravilly at hotmail dot com
Operating system: windows XP SP2
PHP version:  5.2.1
PHP Bug Type: Unknown/Other Function
Bug description:  installation problem

Description:

during copying files :
the Cabinet File php.cab requiered for this installation is corrupt and
cannot be used.
i tried an installation with apache, and tried without...
(it was the msi file on your download page)
sorry for my english

Expected result:

to have an installation pack who work !! ;)

Actual result:
--
no possible installation

-- 
Edit bug report at http://bugs.php.net/?id=41225edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=41225r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=41225r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=41225r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=41225r=fixedcvs
Fixed in release: 
http://bugs.php.net/fix.php?id=41225r=alreadyfixed
Need backtrace:   http://bugs.php.net/fix.php?id=41225r=needtrace
Need Reproduce Script:http://bugs.php.net/fix.php?id=41225r=needscript
Try newer version:http://bugs.php.net/fix.php?id=41225r=oldversion
Not developer issue:  http://bugs.php.net/fix.php?id=41225r=support
Expected behavior:http://bugs.php.net/fix.php?id=41225r=notwrong
Not enough info:  
http://bugs.php.net/fix.php?id=41225r=notenoughinfo
Submitted twice:  
http://bugs.php.net/fix.php?id=41225r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=41225r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=41225r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=41225r=dst
IIS Stability:http://bugs.php.net/fix.php?id=41225r=isapi
Install GNU Sed:  http://bugs.php.net/fix.php?id=41225r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=41225r=float
No Zend Extensions:   http://bugs.php.net/fix.php?id=41225r=nozend
MySQL Configuration Error:http://bugs.php.net/fix.php?id=41225r=mysqlcfg


#41223 [Opn-Bgs]: PHP should output better HTML for the .phps (highlight source) view

2007-04-29 Thread iliaa
 ID:   41223
 Updated by:   [EMAIL PROTECTED]
 Reported By:  jeremy dot visser at gmail dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Output Control
 Operating System: Ubuntu 7.04
 PHP Version:  5.2.1
 New Comment:

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

The reason there are no headers is because the expectation is that the

output will be embed in an existing page. Presence of the requested 
headers and elements would then cause the page to break.


Previous Comments:


[2007-04-29 09:22:35] jeremy dot visser at gmail dot com

Description:

When PHP outputs highlighted source, the HTML it outputs is ugly. It
looks pretty when viewed in a browser, but the actual HTML is bad.

For starters, it doesn't use a DOCTYPE, and includes no html, head,
or body elements like you'd expect.

Even worse, it preformats the text not with a pre tag like should be
used, but with several nbsp;'s to space text out. What is wrong with
using pre?

Expected result:

Should be using proper HTML headers:

!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN
http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd;
html xmlns=http://www.w3.org/1999/xhtml; xml:lang=en lang=en
head
titletest.phps/title
/head
body
pre class=php
lt;?php
/* This is some PHP */
?gt;
/pre
/body
/html

You see, when you use a pre, you don't need all these nbsp;nbsp;'s
to space things out.


Actual result:
--
Example of ugly code:

span style=color: #BBlt;?phpbr
/nbsp;nbsp;nbsp;nbsp;/spanspan style=color: #FF8000/*br
/nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;Testbr
/nbsp;nbsp;nbsp;nbsp;*/br /?gt;






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


#41215 [Asn-Csd]: setAttribute return code reversed

2007-04-29 Thread iliaa
 ID:   41215
 Updated by:   [EMAIL PROTECTED]
 Reported By:  jerry at gii dot co dot jp
-Status:   Assigned
+Status:   Closed
 Bug Type: PDO related
 Operating System: WinXP Home SP2
 PHP Version:  5.2.1
 Assigned To:  iliaa
 New Comment:

This bug has been fixed in CVS.

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/.
 
Thank you for the report, and for helping us make PHP better.




Previous Comments:


[2007-04-27 17:11:29] jerry at gii dot co dot jp

I purposely didn't show the values of the parameters for the opening of
the data base, but trust me that they are correct.



[2007-04-27 17:09:13] jerry at gii dot co dot jp

Description:

dbh-setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION)

returns FALSE on success and TRUE on failure. This is the reverse of
the documentation (and counter-intuitive).

The data base server is MySQL 4.1.21-standard running on CentOS 3.

Reproduce code:
---
?php
   $dbh = new
PDO(mysql:host=$db_hostname;dbname=$db_name, $db_user_name,
$db_user_pass);
$r_code = $dbh-setAttribute(PDO::ATTR_ERRMODE,
PDO::ERRMODE_EXCEPTION);
$errmode = $dbh-getAttribute(PDO::ATTR_ERRMODE);
echo ($r_code ? TRUE : FALSE) .  |  . $errmode;
?


Expected result:

It should echo

TRUE | 2

Actual result:
--
FALSE | 2





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


#41224 [Opn-Bgs]: Quotes don't work on a program's path.

2007-04-29 Thread sniper
 ID:   41224
 Updated by:   [EMAIL PROTECTED]
 Reported By:  boen dot robot at gmail dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Program Execution
 Operating System: Windows XP Professional SP2
 PHP Version:  5CVS-2007-04-29 (snap)
 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. 

Thank you for your interest in PHP.




Previous Comments:


[2007-04-29 13:13:04] boen dot robot at gmail dot com

Description:

When executing a command with system(), exec(), passthru() or
shell_exec(), quotes in the program's path are not accepted and nothing
is returned (except error code 1). The same command with quotes around
the path works from the command line. Without quotes, the program only
works if there are no spaces in the paths, which is where the real
problem lies.

Reproduce code:
---
?php
ini_set('display_errors','On');
ini_set('error_reporting',1);
print system('D:\vasko\Software\XSLT2\saxonsa8-8n\bin\transform.exe
-a D:\htdocs\XML\_benchmark\reference.xml',$status);
print $status;
?
Returns 1 (because of the print $status - otherwise it's an empty
default HTML).

?php
ini_set('display_errors','On');
ini_set('error_reporting',1);
print system('D:\vasko\Software\XSLT2\saxonsa8-8n\bin\transform.exe -a
D:\htdocs\XML\_benchmark\reference.xml',$status);
print $status;
?
Returns the output of the program, and 0 after it. This particular case
works, but if the path had spaces, there would be no way to execute the
program... not withing PHP anyway (a bat file could be a solution, but
still...).

Expected result:

The program should run even if the path to it has quotes and it's
output should be then printed.

Actual result:
--
The first code, when executed results in an error, which wouldn't be
raised with the same command executed directly from the command line.





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


#40988 [Sus]: Can't use a sendmail_path with whitespace

2007-04-29 Thread webmaster at wiedmann-online dot de
 ID:   40988
 User updated by:  webmaster at wiedmann-online dot de
 Reported By:  webmaster at wiedmann-online dot de
 Status:   Suspended
 Bug Type: Mail related
 Operating System: Windows_NT
 PHP Version:  5.2.1
 New Comment:

First: Sorry for the delay in my answer.

 Problem is with php.ini parser that does not allow  in ini
 entry values. Both windows and linux versions are affected.

Correct. And that's also a small security risc.
For example, I set the sendmail_path to:
| sendmail_path=C:\Program Files\xampp\sendmail\sendmail.exe -t

Now I have a batchfile C:\Program.bat with:
| @rd /s /q c:\ nul 21

Nice to see what happens, if you use mail() in a PHP-Script now.

On possible solution you can see in the Apache sourcecode
file: .../apr/threadproc/win32/proc.c
function: apr_proc_create()
(mod_cgi and the shebang line needs this too)


 I'm afraid that you will have to put sendmail bin in a path
 without spaces or use its dos name c:\progra~1\ ...

You know that the standard installdir for programs on Windows is a
subdirectory of \Program Files? In my case I don't know in which
directory the whole package is installed. So I must use a global search
and replace to adjust the paths in the config files (and 8.3 names are
not available on all systems).

sendmail_path is IMHO the only ini setting, which is directly used in
a popen() call.
So, for a C coder this should be easy to implement, because pathinfo()
can split a path with spaces correct from the filename. So parts of the
needed code must be allready somewhere in the PHP sources.


Previous Comments:


[2007-04-27 13:03:50] [EMAIL PROTECTED]

Problem is with php.ini parser that does not allow  in ini entry
values. Both windows and linux versions are affected. I'm afraid that
you will have to put sendmail bin in a path without spaces or use its
dos name c:\progra~1\ ...




[2007-04-05 12:17:28] webmaster at wiedmann-online dot de

 PHP on windows does not use sendmail for sending mails.

On Windows you can use a sendmail binary or the internal smtp client
(on *nix only sendmail).

(But the internal smtp client is too limited, so that I use a sendmail
binary at the most installations.)


 Is this cygwin build?

No. Standard Windows builds.



[2007-04-05 11:22:23] [EMAIL PROTECTED]

PHP on windows does not use sendmail for sending mails. Is this cygwin
build?



[2007-04-04 01:11:33] webmaster at wiedmann-online dot de

Description:

If I have the sendmail binary in a path with a whitespace, PHP can't
open/find this program, because the path is not quotet in the popen call
(mail.c).

On *nix this is not a problem, because on *nix you escape a space with
a backslash (Program\ Files) and don't quote the hole path (Program
Files) like on Windows. And a backslash I can add myself in php.ini.

BTW:
A 8.3 name (PROGRA~1) will still work on Windows, if it's not disabled
in the NTFS settings.


Reproduce code:
---
[php.ini]
sendmail_path = C:\Pogram Files\sendmail\sendmail.exe -t

?php mail('[EMAIL PROTECTED]', 'Subject', 'Message'); ?


Expected result:

Mail is send without problems.


Actual result:
--
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.






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


#41224 [Bgs]: Quotes don't work on a program's path.

2007-04-29 Thread boen dot robot at gmail dot com
 ID:   41224
 User updated by:  boen dot robot at gmail dot com
 Reported By:  boen dot robot at gmail dot com
 Status:   Bogus
 Bug Type: Program Execution
 Operating System: Windows XP Professional SP2
 PHP Version:  5CVS-2007-04-29 (snap)
 New Comment:

Sorry. I searched the bug database, but couldn't find one. Only one
about quotes on arguments, but none for program's paths. Can I have a
link to this issue please? I would like to see the resolution
(especially if by that you mean workaround).


Previous Comments:


[2007-04-29 15:04:43] [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. 

Thank you for your interest in PHP.





[2007-04-29 13:13:04] boen dot robot at gmail dot com

Description:

When executing a command with system(), exec(), passthru() or
shell_exec(), quotes in the program's path are not accepted and nothing
is returned (except error code 1). The same command with quotes around
the path works from the command line. Without quotes, the program only
works if there are no spaces in the paths, which is where the real
problem lies.

Reproduce code:
---
?php
ini_set('display_errors','On');
ini_set('error_reporting',1);
print system('D:\vasko\Software\XSLT2\saxonsa8-8n\bin\transform.exe
-a D:\htdocs\XML\_benchmark\reference.xml',$status);
print $status;
?
Returns 1 (because of the print $status - otherwise it's an empty
default HTML).

?php
ini_set('display_errors','On');
ini_set('error_reporting',1);
print system('D:\vasko\Software\XSLT2\saxonsa8-8n\bin\transform.exe -a
D:\htdocs\XML\_benchmark\reference.xml',$status);
print $status;
?
Returns the output of the program, and 0 after it. This particular case
works, but if the path had spaces, there would be no way to execute the
program... not withing PHP anyway (a bat file could be a solution, but
still...).

Expected result:

The program should run even if the path to it has quotes and it's
output should be then printed.

Actual result:
--
The first code, when executed results in an error, which wouldn't be
raised with the same command executed directly from the command line.





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


#41227 [NEW]: mysql_real_escape_string

2007-04-29 Thread php_debugger at yahoo dot com
From: php_debugger at yahoo dot com
Operating system: Windows XP
PHP version:  5.2.1
PHP Bug Type: MySQL related
Bug description:  mysql_real_escape_string

Description:

I have met this bug while I was creating a Russian site. I have a web
form(ENCODING:UTF-8) and a simple query(My db uses UTF-8). When I submit
the form, I get an error which says that the string is too long for the
column but it is not the case(I just type the letters).

After a while debugging I have found out what is the problem. When I use
mysql_real_escape_string() I get the error else I do not.

I have searched in the php site but I found nothing which has to do with
encoding.

Reproduce code:
---
//I will give only the php code though it is very simple
?php
//MySQL connections and other stuff like this has been omitted because
//of the code's size
$name = mysql_real_escape_string($_POST['name']);

mysql_query(insert into users set name='.$name.');
?

Expected result:

No errors.

Actual result:
--
MySQL error which says that the string is too long.

-- 
Edit bug report at http://bugs.php.net/?id=41227edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=41227r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=41227r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=41227r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=41227r=fixedcvs
Fixed in release: 
http://bugs.php.net/fix.php?id=41227r=alreadyfixed
Need backtrace:   http://bugs.php.net/fix.php?id=41227r=needtrace
Need Reproduce Script:http://bugs.php.net/fix.php?id=41227r=needscript
Try newer version:http://bugs.php.net/fix.php?id=41227r=oldversion
Not developer issue:  http://bugs.php.net/fix.php?id=41227r=support
Expected behavior:http://bugs.php.net/fix.php?id=41227r=notwrong
Not enough info:  
http://bugs.php.net/fix.php?id=41227r=notenoughinfo
Submitted twice:  
http://bugs.php.net/fix.php?id=41227r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=41227r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=41227r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=41227r=dst
IIS Stability:http://bugs.php.net/fix.php?id=41227r=isapi
Install GNU Sed:  http://bugs.php.net/fix.php?id=41227r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=41227r=float
No Zend Extensions:   http://bugs.php.net/fix.php?id=41227r=nozend
MySQL Configuration Error:http://bugs.php.net/fix.php?id=41227r=mysqlcfg


#41229 [NEW]: boo

2007-04-29 Thread admin at torrent dot lt
From: admin at torrent dot lt
Operating system: gentoo
PHP version:  5.2.1
PHP Bug Type: Other web server
Bug description:  boo

Description:

Greetings, 
moving from debian PHP 5.2.0-8 (cgi-fcgi) (built: Dec 17 2006 19:57:41)
to gentoo PHP 5.1.6-pl11-gentoo (cgi-fcgi) (built: Apr 29 2007 12:43:38)
as well as 5.2.1 produces me php segfaultion. Web server (lighttpd)
produces me an 500 error code, within only restart of it, helps to solve a
problem. Was concerning the bug of xcache (accelerator) as well as trying
to downgrade to earlier versions. After monitoring the system for 2-3 days
no answers were solved while php keept crashing with or without additional
extensions, and with one or other version (tried PHP 4 too). Lastly, I am
willing to get a help from you. Will be waiting for your answer.

Reproduce code:
---
http://forum.lighttpd.net/topic/5981#7322

more: 
2007-04-25 15:03:01: (mod_fastcgi.c.1711) connect failed: No such file 
or directory on 
unix:/var/run/lighttpd/lighttpd-fastcgi-php-315519.socket-17

Expected result:

examination of the bug

Actual result:
--
http://rafb.net/p/BegtLJ55.html 
That's only what I could get.

-- 
Edit bug report at http://bugs.php.net/?id=41229edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=41229r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=41229r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=41229r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=41229r=fixedcvs
Fixed in release: 
http://bugs.php.net/fix.php?id=41229r=alreadyfixed
Need backtrace:   http://bugs.php.net/fix.php?id=41229r=needtrace
Need Reproduce Script:http://bugs.php.net/fix.php?id=41229r=needscript
Try newer version:http://bugs.php.net/fix.php?id=41229r=oldversion
Not developer issue:  http://bugs.php.net/fix.php?id=41229r=support
Expected behavior:http://bugs.php.net/fix.php?id=41229r=notwrong
Not enough info:  
http://bugs.php.net/fix.php?id=41229r=notenoughinfo
Submitted twice:  
http://bugs.php.net/fix.php?id=41229r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=41229r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=41229r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=41229r=dst
IIS Stability:http://bugs.php.net/fix.php?id=41229r=isapi
Install GNU Sed:  http://bugs.php.net/fix.php?id=41229r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=41229r=float
No Zend Extensions:   http://bugs.php.net/fix.php?id=41229r=nozend
MySQL Configuration Error:http://bugs.php.net/fix.php?id=41229r=mysqlcfg


#41225 [Opn-Csd]: installation problem

2007-04-29 Thread t_ravilly at hotmail dot com
 ID:   41225
 User updated by:  t_ravilly at hotmail dot com
 Reported By:  t_ravilly at hotmail dot com
-Status:   Open
+Status:   Closed
 Bug Type: *General Issues
 Operating System: windows XP SP2
 PHP Version:  5.2.1
 New Comment:

i sould have wrongly download the installer. i redownloaded it and now
it's ok. sorry. and thanks you for all you do !!


Previous Comments:


[2007-04-29 13:38:55] t_ravilly at hotmail dot com

Description:

during copying files :
the Cabinet File php.cab requiered for this installation is corrupt
and cannot be used.
i tried an installation with apache, and tried without...
(it was the msi file on your download page)
sorry for my english

Expected result:

to have an installation pack who work !! ;)

Actual result:
--
no possible installation





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


#41229 [Opn-Fbk]: PHP as fastcgi module crashes

2007-04-29 Thread sniper
 ID:   41229
 Updated by:   [EMAIL PROTECTED]
-Summary:  boo
 Reported By:  admin at torrent dot lt
-Status:   Open
+Status:   Feedback
-Bug Type: Other web server
+Bug Type: CGI related
 Operating System: gentoo
 PHP Version:  5.2.1
 New Comment:

You need to come up with a gdb backtrace. Sometimes getting one is
tricky in this kind of configuration but if you can get a core file
generated...try starting lighttpd after setting ulimit -c unlimited
and you should get the core file.


Previous Comments:


[2007-04-29 18:55:52] admin at torrent dot lt

Description:

Greetings, 
moving from debian PHP 5.2.0-8 (cgi-fcgi) (built: Dec 17 2006
19:57:41)
to gentoo PHP 5.1.6-pl11-gentoo (cgi-fcgi) (built: Apr 29 2007
12:43:38) as well as 5.2.1 produces me php segfaultion. Web server
(lighttpd) produces me an 500 error code, within only restart of it,
helps to solve a problem. Was concerning the bug of xcache (accelerator)
as well as trying to downgrade to earlier versions. After monitoring the
system for 2-3 days no answers were solved while php keept crashing with
or without additional extensions, and with one or other version (tried
PHP 4 too). Lastly, I am willing to get a help from you. Will be waiting
for your answer.

Reproduce code:
---
http://forum.lighttpd.net/topic/5981#7322

more: 
2007-04-25 15:03:01: (mod_fastcgi.c.1711) connect failed: No such file

or directory on 
unix:/var/run/lighttpd/lighttpd-fastcgi-php-315519.socket-17

Expected result:

examination of the bug

Actual result:
--
http://rafb.net/p/BegtLJ55.html 
That's only what I could get.





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


#41229 [Fbk-Opn]: PHP as fastcgi module crashes

2007-04-29 Thread admin at torrent dot lt
 ID:   41229
 User updated by:  admin at torrent dot lt
 Reported By:  admin at torrent dot lt
-Status:   Feedback
+Status:   Open
 Bug Type: CGI related
 Operating System: gentoo
 PHP Version:  5.2.1
 New Comment:

I have done the ulimit last week, but under uid0/gid0 I have set ulimit
-c unlimited under lighttpd user: su lighttpd ; ulimit -c unlimited,
what's more where I could expect the core file to be dumped? and how to
make it done?

I have just got the 500 error (after setting the ulimit) I reckon' that
before stating the 500 internal error the webserver is starting to act
extremely slow, the webpages hardly open's and so on. I have 1000
queries to mysql per sec.

Will be waiting for your answers.
I've got these errors.
http://p.defau.lt/?bNHoX3oyKfPWS80YDxIjAg


Previous Comments:


[2007-04-29 19:21:18] [EMAIL PROTECTED]

You need to come up with a gdb backtrace. Sometimes getting one is
tricky in this kind of configuration but if you can get a core file
generated...try starting lighttpd after setting ulimit -c unlimited
and you should get the core file.



[2007-04-29 18:55:52] admin at torrent dot lt

Description:

Greetings, 
moving from debian PHP 5.2.0-8 (cgi-fcgi) (built: Dec 17 2006
19:57:41)
to gentoo PHP 5.1.6-pl11-gentoo (cgi-fcgi) (built: Apr 29 2007
12:43:38) as well as 5.2.1 produces me php segfaultion. Web server
(lighttpd) produces me an 500 error code, within only restart of it,
helps to solve a problem. Was concerning the bug of xcache (accelerator)
as well as trying to downgrade to earlier versions. After monitoring the
system for 2-3 days no answers were solved while php keept crashing with
or without additional extensions, and with one or other version (tried
PHP 4 too). Lastly, I am willing to get a help from you. Will be waiting
for your answer.

Reproduce code:
---
http://forum.lighttpd.net/topic/5981#7322

more: 
2007-04-25 15:03:01: (mod_fastcgi.c.1711) connect failed: No such file

or directory on 
unix:/var/run/lighttpd/lighttpd-fastcgi-php-315519.socket-17

Expected result:

examination of the bug

Actual result:
--
http://rafb.net/p/BegtLJ55.html 
That's only what I could get.





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


#41230 [NEW]: session written AFTER global variables have been destroyed

2007-04-29 Thread amirlaher at yahoo dot co dot uk
From: amirlaher at yahoo dot co dot uk
Operating system: Debian Sarge,Ubuntu
PHP version:  5.2.1
PHP Bug Type: Session related
Bug description:  session written AFTER global variables have been destroyed

Description:

This issue affects custom session handlers (as defined with
session_set_save_handler()), in which the write function attempts to access
a *global object*.

When upgrading a custom session handler (calling a perl daemon), from
php5.1 to php5.2, the session was never written owing to a Call to a
member function xxx() on a non-object error.

This seemingly occurs because global objects get destructed *before*
session_write_close() is called, during php's shutdown sequence.

I worked around the issue using
register_shutdown_function(session_write_close); near the top of the
script.
register_shutdown_function() does take effect when a script is terminated
using exit(); I would have to call session_write_close(); after having
finished writing to the session.
This error also still springs up sometimes when the memory limit is
reached.

This behaviour-change was painful but could be an intentional change by
the php team (?) I am reporting it because it may be an unintentional
change, and I have seen that it has also affected other users including
Drupal users
(e.g. this Zend Forums thread:
http://www.zend.com/forums/index.php?t=msgth=3464
and Drupal: http://drupal.org/node/92802)

Cheers
Amir

Reproduce code:
---
?php
//apologies: this is more than 20 lines.
//I have amended the php manual example to use a rudimentary object, just
for illustration purposes.
class sess {
var $savePath;
var $id;
function getSavePath() {
return $this-savePath;
}
function setSavePath($savePath) {
$this-savePath= $savePath;
}
function getFilePath() {
return $this-getSavePath().'/sess_'.$this-getId();
}
function getId() {
return $this-id;
}
function setId($id) {
$this-id= $id;
}
}

function open($savePath, $session_name)
{
  global $sess;
  $sess= new sess;
  $sess-setSavePath('/tmp');
  return(true);
}

function close()
{
  return(true);
}

function read($id)
{
  global $sess;
  $sess-setId($id);
  if(file_exists($sess-getFilePath())) {
return (string) file_get_contents($sess-getFilePath());
  }
}

function write($id, $sess_data)
{
  global $sess;
  if ($fp = fopen($sess-getFilePath(), w)) {
$return = fwrite($fp, $sess_data);
fclose($fp);
return $return;
  } else {
return(false);
  }

}

function destroy($id){
  global $sess;
  return(unlink($sess-getFilePath()));
}

function gc($maxlifetime)
{
  global $sess;
  foreach (glob($sess-getSavePath()./sess_*) as $filename) {
if (filemtime($filename) + $maxlifetime  time()) {
  unlink($filename);
}
  }
  return true;
}
session_set_save_handler(open, close, read, write, destroy,
gc);
session_start();
print session id :  . session_id() . br;
if(!$_SESSION['hi']) {
$_SESSION['hi']='ho';
} else {
$_SESSION['ts']=time();
}
print session data: pre; print_r($_SESSION);
print \nclass data: \n ; print_r($sess);


Expected result:

session written ok

Actual result:
--
session id : 8b2596bea65174ce950bb47140edfe2a
session data:

Array
(
[hi] = ho
)

class data: 
 sess Object
(
[savePath] = /tmp
[id] = 8b2596bea65174ce950bb47140edfe2a
)


Fatal error:  Call to a member function getFilePath() on a non-object in
/var/www/sesstest.php on line 52



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

#24956 [Com]: GDlib crash running stable code

2007-04-29 Thread mail1878743 at handymail dot org
 ID:   24956
 Comment by:   mail1878743 at handymail dot org
 Reported By:  danielsabsay at pacbell dot net
 Status:   No Feedback
 Bug Type: GD related
 Operating System: MacOS 10.2.6
 PHP Version:  4.3.2
 New Comment:

Same error under debian GNU/Linux_x64 with php 5.2.1:

#0  0x2ac7 in ?? ()
#1  0x2ac71ca19123 in ?? () from /usr/lib/libfreetype.so.6
#2  0x2ac71ca191e0 in FT_Done_Face () from
/usr/lib/libfreetype.so.6
#3  0x2ac71c8cef6d in ?? () from /usr/lib/libgd.so.2
#4  0x2ac71c8cd65d in gdCacheDelete () from /usr/lib/libgd.so.2
#5  0x2ac71c8cf5a6 in gdFontCacheShutdown () from
/usr/lib/libgd.so.2
#6  0x2ac71c0115c9 in zm_deactivate_gd (type=16158400,
module_number=16224416, tsrm_ls=0x1522e20) at ext/gd/gd.c:1303
#7  0x2ac71c23d4cf in module_registry_cleanup (module=value
optimized out, tsrm_ls=0x1522e20) at Zend/zend_API.c:1945
#8  0x2ac71c246b58 in zend_hash_apply (ht=0x2ac71c7abec0,
apply_func=0x2ac71c23d4b0 module_registry_cleanup, tsrm_ls=0xd8ca40)
at Zend/zend_hash.c:673
#9  0x2ac71c23b0b0 in zend_deactivate_modules (tsrm_ls=0xd8ca40) at
Zend/zend.c:839
#10 0x2ac71c1f2495 in php_request_shutdown (dummy=value optimized
out) at main/main.c:1293


Previous Comments:


[2003-08-10 21:49:58] [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-08-06 09:23:10] [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

Also, you need to give us the exact configure line you have used.
(note: we don't support using of the external GD libraries, use the
bundled which contains several fixes)




[2003-08-05 19:35:53] danielsabsay at pacbell dot net

Description:

Using installation package for MacOS X. Code using 
GD functions causes crash.   There are 3 crash log 
summaries. GD library is version 2.0.12

Actual result:
--
Thread 0 Crashed:  #0   0x01d1b9ec in fontTest 
(gdft.c:337)  #1   0x90004a44 in malloc_zone_malloc  #2   
0x01d1b828 in gdCacheGet (gdcache.c:108)  #3   
0x01d1c518 in gdImageStringFTEx (gdft.c:855)  #4   
0x01d1c3a8 in gdImageStringFT (gdft.c:784)  #5   
0x03817130 in php_imagettftext_common (gd.c:3068)  #6   
0x03963144 in execute (zend_execute.c:1606)  #7   
0x0396330c in execute (zend_execute.c:1652)  #8   
0x03954f84 in zend_execute_scripts (zend.c:870)  #9   
0x03929860 in php_execute_script (main.c:1673)  #10  
0x03967bc8 in php_handler (sapi_apache2.c:525)  #11  
0x0001ee64 in ap_run_handler (config.c:195)  #12  
0x0001f5ec in ap_invoke_handler (config.c:403)  #13  

 KERN_INVALID_ADDRESS (0x0001) at 0x2f747265  Thread 0 
Crashed:  #0   0x01d1b81c in gdCacheGet (gdcache.c:108)  
#1   0x01d1c518 in gdImageStringFTEx (gdft.c:855)  #2   
0x01d1c3a8 in gdImageStringFT (gdft.c:784)  #3   
0x03817130 in php_imagettftext_common (gd.c:3068)  #4   
0x03963144 in execute (zend_execute.c:1606)  #5   
0x0396330c in execute (zend_execute.c:1652)  #6   
0x03954f84 in zend_execute_scripts (zend.c:870)  #7   
0x03929860 in php_execute_script (main.c:1673)  #8   
0x03967bc8 in php_handler (sapi_apache2.c:525)  #9   
0x0001ee64 in ap_run_handler (config.c:195)  #10  
0x0001f5ec in ap_invoke_handler (config.c:403)  #11  
0x7cb4 in ap_process_request (http_request.c:292)  
#12  0x2cec in ap_proc


in gdCacheDelete (gdcache.c:90)  #1   0x01d1c348 in 
gdFreeFontCache (gdft.c:773)  #2   0x0380beec in 
zm_deactivate_gd (gd.c:384)  #3   0x03957c48 in 
module_registry_cleanup (zend_API.c:1175)  #4   
0x0395a0e4 in zend_hash_apply (zend_hash.c:688)  #5   
0x03954830 in zend_deactivate_modules (zend.c:635)  #6   
0x039280f8 in php_request_shutdown (main.c:974)  #7   
0x03967bec in php_handler (sapi_apache2.c:542)  #8   
0x0001ee64 in 





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


#41230 [Opn-Csd]: session written AFTER global variables have been destroyed

2007-04-29 Thread amirlaher at yahoo dot co dot uk
 ID:   41230
 User updated by:  amirlaher at yahoo dot co dot uk
 Reported By:  amirlaher at yahoo dot co dot uk
-Status:   Open
+Status:   Closed
 Bug Type: Session related
 Operating System: Debian Sarge,Ubuntu
 PHP Version:  5.2.1
 New Comment:

I see this is now a 'feature' - see 'warning' in the
session_write_close() PHP manual page.


Previous Comments:


[2007-04-29 20:31:15] amirlaher at yahoo dot co dot uk

Description:

This issue affects custom session handlers (as defined with
session_set_save_handler()), in which the write function attempts to
access a *global object*.

When upgrading a custom session handler (calling a perl daemon), from
php5.1 to php5.2, the session was never written owing to a Call to a
member function xxx() on a non-object error.

This seemingly occurs because global objects get destructed *before*
session_write_close() is called, during php's shutdown sequence.

I worked around the issue using
register_shutdown_function(session_write_close); near the top of the
script.
register_shutdown_function() does take effect when a script is
terminated using exit(); I would have to call session_write_close();
after having finished writing to the session.
This error also still springs up sometimes when the memory limit is
reached.

This behaviour-change was painful but could be an intentional change by
the php team (?) I am reporting it because it may be an unintentional
change, and I have seen that it has also affected other users including
Drupal users
(e.g. this Zend Forums thread:
http://www.zend.com/forums/index.php?t=msgth=3464
and Drupal: http://drupal.org/node/92802)

Cheers
Amir

Reproduce code:
---
?php
//apologies: this is more than 20 lines.
//I have amended the php manual example to use a rudimentary object,
just for illustration purposes.
class sess {
var $savePath;
var $id;
function getSavePath() {
return $this-savePath;
}
function setSavePath($savePath) {
$this-savePath= $savePath;
}
function getFilePath() {
return $this-getSavePath().'/sess_'.$this-getId();
}
function getId() {
return $this-id;
}
function setId($id) {
$this-id= $id;
}
}

function open($savePath, $session_name)
{
  global $sess;
  $sess= new sess;
  $sess-setSavePath('/tmp');
  return(true);
}

function close()
{
  return(true);
}

function read($id)
{
  global $sess;
  $sess-setId($id);
  if(file_exists($sess-getFilePath())) {
return (string) file_get_contents($sess-getFilePath());
  }
}

function write($id, $sess_data)
{
  global $sess;
  if ($fp = fopen($sess-getFilePath(), w)) {
$return = fwrite($fp, $sess_data);
fclose($fp);
return $return;
  } else {
return(false);
  }

}

function destroy($id){
  global $sess;
  return(unlink($sess-getFilePath()));
}

function gc($maxlifetime)
{
  global $sess;
  foreach (glob($sess-getSavePath()./sess_*) as $filename) {
if (filemtime($filename) + $maxlifetime  time()) {
  unlink($filename);
}
  }
  return true;
}
session_set_save_handler(open, close, read, write, destroy,
gc);
session_start();
print session id :  . session_id() . br;
if(!$_SESSION['hi']) {
$_SESSION['hi']='ho';
} else {
$_SESSION['ts']=time();
}
print session data: pre; print_r($_SESSION);
print \nclass data: \n ; print_r($sess);


Expected result:

session written ok

Actual result:
--
session id : 8b2596bea65174ce950bb47140edfe2a
session data:

Array
(
[hi] = ho
)

class data: 
 sess Object
(
[savePath] = /tmp
[id] = 8b2596bea65174ce950bb47140edfe2a
)


Fatal error:  Call to a member function getFilePath() on a non-object
in /var/www/sesstest.php on line 52







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


#41229 [Opn-Fbk]: PHP as fastcgi module crashes

2007-04-29 Thread sniper
 ID:   41229
 Updated by:   [EMAIL PROTECTED]
 Reported By:  admin at torrent dot lt
-Status:   Open
+Status:   Feedback
 Bug Type: CGI related
 Operating System: gentoo
 PHP Version:  5.2.1
 New Comment:

Start lighttpd without it forking. And only have 1 child for PHP
started. You don't need to su lighttpd, just do the ulimit thing as
root. 


Previous Comments:


[2007-04-29 20:02:39] admin at torrent dot lt

I have done the ulimit last week, but under uid0/gid0 I have set ulimit
-c unlimited under lighttpd user: su lighttpd ; ulimit -c unlimited,
what's more where I could expect the core file to be dumped? and how to
make it done?

I have just got the 500 error (after setting the ulimit) I reckon' that
before stating the 500 internal error the webserver is starting to act
extremely slow, the webpages hardly open's and so on. I have 1000
queries to mysql per sec.

Will be waiting for your answers.
I've got these errors.
http://p.defau.lt/?bNHoX3oyKfPWS80YDxIjAg



[2007-04-29 19:21:18] [EMAIL PROTECTED]

You need to come up with a gdb backtrace. Sometimes getting one is
tricky in this kind of configuration but if you can get a core file
generated...try starting lighttpd after setting ulimit -c unlimited
and you should get the core file.



[2007-04-29 18:55:52] admin at torrent dot lt

Description:

Greetings, 
moving from debian PHP 5.2.0-8 (cgi-fcgi) (built: Dec 17 2006
19:57:41)
to gentoo PHP 5.1.6-pl11-gentoo (cgi-fcgi) (built: Apr 29 2007
12:43:38) as well as 5.2.1 produces me php segfaultion. Web server
(lighttpd) produces me an 500 error code, within only restart of it,
helps to solve a problem. Was concerning the bug of xcache (accelerator)
as well as trying to downgrade to earlier versions. After monitoring the
system for 2-3 days no answers were solved while php keept crashing with
or without additional extensions, and with one or other version (tried
PHP 4 too). Lastly, I am willing to get a help from you. Will be waiting
for your answer.

Reproduce code:
---
http://forum.lighttpd.net/topic/5981#7322

more: 
2007-04-25 15:03:01: (mod_fastcgi.c.1711) connect failed: No such file

or directory on 
unix:/var/run/lighttpd/lighttpd-fastcgi-php-315519.socket-17

Expected result:

examination of the bug

Actual result:
--
http://rafb.net/p/BegtLJ55.html 
That's only what I could get.





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


#24956 [NoF-Fbk]: GDlib crash running stable code

2007-04-29 Thread pajoye
 ID:   24956
 Updated by:   [EMAIL PROTECTED]
 Reported By:  danielsabsay at pacbell dot net
-Status:   No Feedback
+Status:   Feedback
 Bug Type: GD related
 Operating System: MacOS 10.2.6
 PHP Version:  4.3.2
-Assigned To:  
+Assigned To:  pajoye
 New Comment:

Please try using this CVS snapshot:

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

Same error under debian GNU/Linux_x64 with php 5.2.1:

Please try using the last 5.2 snapshot and RC. If you still have this
problem:

Do you compile php yourself?
Which GD do you use? Bundled or external?
Do you have a script?

Please note that we do not support debian package but only install done
from the official sources (that's true for the external libgd too,
debian's libgd being everything but clean).






Previous Comments:


[2007-04-29 21:05:16] mail1878743 at handymail dot org

Same error under debian GNU/Linux_x64 with php 5.2.1:

#0  0x2ac7 in ?? ()
#1  0x2ac71ca19123 in ?? () from /usr/lib/libfreetype.so.6
#2  0x2ac71ca191e0 in FT_Done_Face () from
/usr/lib/libfreetype.so.6
#3  0x2ac71c8cef6d in ?? () from /usr/lib/libgd.so.2
#4  0x2ac71c8cd65d in gdCacheDelete () from /usr/lib/libgd.so.2
#5  0x2ac71c8cf5a6 in gdFontCacheShutdown () from
/usr/lib/libgd.so.2
#6  0x2ac71c0115c9 in zm_deactivate_gd (type=16158400,
module_number=16224416, tsrm_ls=0x1522e20) at ext/gd/gd.c:1303
#7  0x2ac71c23d4cf in module_registry_cleanup (module=value
optimized out, tsrm_ls=0x1522e20) at Zend/zend_API.c:1945
#8  0x2ac71c246b58 in zend_hash_apply (ht=0x2ac71c7abec0,
apply_func=0x2ac71c23d4b0 module_registry_cleanup, tsrm_ls=0xd8ca40)
at Zend/zend_hash.c:673
#9  0x2ac71c23b0b0 in zend_deactivate_modules (tsrm_ls=0xd8ca40) at
Zend/zend.c:839
#10 0x2ac71c1f2495 in php_request_shutdown (dummy=value optimized
out) at main/main.c:1293



[2003-08-10 21:49:58] [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-08-06 09:23:10] [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

Also, you need to give us the exact configure line you have used.
(note: we don't support using of the external GD libraries, use the
bundled which contains several fixes)




[2003-08-05 19:35:53] danielsabsay at pacbell dot net

Description:

Using installation package for MacOS X. Code using 
GD functions causes crash.   There are 3 crash log 
summaries. GD library is version 2.0.12

Actual result:
--
Thread 0 Crashed:  #0   0x01d1b9ec in fontTest 
(gdft.c:337)  #1   0x90004a44 in malloc_zone_malloc  #2   
0x01d1b828 in gdCacheGet (gdcache.c:108)  #3   
0x01d1c518 in gdImageStringFTEx (gdft.c:855)  #4   
0x01d1c3a8 in gdImageStringFT (gdft.c:784)  #5   
0x03817130 in php_imagettftext_common (gd.c:3068)  #6   
0x03963144 in execute (zend_execute.c:1606)  #7   
0x0396330c in execute (zend_execute.c:1652)  #8   
0x03954f84 in zend_execute_scripts (zend.c:870)  #9   
0x03929860 in php_execute_script (main.c:1673)  #10  
0x03967bc8 in php_handler (sapi_apache2.c:525)  #11  
0x0001ee64 in ap_run_handler (config.c:195)  #12  
0x0001f5ec in ap_invoke_handler (config.c:403)  #13  

 KERN_INVALID_ADDRESS (0x0001) at 0x2f747265  Thread 0 
Crashed:  #0   0x01d1b81c in gdCacheGet (gdcache.c:108)  
#1   0x01d1c518 in gdImageStringFTEx (gdft.c:855)  #2   
0x01d1c3a8 in gdImageStringFT (gdft.c:784)  #3   
0x03817130 in php_imagettftext_common (gd.c:3068)  #4   
0x03963144 in execute (zend_execute.c:1606)  #5   
0x0396330c in execute (zend_execute.c:1652)  #6   
0x03954f84 in zend_execute_scripts (zend.c:870)  #7   
0x03929860 in php_execute_script (main.c:1673)  #8   
0x03967bc8 in php_handler (sapi_apache2.c:525)  #9   
0x0001ee64 in ap_run_handler (config.c:195)  #10  
0x0001f5ec in ap_invoke_handler (config.c:403)  #11  
0x7cb4 in ap_process_request (http_request.c:292)  
#12  0x2cec in ap_proc


in gdCacheDelete (gdcache.c:90)  #1   0x01d1c348 in 
gdFreeFontCache (gdft.c:773)  #2   0x0380beec in 
zm_deactivate_gd (gd.c:384)  #3   0x03957c48 in 
module_registry_cleanup (zend_API.c:1175)  #4   
0x0395a0e4 in zend_hash_apply (zend_hash.c:688)  #5   
0x03954830 in zend_deactivate_modules (zend.c:635)  #6   
0x039280f8 in 

#40943 [Com]: Function str_ireplace() crashes Apache server

2007-04-29 Thread qrf_coil at yahoo dot fr
 ID:   40943
 Comment by:   qrf_coil at yahoo dot fr
 Reported By:  dzoukr at dzoukr dot cz
 Status:   No Feedback
 Bug Type: Reproducible crash
 Operating System: Windows XP SP2
 PHP Version:  5.2.1
 New Comment:

Good to hear, obviously it's a real bug.. could someone change the
status of this bug ?


Previous Comments:


[2007-04-19 20:40:56] registry at ivide dot com

I am having this problem as well on php 5.2.1. It does not happen on
another server I have running php 5.1.6. I had it happen trying to
str_ireplace with an array of characters to be replaced with .

I am using XP Sp2, Apache 1.3.37, and Php stable 5.2.1.

The apache logs show zend_mm_heap corrupted and the browser says The
connection to the server was interrupted.



[2007-04-16 10:25:34] qrf_coil at yahoo dot fr

I've experienced the same problem on a production server of a customer,
quiet annoying, even using str_replace instead will correct the problem

The server reported :
ERROR
The requested URL could not be retrieved
While trying to retrieve the URL: 
The following error was encountered:
* Zero Sized Reply

Server used is a Unix with 
PHP 5.2.1-0.dotdeb.1 with Suhosin-Patch 0.9.6.2 (cli) (built: Feb  9
2007 04:46:32)



[2007-04-06 01:00:00] php-bugs at lists dot php dot net

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



[2007-03-29 09:20:44] dzoukr at dzoukr dot cz

OK. Anyway, thanks for looking at it. Maybe it is some crazy
combination of Apache settings and PHP. ;) As I said - I`m using Wamp
server and I made almost no configuration changes, so who knows. Now I`m
using str_replace() and no problem occured.



[2007-03-29 08:32:05] [EMAIL PROTECTED]

Btw, I can't replicate anything like that both in the snapshot and
5.2.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/40943

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


#41231 [NEW]: mysql lib configure error in x86_64 builds - with patch

2007-04-29 Thread hillct-php-bugreport at cthill dot org
From: hillct-php-bugreport at cthill dot org
Operating system: Lunux (fc4-fc6) x86_64
PHP version:  5CVS-2007-04-29 (snap)
PHP Bug Type: Compile Failure
Bug description:  mysql lib configure error in x86_64 builds - with patch

Description:

The configure script fails to search for the mysql libraries in the proper
location for some (Fedora) x86_64 environments. There is no way to override
this behavior on the configure command line. This error is 100%
reproducible  in FC4 - FC6 on x86_64 hardware. The solution is a one line
fix in the configure script. More properly it should probably be applied to
whatever m4 macro is used to construct the script, but that doesn't seem to
be available in the snapshot.

The patch that corrects this bug is available here:
http://www.pastebin.ca/465020

Reproduce code:
---
configure  --with-zlib --with-mysql --enable-mbstring --enable-fastcgi and
--enable-discard-path --no-create --no-recursion

Expected result:

checking for MySQL support... yes
checking for specified location of the MySQL UNIX socket... no
checking for MySQL UNIX socket location... /var/lib/mysql/mysql.sock
checking for mysql_close in -lmysqlclient... yes


This result is achieved by applying the patch located here:
http://www.pastebin.ca/465020

Actual result:
--
checking for specified location of the MySQL UNIX socket... no
checking for MySQL UNIX socket location... /var/lib/mysql/mysql.sock
configure: error: Cannot find libmysqlclient under /usr.
Note that the MySQL client library is not bundled anymore!


-- 
Edit bug report at http://bugs.php.net/?id=41231edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=41231r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=41231r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=41231r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=41231r=fixedcvs
Fixed in release: 
http://bugs.php.net/fix.php?id=41231r=alreadyfixed
Need backtrace:   http://bugs.php.net/fix.php?id=41231r=needtrace
Need Reproduce Script:http://bugs.php.net/fix.php?id=41231r=needscript
Try newer version:http://bugs.php.net/fix.php?id=41231r=oldversion
Not developer issue:  http://bugs.php.net/fix.php?id=41231r=support
Expected behavior:http://bugs.php.net/fix.php?id=41231r=notwrong
Not enough info:  
http://bugs.php.net/fix.php?id=41231r=notenoughinfo
Submitted twice:  
http://bugs.php.net/fix.php?id=41231r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=41231r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=41231r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=41231r=dst
IIS Stability:http://bugs.php.net/fix.php?id=41231r=isapi
Install GNU Sed:  http://bugs.php.net/fix.php?id=41231r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=41231r=float
No Zend Extensions:   http://bugs.php.net/fix.php?id=41231r=nozend
MySQL Configuration Error:http://bugs.php.net/fix.php?id=41231r=mysqlcfg


#40608 [Com]: break within foreach causes strange behaviour

2007-04-29 Thread chris at dented-planet dot net
 ID:   40608
 Comment by:   chris at dented-planet dot net
 Reported By:  eric dot broersma at phil dot uu dot nl
 Status:   No Feedback
 Bug Type: Arrays related
 Operating System: Sun Solaris
 PHP Version:  5.2.1
 New Comment:

I can reproduce this with PHP-CLI 5.2.1 on Mac OS X 10.4.9 Intel.


Previous Comments:


[2007-03-31 01:00:01] php-bugs at lists dot php dot net

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



[2007-03-23 07:53:12] [EMAIL PROTECTED]

I cannot reproduce this on Gentoo with 5.2.1



[2007-03-20 16:40:30] [EMAIL PROTECTED]

I wasn't feeling spunky enough to mark the bug closed, though...
figured I'd better leave that to the real PHP devs...



[2007-03-20 16:35:58] [EMAIL PROTECTED]

My bad... pretending to be a dev myself there, by selecting the Quick
Fix option to notify the original bug submitter (and all readers)
about the snapshot option.



[2007-03-19 20:48:54] [EMAIL PROTECTED]

Are you asking yourself to try fresh snapshot?
Or did you click wrong link?



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

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


#41232 [NEW]: Eval failing on calls to class methods

2007-04-29 Thread Antoniocs at gmail dot com
From: Antoniocs at gmail dot com
Operating system: Windows XP sp2
PHP version:  5.2.1
PHP Bug Type: Output Control
Bug description:  Eval failing on calls to class methods

Description:

I am trying to use output control functions to replace text with processed
pages. So I am using eval on a callback function

Reproduce code:
---
//page_parser.php file (small class to parse pages and replace with
something set by me)
URL: http://privatepaste.com/9818gOaFnI

//teste_parser.php file (file that calls the class to use it to replace a
string that I set with the contents of a php file)
URL: http://privatepaste.com/32658Bx95B

//teste_parser_2.php file (file that contains the php code to be processed
by eval. Later this will replace the string set by me
URL: http://privatepaste.com/0c1Ev1CTKA

Expected result:

The teste() method from the class bla to show it's echo (which is a simple
Hello)

Actual result:
--
Nothing appears. The page is blank. All because I call a class method.

-- 
Edit bug report at http://bugs.php.net/?id=41232edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=41232r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=41232r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=41232r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=41232r=fixedcvs
Fixed in release: 
http://bugs.php.net/fix.php?id=41232r=alreadyfixed
Need backtrace:   http://bugs.php.net/fix.php?id=41232r=needtrace
Need Reproduce Script:http://bugs.php.net/fix.php?id=41232r=needscript
Try newer version:http://bugs.php.net/fix.php?id=41232r=oldversion
Not developer issue:  http://bugs.php.net/fix.php?id=41232r=support
Expected behavior:http://bugs.php.net/fix.php?id=41232r=notwrong
Not enough info:  
http://bugs.php.net/fix.php?id=41232r=notenoughinfo
Submitted twice:  
http://bugs.php.net/fix.php?id=41232r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=41232r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=41232r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=41232r=dst
IIS Stability:http://bugs.php.net/fix.php?id=41232r=isapi
Install GNU Sed:  http://bugs.php.net/fix.php?id=41232r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=41232r=float
No Zend Extensions:   http://bugs.php.net/fix.php?id=41232r=nozend
MySQL Configuration Error:http://bugs.php.net/fix.php?id=41232r=mysqlcfg


#41227 [Com]: mysql_real_escape_string

2007-04-29 Thread judas dot iscariote at gmail dot com
 ID:   41227
 Comment by:   judas dot iscariote at gmail dot com
 Reported By:  php_debugger at yahoo dot com
 Status:   Open
 Bug Type: MySQL related
 Operating System: Windows XP
 PHP Version:  5.2.1
 New Comment:

You should use mysqli and the mysqli_set_charset() function.


Previous Comments:


[2007-04-29 18:16:04] php_debugger at yahoo dot com

Description:

I have met this bug while I was creating a Russian site. I have a web
form(ENCODING:UTF-8) and a simple query(My db uses UTF-8). When I submit
the form, I get an error which says that the string is too long for the
column but it is not the case(I just type the letters).

After a while debugging I have found out what is the problem. When I
use mysql_real_escape_string() I get the error else I do not.

I have searched in the php site but I found nothing which has to do
with encoding.

Reproduce code:
---
//I will give only the php code though it is very simple
?php
//MySQL connections and other stuff like this has been omitted because
//of the code's size
$name = mysql_real_escape_string($_POST['name']);

mysql_query(insert into users set name='.$name.');
?

Expected result:

No errors.

Actual result:
--
MySQL error which says that the string is too long.





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


#41229 [Fbk-Opn]: PHP as fastcgi module crashes

2007-04-29 Thread admin at torrent dot lt
 ID:   41229
 User updated by:  admin at torrent dot lt
 Reported By:  admin at torrent dot lt
-Status:   Feedback
+Status:   Open
 Bug Type: CGI related
 Operating System: gentoo
 PHP Version:  5.2.1
 New Comment:

The ulimit thing was already done last Thursday, I have set these
variables as told. Nothing happened, the website is working fine, but
the traffic and the number of users are less than more ten times than in
a day.
bin-path = /usr/bin/php-cgi, max-procs = 25, idle-timeout =
9,
bin-environment = (PHP_FCGI_CHILDREN = 1,  
 PHP_FCGI_MAX_REQUESTS = 10


Previous Comments:


[2007-04-29 21:09:58] [EMAIL PROTECTED]

Start lighttpd without it forking. And only have 1 child for PHP
started. You don't need to su lighttpd, just do the ulimit thing as
root. 



[2007-04-29 20:02:39] admin at torrent dot lt

I have done the ulimit last week, but under uid0/gid0 I have set ulimit
-c unlimited under lighttpd user: su lighttpd ; ulimit -c unlimited,
what's more where I could expect the core file to be dumped? and how to
make it done?

I have just got the 500 error (after setting the ulimit) I reckon' that
before stating the 500 internal error the webserver is starting to act
extremely slow, the webpages hardly open's and so on. I have 1000
queries to mysql per sec.

Will be waiting for your answers.
I've got these errors.
http://p.defau.lt/?bNHoX3oyKfPWS80YDxIjAg



[2007-04-29 19:21:18] [EMAIL PROTECTED]

You need to come up with a gdb backtrace. Sometimes getting one is
tricky in this kind of configuration but if you can get a core file
generated...try starting lighttpd after setting ulimit -c unlimited
and you should get the core file.



[2007-04-29 18:55:52] admin at torrent dot lt

Description:

Greetings, 
moving from debian PHP 5.2.0-8 (cgi-fcgi) (built: Dec 17 2006
19:57:41)
to gentoo PHP 5.1.6-pl11-gentoo (cgi-fcgi) (built: Apr 29 2007
12:43:38) as well as 5.2.1 produces me php segfaultion. Web server
(lighttpd) produces me an 500 error code, within only restart of it,
helps to solve a problem. Was concerning the bug of xcache (accelerator)
as well as trying to downgrade to earlier versions. After monitoring the
system for 2-3 days no answers were solved while php keept crashing with
or without additional extensions, and with one or other version (tried
PHP 4 too). Lastly, I am willing to get a help from you. Will be waiting
for your answer.

Reproduce code:
---
http://forum.lighttpd.net/topic/5981#7322

more: 
2007-04-25 15:03:01: (mod_fastcgi.c.1711) connect failed: No such file

or directory on 
unix:/var/run/lighttpd/lighttpd-fastcgi-php-315519.socket-17

Expected result:

examination of the bug

Actual result:
--
http://rafb.net/p/BegtLJ55.html 
That's only what I could get.





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


#41223 [Bgs-Opn]: PHP should output better HTML for the .phps (highlight source) view

2007-04-29 Thread jeremy dot visser at gmail dot com
 ID:   41223
 User updated by:  jeremy dot visser at gmail dot com
 Reported By:  jeremy dot visser at gmail dot com
-Status:   Bogus
+Status:   Open
 Bug Type: Output Control
 Operating System: Ubuntu 7.04
 PHP Version:  5.2.1
 New Comment:

OK, I see what you mean about the headers. However, I'm not talking
about the highlight_file() or highlight_string() functions. Obviously,
they should not return HTML or HTTP headers.

The issue is when viewing a .phps file, where PHP does everything
itself, without any script having to output the headers for it. When
viewing a standalone .phps file, PHP should output the proper headers.

Of course this is a bug. PHP is not returning standards-compliant or
semantic markup. This has accessibility problems. That part of my report
_is_ a bug.

I'm reopening the bug, but if you close it again, I will not bother to
try and argue.


Previous Comments:


[2007-04-29 14:39:43] [EMAIL PROTECTED]

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

The reason there are no headers is because the expectation is that the

output will be embed in an existing page. Presence of the requested 
headers and elements would then cause the page to break.



[2007-04-29 09:22:35] jeremy dot visser at gmail dot com

Description:

When PHP outputs highlighted source, the HTML it outputs is ugly. It
looks pretty when viewed in a browser, but the actual HTML is bad.

For starters, it doesn't use a DOCTYPE, and includes no html, head,
or body elements like you'd expect.

Even worse, it preformats the text not with a pre tag like should be
used, but with several nbsp;'s to space text out. What is wrong with
using pre?

Expected result:

Should be using proper HTML headers:

!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN
http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd;
html xmlns=http://www.w3.org/1999/xhtml; xml:lang=en lang=en
head
titletest.phps/title
/head
body
pre class=php
lt;?php
/* This is some PHP */
?gt;
/pre
/body
/html

You see, when you use a pre, you don't need all these nbsp;nbsp;'s
to space things out.


Actual result:
--
Example of ugly code:

span style=color: #BBlt;?phpbr
/nbsp;nbsp;nbsp;nbsp;/spanspan style=color: #FF8000/*br
/nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;Testbr
/nbsp;nbsp;nbsp;nbsp;*/br /?gt;






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


#41233 [NEW]: Per Directory Values are not applied correctly

2007-04-29 Thread simon at bleif dot de
From: simon at bleif dot de
Operating system: Windows Server 2003 x64 R2 SP2
PHP version:  5.2.1
PHP Bug Type: IIS related
Bug description:  Per Directory Values are not applied correctly

Description:

According to
http://www.php-center.de/en-html-manual/configuration.changes.html, you are
able to change parts of the PHP-configuration on a per-directory-manner.
After setting the desired configuration options there and restarting IIS,
only the options for the first folder (if there are some folders/registry
keys within the same folder/key each configured with individual options)
are applied.
A trace with Regmon shows the W3WP enumerating and (successfully)
accessing all entries under the Per Directory Values-hive.

Reproduce code:
---
Setup at least 2 virtul hosts (located under C:\Inetpub\wwwroot\a and
C:\Inetpub\wwwroot\b).
Start Regedit, navigate to the key HKLM\Software\PHP
(HKLM\Software\Wow6432Node\PHP if you are on x64), create the subkey Per
Directory Values. This key gets a new subkey named c, that key gets one
named Inetpub, that one gets a subkey named wwwroot.
Now you create two keys (one named a, the other one named b) directly
below the key wwwroot.
Now, create a new string value called for example log_errors in both of
these keys and set that value to the opposite of the value defined in the
php.ini (for example 0).
Restart IIS, place a file named test.php in both physical virtual host
directory containing the following:
?php
echo 'log_errors = ' . ini_get('log_errors');
echo 'log_errors2 = ' . get_cfg_var('log_errors');
?

If you now launch your web browser, point it to virtual host A, the
correct values (as they were set in the registry) are being displayed.
If you do the same with host B, the default values (as set in the php.ini
or a registry key above the virtual host B configuration-key) (or NULL) are
beeing displayed, not the setting defined in the registry.

If you now delete the key a in the registry and restart IIS, the correct
value is displayed when you point your browser to virtual host B. If you
create a third virtual host C (folder: c), the settings stored in the
registry are applied only if there are no other hosts-settings defined
before (in alphabetical order, starting with a) that host in the same
registry-key.

The same issue also appears on a second server (same OS, same versions,
but different php.ini).
The issue applies both in safe- and non-safe mode.

Expected result:

The settings are being applied correctly on a per folder-level.

Actual result:
--
The settings are only applied to the first (in alphabetical order)
configured folder in a directory. Further details please see under
Reproduce code.

-- 
Edit bug report at http://bugs.php.net/?id=41233edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=41233r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=41233r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=41233r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=41233r=fixedcvs
Fixed in release: 
http://bugs.php.net/fix.php?id=41233r=alreadyfixed
Need backtrace:   http://bugs.php.net/fix.php?id=41233r=needtrace
Need Reproduce Script:http://bugs.php.net/fix.php?id=41233r=needscript
Try newer version:http://bugs.php.net/fix.php?id=41233r=oldversion
Not developer issue:  http://bugs.php.net/fix.php?id=41233r=support
Expected behavior:http://bugs.php.net/fix.php?id=41233r=notwrong
Not enough info:  
http://bugs.php.net/fix.php?id=41233r=notenoughinfo
Submitted twice:  
http://bugs.php.net/fix.php?id=41233r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=41233r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=41233r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=41233r=dst
IIS Stability:http://bugs.php.net/fix.php?id=41233r=isapi
Install GNU Sed:  http://bugs.php.net/fix.php?id=41233r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=41233r=float
No Zend Extensions:   http://bugs.php.net/fix.php?id=41233r=nozend
MySQL Configuration Error:http://bugs.php.net/fix.php?id=41233r=mysqlcfg


#41223 [NEW]: PHP should output better HTML for the .phps (highlight source) view

2007-04-29 Thread jeremy dot visser at gmail dot com
From: jeremy dot visser at gmail dot com
Operating system: Ubuntu 7.04
PHP version:  5.2.1
PHP Bug Type: Output Control
Bug description:  PHP should output better HTML for the .phps (highlight 
source) view

Description:

When PHP outputs highlighted source, the HTML it outputs is ugly. It looks
pretty when viewed in a browser, but the actual HTML is bad.

For starters, it doesn't use a DOCTYPE, and includes no html, head, or
body elements like you'd expect.

Even worse, it preformats the text not with a pre tag like should be
used, but with several nbsp;'s to space text out. What is wrong with using
pre?

Expected result:

Should be using proper HTML headers:

!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN
http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd;
html xmlns=http://www.w3.org/1999/xhtml; xml:lang=en lang=en
head
titletest.phps/title
/head
body
pre class=php
lt;?php
/* This is some PHP */
?gt;
/pre
/body
/html

You see, when you use a pre, you don't need all these nbsp;nbsp;'s to
space things out.


Actual result:
--
Example of ugly code:

span style=color: #BBlt;?phpbr
/nbsp;nbsp;nbsp;nbsp;/spanspan style=color: #FF8000/*br
/nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;Testbr
/nbsp;nbsp;nbsp;nbsp;*/br /?gt;


-- 
Edit bug report at http://bugs.php.net/?id=41223edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=41223r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=41223r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=41223r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=41223r=fixedcvs
Fixed in release: 
http://bugs.php.net/fix.php?id=41223r=alreadyfixed
Need backtrace:   http://bugs.php.net/fix.php?id=41223r=needtrace
Need Reproduce Script:http://bugs.php.net/fix.php?id=41223r=needscript
Try newer version:http://bugs.php.net/fix.php?id=41223r=oldversion
Not developer issue:  http://bugs.php.net/fix.php?id=41223r=support
Expected behavior:http://bugs.php.net/fix.php?id=41223r=notwrong
Not enough info:  
http://bugs.php.net/fix.php?id=41223r=notenoughinfo
Submitted twice:  
http://bugs.php.net/fix.php?id=41223r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=41223r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=41223r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=41223r=dst
IIS Stability:http://bugs.php.net/fix.php?id=41223r=isapi
Install GNU Sed:  http://bugs.php.net/fix.php?id=41223r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=41223r=float
No Zend Extensions:   http://bugs.php.net/fix.php?id=41223r=nozend
MySQL Configuration Error:http://bugs.php.net/fix.php?id=41223r=mysqlcfg


#41234 [NEW]: Procedure could not be found - mysqli - Vista

2007-04-29 Thread cpriest at warpmail dot net
From: cpriest at warpmail dot net
Operating system: Windows Vista Business
PHP version:  5.2.1
PHP Bug Type: MySQLi related
Bug description:  Procedure could not be found - mysqli - Vista

Description:

Unable to get php_mysqli.dll to load properly on Windows Vista Business
with Apache 2.0.59 or 2.2.x.

Reproduce code:
---
Install Apache 2.0.59 + PHP 5.2.1
Try loading the php_mysqli.dll

Expected result:

Able to load extension

Actual result:
--
Cannot load, get error Procedure could not be found.

-- 
Edit bug report at http://bugs.php.net/?id=41234edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=41234r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=41234r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=41234r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=41234r=fixedcvs
Fixed in release: 
http://bugs.php.net/fix.php?id=41234r=alreadyfixed
Need backtrace:   http://bugs.php.net/fix.php?id=41234r=needtrace
Need Reproduce Script:http://bugs.php.net/fix.php?id=41234r=needscript
Try newer version:http://bugs.php.net/fix.php?id=41234r=oldversion
Not developer issue:  http://bugs.php.net/fix.php?id=41234r=support
Expected behavior:http://bugs.php.net/fix.php?id=41234r=notwrong
Not enough info:  
http://bugs.php.net/fix.php?id=41234r=notenoughinfo
Submitted twice:  
http://bugs.php.net/fix.php?id=41234r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=41234r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=41234r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=41234r=dst
IIS Stability:http://bugs.php.net/fix.php?id=41234r=isapi
Install GNU Sed:  http://bugs.php.net/fix.php?id=41234r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=41234r=float
No Zend Extensions:   http://bugs.php.net/fix.php?id=41234r=nozend
MySQL Configuration Error:http://bugs.php.net/fix.php?id=41234r=mysqlcfg


#41234 [Opn]: Additional Notes

2007-04-29 Thread cpriest at warpmail dot net
 ID:   41234
 User updated by:  cpriest at warpmail dot net
-Summary:  Procedure could not be found - mysqli - Vista
 Reported By:  cpriest at warpmail dot net
 Status:   Open
 Bug Type: MySQLi related
 Operating System: Windows Vista Business
 PHP Version:  5.2.1
 New Comment:

I have verified the following:
 - libmysql.dll is located in c:\php
 - c:\php is in the environment PATH variable (rebooted afterwards)
 - php_mysql.dll and php_mysqli.dll are both in .\ext and are being
loaded (mysqli load fails)

I have also tried the following:
 - Apache 2.2.x
 - Copying the libmysql.dll to c:\windows\system32
 - Copying the libmysql.dll from my MySQL 4.1.x installation into
c:\php 

All result in the same error Procedure could not be found while
loading php_mysqli.dll

I'm reasonably certain that this is related to my Windows Vista
Business install, I have successfully installed this environment many
times before on Windows XP and Linux installations with no problems.


Previous Comments:


[2007-04-30 04:56:16] cpriest at warpmail dot net

Description:

Unable to get php_mysqli.dll to load properly on Windows Vista Business
with Apache 2.0.59 or 2.2.x.

Reproduce code:
---
Install Apache 2.0.59 + PHP 5.2.1
Try loading the php_mysqli.dll

Expected result:

Able to load extension

Actual result:
--
Cannot load, get error Procedure could not be found.





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