PDA

View Full Version : cgi script help


MagikLair
02-19-2007, 07:17 AM
Hello,
I've setup cgi scripts in the past but now I seem to be having some problems with this merchant script. I ran a test script and these were the results
The complete system PATH to this script is: /www/virtual/magiklair/www.vagnavs.com/cgi-bin/test.cgi

#!/usr/bin/perl Perl path

And the cgi folder used is xpresscart(shown below)

Do these changes look correct?

## URLs
# Base URL for the site
$site_home="http://www.vagnavs.com";
# URL to the store program
$script_url="http://www.vagnavs.com/cgi-bin/xpresscart/store.cgi";
# Full URL to store program, for linking from Authorize.Net
$script_url_full="http://www.vagnavs.com/cgi-bin/xpresscart/store.cgi";
# URL to the office program, should be secure if possible
$office_url="http://www.vagnavs.com/cgi-bin/xpresscart/office.cgi";
# URL to photo upload program
$upload_url="http://www.vagnavs.com/cgi-bin/xpresscart/upload.cgi";
# URL to the show order program. Full URL required!
$order_url="http://www.vagnavs.com/cgi-bin/xpresscart/show_order.cgi";
# URL to folder where the photos go. Note: No trailing slash
# Also note: this should be relative to the location of store.cgi
$photo_url="http://www.vagnavs.com/cgi-bin/xpresscart/photos";

## PATHS
# NOTE: Paths are relative to office.cgi, upload.cgi, etc.
# path to customer directory where individual cart info can be read and
# written. No trailing slash
$customer_folder="/usr/www/virtual/magiklair/www.vagnavs.com/cgi-bin/xpresscart/customer";
# path to authentication directory where office user session info can be read
# and written should not be web accessible for security. No trailing slash
$auth_folder="/usr/www/virtual/magiklair/www.vagnavs.com/cgi-bin/xpresscart/auth";
# path to folder where order data can be read and written should not be web
# accessible for security. No trailing slash
$order_folder="/usr/www/virtual/magiklair/www.vagnavs.com/cgi-bin/xpresscart/order";
# path to working folder where the program can read and write other files
# should not be web acessible for security. No trailing slash
$working_folder="/usr/www/virtual/magiklair/www.vagnavs.com/cgi-bin/xpresscart/working_folder";
# path to template file
$template_file="/usr/www/virtual/magiklair/www.vagnavs.com/cgi-bin/xpresscart/template.html";
# path to folder where the photos go. No trailing slash. Must be web
# accessible.
$photo_folder="/usr/www/virtual/magiklair/www.vagnavs.com/cgi-bin/xpresscart/photos";
# permissions for photos, if defined
#$photo_perms=0644;

Any help would be greatly appreciated.
Thanks,
Brian

professays
02-19-2007, 11:54 AM
They look quite correct

FishMonger
02-19-2007, 06:10 PM
First you say:The complete system PATH to this script is: /www/virtual/magiklair/www.vagnavs.com/cgi-bin/test.cgi
Then, when you list the paths, you use:$customer_folder="/usr/www/virtual/magiklair/www.vagnavs.com/cgi-bin/xpresscart/customer";
Which path to the cgi-bin folder is correct?

# NOTE: Paths are relative to office.cgi, upload.cgi, etc.The paths you're using are absolute system paths, not relative paths. In a cgi environment, you normally use relative (or absolute) paths based from the web server's document root location. However, absolute system paths can be used depending on what you need to accomplish.

MagikLair
02-19-2007, 10:02 PM
Hello,
thanks for the reply. I've tried to simplify things now. The test script is now in the same directory. Here are the results. This is a merchant account script, so I'm not sure if it has to be relative or absolute paths. I've tried so many different things... Any additional help would be greatly appreciated.
Thanks everyone,
Brian

DOCUMENT_ROOT /www/virtual/magiklair/www.vagnavs.com

Test script http://www.vagnavs.com/cgi-bin/xpresscart/advanced-test.cgi

Current Working Directory Path /usr/www/virtual/magiklair/www.vagnavs.com/cgi-bin/xpresscart

## URLs
# Base URL for the site
$site_home="http://www.vagnavs.com";
# URL to the store program
$script_url="http://www.vagnavs.com/cgi-bin/xpresscart/store.cgi";
# Full URL to store program, for linking from Authorize.Net
$script_url_full="http://www.vagnavs.com/cgi-bin/xpresscart/store.cgi";
# URL to the office program, should be secure if possible
$office_url="http://www.vagnavs.com/cgi-bin/xpresscart/office.cgi";
# URL to photo upload program
$upload_url="http://www.vagnavs.com/cgi-bin/xpresscart/upload.cgi";
# URL to the show order program. Full URL required!
$order_url="http://www.vagnavs.com/cgi-bin/xpresscart/show_order.cgi";
# URL to folder where the photos go. Note: No trailing slash
# Also note: this should be relative to the location of store.cgi
$photo_url="http://www.vagnavs.com/cgi-bin/xpresscart/photos";
#####################################################

#####################################################
## PATHS
# NOTE: Paths are relative to office.cgi, upload.cgi, etc.
# path to customer directory where individual cart info can be read and
# written. No trailing slash
$customer_folder="/usr/www/virtual/magiklair/www.vagnavs.com/cgi-bin/xpresscart/customer";
# path to authentication directory where office user session info can be read
# and written should not be web accessible for security. No trailing slash
$auth_folder="/usr/www/virtual/magiklair/www.vagnavs.com/cgi-bin/xpresscart/auth";
# path to folder where order data can be read and written should not be web
# accessible for security. No trailing slash
$order_folder="/usr/www/virtual/magiklair/www.vagnavs.com/cgi-bin/xpresscart/order";
# path to working folder where the program can read and write other files
# should not be web acessible for security. No trailing slash
$working_folder="/usr/www/virtual/magiklair/www.vagnavs.com/cgi-bin/xpresscart/working_folder";
# path to template file
$template_file="/usr/www/virtual/magiklair/www.vagnavs.com/cgi-bin/xpresscart/template.html";
# path to folder where the photos go. No trailing slash. Must be web
# accessible.
$photo_folder="/usr/www/virtual/magiklair/www.vagnavs.com/cgi-bin/xpresscart/photos";
# permissions for photos, if defined
#$photo_perms=0644;
# temp directory override; set only if necessary
#$tmpdir = '/tmp';