View Single Post
  #143  
Old 02-05-2013, 08:01 PM
Kingmen30264
Hill Giant
 
Join Date: Sep 2006
Posts: 112
Default

Quote:
index.php

Code:
<?php

phpinfo();

?>
I did that, and all I keep seeing is the what is written in the php file in the browser. When I do /localhost/index.html.en it loads and shows me a page from apache that says "This page is here because the site administrator has changed the configuration...." So I am guessing that means that my apache is working?

Quote:
if it doesn't work, something is wrong with your apache/php installation or configuration and it has nothing to do with the editor.
When I installed PHP, it asked me what I wanted it to install under the extensions and I told it to install what was defaulted out, expect for the first one which was PHP and in the tree it was "associate all *.php files with php" which I told it to install that as well.

Then it asked me what kind of server did I want to install, IIS FastCGI, CGI, or No server, in which I selected CGI as IIS FastCGI told me to go to some server config and change some values and I didn't know where it was talking about.
After that, I just installed the rest of the program as normal following the prompts and when it was done, it closed.

I am still confused with the last line of the instructions, "Open up index.php in your web browser"... Does this mean for me to click on Index.php and load it like that, or am I supposed to click File>Open>Index.php, or do I simply add only the index.php in apache2/htdocs directory, or do I add the entire folder, and source it from there by entering /localhost/peqedit/index.php?

Here is what my index.php looks like:

Code:
#!C:/php/php.exe
<?php

phpinfo();

?>

$current_revision = "r358";

require_once("config.php");
require_once("lib/logging.php");
require_once("classes/mysql.php");
require_once("classes/template.php");
require_once("classes/session.php");
require_once("lib/common.php");
require_once("lib/data.php");

$editor = (isset($_GET['editor']) ? $_GET['editor'] : '');
$action = (isset($_GET['action']) ? $_GET['action'] : 0);
$npcid = (isset($_GET['npcid']) ? $_GET['npcid'] : null);
$z = (isset($_GET['z']) ? $_GET['z'] : '');
$zoneid = (isset($_GET['zoneid']) ? $_GET['zoneid'] : '');
$fid = (isset($_GET['fid']) ? $_GET['fid'] : '');
$tskid = (isset($_GET['tskid']) ? $_GET['tskid'] : '');
$ts = (isset($_GET['ts']) ? $_GET['ts'] : '');
$rec = (isset($_GET['rec']) ? intval($_GET['rec']) : '0');
$spellset = (isset($_GET['spellset']) ? $_GET['spellset'] : '');
$playerid = (isset($_GET['playerid']) ? $_GET['playerid'] : null);
$acctid = (isset($_GET['acctid']) ? $_GET['acctid'] : null);
$guildid = (isset($_GET['guildid']) ? $_GET['guildid'] : null);
$aaid = (isset($_GET['aaid']) ? $_GET['aaid'] : null);

$searchbar = '';
$body = '';
$javascript = '';
$breadcrumbs = '';
$headbar = '';

require_once('lib/headbars.php');
require_once('lib/breadcrumbs.php');

if (isset($_GET['admin'])) {
  if (session::is_admin()) {
    require_once('lib/admin.php');
  }
}

