Koozali.org: home of the SME Server

help with webcal

sidney

help with webcal
« on: November 28, 2001, 06:24:16 AM »
hello,

I am having trouble setting up webcal on SME v5
I get error when I try to make the change to a copy of 90e-smithAccess40ibays file
When I do a perl -c

here is what my file look like with any changes to it.
could some one show me what it should look like and where the new stting should be in the files.

Thank


#------------------------------------------------------------
# Information bay directories
#------------------------------------------------------------

{
    my %accounts;
    tie %accounts, 'esmith::config', '/home/e-smith/accounts';

    my $key;
    my $value;
    my $result = "";

    while (($key,$value) = each %accounts)
    {
   my ($type, %properties) = split (/\|/, $value, -1);
   if ($type eq 'ibay')
   {
       #------------------------------------------------------------
       # Figure out which combination of parameters to use. If
       # PublicAccess parameter is present, this is e-smith 4.0.
       # Otherwise, it's e-smith 3.0.
       #------------------------------------------------------------

            my $allow;
       my $pass;
       my $satisfy;
       
            if ($properties{'PublicAccess'})
       {
      if ($properties{'PublicAccess'} eq 'none')
      {
          next;
      }
      elsif ($properties{'PublicAccess'} eq 'local')
      {
          $allow   = $localAccess;
          $pass    = 0;
          $satisfy = 'all';
      }
      elsif ($properties{'PublicAccess'} eq 'local-pw')
      {
          $allow   = $localAccess;
          $pass    = 1;
          $satisfy = 'all';
      }
      elsif ($properties{'PublicAccess'} eq 'global')
      {
          $allow   = 'all';
          $pass    = 0;
          $satisfy = 'all';
      }
      elsif ($properties{'PublicAccess'} eq 'global-pw')
      {
          $allow   = 'all';
          $pass    = 1;
          $satisfy = 'all';
      }
      elsif ($properties{'PublicAccess'} eq 'global-pw-remote')
      {
          $allow   = $localAccess;
          $pass    = 1;
          $satisfy = 'any';
      }
       }
       elsif ($properties {'ReadAccess'} eq 'global')
       {
      if ($properties {'UsePassword'} eq 'yes')
      {
          $allow   = 'all';
          $pass    = 1;
          $satisfy = 'all';
      }
      else
      {
          $allow   = 'all';
          $pass    = 0;
          $satisfy = 'all';
      }
       }
       else
       {
      if ($properties {'UsePassword'} eq 'yes')
      {
          $allow   = $localAccess;
          $pass    = 1;
          $satisfy = 'all';
      }
      else
      {
          $allow   = $localAccess;
          $pass    = 0;
          $satisfy = 'all';
      }
       }


       my $dynamicContent = $properties{'CgiBin'} || "disabled";
            $result .= "\n";
            $result .= "#------------------------------------------------------------\n";
       $result .= "# $key ibay directories ($properties{'Name'})\n";
            $result .= "#------------------------------------------------------------\n";

            $result .= "\n";
            $result .= "\n";
            $result .= "    Options Indexes\n";
       if ($dynamicContent eq 'enabled')
       {
      $result .= "    Options +Includes\n";
       }
       else
       {
      $result .= "    \n";
      $result .= "        order deny,allow\n";
      $result .= "        Deny from all\n";
      $result .= "    
\n";
      $result .= "    Options +IncludesNOEXEC\n";
       }
            $result .= "    AllowOverride None\n";
            $result .= "    order deny,allow\n";
            $result .= "    deny from all\n";
            $result .= "    allow from $allow\n";
       if ($pass)
       {
                $result .= "    AuthName \"$properties{'Name'}\"\n";
                $result .= "    AuthType Basic\n";
                $result .= "    AuthExternal pwauth\n";
                $result .= "    require user $key\n";
      $result .= "    Satisfy $satisfy\n";
       }
            $result .= "
\n";

            $result .= "\n";
            $result .= "\n";
       if ($dynamicContent eq 'enabled')
       {
      $result .= "    Options ExecCGI\n";
       }
            $result .= "    AllowOverride None\n";
            $result .= "    order deny,allow\n";
            $result .= "    deny from all\n";
            $result .= "    allow from $allow\n";
       if ($pass)
       {
                $result .= "    AuthName \"$properties{'Name'}\"\n";
                $result .= "    AuthType Basic\n";
                $result .= "    AuthExternal pwauth\n";
                $result .= "    require user $key\n";
                $result .= "    Satisfy $satisfy\n";
       }
            $result .= "
\n";

            $result .= "\n";
            $result .= "\n";
            $result .= "    AllowOverride None\n";
            $result .= "    ForceType application/octet-stream\n";
            $result .= "    order deny,allow\n";
            $result .= "    deny from all\n";
            $result .= "    allow from $allow\n";
       if ($pass)
       {
                $result .= "    AuthName \"$properties{'Name'}\"\n";
                $result .= "    AuthType Basic\n";
                $result .= "    AuthExternal pwauth\n";
                $result .= "    require user $key\n";
                $result .= "    Satisfy $satisfy\n";
       }
            $result .= "
\n";
   }
    }

    $result;
}

