stuck on the homepage!

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

bkm_ho
Forum Newbie
Posts: 19
Joined: Mon Feb 11, 2008 12:25 am

stuck on the homepage!

Post by bkm_ho »

~pickle: please use [ php ] tags when posting PHP code. Your post has been updated to reflect how we'd like it to look.

hi everyone,

i need some help in creating some image files that have been deleted off my previous webhost. the developers who created the site for me have no backups either and im stuck!
im using easy php on my own pc at the moment and its running correctly i think, but i'm having problems with the code displaying correctly. can anyone help if i post the code?

this is the code on the index page

Code: Select all

<?
require "settings.php";
header("Location:".REDIRECT_MODULE);
?>
testing the script shows up blank...is that right? if i correct <? to <?php i get this message The requested URL /REDIRECT_MODULE was not found on this server.

i've looked through all the directories, but there isnt a redirect module.

the code for settings.php is as follows:

Code: Select all

<?
   $ip = $_SERVER['REMOTE_ADDR'];
   $CURRENCY = array('USD'=>'USD', 'EUR'=>'EUR');
 
    
define("IPLOCATION",false);
define("REDIRECT_MODULE","user.php");
define('ACTIVE_SITE', 'propmat');
include 'systems/'.ACTIVE_SITE.'/settings.php';
?>
much appreciated if anyone can post their suggestions and instruct me! many thanks in advance!

~pickle: please use [ php ] tags when posting PHP code. Your post has been updated to reflect how we'd like it to look.
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: stuck on the homepage!

Post by Christopher »

