stevan
12-06-2002, 03:50 AM
I am trying to use the following cgi script and get the errror that the database is not there
I have been told the
You're still using "absolute url's" (http://www...) and you should be using "relative paths" (/usr/home/cruisewarehouse...). You need to find out the PATH to the data file and html files...not the URL.
These are the items i uploaded to the site
http://www.cruisewarehouse.cc/header.html
http://www.cruisewarehouse.cc/footer.html
http://www.cruisewarehouse.cc/cgi-bin/dbspace.cgi
Here is the section of script where the changes are to be made
Thxs Steve
This is really a tough problem for me I have no idea how to fix this one
#!/usr/local/bin/perl
###############################################
###
### dbSpace v1.8b
### Copyright Spaceout
### http://www.spaceout.com
###
### By using this code you agree to indemnify
### Spaceout Media from any liability that might
### arise from its use.
###
###############################################
use CGI qw (:standard);
use CGI::Carp qw(fatalsToBrowser);
###############################################
### Set Configurations Below
###############################################
### Specify your database fields in the array below
@fields = ("Name","Address","City","State","Zip","Email","Phone","Fax","URL");
### Set URL and email fields to be hyperlinks
### The number used corresponds to its placement in the array above
### Remeber to start your count at zero
### Leave the variables empty to remove the hyperlink
$index_of_url = "8";
$index_of_email = "5";
### Specify the required fields below. This may be left empty
@required = ("Name");
### Specify the filtered words below. You must define at least one word here
@filter = ("Proprietary");
$database = "./data/data.html"; # Data file name and path
$script_name = "dbspace.cgi"; # This script name
$db_name = "Cruise Data Base"; # The database name
$table_width = "90%"; # The display width of the entire table
$record_width = "80%"; # The display width of the database records
$max_rows_returned = "10"; # Max number of rows displayed per page
$filter_html_tags = "yes"; # Removes HTML tags from record entries
$user_file = "users.txt"; # User file name and path
$check_user_duplicates = "yes"; # Checks for duplicate user names in user file
@extra_user_fields = ("Email"); # Additional info needed when registering users
$use_external_html = "no"; # Set to "yes" to use your own html template
$external_html_header = "header.html"; # File name and path to html template header
$external_html_footer = "footer.html"; # File name and path to html template footer
$authenticate = "no"; # Prompts users for a user name and password
$register = "yes"; # Allows new user registration
$record_ownership = "yes"; # Users can modify/delete only their records
$admin_user_name = "admin"; # This is the default Administrator user name
$default_user_permission_search = "yes"; # Gives newly registered users Search permission
$default_user_permission_add = "yes"; # Gives newly registered users Add permission
$default_user_permission_modify = "yes"; # Gives newly registered users Modify permission
$default_user_permission_delete = "yes"; # Gives newly registered users Delete permission
###############################################
### Change Nothing Below This Line
I have been told the
You're still using "absolute url's" (http://www...) and you should be using "relative paths" (/usr/home/cruisewarehouse...). You need to find out the PATH to the data file and html files...not the URL.
These are the items i uploaded to the site
http://www.cruisewarehouse.cc/header.html
http://www.cruisewarehouse.cc/footer.html
http://www.cruisewarehouse.cc/cgi-bin/dbspace.cgi
Here is the section of script where the changes are to be made
Thxs Steve
This is really a tough problem for me I have no idea how to fix this one
#!/usr/local/bin/perl
###############################################
###
### dbSpace v1.8b
### Copyright Spaceout
### http://www.spaceout.com
###
### By using this code you agree to indemnify
### Spaceout Media from any liability that might
### arise from its use.
###
###############################################
use CGI qw (:standard);
use CGI::Carp qw(fatalsToBrowser);
###############################################
### Set Configurations Below
###############################################
### Specify your database fields in the array below
@fields = ("Name","Address","City","State","Zip","Email","Phone","Fax","URL");
### Set URL and email fields to be hyperlinks
### The number used corresponds to its placement in the array above
### Remeber to start your count at zero
### Leave the variables empty to remove the hyperlink
$index_of_url = "8";
$index_of_email = "5";
### Specify the required fields below. This may be left empty
@required = ("Name");
### Specify the filtered words below. You must define at least one word here
@filter = ("Proprietary");
$database = "./data/data.html"; # Data file name and path
$script_name = "dbspace.cgi"; # This script name
$db_name = "Cruise Data Base"; # The database name
$table_width = "90%"; # The display width of the entire table
$record_width = "80%"; # The display width of the database records
$max_rows_returned = "10"; # Max number of rows displayed per page
$filter_html_tags = "yes"; # Removes HTML tags from record entries
$user_file = "users.txt"; # User file name and path
$check_user_duplicates = "yes"; # Checks for duplicate user names in user file
@extra_user_fields = ("Email"); # Additional info needed when registering users
$use_external_html = "no"; # Set to "yes" to use your own html template
$external_html_header = "header.html"; # File name and path to html template header
$external_html_footer = "footer.html"; # File name and path to html template footer
$authenticate = "no"; # Prompts users for a user name and password
$register = "yes"; # Allows new user registration
$record_ownership = "yes"; # Users can modify/delete only their records
$admin_user_name = "admin"; # This is the default Administrator user name
$default_user_permission_search = "yes"; # Gives newly registered users Search permission
$default_user_permission_add = "yes"; # Gives newly registered users Add permission
$default_user_permission_modify = "yes"; # Gives newly registered users Modify permission
$default_user_permission_delete = "yes"; # Gives newly registered users Delete permission
###############################################
### Change Nothing Below This Line