#42270 [NEW]: stdClass could not be converted to string

2007-08-10 Thread steven dot mccoy at miru dot hk
From: steven dot mccoy at miru dot hk
Operating system: Ubuntu 7.04
PHP version:  5.2.4RC1
PHP Bug Type: Class/Object related
Bug description:  stdClass could not be converted to string

Description:

This might be related to bug 41221, upgrading from PHP 5.1.6-1 (Debian) to
5.2.1 (Ubuntu) created a regression in handling output of JSON decoding.

Does this mean that I can only use arrays ( json_decode($json, true) ),
and have to update all code appropriately?

Reproduce code:
---
 array(array("second" => 2), "two", "three"),
);
$json = json_encode($array);
$obj = json_decode($json);
var_dump(array_diff($array,$obj->first));
?>


Expected result:

array(1) {
  ["first"]=>
  array(3) {
[0]=>
array(1) {
  ["second"]=>
  int(2)
}
[1]=>
string(3) "two"
[2]=>
string(5) "three"
  }
}


Actual result:
--
Catchable fatal error: Object of class stdClass could not be converted to
string in /tmp/- on line 7


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


#42257 [Csd->Opn]: Cannot uninstall 5.2.3

2007-08-10 Thread ravendon69 at charter dot net
 ID:   42257
 User updated by:  ravendon69 at charter dot net
 Reported By:  ravendon69 at charter dot net
-Status:   Closed
+Status:   Open
 Bug Type: *General Issues
 Operating System: Windows XP
 PHP Version:  5CVS-2007-08-09 (CVS)
 Assigned To:  jmertic
 New Comment:

What would I do with msizap_exe? 

What command should I enter?


Previous Comments:


[2007-08-10 15:20:20] [EMAIL PROTECTED]

Try this

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/msizap_exe.asp



[2007-08-10 12:59:53] [EMAIL PROTECTED]

Assigned to the installer maintainer.



[2007-08-09 15:29:40] ravendon69 at charter dot net

Description:

PHP 5.2.3, Windows XP SP2, Intel Celeron

I'm trying to uninstall php 5.2.3. I get the following. This occurs if
I try to install over, uninstall or change. 

"Error, trying to access the local web service: GetObject Failed. You
will need to manually configure the web server."

Hit Ok. 

"Error trying access httpd.conf file. You will need to manually
configure the web server."

Hit OK.

"The installer has encountered an unexpected error installing this
package. This may indicate a problem with this package. The error code
is 2343."

It is impossible for me to remove this software. I can't use your .msi
installer to overwrite it or repair it. 

How do I get rid of it? 






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


#42268 [Bgs]: assignment in reference parameter doesn't resolve properly

2007-08-10 Thread donauinsel at hotmail dot com
 ID:   42268
 User updated by:  donauinsel at hotmail dot com
 Reported By:  donauinsel at hotmail dot com
 Status:   Bogus
 Bug Type: *General Issues
 Operating System: W32
 PHP Version:  5.2.4RC1
 New Comment:

Sorry i don't understand what you mean. I use the pass-by-reference
function with global variable.


Previous Comments:


