Go Back   ZeroC Forums > Help Center

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 07-06-2005
labesta labesta is offline
Registered User
 
Name: Joao Magalhaes
Organization: Faculdade de Engenharia da Universidade do Porto
Project: Test project
 
Join Date: Jul 2005
Location: Portugal
Posts: 3
Send a message via MSN to labesta
-->
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

Last edited by labesta : 07-06-2005 at 02:39 PM.
Reply With Quote
  #2 (permalink)  
Old 07-06-2005
mes's Avatar
mes mes is offline
ZeroC Staff
 
Name: Mark Spruiell
Organization: ZeroC, Inc.
Project: Ice Developer
 
Join Date: Feb 2003
Location: California
Posts: 971
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
Reply With Quote
  #3 (permalink)  
Old 07-06-2005
labesta labesta is offline
Registered User
 
Name: Joao Magalhaes
Organization: Faculdade de Engenharia da Universidade do Porto
Project: Test project
 
Join Date: Jul 2005
Location: Portugal
Posts: 3
Send a message via MSN to labesta
-->
Tnx problem solved

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



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT -4. The time now is 10:56 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0
(c) 2008 ZeroC, Inc.