SitePoint Sponsor

User Tag List

Results 1 to 10 of 10
  1. #1
    SitePoint Enthusiast
    Join Date
    Nov 2004
    Location
    stockport
    Posts
    45
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Configuration problem...

    I'm trying to configure a page so I can follow a tutorial. I can't see what I'm doing wrong. I'm running the server on my local machine, I would have thought I just need to change the first two lines in the code block below. My documents are stored in the 'mymarket' folder which is inside my webroot folder, but this code doesnt work I have tried several variations but I cant get it working. Any suggestions???

    $CFG->wwwroot = "/localhost/mymarket";
    $CFG->dirroot = "/localhost/mymarket";



    Code before any changes have been made...

    ++++++++++++
    $CFG->wwwroot = "/mymarket";
    $CFG->dirroot = "/home/httpd/htdocs/mymarket";
    $CFG->templatedir = "$CFG->dirroot/templates";
    $CFG->libdir = "$CFG->dirroot/lib";
    $CFG->imagedir = "$CFG->wwwroot/images";

    $CFG->wordlist = "$CFG->libdir/wordlist.txt";
    $CFG->support = "support@mymarket.com";

    /* define database error handling behavior, since we are in development stages
    * we will turn on all the debugging messages to help us troubleshoot */
    $DB_DEBUG = true;
    $DB_DIE_ON_FAIL = true;

    /* load up standard libraries */
    require("$CFG->libdir/stdlib.php");
    require("$CFG->libdir/dblib.php");
    require("$CFG->libdir/mymarket.php");
    require("$CFG->libdir/cart.php");

    /* setup some global variables */
    $ME = qualified_me();

    /* start up the sessions, to keep things clean and manageable we will just
    * use one array called SESSION to store our persistent variables. */
    session_start();
    session_register("SESSION");

    /* initialize the SESSION variable if necessary */
    if (! isset($SESSION)) {
    $SESSION = array();
    }

  2. #2
    SitePoint Guru
    Join Date
    Nov 2004
    Location
    Plano
    Posts
    643
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    first, you dont need to double post. second, from the little information about what is wrong with it, this does not seem to be a database problem at all, much less mySQL one.

    without knowing what your problem is, i can say that your directory root will probably not be the same as your www root. the wwwroot you have correct, but i believe the dirroot should be the directory it is located in on YOUR COMPUTER. from the information you gave, this might be "/webroot/mymarket"

  3. #3
    SitePoint Enthusiast
    Join Date
    Nov 2004
    Location
    stockport
    Posts
    45
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Apologies about double post, mistake on my part. The dirroot IS on my computer, sorry if this is basic stuff, just learning the ropes, a beginner etc... I'll try your suggestion..

    thanks.

  4. #4
    SitePoint Enthusiast
    Join Date
    Nov 2004
    Location
    stockport
    Posts
    45
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It didnt work, any more suggestions?

  5. #5
    SitePoint Guru
    Join Date
    Nov 2004
    Location
    Plano
    Posts
    643
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    what exactly IS the problem?

  6. #6
    SitePoint Enthusiast
    Join Date
    Nov 2004
    Location
    stockport
    Posts
    45
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The problem is I need to do the following "Now, open up the file application.php and change the $CFG->wwwroot and $CFG->dirroot paths to match your server configuration" The above code in the intial post belongs to a file called 'application.php' the page is attached to every subsquent page in the tutorial, if it isnt configured correctly the pages wont work....

  7. #7
    reads the ********* Crier silver trophybronze trophy longneck's Avatar
    Join Date
    Feb 2004
    Location
    Tampa, FL (US)
    Posts
    9,854
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    you need to move this thread to the PHP forum.

    that being said, here is your answer:

    $CFG->wwwroot needs to be set based on the URL you use to access your site. for example, if you are using http://localhost/wicked-cool-site then you need to do this:

    PHP Code:
    $CFG->wwwroot '/wicked-cool-site'
    $CFG->dirroot needs to be set based on where your webserver stores its files. for example, if your PHP source files are in c:\www\htodcs\wicked-cool-site then you need to do this:

    PHP Code:
    $CFG->dirroot 'c:\www\htdocs\wicked-cool-site'
    or for a linux server:

    PHP Code:
    $CFG->dirroot '/home/mark11/public-html/wicked-cool-site'

  8. #8
    SitePoint Guru
    Join Date
    Nov 2004
    Location
    Plano
    Posts
    643
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i tried...

  9. #9
    SitePoint Enthusiast
    Join Date
    Nov 2004
    Location
    stockport
    Posts
    45
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    thanks.....

    And once again apologies for posting on the wrong section. I wasnt sure where to post this and I dont know how to move it.

  10. #10
    SitePoint Guru
    Join Date
    Nov 2004
    Location
    Plano
    Posts
    643
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thats cool...neither do i. i think you have to ask a mod.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •