|
|
|
|||||
|
Configuration problems with PHP
Hello!
I am new with PHP and I am trying to test a simple example of PHP client. I use Debian etch/sid, Apache 2.0, PHP 5.1.4-0.1, and Ice 3.1.0 (using Debian Sid repositories). I specify the following line in the /etc/php5/apache2/php.ini: ice.slice=/var/www/test.ice but when I try to test the simple example (using a web browser), I obtain the following error: Fatal error: Call to undefined function Ice_loadProfile() in /var/www/test.php on line 12 I have studied the examples included in the IcePHP distribution, but I have not found any difference. Thank you, David.
__________________
Full name: David Vallejo Fernández University of Castilla-La Mancha (Spain) ICE Project: basic-fipa-multiagentsystem |
|
|||||
|
Hello,
I installed the Debian package php-zeroc-ice (using the repositories of Debian Sid), but I can't find the icephp.so file in /usr/lib. However, in the /usr/lib/php5/20051025/ directory there is a ice.so file, but it doesn't work if I use it to load the Ice extension for PHP (the Apache2 web server doesn't start). Some idea? Thank you, David.
__________________
Full name: David Vallejo Fernández University of Castilla-La Mancha (Spain) ICE Project: basic-fipa-multiagentsystem |
|
||||||
|
I'm afraid you'll have to ask this question the Debian Ice maintainer. The Debian port is not from ZeroC. See http://packages.debian.org/unstable/devel/zeroc-ice.
|
|
|||||
|
Hello again!
I have solved the problem with the Ice extension for PHP, but I have a simple question. Where can I find an example of a PHP script in which I establish a connection with Glacier? Here is the code I have to port using Python: router = Glacier2.RouterPrx.checkedCast(self.communicator() .getDefaultRouter()) session = router.createSession('user', 'password') Regards, David.
__________________
Full name: David Vallejo Fernández University of Castilla-La Mancha (Spain) ICE Project: basic-fipa-multiagentsystem |
|
||||||
|
Hi,
To access Glacier2 from a PHP script, you'll need to define the Ice.Default.Router property in your IcePHP configuration. You'll also need to load the Glacier2 Slice files. In your script, you can do the following: Code:
$prop = $ICE->getProperty("Ice.Default.Router");
$router = $ICE->stringToProxy($prop)->ice_checkedCast("::Glacier2::Router");
$session = $router->createSession(...);
- Mark |
|
|||||
|
Sorry for being so insistent, but I can't load the Glacier2 Slice files I need. My php.ini file is the following:
ice.config=/var/www/masyro/agent.cfg ice.slice=-I/usr/share/slice/Glacier2/Router.ice /var/www/masyro/MASYRO.ice extension_dir = "/usr/lib/php5/20051025" extension = ice.so Apache2 starts correctly (it doesn't show any error in its log file), but when this code is executed $prop = $ICE->getProperty("Ice.Default.Router"); $router = $ICE->stringToProxy($prop)->ice_checkedCast("::Glacier2::Router"); $session = $router->createSession("user", "password"); I obtain the following error: no Slice definition found for type ::Glacier2::Router in /var/www/masyro/agentes.php on line 15 I have found a similar example with IcePack, but my example doesn't work by following the same steps. I use Debian etch/sid, Ice 3.1.0, PHP 5, and Apache2. Thank you again, David.
__________________
Full name: David Vallejo Fernández University of Castilla-La Mancha (Spain) ICE Project: basic-fipa-multiagentsystem |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Setting a default configuration file | eric.hill | Help Center | 14 | 07-03-2008 10:01 AM |
| problems with VC8.0 | stephan | Bug Reports | 2 | 07-31-2006 09:39 AM |
| Plugin configuration | kwaclaw | Comments | 9 | 09-29-2005 08:07 PM |
| IcePack and Glacier2 configuration | xdm | Help Center | 4 | 06-01-2005 12:37 PM |
| IceStorm example - configuration | Bruce | Help Center | 1 | 03-18-2004 12:57 PM |