Return To The uShop Reference Site




CGI Script Related Problems
  1. For Absolute Beginners
  2. Server Error
  3. Script Is Displayed, Not Executed
  4. Script Is Being Downloaded, Not Executed
  5. "Unable to open ushop-settings.txt" Error
  6. General "Unable to open" Errors
  7. "Can't locate ushop-languages.pl" Error
  8. "Can't locate ushop-lib.pl" Error

Applet Related Problems
  1. Bad Magic Number Error
  2. Illegal Constant Pool Error
  3. String Index Out Of Bounds Error
  4. Applets Not Adding Items To Shopping Cart
  5. Review Cart Page is blank
  6. Please Wait.... Message



CGI Script Related Problems

1. For Absolute Beginners

If you've never installed or executed any Perl scripts on your server before, it is recommended that you first try installing our basic test script as described at our reference site:

http://www.uburst.com/uShop/testscript.html

This simple Perl script is the most basic of Perl scripts and should help you to understand how to install and execute scripts on your server. It also will verify that your web hosting account is configured properly to run Perl scripts and will make installing the uShop script that much easier.



2. Server Error

Upon installing the script on your server, the first thing you should do is use your browser to test the script going to the URL of the script on your server. Upon doing so, you should get the "Login" screen similar to when you go to the URL of the script on our site:

https://www.uburst.com/cgi-bin/ushop/ushop.pl

If when going to the URL of the script on your server you get a "Server Error" instead, then the problem is usually one of three things:

  1. The path to Perl is incorrect.
    The Path to perl is specified as the very first line of the CGI scripts. Typical values are /usr/bin/perl, /usr/local/bin/perl/ and /bin/perl. If you do not know what the path to perl is on your server, then you can ask your web hosting provider. NOTE: When specifying this path to perl, you must include the "#!" in front of the path. Example: #!/usr/bin/perl

  2. The file was transferred in BINARY mode (as opposed to ASCII or TEXT mode).
    When transferring the CGI script to your server, you must transfer it in ASCII or TEXT mode - as opposed to BINARY mode. Your FTP program should give you an option to do this - so be sure to transfer the CGI script in ASCII or TEXT mode.

  3. The script does not have execute permissions.
    Once the CGI script is transferred to your CGI directory on your server, you must change the permissions to READ and EXECUTE (chmod 755). If your server is a UNIX server, you should be able to change the file's permissions via your FTP program. If your server is an NT server, then you may have to get your web hosting provider to make the file executable.


3. Script Is Displayed, Not Executed

Upon installing the script on your server, the first thing you should do is use your browser to test the script going to the URL of the script on your server. Upon doing so, you should get the "Login" screen similar to when you go to the URL of the script on our site:

https://www.uburst.com/cgi-bin/ushop/ushop.pl

If when going to the URL of the script on your server, the script is displayed instead of being executed, then the problem is usually one of three things:

  1. The CGI script does not have the correct file extension for your server.
    That is, some servers are configured to only execute scripts that end in .pl and others are configured to only execute scripts that end in .cgi. Check with your web hosting server and rename the file if necessary.

  2. The directory that you put the script is not configured to execute CGI scripts.
    That is, usually your web hosting service will have to make a special directory for you to put your cgi scripts in such as cgi-bin or cgi-local. Again you can check with your web hosting provider.

  3. The permissions on the script itself are not correct.
    That is, you must make sure the script has read and execute permissions. This can be done with your FTP program on UNIX machines (chmod 755). People using NT servers, may have to get their web hosting service to change the permissions to executable for them.


4. Script Is Being Downloaded, Not Executed

Upon installing the script on your server, the first thing you should do is use your browser to test the script going to the URL of the script on your server. Upon doing so, you should get the "Login" screen similar to when you go to the URL of the script on our site:

https://www.uburst.com/cgi-bin/ushop/ushop.pl

