Web Hosting Forum | Lunarpages
News: April 3, 2008 - New Contest! - Win 5 Years of Hosting and $1,000!
June 30, 2008 - Submit Your Site for the July 08 Site of the Month Award!
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
July 04, 2008, 09:24:38 PM


Login with username, password and session length


Pages: [1]   Go Down
  Print  
Author Topic: cannot get counter to work in sub domain  (Read 335 times)
ceejay11
Newbie
*
Offline Offline

Posts: 3


« on: May 13, 2008, 02:10:34 AM »

help someone, please i have created the html for a web page counter, in the cgi area, pasted it into my web page, uploaded it and I get an error message that I need to  create a datafile in cpanel
now this is with a sub domain which is probably where the problem lies.
The question is how do I get around this I have enabled the cgi for the main domain but does this mean it does not work in the sub domain
cheers
chris jones
Logged
MrPhil
Quantum Encyclopedia Writer
*****
Offline Offline

Posts: 3031



« Reply #1 on: May 13, 2008, 04:15:36 AM »

I'm guessing that you installed the code into the primary domain's cgi area (public_html/cgi-bin/). I don't think the subdomain, which is technically a separate website, can access that. You may need to install your code into public_html/subdomain/cgi-bin/.
Logged

ceejay11
Newbie
*
Offline Offline

Posts: 3


« Reply #2 on: May 13, 2008, 01:08:13 PM »

Many thanks for the reply but it still leaves me puzzled how do I load the code into the correct cgi-bin? the counter builder in the cgi center just gives me the html code for the web page
many thanks
chis jones
Logged
MrPhil
Quantum Encyclopedia Writer
*****
Offline Offline

Posts: 3031



« Reply #3 on: May 13, 2008, 03:45:47 PM »

If you need a separate /cgi-bin directory, you'd have to manually create one via cPanel > File Manager or an FTP client. First of all, where is the HTML sending the data via the action= attribute? Is it action="/cgi-bin/counter.cgi" (or similar), or is it action="http://subdomain.primary.com/cgi-bin/counter.cgi"? The idea is that the primary domain, subdomains, and add-on domains are all seen as independent sites, and can't access each other's directories and files directly. "/" is different for each of them. You have to go through "http://domainname/path/file" addressing. Are you getting any error messages that suggest that the server is unable to access something?
Logged

ceejay11
Newbie
*
Offline Offline

Posts: 3


« Reply #4 on: May 14, 2008, 11:01:20 AM »

Hi the url in the html code for the counter points to subdomain.com/cgi-bin should this be main.sub domain.com/cgi-bin?
is that where I am going wrong, and the directory appears empty does it need something in it, presumeable it does
cheers
chris jones
Logged
MrPhil
Quantum Encyclopedia Writer
*****
Offline Offline

Posts: 3031



« Reply #5 on: May 14, 2008, 01:42:33 PM »

When you say "subdomain", do you mean "www.adifferentdomain.com" or "subdom.primarydomain.com"? The first case is an add-on domain and the second is a subdomain, although the CGI problem should be the same in either. Just keep in mind that you can't jump back and forth between the primary domain and subdomains or add-on domains by using just a directory path. You can with http://....., but be careful.
Logged

Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.3 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks


Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM