vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   ibProArcade Archive (https://vborg.vbsupport.ru/forumdisplay.php?f=174)
-   -   Error after editing Index.php (https://vborg.vbsupport.ru/showthread.php?t=276970)

crzyone9584 01-14-2012 08:18 PM

Error after editing Index.php
 
I'm getting the following error after I edited the index.php as the instructions tellyou to for using forum.php.

Quote:

Notice: Undefined index: module in C:\HostingSpaces\xx\wwwroot\index.php on line 3 Notice: Use of undefined constant act - assumed 'act' in C:\HostingSpaces\xxx\wwwroot\index.php on line 42 Notice: Use of undefined constant autocom - assumed 'autocom' in C:\HostingSpaces\xxx\wwwroot\index.php on line 43 Notice: Undefined index: autocom in C:\HostingSpaces\xxx\wwwroot\index.php on line 43 Notice: Use of undefined constant showuser - assumed 'showuser' in C:\HostingSpaces\xxx\wwwroot\index.php on line 44 Notice: Undefined index: showuser in C:\HostingSpaces\xxx\wwwroot\index.php on line 44
Anyone have any idea about going about and fixing this error?

Hippy 01-14-2012 10:24 PM

At the very beginning of the File, right after
----------------------------------------------------------
<?php

add the code

crzyone9584 01-15-2012 06:01 AM

I did. And this is what happened.

Hippy 01-15-2012 01:40 PM

paste over your code
leave out the top vb info in the
###########
#
#
###########

crzyone9584 01-15-2012 02:51 PM

<?php
// ibProArcade
if($_POST['module'] == "pnFlashGames")
{
require_once('./global.php');

switch($_POST['func'])
{
case "storeScore":
$_GET['act'] = "Arcade";
$_GET['module'] = "arcade";
$_GET['do'] = "pnFStoreScore";
break;

case "saveGame":
$_GET['do'] = "pnFSaveGame";
break;

case "loadGame":
$_GET['do'] = "pnFLoadGame";
break;

case "loadGameScores":
$gid = $vbulletin->input->clean_gpc('p', 'gid', TYPE_INT);
$uid= $vbulletin->userinfo['userid'];
$game = $db->query_first("SELECT * FROM " . TABLE_PREFIX . "games_scores WHERE mid=$uid AND gid = $gid ORDER BY score DESC LIMIT 0,1");
$scores = $game[score];

if($scores != false)
{
//Return true
print "&opSuccess=true&gameScores=$scores&endvar=1"; //send endvar to keep opSuccess separate from all other output from PostNuke
}
else
{
print "&opSuccess=false&error=Error&endvar=1";
}
break;
}
}

$act = $_GET[act];
$autocom = $_GET[autocom];
$showuser= $_GET[showuser];
if($act == "Arcade" || $autocom=="arcade") {
include "arcade.php";
exit();
}
if(!empty($showuser) && $showuser >= 1) {
$u = $showuser;
$_GET[u] = $showuser;
include "member.php";
exit();
}

// end of ibProArcade

/**
* If you want to move this file to the root of your website, change this
* line to your vBulletin directory and uncomment it (delete the //).
*
* For example, if vBulletin is installed in '/forum' the line should
* state:
*
* define('VB_RELATIVE_PATH', 'forum');
*
* Note: You may need to change the cookie path of your vBulletin
* installation to enable your users to log in at the root of your website.
* If you move this file to the root of your website then you should ensure
* the cookie path is set to '/'.
*
* See 'Admin Control Panel
* ->Cookies and HTTP Header Options
* ->Path to Save Cookies
*/

//define('VB_RELATIVE_PATH', 'forums');

// Do not edit.
if (defined('VB_RELATIVE_PATH'))
{
chdir('./' . VB_RELATIVE_PATH);
}

/**
* You can choose the default script here. Uncomment the appropriate line
* to set the default script. Note: Only uncomment one of these, you must
* add // to comment out the script(s) that you DO NOT want to use as your
* default script.
*
* You can choose the default script even if you do not plan to move this
* file to the root of your website.
*/

/**
* Use the CMS as the default script:
*/

require('content.php');

/**
* Use the forum as the default script:
*/

//require('forum.php');

Hippy 01-15-2012 03:16 PM

Im stumped
try this

in this line
Code:

//define('VB_RELATIVE_PATH', 'forums');
un comment it ( remove //
and add the full path to your forums root dir..
and see if that helps

did you also try with out the edit completely

Max Taxable 01-15-2012 03:23 PM

Quote:

Originally Posted by crzyone9584 (Post 2287832)
I'm getting the following error after I edited the index.php as the instructions tellyou to for using forum.php.



Anyone have any idea about going about and fixing this error?

What text editor are you using?

The plain notepad will add characters to php files you can't see but will mess up the code. Use TextEdit or another compatible text editor for editing php files. With one of these you will be able to see and remove these extra lines/characters.

Hippy 01-15-2012 03:45 PM

correct
I use editplus
for years
keeps the format of the file

Max Taxable 01-15-2012 03:50 PM

Quote:

Originally Posted by Hippy (Post 2288192)
correct
I use editplus
for years
feeks the format of the file

Excellent.

I've found this to be a lesson many don't know, thought I would bring it up.

Carry on.

crzyone9584 01-15-2012 05:56 PM

I'm not at home so I used the web browser to edit the file. I forgot about not using the right editor. Thanks for the help. I'll be home tomorrow and use notepad++ to edit the file and hopefully correct the issue.


All times are GMT. The time now is 09:54 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01246 seconds
  • Memory Usage 1,739KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete