#32970 [NEW]: readfile does not output more than ~ 2MB of data

2005-05-06 Thread flobee at gmail dot com
From: flobee at gmail dot com
Operating system: suse/debian/winXP
PHP version:  5.0.4
PHP Bug Type: Filesystem function related
Bug description:  readfile does not output more than ~ 2MB of data

Description:

when file lager than ~ 2MB i only get ~2MB send to the header

eg:
if($result_size = @readfile( $file_to_download) ) { ; 
 $msg = _DOWNLOAD_SUCCESSFUL;
} else {
 $msg = _ERROR_COULDNOTCOMPLETETHEFILE;
}

this is since php5 beta and have no idea why, no error no other messages.
execution time and memorylimit are set very high for testing. no changes.



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


#32970 [Bgs]: readfile does not output more than ~ 2MB of data

2005-05-06 Thread flobee at gmail dot com
 ID:   32970
 User updated by:  flobee at gmail dot com
 Reported By:  flobee at gmail dot com
 Status:   Bogus
 Bug Type: Filesystem function related
 Operating System: suse/debian/winXP
 PHP Version:  5.0.4
 New Comment:

hmmm. my hoster still has this bug, 
i just reported this as "note" for other users to have a work around.

 

kind regards 
flobee


Previous Comments:


[2005-05-06 20:39:28] [EMAIL PROTECTED]

Fixed in CVS several weeks ago.



[2005-05-06 19:00:10] flobee at gmail dot com

Description:

when file lager than ~ 2MB i only get ~2MB send to the header

eg:
if($result_size = @readfile( $file_to_download) ) { ; 
 $msg = _DOWNLOAD_SUCCESSFUL;
} else {
 $msg = _ERROR_COULDNOTCOMPLETETHEFILE;
}

this is since php5 beta and have no idea why, no error no other
messages.
execution time and memorylimit are set very high for testing. no
changes.







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


[PHP-BUG] Bug #66023 [NEW]: destruction problem

2013-11-02 Thread flobee at gmail dot com
From: flobee at gmail dot com
Operating system: debian testing
PHP version:  5.5.5
Package:  *General Issues
Bug Type: Bug
Bug description:destruction problem

Description:

calling methodes on destruction is difficult to understand when using
singelton patterns which does not make sence for me. maybe i'm wrong..
i'm not sure at the moment...
also: if session is used this fails on destruction

see script below for a simple test
i expect the call of knock() from master class on destruction of class
b. 
when not using singelton patter all is fine. the order of the
destruction works.
this problems starts with php 5.5* packages in debian testing.

$ uname -a
Linux d1 3.10-3-686-pae #1 SMP Debian 3.10.11-1 (2013-09-10) i686
GNU/Linux
$ php -v
PHP 5.5.5-1 (cli) (built: Oct 19 2013 22:09:48) 
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2013 Zend Technologies
with Zend OPcache v7.0.3-dev, Copyright (c) 1999-2013, by Zend
Technologies
with Xdebug v2.2.3, Copyright (c) 2002-2013, by Derick Rethans


Test script:
---
r = $r;
echo __METHOD__ . PHP_EOL;
}

public function __destruct()
{
echo __METHOD__ . PHP_EOL;
if (method_exists($this->r, 'knock')) {
$this->r->knock();
}
$_SESSION['x'] = __METHOD__;
}

}

class b extends Singleton implements Singleton_Interface
{
private $r;

private static $instance;
public static function getInstance( $params=array( ) )
{
if( !isset(self::$instance) ) {
$c = __CLASS__;
self::$instance = new $c($params);
}
return self::$instance;
}

public function knock()
{
echo 'call ' . __METHOD__ . PHP_EOL;
}

public function __construct($r=false)
{
$this->r = $r;
echo __METHOD__ . PHP_EOL;
}

public function __destruct()
{
echo __METHOD__ . PHP_EOL;
if (method_exists($this->r, 'knock')) {
$this->r->knock();
}
$_SESSION['y'] = __METHOD__;
}

}


header( 'content-type: text/plain' );
echo 'session:'; print_r($_SESSION);

$master = master::getInstance();

$b = b::getInstance($master); // calls master->knock() on destruction

$master->knock();

$b->knock();


echo 'done' . PHP_EOL;



Actual result:
--
/* result:
master::__construct
b::__construct
call master::knock
call b::knock
done
master::__destruct
b::__destruct
call master::knock <-- no error?
_session is empty! correct? wrong?
*/

