#45165 [NEW]: function money_format() : space missing from currency symbols

2008-06-04 Thread richard dot gunn at deckard dot worldonline dot co dot uk
From: richard dot gunn at deckard dot worldonline dot co dot uk
Operating system: Linux (Ubuntu 8.04)
PHP version:  5.2.6
PHP Bug Type: Unknown/Other Function
Bug description:  function money_format() : space missing from currency symbols 

Description:

I noticed that the money_format() function appears to work in an
inconsistent manner depending on the locale.

(Compare the expected output with the actual output)

I would expect GBP, CAD and AUD to be formatted the same as USD - i.e. a
space between the currency symbol and the numeric.

It's a minor issue with an easy workaround, but I'd thought I'd "do the
right thing" and raise a bug report.

Reproduce code:
---
$number = 10.698 ;

$arrCountry = array ('GB', 'US', 'CA', 'AU') ;

foreach ($arrCountry as $currCountry) {

$locale = 'en_' . $currCountry . '.UTF-8';
setlocale (LC_MONETARY, $locale);

$locale_info = localeconv();
$currency = $locale_info['int_curr_symbol'];

$amount = money_format('%i', $number);
 
printf ("%s [%s] %s \n",$locale, $currency, $amount);
}

Expected result:

en_GB.UTF-8 [GBP ] GBP 100,000.70 
en_US.UTF-8 [USD ] USD 100,000.70 
en_CA.UTF-8 [CAD ] CAD 100,000.70 
en_AU.UTF-8 [AUD ] AUD 100,000.70 

Actual result:
--
en_GB.UTF-8 [GBP ] GBP100,000.70 
en_US.UTF-8 [USD ] USD 100,000.70 
en_CA.UTF-8 [CAD ] CAD100,000.70 
en_AU.UTF-8 [AUD ] AUD100,000.70 

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



#45167 [NEW]: timezones returned by datetime objects are not accepted by other functions

2008-06-04 Thread peter dot bex at solide-ict dot nl
From: peter dot bex at solide-ict dot nl
Operating system: NetBSD/amd64
PHP version:  5.2.6
PHP Bug Type: Date/time related
Bug description:  timezones returned by datetime objects are not accepted by 
other functions

Description:

When creating a datetime object from a string that includes timezone
offset information (like "10:00:00+02:00"), the timezone object's name can
not be used for creating new timezone objects or setting the default
timezone. In effect, it's an "impossible object": there's no way to
recreate an object like that yourself.

This also means you would get unexpected results when using, for example,
strftime(). If you use date_default_timezone_set to change the timezone to
the object's timezone and print the date info, it will give you the wrong
output.

Reproduce code:
---
getTimeZone()->getName();
echo "Setting timezone: $name\n";
date_default_timezone_set($name);
echo "After: ".date_default_timezone_get()."\n";
echo "strftime: ".strftime('%H:%M:%S', $foo->format('U'))."\n";

$bar = new datetimezone($name);
echo "datetimezone object name: ".$bar->getName();
?>

Expected result:

Before: UTC
Setting timezone: GMT+02
After: GMT+02
strftime: 10:00:00
datetimezone object name: GMT+02

(not sure if GMT+02 is the correct timezone name. In any case, it should
be some timezone name that's accepted by other timezone-related
functions/classes)

Actual result:
--
Before: UTC
Setting timezone: +02:00
After: UTC
strftime: 08:00:00

PHP Fatal error:  Uncaught exception 'Exception' with message
'DateTimeZone::__construct(): Unknown or bad timezone (+02:00)' in
/path/to/index.php:10


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



#45167 [Opn->Asn]: timezones returned by datetime objects are not accepted by other functions

2008-06-04 Thread derick
 ID:   45167
 Updated by:   [EMAIL PROTECTED]
 Reported By:  peter dot bex at solide-ict dot nl
-Status:   Open
+Status:   Assigned
 Bug Type: Date/time related
 Operating System: NetBSD/amd64
 PHP Version:  5.2.6
-Assigned To:  
+Assigned To:  derick
 New Comment:

Not really a bug, as it wasn't meant to do this for anything else than
timezone objects of type 3 (identifiers) - but that doesn't mean we
can't add it.


Previous Comments:


[2008-06-04 10:13:19] peter dot bex at solide-ict dot nl

Description:

When creating a datetime object from a string that includes timezone
offset information (like "10:00:00+02:00"), the timezone object's name
can not be used for creating new timezone objects or setting the default
timezone. In effect, it's an "impossible object": there's no way to
recreate an object like that yourself.

This also means you would get unexpected results when using, for
example, strftime(). If you use date_default_timezone_set to change the
timezone to the object's timezone and print the date info, it will give
you the wrong output.

Reproduce code:
---
getTimeZone()->getName();
echo "Setting timezone: $name\n";
date_default_timezone_set($name);
echo "After: ".date_default_timezone_get()."\n";
echo "strftime: ".strftime('%H:%M:%S', $foo->format('U'))."\n";

$bar = new datetimezone($name);
echo "datetimezone object name: ".$bar->getName();
?>

Expected result:

Before: UTC
Setting timezone: GMT+02
After: GMT+02
strftime: 10:00:00
datetimezone object name: GMT+02

(not sure if GMT+02 is the correct timezone name. In any case, it
should be some timezone name that's accepted by other timezone-related
functions/classes)

Actual result:
--
Before: UTC
Setting timezone: +02:00
After: UTC
strftime: 08:00:00

PHP Fatal error:  Uncaught exception 'Exception' with message
'DateTimeZone::__construct(): Unknown or bad timezone (+02:00)' in
/path/to/index.php:10






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



#45168 [NEW]: Method call lets PHP crash Apache

2008-06-04 Thread webtweakers at gmail dot com
From: webtweakers at gmail dot com
Operating system: Vista
PHP version:  5.2.6
PHP Bug Type: Reproducible crash
Bug description:  Method call lets PHP crash Apache

Description:

A method call that passes on an Int and an Object seems to let PHP crash
Apache.

I'm running PHP 5.2.0, but tested and experienced the same in PHP 5.2.6.
Also I'm running PHP as a module for Apache 2.0.

Sorry that the code below is more then 20 lines: I just needed to
illustrate the structure, because the call in itself looks very harmless
and has no real reason to crash. Note that this whole thing is loaded from
within an MVC-framework (bases on TinyMVC) and makes use of PHP's class
autoload functionality. Also, besides code posted below, other stuff is
run, including MySQL queries, etc.

The method call that crashes PHP + Apache is marked in the code.


Reproduce code:
---
id = $id;
}

public function getId() {
return $this->id;
}

}

// class Prop -
class Prop {

private $a;
private $b;
private $c;

public function __construct() {
$this->a = 1;
$this->b = 2;
$this->c = 3;
}

public function getA() { return $this->a; }
public function getB() { return $this->b; }
public function getC() { return $this->c; }

}

// class Stats 
class Stats {

public static function insert($id, &$obj) {
print "Do something with id $id and object: " . 
print_r($obj, 1) .
"";
}

}

// class Controller ---
class Controller {

public function action() {
$data = new Data(123);
$prop = new Prop();
Stats::insert($data->getId(), $prop); // <-- this call 
crashes php!
}

}

// bootstrap --
$c = new Controller;
$c->action();

?>


Expected result:

Unfortunately the code above runs fine on its own. But from within the
application the marked line will crash PHP + Apache.

When commenting that line out, things run fine.

When changing the call to pass on several separate properties instead of
the $prop object, things run fine.


Actual result:
--
Here is a crash report for PHP 5.2.0, but again: the same crash happens in
PHP 5.2.6, so I'm sure you guys can handle this.

---

Thread 3 - System ID 316
Entry point   msvcrt!_endthreadex+6f 
Create time   4-6-2008 11:12:18 
Time spent in user mode   0 Days 0:0:0.234 
Time spent in kernel mode   0 Days 0:0:0.390 


Function Arg 1 Arg 2 Arg 3   Source 
php5ts!zend_mm_alloc+13d 01597940 002f 
php5ts!emalloc+21   


PHP5TS!ZEND_MM_ALLOC+13DWARNING - DebugDiag was not able to locate debug
symbols for php5ts.dll, so the information below may be incomplete.


In
httpd__PID__2512__Date__06_04_2008__Time_11_48_34AM__171__Second_Chance_Exception_C005.dmp
the assembly instruction at php5ts!zend_mm_alloc+13d in
C:\bin\php-5.2.0\php5ts.dll from The PHP Group has caused an access
violation exception (0xC005) when trying to write to memory location
0x10ddbfd0 on thread 3

Module Information 
Image Name: C:\bin\php-5.2.0\php5ts.dll   Symbol Type:  Export 
Base address: 0x00da   Time Stamp:  Thu Nov 02 11:54:41 2006  
Checksum: 0x   Comments:   
COM DLL: False   Company Name:  The PHP Group 
ISAPIExtension: False   File Description:  PHP Script Interpreter 
ISAPIFilter: False   File Version:  5.2.0.0 
Managed DLL: False   Internal Name:  php5ts.dll 
VB DLL: False   Legal Copyright:  Copyright © 1997-2006 The PHP Group 
Loaded Image Name:  php5ts.dll   Legal Trademarks:  PHP 
Mapped Image Name:  C:\bin\php-5.2.0\php5ts.dll   Original filename: 
php5ts.dll 
Module name:  php5ts   Private Build:   
Single Threaded:  False   Product Name:  PHP Script Interpreter 
Module Size:  4,77 MBytes   Product Version:  5.2.0 
Symbol File Name:  php5ts.dll   Special Build:  & 

---

I hope the above is readable for you.

Best regards,
Bas van Gaalen


-- 
Edit bug report at http://bugs.php.net/?id=45168&edit=1
-- 
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=45168&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): 
http://bugs.php.net/fix.php?id=45168&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=45168&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=45168&r=fixedcvs
Fixed in release: 
http://bugs.php.net/fix.php?id=45168&r=alreadyfixed
Need backtrace: 

#45169 [NEW]: PDO Some error messages are uninformative

2008-06-04 Thread ian dot lewis at mediatel dot co dot uk
From: ian dot lewis at mediatel dot co dot uk
Operating system: Linux Ubuntu
PHP version:  5.2.6
PHP Bug Type: PDO related
Bug description:  PDO Some error messages are uninformative

Description:

The error message is given below.

PDOException: SQLSTATE[HY093]: Invalid parameter number: number of bound
variables does not match number of tokens in xxx.php

It would be - extremely - helpful if the error message contained a list of
the matched tokens or some information on where the token substitution
failed.



Reproduce code:
---
$query = "SELECT *
FROM example_table et
WHERE start_date BETWEEN ':sStartDate' AND ':sEndDate'
 AND user_id = :iId"



$sStatement->bindParam(':iId', $iUserId,  PDO::PARAM_INT);
$sStatement->bindParam(':sStartDate',  $sStartDate,PDO::PARAM_STR);
$sStatement->bindParam(':sEndDate',$sEndDate,  PDO::PARAM_STR);
$sStatement->execute();

The error PDOException: SQLSTATE[HY093]: Invalid parameter number: number
of bound variables does not match number of tokens in xxx.php

Expected result:

Expect to see either no error because it worked or a message such as

PDOException: SQLSTATE[HY093]: Invalid parameter number: number of bound
variables does not match number of tokens in xxx.php. Cannot find   token
:sStartDate

Actual result:
--
PDOException: SQLSTATE[HY093]: Invalid parameter number: number of bound
variables does not match number of tokens in xxx.php



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



#45167 [Asn]: timezones returned by datetime objects are not accepted by other functions

2008-06-04 Thread peter dot bex at solide-ict dot nl
 ID:   45167
 User updated by:  peter dot bex at solide-ict dot nl
 Reported By:  peter dot bex at solide-ict dot nl
 Status:   Assigned
 Bug Type: Date/time related
 Operating System: NetBSD/amd64
 PHP Version:  5.2.6
 Assigned To:  derick
 New Comment:

Can you elaborate a bit more? Why wasn't this intended to work and what
on earth are "objects of type 3"? The "(identifiers)" note doesn't help,
since identifiers are to me names for things in a programming language
(like variable names or class name and such).

Also, shouldn't date_default_timezone_set() throw an exception in the
way that the timezone class does when you pass it an invalid timezone?
Silently ignoring the timezone and doing nothing is what caused me a lot
of frustration and confusion in tracking what was going wrong in my
script. It took me a while before I found out that this was not working
(again, it is *very* unintuitive, and IMHO it qualifies as a bug).


Previous Comments:


[2008-06-04 10:27:21] [EMAIL PROTECTED]

Not really a bug, as it wasn't meant to do this for anything else than
timezone objects of type 3 (identifiers) - but that doesn't mean we
can't add it.



[2008-06-04 10:13:19] peter dot bex at solide-ict dot nl

Description:

When creating a datetime object from a string that includes timezone
offset information (like "10:00:00+02:00"), the timezone object's name
can not be used for creating new timezone objects or setting the default
timezone. In effect, it's an "impossible object": there's no way to
recreate an object like that yourself.

This also means you would get unexpected results when using, for
example, strftime(). If you use date_default_timezone_set to change the
timezone to the object's timezone and print the date info, it will give
you the wrong output.

Reproduce code:
---
getTimeZone()->getName();
echo "Setting timezone: $name\n";
date_default_timezone_set($name);
echo "After: ".date_default_timezone_get()."\n";
echo "strftime: ".strftime('%H:%M:%S', $foo->format('U'))."\n";

$bar = new datetimezone($name);
echo "datetimezone object name: ".$bar->getName();
?>

Expected result:

Before: UTC
Setting timezone: GMT+02
After: GMT+02
strftime: 10:00:00
datetimezone object name: GMT+02

(not sure if GMT+02 is the correct timezone name. In any case, it
should be some timezone name that's accepted by other timezone-related
functions/classes)

Actual result:
--
Before: UTC
Setting timezone: +02:00
After: UTC
strftime: 08:00:00

PHP Fatal error:  Uncaught exception 'Exception' with message
'DateTimeZone::__construct(): Unknown or bad timezone (+02:00)' in
/path/to/index.php:10






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



#45167 [Asn]: timezones returned by datetime objects are not accepted by other functions

2008-06-04 Thread derick
 ID:   45167
 Updated by:   [EMAIL PROTECTED]
 Reported By:  peter dot bex at solide-ict dot nl
 Status:   Assigned
 Bug Type: Date/time related
 Operating System: NetBSD/amd64
 PHP Version:  5.2.6
 Assigned To:  derick
 New Comment:

date_default_timezone_set() doesn't throw an exception because it's a
procedural function. Instead, it returns false in case the
$timezone_identifier is invalid.

The identifier that I meant, is one of the Timezone Identifiers that
are documented here: http://no2.php.net/timezones


Previous Comments:


[2008-06-04 11:47:13] peter dot bex at solide-ict dot nl

Can you elaborate a bit more? Why wasn't this intended to work and what
on earth are "objects of type 3"? The "(identifiers)" note doesn't help,
since identifiers are to me names for things in a programming language
(like variable names or class name and such).

Also, shouldn't date_default_timezone_set() throw an exception in the
way that the timezone class does when you pass it an invalid timezone?
Silently ignoring the timezone and doing nothing is what caused me a lot
of frustration and confusion in tracking what was going wrong in my
script. It took me a while before I found out that this was not working
(again, it is *very* unintuitive, and IMHO it qualifies as a bug).



[2008-06-04 10:27:21] [EMAIL PROTECTED]

Not really a bug, as it wasn't meant to do this for anything else than
timezone objects of type 3 (identifiers) - but that doesn't mean we
can't add it.



[2008-06-04 10:13:19] peter dot bex at solide-ict dot nl

Description:

When creating a datetime object from a string that includes timezone
offset information (like "10:00:00+02:00"), the timezone object's name
can not be used for creating new timezone objects or setting the default
timezone. In effect, it's an "impossible object": there's no way to
recreate an object like that yourself.

This also means you would get unexpected results when using, for
example, strftime(). If you use date_default_timezone_set to change the
timezone to the object's timezone and print the date info, it will give
you the wrong output.

Reproduce code:
---
getTimeZone()->getName();
echo "Setting timezone: $name\n";
date_default_timezone_set($name);
echo "After: ".date_default_timezone_get()."\n";
echo "strftime: ".strftime('%H:%M:%S', $foo->format('U'))."\n";

$bar = new datetimezone($name);
echo "datetimezone object name: ".$bar->getName();
?>

Expected result:

Before: UTC
Setting timezone: GMT+02
After: GMT+02
strftime: 10:00:00
datetimezone object name: GMT+02

(not sure if GMT+02 is the correct timezone name. In any case, it
should be some timezone name that's accepted by other timezone-related
functions/classes)

Actual result:
--
Before: UTC
Setting timezone: +02:00
After: UTC
strftime: 08:00:00

PHP Fatal error:  Uncaught exception 'Exception' with message
'DateTimeZone::__construct(): Unknown or bad timezone (+02:00)' in
/path/to/index.php:10






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



#45170 [NEW]: Reference and key() problem

2008-06-04 Thread johnny at eiole dot com
From: johnny at eiole dot com
Operating system: Windows
PHP version:  5.2.6
PHP Bug Type: Class/Object related
Bug description:  Reference and key() problem

Description:

When an static array if retourned from a method, for iterating, and
acceded with the key() function, the reference pointer is moved to the end
of the array.

After the loop, the array is unaccessible.

Important : if you add the following line : 

$tab = testbug::getTab();

before the loop, the error does not occur.

you can use key(), current(), prev(), there is still a bug.

First tested on windows 5.2.5 version, and still present on 5.2.6
version.

There is no bug on 5.2.3 version.

Thanks for answer.



Reproduce code:
---
 "elm1",
'k2' => "elm2",
'k3' => "elm3",
'k4' => "elm4",
);

static function getTab()
{
return self::$tab;
}
}

var_dump(testbug::getTab());
foreach (testbug::getTab() as $k => $v)
{
key(testbug::getTab());
}
var_dump(testbug::getTab());

Expected result:

array
  'k1' => string 'elm1' (length=4)
  'k2' => string 'elm2' (length=4)
  'k3' => string 'elm3' (length=4)
  'k4' => string 'elm4' (length=4)

array
  'k1' => string 'elm1' (length=4)
  'k2' => string 'elm2' (length=4)
  'k3' => string 'elm3' (length=4)
  'k4' => string 'elm4' (length=4)


Actual result:
--
array
  'k1' => string 'elm1' (length=4)
  'k2' => string 'elm2' (length=4)
  'k3' => string 'elm3' (length=4)
  'k4' => string 'elm4' (length=4)

null


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



#45167 [Asn]: timezones returned by datetime objects are not accepted by other functions

2008-06-04 Thread peter dot bex at solide-ict dot nl
 ID:   45167
 User updated by:  peter dot bex at solide-ict dot nl
 Reported By:  peter dot bex at solide-ict dot nl
 Status:   Assigned
 Bug Type: Date/time related
 Operating System: NetBSD/amd64
 PHP Version:  5.2.6
 Assigned To:  derick
 New Comment:

So what's type 3 then? (and what are types 1 and 2?)


Previous Comments:


[2008-06-04 11:54:31] [EMAIL PROTECTED]

date_default_timezone_set() doesn't throw an exception because it's a
procedural function. Instead, it returns false in case the
$timezone_identifier is invalid.

The identifier that I meant, is one of the Timezone Identifiers that
are documented here: http://no2.php.net/timezones



