PDA

View Full Version : Everything is Gone


TruthElixirX
02-23-2005, 01:01 AM
Everything is gone. I went to go do the tempalte edits and now when I go to my forums www.punktek.com/forums

(If this works by the time you click it..ignore the style..its just for testing pruposes.:p)

Nothing shows up..its blank. What file could be causing it to do this? Or will I have to re-check everything?

Link14716
02-23-2005, 01:49 AM
I bet PHP error reporting is off so when something breaks, it just gives a blank page instead of an error message that tells what the problem is. That sucks an awful lot.

It has to be an error in the edit in either includes/init.php or global.php. I'd bet that if the admincp is affected, then it is includes/init.php, and if not it is global.php. Check over both edits and see if you made a mistake somewhere. If you can't find a mistake, post the code around and including both edits and I'll see if I can help.

Marco van Herwaarden
02-23-2005, 02:50 AM
I suggest you revert your template edit back. A blank page is in 90% of the cases a template error.

Blootix
02-23-2005, 05:29 AM
From my experience, this would be a template problem. Literally, everytime there was a blank page, it was some sort of problem with the templates.

TruthElixirX
02-23-2005, 10:37 AM
So if would I be able to turn on error reporting?


EDIT:: I got error reporting on, but its fixed to where only the admin of the server can view it. Thanks for the suggestions though guys.


EDIT2:: here is the bad coding and error:

// ################################################## ###########################
// build $logincode template
$logincode = construct_login_code();
// ## <ucs>
// Unserialize uShop Actions.
$storeactions = unserialize($datastore['utt_store_act']);

// Make a list of the all the actions...
foreach ($storeactions as $actionid => $theaction) {
if ($theaction['active'] == "1") {
$allowed = explode(",", $theaction['allowedgroups']);
foreach ($allowed as $allow) {
if (is_member_of(array('userid'=>$bbuserinfo['userid'], 'usergroupid'=>$bbuserinfo['usergroupid'], 'membergroupids'=>$bbuserinfo['membergroupids']), $allow)) {
$canenter = "1";
}
}
$denied = explode(",", $theaction['deniedgroups']);
foreach ($denied as $deny) {
if (is_member_of(array('userid'=>$bbuserinfo['userid'], 'usergroupid'=>$bbuserinfo['usergroupid'], 'membergroupids'=>$bbuserinfo['membergroupids']), $deny)) {
unset($canenter);
}
}
if (!isset($canenter)) {
$canenter = "0";
}
if (THIS_SCRIPT == 'ushop') {
if ($canenter == 1) {
$action1[$actionid] = $theaction;
}
if ($theaction['showinstore'] == 1) {
(isset($actioncount) ? $actioncount++ : $actioncount = "1");
}
}
if ($canenter == 1 && $theaction['showinstore'] == 1) {
eval('$ushop_navbar .= "' . fetch_template('navbar_uttstore_actions') . '";');
}
}
}
// The end all solution.
unset($theaction);
unset($storeactions);
if (THIS_SCRIPT == 'ushop') {
$storeactions = $action1;
}
unset($action1);
// ## </ucs>
if (DB_QUERIES)
{
$pageendtime = microtime();
$starttime = explode(' ', $pagestarttime);
$endtime = explode(' ', $pageendtime);
$aftertime = $endtime[0] - $starttime[0] + $endtime[1] - $starttime[1];
echo "End call of global.php: $aftertime\n";
echo "\n<hr />\n\n";
}

Error: Warning: Invalid argument supplied for foreach() in /global.php on line 682

Zachery
02-23-2005, 11:46 AM
So if would I be able to turn on error reporting?


EDIT:: I got error reporting on, but its fixed to where only the admin of the server can view it. Thanks for the suggestions though guys.


EDIT2:: here is the bad coding and error:

// ################################################## ###########################
// build $logincode template
$logincode = construct_login_code();
// ## <ucs>
// Unserialize uShop Actions.
$storeactions = unserialize($datastore['utt_store_act']);

// Make a list of the all the actions...
foreach ($storeactions as $actionid => $theaction) {
if ($theaction['active'] == "1") {
$allowed = explode(",", $theaction['allowedgroups']);
foreach ($allowed as $allow) {
if (is_member_of(array('userid'=>$bbuserinfo['userid'], 'usergroupid'=>$bbuserinfo['usergroupid'], 'membergroupids'=>$bbuserinfo['membergroupids']), $allow)) {
$canenter = "1";
}
}
$denied = explode(",", $theaction['deniedgroups']);
foreach ($denied as $deny) {
if (is_member_of(array('userid'=>$bbuserinfo['userid'], 'usergroupid'=>$bbuserinfo['usergroupid'], 'membergroupids'=>$bbuserinfo['membergroupids']), $deny)) {
unset($canenter);
}
}
if (!isset($canenter)) {
$canenter = "0";
}
if (THIS_SCRIPT == 'ushop') {
if ($canenter == 1) {
$action1[$actionid] = $theaction;
}
if ($theaction['showinstore'] == 1) {
(isset($actioncount) ? $actioncount++ : $actioncount = "1");
}
}
if ($canenter == 1 && $theaction['showinstore'] == 1) {
eval('$ushop_navbar .= "' . fetch_template('navbar_uttstore_actions') . '";');
}
}
}
// The end all solution.
unset($theaction);
unset($storeactions);
if (THIS_SCRIPT == 'ushop') {
$storeactions = $action1;
}
unset($action1);
// ## </ucs>
if (DB_QUERIES)
{
$pageendtime = microtime();
$starttime = explode(' ', $pagestarttime);
$endtime = explode(' ', $pageendtime);
$aftertime = $endtime[0] - $starttime[0] + $endtime[1] - $starttime[1];
echo "End call of global.php: $aftertime\n";
echo "\n<hr />\n\n";
}

Error: Warning: Invalid argument supplied for foreach() in /global.php on line 682
Did you run the installer. or use dreamweaver ? :) (matts going to bash me but ffs its the biggest error made)

TruthElixirX
02-23-2005, 12:58 PM
I didn't use dreamweaver and I haven't ran the installer yet; I thought you did that after the modifications to the templates and files. Did I read the instructions wrong?

Zachery
02-23-2005, 01:02 PM
I didn't use dreamweaver and I haven't ran the installer yet; I thought you did that after the modifications to the templates and files. Did I read the instructions wrong?
Hm, suppose we should change that, but yes, run the installer now, you are going to need to inorder for everything to function right.

Deaths
02-23-2005, 01:04 PM
I would suggest running the installer now...

TruthElixirX
02-23-2005, 07:38 PM
hahahaha. Nice. *feels stupid*. Thanks guys.

Link14716
02-23-2005, 08:32 PM
Yep, the installer must be ran before the file modifications, or at least the global.php edit. ;)