-- 
Edit bug report at https://bugs.php.net/bug.php?id=66023&edit=1
-- 
Try a snapshot (PHP 5.4):   
https://bugs.php.net/fix.php?id=66023&r=trysnapshot54
Try a snapshot (PHP 5.5):   
https://bugs.php.net/fix.php?id=66023&r=trysnapshot55
Try a snapshot (trunk): 
https://bugs.php.net/fix.php?id=66023&r=trysnapshottrunk
Fixed in SVN:   https://bugs.php.net/fix.php?id=66023&r=fixed
Fixed in release:   https://bugs.php.net/fix.php?id=66023&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=66023&r=needtrace
Need Reproduce Script:  https://bugs.php.net/fix.php?id=66023&r=needscript
Try newer version:  https://bugs.php.net/fix.php?id=66023&r=oldversion
Not developer issue:https://bugs.php.net/fix.php?id=66023&r=support
Expected behavior:  https://bugs.php.net/fix.php?id=66023&r=notwrong
Not enough info:
https://bugs.php.net/fix.php?id=66023&r=notenoughinfo
Submitted twice:
https://bugs.php.net/fix.php?id=66023&r=submittedtwice
register_globals:   https://bugs.php.net/fix.php?id=66023&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=66023&r=php4
Daylight Savings:   https://bugs.php.net/fix.php?id=66023&r=dst
IIS Stability:  https://bugs.php.net/fix.php?id=66023&r=isapi
Install GNU Sed:https://bugs.php.net/fix.php?id=66023&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=66023&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=66023&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=66023&r=mysqlcfg



#47365 [NEW]: ip2long: 32bis vs. 64bit!

2009-02-12 Thread flobee at gmail dot com
From: flobee at gmail dot com
Operating system: SunOS
PHP version:  5.2.9RC1
PHP Bug Type: *Network Functions
Bug description:  ip2long: 32bis vs. 64bit!

Description:

ip2long seems to be buggy on 64 Bit Solaris:
Tested with: php5.2.2, php5.2.8



Reproduce code:
---
64bit Solaris
#php -r "echo 'x:' . ip2long('web.de') .\"\n\";"
// x:4294967295

32bit Solaris
#php -r "echo 'x:' . ip2long('web.de') .\"\n\";"
// x:false



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



#47365 [NoF->Opn]: ip2long: 32bis vs. 64bit!

2009-03-26 Thread flobee at gmail dot com
 ID:   47365
 User updated by:  flobee at gmail dot com
 Reported By:  flobee at gmail dot com
-Status:   No Feedback
+Status:   Open
 Bug Type: *Network Functions
 Operating System: SunOS
 PHP Version:  5.2.9RC1
 New Comment:

reopen for Daniel :-)


Previous Comments:


[2009-03-26 01:22:34] pada at hrz dot tu-chemnitz dot de

Hi,

I can confirm the bug on Solaris (not OpenSolaris) Version 10 x86_64

# isainfo -b
64
# uname -srvmpi
SunOS 5.10 Generic_118855-33 i86pc i386 i86pc

# Results with unpatched 64 Bit PHP 5.2.8:

# php5 -r "var_dump(ip2long('example.com'));"
int(4294967295) # WRONG, should be bool(false), this is not a valid IP
# php5 -r "var_dump(ip2long(\"1\x00x\"));"
int(1) # correct?
# php5 -r "var_dump(ip2long('0.1'));"
int(1) # correct?
# php5 -r "var_dump(ip2long(''));"
bool(false) # correct
# php5 -r "var_dump(ip2long('0.0.0.0'));"
int(0) # correct
# php5 -r "var_dump(ip2long('0.0.0.1'));"
int(1) # correct
# php5 -r "var_dump(ip2long('1.2.3.4'));"
int(16909060) # correct
# php5 -r "var_dump(ip2long('4.3.2.1'));"
int(67305985) # correct
# php5 -r "var_dump(ip2long('255.255.255.254'));"
int(4294967294) # correct
# php5 -r "var_dump(ip2long('255.255.255.255'));"
int(4294967295) # correct

There is a problem in PHP function ip2long() with the comparison with
INADDR_NONE on 64 bit Solaris systems, since the return value of
function inet_addr is stored in an "unsigned long int" variable while
struct inet_addr is only 32 bit wide.  The "RETURN_FALSE" branch will
never be reached when a string like "example.com" is supplied, since the
comparison of ip and INADDR_NONE evaluates to false (it should be true
in case of error).