[2008-06-04 11:47:13] peter dot bex at solide-ict dot nl

Can you elaborate a bit more? Why wasn't this intended to work and what
on earth are "objects of type 3"? The "(identifiers)" note doesn't help,
since identifiers are to me names for things in a programming language
(like variable names or class name and such).

Also, shouldn't date_default_timezone_set() throw an exception in the
way that the timezone class does when you pass it an invalid timezone?
Silently ignoring the timezone and doing nothing is what caused me a lot
of frustration and confusion in tracking what was going wrong in my
script. It took me a while before I found out that this was not working
(again, it is *very* unintuitive, and IMHO it qualifies as a bug).



[2008-06-04 10:27:21] [EMAIL PROTECTED]

Not really a bug, as it wasn't meant to do this for anything else than
timezone objects of type 3 (identifiers) - but that doesn't mean we
can't add it.



[2008-06-04 10:13:19] peter dot bex at solide-ict dot nl

Description:

When creating a datetime object from a string that includes timezone
offset information (like "10:00:00+02:00"), the timezone object's name
can not be used for creating new timezone objects or setting the default
timezone. In effect, it's an "impossible object": there's no way to
recreate an object like that yourself.

This also means you would get unexpected results when using, for
example, strftime(). If you use date_default_timezone_set to change the
timezone to the object's timezone and print the date info, it will give
you the wrong output.

Reproduce code:
---
getTimeZone()->getName();
echo "Setting timezone: $name\n";
date_default_timezone_set($name);
echo "After: ".date_default_timezone_get()."\n";
echo "strftime: ".strftime('%H:%M:%S', $foo->format('U'))."\n";

$bar = new datetimezone($name);
echo "datetimezone object name: ".$bar->getName();
?>

Expected result:

Before: UTC
Setting timezone: GMT+02
After: GMT+02
strftime: 10:00:00
datetimezone object name: GMT+02

(not sure if GMT+02 is the correct timezone name. In any case, it
should be some timezone name that's accepted by other timezone-related
functions/classes)

Actual result:
--
Before: UTC
Setting timezone: +02:00
After: UTC
strftime: 08:00:00

PHP Fatal error:  Uncaught exception 'Exception' with message
'DateTimeZone::__construct(): Unknown or bad timezone (+02:00)' in
/path/to/index.php:10






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



#44645 [Com]: php5ts.dll Crash (x86_64 base machines)

2008-06-04 Thread neil dot smith at coull dot com
 ID:   44645
 Comment by:   neil dot smith at coull dot com
 Reported By:  gary dot wilson at coull dot biz
 Status:   Open
 Bug Type: Reproducible crash
 Operating System: Windows Server 2003
 PHP Version:  5.2.5
 New Comment:

Correction to last statement : 

"Adding memcache caching of DB response resulted in non-repro"

DB requests were not fully removed in the test harness code. With DB
requests prevented, this bug is still repro under high request loads (so
it not specifically MySQL / DB connection dependent).

Fault address remains at 0x926a in php5ts.dll


Previous Comments:


[2008-06-03 16:11:02] neil dot smith at coull dot com

The following should be a crash dump illustrating the problem.

It was generated as per instructions "Generating backtrace without
compiler" at http://bugs.php.net/bugs-generating-backtrace-win32.php


Configuration : Apache/2.2.3 (Win32) PHP/5.2.5, WinXP SP3


The isue occurred during load testing using JMeter on a script which
made moderate MySQL use and medium-heavy XML DOM node creation.

Adding memcache caching of DB response resulted in non-repro, which IMO
may indicate some involvement of number of DB connections or similar
(running script threads between them had around 876 instances of DB
connections in
TCP   192.168.2.38:3061192.168.2.15:3306   TIME_WAIT state)



==  Follows  =


 
 Analysis Summary  
  Type Description Recommendation 
  Error WARNING - DebugDiag was not able to locate debug symbols for
php5ts.dll, so the information below may be incomplete.



In
httpd__PID__3584__Date__06_03_2008__Time_04_57_08PM__928__Second_Chance_Exception_C005.dmp
the assembly instruction at php5ts!zend_mm_shutdown+f49 in
C:\Applications\php5\php5ts.dll from The PHP Group has caused an access
violation exception (0xC005) when trying to read from memory
location 0x000c on thread 246
 Please follow up with the vendor The PHP Group for
C:\Applications\php5\php5ts.dll
 
  Information DebugDiag determined that this dump file
(httpd__PID__3584__Date__06_03_2008__Time_04_57_08PM__928__Second_Chance_Exception_C005.dmp)
is a crash dump and did not perform any hang analysis. If you wish to
enable combined crash and hang analysis for crash dumps, edit the
CrashHangAnalysis.asp script (located in the DebugDiag\Scripts folder)
and set the g_DoCombinedAnalysis constant to True.   
 
 


 
 Analysis Details  
  


 Your browser settings are currently prohibiting this report's scripts
from running.

This is preventing some features of this analysis report from
displaying properly. To enable scripts to run, right-click the security
warning above and choose "Allow Blocked Content..." or enable the "Allow
active content to run in files on My Computer*" setting on the Advanced
tab of your "Internet Options" dialog to avoid being prompted in the
future 





Table Of Contents
httpd__PID__3584__Date__06_03_2008__Time_04_57_08PM__928__Second_Chance_Exception_C005.dmp

   Faulting Thread

   Faulting Module Information



 Report for
httpd__PID__3584__Date__06_03_2008__Time_04_57_08PM__928__Second_Chance_Exception_C005.dmp




Report for
httpd__PID__3584__Date__06_03_2008__Time_04_57_08PM__928__Second_Chance_Exception_C005.dmp
Type of Analysis Performed   Crash Analysis 
Machine Name   DEVBOX_NS 
Operating System   Windows XP Service Pack 2 
Number Of Processors   2 
Process ID   3584 
Process Image   C:\Applications\Apache2.2\bin\httpd.exe 
System Up-Time   06:41:14 
Process Up-Time   00:00:05 


Thread 246 - System ID 3348
Entry point   msvcrt!_endthreadex+3a 
Create time   03/06/2008 16:57:04 
Time spent in user mode   0 Days 0:0:0.187 
Time spent in kernel mode   0 Days 0:0:0.78 






Function Arg 1 Arg 2 Arg 3   Source 
php5ts!zend_mm_shutdown+f49 058ab930 0003 100b5f17
php5ts!efree+39 008ca860 069f8c4c 10095f13
php5ts!zval_dtor_func+27 008ca848 069f8c65 100993d3
php5ts!zval_ptr_dtor+23 069f8c4c 069f8a38 069f8bc0
php5ts!zend_hash_add_or_update+1b3 069f8be8 102c6940
0005
php5ts!zend_reflection_class_factory+215d 06977098 05f72178

php5ts!zend_reflection_class_factory+204d  069f89d8

php5ts!execute_internal+37 0530f674 0001 058aa688
php_xdebug_2_0_3_5_2_5!get_module+367c 0530f674 0001

php5ts!execute+a37 0530f674 058aa688 1001c3e5
php5ts!execute+245 069d96d0 058aa688 0530f748
php_xdebug_2_0_3_5_2_5!get_module+27ff 069d96d0 058aa688
05f89340
php5ts!execute+b48 0530f748 058aa688 1001c3e5
php5ts!execute+245 05f89340 058aa688 0530f81c
php_xdebug_2_0_3_5_2_5!get_module+27ff 05f89340 058aa688
05f8aea0
p

#45167 [Asn]: timezones returned by datetime objects are not accepted by other functions

2008-06-04 Thread derick
 ID:   45167
 Updated by:   [EMAIL PROTECTED]
 Reported By:  peter dot bex at solide-ict dot nl
 Status:   Assigned
 Bug Type: Date/time related
 Operating System: NetBSD/amd64
 PHP Version:  5.2.6
 Assigned To:  derick
 New Comment:

Type 1 = UTC offset (+02:00)
Type 2 = Timezone Abbreviation (CEST, PDT)
Type 3 = Timezone Identifier (Europe/Oslo)

You can see this back in the output of date_parse() for example.


Previous Comments:


[2008-06-04 12:01:46] peter dot bex at solide-ict dot nl

So what's type 3 then? (and what are types 1 and 2?)



[2008-06-04 11:54:31] [EMAIL PROTECTED]

date_default_timezone_set() doesn't throw an exception because it's a
procedural function. Instead, it returns false in case the
$timezone_identifier is invalid.

The identifier that I meant, is one of the Timezone Identifiers that
are documented here: http://no2.php.net/timezones



[2008-06-04 11:47:13] peter dot bex at solide-ict dot nl

Can you elaborate a bit more? Why wasn't this intended to work and what
on earth are "objects of type 3"? The "(identifiers)" note doesn't help,
since identifiers are to me names for things in a programming language
(like variable names or class name and such).

Also, shouldn't date_default_timezone_set() throw an exception in the
way that the timezone class does when you pass it an invalid timezone?
Silently ignoring the timezone and doing nothing is what caused me a lot
of frustration and confusion in tracking what was going wrong in my
script. It took me a while before I found out that this was not working
(again, it is *very* unintuitive, and IMHO it qualifies as a bug).



[2008-06-04 10:27:21] [EMAIL PROTECTED]

Not really a bug, as it wasn't meant to do this for anything else than
timezone objects of type 3 (identifiers) - but that doesn't mean we
can't add it.



[2008-06-04 10:13:19] peter dot bex at solide-ict dot nl

Description:

When creating a datetime object from a string that includes timezone
offset information (like "10:00:00+02:00"), the timezone object's name
can not be used for creating new timezone objects or setting the default
timezone. In effect, it's an "impossible object": there's no way to
recreate an object like that yourself.

This also means you would get unexpected results when using, for
example, strftime(). If you use date_default_timezone_set to change the
timezone to the object's timezone and print the date info, it will give
you the wrong output.

