Jump to content

Registration / Adding Fleet / Adding Airports Errors


COAVA0001

Recommended Posts

I have received reports that when a user tries to register with the site it gives them the following error: Unknown column 'lastip' in 'field list'

Also,

When i try to add an aircraft i fill out all of the fields correctly and it says "There is an Error when adding aircraft"

Lastly,

When I try to add an Airport it adds but i can not see it in the Add/Edit Airport page.

If anyone knows how to fix this that would be great.

Thanks,

Austin C

COAVA CEO

Link to comment
Share on other sites

Ok, This is what is inside the checkdb.php

<?php

include '../core/codon.config.php';

?>

<html>

<head>

<title>phpVMS Install Checker</title>

<style>

body { font-family: "Lucida Grande" , Verdana, Geneva, Sans-serif; font-size: 11px; line-height: 1.8em; }

span { font-weight: bold; }

.style1 { color: #F60; font-size: x-large; filter: DropShadow(Color=#000, OffX=5, OffY=5, Positive=10); }

.style2 { font-size: small; }

</style>

</head>

<body>

<strong><span class="style1">phpVMS</span> <span class="style2">Virtual Airline Administration Software</span></strong><br />

<strong>Database Check</strong>

<br /><br />

<?php

function error($title, $txt)

{

echo "<span style=\"color: red\">[{$title}]</span> {$txt}";

}

function success($title, $txt)

{

echo "<span style=\"color: #006600\">[{$title}]</span> {$txt}";

}

/* Check database */

$db = simplexml_load_file(dirname(__FILE__).'/structure.xml');

foreach($db->database->table_structure as $table)

{

$tablename = str_replace('phpvms_', TABLE_PREFIX, $table['name']);

echo "<strong>Checking {$tablename}...</strong>";

DB::query('SELECT * FROM '.$tablename.' WHERE 1=1 LIMIT 1');

if(DB::$errno == '1146')

{

echo '<br >';

error('ERROR', "The table <strong>{$tablename}</strong> is missing!<br /><br />");

continue;

}

/* loop through all the columns returned by the above query and all the columns

from the fields in the xml file, and make sure they all match up, with the

fieldlist from the xml being the "master" outside loop which it looks up against */

$anyerrors = false;

$colinfo = DB::$DB->col_info;

foreach($table->field as $field)

{

$found = false;

foreach($colinfo as $column)

{

if($column->name == $field['Field'])

{

$found = true;

break;

}

}

if($found == false)

{

echo '<br > ';

error('ERROR', "The column <strong>{$field['Field']}</strong> is missing!");

$anyerrors = true;

}

}

if($anyerrors == false)

{

echo 'OK';

}

echo '<br />';

}

?>

</body>

</html>

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...