URL: http://www.uburst.com/cgi-bin/dcforum/dcboard.cgi
Forum: ushop_cgi
Thread Number: 86
[ Go back to previous page ]

Original Message
"file not found"

Posted by Nick Kay [nicholaskay@hotmail.com] on at 10:47 AM
I'm "trying before buying" with v3.0

Unfortunately, when the "begin the order process" button is pressed, I get a HTTP 404 error "classes/display_cart.html"

I can't find any reference to display_cart.html, so is this missing/a restriction in the demo version?

Basically, once I can prove the order taking process, I can get the s/w ordered.


Table of contents

Messages in this discussion
"RE: file not found"
Posted by Bill Weiner on at 11:15 AM
I took a look at your site, but couldn't find the page with the uShopOrderButton applet on it... but from looking at the source code of the shopping cart in your left frame, I see that you are using a codebase of:

codebase = "./classes"

... Which is different from the default codebase of:

codebase = "../classes/"

If you do change that default codebase, then be sure to read section 3 on the following reference page:


In short, it will basically involve setting an additional "codebase" parameter in your uShopOrderButton applet and then changing the codebase on the "display_cart.html" page that is located in your classes directory.

That is:

1) Add the following parameter to your uShopOrderButton applet:

param name="codebase" value="./classes"


2) Open/edit the "display_cart.html" page that is located in your "classes" directory and change the codebase of the uShopJSI applet on that page to:


.... and that should do it.

Posted by Nick Kay [nicholaskay@hotmail.com] on at 11:52 AM
When I unzipped the files, it seems that the 4 .html files didn't get copied into the classes directory.

Stupid mistake or what. Fixed that one, now getting "errors on page"...

"Errors on page"
Posted by Nick Kay [nicholaskay@hotmail.com] on at 01:03 PM
According to the error msg in IE, theres an error in display_cart at line 35 position 7... thats the "var html = document" line


function DisplayCartHTML()
if (document.uShopJSI != null)
var html = document.uShopJSI.getCartHTML();

if (html != null)

"RE: Errors on page"
Posted by Bill Weiner on at 01:53 PM
I still can't find the page on your site with the order button applet ... so I can't view your the error myself..... but from the sounds of it, it sounds related to my previous post. Have you corrected those codebase issues mentioned in the previous post yet?

"Same problem"
Posted by Nick Kay [nicholaskay@hotmail.com] on at 02:45 PM

1. The place order should be accessible from the menu in the left pane. it's place_order.html

2. yes, done the changes as suggested

"RE: Same problem"
Posted by Bill Weiner on at 04:26 PM
I still can't get to the "place_order.html" page. Whenever I click on the "place order" option in your left frame.... it always results in a "The requested URL /Place was not found on this server" error in the right frame.... In fact, this is pretty much the same error when I click on any of the links in your navigation menu. The only links that do seem to bring up a page in the right frame are the "Contact Us", "Technical", and "Review".

In any case, just go ahead and give me the full URL of the your order page, such as:


And I'll check it out.

Posted by Nick Kay [nicholaskay@hotmail.com] on at 03:39 AM

1. Changed structure of website to:

2. Changed all codebases to "../classes"
3. Made sure codebase param was set to "../classes"

4. Now:
4a. no longer get the "error on page"
4b. the display_cart comes up BUT its BLANK !!!

5. FYI, I found a codebase set to ".classes/" where the rest were originally ".classes". So the original fault could have been an IE security thing

6. You could be able to find the "Place Order.html" in "/html"

7. any uShop stuff should have the original name(s) and be found in "/classes"

Hope this helps

"Ah - the real problem..."
Posted by Nick Kay [nicholaskay@hotmail.com] on at 04:49 AM
OK, I think I've solved the blank "display_cart". Its probably that the relevant additional code is being inserted by ushop.pl.

Right, the reason for that, is that when I run "https://www106.rapidsite.net/the250/cgi-local/ushop.pl" I get the following error (and presumably the relevant .txt file hasn't been created):

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, webmaster@www106.rapidsite.net and inform them of the time the error occurred, and anything you might have done that may have caused the error.

There was also some additional information available about the error:
[Sun Sep 3 05:47:30 2000] access to /u/web/the250/cgi-local/ushop.pl failed for, reason: Premature end of script headers

"RE: Ah - the real problem..."
Posted by Bill Weiner on at 12:16 PM
I just tried looking at your site using Internet Explorer and can finally see your pages. There must be something about your ITREE MENU that prevents your site from working with Netscape.... so you may want to look into that. (It may be that you are using spaces in your HTML page names....like "Place Order.html"... With spaces, they have to be accessed via "Place%20Order.html")

Anyway, while looking at your order page at:


I could see the following error message being displayed in the Java Console:

"uShop Message: Error reading template_cart.html"

And then by going to your "classes" directory at:


I could verify that you do indeed have the ... "template_cart.html" file in that directory.

So the question is, why are you getting that "Error reading template_cart.html" message?

Apparantly, for Internet Explorer to properly read files from your classes directory, the codebase really needs to have that last forward slash (/).

So change your codebase, which is currently set to:




in all of your applets. This is also the default codebase.... so it will make things easier in the long run.

In regard to the server error that you are getting when you go to the URL of the script on your server:


Check out the tips on the uShop 3.0 troubleshooting page at:


"2steps forward..."
Posted by Nick Kay [nicholaskay@hotmail.com] on at 03:58 PM

1. Thanks for the prompt & invaluable support.

2. Changes all the "../classes" to "../classes/"

3. Renamed all folders, files, everything with spaces

4. Changes directory structure (again)

5. YES!!! now get a successful display_cart


1. Still getting the Internal Server error - have checked all the stuff on the reference page

2. How do I get the display_cart to appear in a Frame?

"RE: 2steps forward..."
Posted by Bill Weiner on at 05:24 AM
Glad that solved one of the problems.... as for the others:

1. Since just going to the URL of the script on your server at:


produces the "Server Error", the possible problems are really narrowed down to one of the following:

- Incorrect path to perl.
- Script transferred to server in BINARY transfer mode (it should be transferred in ASCII transfer mode).
- Script does not have execute permissions.

... As described at:


But since you mention that you tried all of those, here are two other things to try:

1) If you have an NT server, you may want to try using the full path to the "ushop-language.pl" and "ushop-lib.pl" scripts as described in Section 7 and 8 at:


(if this was the problem you would normally see an "unable to locate" server error instead of that "incomplete set of headers" error.... but it is worth a shot.)

2) Otherwise, just to make sure your cgi-local directory on your server is actually configured properly to execute CGI scripts, I would suggest trying the test script described at:


.... By trying to get that basic test script running on your server, it should verify that your server is properly configured to execute scripts.

2. In regard to targeting the "display_cart" page into a specific frame, try specifying the "target" parameter of the uShopOrderButton applet to the name of the frame you want the "display_cart" to appear in.

"Script(s) still not working"
Posted by Nick Kay [nicholaskay@hotmail.com] on at 07:25 AM
Hi Bill

1. Double/Triple checked that scripts are being uploaded correctly (certainly appear to be OK)

2. Downloaded your test script. Changed the perl location (to same as in ushop.pl) and uploaded

3. Test script works... both as normal and secure

4. FYI its a unix server

5. Tried ushop.pl and get:

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, webmaster@thechinashop.co.uk and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.]

6. Totally puzzled...

"One more thing"
Posted by Nick Kay [nicholaskay@hotmail.com] on at 07:35 AM
Don't know whether this is relevant, but theres a msg on the Verio site that says:

PHP2 v PHP3 - 14 March 2000
In December Verio brought in support for PHP3 and Perl 5.005. PHP2 will now be discontinued from 31st March 2000. Clients using PHP2 will need to convert their scripts to PHP3.

"RE: One more thing"
Posted by Bill Weiner on at 10:51 AM
So you are probably using Perl 5.005. The ushop.pl script does work fine with Perl 5 (ie. it doesn't contain any Perl 4 or Perl 5 specific commands)....but it may not hurt to check what versions of Perl are available on your server. Ie. Often web hosting providers will give various paths to Perl, such as:

Perl 4


Perl 5

.... Or something like that. It may not hurt to try a different version just in case. (Although we have definitely tested the scripts with both Perl 4 and Perl 5 interpretters).

The other thing to check is that you actually did transfer the ushop-lib.pl and ushop-language.pl files to your server also. (You probably did, but I just have to ask).

"Follow up"
Posted by Nick Kay [nicholaskay@hotmail.com] on at 01:54 PM
1. Checked that all files transferred -
/cgi-local contains 4 .pl files - 3 normal ones plus the test scipt

2. Will check Perl version with Verio tomorrow

3. Tried setting the "target" parameter for uShopOrderButton.class - doesn't seem to make any difference

"Another follow-up"
Posted by Nick Kay [nicholaskay@hotmail.com] on at 02:49 PM
Verio have an on-line script checker - all scripts pass.

If you set the script checker to show warnings you do get some but there of the "this only appears one - is it a typo?" type

"pesky IE..."
Posted by Nick Kay [nicholaskay@hotmail.com] on at 02:56 PM
solved the target problem.

Uploaded new version - no difference
pressed refresh - no difference
pressed refresh again - worked - IE problem?

Who cares, this bit now works - just the script problem left...

"Now I'm REALLY confused..."
Posted by Nick Kay [nicholaskay@hotmail.com] on at 03:29 PM

Time for some good old British lateral thinking

1. cgitest.pl works
2. ushop.pl doesn't

OK, so take a copy of cgitest.pl and insert the ushop.pl code into it

3. Guess what.. up comes the sign in screen...

4. enter the password, pause, get the same old server error msg...

Is it at all possible theres some sort of fault in the scipt - I have gone back to the original from the zip file...

"I've got a horrible feeling I know what the problem is..."
Posted by Nick Kay [nicholaskay@hotmail.com] on at 03:38 PM

1. the ushop.pl script has a first line which declares the location of perl

2. The other two scripts don't. Maybe I missed it or what, but if I add the perl location line to the other scripts they seem to work (so far)

Was this explicitly stated somewhere in the documentation / did I miss it / does the documentation need to make this clearer / is this something wierd with Verio???

"RE: I've got a horrible feeling I know what the problem is..."
Posted by Bill Weiner on at 03:47 PM
No. Only the ushop.pl file needs the path to Perl. The other two are treated at library files that get included with the ushop.pl file (actually inserted by the Perl interpreter at the point following the "require" lines in the ushop.pl script).

My guess is that some error occured the first time those "ushop-lib" and ushop-language" files were transferred to your server.... and now when you re-transferred them again after modifying them, they were transferred correctly.

In any case, glad it's working for you now.

"It works..."
Posted by Nick Kay [nicholaskay@hotmail.com] on at 04:19 PM

1. I'd transmitted those files at least 10-20 times!!!

2. I've left the perl path in as the first line on each script - it all now seems to work

3. I tried removing the perl path from one of the scripts - same problem...

4. I tried a script calling a library script from a friend - got the same problem

5. It looks like its something to do with our hosting service

6. Can I suggest you add a "try this..." to your server problems / reference page

On a totally separate not, many thanks for all your help. All this support and we'd not yet purchased the s/w. A definite recommendation to all colleagues.

Final note, if you look at the technical page on www.thechinashop.co.uk, what img file and url should I be using to "advertise" ushop???

"RE: It works..."
Posted by Bill Weiner on at 04:45 AM
Hmmmm... that's interesting. I'm not sure why your server is requiring that path to Perl in the library files. Perhaps it has to do with the order in which the Perl interpreter is pulling in the library files. In any case, thanks for the information, I'm sure it will prove to be useful for others.

As for the advertisement on your technical page, that would be very nice of you. Our official uShop logo is:


But that might be too big for your page, so perhaps this smaller image can fit a little better:


Feel free to shrink it down if necessary....or just use the little shopping cart part.

In regard to the link you have there now.... I notice you link to "the6thwave". "the6thwave" is no longer an authorized reseller of our products (and their website is a year out-of-date)... so it would be much appreciated if you just linked directly to our official uShop website at:



"RE: It works..."
Posted by Bill Weiner on at 05:01 AM
I mean:


"Oops, no it doesn't"
Posted by Nick Kay [nicholaskay@hotmail.com] on at 06:55 AM
Now I'm reaching for the 12gauge...

1. display_cart comes up OK

2. After pressing "continue", you get
File Error
Unable to open /cgi-local/data/order_template.html

3. if you run ushop.pl and the diagnostics you get:
ERROR - General settings file does not exist.

Data Directory = ERROR - Directory does not exist.
Sendmail = OK
General Settings = Does Not Exist
Affiliate Info = Does Not Exist
Affiliate Log File = Does Not Exist
Customer Log File = Does Not Exist
Inventory Log File = Does Not Exist
Coupon Data File = Does Not Exist

4. I know that /cgi-local/data exists...

"RE: Oops, no it doesn't"
Posted by Bill Weiner on at 12:33 PM
That is a good indication that your $data_directory setting in question #5 of the ushop.pl configuration questions is incorrect. See the following troubleshooting URL for assistance correcting that problem:


(Troubleshooting item #6)

"data location"
Posted by Nick Kay [nicholaskay@hotmail.com] on at 05:59 PM
Hi Bill

1. I have a /cgi-local/data directory

2. Absolute address set to "/cgi-local/data" - is this correct?

3. It all should work. Verio don't seem to think I should have a "data" directory under cgi-local

4. If all this fails, I'm prepared to swap hosting service - can you reccomend one?

"Don't touch anything in case it stops working"
Posted by Nick Kay [nicholaskay@hotmail.com] on at 06:39 PM

Changed the data directory to "data/" and I now get through the order taking process to the "This is where..." ushop bit

AND (trying not to get too excited) diagnostics pass

(Hopes he's not counting chickens...) I can get the uShop s/w ordered tomorrow...

"All finished / working"
Posted by Nick Kay [nicholaskay@hotmail.com] on at 06:10 AM
Hi Bill

Final notes after testing completed. All the below seems to be specific to the Hosting Service we're using and the way they set accounts up, priveleges give to folders, perl, etc etc

1. You need the location to perl set in all the scripts - even if they're being called as libraries

2. "../data/" doesn't work - it has to be "data/"

3. The optimum directory structure (for this hosting service) seems to be:


4. Hope this is of help to other people who may be seeing weird error msgs

5. Many thanks for your help

6. Off to place order for uShop as soon as I've pressed "Post Message"...