If when going to the URL of the script on your server, the script tries to be downloaded instead of being executed, then the problem is usually one of three things:

  1. The CGI script does not have the correct file extension for your server.
    That is, some servers are configured to only execute scripts that end in .pl and others are configured to only execute scripts that end in .cgi. Check with your web hosting server and rename the file if necessary.

  2. The directory that you put the script is not configured to execute CGI scripts.
    That is, usually your web hosting service will have to make a special directory for you to put your cgi scripts in such as cgi-bin or cgi-local. Again you can check with your web hosting provider.

  3. The permissions on the script itself are not correct.
    That is, you must make sure the script has read and execute permissions. This can be done with your FTP program on UNIX machines (chmod 755). People using NT servers, may have to get their web hosting service to change the permissions to executable for them.


5. "Unable to open ushop-settings.txt" Error

The first time you configure your store via the "General Settings" button, uShop will create a configuration filed called "ushop-settings.txt" in your data directory. If instead of creating this file, you get an "Unable to open ushop-settings.txt" Error, then the problem is usually one of two things:

  1. The path to your data directory is incorrect.
    That is, the directory path that you configured in question #5 of the script setup is not correct. Double-check the value of this setting or if possible, try using the Full Directory Path to your data directory instead of just a relative directory path. An example full path might be something like:

    $data_directory = "/www/youraccount/cgi-bin/data/";

    ...on UNIX servers, or perhaps something like this:

    $data_directory = "C:/users/youraccount/cgi-bin/data/";

    ....on NT servers.

    Note that this is a directory path...not a URL. So it won't start with "http". If you don't know the full path to your cgi-bin directory, then ask your web hosting provider.

  2. Your data directory does not have read/write/execute permissions.
    Ideally, the permissions on this directory should be chmod 700. However, depending on how your server is setup to execute CGI scripts, you may have to increase the permissions on this directory to chmod 777. See Configuring The "data" Directory for more information on this.


6. General "Unable to open" Errors

"Unable to open " Errors, are usually caused by one of two things:

  1. The path to your data directory is incorrect.
    That is, the directory path that you configured in question #5 of the script setup is not correct. Double-check the value of this setting or if possible, try using the Full Directory Path to your data directory instead of just a relative directory path. An example full path might be something like:

    $data_directory = "/www/youraccount/cgi-bin/data/";

    ...on UNIX servers, or perhaps something like this:

    $data_directory = "C:/users/youraccount/cgi-bin/data/";

    ....on NT servers.

    Note that this is a directory path...not a URL. So it won't start with "http". If you don't know the full path to your cgi-bin directory, then ask your web hosting provider.

  2. Your data directory does not have read/write/execute permissions.
    Ideally, the permissions on this directory should be chmod 700. However, depending on how your server is setup to execute CGI scripts, you may have to increase the permissions on this directory to chmod 777. See Configuring The "data" Directory for more information on this.


7. "Can't locate ushop-languages.pl" Error

This error is more common on NT Servers and is usually related to the server's search path in that it isn't checking your cgi-bin for the "ushop-languages.pl" file. Here is how to correct it:

Right now, question #11 at the top of the ushop.pl script is currently set to:

require "ushop-languages.pl";

To force the server to import the "ushop-languages.pl" file from the correct directory on your server, try modifying this "require" line in question #11 to be the FULL DIRECTORY PATH of your "ushop-languages.pl" file. So it will then be something like:

require "D:/www/yourdomain/cgi-bin/ushop-languages.pl";

If you don't know the full path to that directory, then ask your web hosting provider.

Note: When specifying directory paths on NT servers, it is important to use forward slashes (/) and NOT backward slashes (\). This is because backward slashes (\) in Perl are considered to be special escape characters. So as a rule of thumb, when specifying any directory paths in the uStorekeeper scripts, always use forward slashes (/). (Forward slashes will work on both NT and UNIX servers.)



8. "Can't locate ushop-lib.pl" Error

This error is more common on NT Servers and is usually related to the server's search path in that it isn't checking your cgi-bin for the "ushop-lib.pl" file. Here is how to correct it:

Right now, question #12 at the top of the ushop.pl script is currently set to:

require "ushop-lib.pl";

To force the server to import the "ushop-lib.pl" file from the correct directory on your server, try modifying this "require" line in question #12 to be the FULL DIRECTORY PATH of your "ushop-lib.pl" file. So it will then be something like:

require "D:/www/yourdomain/cgi-bin/ushop-lib.pl";

If you don't know the full path to that directory, then ask your web hosting provider.