Reproduce code:
---
getTimeZone()->getName();
echo "Setting timezone: $name\n";
date_default_timezone_set($name);
echo "After: ".date_default_timezone_get()."\n";
echo "strftime: ".strftime('%H:%M:%S', $foo->format('U'))."\n";

$bar = new datetimezone($name);
echo "datetimezone object name: ".$bar->getName();
?>

Expected result:

Before: UTC
Setting timezone: GMT+02
After: GMT+02
strftime: 10:00:00
datetimezone object name: GMT+02

(not sure if GMT+02 is the correct timezone name. In any case, it
should be some timezone name that's accepted by other timezone-related
functions/classes)

Actual result:
--
Before: UTC
Setting timezone: +02:00
After: UTC
strftime: 08:00:00

PHP Fatal error:  Uncaught exception 'Exception' with message
'DateTimeZone::__construct(): Unknown or bad timezone (+02:00)' in
/path/to/index.php:10






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



#45172 [NEW]: A fatal error is not thrown if an eroneous php is included

2008-06-04 Thread givanz at yahoo dot com
From: givanz at yahoo dot com
Operating system: Debian Linux
PHP version:  5.2.6
PHP Bug Type: Output Control
Bug description:  A fatal error is not thrown if an eroneous php is included

Description:

The code is self explanatory

Reproduce code:
---


include.php below



Expected result:

No output

Actual result:
--
the script echoes 'This should not be echoed'

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



#45173 [NEW]: strftime formatting on datetime objects

2008-06-04 Thread peter dot bex at solide-ict dot nl
From: peter dot bex at solide-ict dot nl
Operating system: N/A
PHP version:  5.2.6
PHP Bug Type: Feature/Change Request
Bug description:  strftime formatting on datetime objects

Description:

1) The regular 'format' method on datetime objects only accepts date()
syntax, which is severely limited in what you can do with it. The strftime
syntax is more powerful.

2) As discussed in bug 45167, there's no way to call strftime using
datetime object values reliably, because there are ways to create datetime
objects with bogus timezone objects (objects which can not be recreated nor
can their names be passed to date_default_timezone_set).

Because of 1) and 2), there is a need to get strftime integrated in the
datetime class.

Reproduce code:
---
N/A

Expected result:

N/A

Actual result:
--
N/A

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



#45167 [Asn]: timezones returned by datetime objects are not accepted by other functions

2008-06-04 Thread peter dot bex at solide-ict dot nl
 ID:   45167
 User updated by:  peter dot bex at solide-ict dot nl
 Reported By:  peter dot bex at solide-ict dot nl
 Status:   Assigned
 Bug Type: Date/time related
 Operating System: NetBSD/amd64
 PHP Version:  5.2.6
 Assigned To:  derick
 New Comment:

What this means is that there is absolutely no reliable way to use
strftime on a datetime object with a timezone like that. I've created a
feature request (45173) for a strftime method on the datetime class.


Previous Comments:


[2008-06-04 12:07:35] [EMAIL PROTECTED]

Type 1 = UTC offset (+02:00)
Type 2 = Timezone Abbreviation (CEST, PDT)
Type 3 = Timezone Identifier (Europe/Oslo)

You can see this back in the output of date_parse() for example.



[2008-06-04 12:01:46] peter dot bex at solide-ict dot nl

So what's type 3 then? (and what are types 1 and 2?)



[2008-06-04 11:54:31] [EMAIL PROTECTED]

date_default_timezone_set() doesn't throw an exception because it's a
procedural function. Instead, it returns false in case the
$timezone_identifier is invalid.

The identifier that I meant, is one of the Timezone Identifiers that
are documented here: http://no2.php.net/timezones



[2008-06-04 11:47:13] peter dot bex at solide-ict dot nl

Can you elaborate a bit more? Why wasn't this intended to work and what
on earth are "objects of type 3"? The "(identifiers)" note doesn't help,
since identifiers are to me names for things in a programming language
(like variable names or class name and such).

Also, shouldn't date_default_timezone_set() throw an exception in the
way that the timezone class does when you pass it an invalid timezone?
Silently ignoring the timezone and doing nothing is what caused me a lot
of frustration and confusion in tracking what was going wrong in my
script. It took me a while before I found out that this was not working
(again, it is *very* unintuitive, and IMHO it qualifies as a bug).



[2008-06-04 10:27:21] [EMAIL PROTECTED]

Not really a bug, as it wasn't meant to do this for anything else than
timezone objects of type 3 (identifiers) - but that doesn't mean we
can't add it.



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

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



#45172 [Opn->Bgs]: A fatal error is not thrown if an eroneous php is included

2008-06-04 Thread msaraujo
 ID:   45172
 Updated by:   [EMAIL PROTECTED]
 Reported By:  givanz at yahoo dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Output Control
 Operating System: Debian Linux
 PHP Version:  5.2.6
 New Comment:

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

http://br2.php.net/require


Previous Comments:


[2008-06-04 12:11:53] givanz at yahoo dot com

Description:

The code is self explanatory

Reproduce code:
---


include.php below



Expected result:

No output

Actual result:
--
the script echoes 'This should not be echoed'





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



#45175 [NEW]: Janis Dean weatherwoman FoxNews N.Y. hacked this website for storms in U.S.

2008-06-04 Thread costors at yahoo dot com
From: costors at yahoo dot com
Operating system: systemax
PHP version:  4.4.8
PHP Bug Type: Streams related
Bug description:  Janis Dean weatherwoman FoxNews N.Y. hacked this website for 
storms in U.S. 

Description:

Janice Dean my suspect of snide slang remark towards my silver mind
control report to this website.E-mail [EMAIL PROTECTED]

Reproduce code:
---
She's into devil worship from Wisconsin USA and a computer hacker.

Expected result:

 Why hasn't this woman plus others who are connected to election swinging
with squid and other devise used no correct spelling information word
begins with d, been apprehended with other the illegal beagles in this
country. You had better find a new Department of Defence head and dump
Gates. Get him a U. of MASS. job.

Actual result:
--
Weather report from Janice Dean Fox television channel New York. Others
who are reporters that are citizens of other countries.

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



#18765 [Com]: FORM POST fields are missing

2008-06-04 Thread alex at alexmreis dot com
 ID:   18765
 Comment by:   alex at alexmreis dot com
 Reported By:  dannysy at hotmail dot com
 Status:   No Feedback
 Bug Type: *General Issues
 Operating System: Windows 95
 PHP Version:  4.2.2
 New Comment:

K, for anyone still having a problem with this, as I had yesterday,
replace the use of $_POST for the following function:

function decodePost(){
$var = file_get_contents('php://input');
$postContent = explode('&',$var);
for($i = 0; $i < count($postContent); $i++){
$postContent[$i] = urldecode($postContent[$i]);
$map = explode('=', $postContent[$i]);
$post[$map[0]] = $map[1];
}
return $post;   
}

It does not process arrays like PHP though, but still a fine workaround
on an unsolved bug even on PHP 5.


Previous Comments:


[2003-02-04 16:26:24] s dot franke at bebbosoft dot de

Using php.exe as CGI under WindowsXP and
PHP 4.3.0 or PHP 4.2.3 leads me to same problem:

Settings in PHP.ini:
register_globals = On
always_populate_raw_post_data = Off

_POST is not initialized.

CONTENT_TYPE is "multipart/form-data"

What I also detect: PHP does not touch the POST data - you can read the
POST data manually:

  $fp = fopen("php://stdin", "r");
  $buf = fread($fp, $_ENV["CONTENT_LENGTH"]);
  echo ">>>".$buf."<<<";

Displays the complete data.



[2002-12-15 14:43:28] markus at markus dot dom dot de

i have the same problem with apache 2.0.43 and php-4.3rc3

checkout here: http://markus.dom.de/test/testform.html

if you like.

markus



[2002-11-05 14:04:42] nylbog at freemail dot hu

Having the same problem under winXP PHP 4.2.3



[2002-10-17 01:00:02] php-bugs at lists dot php dot net

No feedback was provided for this bug for over 2 weeks, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".



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

Please try using this CVS snapshot:

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





The 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/18765

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



#45176 [NEW]: Create image from ttf file failed

2008-06-04 Thread heyond at yahoo dot com dot cn
From: heyond at yahoo dot com dot cn
Operating system: windows 2003
PHP version:  5.2.6
PHP Bug Type: GD related
Bug description:  Create image from ttf file failed

Description:

I try to create a font image from ttf file, but I encounted a error :

Warning: imagettftext() [function.imagettftext]: Unable to find a CharMap
that I can handle in D:\www\mvc\ttf2.php on line 49

only few ttf file like this, I guess the freetypes version too lower.

Reproduce code:
---
imagettftext($im, $fontsize, 0, $x, $y, $fgcolor, $fontfile, 'abc');

Expected result:

a binary image.