[2007-08-10 21:43:28] [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

.



[2007-08-10 20:48:53] donauinsel at hotmail dot com

Description:

Try first $month = 11,$year = 2007 then $month =12, $year = 2007
Function returns correct value which seems not to be passed correctly.

Reproduce code:
---
function fixdate(&$month, &$year) {
if ($month < 1) {
$month = 12;
$year--;
} elseif ($month > 12) {
$month = 1;
$year++;
}
}

fixdate($nextmonth = ($month + 1), $nextyear = ($year + 0));



Expected result:

12 / 2007 or 01 / 2008 

Actual result:
--
you will get 13 / 2007 instead.





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


#42252 [Asn->Fbk]: Windows compile failure with mbstring and zend_multibyte

2007-08-10 Thread hirokawa
 ID:   42252
 Updated by:   [EMAIL PROTECTED]
 Reported By:  okabe at zend dot co dot jp
-Status:   Assigned
+Status:   Feedback
 Bug Type: Compile Failure
 Operating System: Windows 2003
 PHP Version:  4.4.7
 Assigned To:  hirokawa
 New Comment:

I think that MBFL_DLL_EXPORT is undefined on compile option.
Please try again with '/D "MBFL_DLL_EXPORT"'.




Previous Comments:


[2007-08-09 03:11:13] okabe at zend dot co dot jp

Description:

I want to build php4.4.7 with mbstring and zend multibyte because to
use Japanese character set that is called "Shift_JIS".

I am able to build normal win32's php.exe (have no mbstring) using
php4ts.dsw by following the php manual.

Then, at first, I add lines to config.w32.h as follows...
---
#define ZEND_MULTIBYTE 1
#define HAVE_MBSTRING 1
#define HAVE_MBREGEX  1
#define HAVE_MBSTR_CN 1
#define HAVE_MBSTR_JA 1
#define HAVE_MBSTR_KR 1
#define HAVE_MBSTR_RU 1
#define HAVE_MBSTR_TW 1
#define MBSTRING_EXPORTS 1
#undef COMPILE_DL_MBSTRING
---

and I add line to zend_config.w32.h as follows...
---
#define ZEND_MULTIBYTE 1
---

next,

I added source files about under ext/mbstring to php4dllts.dsp.
(making mbstring folder in Function Modules and import those files and
folders)

next,

I built the project, and watching the include errors.
This work was repeated and the path of the include error was
corrected.

Finally, 

four errors C2099(initializer is not a constant.) and much warnings
C4013(undefined; assuming extern returning int) and C4273(inconsistent
dll linkage. dllexport assumed.) remained.
---
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\tchar.h(783) :
warning C4013:
:
:
C:\work\php-4.4.7\ext\mbstring\libmbfl\mbfl\mbfilter.c(110) : warning
C4273: 'mbfl_buffer_converter_new' :
:
:
C:\work\php-4.4.7\ext\mbstring\libmbfl\mbfl\mbfl_convert.c(214) : error
C2099: 
:
:
C:\work\php-4.4.7\ext\mbstring\libmbfl\mbfl\mbfl_encoding.c(119) :
error C2099:
C:\work\php-4.4.7\ext\mbstring\libmbfl\mbfl\mbfl_encoding.c(121) :
error C2099:
C:\work\php-4.4.7\ext\mbstring\libmbfl\mbfl\mbfl_encoding.c(131) :
error C2099:
---

Then, what should I do?
I'm using VC6.

Actual result:
--
build message is follows...

---
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\tchar.h(783) :
warning C4013: '_mbschr' undefined; assuming extern returning int
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\tchar.h(784) :
warning C4013: '_mbscspn' undefined; assuming extern returning int
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\tchar.h(785) :
warning C4013: '_mbsnbcat' undefined; assuming extern returning int
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\tchar.h(786) :
warning C4013: '_mbsnbcpy' undefined; assuming extern returning int
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\tchar.h(787) :
warning C4013: '_mbspbrk' undefined; assuming extern returning int
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\tchar.h(788) :
warning C4013: '_mbsrchr' undefined; assuming extern returning int
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\tchar.h(789) :
warning C4013: '_mbsspn' undefined; assuming extern returning int
 :
omit
 :
configure: php4dllts - Win32
Release_TS
Generating ext/standard/parsedate.c
compiling resource...
compiling...
 :
omit
 :
C:\work\php-4.4.7\ext\mbstring\libmbfl\mbfl\mbfilter.c(110) : warning
C4273: 'mbfl_buffer_converter_new' : inconsistent dll linkage. dllexport
assumed.
C:\work\php-4.4.7\ext\mbstring\libmbfl\mbfl\mbfilter.c(154) : warning
C4273: 'mbfl_buffer_converter_delete' : inconsistent dll linkage.
dllexport assumed.
C:\work\php-4.4.7\ext\mbstring\libmbfl\mbfl\mbfilter.c(169) : warning
C4273: 'mbfl_buffer_converter_reset' : inconsistent dll linkage.
dllexport assumed.
C:\work\php-4.4.7\ext\mbstring\libmbfl\mbfl\mbfilter.c(175) : warning
C4273: 'mbfl_buffer_converter_illegal_mode' : inconsistent dll linkage.
dllexport assumed.
C:\work\php-4.4.7\ext\mbstring\libmbfl\mbfl\mbfilter.c(191) : warning
C4273: 'mbfl_buffer_converter_illegal_substchar' : inconsistent dll
linkage. dllexport assumed.
C:\work\php-4.4.7\ext\mbstring\libmbfl\mbfl\mbfilter.c(207) : warning
C4273: 'mbfl_buffer_converter_strncat' : inconsistent dll linkage.
dllexport assumed.
 :
omit
 :
C:\work\php-4.4.7\ext\mbstring\libmbfl\mbfl\mbfl_convert.c(100) :
warning C4273: 'mbfl_convert_filter_list' : inconsistent dll linkage.
dllexport assumed.
C:\work\php-4.4.7\ext\mbstring\libmbfl\mbfl\mbfl_convert.c(214) : error
C2099: initializer is not a constant.
C:\work\php-4.4.7\ext\mbstring\libmbfl\mbfl\mbfl_convert.c(225) :
warning C4273: 'mbfl_convert_filter_new' : inconsistent dll linkage.
dllexport assumed.
 :
omit
 :
C:\work\php-4.4.7\ext\mbstring\libmbfl\mbfl\mbfl_encoding.c(119) :
error C2099: initializer is not a constant.
C:\work\php-4.4.7\ext\mbstring\libmbfl\mbfl\mbfl_enc

#42252 [Opn->Asn]: Windows compile failure with mbstring and zend_multibyte

2007-08-10 Thread hirokawa
 ID:   42252
 Updated by:   [EMAIL PROTECTED]
 Reported By:  okabe at zend dot co dot jp
-Status:   Open
+Status:   Assigned
 Bug Type: Compile Failure
 Operating System: Windows 2003
 PHP Version:  4.4.7
-Assigned To:  
+Assigned To:  hirokawa


Previous Comments:


[2007-08-09 03:11:13] okabe at zend dot co dot jp

Description:

I want to build php4.4.7 with mbstring and zend multibyte because to
use Japanese character set that is called "Shift_JIS".

I am able to build normal win32's php.exe (have no mbstring) using
php4ts.dsw by following the php manual.

Then, at first, I add lines to config.w32.h as follows...
---
#define ZEND_MULTIBYTE 1
#define HAVE_MBSTRING 1
#define HAVE_MBREGEX  1
#define HAVE_MBSTR_CN 1
#define HAVE_MBSTR_JA 1
#define HAVE_MBSTR_KR 1
#define HAVE_MBSTR_RU 1
#define HAVE_MBSTR_TW 1
#define MBSTRING_EXPORTS 1
#undef COMPILE_DL_MBSTRING
---

and I add line to zend_config.w32.h as follows...
---
#define ZEND_MULTIBYTE 1
---

next,

I added source files about under ext/mbstring to php4dllts.dsp.
(making mbstring folder in Function Modules and import those files and
folders)

next,

I built the project, and watching the include errors.
This work was repeated and the path of the include error was
corrected.

Finally, 

four errors C2099(initializer is not a constant.) and much warnings
C4013(undefined; assuming extern returning int) and C4273(inconsistent
dll linkage. dllexport assumed.) remained.
---
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\tchar.h(783) :
warning C4013:
:
:
C:\work\php-4.4.7\ext\mbstring\libmbfl\mbfl\mbfilter.c(110) : warning
C4273: 'mbfl_buffer_converter_new' :
:
:
C:\work\php-4.4.7\ext\mbstring\libmbfl\mbfl\mbfl_convert.c(214) : error
C2099: 
:
:
C:\work\php-4.4.7\ext\mbstring\libmbfl\mbfl\mbfl_encoding.c(119) :
error C2099:
C:\work\php-4.4.7\ext\mbstring\libmbfl\mbfl\mbfl_encoding.c(121) :
error C2099:
C:\work\php-4.4.7\ext\mbstring\libmbfl\mbfl\mbfl_encoding.c(131) :
error C2099:
---

Then, what should I do?
I'm using VC6.

Actual result:
--
build message is follows...

---
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\tchar.h(783) :
warning C4013: '_mbschr' undefined; assuming extern returning int
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\tchar.h(784) :
warning C4013: '_mbscspn' undefined; assuming extern returning int
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\tchar.h(785) :
warning C4013: '_mbsnbcat' undefined; assuming extern returning int
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\tchar.h(786) :
warning C4013: '_mbsnbcpy' undefined; assuming extern returning int
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\tchar.h(787) :
warning C4013: '_mbspbrk' undefined; assuming extern returning int
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\tchar.h(788) :
warning C4013: '_mbsrchr' undefined; assuming extern returning int
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\tchar.h(789) :
warning C4013: '_mbsspn' undefined; assuming extern returning int
 :
omit
 :
configure: php4dllts - Win32
Release_TS
Generating ext/standard/parsedate.c
compiling resource...
compiling...
 :
omit
 :
C:\work\php-4.4.7\ext\mbstring\libmbfl\mbfl\mbfilter.c(110) : warning
C4273: 'mbfl_buffer_converter_new' : inconsistent dll linkage. dllexport
assumed.
C:\work\php-4.4.7\ext\mbstring\libmbfl\mbfl\mbfilter.c(154) : warning
C4273: 'mbfl_buffer_converter_delete' : inconsistent dll linkage.
dllexport assumed.
C:\work\php-4.4.7\ext\mbstring\libmbfl\mbfl\mbfilter.c(169) : warning
C4273: 'mbfl_buffer_converter_reset' : inconsistent dll linkage.
dllexport assumed.
C:\work\php-4.4.7\ext\mbstring\libmbfl\mbfl\mbfilter.c(175) : warning
C4273: 'mbfl_buffer_converter_illegal_mode' : inconsistent dll linkage.
dllexport assumed.
C:\work\php-4.4.7\ext\mbstring\libmbfl\mbfl\mbfilter.c(191) : warning
C4273: 'mbfl_buffer_converter_illegal_substchar' : inconsistent dll
linkage. dllexport assumed.
C:\work\php-4.4.7\ext\mbstring\libmbfl\mbfl\mbfilter.c(207) : warning
C4273: 'mbfl_buffer_converter_strncat' : inconsistent dll linkage.
dllexport assumed.
 :
omit
 :
C:\work\php-4.4.7\ext\mbstring\libmbfl\mbfl\mbfl_convert.c(100) :
warning C4273: 'mbfl_convert_filter_list' : inconsistent dll linkage.
dllexport assumed.
C:\work\php-4.4.7\ext\mbstring\libmbfl\mbfl\mbfl_convert.c(214) : error
C2099: initializer is not a constant.
C:\work\php-4.4.7\ext\mbstring\libmbfl\mbfl\mbfl_convert.c(225) :
warning C4273: 'mbfl_convert_filter_new' : inconsistent dll linkage.
dllexport assumed.
 :
omit
 :
C:\work\php-4.4.7\ext\mbstring\libmbfl\mbfl\mbfl_encoding.c(119) :
error C2099: initializer is not a constant.
C:\work\php-4.4.7\ext\mbstring\libmbfl\mbfl\mbfl_encoding.c(121) :
error C2099: initializer is not a constant.
C:\work\php-4.4.7\ext\mbstring\libmbfl\mbfl\mbfl_

#42269 [Opn]: Abstract Classes - "prototyping" not fully allowed

2007-08-10 Thread kevin at metalaxe dot com
 ID:   42269
 User updated by:  kevin at metalaxe dot com
 Reported By:  kevin at metalaxe dot com
 Status:   Open
 Bug Type: Feature/Change Request
 Operating System: All
-PHP Version:  5.2.4RC1
+PHP Version:  5.2.3
 New Comment:

Changing to proper version


Previous Comments:


[2007-08-11 00:44:30] kevin at metalaxe dot com

Description:

I was working on an interface (abstract class) to implement for kernel
subroutines (that will be singleton classes) in my program/framework and
wanted to define things that needed to be implemented in applicable
classes when I found that I couldn't do everything I needed, or feel I
need, to do in order to prevent "hacking" in extending classes.

I don't expect that these things will be implemented, but it is
something to think about and i feel it would give PHP an edge over many
other languages, if they are not already implemented in them (as some
are).

#1 Properties cannot be implemented as abstract
Doing so returns "Fatal error: Properties cannot be declared abstract."
Int he case of a singleton prototype, I'd want to be sure that a
property of the name "instance" was created by the implementing class.

#2 Abstract methods cannot be defined as private
This is a 2 part issue in my opinion. First of all, why can't they be?
If I define a method as abstract and private it means that I want the
implementing class to define that method as private. In the case of this
prototype, I want to ensure that the class in indeed a singleton and
cannot be initiated except though the static method defined later. This
brings me to part 2.

#3 Defining abstract methods as private or protected allows for
"weaker" visibility
This makes defining a prototype class completely useless. If the user
is allowed to ignore my preset visibility and do whatever they want, why
would I ever use abstract to define classes? You don't implement an
interface to "do what you want", you implement an interface to "do what
it wants".
Now, on the other hand, and if the prototype allows it (see below), it
is perfectly acceptable to be allowed to extend an implementing class to
add new behavior. This behavior might include overriding the visibility
of a method set in a parent class and assigning it as a weaker
alternative.

#4 Abstract methods cannot use the final keyword
As another aside in regards to defining abstract methods this should be
perfectly valid as well if considering prototyping. If I prototype a
method to be final, this means that I want the implementing class to
implement this method as final(NOT that I want the abstract as final, as
the error message seems to imply). Using the above guideline using a
declaration like so:

abstract private final function __construct();

...should mean that the implementing class MUST define that method as
so:

private final function __construct(){}

#5 And finally, static methods are not applicable to
abstraction/prototyping
This causes an E_STRICT error of "Strict Standards: Static function
kernel_interface::init() should not be abstract". Again I ask, "Why
shoudn't it be?" By defining a method like so:

abstract public static function &init();

..I am effectively telling the implementing class that it needs to
define the method as:

public static function &init(){}

...which is perfectly acceptable as I want to be sure that, in my case,
a singleton class implements a public, static, method unto which it can
be initiated.

Anyway, sorry for the long report, but I figured it was better than
opening 1 for each example I'd like to see. I'm perfectly happy waiting
for this, but I'd really like to see most of these implemented. I hope
that my example below is enough to deem considerable.

Reproduce code:
---
/**
*   Kernel Interface
*
*   An interface class all kernel subroutines implement.
*   All classes implementing this interface are singletons!
**/
abstract class kernel_interface
{
/**
*   Instance
*   Contains loaded this instance
*
*   @varobject
*   @access private
**/
abstract private static $instance = NULL;

/**
*   Core
*   Reference to kernel_core
*
*   @varobject
*   @access private
**/
abstract private $core;

/**
*   Construct
*   Load up the construct. Private for singleton.
*
*   @param  object  Reference to kernel_core
*   @access private
*/
abstract private final function __construct( kernel_core &$core );

/**
*   INIT
*   Ensures that only one instance is created
*
*   @param  object  Reference to kernel_core
*   @access private

#42269 [NEW]: Abstract Classes - "prototyping" not fully allowed

2007-08-10 Thread kevin at metalaxe dot com
From: kevin at metalaxe dot com
Operating system: All
PHP version:  5.2.4RC1
PHP Bug Type: Feature/Change Request
Bug description:  Abstract Classes -  "prototyping" not fully allowed

Description:

I was working on an interface (abstract class) to implement for kernel
subroutines (that will be singleton classes) in my program/framework and
wanted to define things that needed to be implemented in applicable classes
when I found that I couldn't do everything I needed, or feel I need, to do
in order to prevent "hacking" in extending classes.

I don't expect that these things will be implemented, but it is something
to think about and i feel it would give PHP an edge over many other
languages, if they are not already implemented in them (as some are).

#1 Properties cannot be implemented as abstract
Doing so returns "Fatal error: Properties cannot be declared abstract."
Int he case of a singleton prototype, I'd want to be sure that a property
of the name "instance" was created by the implementing class.

#2 Abstract methods cannot be defined as private
This is a 2 part issue in my opinion. First of all, why can't they be? If
I define a method as abstract and private it means that I want the
implementing class to define that method as private. In the case of this
prototype, I want to ensure that the class in indeed a singleton and cannot
be initiated except though the static method defined later. This brings me
to part 2.

#3 Defining abstract methods as private or protected allows for "weaker"
visibility
This makes defining a prototype class completely useless. If the user is
allowed to ignore my preset visibility and do whatever they want, why would
I ever use abstract to define classes? You don't implement an interface to
"do what you want", you implement an interface to "do what it wants".
Now, on the other hand, and if the prototype allows it (see below), it is
perfectly acceptable to be allowed to extend an implementing class to add
new behavior. This behavior might include overriding the visibility of a
method set in a parent class and assigning it as a weaker alternative.

#4 Abstract methods cannot use the final keyword
As another aside in regards to defining abstract methods this should be
perfectly valid as well if considering prototyping. If I prototype a method
to be final, this means that I want the implementing class to implement
this method as final(NOT that I want the abstract as final, as the error
message seems to imply). Using the above guideline using a declaration like
so:

abstract private final function __construct();

...should mean that the implementing class MUST define that method as so:

private final function __construct(){}

#5 And finally, static methods are not applicable to
abstraction/prototyping
This causes an E_STRICT error of "Strict Standards: Static function
kernel_interface::init() should not be abstract". Again I ask, "Why
shoudn't it be?" By defining a method like so:

abstract public static function &init();

..I am effectively telling the implementing class that it needs to define
the method as:

public static function &init(){}

...which is perfectly acceptable as I want to be sure that, in my case, a
singleton class implements a public, static, method unto which it can be
initiated.

Anyway, sorry for the long report, but I figured it was better than
opening 1 for each example I'd like to see. I'm perfectly happy waiting for
this, but I'd really like to see most of these implemented. I hope that my
example below is enough to deem considerable.

Reproduce code:
---
/**
*   Kernel Interface
*
*   An interface class all kernel subroutines implement.
*   All classes implementing this interface are singletons!
**/
abstract class kernel_interface
{
/**
*   Instance
*   Contains loaded this instance
*
*   @varobject
*   @access private
**/
abstract private static $instance = NULL;

/**
*   Core
*   Reference to kernel_core
*
*   @varobject
*   @access private
**/
abstract private $core;

/**
*   Construct
*   Load up the construct. Private for singleton.
*
*   @param  object  Reference to kernel_core
*   @access private
*/
abstract private final function __construct( kernel_core &$core );

/**
*   INIT
*   Ensures that only one instance is created
*
*   @param  object  Reference to kernel_core
*   @access private
*/
abstract public static final function &init( kernel_core &$core );

/**
*   Run
*   Returns the selected data based on type
*
*   @param  array   Array of para

#42268 [Opn->Bgs]: assignment in reference parameter doesn't resolve properly

2007-08-10 Thread johannes
 ID:   42268
 Updated by:   [EMAIL PROTECTED]
 Reported By:  donauinsel at hotmail dot com
-Status:   Open
+Status:   Bogus
 Bug Type: *General Issues
 Operating System: W32
 PHP Version:  5.2.4RC1
 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

.


Previous Comments:


[2007-08-10 20:48:53] donauinsel at hotmail dot com

Description:

Try first $month = 11,$year = 2007 then $month =12, $year = 2007
Function returns correct value which seems not to be passed correctly.

Reproduce code:
---
function fixdate(&$month, &$year) {
if ($month < 1) {
$month = 12;
$year--;
} elseif ($month > 12) {
$month = 1;
$year++;
}
}

fixdate($nextmonth = ($month + 1), $nextyear = ($year + 0));



Expected result:

12 / 2007 or 01 / 2008 

Actual result:
--
you will get 13 / 2007 instead.





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


#42251 [Bgs]: Add functionName throws Exception syntax

2007-08-10 Thread mattsch at gmail dot com
 ID:   42251
 User updated by:  mattsch at gmail dot com
 Reported By:  mattsch at gmail dot com
 Status:   Bogus
 Bug Type: Feature/Change Request
 Operating System: Gentoo Linux
 PHP Version:  5.2.4RC1
 New Comment:

Apparently php internals is not searchable.  Could you humble me with a
link?


Previous Comments:


[2007-08-09 07:42:49] [EMAIL PROTECTED]

While the current Exception system was designed it was decided not
having that syntax. Please search the archives of the internals list for
more.



[2007-08-08 22:40:48] mattsch at gmail dot com

Description:

It just came to my attention today that there is a function-based
Exception syntax in Java that would be very beneficial to have in php:

Example in Java:

public boolean foo(String bar) throws Exception {
//Run commands that may throw exceptions
}


Proposal in PHP:

public function foo($bar) throws Exception {
//Run commands that may throw exceptions
}


This will ensure that the function is only called within a try/catch
block and if it's not, it can throw an uncaught exception or throw an
error of some sort.  This would be very helpful because when someone who
didn't develop the function (a different developer) trys to use the
function outside of a try/catch block, he or she will be warned
immediately.  






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


#42268 [NEW]: assignment in reference parameter doesn't resolve properly

2007-08-10 Thread donauinsel at hotmail dot com
From: donauinsel at hotmail dot com
Operating system: W32
PHP version:  5.2.4RC1
PHP Bug Type: *General Issues
Bug description:  assignment in reference parameter doesn't resolve properly

Description:

Try first $month = 11,$year = 2007 then $month =12, $year = 2007
Function returns correct value which seems not to be passed correctly.

Reproduce code:
---
function fixdate(&$month, &$year) {
if ($month < 1) {
$month = 12;
$year--;
} elseif ($month > 12) {
$month = 1;
$year++;
}
}

fixdate($nextmonth = ($month + 1), $nextyear = ($year + 0));



Expected result:

12 / 2007 or 01 / 2008 

Actual result:
--
you will get 13 / 2007 instead.

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


#29520 [Com]: php mysql compile fail

2007-08-10 Thread username at hotmail dot com
 ID:   29520
 Comment by:   username at hotmail dot com
 Reported By:  martinkuria at hotmail dot com
 Status:   No Feedback
 Bug Type: Compile Failure
 Operating System: Solaris9
 PHP Version:  5.0.0
 New Comment:

I have experienced the same error message while compiling PHP 5.2.3
with MySQL 5.0.45.  I am running OS X 10.4.10.

When compiling with the line: --with-mysql-dir=/usr/local/mysql
I get the error: 
configure: error: Cannot find MySQL header files under yes.

When compiling with the line: --with-mysql=/usr/local/mysql
I get the error:
checking size of char *... configure: error: cannot compute sizeof
(char *), 77

I have not yet resolved the issue, but I have tried older versions of
MySQL 5 to no success.


Previous Comments:


[2007-06-28 13:49:05] thangaraj dot manogaran at gmail dot com

I am using php-5.2.3 and mysql 4.1.10 (default rpm package in RHE4
linux) and apache 2.2.4 in RHE4 64-bit linux machine.

I started the mysql by giving the command : service mysqld start
and mysql service is started.

I have configured php with apache.
But, while trying to configure Php with mysql i got errors.

The data directory of the mysql is /var/lib/
and mysql.sock is present in /var/lib/mysql/.

I tried configuring php with mysql with the following command:
./configure --with-mysql=/var/lib

But got the errors:

.
..
Configuring extensions
checking whether to enable LIBXML support... yes
checking libxml2 install dir... no
checking for xml2-config path... (cached) /usr/bin/xml2-config
checking whether libxml build works... (cached) yes
checking for OpenSSL support... no
checking for Kerberos support... no
checking for PCRE support... yes
checking for ZLIB support... no
checking if the location of ZLIB install directory is defined... no
checking whether to enable bc style precision math functions... no
checking for BZip2 support... no
checking whether to enable calendar conversion support... no
checking whether to enable ctype functions... yes
checking for cURL support... no
checking if we should use cURL for url streams... no
checking size of long... (cached) 8
checking size of int... (cached) 4
checking for int32_t... (cached) yes
checking for uint32_t... (cached) yes
checking for sys/types.h... (cached) yes
checking for inttypes.h... (cached) yes
checking for stdint.h... (cached) yes
checking for string.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for strtoll... (cached) yes
checking for atoll... (cached) yes
checking for strftime... (cached) yes
checking whether to enable DBA... no
checking for QDBM support... no
checking for GDBM support... no
checking for NDBM support... no
checking for Berkeley DB4 support... no
checking for Berkeley DB3 support... no
checking for Berkeley DB2 support... no
checking for DB1 support... no
checking for DBM support... no
checking for CDB support... no
checking for INI File support... no
checking for FlatFile support... no
checking whether to enable DBA interface... no
checking whether to enable dbase support... no
checking whether to enable DOM support... yes
checking for xml2-config path... (cached) /usr/bin/xml2-config
checking whether libxml build works... (cached) yes
checking whether to enable EXIF (metadata from images) support... no
checking for FrontBase SQL92 (fbsql) support... no
checking for FDF support... no
checking whether to enable input filter support... yes
checking pcre install prefix... no
checking whether to enable FTP support... no
checking OpenSSL dir for FTP... no
checking for GD support... no
checking for the location of libjpeg... no
checking for the location of libpng... no
checking for the location of libXpm... no
checking for FreeType 1.x support... no
checking for FreeType 2... no
checking for T1lib support... no
checking whether to enable truetype string function in GD... no
checking whether to enable JIS-mapped Japanese font support in GD...
no
checking for GNU gettext support... no
checking for GNU MP support... no
checking whether to enable hash support... yes
checking whether byte ordering is bigendian... (cached) no
checking size of short... (cached) 2
checking size of int... (cached) 4
checking size of long... (cached) 8
checking size of long long... (cached) 8
checking for iconv support... yes
checking for iconv... (cached) yes
checking if iconv is glibc's... yes
checking if iconv supports errno... yes
checking if your cpp allows macro usage in include lines... yes
checking for IMAP support... no
checking for IMAP Kerberos support... no
checking for IMAP SSL support... no
checking for InterBase support... no
checking whether to enable JavaScript Object Serialization support...
yes
checking for ANSI C header files... (cached) yes
checking for LDAP support... no
checking for LDAP Cyrus SASL support... no
checking whether to 

#37168 [Opn->Csd]: WDDX serializer inefficient with larger structures

2007-08-10 Thread dolecek at sky dot cz
 ID:   37168
 User updated by:  dolecek at sky dot cz
 Reported By:  dolecek at sky dot cz
-Status:   Open
+Status:   Closed
 Bug Type: WDDX related
 Operating System: Windows, NetBSD
 PHP Version:  5.2.1-dev
 New Comment:

WDDX serializer in PHP 5.2.3 appears to show ~linear time increase on
Windows XP. Thanks!


Previous Comments:


[2006-11-15 22:14:46] dolecek at sky dot cz

The result with 5.2.1-dev is somewhat erratic and actually worse then
before:

50: 0.0067908763885498
100: 0.013392925262451
200: 0.027522087097168
400: 0.055379152297974
800: 1.2351222038269
1600: 0.25271010398865
3200: 0.54318714141846
6400: 57.312628030777

I've run the test several times with same results. It's especially
strange '800' test is consistenly so much slower then 1600 test, and
this repeats on every run.

Seems the Windows it is actually a lot worse with the new Windows
allocator then what was there before, or perhaps the new allocator
doesn't handle the realloc() calls generated by smart string macros too
well. It would be interesting to try how much difference would my patch
make on Windows.



[2006-11-13 21:40:55] [EMAIL PROTECTED]

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

There have been major changes in the memory allocator for 
Win32 which should help with the performance.



[2006-05-27 09:28:06] dolecek at sky dot cz

I figured I used a malloc() debug option when I run the test on NetBSD
(/etc/malloc.conf -> 'J'), which caused each realloc() call to
explicitly malloc() new piece of memory and free the old. With that
disabled, the WDDX serializer result is much better on NetBSD (this is
without the patch, run with PHP 5.1.4) and actually can complete the
benchmark:

wddx_serialize_value() (without /etc/malloc.conf -> J):
0050:  0.0027
0100:  0.0058
0200:  0.0152
0400:  0.0724
0800:  0.3820
1600:  1.6633
3200:  6.9623
6400: 28.6273

For comparison, this is result with standard serialize():
0050:  0.0016
0100:  0.0032
0200:  0.0092
0400:  0.0275
0800:  0.1174
1600:  0.5613
3200:  2.3775
6400:  9.8372

So, the WDDX serializer still shows strong non-linear behaviour.

wddx_serialize_value() with patch (and without /etc/malloc.conf->J):
0050:  0.0026
0100:  0.0048
0200:  0.0104
0400:  0.0227
0800:  0.0476
1600:  0.0933
3200:  0.1914
6400:  0.3859

serialize() result after applying similar patch to ext/standard/var.c:
0050:  0.0015
0100:  0.0028
0200:  0.0061
0400:  0.0151
0800:  0.0320
1600:  0.0670
3200:  0.1374
6400:  0.2744



[2006-05-23 22:07:24] dolecek at sky dot cz

Changing the OS to Windows, NetBSD.



[2006-05-02 19:33:16] dolecek at sky dot cz

Fine, the difference is entirely dependant on platform realloc()
implementation. Anyone can try the patch on MS Windows? I don't have
native compiler there. 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/37168

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


#16402 [Com]: UnsatisfiedLinkError: send when loading any php file

2007-08-10 Thread meebosmi at yahoo dot com
 ID:   16402
 Comment by:   meebosmi at yahoo dot com
 Reported By:  csbook at adproject dot net
 Status:   No Feedback
 Bug Type: Servlet related
 Operating System: RedHat Linux
 PHP Version:  4.1.2
 New Comment:

Actually there's no need to copy the phpXXX.dll files with
X:\WinXXX\System32 folder. Just add the PHP localtion into the path
environment. Obviously you can see this is for Win32/64 systems. But, do
not forget to configure CATALINA_OPTS (for tomcat 5x/+, jbossweb 1x/+)
accordingly.


Previous Comments:


[2006-10-06 23:53:15] kidala at gmail dot com

I had got the same troubles with php and tomcat (UnsatisfiedLinkError
etc.).

Instructions presented on:

http://barry.cnblogs.com/default.html?page=2 or
http://blog.taragana.com/index.php/archive/running-php-5x-on-windows-using-tomcat-4x-or-5x/

are good but!!!

Problem UnsatisfiedLinkError appears because all needed dll's and
php.ini aren't on path!

To solve this problem I copied:
1. php_java.dll
2. php5servlet.dll
3. php5ts.dll
4. php.ini

to C:\Windows\System32

and all running OK!!

Have fun:)
Luck



[2006-09-02 01:06:24] keptos at gmail dot com

I have this problem:::


javax.servlet.ServletException: La ejecución del Servlet lanzó una
excepción

causa raíz

java.lang.UnsatisfiedLinkError: send
net.php.servlet.send(Native Method)
net.php.servlet.service(servlet.java:190)
net.php.servlet.service(servlet.java:214)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

nota La traza completa de la causa de este error se encuentra en los
archivos de diario de Apache Tomcat/5.5.12.



do you have any  idea?

thanks in advance



[2006-04-28 14:34:51] nidget at nidget dot org

Using PHP 5.1.2 and Tomcat 5.5.17, I have a similar problem with
php5servlet.dll
I have solved the issues with the name of the lib in the properties
files. java.library.path is set to c:\php;c:\php\ext
Now it can find php5servlet.dll, but not one of the dependent
libraries:
java.lang.UnsatisfiedLinkError: C:\php\php5servlet.dll: Can't find
dependent libraries
java.lang.ClassLoader$NativeLibrary.load(Native Method)
java.lang.ClassLoader.loadLibrary0(Unknown Source)
java.lang.ClassLoader.loadLibrary(Unknown Source)
java.lang.Runtime.loadLibrary0(Unknown Source)
java.lang.System.loadLibrary(Unknown Source)
net.php.reflect.loadLibrary(reflect.java:34)
net.php.reflect.(reflect.java:29)
net.php.servlet.init(servlet.java:157)

org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)

org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)

org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)

org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)

org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)

org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)

org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
java.lang.Thread.run(Unknown Source)

I have no idea what the missing library can be.
I have tried with "Dependency Checker" and it has showed efsadu.dll was
missing. I've downloaded it from the internet and copied to c:\php, but
I still have the problem.



[2004-11-24 17:34:06] jgbolger at yahoo dot ie

im running tomcat-4.1.31 with php-5.0.2-Win32 and jdk-1.5.0 on a
windows 2000 system.
placed phpsrvlt.jar in: jakarta-tomcat-4.1.31\common\lib

I was trying to run php as a servlet but was getting an
UnsatisfiedLinkError when running a simple php file.

I finally got over this error by opening the phpsrvlt.jar file and
editing the 2 properties files. The problem is it is looking for the
php5servlet.dll file but this properties file was not changed from php4
where the equivalent to php5servlet.dll is phpsrvlt.
So basically, its looking for a dll that is not there, an old version
of the dll. You just need to change the line 
library=phpsrvlt
to
library=php5servlet

and it will find the library. Hope this is of help to somebody



[2004-09-12 20:54:37] ijamj at cin dot ufpe dot br

I´ve figured out the solution for Windows 2000.

Just put the folder that contains "php_java.jar" in the enviroment
variable "java.library.path".

java -Djava.library.path=c:\php\extensions;c:\tomcat5\common\lib

After this, copy the php_java.dll to c:\windows\system32

Works like charm!

--

#42266 [NEW]: BLOB functions doesn't work

2007-08-10 Thread karasek at ceskyserver dot cz
From: karasek at ceskyserver dot cz
Operating system: Linux 64-bit
PHP version:  5.2.4RC1
PHP Bug Type: InterBase related
Bug description:  BLOB functions doesn't work

Description:

When I compile PHP on our new installation of CentOS 5.0 (64-bit version)
with Firebird 2.0, "InterBase: BLOB test" fails.

It's really critical issue for our company, because some of our
applications stoped working...

When I tryed the same on CentOS 4.1 (32-bit version) with Firebird 1.5,
the test passed.

In fact, I'm not sure, whether is the problem caused by the new version of
Firebird, or by the 64-bit architecture (but my guess is the 64-bit).

I tryed to work with BLOBs using a desktop application - and verified,
that BLOG support in Firebird 2.0 itself works (on the same server).

I have experienced the problem on PHP 5.2.3,  5.2.4RC1 and snapshot
php5.2-200708101430

I think, that this is the same problem as Bug #42089, but the bug is now
not open, and I don't know, how to open it again (I'm not the person, who
originally reported it).

I'm ready to colaborate, so feel free to contact me, if you need further
informations...

Regards
 Tony

Reproduce code:
---
make
make test


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


#42257 [Asn->Csd]: Cannot uninstall 5.2.3

2007-08-10 Thread jmertic
 ID:   42257
 Updated by:   [EMAIL PROTECTED]
 Reported By:  ravendon69 at charter dot net
-Status:   Assigned
+Status:   Closed
 Bug Type: *General Issues
 Operating System: Windows XP
 PHP Version:  5CVS-2007-08-09 (CVS)
 Assigned To:  jmertic
 New Comment:

Try this

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/msizap_exe.asp


Previous Comments:


[2007-08-10 12:59:53] [EMAIL PROTECTED]

Assigned to the installer maintainer.



[2007-08-09 15:29:40] ravendon69 at charter dot net

Description:

PHP 5.2.3, Windows XP SP2, Intel Celeron

I'm trying to uninstall php 5.2.3. I get the following. This occurs if
I try to install over, uninstall or change. 

"Error, trying to access the local web service: GetObject Failed. You
will need to manually configure the web server."

Hit Ok. 

"Error trying access httpd.conf file. You will need to manually
configure the web server."

Hit OK.

"The installer has encountered an unexpected error installing this
package. This may indicate a problem with this package. The error code
is 2343."

It is impossible for me to remove this software. I can't use your .msi
installer to overwrite it or repair it. 

How do I get rid of it? 






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


#42264 [Asn->Csd]: php-5.2.3 and mysql 5.0.16 on windows xp

2007-08-10 Thread jmertic
 ID:   42264
 Updated by:   [EMAIL PROTECTED]
 Reported By:  ericrose at hotmail dot com
-Status:   Assigned
+Status:   Closed
 Bug Type: Feature/Change Request
 Operating System: win xp
 PHP Version:  5CVS-2007-08-10 (snap)
 Assigned To:  jmertic
 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.

I've never seen this be a problem, but I have changed the '\\' to '/'
in the apache config file about 2 months ago in CVS.

I'm not sure how that change would break error_reporting() or anything
else. If you can elaborate more on what else appears to not work after
the above change, that would be great.


Previous Comments:


[2007-08-10 12:59:15] [EMAIL PROTECTED]

Assigned to the installer maintainer.



[2007-08-10 04:10:44] ericrose at hotmail dot com

Description:

I originally wrote this for beginner's who were having issues so bare
with me.
I've figured out what the problem is with installing php-5.2.3 and
mysql 5.0.16 on windows xp. with apache 2.0 I really don't know what's
happening, I'll leave that up to you. 

Anyways there seems to be a conflict going on, a "you can have one
thing but not the other scenario" When php5 windows binary installer
runs it creates your php.ini file, with all sorts of configuration data.
One very important line is extension_dir it looks something like this
extension_dir "C:\php\ext\" This directive tells php where it's
extension files are stored, in order to use mysql, you need to have
selected the extension mysql at the time of install, it copies the file
php_mysql.dll into the "C:\php\ext\" folder. 

You are also asked at the time of install, the path to your apache
config folder, it then writes some directives in the file httpd.conf, it
looks like this 

PHPIniDir "C:\\PHP5\\"
LoadModule php5_module "C:\\PHP5\\php5apache2.dll"

Now you may think that this looks all great, and you should have php
running along side mysql. Wrong! I can tell you how to get your mysql
working fine. Simply change the two forward slashes to one backwards
slash.

PHPIniDir "C:/PHP5/"
LoadModule php5_module "C:/PHP5/php5apache2.dll"

Restart your server and you'll be able to connect to your database.

Herein lies the double edged sword. Now you've lost much php
functionality, including error reporting.






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


#42265 [NEW]: preg match error ()

2007-08-10 Thread ben at crabb dot com
From: ben at crabb dot com
Operating system: FreeBSD6.1
PHP version:  5CVS-2007-08-10 (snap)
PHP Bug Type: Apache2 related
Bug description:  preg match error ()

Description:

I have installed apache22 and php5.2.3 / mod_php5 but I cannot get apache
to render php on this box. I have checked that the module is called in
httpd.conf and also that I have extension=pcre.so in the php.ini but I'm
still getting 
Fatal error: Call to undefined function preg_match() in
/usr/home/www/phpadmin/phpMyAdmin-2.6.1/libraries/defines.lib.php on line
36
Whenever I try to load phpMyAdmin

I haven't tried rendering other php files yet as I've been trying to iron
this one out for the past few hours.

Help?


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


#42127 [Opn->Bgs]: Getting data from ODBC connection to progress using MERANT (DataDirect 4.0)

2007-08-10 Thread jani
 ID:   42127
 Updated by:   [EMAIL PROTECTED]
 Reported By:  hbouslama at edison dot ca
-Status:   Open
+Status:   Bogus
 Bug Type: ODBC related
 Operating System: Win 2000
 PHP Version:  5.2.3
 New Comment:

This isn't any adodb support site. Please report bugs in it to the
authors of it..


Previous Comments:


[2007-08-01 14:38:38] hbouslama at edison dot ca

No Error was displayed but a white screan



[2007-08-01 14:36:26] hbouslama at edison dot ca

Hi
I didn't find the driver PDO ODBC in  adodb/drivers/

I tried :
$DBCon = &ADONewConnection('pdo');
$DBCon->PConnect('MyDSN_name', 'MyUser', 'MyPass', 'MyDatabase_Name');

And it generates an Error !



[2007-08-01 12:00:22] [EMAIL PROTECTED]

Please try using the PDO ODBC instead, it should work better.



[2007-07-30 22:35:45] hbouslama at edison dot ca

Hi,
I called a technical support of DataDirect and they asked me if php is
compatible with SQL89
So I transfer the question to you guys ;-)

Could any body answer me please?

Hichem



[2007-07-27 15:15:41] hbouslama at edison dot ca

Description:

Hi every body,
I'm using PHP 5.2.3=>ODBC System DSN=>DataDirect 4.0=>Network Client
for Progress 91.E and finaly Apache2. 
All are installed on Win2000 and Progress on Unix

I succeed connecting to the ODBC DSN and I can display filds names
but I can't receive data, the number of rows received is 0
I tried displaying data using other tools like Aqua data studio,
RazorSql, Excel and Open Office all is going well. but not with PHP

I tried also to connect to a MySql database using ODBC and it works
correctly

In the error log there's no error reported


Thank you for your time and effort



Reproduce code:
---
$DBCon = &ADONewConnection(SQL_DRIVER);
$DBCon->PConnect(SQL_HOSTNAME,SQL_USERNAME,SQL_PASSWORD,SQL_DATABASE)
or die(' CONNECTION ERROR : '.odbc_errormsg());
if($DBCon)
 echo 'Connection established successfully';
$sql = 'SELECT CD_CIE, CD_SUCC FROM ACINTEL';
$result = $DBCon->Execute($sql);
if($result){
echo 'Resultset is ok'.odbc_errormsg();
echo 'Row count = '.$result->RowCount().".";
echo 'Field count = '.$result->FieldCount().".";
for ($i=0;$i<$result->FieldCount();$i++){
$objField = $result->FetchField($i);
echo "Field no $i = ". $objField->name."";
}
echo 'Data : ';
while ($arr = $result->FetchRow()) {
echo '';
print_r($arr);
}
}

Expected result:

Connection established successfully
Resultset is ok
Row count = 3.

Field count = 2.
Field no 0 = CD_CIE
Field no 1 = CD_SUCC
Data : 
Array(
  [0]=>Array(
 [CD_CIE]=>Value1
 [CD_SUCC]=>Value2
   )
  [1]=>Array(
 [CD_CIE]=>Value3
 [CD_SUCC]=>Value4
   )
  [2]=>Array(
 [CD_CIE]=>Value5
 [CD_SUCC]=>Value6
   )
)

Actual result:
--
Connection established successfully
Resultset is ok
Row count = 0.

Field count = 2.
Field no 0 = CD_CIE
Field no 1 = CD_SUCC
Data : 





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


#42111 [Opn->Fbk]: copy() creates file for dir as src

2007-08-10 Thread jani
 ID:   42111
 Updated by:   [EMAIL PROTECTED]
 Reported By:  mahesh dot vemula at in dot ibm dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Filesystem function related
 Operating System: RHEL4
 PHP Version:  5CVS-2007-07-26 (CVS)
 New Comment:

Isn't this about the same bug as bug #42243 ?? If so, I think this is
fixed too since we now get an error and it returns before the file is
created..?


Previous Comments:


[2007-07-26 13:40:50] mahesh dot vemula at in dot ibm dot com

Description:

While trying to create a copy of an existing dir by copy() function, it
creates a file which is not expected but returns FALSE as expected. Even
for an existing file as second argument, PHP doesn’t throw any warning
message. It happens against Linux, and works fine against Windows.

Reproduce code:
---



Expected result:

Creation of file is not expected and a required warning messages are
expected.

Actual result:
--
Warning: copy(copy1): failed to open stream: Is a directory in %s on
line %d
bool(false)

Warning: copy(copy): failed to open stream: Is a directory in %s on
line %d
bool(false)
bool(false)
bool(false)
bool(false)






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


#42247 [Opn->Csd]: missing ldap_parse_result

2007-08-10 Thread jani
 ID:   42247
 Updated by:   [EMAIL PROTECTED]
 Reported By:  comet at ourplanet dot at
-Status:   Open
+Status:   Closed
 Bug Type: LDAP related
 Operating System: Windows XP
 PHP Version:  5.2.4 dev by 9th August 07
 New Comment:

There is no 7th parameter in this function:

http://www.php.net/ldap_parse_result

And don't use same report for different bugs. The function does exist
now. If you have other complaints, open separate report.


Previous Comments:


[2007-08-09 15:29:13] comet at ourplanet dot at

version updated from 5.2.4RC1 to current dev



[2007-08-09 15:27:34] comet at ourplanet dot at

Hi, sorry but now i get the following message:

Warning: Wrong parameter count for ldap_parse_result() 
I am using the following parameters:

ldap_parse_result( $connection, $search, &$errcode, &$matcheddn,
&$errmsg, &$referrals, &$serverctrls );

Is there a way to get this 7th parameter working, without this
parameter the function makes no sense ?

Thanks a lot



[2007-08-09 08:43:19] [EMAIL PROTECTED]

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.





[2007-08-08 13:05:47] comet at ourplanet dot at

Description:

I am wondering where the function ldap_parse_result is gone ?!

All functions within ldap are working fine but ldap_parse_result is
unknown.

Anyone an idea why this function is not longer implemented and why this
fact is not documentated ?!

Why i need this function ? : I need the ServerControls from an result
to implement paging for Active Directory queries( active directory
returns only 1000 entries by default ). ( ldap_get_option( $connection,
LDAP_OPT_SERVER_CONTROLS, $returnValue ) -> does not work too ). 






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


#34972 [NoF->Opn]: STDIN won't allow nonblocking.

2007-08-10 Thread VJTD3 at VJTD3 dot com
 ID:   34972
 User updated by:  VJTD3 at VJTD3 dot com
 Reported By:  VJTD3 at VJTD3 dot com
-Status:   No Feedback
+Status:   Open
 Bug Type: Streams related
 Operating System: *
 PHP Version:  php5.1-200603270630
 Assigned To:  wez
 New Comment:



notice how it just sits there? (blocking) it should exit instantly with
a null echo. (same as a tcp connection where if you just do a read that
is too fast with nonblocking it never gets a chance to fetch the data.)

what is happening is that php is blocking waiting for input
(specifically enter (line ending))

problem:
if you are echoing debug information and want to use key functionality
in tandem you can't because everything is blocked till you hit enter.


Previous Comments:


[2007-07-25 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-07-17 14:28:03] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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

For Windows (installer):

  http://snaps.php.net/win32/php5.2-win32-installer-latest.msi

I can't reproduce this (or very likely didn't understand the problem :)



[2006-03-27 14:12:28] VJTD3 at VJTD3 dot com

error in last message, "stream_select()" was ment.

code using "stream_select()" that still blocks:

 data: '.(strlen(@$data4) ? $data4 :
'empty')."\n";
  unset($data4);
  sleep('1');
 }

?>

the second you type/click a arrow key/anything it goes into blocking
mode again.



[2006-03-27 13:32:01] VJTD3 at VJTD3 dot com

bug #36030 is very similar to my bug, they might be related.

It looks like anything to STDIN (reguardless of access method like
php://stdin and constant('STDIN') and STDIN are all effected.)

When doing anything, be it select, timeout, or anything to "monitor"
the resource where a window is set (ie to timeout the blocking, set
nonblocking, or similar.) the input "stalls" (it's not really a stall,
it's just waiting for the input.) or fails (such as timeout setting that
fails and returns false.)

Tested on:
php4-STABLE-200603270430
php5.1-200603270630
php6.0-200602191730

Also tested as well on their *nix snaps version and all with the same
result. (blocking when they should not be blocking.)

Better code to make debugging easier and includes examples from
suggestions that don't work:

 data: '.(strlen($data1) ? $data1 :
'empty')."\n";
  sleep('1');
 }

 echo 'notice how the data loads unblocked and clearly there is no data
because this IP is invalid to connect to.'."\n";
 $demo2 = @fsockopen('0.0.0.0', 80, $errno, $errstr, 1);
 stream_set_blocking($demo2, FALSE);
 for ($i=1;$i<11;$i++) {
  # this is expected to be a invalid resource.
  $data2 = @fread($demo2, 1500);
  $data2 = str_replace("\r\n", "\n", $data2);
  $data2 = str_replace("\n\r", "\n", $data2);
  $data2 = str_replace("\r", "\n", $data2);
  $data2 = str_replace("\n", '', $data2);
  echo 'pass: '.$i.' -> data: '.(strlen($data2) ? $data2 :
'empty')."\n";
  sleep('1');
 }

 echo 'a person said to use select, this shows select won\'t work. (and
shouldn\'t it\'s not a socket.) It won\'t even allow input during select
calls.'."\n";
 for ($i=1;$i<11;$i++) {
  unset($read);
  $read[] = STDIN;
  socket_select($read, $write = null, $except = null, $tv = 0);
  print_r($read);
  sleep('1');
 }

 echo 'same code as yahoo and 0.0.0.0 with fread and blocked
reguardless of setting this to nonblocking.'."\n";
 stream_set_blocking(STDIN, FALSE);
 for ($i=1;$i<11;$i++) {
  echo 'Watch me stall till you type enter I\'m blocking you!'."\n";
  $data3 = fread(STDIN, 10);
  $data3 = str_replace("\r\n", "\n", $data3);
  $data3 = str_replace("\n\r", "\n", $data3);
  $data3 = str_replace("\r", "\n", $data3);
  $data3 = str_replace("\n", '', $data3);
  echo 'pass: '.$i.' -> data: '.(strlen($data3) ? $data3 :
'empty')."\n";
  sleep('1');
 }

?>

anything I can do to help with details/make the bug easier to fix?



[2005-11-09 20:58:26] [EMAIL PROTECTED]

Assigned to the streams maintainer.



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

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


#42257 [Opn->Asn]: Cannot uninstall 5.2.3

2007-08-10 Thread jani
 ID:   42257
 Updated by:   [EMAIL PROTECTED]
 Reported By:  ravendon69 at charter dot net
-Status:   Open
+Status:   Assigned
 Bug Type: *General Issues
 Operating System: Windows XP
 PHP Version:  5CVS-2007-08-09 (CVS)
-Assigned To:  
+Assigned To:  jmertic
 New Comment:

Assigned to the installer maintainer.


Previous Comments:


[2007-08-09 15:29:40] ravendon69 at charter dot net

Description:

PHP 5.2.3, Windows XP SP2, Intel Celeron

I'm trying to uninstall php 5.2.3. I get the following. This occurs if
I try to install over, uninstall or change. 

"Error, trying to access the local web service: GetObject Failed. You
will need to manually configure the web server."

Hit Ok. 

"Error trying access httpd.conf file. You will need to manually
configure the web server."

Hit OK.

"The installer has encountered an unexpected error installing this
package. This may indicate a problem with this package. The error code
is 2343."

It is impossible for me to remove this software. I can't use your .msi
installer to overwrite it or repair it. 

How do I get rid of it? 






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


#42264 [Opn->Asn]: php-5.2.3 and mysql 5.0.16 on windows xp

2007-08-10 Thread jani
 ID:   42264
 Updated by:   [EMAIL PROTECTED]
 Reported By:  ericrose at hotmail dot com
-Status:   Open
+Status:   Assigned
-Bug Type: *Compile Issues
+Bug Type: Feature/Change Request
 Operating System: win xp
 PHP Version:  5CVS-2007-08-10 (snap)
-Assigned To:  
+Assigned To:  jmertic
 New Comment:

Assigned to the installer maintainer.


Previous Comments:


[2007-08-10 04:10:44] ericrose at hotmail dot com

Description:

I originally wrote this for beginner's who were having issues so bare
with me.
I've figured out what the problem is with installing php-5.2.3 and
mysql 5.0.16 on windows xp. with apache 2.0 I really don't know what's
happening, I'll leave that up to you. 

Anyways there seems to be a conflict going on, a "you can have one
thing but not the other scenario" When php5 windows binary installer
runs it creates your php.ini file, with all sorts of configuration data.
One very important line is extension_dir it looks something like this
extension_dir "C:\php\ext\" This directive tells php where it's
extension files are stored, in order to use mysql, you need to have
selected the extension mysql at the time of install, it copies the file
php_mysql.dll into the "C:\php\ext\" folder. 

You are also asked at the time of install, the path to your apache
config folder, it then writes some directives in the file httpd.conf, it
looks like this 

PHPIniDir "C:\\PHP5\\"
LoadModule php5_module "C:\\PHP5\\php5apache2.dll"

Now you may think that this looks all great, and you should have php
running along side mysql. Wrong! I can tell you how to get your mysql
working fine. Simply change the two forward slashes to one backwards
slash.

PHPIniDir "C:/PHP5/"
LoadModule php5_module "C:/PHP5/php5apache2.dll"

Restart your server and you'll be able to connect to your database.

Herein lies the double edged sword. Now you've lost much php
functionality, including error reporting.






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


#42233 [Csd]: [PATCH] Problems with ��� in extract()

2007-08-10 Thread jani
 ID:   42233
 Updated by:   [EMAIL PROTECTED]
 Reported By:  hkb at hkb dot it
 Status:   Closed
 Bug Type: Variables related
 Operating System: Windows 2003
 PHP Version:  5.2.4RC1
 Assigned To:  jani
 New Comment:

And fix fixed now too. (some extract() tests failed due to bad logic in
my earlier fix)


Previous Comments:


[2007-08-08 08:04:53] [EMAIL PROTECTED]

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.





[2007-08-07 14:57:21] [EMAIL PROTECTED]

This happens because extract() uses isalpha() for checking the validity
of variable name. Fix brewing..



[2007-08-07 13:11:23] hkb at hkb dot it

Description:

I Just updated PHP today from 5.2.0 to PHP 5.2.3 and found that
extract() didnt work if the array containes the danish letters "æ", "ø"
or "Ã¥"...

Try running the code below ant you will see that $æ is empty when it
should be "2"...

I hope you will fix this bug for your next release...

Reproduce code:
---
$test[0] = array("e" => "2", "æ" => "2");

print_r($test[0]);

extract($test[0]);


echo "".$e." - ".$test[0]['e'];
echo "".$æ." - ".$test[0]['æ'];

Expected result:

Array ( [e] => 2 [æ] => 2 )

2 - 2

2 - 2

Actual result:
--
Array ( [e] => 2 [æ] => 2 )

2 - 2

- 2





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


#29521 [Fbk->Asn]: compress.bzip2 wrapper

2007-08-10 Thread nlopess
 ID:   29521
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Feedback
+Status:   Assigned
 Bug Type: Bzip2 Related
 Operating System: win32 only
 PHP Version:  5.2CVS-2007-01-10
 Assigned To:  iliaa
 New Comment:

I don't think this has anything to do with that bug. I checked both
filter and wrapper sources and they are too different.


Previous Comments:


[2007-08-05 18:17:43] phofstetter at sensational dot ch

Hi,

being the reporter of bug #42117, I think this really is the same thing
and I actually reported a duplicate (terribly sorry for this), though
"my" bug is about the bzip2.compress *filter* where this is about the
stream *wrapper*, but the bug really feels like being the same problem.

Also, the warning is consistent to what I have seen in my case and to
what the incorrect checking of that error code (see #42117) would
cause.

I'm really having my hopes up that this is going to be fixed now :-)

Philip



[2007-08-04 21:03:19] [EMAIL PROTECTED]

See bug #42117 which might be the same issue. Nuno, can you try the
patch?




[2007-01-12 22:10:27] [EMAIL PROTECTED]

yep, it still issue the same warning.



[2007-01-12 16:45:32] [EMAIL PROTECTED]

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





[2005-11-17 19:18:23] [EMAIL PROTECTED]

Warning:
fopen(compress.bzip2://http://pt.php.net/backend/notes/all.bz2): failed
to open stream: Invalid argument in C:\Documents and Settings\Nuno\- on
line 3



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

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