Note: When specifying directory paths on NT servers, it is important to use forward slashes (/) and NOT backward slashes (\). This is because backward slashes (\) in Perl are considered to be special escape characters. So as a rule of thumb, when specifying any directory paths in the uStorekeeper scripts, always use forward slashes (/). (Forward slashes will work on both NT and UNIX servers.)



Applet Related Problems

1. Bad Magic Number Error

If the applets on your website do not start, but instead indicate a "Bad Magic Number" error in your browser's status bar, the problem is usually caused when the uShop class files are uploaded to the server in ASCII or TEXT mode - as opposed to BINARY mode. So try transferring ALL of the uShop class files to your server again and be sure to select BINARY (or RAW) transfer mode.



2. Illegal Constant Pool Error

If the applets on your website do not start, but instead indicate an "Illegal Constant Pool" error in your browser's status bar, the problem is usually caused when the uShop class files are uploaded to the server in ASCII or TEXT mode - as opposed to BINARY mode. So try transferring ALL of the uShop class files to your server again and be sure to select BINARY (or RAW) transfer mode.



3. String Index Out Of Bounds Error

If you are getting a "String Index Out Of Bounds Error" that is preventing an applet from starting, the problem is usually caused by one or more of the applet's parameters not being in the correct format. Check the uShop Applet References at our Reference Site:

http://www.uburst.com/uShop/reference.html

and make sure that each of the applet's parameters are in the expected format.



4. Applets Not Adding Items To Shopping Cart

If the applets are not adding items to the shopping cart, then the problem is usually due to one of two things:

  1. The format of your applet parameters may be incorrect. Check the uShop Applet References at our Reference Site:

    http://www.uburst.com/uShop/reference.html

    and make sure that each of the applet's parameters are in the expected format.

  2. The "codebase" setting of your applets may not be exactly the same. It is very important that all of your applets have EXACTLY the same codebase setting. See Sections 5 and 6 in the uShop User's Guide for more information about setting up your directory structure and using the "codebase" parameter.


5. Review Cart Page is blank

If upon pressing the uShopOrderButton applet, the "review cart" or "display_cart.html" page comes up blank or just says "Please Wait....", then the problem is usually due to one of two things:

  1. The codebase of your uShopOrderButton applet is missing the last forward slash (/). That is, make sure that for whatever codebase you are using for your uShopOrderButton applet it includes a forward slash at the end such as:

    codebase="../classes/"  CORRECT!

    If you leave off that last forward slash (/), such as:

    codebase="../classes"  WRONG!

    ...Then IE browsers will not be able to read the "cart_template.html" file.

  2. If you are using a codebase other than the default codebase of:

    codebase="../classes/"

    Then make sure that you also 1) Set the special "codebase" parameter of the uShopOrderButton applet (such as <PARAM NAME="codebase"    VALUE="../my_new_codebase/">) and that you 2) Manually changed the codebase of the uShopJSI applet that is located on the "display_cart.html" page.

    See the codebase.html for a complete description of the codebase setting/parameter.


6. Please Wait.... Message

If upon pressing the uShopOrderButton applet, the "review cart" or "display_cart.html" page comes up blank or just says "Please Wait....", then the problem is usually due to one of two things:

  1. The codebase of your uShopOrderButton applet is missing the last forward slash (/). That is, make sure that for whatever codebase you are using for your uShopOrderButton applet it includes a forward slash at the end such as:

    codebase="../classes/"  CORRECT!

    If you leave off that last forward slash (/), such as:

    codebase="../classes"  WRONG!

    ...Then IE browsers will not be able to read the "cart_template.html" file.

  2. If you are using a codebase other than the default codebase of:

    codebase="../classes/"

    Then make sure that you also 1) Set the special "codebase" parameter of the uShopOrderButton applet (such as <PARAM NAME="codebase"    VALUE="../my_new_codebase/">) and that you 2) Manually changed the codebase of the uShopJSI applet that is located on the "display_cart.html" page.

    See the codebase.html for a complete description of the codebase setting/parameter.

----------

  • If you didn't find a solution to your problem here, don't forget about our Support Forum.

  • And if that still doesn't solve your problem, you can submit a support request to us via our Support Request Form.