If you look at define("REDIRECT_MODULE","user.php"); then REDIRECT_MODULE is a constant defined as "user.php". So see if that script exists. Also, that URL should be a full URL for the Location header (e.g., http://mysite.com/user.php).
(#10850)
bkm_ho
Forum Newbie
Posts: 19
Joined: Mon Feb 11, 2008 12:25 am

Re: stuck on the homepage!

Post by bkm_ho »

this is the code on user.php

n.b i hope the php tags are right pickle...sorry if its not.

**** IT IS

Code: Select all

your code
OR

Code: Select all

your code
****[/color]

Code: Select all

 
<?
    session_start();
    $SECTION = '_user';
    define ('SECTION', $SECTION);
    define('INDEX', 'user.php');    
        
    require "settings.php";
    include 'systems/'.ACTIVE_SITE.'/settings_user.php';
    include 'systems/'.ACTIVE_SITE.'/constants.php';
    include 'systems/'.ACTIVE_SITE.'/constants_payment.php';        
    require "lib/_include.php";
    
    $__start_micro_time = getMicroTime();
 
    $DEFAULT_CONNECTION = mysql_connect(DB_HOST, DB_USER, DB_PASS);
    if (!$DEFAULT_CONNECTION) die('Unable to connect to database: '.mysql_error());
    mysql_select_db(DB_NAME, $DEFAULT_CONNECTION);
    mysql_query("SET CHARACTER SET 'utf8'");
    mysql_query('SET collation_connection = utf8_general_ci');    
    header('Content-type: text/html; charset=UTF-8');    
    
    if (file_exists("tools/generate.php")) { include "tools/generate.php"; }
 
    require "classes/_include.php";
    require "classes/$SECTION/_include.php";
    
    $SECURITY = new Security();
    
    // get current location
    //Geo::saveCurrentLocationToSession();
    if ($_REQUEST['get_location'] == 'yes') { var_dump($_SESSION['location']); die; }
    
    // -- enable this if you want to NOT cache the location result
    // $_SESSION['location_allowed'] = 'no';
    
    // check for overall ban/block
    if ($_SESSION['location_allowed'] != 'yes' && ($_REQUEST['_o'] != 'Default' || $_REQUEST['_m'] != 'deny'))
    {
        $r_blk = new Query('select * from '.TBL_ALLOW_BY_IP .' where ip=\''.encode($_SESSION['location']['ip']).'\'');
        if (!$r_blk->fetch())
        {
            $r_blk = new Query('select * from '.TBL_BLOCK_BY_COUNTRY.' where country=\''.encode($_SESSION['location']['country']).'\' and blocked_by=0');
            if ($r_blk->fetch()) redirect('Default', 'deny', array('err'=>'country banned by admin'));
 
            $r_blk = new Query('select * from '.TBL_BLOCK_BY_REGION .' where country=\''.encode($_SESSION['location']['country']).'\' and region=\''.encode($_SESSION['location']['region']).'\' and blocked_by=0');
            if ($r_blk->fetch()) redirect('Default', 'deny', array('err'=>'region banned by admin'));
 
            $r_blk = new Query('select * from '.TBL_BLOCK_BY_IP .' where ip=\''.encode($_SESSION['location']['ip']).'\' and blocked_by=0');
            if ($r_blk->fetch()) redirect('Default', 'deny', array('err'=>'ip banned by admin'));
        }
 
        $_SESSION['location_allowed'] = 'yes';
    }
    
    $index_php_site = $_SERVER['HTTP_HOST'];
    $index_php_r = new Query("select * from ".TBL_SITE." where domain='$index_php_site' or domain_alias1='$index_php_site' or domain_alias2='$index_php_site'");
    $index_php_a = $index_php_r->fetch();
    if (!$index_php_a) die('This site is not hosted on our server.');
    
    define ('SITE_NAME', $index_php_a['name']);
    define ('SITE_TEMPLATE', $index_php_a['template']);
    define ('SITE_WEBMASTER', $index_php_a['webmaster_id']);
    define ('SITE_EMAIL', $index_php_a['email']);
    define ('SITE_EMAIL_FULL', $index_php_a['email_name'] . ' <'.$index_php_a['email'] . '>');
    
    $q = new Query ("select `key`, `value` from ".TBL_DICTIONARY);
    $DICT = $q->getAssocArray ("key", "value");
 
    $WEBOBJECT = $_REQUEST['_o'];
    $WEBMETHOD = $_REQUEST['_m'];
    
    if ($WEBOBJECT > '')
    {
        $WEBOBJECT = $WEBOBJECT;
        if ($WEBMETHOD > ''); else $WEBMETHOD = 'index';
    }
    else
    {
        $WEBOBJECT = 'Default';
        $WEBMETHOD = 'index';
    }
    
    define (WEBOBJECT, $WEBOBJECT);
    define (WEBMETHOD, $WEBMETHOD);
 
    $WEB_WEBOBJECT = "Web$WEBOBJECT";
    $CALLABLE_OBJECT = new $WEB_WEBOBJECT;
    
    if (is_callable(array(&$CALLABLE_OBJECT, $WEBMETHOD), false))
    {
        if ($INTERFACE["$WEBOBJECT.$WEBMETHOD"])
        {
            if ($INTERFACE["$WEBOBJECT.$WEBMETHOD"]['sec'] > '' && $INTERFACE["$WEBOBJECT.$WEBMETHOD"]['sec'] != 'allow')
            {
                if ($userLevel >= $INTERFACE["$WEBOBJECT.$WEBMETHOD"]['min_level'])
                {
                    foreach($INTERFACE["$WEBOBJECT.$WEBMETHOD"]['perms'] as $k=>$v)
                    {
                        if ($userPerm[$v]); else
                        {
                            $_index_php_error = 'no_req_perm';
                            break;
                        }
                    }
                }
                else
                {
                    $_index_php_error = 'no_req_level';
                }
            }
        }
        else
        {
            $_index_php_error = 'no_iface';
        }
    }
    else
    {
        $_index_php_error = 'not_callable';
    }
    
    switch($_index_php_error)
    {
        case 'not_callable':
        case 'no_iface':
            redirect('Default', 'index', array('error'=>$_index_php_error));
            break;
 
        case 'no_req_level':
        case 'no_req_perm':
            if ($INTERFACE["$WEBOBJECT.$WEBMETHOD"]['sec'] == 'auth')
                redirect('Default', 'login', array('error'=>$_index_php_error, 'goto'=>$_SERVER['REQUEST_URI']));
            else
                redirect('Default', 'deny', array('error'=>$_index_php_error));
            break;
 
        default:
            $arr = array();
            foreach($INTERFACE["$WEBOBJECT.$WEBMETHOD"]['params'] as $k3=>$v3) $arr[$v3] = $_REQUEST[$v3];
            call_user_func_array(array(&$CALLABLE_OBJECT, $WEBMETHOD), $arr);
    }
  
?>
 
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Re: stuck on the homepage!

Post by RobertGonzalez »

Try this and report back what you get on the screen:
settings.php

Code: Select all

<?php
// Always use regular opening PHP tags, not the short ones
$ip = $_SERVER['REMOTE_ADDR'];
$CURRENCY = array('USD'=>'USD', 'EUR'=>'EUR');
define("IPLOCATION",false);
define("REDIRECT_MODULE","user.php");
define('ACTIVE_SITE', 'propmat');
// This should be run through a file_exists() check
//include 'systems/'.ACTIVE_SITE.'/settings.php';
$settings_file = 'systems/'.ACTIVE_SITE.'/settings.php';
if (! file_exists($settings_file)) {
  die('The settings file (' . $settings_file . ') does not appear to live where you think it does');
}
?>

Code: Select all

<?php
require "settings.php";
if (! defined('REDIRECT_MODULE')) {
  die('The REDIRECT_MODULE constant is not set');
} else {
  header("Location: http://www.fullurl.com/".REDIRECT_MODULE);
  exit;
}
?>
bkm_ho
Forum Newbie
Posts: 19
Joined: Mon Feb 11, 2008 12:25 am

Re: stuck on the homepage!

Post by bkm_ho »

ok i've got the redirect module specified correctly and its showing a page that resembles what was the finished product!

the index page, required the settings page, which in turn defined user.php, on user.php i've added an include function to include layout.php.

my problem now, is to understand what the developers have written to define the directory of the images. can anyone tell me if the code is correct, because having created a directory called images following the correct path, then creating a test image called index_01.jpg, nothing is showing up on the webpage!

the code for user.php is as follows

Code: Select all

 
<?php
    session_start();
    $SECTION = '_user';
    define ('SECTION', $SECTION);
    define('INDEX', 'user.php'); 
      
    include 'systems/propmat/templates/user/layout.php';  
    require "settings.php";
    include 'systems/'.ACTIVE_SITE.'/settings_user.php';
    include 'systems/'.ACTIVE_SITE.'/constants.php';
    include 'systems/'.ACTIVE_SITE.'/constants_payment.php';        
    require "lib/_include.php";
    
    $__start_micro_time = getMicroTime();
 
    $DEFAULT_CONNECTION = mysql_connect(DB_HOST, DB_USER, DB_PASS);
    if (!$DEFAULT_CONNECTION) die('Unable to connect to database: '.mysql_error());
    mysql_select_db(DB_NAME, $DEFAULT_CONNECTION);
    mysql_query("SET CHARACTER SET 'utf8'");
    mysql_query('SET collation_connection = utf8_general_ci');    
    header('Content-type: text/html; charset=UTF-8');    
    
    if (file_exists("tools/generate.php")) { include "tools/generate.php"; }
 
    require "classes/_include.php";
    require "classes/$SECTION/_include.php";
 
    
    $SECURITY = new Security();
    
    // get current location
    //Geo::saveCurrentLocationToSession();
    if ($_REQUEST['get_location'] == 'yes') { var_dump($_SESSION['location']); die; }
    
    // -- enable this if you want to NOT cache the location result
    // $_SESSION['location_allowed'] = 'no';
    
    // check for overall ban/block
    if ($_SESSION['location_allowed'] != 'yes' && ($_REQUEST['_o'] != 'Default' || $_REQUEST['_m'] != 'deny'))
    {
        $r_blk = new Query('select * from '.TBL_ALLOW_BY_IP .' where ip=\''.encode($_SESSION['location']['ip']).'\'');
        if (!$r_blk->fetch())
        {
            $r_blk = new Query('select * from '.TBL_BLOCK_BY_COUNTRY.' where country=\''.encode($_SESSION['location']['country']).'\' and blocked_by=0');
            if ($r_blk->fetch()) redirect('Default', 'deny', array('err'=>'country banned by admin'));
 
            $r_blk = new Query('select * from '.TBL_BLOCK_BY_REGION .' where country=\''.encode($_SESSION['location']['country']).'\' and region=\''.encode($_SESSION['location']['region']).'\' and blocked_by=0');
            if ($r_blk->fetch()) redirect('Default', 'deny', array('err'=>'region banned by admin'));
 
            $r_blk = new Query('select * from '.TBL_BLOCK_BY_IP .' where ip=\''.encode($_SESSION['location']['ip']).'\' and blocked_by=0');
            if ($r_blk->fetch()) redirect('Default', 'deny', array('err'=>'ip banned by admin'));
        }
 
        $_SESSION['location_allowed'] = 'yes';
    }
    
    $index_php_site = $_SERVER['HTTP_HOST'];
    $index_php_r = new Query("select * from ".TBL_SITE." where domain='$index_php_site' or domain_alias1='$index_php_site' or domain_alias2='$index_php_site'");
    $index_php_a = $index_php_r->fetch();
    if (!$index_php_a) die('This site is not hosted on our server.');
    
    define ('SITE_NAME', $index_php_a['name']);
    define ('SITE_TEMPLATE', $index_php_a['template']);
    define ('SITE_WEBMASTER', $index_php_a['webmaster_id']);
    define ('SITE_EMAIL', $index_php_a['email']);
    define ('SITE_EMAIL_FULL', $index_php_a['email_name'] . ' <'.$index_php_a['email'] . '>');
    
    $q = new Query ("select `key`, `value` from ".TBL_DICTIONARY);
    $DICT = $q->getAssocArray ("key", "value");
 
    $WEBOBJECT = $_REQUEST['_o'];
    $WEBMETHOD = $_REQUEST['_m'];
    
    if ($WEBOBJECT > '')
    {
        $WEBOBJECT = $WEBOBJECT;
        if ($WEBMETHOD > ''); else $WEBMETHOD = 'index';
    }
    else
    {
        $WEBOBJECT = 'Default';
        $WEBMETHOD = 'index';
    }
    
    define (WEBOBJECT, $WEBOBJECT);
    define (WEBMETHOD, $WEBMETHOD);
 
    $WEB_WEBOBJECT = "Web$WEBOBJECT";
    $CALLABLE_OBJECT = new $WEB_WEBOBJECT;
    
    if (is_callable(array(&$CALLABLE_OBJECT, $WEBMETHOD), false))
    {
        if ($INTERFACE["$WEBOBJECT.$WEBMETHOD"])
        {
            if ($INTERFACE["$WEBOBJECT.$WEBMETHOD"]['sec'] > '' && $INTERFACE["$WEBOBJECT.$WEBMETHOD"]['sec'] != 'allow')
            {
                if ($userLevel >= $INTERFACE["$WEBOBJECT.$WEBMETHOD"]['min_level'])
                {
                    foreach($INTERFACE["$WEBOBJECT.$WEBMETHOD"]['perms'] as $k=>$v)
                    {
                        if ($userPerm[$v]); else
                        {
                            $_index_php_error = 'no_req_perm';
                            break;
                        }
                    }
                }
                else
                {
                    $_index_php_error = 'no_req_level';
                }
            }
        }
        else
        {
            $_index_php_error = 'no_iface';
        }
    }
    else
    {
        $_index_php_error = 'not_callable';
    }
    
    switch($_index_php_error)
    {
        case 'not_callable':
        case 'no_iface':
            redirect('Default', 'index', array('error'=>$_index_php_error));
            break;
 
        case 'no_req_level':
        case 'no_req_perm':
            if ($INTERFACE["$WEBOBJECT.$WEBMETHOD"]['sec'] == 'auth')
                redirect('Default', 'login', array('error'=>$_index_php_error, 'goto'=>$_SERVER['REQUEST_URI']));
            else
                redirect('Default', 'deny', array('error'=>$_index_php_error));
            break;
 
        default:
            $arr = array();
            foreach($INTERFACE["$WEBOBJECT.$WEBMETHOD"]['params'] as $k3=>$v3) $arr[$v3] = $_REQUEST[$v3];
            call_user_func_array(array(&$CALLABLE_OBJECT, $WEBMETHOD), $arr);
    }
  
?>
 
i tried using the developers code by using

Code: Select all

 
 
include 'systems/'.ACTIVE_SITE.'/templates/'.SITE_TEMPLATE.'/layout.php';  
 
 
but it wasnt having any of it, so i gave up and decided to type in the whole path. the ACTIVE_SITE constant is defined in the settings.php page.

the layout page then specifies

Code: Select all

 
 
    <style type="text/css">
    <? include Template::getFileName(SITE_TEMPLATE."/style.css"); ?>
    </style>
    <script language="javascript" src="js/_calendar.js" type="text/javascript"></script>
    <script language="javascript" src="js/_lib.js" type="text/javascript"></script>
    <script language="javascript" src="js/_my.js" type="text/javascript"></script>
</head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td class="body_header"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td class="body_footer"><table width="770" height="1201" border="0" align="center" cellpadding="0" cellspacing="0" id="Table_01">
          <tr>
            <td width="770" height="44" colspan="9"><img src="systems/'.ACTIVE_SITE.'/templates/'.SITE_TEMPLATE.'/img/index_01.jpg" width="770" height="44" alt="" /></td>
          </tr>
          <tr>
            <td width="10" height="272" rowspan="3"><img src="systems/<?=ACTIVE_SITE?>/templates/<?=SITE_TEMPLATE?>/img/index_02.jpg" width="10" height="272" alt="" /></td>
            <td width="3" height="32"><img src="systems/<?=ACTIVE_SITE?>/templates/<?=SITE_TEMPLATE?>/img/index_03.jpg" width="3" height="32" alt="" /></td>
            <td width="320" height="32" colspan="2" class="td_menu" style="text-align:center; vertical-align:middle;">
            <table border="0" align="center" cellpadding="0" cellspacing="0">             
            <tr>
                <td>
                <a class="menu" href="<?=getLink('Model', 'm_list', array('only_online'=>0))?>">home</span>
                &nbsp;
                <? 
                if (!$GLOBALS["userID"]) 
                { 
                    ?>
                    <a class="menu" href="<?=getLink('UsrRegister', 'index', array('user_type'=>'member'))?>" >sign up</a>
                    &nbsp;
                    <a class="menu" href="<?=getCleanLink('Default', 'login')?>" >log in</a>
                    <? 
                }
                else 
                {
                        ?>
<a class="menu" href="javascript&#058; return false;" onclick="javascript&#058; window.open('<?=getLink('UsrAccount', 'stats')?>', null, 'height=200,width=200,status=no,toolbar=no,menubar=no,location=no');">account</a>
<!-- getLink('UsrAccount', 'index', array('user_type'=>'member')) -->
                    &nbsp;
                    <a class="menu" href="<?=getCleanLink('UsrBuy', 'index')?>" >buy</a>
                    &nbsp;
                    <a class="menu" href="<?=getLink('Default','logout')?>"  >logout</a>
                    
                    <?
                }
                ?>
                </td>
            </tr>
            </table></td>
            <td width="102" height="32"><img src="systems/<?=ACTIVE_SITE?>/templates/<?=SITE_TEMPLATE?>/img/index_05.jpg" width="102" height="32" alt="" /></td>
            <td width="322" height="32" colspan="2" class="td_menu" style="text-align:center; vertical-align:middle;">
            <table border="0" align="center" cellpadding="0" cellspacing="0">
            <tr>
                <td>
                    <a class="menu" href="javascript&#058;windowOpen('<?=getLink('Default', 'help_pop',array())?>','Statement')" >faq</a>
                    &nbsp;
                    <a  href="<?=getLink('Model', 'm_list', array('only_online'=>0))?>" class="menu" >props</a>
                    &nbsp;
                    <a  href="<?=getLink('Model', 'm_list', array('only_online'=>1))?>" class="menu" >other props</a>
                </td>
            </tr>
            </table></td>
            <td width="3" height="32"><img src="systems/<?=ACTIVE_SITE?>/templates/<?=SITE_TEMPLATE?>/img/index_07.jpg" width="3" height="32" alt="" /></td>
            <td width="10" height="272" rowspan="3"><img src="systems/<?=ACTIVE_SITE?>/templates/<?=SITE_TEMPLATE?>/img/index_08.jpg" width="10" height="272" alt="" /></td>
          </tr>
          <tr>
            <td width="750" height="9" colspan="7"><img src="systems/<?=ACTIVE_SITE?>/templates/<?=SITE_TEMPLATE?>/img/index_09.jpg" width="750" height="9" alt="" /></td>
          </tr>
<?
    if ($_GET["_m"]== "m_list" || !$_GET["_m"]) {
        $arr_top=$this->modelall;
        for ($i=0;$i<1;) {
            $ind=rand(0,count($arr_top));
            $file=$arr_top[$ind]["file"];
            $id=$arr_top[$ind]["id"];
            if ($file!='')
                $i++;
        }
?>
 
i can get at least the layout page on the browser, but none of the links are working, so i dont know what im doing wrong! php is driving me nuts...
Last edited by bkm_ho on Fri Feb 15, 2008 1:55 pm, edited 1 time in total.
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Re: stuck on the homepage!

Post by RobertGonzalez »

Start by using regular opening PHP tags (<?php) instead of the short tags (<?). Once that is done, try again and if it is still broken, post back here.
bkm_ho
Forum Newbie
Posts: 19
Joined: Mon Feb 11, 2008 12:25 am

Re: stuck on the homepage!

Post by bkm_ho »

hi, yeah sorry, the code does actually have the php tags on them, but might have missed them off in my post.

any other ideas before i hurl myself outta the window?

thanks!
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Re: stuck on the homepage!

Post by RobertGonzalez »

Are you getting any error messages at the moment? I am interested to see what the PHP engine is seeing.
bkm_ho
Forum Newbie
Posts: 19
Joined: Mon Feb 11, 2008 12:25 am

Re: stuck on the homepage!

Post by bkm_ho »

no, im not getting any error messages on it at all. when i type in the url into the browser, i get the user.php page that displays layout.php. i can get the layout.php to include the css if i include the whole path rather than '.ACTIVE_SITE.' etc.

im running php, apache and mysql locally at the moment and they all seem to be working fine on some other test sites/scripts that i've run.

what hinders most, is that the code that was sent to me isnt the finished site i dont think...
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Re: stuck on the homepage!

Post by RobertGonzalez »

Before the line where you are using that constant, type this little line of code:

Code: Select all

<?php if (defined('ACTIVE_SITE')) { var_dump(ACTIVE_SITE); } else { echo 'active site is not defined'; } ?>
Post back what that tells you.
bkm_ho
Forum Newbie
Posts: 19
Joined: Mon Feb 11, 2008 12:25 am

Re: stuck on the homepage!

Post by bkm_ho »

I've made this modification on user.php

Code: Select all

 
 
<?php
    session_start();
    $SECTION = '_user';
    define ('SECTION', $SECTION);
    define('INDEX', 'user.php');    
        
    require "settings.php";
 
            if (defined('ACTIVE_SITE')) { var_dump(ACTIVE_SITE); } else { echo 'active site is not defined'; }
            include 'systems/'.ACTIVE_SITE.'/templates/user/layout.php';
 
    include 'systems/'.ACTIVE_SITE.'/settings_user.php';
    
    include 'systems/'.ACTIVE_SITE.'/constants.php';
    include 'systems/'.ACTIVE_SITE.'/constants_payment.php';        
    require "lib/_include.php";
 
 
now, when user.php is displayed in the browser, there is this message:

string(7) "propmat"

which refers to settings.php. the webpage, also displays layout.php's html. everytime i click on one of the links, i get this message:

Forbidden

You don't have permission to access /www/devnet/< on this server.

devnet, is a directory i created to test code from devnetwork. i've also changed the settings_user.php

Code: Select all

 
 
<?php
    define('UNDER_DEVELOPMENT', 1); // WARNING: Set this to 0 when site is in production
    define('DB_HOST', 'localhost');
    define('DB_USER', 'xxxx');
    define('DB_PASS', 'xxxx');
    define('DB_NAME', 'propmat');
 
    define('MASTER_DOMAIN', '127.0.0.1');
    define('MASTER_NAME', 'Online Support');
    define('DOMAIN', 'http://'.MASTER_DOMAIN);   // trailing and leading "/"
    define('LOCAL_PATH', '/www/devnet/');
    define('USR_PATH', 'www/devnet/systems/'.ACTIVE_SITE.'/');
    define('PATH', '/');   // trailing and leading "/"
 
 
but I don't know if thats setup correctly.
bkm_ho
Forum Newbie
Posts: 19
Joined: Mon Feb 11, 2008 12:25 am

Re: stuck on the homepage!

Post by bkm_ho »

i've determined that both constants, ACTIVE_SITE and SITE_TEMPLATE are working fine. so there must be something else. any ideas where to start looking?
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Re: stuck on the homepage!

Post by RobertGonzalez »

Have you checked you permissions on the files?
bkm_ho
Forum Newbie
Posts: 19
Joined: Mon Feb 11, 2008 12:25 am

Re: stuck on the homepage!

Post by bkm_ho »

sorry, mr.mod...i've just been doing some research on permissions and im getting myself into a headspin. im getting all sorts of theories into what could be wrong.

Perhaps someone can point me in the right direction on where i should be looking?

i've changed the php.ini file so that it recognises short php tags (most of the code was originally written with short ones), but all that did was display an empty page in my browser. so quickly switched that back off. changed it so that it recognised %% tags, no effect.

then found htaccess file in the root directory, researched that, but all the file seems to do is rewrite some rules...(?), although it does specify an authuserfile, which i dont even know if i have or not!

tell you something, i have new found respect for developers!
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Re: stuck on the homepage!

Post by RobertGonzalez »

You shouldn't mess with the php.ini settings. Especially the tags bit. Leave the setup to accept only regular opening tags. Change the code to reflect the new requirement.
Post Reply