James Shields

Re: help with webcal
« Reply #1 on: November 28, 2001, 02:09:21 PM »
I am having exactly the same problems when trying to make the changes. I have posted twice earlier on this subject, but no luck. I am contemplating using an earlier HowTo and using an alternate Calendar.

I have tried using "pico", "vi" & editor in Midnight Commander. I have made changes exactly as described by Placido in his HowTo, but always get a syntax error when using the perl -c to check the file.

Hope somebody can help us !! Maybe even send us a known working copy of the modified file.....

sage

Re: help with webcal
« Reply #2 on: November 29, 2001, 12:45:03 AM »
I have webcal working on a sme5.

I copied your text and ran a perl -c on it and it said syntax ok.


This was done on an nt4 box with perl v5.001 unofficial patchlevel 1m.

You should just keep going and see if it work.  If not, what line is the error on?

Sidney

Re: help with webcal
« Reply #3 on: November 29, 2001, 04:45:43 PM »
Sage,

  the 90e-smith40ibays did not have the webcal setting in it.
can you try adding them to it and run it again?



Thanks


Ps if it works for you would you email me the file back with the webcal  setting in it.


Thanks again.
Sidney
sidney.king@ncmail.net

Sidney

Re: help with webcal
« Reply #4 on: November 29, 2001, 07:10:44 PM »
Hello Again,

   Here is the 90e-smithAccess40ibays file that I have made changes to for the webcal.
The error that I get when I try to /etc/init.d/httpd restart
"syntax error on line 2256 /etc/httpd/conf/httpd.conf"

I ran the perl -c command and I don't get an syntax error.


#------------------------------------------------------------
# Information bay directories
#------------------------------------------------------------

