Live Chat & Podcast at 1:00PM Eastern on Sunday!
There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
Search
Web Design & Development
Tag Cloud
access acer asus bios bsod computer crash desktop driver drivers error ethernet excel freeze gaming graphics hard drive hardware hdmi internet laptop lcd malware memory monitor motherboard network operating system printer problem ram registry router slow software sound trojan ubuntu 11.10 uninstall usb video virus vista wifi windows windows 7 windows 7 32 bit windows 7 64 bit windows xp wireless
Search
Search for:
Tech Support Guy Forums > Internet & Networking > Web Design & Development >
Solved: CGI script - elements not available

Reply  
Thread Tools
Kelveeno's Avatar
Member with 35 posts.
 
Join Date: May 2009
18-Mar-2010, 07:14 PM #1
Solved: CGI script - elements not available
I'm running apache 2.2.12 on Ubuntu 9.10 server. It's a basic install with mostly default settings (I changed the doc root from /var/www to /var/www/html for the default site, and placed the index.htm file accordingly). The server will properly server the default index.htm page to IE or firefox browsers.

I am running proprietary database software that uses a local client or a web-based client. The local client works fine, but web client does not. I can navigate to the main page using this link http://99.66.152.2/ttweb/login.htm. The page displays correctly. If I click on the login button the cgi script executes, but elements are not displayed, and all the formatting is absent. I clicked on the properties of one of these missing elements and the URL it is looking for is incorrectly shown as http://var/www/html/ttweb/images/btn_msthd_logout_d.gif as an example. It looks like it is using the document root ( /var/www/html ) instead of the server address. The element is accessible in a separate page if I replace "/var/www/html" with the server's IP address. I tried to authenticate but the server returns a 404 error because it is trying to access a cgi script at http://99.66.152.2/var/www/cgi-bin/ttcgi.exe. The correct link should not have "/var/www" in the middle, just http://99.66.152.2/cgi-bin/ttcgi.exe. I don't know where the problem is, is it the CGI script or is it my apache config? This is the default site .conf file:

<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html

<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>

<Directory "/var/www/html">
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>

ScriptAlias /cgi-bin/ /var/www/cgi-bin/
AddHandler cgi-script .cgi .exe .pl

<Directory "/var/www/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>

ErrorLog /var/log/apache2/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /var/log/apache2/access.log combined
Alias /doc/ "/usr/share/doc/"

<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>

</VirtualHost>
tomdkat's Avatar
Computer Specs
Distinguished Member with 7,127 posts.
 
Join Date: May 2006
Location: S.F. Bay Area, CA
Experience: Intermediate
18-Mar-2010, 07:44 PM #2
It sounds like the CGI program isn't generating the URLs to the images properly. You indicate the CGI program has a ".exe" file extension. Is this a Windows executable or a Linux executable with a ".exe" file extension? Do you have access to the source of the CGI program? If so, a code inspection might provide some clues as to what is going on.

Peace...
Kelveeno's Avatar
Member with 35 posts.
 
Join Date: May 2009
18-Mar-2010, 07:55 PM #3
I am pretty sure this is a linux .exe, I downloaded the linux package and it installed ok except for this issue. It is proprietary code, so I don't have access to the source. I can call the company's tech support, but I wanted to make sure my web server is properly configured before I do that.
tomdkat's Avatar
Computer Specs
Distinguished Member with 7,127 posts.
 
Join Date: May 2006
Location: S.F. Bay Area, CA
Experience: Intermediate
18-Mar-2010, 08:08 PM #4
Ok, then I would contact the company's tech support and see what they have to say about the behavior you're experiencing.

Peace...
Kelveeno's Avatar
Member with 35 posts.
 
Join Date: May 2009
18-Mar-2010, 08:19 PM #5
I found this on the company KB section:


To avoid conflicts, TestTrack installs into the root web directory. If you choose to host TestTrack in a location other than ttweb, the HTMLPath is always blank after an installation. Configuring TestTrack to use alternate aliases and file paths requires you to manually configure the HTMLPath setting.
  • Windows - The FormsPath and HTMLPath can be set using the TestTrack Registry Utility, which is located in the TestTrack directory.

  • Unix - The HTMLPath and FormsPath settings are stored in/etc/ttstudio.conf.