# Patch worked as expected on Debian GNU/Linux squeeze x86_64 with PHP
5.2.6:

# php5 -r "var_dump(ip2long('example.com'));"
bool(false) # correct
# php5 -r "var_dump(ip2long(\"1\x00x\"));"
int(1) # correct?
# php5 -r "var_dump(ip2long('0.1'));"
int(1) # correct?
# php5 -r "var_dump(ip2long(''));"
bool(false) # correct
# php5 -r "var_dump(ip2long('0.0.0.0'));"
int(0) # correct
# php5 -r "var_dump(ip2long('0.0.0.1'));"
int(1) # correct
# php5 -r "var_dump(ip2long('1.2.3.4'));"
int(16909060) # correct
# php5 -r "var_dump(ip2long('4.3.2.1'));"
int(67305985) # correct
# php5 -r "var_dump(ip2long('255.255.255.254'));"
int(4294967294) # correct
# php5 -r "var_dump(ip2long('255.255.255.255'));"
int(4294967295) # correct

I propose the following patch to simplify the code and fix the problem
at the same time.  Will this code work on all platforms (Linux, Solaris,
BSD, Windows, etc.)?  Your hints and suggestions are welcome.

 start of patch 
diff -ru php-5.2.9.orig/ext/standard/basic_functions.c
php-5.2.9/ext/standard/basic_functions.c
--- php-5.2.9.orig/ext/standard/basic_functions.c 2008-12-31
12:17:44.0 +0100
+++ php-5.2.9/ext/standard/basic_functions.c  2009-03-25
19:00:15.0 +0100
@@ -97,10 +97,6 @@
 # include "win32/unistd.h"
 #endif

-#ifndef INADDR_NONE
-#define INADDR_NONE ((unsigned long int) -1)
-#endif
-
 #include "zend_globals.h"
 #include "php_globals.h"
 #include "SAPI.h"
@@ -4336,7 +4332,7 @@
 PHP_FUNCTION(ip2long)
 {
  zval **str;
- unsigned long int ip;
+ struct in_addr addr;

  if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &str) ==
FAILURE) {
WRONG_PARAM_COUNT;
@@ -4344,20 +4340,11 @@

  convert_to_string_ex(str);

- if (Z_STRLEN_PP(str) == 0 || (ip = inet_addr(Z_STRVAL_PP(str))) ==
INADDR_NONE) {
-   /* the only special case when we should return -1 ourselves,
-* because inet_addr() considers it wrong. We return 0x
and
-* not -1 or ~0 because of 32/64bit issues.
-*/
-   if (Z_STRLEN_PP(str) == sizeof("255.255.255.255") - 1 &&
- !memcmp(Z_STRVAL_PP(str), "255.255.255.255",
sizeof("255.255.255.255") - 1)) {
- RETURN_LONG(0x);
-   }
-
-   RETURN_FALSE;
- }
+  if (Z_STRLEN_PP(str) == 0 || inet_pton(AF_INET, Z_STRVAL_PP(str),
&addr) != 1) {
+RETURN_FALSE;
+  }

- RETURN_LONG(ntohl(ip));
+ RETURN_LONG(ntohl(addr.s_addr));
 }
 /* }}} */

 end of patch 

Kind regards,
Daniel



[2009-02-20 01:00:01] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a week, so it is
being suspended automatically. If yo

#35012 [NEW]: echo, print ... reverse compiling php scripts

2005-10-28 Thread flobee at gmail dot com
From: flobee at gmail dot com
Operating system: any
PHP version:  5.1.0RC4
PHP Bug Type: Feature/Change Request
Bug description:  echo, print ... reverse compiling php scripts

Description:

HI!

i need a function which returns all echo'd var.
a list which shows me used and outputed things. 
print_r(all echo);

eg: 
$var = 'php';
$n = array(0=>'no',1=>'maybe',2=>'in 2005');

echo "$var is cool ".$n[2];
if($var=='pl')
   echo $n[1];
}
// function could be named:
$x = get_echoed_vars();
// $x:
array('var'=>'php',
  'n'=>array(2=>'in 2005')
)

with this information we would be able to automate/compile php scripts
(setup-scripts) dynamicly and reversible to justify script
load/ressoureces in any way.
or for more debug informations.
(nearly like the compiler of smarty template engin, which gave me the
idea: get speed without chaching or where sites cannot be cached;
optimising autogenerated).


programer <-> designer. problem!
e.g.: when it is not clear which content really is used in a program.
mostly the programmer builts an admin interface for the designer to setup
a site / editing templates ...