Actual result:
--
Warning: imagettftext() [function.imagettftext]: Unable to find a CharMap
that I can handle in D:\www\guomo.com\ttf.php on line 33
ÿ?JFIFÿ>CREATOR: gd-jpeg v1.0 (using IJG JPEG v62), default quality
ÿC    $.' ",#(7),01444'9=82<.342ÿC 
2!!22ÿ(J"ÿ
ÿ?}!1AQa"q2‘?#B±ÁRÑð$3br?
%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyzƒ„…†‡ˆ‰Š’“”•–—˜™š¢£¤¥¦§¨©ª²³´µ¶·¸¹ºÂÃÄÅÆÇÈÉÊÒÓÔÕÖרÙÚáâãäåæçèéêñòóôõö÷øù?
ÿ?w!1AQaq"2?B‘¡±Á
#3R?br?$4??&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz‚ƒ„…†‡ˆ‰Š’“”•–—˜™š¢£¤¥¦§¨©ª²³´µ¶·¸¹ºÂÃÄÅÆÇÈÉÊÒÓÔÕÖרÙÚâãäåæçèéêòóôõö÷øùúÿ
?õJ(¢¸Í‚ÿ

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



#38143 [Com]: parse_url() cannot parse urls with "http://" in the url query or path

2008-06-04 Thread ptr at fnal dot gov
 ID:   38143
 Comment by:   ptr at fnal dot gov
 Reported By:  jalal at spread-it dot org
 Status:   No Feedback
 Bug Type: URL related
 Operating System: Fedora Core 4
 PHP Version:  4.4.2
 New Comment:

This bug still exists in 5.2.6 and it is causing Apache (2.2.8) to core
dump.  Under 5.2.4 the error did not cause core-dumps; this seems a
recent addition to 5.2.8.

Example:

[Wed Jun 04 10:58:56 2008] [error] [client xx.xx.xx.xx] PHP Warning: 
parse_url(//script/data/data.php?=http://www.7-miles.com/media/buddy_icons/users.txt??)
[function.parse-url]: Unable to parse
URL in /path/to/php/files/index.php on line 12

[Wed Jun 04 10:59:00 2008] [notice] child pid 4324 exit signal
Segmentation fault (11), possible coredump in /path/to/apache/server


OS: Solaris 10
Apache: 2.2.8
PHP: 5.2.6


Previous Comments:


[2006-07-30 01:00:02] 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".



[2006-07-22 12:14:44] [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





[2006-07-19 14:59:44] jalal at spread-it dot org

Description:

I noticed that parse_url cannot parse urls with "http://"; in the query
or in the path
For example :
http://www.google.fr/url?sa=t&oi=promos&cad=hppphou%3Afr_all&ct=pro&cd=1&url=http%3A%2F%2Fwww.google.fr%2Furl%3Fsa%3Dp%26pref%3Dig%26pval%3D3%26q%3Dhttp%3A%2F%2Fwww.google.fr%2Fig%253Fhl%253Dfr%2526tab%253Diw%2526q%253D&ei=Aka-RJ6_L7K8mgGezfGiCQ
http://www.yahoo.com/r/sx/*-http://search.yahoo.com/search

Reproduce code:
---
$url_info =
parse_url("http://www.yahoo.com/r/sx/*-http://search.yahoo.com/search";);

Expected result:

$url_info['scheme'] => "http"
$url_info['host'] => "www.yahoo.com"
...

Actual result:
--
Warning:
parse_url(http://www.yahoo.com/r/sx/*-http://search.yahoo.com/search):
Unable to parse url in /var/www/html/test/index.php on line 3





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



#45176 [Opn->Fbk]: Create image from ttf file failed

2008-06-04 Thread pajoye
 ID:   45176
 Updated by:   [EMAIL PROTECTED]
 Reported By:  heyond at yahoo dot com dot cn
-Status:   Open
+Status:   Feedback
 Bug Type: GD related
 Operating System: windows 2003
 PHP Version:  5.2.6
-Assigned To:  
+Assigned To:  pajoye
 New Comment:

"Warning: imagettftext() [function.imagettftext]: Unable to find a
CharMap that I can handle in D:\www\guomo.com\ttf.php on line 33"

Is a pretty clear error message.

Please provide a link to the font you are using a complete script to
reproduce your problem.




Previous Comments:


[2008-06-04 14:24:08] heyond at yahoo dot com dot cn

Description:

I try to create a font image from ttf file, but I encounted a error :

Warning: imagettftext() [function.imagettftext]: Unable to find a
CharMap that I can handle in D:\www\mvc\ttf2.php on line 49

only few ttf file like this, I guess the freetypes version too lower.

Reproduce code:
---
imagettftext($im, $fontsize, 0, $x, $y, $fgcolor, $fontfile, 'abc');

Expected result:

a binary image.

Actual result:
--
Warning: imagettftext() [function.imagettftext]: Unable to find a
CharMap that I can handle in D:\www\guomo.com\ttf.php on line 33
ÿ?JFIFÿ>CREATOR: gd-jpeg v1.0 (using IJG JPEG v62), default
quality ÿC    $.' ",#(7),01444'9=82<.342ÿC

2!!22ÿ(J"ÿ
ÿ?}!1AQa"q2‘?#B±ÁRÑð$3br?
%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyzƒ„…†‡ˆ‰Š’“”•–—˜™š¢£¤¥¦§¨©ª²³´µ¶·¸¹ºÂÃÄÅÆÇÈÉÊÒÓÔÕÖרÙÚáâãäåæçèéêñòóôõö÷øù?
ÿ?w!1AQaq"2?B‘¡±Á
#3R?br?$4??&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz‚ƒ„…†‡ˆ‰Š’“”•–—˜™š¢£¤¥¦§¨©ª²³´µ¶·¸¹ºÂÃÄÅÆÇÈÉÊÒÓÔÕÖרÙÚâãäåæçèéêòóôõö÷øùúÿ
?õJ(¢¸Í‚ÿ





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



#45177 [NEW]: Unable to compile with --with-gd switch, possible reopen of Bug#41555

2008-06-04 Thread ignos at sandboxed dot org
From: ignos at sandboxed dot org
Operating system: RedHat 9.0
PHP version:  5.2.6
PHP Bug Type: Compile Failure
Bug description:  Unable to compile with --with-gd switch, possible reopen of 
Bug#41555

Description:

I'm having compile failures when I try to use the --with-gd switch on my
configure script. I think that this bug was solved on Bug#41555(PHP 5.2.3),
but from 5.2.4 and up I couldn't achieve to compile it.

I tried to use the Bug#41555 suggestions on the configure code with a
little of guessing, but it didn't work either.

This problem is *partially* solved when you use your own customized and
compiled gd libraries (--with-gd=/usr/local), but I need to use the bundled
ones with PHP because I need the imagerotate() function.

Note: The configure options I submit work as expected with PHP5.2.3, but
not for any other later versions).

Reproduce code:
---
#make distclean

#./configure --enable-cgi --disable-fastcgi --enable-cli --prefix=/usr
--exec-prefix=/usr --sysconfdir=/etc --localstatedir=/var
--mandir=/usr/share/man --info
dir=/usr/share/info --with-config-file-path=/cgis/php
--enable-force-cgi-redirect --disable-debug --enable-pic --disable-rpath
--enable-inline-optimization --
with-freetype-dir=/usr --with-png-dir=/usr --with-gd
--enable-gd-native-ttf --with-ttf --with-jpeg-dir=/usr
--with-mm=/usr/local/mm --with-png --with-zlib --e
nable-bcmath --enable-debugger --enable-exif --enable-ftp
--enable-magic-quotes --enable-safe-mode --with-exec-dir=/usr/bin
--enable-sockets --enable-track-va
rs --enable-trans-sid --with-mysql=/usr/local/mysql --enable-ucd-snmp-hack
--enable-memory-limit --enable-shmop --enable-versioning --enable-calendar
--enable
-dbx --enable-dio --enable-mbstring --enable-mbstr-enc-trans
--with-bz2=/usr/lib --with-db4 --with-curl --with-dom --with-gdbm
--with-gettext --with-ncurses -
-with-gmp --with-iconv --with-pgsql=/usr/local --with-unixODBC
--with-mcrypt=/usr/local --with-pspell --with-xml=/usr/local --with-expat
--with-mhash --disabl
e-yp --disable-wddx --with-pear --without-oci8 --without-ldap
--without-snmp --with-openssl=/usr/local

#make

Expected result:

Successful compilation with PHP 5.2.6.

Actual result:
--
> configure output

configure: error: GD build test failed. Please check the config.log for
details.

> related config log information

...
configure:43284: gcc -o conftest -g -O2   -L/usr/local/lib
-L/usr/kerberos/lib conftest.c-lfreetype -lpng -lz -ljpeg -lssl
-lcrypto -ldb-4.0 -lgdbm -lcurl -lbz2 -lz -lssl -lcrypto -lresolv -lm -ldl
-lnsl  -lxml2 -lz -lm -lcurl -lxml2 -lz -lm 1>&5

(and now, the problem at the GD section of the configure script)
configure: failed program was:
#line 43273 "configure"
#include "confdefs.h"

char foobar () {}
char foobar();
int main() {
  foobar();
  return 0;
}

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



#45178 [NEW]: garbage collector and cyclic references

2008-06-04 Thread thomas dot jarosch at intra2net dot com
From: thomas dot jarosch at intra2net dot com
Operating system: Linux
PHP version:  5.3CVS-2008-06-04 (snap)
PHP Bug Type: Reproducible crash
Bug description:  garbage collector and cyclic references

Description:

Hello together,

I'm currently trying to find a heap corruption while using Horde and 
noticed a rather odd behavior. The supplied code is the standard way 
Horde does it singletons. We always used the syntax of "$object = 
&new class" to make it work  with PHP4 and PHP5. 

If I change that to "$object = new class", everything works as 
expected. I've found bug #32845 and noticed what we are doing seems 
wrong, so Horde needs fixing.

The problem gets worse if the class object contains a variable of the 
type "PEAR_Error", which contains cyclic references. Not only does 
the constructor get called every time, the object leaks memory like 
hell, even with PHP 5.3. I've searched through the bugtracker and 
thought the garbage collector now handles cyclic references,
but maybe this is a side-effect of something else going wrong.

Is the memory consumption by design?

Thanks in advance for any comment,
Thomas


Reproduce code:
---
error = PEAR::raiseError("error");
echo "Memory usage: " . memory_get_usage() . "\n";
}
}

for (;;) {
$a = Horde_History::singleton();
}


Expected result:

Constant memory usage.

Actual result:
--
Increasing memory usage.

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



#41350 [Com]: Error in my_thread_global_end()

2008-06-04 Thread onehourlate at hotmail dot com
 ID:   41350
 Comment by:   onehourlate at hotmail dot com
 Reported By:  graham at directhostinguk dot com
 Status:   Feedback
 Bug Type: MySQL related
 Operating System: Windows 2003
 PHP Version:  5.2.6
 Assigned To:  scottmac
 New Comment:

php 5.2.6, Windows Visa or XP
I confirm that the 5 seconds delay on exit is still there.

Grabbing libmysql.dll from the lastest stable Mysql (5.0.51b) didn't
help. Haven't tried to use binaries from php 5.2.1 yet.

The problem seems to appear as soon as I play with sockets.




Previous Comments:


[2008-05-31 03:00:57] da_pimp2004_966 at hotmail dot com

Ok, I used the updated versions of the files and I recieved this
error;

PHP Warning: PHP Startup: mysql: Unable to initialize module Module
compiled with module API=20060613, debug=0, thread-safety=1 PHP compiled
with module API=20060613, debug=0, thread-safety=0 These options need to
match in Unknown on line 0 

Anybody have any ideas?

[EMAIL PROTECTED] - any help appreciated.



[2008-05-30 04:04:35] louis at steelbytes dot com

still got slowness on exit with php 5.2.6 when using mysql AND CURL (As
somebody else noted in bug #41968 that was marked as a dupe of this
bug)

and still replacing libmysql.dll with the copy from php 5.2.1 fixes
it.

doesn't seem to be happending to me when only using mysql and not
curl?

PS, am using dl() to load these two extension - not php.ini



[2008-05-29 23:06:05] [EMAIL PROTECTED]

See bug #44078 for possible solution.



[2008-05-26 20:36:28] [EMAIL PROTECTED]

Fixeth or not, that's the question? Assigning to The One who should
know..



[2008-05-26 20:16:31] [EMAIL PROTECTED]

Still not properly fixed.



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

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



#45179 [NEW]: --with-mysql-sock fails to compile & work

2008-06-04 Thread daniel dot fallon at nuim dot ie
From: daniel dot fallon at nuim dot ie
Operating system: CentOS 4.5
PHP version:  5.2.6
PHP Bug Type: Compile Failure
Bug description:  --with-mysql-sock fails to compile & work

Description:

When using --with-mysql=/usr/local/mysql and having a nonstandard socket
(/home/databases/mysql/mysql.sock), the compiler throws a warning and fails
to compile PHP with the socket that was given via the --with-mysql-sock
option

I'm using PHP 5.2.6 and mySQL 5.0.51b (compiled from source)

/bin/sh /usr/src/php-5.2.6/libtool --silent --preserve-dup-deps
--mode=compile gcc  -Iext/mysql/ -I/usr/src/php-5.2.6/ext/mysql/
-DPHP_ATOM_INC -I/usr/src/php-5.2.6/include -I/usr/src/php-5.2.6/main
-I/usr/src/php-5.2.6 -I/usr/include/libxml2
-I/usr/src/php-5.2.6/ext/date/lib -I/usr/local/mysql/include/mysql
-I/usr/src/php-5.2.6/TSRM -I/usr/src/php-5.2.6/Zend-g -O2 
-prefer-non-pic -c /usr/src/php-5.2.6/ext/mysql/php_mysql.c -o
ext/mysql/php_mysql.lo 
In file included from /usr/local/mysql/include/mysql/mysql.h:71,
 from /usr/src/php-5.2.6/ext/mysql/php_mysql.c:67:
/usr/local/mysql/include/mysql/mysql_version.h:18:1: warning:
"MYSQL_UNIX_ADDR" redefined
In file included from /usr/src/php-5.2.6/TSRM/tsrm_config.h:1,
 from /usr/src/php-5.2.6/TSRM/tsrm_config_common.h:13,
 from /usr/src/php-5.2.6/TSRM/tsrm_virtual_cwd.h:26,
 from /usr/src/php-5.2.6/main/php.h:412,
 from /usr/src/php-5.2.6/ext/mysql/php_mysql.c:32:
/usr/src/php-5.2.6/include/../main/php_config.h:1891:1: warning: this is
the location of the previous definition


Reproduce code:
---
./configure 
--with-pear=/usr/lib/pear --with-mysql=shared,/usr/local/mysql
--with-mysql-sock=/home/databases/mysql/mysql --with-zlib-dir=/usr/include
--with-zlib=shared --with-apxs2=/usr/local/apache2/bin/apxs

Expected result:

PHP to throw no warnings during compile and use the new socket that I
defined through configure.

I expect phpinfo()'s MYSQL_SOCKET value to report the specified socket

Actual result:
--
phpinfo() shows MYSQL_SOCKET as /tmp/mysql.sock which is the value in
mysql_version.h 

There's a number of previous bug reports for this same issue, I don't know
what's happening to the fixes but it's not working at the minute.



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



#45179 [Com]: --with-mysql-sock fails to compile & work

2008-06-04 Thread teefee at test dot com
 ID:   45179
 Comment by:   teefee at test dot com
 Reported By:  daniel dot fallon at nuim dot ie
 Status:   Open
 Bug Type: Compile Failure
 Operating System: CentOS 4.5
 PHP Version:  5.2.6
 New Comment:

A suggested fix (elsewere) was simply to encase the #define
MYSQL_UNIX_ADDR statement in mysql_version.h in an #ifndef/#endif pair.
This appears to work on the face of things, with no warnings and
phpinfo() reporting MYSQL_SOCKET as the socket defined in configure.

However, PHP still looks to /tmp/mysql.sock for the socket which
results in a connection failure.


Previous Comments:


[2008-06-04 17:18:29] daniel dot fallon at nuim dot ie

Description:

When using --with-mysql=/usr/local/mysql and having a nonstandard
socket (/home/databases/mysql/mysql.sock), the compiler throws a warning
and fails to compile PHP with the socket that was given via the
--with-mysql-sock option

I'm using PHP 5.2.6 and mySQL 5.0.51b (compiled from source)

/bin/sh /usr/src/php-5.2.6/libtool --silent --preserve-dup-deps
--mode=compile gcc  -Iext/mysql/ -I/usr/src/php-5.2.6/ext/mysql/
-DPHP_ATOM_INC -I/usr/src/php-5.2.6/include -I/usr/src/php-5.2.6/main
-I/usr/src/php-5.2.6 -I/usr/include/libxml2
-I/usr/src/php-5.2.6/ext/date/lib -I/usr/local/mysql/include/mysql
-I/usr/src/php-5.2.6/TSRM -I/usr/src/php-5.2.6/Zend-g -O2 
-prefer-non-pic -c /usr/src/php-5.2.6/ext/mysql/php_mysql.c -o
ext/mysql/php_mysql.lo 
In file included from /usr/local/mysql/include/mysql/mysql.h:71,
 from /usr/src/php-5.2.6/ext/mysql/php_mysql.c:67:
/usr/local/mysql/include/mysql/mysql_version.h:18:1: warning:
"MYSQL_UNIX_ADDR" redefined
In file included from /usr/src/php-5.2.6/TSRM/tsrm_config.h:1,
 from /usr/src/php-5.2.6/TSRM/tsrm_config_common.h:13,
 from /usr/src/php-5.2.6/TSRM/tsrm_virtual_cwd.h:26,
 from /usr/src/php-5.2.6/main/php.h:412,
 from /usr/src/php-5.2.6/ext/mysql/php_mysql.c:32:
/usr/src/php-5.2.6/include/../main/php_config.h:1891:1: warning: this
is the location of the previous definition


Reproduce code:
---
./configure 
--with-pear=/usr/lib/pear --with-mysql=shared,/usr/local/mysql
--with-mysql-sock=/home/databases/mysql/mysql
--with-zlib-dir=/usr/include --with-zlib=shared
--with-apxs2=/usr/local/apache2/bin/apxs

Expected result:

PHP to throw no warnings during compile and use the new socket that I
defined through configure.

I expect phpinfo()'s MYSQL_SOCKET value to report the specified socket

Actual result:
--
phpinfo() shows MYSQL_SOCKET as /tmp/mysql.sock which is the value in
mysql_version.h 

There's a number of previous bug reports for this same issue, I don't
know what's happening to the fixes but it's not working at the minute.







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



#45180 [NEW]: 'class::method' works differently than array('class', 'method')

2008-06-04 Thread [EMAIL PROTECTED]
From: [EMAIL PROTECTED]
Operating system: 
PHP version:  5.3CVS-2008-06-04 (CVS)
PHP Bug Type: Scripting Engine problem
Bug description:  'class::method' works differently than array('class', 
'method')

Description:

See the code below.

Reproduce code:
---
test();


Expected result:

__call:
string(3) "ABC"
__call:
string(3) "ABC"
__call:
string(3) "ABC"

Actual result:
--
__call:
string(3) "ABC"
__call:
string(3) "ABC"

Fatal error: Non-static method foo::ABC() cannot be called statically in
...


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



#45159 [WFx]: __callStatic() called only in static methods

2008-06-04 Thread reto at buxaprojects dot com
 ID:   45159
 User updated by:  reto at buxaprojects dot com
 Reported By:  reto at buxaprojects dot com
 Status:   Wont fix
 Bug Type: Class/Object related
 Operating System: Fedora
 PHP Version:  6CVS-2008-06-03 (snap)
 New Comment:

ok, i see... what about the following fallback alternative for a call
like A::foo()

1. if method foo() in class A exists, call it, if not -> 2
2. if method __callstatic() implemented, call it, if not -> 3
3. if method __call implemented, call it, if not -> 4
4. fatal error

and there you have compatibility for php < 5.3.

For me A::foo() looks like a static call. Or do you really think it
always must follow the context? In my opinion, when calling a method in
the same style from different contexts, it isn't __always__ good that
they aren't treated the same...


Previous Comments:


[2008-06-03 23:41:29] [EMAIL PROTECTED]

You're misunderstanding the meaning of static::foo();

it doesn't mean "call foo statically" but rather "use runtime
information to get the class currently called", and do a static(or not)
call to the method of that class.

It's similar to
$name = get_called_class(); $name::foo();

For more information:
php.net/language.oop5.late-static-bindings



[2008-06-03 13:42:09] reto at buxaprojects dot com

I see your problem that "it would probably break things". But when i'm
calling a static method with static::coolMethod() i would expect that
this is __always__ a static call, why using the object context when it
can't be used in the static methods either?

In your example i would expect an Error that the foo() method of class
A can't be called statically.



[2008-06-03 13:15:27] [EMAIL PROTECTED]

Actually, in this particular case, it's completely expected.

Class A {
  public function foo() {

  }
}

class B extends A {
  public function bar() {
parent::foo(); // normal call
static::foo(); // normal call as well
A::foo(); // same here...
  }
}

$b = new B; $b->bar();

Now, for BC purposes, it would probably break things if those call
suddenly stop calling __call in case A::foo() wasn't defined, which how
it currently works in PHP 5.



[2008-06-03 13:10:08] [EMAIL PROTECTED]

This is somewhat expected, a call to foo::bar() from a non-static
context will be a non-static call, unless the function is explicitly
defined as static. 

However, some of this(especially the part about calling a "static
method" from/to an invalid context) is scheduled for cleanup.



[2008-06-03 11:59:19] reto at buxaprojects dot com

Description:

__call() instead of __callStatic() is called, when we call a static
method from a non-static method.

Reproduce code:
---
abstract class One
{
public function __call($m, $p)
{
echo '__call(' . $m . ') called' . "\n";
}
public static function __callStatic($m, $p)
{
echo '__callStatic(' . $m . ') called' . "\n";
}
}
class Two extends One
{
public function __construct()
{
$this->normalMethod();
self::staticMethod();
}

private function normalMethod()
{
echo 'normalMethod() called' . "\n";
parent::a();
self::b();
static::c();
One::d();
Two::e();
}

private static function staticMethod()
{
echo 'staticMethod() called' . "\n";
parent::a();
self::b();
static::c();
One::d();
Two::e();
}
}
$two = new Two();

Expected result:

normalMethod() called
__call(a) called
__callStatic(b) called
__callStatic(c) called
__callStatic(d) called
__callStatic(e) called
staticMethod() called
__callStatic(a) called
__callStatic(b) called
__callStatic(c) called
__callStatic(d) called
__callStatic(e) called


Actual result:
--
normalMethod() called
__call(a) called
__call(b) called
__call(c) called
__call(d) called
__call(e) called
staticMethod() called
__callStatic(a) called
__callStatic(b) called
__callStatic(c) called
__callStatic(d) called
__callStatic(e) called






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



#45181 [NEW]: chdir should clear relative entries in stat cache

2008-06-04 Thread webmaster at villagersonline dot com
From: webmaster at villagersonline dot com
Operating system: Linux
PHP version:  5.2.6
PHP Bug Type: *Directory/Filesystem functions
Bug description:  chdir should clear relative entries in stat cache

Description:

If you check a relative pathname with is_dir(), the result is cached. 
However, chdir() does not invalidate that cache.  Thus, after a chdir(),
is_dir() using the same relative pathname gives invalid results.

NOTE: In truth, I'm running PHP 5.2.5, not 5.2.6.  But this is on a
professional hosting service, and I can't control the version.

Reproduce code:
---


Expected result:

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

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

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



#29280 [Com]: changing the default http-wrapper

2008-06-04 Thread r13ckj at gmail dot com
 ID:   29280
 Comment by:   r13ckj at gmail dot com
 Reported By:  Progman2002 at gmx dot de
 Status:   Assigned
 Bug Type: Feature/Change Request
 Operating System: *
 PHP Version:  5CVS
 Assigned To:  pollita
 New Comment:

I was just wondering whether this has been implemented?

My problem is outlined here:
http://forums.devshed.com/php-development-5/default-proxy-settings-for-php4-5t-534829.html#post2054576

I've spent countless hours on this problem, so any help would be much
appreciated.


Previous Comments:


[2004-07-24 06:19:45] [EMAIL PROTECTED]

Ack! My bad... didn't see your note about making it an .ini option :)




[2004-07-24 06:17:47] [EMAIL PROTECTED]

Dunno why this was assigned to me when wez implemented it :)

Closing it up.  You can either grab the snapshot from snaps.php.net
otherwise your wait will be until 5.1.0 is released.



[2004-07-22 16:47:53] progman2002 at gmx dot de

works fine.
 PHPs snip 
$opts = array('http' => array('request_fulluri' => true,
  'proxy' => 'tcp://192.168.0.1:8080'));
stream_context_get_default($opts);
 eos 
works also as...
 PHPs snip 
$context = stream_context_get_default();
stream_context_set_option($context, 'http', 'proxy',
'tcp://192.168.0.1:8080');
stream_context_set_option($context, 'http', 'request_fulluri', true);
 eos 
... does

So, now I must wait until it is in the non-cvs package ;)



[2004-07-22 14:47:54] [EMAIL PROTECTED]

Current CVS now has stream_context_get_default() which returns the
default context used by all newly created streams (unless explicitly
overriden).

You can use this in your script (perhaps via auto_prepend) to set the
proxy globally.

I know; an ini option for the proxy would be a good idea too, so let's
ask Sara really nicely if she wouldn't mind adding that.



[2004-07-20 14:52:57] Progman2002 at web dot de

sure:
 PHP-Code:
 array('request_fulluri' => true,
  'proxy' =>
'tcp://192.168.0.1:8080'));

