Agoracart Error FAQ
by Jay Banks

Common errors:

Internal Server Error
My browser displays the cgi script text

Premature end of script headers
errors compiling wrappers

I could not open the lockfile
Owners do not match!

I can't get into the store manager

Not a valid referrer

Your url changes to an ip address

Images showing as a broken link

 


 

You get an "Internal Server Error" or something similar, when you try and run the agoracart-provided "test_id.cgi" from your browser.

Solution: Make sure you followed instructions. Does the /store directory or the /store/protected directory have permission to execute? Did you issue the "chmod 755 test_id.cgi" command?


When you access your store, you see CGI script that looks something like this:

#!/usr/bin/perl -T
#
# helper program that speeds up pic serving
# includes contents of cgi-lib.pl for increased speed
# be sure to ste the paths correctly in the next few lines

$versions{'picserve.cgi'} = "20021020";

Solution: Your web server is displaying the cgi file instead of executing it. If you don't have proper access to the server, you may have to move the store to your cgi-bin. If you run Apache, you only need to uncomment the "AddHandler cgi-script .cgi" line in the Apache configuration file and add the directories where your store is located in this format:

<Directory "/usr/local/www/data/store"> 
Options ExecCGI 
</Directory>
<Directory "/usr/local/www/data/store/protected"> 
Options ExecCGI 
</Directory>


You get an "Internal Server Error" or something similar, when you try and run the agoracart-provided "test_id.cgi." When you view your Apache error log, you see:

Premature end of script headers: test_id.cgi