so: to give a designer max. options for a site you give him 4 varibales
(in reality tonns of it) which can be included in a template.

designer A take 2 vars, 
designer B use 4 variables for his template.

so, why should be 4 variables available for designer A when he is only
using 2 of it.

with get_echoed_vars() i could read the needed data and rebuilt the
setup-script for him (which will load the needed data). 
so i will have maximunm performance.


:: data diagramm
# default data 
(which will be loaded form any datacontainer (DB,txt,xml...)
if(empty($designer) {
   $data = array( 'id'=>1, 'name'=>'title text', 'longtext'=>'long text',
'verylongtext'=>' 6 chars');
}

# programm displays all the loaded content.

# designer reduce the template to display 'id' and 'title'

# activating compiling mode

# compiler programm calls get_echoed_vars() and rebuilts the setup

setup now (data which should be loaded when program of designer A is
running:
$data = array( 'id'=>1, 'name'=>'title text');


actually i have this problem with 200 sites where 100% of data is
available in templates and only the half of it is really displayed :-|
chaching is not always the best way.

king regards
flo







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


#40141 [NEW]: open_basedir vs. tmpfile()

2007-01-15 Thread flobee at gmail dot com
From: flobee at gmail dot com
Operating system: debian etch
PHP version:  5.2.0
PHP Bug Type: *Directory/Filesystem functions
Bug description:  open_basedir vs. tmpfile()

Description:

using php_admin_value open_basedir "/home/somthing/" in vhosts i get
problems to run the function tmpfile()


vhost setting:
 php_admin_value open_basedir "/home/somthing/:/tmp/"

or tested with ... does the same error:
 php_admin_value open_basedir "/home/somthing/"



without open_basedir the function works like expected :-/

Reproduce code:
---


Actual result:
--
Warning: tmpfile() [function.tmpfile]: open_basedir restriction in effect.
File(/tmp) is not within the allowed path(s): (/home/abc/:/tmp/) in
index.php on line 123

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


#34748 [NEW]: soap: wrong encoding return

2005-10-05 Thread flobee at gmail dot com
From: flobee at gmail dot com
Operating system: xp/*nix
PHP version:  5.1.0RC1
PHP Bug Type: SOAP related
Bug description:  soap: wrong encoding return

Description:

request and Response are always set to utf-8 even when server and client
are set to ISO-8859-1 :-(
the good: it's handled to be ISO-8859-1 or will throw a SoapFault.



Reproduce code:
---
$a =new SoapClient($wsdl, array('encoding'=>'ISO-8859-1');
$b=new SoapServer($wsdl , array('encoding'=>'ISO-8859-1'));

xml-Request : ...
xml-Response: ...


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


#34748 [Fbk->Opn]: soap: wrong encoding return

2005-10-06 Thread flobee at gmail dot com
 ID:   34748
 User updated by:  flobee at gmail dot com
 Reported By:  flobee at gmail dot com
-Status:   Feedback
+Status:   Open
 Bug Type: SOAP related
 Operating System: xp/*nix
 PHP Version:  5.1.0RC1
 New Comment:

[server]
theServerClass {
 function __construct() { }
 function set($in) {
  return array('code'=>'€€€');
 }
}
$server = new SoapServer('a.wsdl',array('encoding'=>'ISO-8859-1'));
$server->setClass('theServerClass');
$server->handle();

[client]
$cli = new SoapClient('a.wsdl',
array('encoding'=>'ISO-8859-1','soap_version'=> SOAP_1_2, 'trace'=>
1));
$result = $cli->set('somthing');
print_r($cli->__getLastResponse());

...
xml-Response:  
but IS ISO-8859-1

set encoding to utf-8 the "€" will throw a SoapFault.


Previous Comments:


[2005-10-06 13:34:31] [EMAIL PROTECTED]

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with ,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc.

If possible, make the script source available online and provide
an URL to it here. Try to avoid embedding huge scripts into the report.





[2005-10-06 07:11:49] flobee at gmail dot com

Description:

request and Response are always set to utf-8 even when server and
client are set to ISO-8859-1 :-(
the good: it's handled to be ISO-8859-1 or will throw a SoapFault.



Reproduce code:
---
$a =new SoapClient($wsdl, array('encoding'=>'ISO-8859-1');
$b=new SoapServer($wsdl , array('encoding'=>'ISO-8859-1'));

xml-Request : ...
xml-Response: ...






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