Bug #61463 [Com]: cant import schema when using https soapservice

2012-04-19 Thread benoit dot chenu at gmail dot com
Edit report at https://bugs.php.net/bug.php?id=61463&edit=1

 ID: 61463
 Comment by: benoit dot chenu at gmail dot com
 Reported by:markus dot rietzler at rzf dot fin-nrw dot de
 Summary:cant import schema when using https soapservice
 Status: Open
 Type:   Bug
 Package:SOAP related
 Operating System:   linux
 PHP Version:5.3.10
 Block user comment: N
 Private report: N

 New Comment:

I have the same problem on PHP 5.3.8. The same code works on PHP 5.2.5 for me.
I don't use proxy but I use HTTP authentication, ex :

$client = new SoapClient(
'https://connect.example.com/portal/portal?wsdl',
array(
'login' => 'axis',
'password' => 'axis'
)
);

The wsdl import an xsd like this :

http://xxx/"; 
schemaLocation="https://connect.example.com:443/portal/portal?xsd=1"/>

This cause the same error :

Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing Schema: can't import 
schema from 'https://connect.example.com:443/portal/portal?xsd=1'


Previous Comments:

[2012-03-29 08:24:05] markus dot rietzler at rzf dot fin-nrw dot de

nope, proxy_port makes no difference. i wonder whether it is ok to have a mix 
of https and http in schema. maybe a misconfiguration of the service provider 
for this soap service.
but: it has worked with php 5.3.3 and with 5.3.10 it don't work anymore


[2012-03-29 00:54:15] jingshangmingzi at gmail dot com

The proxy_port parameter has to be an integer.
I think you'll have to use 'proxy_port' => 8080


[2012-03-21 12:33:32] markus dot rietzler at rzf dot fin-nrw dot de

Description:

here is my problem: i want to access a soap-service via 
https://connect.example.com/portal/portal?wsdl 

with php 5.3.3 my script worked, with 5.3.10 it does not work anymore.

in the xml returned:



http://connect.example.com:80/portal/portal"/>




so there is a http and not a https location. is this wrong?
i am not sure, whether this should work in general (using https but with a 
http-location). we use a soapservice from an extern service provider which 
requires us to use https for the calls.

in my php script i used

$client = new SoapClient('https://connect.example.com/portal/portal?wsdl',
array(  'proxy_host' => 'myproxy',
'proxy_port' => '8080',
'trace' => 1,
'exceptions' => 1,
// actual use https-endpoint
'location' => 'https://connect.juris.de/jportal/ws/fvportalnrw'
));


with php 5.3.3 i could create the soapclient and do my requests. the wsdl is 
downloaded and cached in /tmp. with php 5.3.10 i get:

PHP Fatal error:  SOAP-ERROR: Parsing Schema: can't import schema from 
'http://connect.example.com:80/portal/portal?xsd=1' in ./t.php on line 9
PHP Fatal error:  Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing 
Schema: can't import schema from 
'http://connect.example.com:80/portal/portal?xsd=1' in ./t2.php:9

so the schema could not be downloaded! 

what's wrong here? was it a bug in 5.3.3 - and it should not have worked there 
- or is it a bug in 5.3.10 (same for 5.3.8). 

if i used php 5.3.3 to access the service, a wsdl is cached in /tmp and then i 
can call the script with php 5.3.10.




Test script:
---
https://connect.example.com/portal/portal?wsdl',
array(  'proxy_host' => 'myproxy',
'proxy_port' => '8080',
'trace' => 1,
'exceptions' => 1,
// actual use https-endpoint
'location' => 'https://connect.juris.de/jportal/ws/fvportalnrw'
));
print_r($client);
?>

Expected result:

SoapClient Object
(
[_proxy_host] => myproxy
[_proxy_port] => 8080
[trace] => 1
[_soap_version] => 1
[sdl] => Resource id #9
)


Actual result:
--
PHP Fatal error:  SOAP-ERROR: Parsing Schema: can't import schema from 
'http://connect.example.com:80/portal/portal?xsd=1' in ./t.php on line 9
PHP Fatal error:  Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing 
Schema: can't import schema from 
'http://connect.example.com:80/portal/portal?xsd=1' in ./t2.php:9






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


Bug #61463 [Com]: cant import schema when using https soapservice

2012-04-19 Thread benoit dot chenu at gmail dot com
Edit report at https://bugs.php.net/bug.php?id=61463&edit=1

 ID: 61463
 Comment by: benoit dot chenu at gmail dot com
 Reported by:markus dot rietzler at rzf dot fin-nrw dot de
 Summary:cant import schema when using https soapservice
 Status: Open
 Type:   Bug
 Package:SOAP related
 Operating System:   linux
 PHP Version:5.3.10
 Block user comment: N
 Private report: N

 New Comment:

Hi,

I solve the problem by disabling HTTP authentication. It seems that the soap 
library doesn't use connexion options when requesting external ressources like 
the xsd.

So it's simple to reproduce :

- Create an wsdl which call an xsd
- Call the wsdl in https with options (proxy or http authentication)

Ben


Previous Comments:

[2012-04-19 14:48:46] benoit dot chenu at gmail dot com

I have the same problem on PHP 5.3.8. The same code works on PHP 5.2.5 for me.
I don't use proxy but I use HTTP authentication, ex :

$client = new SoapClient(
'https://connect.example.com/portal/portal?wsdl',
array(
'login' => 'axis',
'password' => 'axis'
)
);

The wsdl import an xsd like this :

http://xxx/"; 
schemaLocation="https://connect.example.com:443/portal/portal?xsd=1"/>

This cause the same error :

Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing Schema: can't import 
schema from 'https://connect.example.com:443/portal/portal?xsd=1'


[2012-03-29 08:24:05] markus dot rietzler at rzf dot fin-nrw dot de

nope, proxy_port makes no difference. i wonder whether it is ok to have a mix 
of https and http in schema. maybe a misconfiguration of the service provider 
for this soap service.
but: it has worked with php 5.3.3 and with 5.3.10 it don't work anymore


[2012-03-29 00:54:15] jingshangmingzi at gmail dot com

The proxy_port parameter has to be an integer.
I think you'll have to use 'proxy_port' => 8080


[2012-03-21 12:33:32] markus dot rietzler at rzf dot fin-nrw dot de

Description:

here is my problem: i want to access a soap-service via 
https://connect.example.com/portal/portal?wsdl 

with php 5.3.3 my script worked, with 5.3.10 it does not work anymore.

in the xml returned:



http://connect.example.com:80/portal/portal"/>




so there is a http and not a https location. is this wrong?
i am not sure, whether this should work in general (using https but with a 
http-location). we use a soapservice from an extern service provider which 
requires us to use https for the calls.

in my php script i used

$client = new SoapClient('https://connect.example.com/portal/portal?wsdl',
array(  'proxy_host' => 'myproxy',
'proxy_port' => '8080',
'trace' => 1,
'exceptions' => 1,
// actual use https-endpoint
'location' => 'https://connect.juris.de/jportal/ws/fvportalnrw'
));


with php 5.3.3 i could create the soapclient and do my requests. the wsdl is 
downloaded and cached in /tmp. with php 5.3.10 i get:

PHP Fatal error:  SOAP-ERROR: Parsing Schema: can't import schema from 
'http://connect.example.com:80/portal/portal?xsd=1' in ./t.php on line 9
PHP Fatal error:  Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing 
Schema: can't import schema from 
'http://connect.example.com:80/portal/portal?xsd=1' in ./t2.php:9

so the schema could not be downloaded! 

what's wrong here? was it a bug in 5.3.3 - and it should not have worked there 
- or is it a bug in 5.3.10 (same for 5.3.8). 

if i used php 5.3.3 to access the service, a wsdl is cached in /tmp and then i 
can call the script with php 5.3.10.




Test script:
---
https://connect.example.com/portal/portal?wsdl',
array(  'proxy_host' => 'myproxy',
'proxy_port' => '8080',
'trace' => 1,
'exceptions' => 1,
// actual use https-endpoint
'location' => 'https://connect.juris.de/jportal/ws/fvportalnrw'
));
print_r($client);
?>

Expected result:

SoapClient Object
(
[_proxy_host] => myproxy
[_proxy_port] => 8080
[trace] => 1
[_soap_version] => 1
[sdl] => Resource id #9
)


Actual result:
--
PHP Fatal error:  SOAP-ERROR:

Bug #61463 [Com]: cant import schema when using https soapservice

2012-04-19 Thread benoit dot chenu at gmail dot com
Edit report at https://bugs.php.net/bug.php?id=61463&edit=1

 ID: 61463
 Comment by: benoit dot chenu at gmail dot com
 Reported by:markus dot rietzler at rzf dot fin-nrw dot de
 Summary:cant import schema when using https soapservice
 Status: Open
 Type:   Bug
 Package:SOAP related
 Operating System:   linux
 PHP Version:5.3.10
 Block user comment: N
 Private report: N

 New Comment:

I didn't test but the authentication problem seems to be solved in 5.4.0 :

"Fixed basic HTTP authentication for WSDL sub requests."

If it's the case, I hope it will also be done in the next 5.3.11 release.

In my case, I've "solved" the problem by commenting this lines in 
ext/soap/php_schema.c (PHP 5.3.8) :

//sdl_set_uri_credentials(ctx, (char*)location TSRMLS_CC);
doc = soap_xmlParseFile((char*)location TSRMLS_CC);
//sdl_restore_uri_credentials(ctx TSRMLS_CC);

I suppose that the proxy and http auth problem are not linked.


Previous Comments:
--------
[2012-04-19 15:41:39] benoit dot chenu at gmail dot com

Hi,

