Archived

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

2 .Ice in php

Hello, I have a problem because I need to use 2 .ice (Drupal.ice and Clase.ice) in my page and If I put in the php.ini:

ice.slice=/var/www/drupal-4.7.0/modules/suscripcion/Clases.ice
ice.slice=/var/www/drupal-4.7.0/modules/suscripcion/Drupal.ice

it doesn't work. How I can use 2 .ice in PHPIce?

Thanks

Comments

  • mes
    mes California
    Hi,

    Put both files on the same ice.slice line.

    Take care,
    - Mark
  • but with wich separator

    HI, could yo put an example for me?Because I don't know if you have to separate it with comas,etc...

    Thanks
  • mes
    mes California
    You separate the files with spaces, just like on the command line of a Slice compiler:

    ice.slice=Drupal.ice Clases.ice

    Take care,
    - Mark
  • Not good solution

    Hi again it doesn't work :( I have put:

    ice.slice=/var/www/drupal-4.7.0/modules/suscripcion/Clases.ice /var/www/drupal-4.7.0/modules/suscripcion/Drupal.ice

    with spaces, like you say to me, but in the mozilla this message appears

    Unable to connect
    Firefox can't establish a connection to the server at localhost.

    with one .ice it works good but when I use two It doesn't work. Do you know the problem?

    Thanks
  • matthew
    matthew NL, Canada
    Connecting with a web browser isn't the right approach to diagnose such a failure. You need to look at the Apache log files to find out why the web server is not starting.
  • Apache 2 logs

    Hi again, these are the apache2 logs

    [Wed Jun 14 17:33:40 2006] [notice] Apache/2.0.55 (Debian) PHP/5.1.2-1+b1 configured -- resuming normal operations
    [Wed Jun 14 17:34:09 2006] [notice] caught SIGTERM, shutting down
    /var/www/drupal-4.7.0/modules/suscripcion/Drupal.ice:4: No include path in which to find Clases.ice
    PHP Fatal error: Unable to start ice module in Unknown on line 0

    I have put the two .ice (Clases.ice and Drupal.ice) like you say to me. These are the .ice:

    Clases.ice

    #ifndef CLASES_ICE
    #define CLASES_ICE


    module Management{

    class Notification
    {
    string idMachine;
    string idGame;
    string clase;
    string name;
    string info;
    string timeStamp;

    };

    sequence<Notification> allNotifications;
    dictionary<string,string> parameters;
    };


    #endif

    *******************************************************************************************************
    Drupal.ice

    #ifndef DRUPAL_ICE
    #define DRUPAL_ICE

    #include <Clases.ice>


    module Management{

    interface Drupal{

    int subscribe(string idMachine, string topic);
    int unsubscribe(string idMachine, string topic);

    allNotifications getNotificationByDate(string idMachine, string topic, string end, string begin);
    allNotifications getNotification(string idMachine, string topic, parameters allParam);
    };
    };

    #endif

    ********************************************************************************************************

    How I can solve it?

    Thanks
  • mes
    mes California
    Since Drupal.ice includes Clases.ice, you only need to include Drupal.ice, but you also need to specify where it can find included files, like this:

    ice.slice=-I/var/www/drupal-4.7.0/modules/suscripcion /var/www/drupal-4.7.0/modules/suscripcion/Drupal.ice

    Take care,
    - Mark
  • now i have 3 slice files, A includes C, B includes C(ifndef... define...endif used in each slice file )

    so when i write ice.slice = a.ice, b.ice

    there are redefinition errors. so how can i avoid this problem

    thanks
  • matthew
    matthew NL, Canada
    What type of redefinition errors? If a.ice includes b.ice then you don't need to have both a.ice and b.ice on the ice.slice directive.
  • a.ice includes c.ice
    b.ice includes c.ice

    but different contents in a.ice and b.ice. neither slice file includes another one.

    so how can i do if i want to include both a.ice and b.ice?

    thanks


    matthew wrote: »
    What type of redefinition errors? If a.ice includes b.ice then you don't need to have both a.ice and b.ice on the ice.slice directive.
  • benoit
    benoit Rennes, France
    Hi,

    The easiest is to create a top-level Slice file that includes both a.ice and b.ice and use this Slice file in the definition of ice.slice.

    Cheers,
    Benoit.