$context = stream_context_create($opts);

$url = "http://www.example.com/";;

$fp = fopen($url, 'r', false, $context);
if (!$fp) {
echo "nothing :(";
} else {
var_dump($fp);
fclose($fp);
}

// and now without $context...

$fp = fopen($url, 'r');
if (!$fp) {
echo "nothing :(";
} else {
var_dump($fp);
fclose($fp);
}
?>

The first call with $context works, the second doesnt:

 Output:
resource(3) of type (stream) 
Warning: fopen(http://www.example.com/) [function.fopen]: failed to
open stream: Connection timed out in /home/progman/public_html/test.php
on line 19
nothing :(

 Expected:
resource(3) of type (stream)
resource(4) of type (stream) // or an other resource-id

A php.ini-setting for proxys would be maybe better ;)



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

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



#45182 [NEW]: substr UTF-8 character problem

2008-06-04 Thread bahadir at eggdrop dot gen dot tr
From: bahadir at eggdrop dot gen dot tr
Operating system: Windows XP
PHP version:  5.2.6
PHP Bug Type: *Unicode Issues
Bug description:  substr UTF-8 character problem

Description:

Hi there,

I have this function ...

If character start with > Ü

Problem this:

Actual result: Ã. Bahadir Kocaoglu

Expected result: Ü. Bahadir Kocaoglu

Original string: Ümit Bahadir Kocaoglu

Reproduce code:
---



Expected result:

Ü. Bahadir Kocaoglu


Actual result:
--
Ã. Bahadir Kocaoglu


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



#45180 [Opn->Asn]: 'class::method' works differently than array('class', 'method')

2008-06-04 Thread felipe
 ID:  45180
 Updated by:  [EMAIL PROTECTED]
 Reported By: [EMAIL PROTECTED]
-Status:  Open
+Status:  Assigned
 Bug Type:Scripting Engine problem
 PHP Version: 5.3CVS-2008-06-04 (CVS)
-Assigned To: 
+Assigned To: felipe


Previous Comments:


[2008-06-04 18:30:27] [EMAIL PROTECTED]

Description:

See the code below.

Reproduce code:
---
test();


Expected result:

__call:
string(3) "ABC"
__call:
string(3) "ABC"
__call:
string(3) "ABC"

Actual result:
--
__call:
string(3) "ABC"
__call:
string(3) "ABC"

Fatal error: Non-static method foo::ABC() cannot be called statically
in ...






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



#44777 [Com]: PHP ISAPI random working dir only in Root of website

2008-06-04 Thread asset at impactdamage dot com
 ID:   44777
 Comment by:   asset at impactdamage dot com
 Reported By:  toby at simmonsconsulting dot com
 Status:   Open
 Bug Type: IIS related
 Operating System: Windows 2003 Server
 PHP Version:  5.2.5
 New Comment:

I am having this same issue, however I get this when using either ISAPI
or FASTCGI.

It can be resolved by giving list folder permissions on the parent
folder.  I cant seem to find a workaround to this, as in a shared
environment I dont want to give list permissions on the parent.


Previous Comments:


[2008-04-18 14:49:27] toby at simmonsconsulting dot com

FYI, PHP CGI/FastCGI does not have this problem.



[2008-04-18 14:44:15] toby at simmonsconsulting dot com

Description:

PHP ISAPI under IIS 6.x (Windows 2003 Server) reports an inconsistent
working directory ONLY in the root of a web site. The working directory
is perfectly consistent when checked in a subdirectory of a web site.

I have seen similar bugs reported but they were either BOGUS or no
longer open. I understand ISAPI is unstable (according to Bug #42460)
but this bug only seems to occur in the root of a web site.

Say the root of your web site is D:\websites\testsite.

If you create a php file with the following code:

\n";
?>

and place it in the above directory then load it
(http://testsite/cwd.php), loading will produce a random directory. If
you place this file in a subdirectory, say D:\websites\testsite\testdir,
and load the page (from the new location,
http://testsite/testdir/cwd.php) it will produce the expected results:
D:\websites\testsite\testdir.

Reproduce code:
---
\n";
?>


Expected result:

In the root folder of your website (say, D:\websites\testsite) you
would expect D:\websites\testsite.

In a subdirectory of your website (say, D:\websites\testsite\testdir)
you would expect just that, D:\websites\testsite\testdir.

Actual result:
--
In the root folder of your website (say, D:\websites\testsite) you get
random results, anything from C:\WINDOWS\System32 to various
subdirectories in your website (or other websites if you host more than
one.)

In a subdirectory of your website (say, D:\websites\testsite\testdir)
it seems to work fine.





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



#44996 [Com]: xmlrpc_decode ignores time zone on iso8601.datetime

2008-06-04 Thread kawai at apache dot org
 ID:   44996
 Comment by:   kawai at apache dot org
 Reported By:  helixpip at gmail dot com
 Status:   Open
 Bug Type: XMLRPC-EPI related
 Operating System: Windows 2000
 PHP Version:  5.2.6
 New Comment:

Now, you can download patched version of xmlrpc extension from:
http://mp.i-revo.jp/user.php/kcvcrlkq/entry/313.html

I hope this patch to be applied in the next PHP release.


Previous Comments:


[2008-05-14 18:14:24] helixpip at gmail dot com

I wrote:
>Ideally the scalar property should explicitly be 
>a UTC ISO 8601 datetime value, ending with the 
>time zone designator 'Z'.

On second thought, it might be more useful for a php script to know
what, if any, time zone designator appeared with the original iso8601
datetime value. (At the moment there's no way to find this information
without parsing the xml.) If the scalar property preserved the original
time zone designator, that would help with this.



[2008-05-14 17:47:07] helixpip at gmail dot com

Description:

The xmlrpc_decode function does not correctly interpret ISO 8601
timezone designations when interpreting XML-RPC datetime values passed
in  tags.  It appears that the time zone designator is
completely ignored and the local time zone is assumed.  (The
xmlrpc_decode_request function shows the same behavior.)

A side effect of this bug is that the 'scalar' and 'timestamp' objects
returned for XML-RPC datetime values will disagree if the object is used
is used in a different time zone than it was created.  Ideally the
scalar property should explicitly be a UTC ISO 8601 datetime value,
ending with the time zone designator 'Z'.

Reproduce code:
---
function DecodeDatetime($datetime) {
  print "\nISO 8601 datetime $datetime\n";
  print "strtotime yields " . strtotime($datetime) . "\nxmlrpc_decode
yields ";
  $obj = xmlrpc_decode("$datetime");
  print_r($obj);
}

DecodeDatetime("20010909T01:46:40Z");
DecodeDatetime("20010909T00:46:40-01");
DecodeDatetime("2001-09-09T08:46:40+07:00");
DecodeDatetime("2001-09-08T21:46:40-0400");

Expected result:

The ISO 8601 datetime strings tested above are all valid and equivalent
  They all represent the same timestamp as the unix time 10, and
strtotime() function converts them all correctly.  I would expect that
the object returned by xml_rpc decode should, in all four test cases,
have the timestamp property = 10 and have the scalar property as
a string that would convert to 10 if fed to strtotime().

Actual result:
--
The xmlrpc_decode function gets them all wrong except for the last one,
which happens to have the same time zone as my test system:

ISO 8601 datetime 20010909T01:46:40Z
strtotime yields 10
xmlrpc_decode yields stdClass Object
(
[scalar] => 20010909T01:46:40
[xmlrpc_type] => datetime
[timestamp] => 114400
)

ISO 8601 datetime 20010909T00:46:40-01
strtotime yields 10
xmlrpc_decode yields stdClass Object
(
[scalar] => 20010909T00:46:40
[xmlrpc_type] => datetime
[timestamp] => 110800
)

ISO 8601 datetime 2001-09-09T08:46:40+07:00
strtotime yields 10
xmlrpc_decode yields stdClass Object
(
[scalar] => 20010909T08:46:40
[xmlrpc_type] => datetime
[timestamp] => 139600
)

ISO 8601 datetime 2001-09-08T21:46:40-0400
strtotime yields 10
xmlrpc_decode yields stdClass Object
(
[scalar] => 20010908T21:46:40
[xmlrpc_type] => datetime
[timestamp] => 10
)





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



#45176 [Fbk->Opn]: Create image from ttf file failed

2008-06-04 Thread heyond at yahoo dot com dot cn
 ID:   45176
 User updated by:  heyond at yahoo dot com dot cn
 Reported By:  heyond at yahoo dot com dot cn
-Status:   Feedback
+Status:   Open
 Bug Type: GD related
 Operating System: windows 2003
 PHP Version:  5.2.6
 Assigned To:  pajoye
 New Comment:

http://www.guomo.com/data/fonts/174.ttf


Previous Comments:


[2008-06-04 16:23:40] [EMAIL PROTECTED]

"Warning: imagettftext() [function.imagettftext]: Unable to find a
CharMap that I can handle in D:\www\guomo.com\ttf.php on line 33"

Is a pretty clear error message.

Please provide a link to the font you are using a complete script to
reproduce your problem.





[2008-06-04 14:24:08] heyond at yahoo dot com dot cn

Description:

I try to create a font image from ttf file, but I encounted a error :

Warning: imagettftext() [function.imagettftext]: Unable to find a
CharMap that I can handle in D:\www\mvc\ttf2.php on line 49

only few ttf file like this, I guess the freetypes version too lower.

Reproduce code:
---
imagettftext($im, $fontsize, 0, $x, $y, $fgcolor, $fontfile, 'abc');

Expected result:

a binary image.

Actual result:
--
Warning: imagettftext() [function.imagettftext]: Unable to find a
CharMap that I can handle in D:\www\guomo.com\ttf.php on line 33
ÿ?JFIFÿ>CREATOR: gd-jpeg v1.0 (using IJG JPEG v62), default
quality ÿC    $.' ",#(7),01444'9=82<.342ÿC

2!!22ÿ(J"ÿ
ÿ?}!1AQa"q2‘?#B±ÁRÑð$3br?
%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyzƒ„…†‡ˆ‰Š’“”•–—˜™š¢£¤¥¦§¨©ª²³´µ¶·¸¹ºÂÃÄÅÆÇÈÉÊÒÓÔÕÖרÙÚáâãäåæçèéêñòóôõö÷øù?
ÿ?w!1AQaq"2?B‘¡±Á
#3R?br?$4??&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz‚ƒ„…†‡ˆ‰Š’“”•–—˜™š¢£¤¥¦§¨©ª²³´µ¶·¸¹ºÂÃÄÅÆÇÈÉÊÒÓÔÕÖרÙÚâãäåæçèéêòóôõö÷øùúÿ
?õJ(¢¸Í‚ÿ





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



#45176 [Opn]: Create image from ttf file failed

2008-06-04 Thread heyond at yahoo dot com dot cn
 ID:   45176
 User updated by:  heyond at yahoo dot com dot cn
 Reported By:  heyond at yahoo dot com dot cn
 Status:   Open
 Bug Type: GD related
 Operating System: windows 2003
 PHP Version:  5.2.6
 Assigned To:  pajoye
 New Comment:

The completed script is:
http://www.guomo.com/data/fonts/1.ttf This file
'1.ttf' is normal
$fontfile =
'./data/fonts/174.ttf';//http://www.guomo.com/data/fonts/174.ttf This
file '174.ttf' is abnormal

$width = 30
$height = 40;

$fontsize = 20;
$x = 0;
$y = $fontsize + 10;

$im = imagecreate($wordnum * $width, $height);
$bgcolor = imagecolorallocate($im, hexdec(substr(BG1, 0, 2)),
hexdec(substr(BG1, 2, 2)), hexdec(substr(BG1, 4, 2)));
$fgcolor = imagecolorallocate($im, 0, 0, 0);
imagefill($im, 0, 0, $bgcolor);

imagettftext($im, $fontsize, 0, $x, $y, $fgcolor, $fontfile, $word);
imagejpeg($im);
imagedestroy($im);
exit;

?>


Previous Comments:


[2008-06-05 06:38:14] heyond at yahoo dot com dot cn

http://www.guomo.com/data/fonts/174.ttf



[2008-06-04 16:23:40] [EMAIL PROTECTED]

"Warning: imagettftext() [function.imagettftext]: Unable to find a
CharMap that I can handle in D:\www\guomo.com\ttf.php on line 33"

Is a pretty clear error message.

Please provide a link to the font you are using a complete script to
reproduce your problem.





[2008-06-04 14:24:08] heyond at yahoo dot com dot cn

Description:

I try to create a font image from ttf file, but I encounted a error :

Warning: imagettftext() [function.imagettftext]: Unable to find a
CharMap that I can handle in D:\www\mvc\ttf2.php on line 49

only few ttf file like this, I guess the freetypes version too lower.

Reproduce code:
---
imagettftext($im, $fontsize, 0, $x, $y, $fgcolor, $fontfile, 'abc');

Expected result:

a binary image.

Actual result:
--
Warning: imagettftext() [function.imagettftext]: Unable to find a
CharMap that I can handle in D:\www\guomo.com\ttf.php on line 33
ÿ?JFIFÿ>CREATOR: gd-jpeg v1.0 (using IJG JPEG v62), default
quality ÿC    $.' ",#(7),01444'9=82<.342ÿC

2!!22ÿ(J"ÿ
ÿ?}!1AQa"q2‘?#B±ÁRÑð$3br?
%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyzƒ„…†‡ˆ‰Š’“”•–—˜™š¢£¤¥¦§¨©ª²³´µ¶·¸¹ºÂÃÄÅÆÇÈÉÊÒÓÔÕÖרÙÚáâãäåæçèéêñòóôõö÷øù?
ÿ?w!1AQaq"2?B‘¡±Á
#3R?br?$4??&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz‚ƒ„…†‡ˆ‰Š’“”•–—˜™š¢£¤¥¦§¨©ª²³´µ¶·¸¹ºÂÃÄÅÆÇÈÉÊÒÓÔÕÖרÙÚâãäåæçèéêòóôõö÷øùúÿ
?õJ(¢¸Í‚ÿ





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