I thought the ttstudio.conf file was a reference doc only, in that it is not currently listed as one of the conf files at start up. The only files I explicitly see being parsed are:

apache2.conf
httpd.conf (empty by default)
ports.conf (NameVirtualHost directive)
/conf.d/ directory
/sites-enabled/ directory
/mods-enabled/*.load
/mods-enabled/*.conf

Here's the ttstudio.conf file, currently in the /etc folder:

cgi-bin:/var/www/cgi-bin/ttcgi.exe
admin-cgi-bin:/var/www/cgi-bin/ttadmcgi.exe
ShortDateFormat:%m/%d/%y
ServerRefID:1
ServerPort:1566
# ServerName:default
ServerName:99.66.152.2
ServerID:{f5faf88e-ff8a-4167-9cb8-3ffd7d06de37}
ServerAddress:99.66.152.2
PathSeperator:;
MaxXMLExportFileSize:1024
MaxTRsToGen:5000
MaxNumberOfCodeBaseDBsToLoad:120
LogDirectory:/var/log/
LicenseServerPort:5100
LicenseServerAddress:99.66.152.2
InstallerUpdateCheckEnable:1
HTMLPath:/var/www/html/ttweb
FormsPath:/var/www/html/ttweb/
FontPaths:/usr/lib/X11/fonts;/usr/share/fonts
DestroyRDBMSProj:0
AutoProjectUpgrade:0
ApplicationDirectory:/var/lib/TestTrack/
AllowPathForDB:0
AdminHTMLPath:/var/www/html/ttweb/ttadmin
AdminFormsPath:/var/www/html/ttweb/ttadmin/
# HTMLPath:ttweb/
tomdkat's Avatar
Computer Specs
Distinguished Member with 7,127 posts.
 
Join Date: May 2006
Location: S.F. Bay Area, CA
Experience: Intermediate
18-Mar-2010, 08:21 PM #6
Ah, well that explains it.

Peace...
Kelveeno's Avatar
Member with 35 posts.
 
Join Date: May 2009
18-Mar-2010, 08:30 PM #7
i tried copying ttstudio.conf to the /conf.d folder as is, but that broke apache so i put it back.
tomdkat's Avatar
Computer Specs
Distinguished Member with 7,127 posts.
 
Join Date: May 2006
Location: S.F. Bay Area, CA
Experience: Intermediate
18-Mar-2010, 08:45 PM #8
I don't think you need to move ttstudio..conf since the CGI program is clearly finding it. I would edit it to change the location of specified in the HTMLPath setting and see what happens.

Peace...
Kelveeno's Avatar
Member with 35 posts.
 
Join Date: May 2009
23-Mar-2010, 09:57 PM #9
OK, I figured it out. I had to edit the HTML path variables so that they would work within the script, basically truncated /var/www/html/ttweb/ to just ttweb for example. Also had to edit cgi-bin variables to refer to the alias instead of the actual file path, change from /var/www/cgi-bin/ to /cgi-bin/. Everything works now so I'm marking this solved. Thanks for the help
tomdkat's Avatar
Computer Specs
Distinguished Member with 7,127 posts.
 
Join Date: May 2006
Location: S.F. Bay Area, CA
Experience: Intermediate
23-Mar-2010, 10:23 PM #10
So, you made all the changes in the ttstudio.conf file?

Peace...
Kelveeno's Avatar
Member with 35 posts.
 
Join Date: May 2009
24-Mar-2010, 02:57 PM #11
Yeah, after verifying my web server was properly executing CGI I just had to modify that .conf file
Reply

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.

Search Tech Support Guy

Find the solution to your
computer problem!




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who want to help you solve your computer problems. See our Welcome Guide to get started.
Thread Tools



Facebook Facebook Twitter Twitter TechGuy.tv TechGuy.tv Mobile TSG Mobile
You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 01:04 AM.
Copyright © 1996 - 2011 TechGuy, Inc. All rights reserved.

Powered by Cermak Technologies, Inc.