switch ($editor) {
  case '':
    $body = new Template("templates/intro.tmpl.php");
    $body->set('current_revision', $current_revision);
    break;
  case 'loot':
    require_once('lib/loot.php');
    break;
  case 'npc':
    require_once('lib/npc.php');
    break;
  case 'spawn':
    require_once('lib/spawn.php');
    break;
  case 'merchant':
    require_once('lib/merchant.php');
    break;
  case 'faction':
    require_once('lib/faction.php');
    break;
  case 'spellset':
    require_once('lib/spellset.php');
    break;
  case 'tradeskill':
    require_once('lib/tradeskill.php');
    break;
  case 'zone':
    require_once('lib/zone.php');
    break;
  case 'misc':
    require_once('lib/misc.php');
    break;
  case 'server':
    require_once('lib/server.php');
    break;
  case 'adventures':
    require_once('lib/adventures.php');
    break;
  case 'tasks':
    require_once('lib/tasks.php');
    break;
  case 'items':
    require_once('lib/items.php');
    break;
  case 'player':
    require_once('lib/player.php');
    break;
  case 'spells':
    require_once('lib/spellenums.php');
    require_once('lib/spells.php');
    break;
  case 'spellops':
    require_once('lib/spellops.php');
    break;
  case 'account':
    require_once('lib/account.php');
    break;
  case 'guild':
    require_once('lib/guild.php');
    break;
  case 'mail':
    require_once('lib/mail.php');
    break;
  case 'aa':
    require_once('lib/aa.php');
    break;
  case 'qglobal':
    require_once('lib/qglobal.php');
    break;
  case 'util':
    require_once('lib/util.php');
    break;
  case 'altcur':
    require_once('lib/altcur.php');
    break;
  case 'quest':
    require_once('lib/quest.php');
    break;
}

$tmpl->set('javascript', $javascript);
$tmpl->set('headbar', $headbar);
$tmpl->set('searchbar', $searchbar);
$tmpl->set('breadcrumbs', $breadcrumbs);
$tmpl->set('body', $body);

echo $tmpl->fetch('templates/index.tmpl.php');

?>
And here is what my Config.php looks like:

Code:
<?php

// Database Information:
$dbhost = 'localhost';
$dbuser = 'root';
$dbpass = '********';
$db = 'peq';

/*  Limit zone lists to a specified expansion
 *  (i.e. setting $expansion_limit to 2 would cause only Classic and Kunark zones
 *  to appear in zone drop-down lists)
 *    1 = EQ Classic
 *    2 = Kunark
 *    3 = Velious
 *    4 = Luclin
 *    5 = Planes of Power
 *    6 = Legacy of Ykesha
 *    7 = Lost Dungeons of Norrath
 *    8 = Gates of Discord
 *    9 = Omens of War
 *    10 = Dragons of Norrath
 *    11 = Depths of Darkhollow
 *    12 = Prophecy of Ro
 *    13 = The Serpents Spine
 *    14 = The Buried Sea
 *    15 = Secrets of Faydwer
 *    16 = Seeds of Destruction
 *    17 = Underfoot
 *    18 = House of Thule
 *    19 = Veil of Alaris
 *    20 = Rain of Fear
 *    99 = Other
 */
$expansion_limit = 20;

// How NPCs are listed. 1 = by NPCID (zoneidnumber*1000), 2 = By spawn2 entry
$npc_list = 1;

// Spawngroup list limit. Limits how many spawngroups are displayed as result of a Coord/NPC search. Specific NPC lists are not effected.
$spawngroup_limit = 150;

// Dont want to have to type the username and password every time you start the editor?
// Set the two variables below to the values you want to be in the form when you start it up.
// (default login: admin  pw: password)
$login = '';
$password = '';

// Log SQL queries:  1 = on, 0 = off
$logging = 1;

// $log_file = path to the file your sql logs will be saved in.
// If you want a single log file, uncomment next line and comment the two monthly log options.
//$log_file = "logs/sql_log.sql";

// Automatically create new logs monthly.
$filetime = date("m-Y");
$log_file = "logs/sql_log_$filetime.sql";

// Log all MySQL queries (If disabled only write entries are logged - recommended.)
$log_all = 0;

// Log all MySQL queries that result in an error.
$log_error = 0;

// Enable or disable user logins.
$enable_user_login = 1;

// Enable or disable read only guest mode log in.
$enable_guest_mode = 1;

// Path for quests without trailing slash.
$quest_path = "/home/administrator/run/quests"

?>
I am not sure how to tell if the PHP program is installed properly.

I am kind of curious as to why it keeps showing the lines of code when I do /localhost/index.php


Thanks,
Kingmen
Reply With Quote