Results 1 to 12 of 12
  1. #1
    Join Date
    May 2009
    Posts
    42

    script installation problem

    I wonder if anyone can help me here. A friend of mine contacted me with a problem she's having with installing a script she purchased. The installation instructions sound quite straightforward, simply upload, create database, adjust config.php and upload database files. The home page shows successfully, but all the links lead to non existent pages so the problem seems to be in config.php.
    The only thing that looks like it could be causing the problem is this line:
    define('ROOT_DIR', realpath(dirname(public_html/myspace)));

    So it's asking for the path to the root diretory, but where do i write that?
    I've tried: ('ROOT_DIR', realpath(public_html/filename))); but still no joy,
    and i tried several variations.
    Looking at other paths in config.php they are written as such:
    define('MP3FLASHLIST_DIR',ROOT_DIR."/uploads/playlist");
    Without all those )))'s as in the ROOT dir path.
    Can anyone tell me how that first line should be wriiten assuming my root directory is public_html/mydir ?
    (ps. there is no support forum for this script or faq so i'm hoping someone here could help, also could the problem be that this path needs to be set before uploading the database files?)

  2. #2
    Join Date
    Mar 2009
    Posts
    2,218
    Quote Originally Posted by zbdblues View Post
    The only thing that looks like it could be causing the problem is this line:
    define('ROOT_DIR', realpath(dirname(public_html/myspace)));

    ...

    Can anyone tell me how that first line should be wriiten assuming my root directory is public_html/mydir ?
    I expect for Unix:

    define('ROOT_DIR','/public_html/mydir');

    or

    define('ROOT_DIR','/public_html/mydir/');


    And for Windows, something like:

    define('ROOT_DIR','c:\public_html\mydir');

    or

    define('ROOT_DIR','c:\public_html\mydir\');

  3. #3
    Join Date
    May 2009
    Posts
    42
    thanks tim, i'll try that now.

  4. #4
    Join Date
    May 2009
    Posts
    42
    Nope, it still doesn't work. If i leave that line unedited i get a home page, if i edit it, i get an error. When i get the home page, none of the links work and yet they do point to the file/folder that they are supposed to go to, but i get a 404 error. I just can't figure this out.

  5. #5
    Join Date
    Mar 2009
    Posts
    2,218
    Quote Originally Posted by zbdblues View Post
    Nope, it still doesn't work. If i leave that line unedited i get a home page, if i edit it, i get an error.
    What's the error? What's in the log files?

  6. #6
    Join Date
    Feb 2005
    Location
    Australia
    Posts
    5,842
    For a typical *nix hosting server I'd try /home/username/public_html/folder.

    You could also try to fetch the directory automatically with:
    PHP Code:
    define('ROOT_DIR'realpath(dirname(__FILE__))); 
    But yes, reading error messages and logs would also be a good idea!
    Chris

    "Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them." - Laurence J. Peter

  7. #7
    Join Date
    May 2009
    Posts
    42
    Hi and thanks for the suggestions. This is the website: http://myspace.yourjoinit.com/
    Now, let's assume the config is correct. This home page looks fine, but if you click any of the links you get a 404. Now the url it attempts to go to for example if you click 'custom friends space generator'. It will go to this url: http://myspace.yourjoinit.com/friends, however the path to the friends folder in file manager is /apps/friends. Now the index.php calls for the apps folder, so i assume that's why it's not mentioned in the url, plus i have found an identical site which goes to the same destination. Also, if you try to go to the file directly in your browser by adding the extra folder name, i.e http://myspace.yourjoinit.com/apps/friends you get an error message relating to the root path as previously mentioned. That same error message is in the log. Now i have set this up exactly to instructions and cannot figure out what the problem can be, and as i mentioned before there doesn't seem to be a forum relating to this script. Any ideas anyone????

  8. #8
    Join Date
    Feb 2005
    Location
    Australia
    Posts
    5,842
    If you installed the script according to instructions, it isn't working and it isn't supported, my suggestion would be to stop wasting your time, delete it now and look for something better.

    Otherwise be prepared to put a lot of work into fixing the code, starting with:
    1. Finding out how it's generating those (incorrect?) links in the menu
    2. Finding out what file it's trying to include when it generates that error (/home/username/public_html/myspace/include/db.php maybe?) and why it can't load it.


    Edit: My earlier suggestion of possibly using dirname(__FILE__) to determine the root directory will not work when you're calling pages in subdirectories like /apps/index.php.
    Last edited by foobic; 08-05-2009 at 01:57 AM.
    Chris

    "Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them." - Laurence J. Peter

  9. #9
    Join Date
    May 2009
    Posts
    42
    Hi again, thanks for your reply. I found an identical site to this one which works and goes to the same urls. (i.e www.sitename/friends) so i assume the url's are correct. It is trying to include include/db.php and the first line in db.php is asking for adodb.php now that's as far as i can go with my extremely limited knowledge! The adodb file is above my head i'm afraid, i'm not sure what it's there for or even if the browser gets that far.

  10. #10
    Join Date
    Feb 2005
    Location
    Australia
    Posts
    5,842
    It's ROOT_DIR/include/db.php that can't be found, so if /home/username/public_html/myspace/include/db.php exists then probably the script has the wrong value for ROOT_DIR somehow, when called from apps/friends/index.php.

    If the links are right, did you perhaps miss uploading some .htaccess files?
    Chris

    "Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them." - Laurence J. Peter

  11. #11
    Join Date
    May 2009
    Posts
    42
    Now there's an idea! I've been searching this script with a fine tooth comb and i was just wondering if there was a hosting requirement needed for this script which isn't installed, but i didn't think about .htaccess! Thanks for being ever so helpful, really do appreciate it.

  12. #12
    Join Date
    May 2009
    Posts
    42
    Foobic, you are an absolute genius! The script was uploaded as a zipped file and i 'viewed' the contents to find a .htaccess was included but it was in a folder which obviously reffered to a previous installation. I just copied out of the folder and into public_html and voila! Thank you ever so much for your help.

Similar Threads

  1. Professional script installation - 10 per script
    By bright-web in forum Employment / Job Offers
    Replies: 0
    Last Post: 10-19-2006, 04:45 PM
  2. Help - CGI Script Installation Problem.
    By senaia in forum Programming Discussion
    Replies: 1
    Last Post: 05-12-2005, 03:31 PM
  3. Script Installation..$5 each.
    By hockeydude in forum Employment / Job Offers
    Replies: 3
    Last Post: 04-01-2005, 07:22 PM
  4. Script installation
    By Sam Granger in forum Employment / Job Offers
    Replies: 4
    Last Post: 01-01-2005, 01:26 PM
  5. Will pay for script installation
    By tfc in forum Employment / Job Offers
    Replies: 4
    Last Post: 10-09-2003, 07:59 PM

Posting Permissions

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