FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Need Help With This Code!





newso
Code:
<?php
/*******************************************************
 *   Copyright (C) 2006  http://p3net.net

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License along
    with this program; if not, write to the Free Software Foundation, Inc.,
    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 ******************************************************/
session_start();
// define our application directory
define('SPACES_DIRECTORY', 'http://www.newso.frihost.net');
// the astrospaces path
define('SPACES_PATH', 'http://www.newso.frihost.net');
// define smarty lib directory
define('SMARTY_DIR', SPACES_DIRECTORY . 'http://www.newso.frihost.net');
ini_set('include_path', SPACES_DIRECTORY . 'http://www.newso.frihost.net');
// include the setup script
require("libs/spaces_setup.php");

$spaces =& new Spaces or die("Could not define <i>Spaces</i> class");
$ProfileChanges =&new ProfileChanges or die("Could not define <i>ProfileChanges</i> class");
?>


The piece of code above is what im struggling with. All my files are stored in the public html folder. my domain is newso.frih.net

can anyone tell me what needs to be put there for me to get my script working. Im struggling, with this.

These are the help files given to me

Quote:
1) Open /definitions.php

2) Locate the line "define('SPACES_DIRECTORY', 'EDITME');".

3) Edit with the FULL path of your web directory (usually something like wwwroot/username/domainname/htdocs/). If you are unsure, contact your webhost. BE SURE TO INCLUDE TRAILING SLASH!

4) Locate the line "define('SPACES_PATH', 'EDITME');".

5) Edit with the domain name and path that AstroSPACES will be accessible from. For example, if you access AstroSPACES at http://mydomain.com/astrospaces, put http://mydomain.com/astrospaces in place of EDITME. BE SURE TO INCLUDE THE TRAILING SLASH! **NOTE: IF THIS IS NOT CORRECT, NOBODY WILL BE ABLE TO ACTIVATE THEMSELVES!!!**
wumingsden
newso wrote:
Code:
<?php
/*******************************************************
 *   Copyright (C) 2006  http://p3net.net

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License along
    with this program; if not, write to the Free Software Foundation, Inc.,
    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 ******************************************************/
session_start();
// define our application directory
define('SPACES_DIRECTORY', 'http://www.newso.frihost.net');
// the astrospaces path
define('SPACES_PATH', 'http://www.newso.frihost.net');
// define smarty lib directory
define('SMARTY_DIR', SPACES_DIRECTORY . 'http://www.newso.frihost.net');
ini_set('include_path', SPACES_DIRECTORY . 'http://www.newso.frihost.net');
// include the setup script
require("libs/spaces_setup.php");

$spaces =& new Spaces or die("Could not define <i>Spaces</i> class");
$ProfileChanges =&new ProfileChanges or die("Could not define <i>ProfileChanges</i> class");
?>


The piece of code above is what im struggling with. All my files are stored in the public html folder. my domain is newso.frih.net

can anyone tell me what needs to be put there for me to get my script working. Im struggling, with this.

These are the help files given to me

Quote:
1) Open /definitions.php

2) Locate the line "define('SPACES_DIRECTORY', 'EDITME');".

3) Edit with the FULL path of your web directory (usually something like wwwroot/username/domainname/htdocs/). If you are unsure, contact your webhost. BE SURE TO INCLUDE TRAILING SLASH!

4) Locate the line "define('SPACES_PATH', 'EDITME');".

5) Edit with the domain name and path that AstroSPACES will be accessible from. For example, if you access AstroSPACES at http://mydomain.com/astrospaces, put http://mydomain.com/astrospaces in place of EDITME. BE SURE TO INCLUDE THE TRAILING SLASH! **NOTE: IF THIS IS NOT CORRECT, NOBODY WILL BE ABLE TO ACTIVATE THEMSELVES!!!**


Try this:

Code:
<?php
/*******************************************************
 *   Copyright (C) 2006  http://p3net.net

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License along
    with this program; if not, write to the Free Software Foundation, Inc.,
    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 ******************************************************/
session_start();
// define our application directory
define('SPACES_DIRECTORY', '/domains/newso.frihost.net/public_html/');
// the astrospaces path
define('SPACES_PATH', 'http://www.newso.frihost.net');
// define smarty lib directory
define('SMARTY_DIR', SPACES_DIRECTORY . 'http://www.newso.frihost.net');
ini_set('include_path', SPACES_DIRECTORY . 'http://www.newso.frihost.net');
// include the setup script
require("libs/spaces_setup.php");

$spaces =& new Spaces or die("Could not define <i>Spaces</i> class");
$ProfileChanges =&new ProfileChanges or die("Could not define <i>ProfileChanges</i> class");
?>
newso
Its ok, ive managed to fix the problem now. It was a problem with CHMOD'in the files. It wasnt a a path problem.

Thank you anyway mate, it was really bugging me this one lol. But it was something as simple as CHMOD
wumingsden
Glad to hear you have fixed the problem. If my code works I suggest still using it though because the path which you are using, that seems to work, is not correct. Sure, it works, but its not the direct path which it is asking for.
mathiaus
Wu is right. It asks for path but you provided the URL. they are two different things. If your current setup works, its because Bonding's enabled allow_url_include the other day.
newso
No it didn't work lol, this is why i posted it here lol. thank you for sorting my problem people.
Related topics
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.