Archived

This forum has been archived. Please start a new discussion on GitHub.

Problem with SSL and PHP

Hi,

I’m having some problems while trying to connect to an Ice server using SSL via PHP.
I can connect without problems while using standard TCP or UDP connection, the problems appear only while using SSL.
I’m using FC3 and installed ICE via RPM.
I’ve compiled the PHP extension with all the necessary libs (IceSSL, IceXML and Expat).
The file I'm using is the one from the hello example and I'm using the java version for the server. If I use the java client there's is no problem at all even using SSL.

I get this message:

Ice_UnknownLocalException Object
(
[unknown] => EndpointFactoryManager.cpp:105: Ice::EndpointParseException:
error while parsing endpoint `ssl -p 10002'
[message:protected] =>
[string:private] =>
[code:protected] => 0
[file:protected] => /var/www/html/testeicephp/hello.php
[line:protected] => 34
[trace:private] => Array
(
[0] => Array
(
[file] => /var/www/html/testeicephp/hello.php
[line] => 34
[function] => stringToProxy
[class] => Ice_Communicator
[type] => ->
[args] => Array
(
[0] => hello:tcp -p 10001:udp -p 10001:ssl -p 10002
)


)

)

)

Thanks

Comments

  • mes
    mes California
    Hi,

    The EndpointParseException is an indication that the SSL plug-in is not installed. You will need to configure the SSL plug-in for IcePHP just like you would for any Ice for C++ program. For example, the configuration file from the C++ hello demo contains the following lines:

    Ice.Plugin.IceSSL=IceSSL:create
    IceSSL.Client.CertPath=../../../certs
    IceSSL.Client.Config=sslconfig.xml
    IceSSL.Server.CertPath=../../../certs
    IceSSL.Server.Config=sslconfig.xml

    For IcePHP, one solution is to place the lines above in a configuration file that is accessible to Apache, modify the pathnames as necessary, and add an ice.config directive to your php.ini file so that IcePHP loads this configuration file during Apache startup. The IceSSL shared library and its dependencies must also be accessible in Apache's shared library search path.

    Hope that helps,
    - Mark
  • Tnx ;) problem solved

    I was using a config file equal to the java one ... not like the cpp one.