{
    my %accounts;
    tie %accounts, 'esmith::config', '/home/e-smith/accounts';

    my $key;
    my $value;
    my $result = "";

    while (($key,$value) = each %accounts)
    {
   my ($type, %properties) = split (/\|/, $value, -1);
   if ($type eq 'ibay')
   {
       #------------------------------------------------------------
       # Figure out which combination of parameters to use. If
       # PublicAccess parameter is present, this is e-smith 4.0.
       # Otherwise, it's e-smith 3.0.
       #------------------------------------------------------------

            my $allow;
       my $pass;
       my $satisfy;
       
            if ($properties{'PublicAccess'})
       {
      if ($properties{'PublicAccess'} eq 'none')
      {
          next;
      }
      elsif ($properties{'PublicAccess'} eq 'local')
      {
          $allow   = $localAccess;
          $pass    = 0;
          $satisfy = 'all';
      }
      elsif ($properties{'PublicAccess'} eq 'local-pw')
      {
          $allow   = $localAccess;
          $pass    = 1;
          $satisfy = 'all';
      }
      elsif ($properties{'PublicAccess'} eq 'global')
      {
          $allow   = 'all';
          $pass    = 0;
          $satisfy = 'all';
      }
      elsif ($properties{'PublicAccess'} eq 'global-pw')
      {
          $allow   = 'all';
          $pass    = 1;
          $satisfy = 'all';
      }
      elsif ($properties{'PublicAccess'} eq 'global-pw-remote')
      {
          $allow   = $localAccess;
          $pass    = 1;
          $satisfy = 'any';
      }
       }
       elsif ($properties {'ReadAccess'} eq 'global')
       {
      if ($properties {'UsePassword'} eq 'yes')
      {
          $allow   = 'all';
          $pass    = 1;
          $satisfy = 'all';
      }
      else
      {
          $allow   = 'all';
          $pass    = 0;
          $satisfy = 'all';
      }
       }
       else
       {
      if ($properties {'UsePassword'} eq 'yes')
      {
          $allow   = $localAccess;
          $pass    = 1;
          $satisfy = 'all';
      }
      else
      {
          $allow   = $localAccess;
          $pass    = 0;
          $satisfy = 'all';
      }
       }


       my $dynamicContent = $properties{'CgiBin'} || "disabled";
            $result .= "\n";
            $result .= "#------------------------------------------------------------\n";
       $result .= "# $key ibay directories ($properties{'Name'})\n";
            $result .= "#------------------------------------------------------------\n";

            $result .= "\n";
            $result .= "\n";
            $result .= "    Options Indexes\n";
       if ($dynamicContent eq 'enabled')
       {
      $result .= "    Options +Includes\n";
       }
       else
       {
      $result .= "    \n";
      $result .= "        order deny,allow\n";
      $result .= "        Deny from all\n";
      $result .= "    
\n";
      $result .= "    Options +IncludesNOEXEC\n";
       }
            $result .= "    AllowOverride None\n";
            $result .= "    order deny,allow\n";
            $result .= "    deny from all\n";
            $result .= "    allow from $allow\n";
       if ($pass)
       {
                $result .= "    AuthName \"$properties{'Name'}\"\n";
                $result .= "    AuthType Basic\n";
                $result .= "    AuthExternal pwauth\n";
                $result .= "    require user $key\n";
      $result .= "    Satisfy $satisfy\n";
       }
            $result .= "
\n";

            $result .= "\n";
           
            #this is only for webcal
            if ($key eq 'webcal')
            {
                $result .= "\n";
                $result .= "\n";
                $result .= "    Options ExecCGI\n";
                $result .= "    AllowOverride AuthConfig\n";
                $result .= "    order deny,allow\n";
                $result .= "    deny from all\n";
                $result .= "    allow from all\n";
                $result .= "\n";
            }

       $result .= "\n";
       if ($dynamicContent eq 'enabled')
       {
      $result .= "    Options ExecCGI\n";
       }
            $result .= "    AllowOverride None\n";
            $result .= "    order deny,allow\n";
            $result .= "    deny from all\n";
            $result .= "    allow from $allow\n";
       if ($pass)
       {
                $result .= "    AuthName \"$properties{'Name'}\"\n";
                $result .= "    AuthType Basic\n";
                $result .= "    AuthExternal pwauth\n";
                $result .= "    require user $key\n";
                $result .= "    Satisfy $satisfy\n";
       }
           
            #this is for webcal only
            if ($key eq 'webcal')
            {
                $result .= "AllowOverride AuthConfig\n";        
            }
            else
            {
                $result .= " AllowOverride None\n";
            }
           
            $result .= "
\n";    
            $result .= "\n";
            $result .= "\n";
            $result .= "    AllowOverride None\n";
            $result .= "    ForceType application/octet-stream\n";
            $result .= "    order deny,allow\n";
            $result .= "    deny from all\n";
            $result .= "    allow from $allow\n";
       if ($pass)
       {
                $result .= "    AuthName \"$properties{'Name'}\"\n";
                $result .= "    AuthType Basic\n";
                $result .= "    AuthExternal pwauth\n";
                $result .= "    require user $key\n";
                $result .= "    Satisfy $satisfy\n";
       }
            $result .= "
\n";
   }
    }

    $result;
}





Also when I go to www.myserver.net/webcal/cgi-bin/webcal.cgi
It look like there supost to be an inage at the bottom of the page but it doen't show up.
and I change the index.html to



it does not go to the web page when I type www.myserver.com/webcal




Please help this is driven me nuts!

sage

Re: help with webcal
« Reply #5 on: November 30, 2001, 12:55:07 AM »
here are the entries in my /etc/httpd/conf/httpd.conf for webcal

    # webcal ibay (callender)

    ScriptAlias /webcal/cgi-bin /home/e-smith/files/ibays/webcal/cgi-bin
    Alias       /webcal/files   /home/e-smith/files/ibays/webcal/files
    Alias       /webcal         /home/e-smith/files/ibays/webcal/html


in the template-custom 90 you have

#this is only for webcal
if ($key eq 'webcal')
{
$result .= "\n";
$result .= "\n";
$result .= " Options ExecCGI\n";
$result .= " AllowOverride AuthConfig\n";
$result .= " order deny,allow\n";
$result .= " deny from all\n";
$result .= " allow from all\n";
$result .= "\n";
}

I have the following

#this is for webcal only
if ($key eq 'webcal')
{
     $result .= " AllowOverride AuthConfig\n";
}
else
{
     $result .= " AllowOverride None\n";
}


If you still want files just let me know which ones you want.

Sidney

Re: help with webcal
« Reply #6 on: November 30, 2001, 01:11:41 AM »
Sage,


  I am unclear about you instruction.
The how to for install the webcal show having both changes
statement in the 90e-smith40ibays file.


#this is only for webcal
            if ($key eq 'webcal')
            {
                $result .= "\n";
                $result .= "\n";
                $result .= "    Options ExecCGI\n";
                $result .= "    AllowOverride AuthConfig\n";
                $result .= "    order deny,allow\n";
                $result .= "    deny from all\n";
                $result .= "    allow from all\n";
                $result .= "\n";
            }

And


#this is for webcal only
            if ($key eq 'webcal')
            {
                $result .= "AllowOverride AuthConfig\n";        
            }
            else
            {
                $result .= " AllowOverride None\n";
            }


Just like your last post.
What changes should I do?

Thanks

James Shields

Re: help with webcal
« Reply #7 on: November 30, 2001, 02:29:40 AM »
Sidney,

I too understand that both changes need to be added. I have made changes as instructed, but keep getting syntax error when using perl -c to check the file.

Sage, maybe you could send the modified file.

James Shields

Re: help with webcal
« Reply #8 on: November 30, 2001, 12:49:04 PM »
Sidney,

I have finally made the changes, and get "Syntax OK". I have sent you a copy of the modified "90e-smithAccess40ibays" file.

My only remaining problem, is I cannot log into the admin section. What username and password do you use to connect ?

James

Sidney

Re: help with webcal
« Reply #9 on: November 30, 2001, 11:07:14 PM »
Thanks Guys!


It is working :)

David Lemstra

Re: help with webcal
« Reply #10 on: January 03, 2002, 02:54:38 AM »
It think the login and password were both initialy "admin"

David

rk

More help with Webcal...
« Reply #11 on: February 25, 2002, 10:45:27 PM »
I too am having password problems with Webcal.  I followed the instructions and went back and double checked everything.  I cannot get any of the passwords to work for webcal.  I used the apache htpasswd command to reset the admin password, so I know it works.  However the system just keeps prompting me for the password over and over.  Can anyone give me a few directions I can go in to figure this out?

rk