I solve the problem by disabling HTTP authentication. It seems that the soap 
library doesn't use connexion options when requesting external ressources like 
the xsd.

So it's simple to reproduce :

- Create an wsdl which call an xsd
- Call the wsdl in https with options (proxy or http authentication)

Ben

----------------
[2012-04-19 14:48:46] benoit dot chenu at gmail dot com

I have the same problem on PHP 5.3.8. The same code works on PHP 5.2.5 for me.
I don't use proxy but I use HTTP authentication, ex :

$client = new SoapClient(
'https://connect.example.com/portal/portal?wsdl',
array(
'login' => 'axis',
'password' => 'axis'
)
);

The wsdl import an xsd like this :

http://xxx/"; 
schemaLocation="https://connect.example.com:443/portal/portal?xsd=1"/>

This cause the same error :

Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing Schema: can't import 
schema from 'https://connect.example.com:443/portal/portal?xsd=1'


[2012-03-29 08:24:05] markus dot rietzler at rzf dot fin-nrw dot de

nope, proxy_port makes no difference. i wonder whether it is ok to have a mix 
of https and http in schema. maybe a misconfiguration of the service provider 
for this soap service.
but: it has worked with php 5.3.3 and with 5.3.10 it don't work anymore


[2012-03-29 00:54:15] jingshangmingzi at gmail dot com

The proxy_port parameter has to be an integer.
I think you'll have to use 'proxy_port' => 8080


[2012-03-21 12:33:32] markus dot rietzler at rzf dot fin-nrw dot de

Description:

here is my problem: i want to access a soap-service via 
https://connect.example.com/portal/portal?wsdl 

with php 5.3.3 my script worked, with 5.3.10 it does not work anymore.

in the xml returned:



http://connect.example.com:80/portal/portal"/>




so there is a http and not a https location. is this wrong?
i am not sure, whether this should work in general (using https but with a 
http-location). we use a soapservice from an extern service provider which 
requires us to use https for the calls.

in my php script i used

$client = new SoapClient('https://connect.example.com/portal/portal?wsdl',
array(  'proxy_host' => 'myproxy',
'proxy_port' => '8080',
'trace' => 1,
'exceptions' => 1,
// actual use https-endpoint
'location' => 'https://connect.juris.de/jportal/ws/fvportalnrw'
));


with php 5.3.3 i could create the soapclient and do my requests. the wsdl is 
downloaded and cached in /tmp. with php 5.3.10 i get:

PHP Fatal error:  SOAP-ERROR: Parsing Schema: can't import schema from 
'http://connect.example.com:80/portal/portal?xsd=1' in ./t.php on line 9
PHP Fatal error:  Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing 
Schema: can't import schema from 
'http://connect.example.com:80/portal/portal?xsd=1' in ./t2.php:9

so the schema could not be downloaded! 

what's wrong here? was it a bug in 5.3.3 - and it should not have worked there 
- or is it a bug in 5.3.10 (same for 5.3.8). 

if i used php 5.3.3 to access the service, a wsdl is cached in /tmp and then i 
can call the script with php 5.3.10.




Test script:
---
https:

Bug #54448 [Com]: Empty if block causes catch block to be skipped

2011-09-28 Thread benoit dot chenu at gmail dot com
Edit report at https://bugs.php.net/bug.php?id=54448&edit=1

 ID: 54448
 Comment by: benoit dot chenu at gmail dot com
 Reported by:mgfreshour at gmail dot com
 Summary:Empty if block causes catch block to be skipped
 Status: Open
 Type:   Bug
 Package:Compile Failure
 Operating System:   CentOS
 PHP Version:5.2.17
 Block user comment: N
 Private report: N

 New Comment:

I've got the same problem on PHP 5.3.6 and also using eaccelerator 0.9.6.

This is a known bug of eaccelerator's optimizer. To currently solve the 
problem, 
disable it :

eaccelerator.optimizer="0"

I suppose that the bug can be closed.

ref : http://eaccelerator.net/ticket/317


Previous Comments:

[2011-04-03 04:28:54] mgfreshour at gmail dot com

I have verified this behavior on two boxes.  The phpinfo are :
http://dl.dropbox.com/u/750344/mf-phpinfo.html
http://dl.dropbox.com/u/750344/dr-phpinfo.html

One has xdebug and eAccelerator and the other has just eAccelerator.  I'll 
create 
a VM without eAccelerator and attempt this again.  If the behavior doesn't 
continue, I'll submit the but to them.


[2011-04-02 17:57:56] fel...@php.net

I can't reproduce this issue. Are you using any Zend extension?


[2011-04-02 00:11:12] mgfreshour at gmail dot com

Description:

The test script will result in an "PHP Fatal error:  Uncaught exception 
'Exception'" with output of :
Start

Commenting out the if block will result in the expected output of :
Start
Inside
Finish

It seems the empty if block is nullifying the catch blocks.

Test script:
---
https://bugs.php.net/bug.php?id=54448&edit=1