49 users online (0 members and 49 guests)  


  Results 1 to 13 of 13

Related

  1. Replies: 0
  2. Directories are for real?    Forum: Website Promotion Forum
    Replies: 0
  1. #1
    ginaj's Avatar
    New User

    Status
    Offline
    Join Date
    Apr 2003
    Location
    Melbourne, Australia
    Posts
    5

    Unhappy Script is creating its own directories ...help

    Hope someone can tell me why this is happening.

    This is the script:
    http://www.storkavenue.com.au/cgi-bin/auction/auction.cgi

    that comes up ok, but when you try to go further i.e. register or look into categories, this is what happens.

    http://www.storkavenue.com.au/cgi-bin/storkavenue/auction/auction.cgi?action=no_reserve_items

    it throws in another directory called 'storkavenue' which should not be there and therefore the script won't work.

    Following is the config for the script called 'auction'

    #!/usr/bin/perl -w

    BEGIN {
    open (STDERR, ">errors.txt"); # Uncomment these 3 lines for debugging
    }

    use vars qw(%config %searchcats %category %form);
    # use CGI::Carp qw/fatalsToBrowser/; # For testing only
    use strict;
    local %form = &pull_data_from_form;

    local %config;
    #-#############################################
    # Configuration Section
    # Edit these variables!
    # The Base Directory. We need an
    # absolute path for the base directory.
    # Include the trailing slash. THIS SHOULD
    # NOT BE WEB-ACCESSIBLE!

    #- This is the folder path to your auction folder, NOT A URL
    # Place a # at the beginning of the line that you are NOT using
    # For UNIX Server
    $config{'cgi-path'} = '/home/storkavenue/www/cgi-bin/';
    # For Win Server
    #$config{'cgi-path'} = 'c:/Inetpub/wwwroot/cgi-bin/';

    $config{'basepatha'} = '/home/storkavenue/Auction_Data'; # No trailing slash
    $config{'basepath'} = '/home/storkavenue/Auction_Data/'; # Same as above but with trailing slash
    $config{'wwwpath'} = '/home/storkavenue/www/'; # Path to your web folder(where index.html is)

    # User Registration Directory
    # This is where user registrations are stored. FOLDER MANE ONLY
    $config{'regdir'} = 'reg';

    # Closed Auction Directory
    # This is where closed auctions are stored. FOLDER MANE ONLY
    $config{'closedir'} = 'closed';

    etc, etc, etc

    All cgi files were uploaded in ASCII and chmod to 755, the Auction_Data folder was chmod to 777.

    I really feel that I am not seeing the obvious here and any help would be appreciated.

  2. #2
    benzden's Avatar
    Senior Member

    Status
    Offline
    Join Date
    Feb 2002
    Location
    San Antonio, Texas
    Posts
    652
    The extra /storkavenue/ is in the code. Is the word home a reserved word causing unwanted action to be taken?

  3. #3
    ginaj's Avatar
    New User

    Status
    Offline
    Join Date
    Apr 2003
    Location
    Melbourne, Australia
    Posts
    5
    Don't quite understand.... when you say the word 'home' is a reserved word. When I set the script up, it said to use the basepath, and that is /home/storkavenue/www. Do you think I should take the directory for home out of the path and just have /storkavenue/www or /storkavenue/.

    It is putting the directory for storkavenue in the address after ....cgi-bin/storkavenue/auction/.. when it should only be cgi-bin/auction/....

    How would the basepath with home affect this?

    Sorry for all the questions, desparately trying to learn cgi.

    Thanks for the prompt reply.
    G

  4. #4
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    Chances are, we have mis-understood one of the variables, or the script itself is at fault. The first is more likely.

    Where did you get the script from? I would like to download it myself to delve deeper.
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?

  5. #5
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    nm, found it having a look now.
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?

  6. #6
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    # Your site url.
    $config{'scripturl'} = 'yoursite.com';
    Whats this set to in your version?
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?

  7. #7
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    ah-ha

    The links and form actions are generated using -

    Code:
    $ENV{'SCRIPT_NAME'}
    This is an environment variable.Its nothign to do with the script config, and for some reason its putting

    /cgi-bin/storkavenue/auction/auction.cgi
    I am not a perl expert by any means (pref php & asp) but using this environment variable is a standard trick for a script to point at itself. You may want to contact your host and ask why your server does this..
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?

  8. #8
    ginaj's Avatar
    New User

    Status
    Offline
    Join Date
    Apr 2003
    Location
    Melbourne, Australia
    Posts
    5
    Thanks Dean, I will contact them and see why this is happening. The other thing I thought I might try is putting the script into a directory off www called cgibin and see if the same things happens, just take it out of the cgi-bin totally.
    Again, thanks.

  9. #9
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    That could work. It looks like they have a 'shared' cgi wrap space, so your idea may work, or the cgi may not run at all.
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?

  10. #10
    ginaj's Avatar
    New User

    Status
    Offline
    Join Date
    Apr 2003
    Location
    Melbourne, Australia
    Posts
    5
    Hi again Dean, hehehehe, I tried the cgibin and it didn't work....I will be bald and not blonde soon..... Can you explain a 'shared' cgi wrap space to me. I also have another script which I am having trouble with on this server. But I think to get any help from the people who run the server, I will have to tell them what their problem is, if it is them. (But< it is most likely me)

  11. #11
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    Sounds like its their problem, not yours.

    In my webspace, I have a cgi-bin in each domain I create, eg

    css.somepeople.net/cgi-bin
    www.countersnipe.co.uk/cgi-bin

    What your host seems to be doing is linking your cgi-bin dir with a 'global' cgi-bin, and each user has its own directory within this 'global' cgi-bin.

    The problem is that the env variable is returning the true path to the script instead of the 'fake' one in your webspace.

    A thought occurs: I dont know Perl at all, but PHP has a function called putenv() that lets you change an environment variable. Might be worth looking up if Perl has a similar thang.
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?

  12. #12
    ginaj's Avatar
    New User

    Status
    Offline
    Join Date
    Apr 2003
    Location
    Melbourne, Australia
    Posts
    5
    Thanks Dean. I have contacted the owner of the server and he said it would not be a server problem (which you would say hehehehe) but he looking into it for me. So I will let you know what he comes up with. I will pass on your last message to him and see what he says.

  13. #13
    benzden's Avatar
    Senior Member

    Status
    Offline
    Join Date
    Feb 2002
    Location
    San Antonio, Texas
    Posts
    652
    Ask them for the URL to a site where it does work and the source code is viewable - sometimes comparing one's code with that which works is the easiest way to spot errors.



Tags for this Thread