[freeside] Clicking links comes up with Source Code

Scott Miller srmiller at interbel.net
Fri Dec 26 23:49:03 PST 2003


----- Original Message ----- 
From: "Scott Miller" <srmiller at interbel.net>
To: <ivan-freeside at sisd.com>
Sent: Wednesday, December 24, 2003 1:25 PM
Subject: Re: [freeside] Clicking links comes up with Source Code


>
> ----- Original Message ----- 
> From: "Sven Willenberger" <sven at dmv.com>
> To: <ivan-freeside at sisd.com>
> Sent: Wednesday, December 24, 2003 1:06 PM
> Subject: Re: [freeside] Clicking links comes up with Source Code
>
>
> > On Wed, 2003-12-24 at 13:34, Scott Miller wrote:
> > > ----- Original Message ----- 
> > > From: "Sven Willenberger" <sven at dmv.com>
> > > To: <ivan-freeside at sisd.com>
> > > Sent: Wednesday, December 24, 2003 10:49 AM
> > > Subject: Re: [freeside] Clicking links comes up with Source Code
> > >
> > >
> > > > On Wed, 2003-12-24 at 12:06, Scott Miller wrote:
> > > > > Thanks,
> > > > >
> > > > >    I've added the command as such:
> > > > >
> > > > > ScriptAlias /cgi-bin/ /usr/local/apache/htdocs/freeside-asp
> > > > > ScriptAlias /cgi-bin/ /var/www/freeside
> > > > > #ScriptAlias /cgi-bin/ /var/www/freeside/cgi-bin
> > > > > Options +Includes +ExecCGI
<-------------
> > > > > CustomLog /var/www/html/logs/access_log combined
> > > > > ErrorLog /var/www/html/logs/error_log
> > > > > TransferLog /var/www/html/logs/access_log
> > > > >
> > > > > Restarted apache - it came up fine this time.
> > > > >
> > > > > I still, however, am not able to execute cgi-scripts from outside
> the
> > > > > cgi-bin area.
> > > > >
> > > > > More info on this, I snooped around looking to make sure
everything
> > > > > was in it's appropriate place, and found:
> > > > >
> > > > > /usr/local/apache does not exist, however /usr/local/apache2 does,
> but
> > > > > there is no htdocs/freeside-asp folder.  I created the
freeside-asp
> > > > > folder, and copied the aspdocs folder to it:
> > > > > cp aspdocs /usr/local/apache2/htdocs/freeside-asp
> > > > >
> > > > > cp aspdocs /usr/local/apache2/htdocs/freeside-asp
> > > > > cp: omitting directory `aspdocs'
> > > > >
> > > > > - so now the folder is
> > > > > /usr/local/apache2/htdocs/freeside-asp/aspdocs/*     (- are all
the
> > > > > aspdocs files supposed to be in the freeside-asp folder, and not
> > > > > create the aspdocs folder? )
> > > > >
> > > > > I then edited my httpd.conf to read the following:
> > > > >
> > > > > <VirtualHost 63.166.12.251>
> > > > > DocumentRoot /var/www
> > > > > ServerName freeside.domain.com
> > > > > ScriptAlias /cgi-bin/ /usr/local/apache2/htdocs/freeside-asp
> > > > > ScriptAlias /cgi-bin/ /var/www/freeside
> > > > > #ScriptAlias /cgi-bin/ /var/www/freeside/cgi-bin
> > > > > Options +Includes +ExecCGI
> > > > > CustomLog /var/www/html/logs/access_log combined
> > > > > ErrorLog /var/www/html/logs/error_log
> > > > > TransferLog /var/www/html/logs/access_log
> > > > >
> > > > > <Directory /usr/local/apache2/htdocs/freeside-asp>
> > > > > <Files ~ (\.cgi)>
> > > > > AddHandler perl-script .cgi
> > > > > PerlHandler Apache::ASP
> > > > > </Files>
> > > > > Options +Includes +ExecCGI
> > > > > <Perl>
> > > > > $MLDBM::RemoveTaint = 1;
> > > > > </Perl>
> > > > > PerlSetVar Global /usr/local/etc/freeside/asp-global/
> > > > > PerlSetVar Debug 2
> > > > > </Directory>
> > > > >
> > > > > <Directory /usr/local/apache2/htdocs/freeside-asp>
> > > > > AuthName Freeside
> > > > > AuthType Basic
> > > > > Options +Includes +ExecCGI
> > > > > AuthUserFile /usr/local/etc/freeside/htpasswd
> > > > > require valid-user
> > > > > </Directory>
> > > > > </VirtualHost>
> > > > >
> > > > > service httpd restart comes back as OK
> > > > >
> > > > > But still - can not execute the cgi-scripts, each link clicked
comes
> > > > > back with the source code.  Even restarted my windows computer to
> see
> > > > > if that would make a difference - didn't.
> > > > >
> > > > aspdocs should not exist as a subdirectory under freeside-asp
> > > > I would "rm -rf /usr/local/apache2/htdocs/freeside-asp"
> > > > Then run the cp command again and see if that helps. Also, in your
> > > > config above in the VirtualHost directive, you have set the
ServerName
> > > > to be freeside.domain.com; if that was done for example purposes
fine,
> > > > but if it is really like that, then that whole section is ignored if
> you
> > > > browse to freeside.interbelhost.com
> > > >
> > > > P.S. it would really help if you would stop top-posting as this
thread
> > > > is pretty much chopped to shreds now and it makes it very tough for
> > > > others to try and follow what is going on here.
> > > >
> > > > Sven
> > >
> > > Copied the aspdocs files to the /usr/local/apache2/htdocs/freeside-asp
> > > directory successfully, restarted apache.
> > >
> > > I change interbelhost.com to domain.com out of habit on my posts.
> > >
> > > I'm not sure exactly what I'm doing wrong - it's probably something
> really
> > > simple.  I walked through the install once again, making sure I didn't
> > > forget something, making sure nothing errored.
> > >
> > > Installed all perl modules.
> > > Installed PostgreSQL
> > >   created a user freeside
> > > MySQL Already Installed
> > > Edited top-level Makefile  DBI:mysql:freeside
> > > make create-database created the MySQL Database - verified that it was
> > > populated with a bunch of tables
> > > make perl-modules and install-perl-modules installed 81 FS perl
modules
> > > make create-config - no errors
> > > copied aspdocs files to the /usr/local/apache2/htdocs/freeside-asp
> > > created directory /usr/local/etc/freeside/asp-global - chown freeside
> > > copied htetc/global.asa to the above directory
> > > created a new virtual host with the following:
> > >
> > > <VirtualHost 63.166.12.251>
> > > DocumentRoot /var/www
> > > ServerName freeside.interbelhost.com
> > > ScriptAlias /cgi-bin/ /usr/local/apache2/htdocs/freeside-asp
> > > ScriptAlias /cgi-bin/ /var/www/freeside
> > > #ScriptAlias /cgi-bin/ /var/www/freeside/cgi-bin
> > > Options +Includes +ExecCGI
> > > CustomLog /var/www/html/logs/access_log combined
> > > ErrorLog /var/www/html/logs/error_log
> > > TransferLog /var/www/html/logs/access_log
> > >
> > > <Directory /usr/local/apache2/htdocs/freeside-asp>
> > > <Files ~ (\.cgi)>
> > > AddHandler perl-script .cgi
> > > PerlHandler Apache::ASP
> > > </Files>
> > > Options +Includes +ExecCGI
> > > <Perl>
> > > $MLDBM::RemoveTaint = 1;
> > > </Perl>
> > > PerlSetVar Global /usr/local/etc/freeside/asp-global/
> > > PerlSetVar Debug 2
> > > </Directory>
> > >
> > > <Directory /usr/local/apache2/htdocs/freeside-asp>
> > > AuthName Freeside
> > > AuthType Basic
> > > Options +Includes +ExecCGI
> > > AuthUserFile /usr/local/etc/freeside/htpasswd
> > > require valid-user
> > > </Directory>
> > > </VirtualHost>
> > >
> > > created one freeside user:  freeside-adduser -h
> > > /usr/local/etc/freeside/htpasswd "username"
> > >
> > > while still as user "freeside" cd'd to
> /var/www/html/Freeside/freeside-1.4.1
> > > then ran bin/fs-setup "username" (as created above)
> > >    entered into RADIUS check attributes:
> > >          Password
> > >    entered into reply attributes:
> > >          Framed-IP-Address Framed-MTU Fall-Through Idle-Timeout
> > > Framed-Protocol Service-Type
> > >    enable tracking of a second, separate shipping/service address?   N
> > >    This created the table cust_bill
> > >
> > > Then ran /bin/populate-msgcat "username" (same as created above)
> > >    No errors reported - back to command line
> > >
> > > Edited the top-level Makefile (as root) and changed the line
> > > QUEUED_USER="username" (name created above)
> > >
> > > Ran make install-init, no errors returned
> > >
> > > When I proceed to the "administration" section:
> > > http://freeside.interbelhost.com/freeside, it says to :
> > > Select Configuration from the main menu and update your configuration
> > > values.
> > >
> > > Selected "Sysadmin" from the top links, then selected "configuration"
> but
> > > all that comes up is the source code.
> > >
> > > Not exactly sure what I missed - probably something really easy.
> > >
> > > Any help would be appriciated.
> >
> > Get rid of scriptalias, you don't need it in this context as freeside
> > doesn't run out of a cgi-bin url. Next, I noticed you are running apache
> > 2.0. Based on the fact you didn't mention the error that usually comes
> > up with this (regarding mod_perl and apache 2.0), I suspect that you may
> > have not installed mod_perl. What do your error_log files say about
> > that?
> >
> > Now, it is a known issue that mod_perl 2.0 and apache 2.0 don't play
> > nice. Your best bet is to create a separate apache install for freeside
> > (using the latest apache 1.3.xx). Make sure you have installed mod_perl.
> >
> > I installed this using mason instead of apache::asp but I suspect the
> > perl interpreter is never even getting invoked from the httpd.conf file.
> > (a quick httpd -l will verify if mod_perl is compiled in statically or
> > not).
> >
> > Sven
> >
> >
> I thought for sure I was running Apache 1.3.27 - that's what I installed a
> while back.  Possibly - i guess - doing the redhat updates could have
> upgraded this?  I'm also running webmin on this box, and webmis says
apache
> is version 1.3.27, but guess that could be wrong?  Dong the httpd -l shows
> mod_perl is not compiled, although webmin says it is.  Very strange.
>
> I'll just completely un-install apache, then re-install it, and attempt
this
> installation once again.
>
> Not sure why I chose apache::asp instead of mason, maybe it installed with
> no other dependencies.
>
> Thanks,
> Scott

I did verify that I have apache 1.3.27 installed - I even removed it
completely, and re-installed it.  I guess my problem lies in mod_perl.  I've
installed it vi rpm, but it does not seem to take.:

Description:
Mod_perl incorporates a Perl interpreter into the Apache web server,
so that the Apache web server can directly execute Perl code.
Mod_perl links the Perl runtime library into the Apache web server and
provides an object-oriented Perl interface for Apache's C language
API.  The end result is a quicker CGI script turnaround process, since
no external Perl interpreter has to be started.

Install mod_perl if you're installing the Apache web server and you'd
like for it to directly incorporate a Perl interpreter.

Package mod_perl Class System Environment/Daemons
Version 1.26-5 Vendor Red Hat, Inc.
Architecture i386 Installed 26/Dec/2003 11:08

In my httpd.conf file:

<IfModule mod_perl.c>
    Alias /perl /var/www/perl
    <Directory /var/www/perl>
        SetHandler perl-script
        PerlHandler Apache::Registry
        Options +ExecCGI
    </Directory>
</IfModule>

But nothing else that relates to mod_perl.  In my /usr/lib/apache   there is
no mod_perl there either.  Trying to read and follow the perl.apache.org
site is a bit much right now - not to say it's not well documented, it is.

Anyway - if there is a quick, down-and-dirty way to get mod_perl configured
properly, I'd be glad to give it a shot.  Im not even exactly sure this is
my problem, but guess I better fix one thing at a time and go from there.

Thanks,
Scott


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.556 / Virus Database: 348 - Release Date: 12/27/2003




More information about the freeside-users mailing list