Solution: If you uploaded your file from MS Windows, SSH into the directory where you have placed test_id.cgi. Do a vi test_id.cgi. At the end of each line, if you see this,  "^M," delete each one. There are instructions for a perl script here that will auto delete each one (follow directions closely, don't just cut and paste here).


While
trying to compile the 3.0a Wrapper (wrapper30a.zip) wrap_agc.c, for Agoracart store, 

You get errors around line 50 & 60 that there are too few parameters in the "exit" function (or a very similar error)

Solution: SSH to the directory where the wrap_agc.c file is located. Open it in vi and go to the lines where the error is reported. Change these lines from exit() to exit(0) and it will compile after that.


While
trying to compile the 3.0a Wrapper (wrapper30a.zip) wrap_mgr.c, for Agoracart manager,

You get errors around line 50 & 60 that there are too few parameters in the "exit" function (or a very similar error)

Solution: SSH to the directory where the wrap_mgr.c file is located. Open it in vi and go to the lines where the error is reported. Change these lines from exit() to exit(0) and it will compile after that.


When
you attempt to get to the store directory, you get this error:

I could not open the lockfile - check your permission settings (./log_files/access.log.lockfile)

Solution: Install the wrappers like you were told to do. See also, if you get this error:

I could not open the lockfile - check your permission settings (./protected/misc/standardheadersettings.pl.lockfile)

Permissions are the most common cause of this error.  The following directories and files contained within need to be made read/write:
     admin_files 
     data_files 
     log_files 
     pgpfiles (only when updating public keys)
     protected/files 
     shopping_carts

Solution: run test_id.cgi. If the program is running under www or something other than your id, you need to chmod the above directories to 777. If they are running under your id, do chmod 755 to the above directories and files. But note that when you do this...if you initially had to chmod wrap_agc.o to a+s to get it to work, if you forget and chmod this file to 777, it will probably quit working again. See the following for more information.


When
you attempt to get to the store directory, you get this error:

Owners do not match!

Solution: You followed the directions and did a chmod 555 to wrap_agc.o and get the above when you try and access the store in your browser. Try the optional chmod a+s wrap_agc.o, which is described as "working on some servers," and try and access your store again. On two different versions of FreeBSD, chmod 555 would not work correctly, but a chmod of a+s fixed the error.

If you did the above and still have the error, try also SSHing to the directory Agoracart is located in and do a directory list with details (ls -l), and see who the file wrap_agc.o belongs to (also repeat this step with wrap_mgr.c, in the protected directory when you are done). If all of the files in the directory have the same owner/group except wrap_agc.o (or some other file), issue a change owner command (chown using the following syntax: chown [options] newowner:newgroup <file name>) and make the new owner the same as the owner of all the rest of the files. Note: You may have to have root privileges to issue a change owner command. At this point the problem should be solved.

example:

You do a "ls -l" and get:

drwxr-xr-x 9 32015 32036 1024 Oct 24 18:16 protected
drwxr-xr-x  2 32015 32036 512 Oct 29 06:47 shopping_carts
-r-sr-sr-x 1 root www 5869 Oct 22 09 :18 wrap_agc.o

Do a chown 32015:3206 wrap_agc.o (changing 32015 and 3206 to match your owner/group) to get:

drwxr-xr-x 9 32015 32036 1024 Oct 24 18:16 protected
drwxr-xr-x  2 32015 32036 512 Oct 29 06:47 shopping_carts
-r-sr-sr-x 1 32015 32036 5869 Oct 22 09 :18 wrap_agc.o

Note: This usually happens if you have access to your Unix server and logged in under a different account than the account you are setting agoracart up under. For instance, you did an FTP to get the files to the server under one account, and then SSHed into your system under a different user account (root?) to install and edit them. A more experienced Unix administrator wouldn't have this problem, but stuff happens.


While attempting
process your order you get:

yourname.net is the accepted referrer.
65.201.95.136 is not a valid referrer
Refering Site Authentication Failed!

Solution: You have not configured the store settings and when you type in your http://www.yoururl.com/store/ url, it changes the url to an ip address. Somewhere during an attempt to do a checkout you created information that does not match because the program is looking for a normal url, not an ip address as the referrer. Go to  Your url changes to an ip address and implement the solution found under it. This solution will solve both errors.


You configured a .htaccess file correctly, but when you attempt to access the store manager, it will not accept your user name and password.

Instead, the log in screen appears over and over again, even though you know you typed in the information correctly.

Solution: .htaccess protects the directory, but you still have to enter the correct user name and password. The default settings are, user: manager / password: admin. You can change them to whatever you want by entering the store manager and clicking on program settings. On the screen that loads, click on the "Password Settings" icon.  You can configure the user name and password setting there.


You finally got the store up and running, but when you visit the store, the url changes your link from http://www.yoururl.com/store/agora.cgi, to an ip address:

http://65.201.91.5.2/store/agora.cgi

Solution: You have the cgi scripts up and running, but you didn't go into the manager and set up program settings. Enter the store manager and click on program settings. On the screen that comes up, click on "Main AgoraCart Store Settings." Go to the line that says, "Please enter the full URL of your store here." Enter your url in the text box (e.g. http://www.yoururl.com/store/agora.cgi) and click the submit button.


Everything is looking good but the images are showing a broken link instead of loading.

Solution: You have the cgi scripts up and running, but you haven't completed setting up the program settings in the store manager. Enter the store manager and click on program settings. On the screen that comes up, click on "Main AgoraCart Store Settings." Go to the line that says, "Please enter the full URL of your /images directory." Enter your url in the text box (e.g. http://www.yoururl.com/store/html/images) and click the submit button.

 

 


 


This document released under the

Attribution-NonCommercial-ShareAlike 2.0

You are free:

  • to copy, distribute, display, and perform the work

  • to make derivative works

Under the following conditions:

Attribution. You must give the original author credit.
Noncommercial. You may not use this work for commercial purposes.
Share Alike. If you alter, transform, or build upon this work, you may distribute the resulting work only under a license identical to this one.
  • For any reuse or distribution, you must make clear to others the license terms of this work.

  • Any of these conditions can be waived if you get permission from the copyright holder.

Your fair use and other rights are in no way affected by the above.

This is a human-readable summary of the Legal Code (the full license).