Examples aren't working

Installation problems and solutions.

Re: Examples aren't working

Postby kumar2 on Thu Feb 04, 2010 7:11 am

hi,
i have tried with changing the database details in the common.php. but still not woking . here i have attached the common.php. file , and database user name and password. please just modify and post the common.php. so that i can cut and paste in my site.

mysqlUser = 'adminbooks';
mysqlDb ='bridge_books';
mysqlHost ='localhost';
mysqlDbPass ='kumar123';
---------------------------commom.php------------
<?php
/*
* Mysql Ajax Table Editor
*
* Copyright (c) 2008 Chris Kitchen <info@mysqlajaxtableeditor.com>
* All rights reserved.
*
* See COPYING file for license information.
*
* Download the latest version from
* http://www.mysqlajaxtableeditor.com
*/
class Common
{
// Mysql Variables
var $mysqlUser = '';
var $mysqlDb ='';
var $mysqlHost ='';
var $mysqlDbPass ='';

var $langVars;
var $dbc;

function mysqlConnect()
{
if($this->dbc = mysql_connect($this->local, $this->adminbooks, $this->kumar123))
{
if(!mysql_select_db ($this->bridge_books))
{
$this->logError(sprintf($this->langVars->errNoSelect,$this->mysqlDb),__FILE__, __LINE__);
}
}
else
{
$this->logError($this->langVars->errNoConnect,__FILE__, __LINE__);
}
}

function logError($message, $file, $line)
{
$message = sprintf($this->langVars->errInScript,$file,$line,$message);
var_dump($message);
die;
}


function displayHeaderHtml()
{
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Mate Example</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="css/table_styles.css" rel="stylesheet" type="text/css" />
<link href="css/icon_styles.css" rel="stylesheet" type="text/css" />

<script type="text/javascript" src="js/prototype.js"></script>
<script type="text/javascript" src="js/scriptaculous-js/scriptaculous.js"></script>
<script type="text/javascript" src="js/lang/lang_vars-en.js"></script>
<script type="text/javascript" src="js/ajax_table_editor.js"></script>

<!-- calendar files -->
<link rel="stylesheet" type="text/css" media="all" href="js/jscalendar/skins/aqua/theme.css" title="win2k-cold-1" />
<script type="text/javascript" src="js/jscalendar/calendar.js"></script>
<script type="text/javascript" src="js/jscalendar/lang/calendar-en.js"></script>
<script type="text/javascript" src="js/jscalendar/calendar-setup.js"></script>

</head>
<body>
<?php
}

function displayFooterHtml()
{
?>
</body>
</html>
<?php
}

}
?>
kumar2
 
Posts: 4
Joined: Thu Jan 28, 2010 11:16 am

Re: Examples aren't working

Postby amantel on Thu Feb 04, 2010 8:27 am

I`m experiencing problems at localhost.
At test site everything works alright - http://adamantes.ru/mate2/Example1.php
ie version is 8.
I think it`s something with apache/php config.

*upd* tried to use default httpd.conf - no luck
amantel
 
Posts: 2
Joined: Wed Feb 03, 2010 10:38 am

Re: Examples aren't working

Postby admin on Thu Feb 04, 2010 3:44 pm

kumar2 this is how you fill in the mysql information. You also need to run the sql to create the tables and then the examples should work.

Code: Select all
<?php
/*
* Mysql Ajax Table Editor
*
* Copyright (c) 2008 Chris Kitchen <info@mysqlajaxtableeditor.com>
* All rights reserved.
*
* See COPYING file for license information.
*
* Download the latest version from
* http://www.mysqlajaxtableeditor.com
*/
class Common
{
// Mysql Variables
var $mysqlUser = 'adminbooks';
var $mysqlDb ='bridge_books';
var $mysqlHost ='localhost';
var $mysqlDbPass ='kumar123';

var $langVars;
var $dbc;

function mysqlConnect()
{
if($this->dbc = mysql_connect($this->local, $this->adminbooks, $this->kumar123))
{
if(!mysql_select_db ($this->bridge_books))
{
$this->logError(sprintf($this->langVars->errNoSelect,$this->mysqlDb),__FILE__, __LINE__);
}
}
else
{
$this->logError($this->langVars->errNoConnect,__FILE__, __LINE__);
}
}

function logError($message, $file, $line)
{
$message = sprintf($this->langVars->errInScript,$file,$line,$message);
var_dump($message);
die;
}


function displayHeaderHtml()
{
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Mate Example</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="css/table_styles.css" rel="stylesheet" type="text/css" />
<link href="css/icon_styles.css" rel="stylesheet" type="text/css" />

<script type="text/javascript" src="js/prototype.js"></script>
<script type="text/javascript" src="js/scriptaculous-js/scriptaculous.js"></script>
<script type="text/javascript" src="js/lang/lang_vars-en.js"></script>
<script type="text/javascript" src="js/ajax_table_editor.js"></script>

<!-- calendar files -->
<link rel="stylesheet" type="text/css" media="all" href="js/jscalendar/skins/aqua/theme.css" title="win2k-cold-1" />
<script type="text/javascript" src="js/jscalendar/calendar.js"></script>
<script type="text/javascript" src="js/jscalendar/lang/calendar-en.js"></script>
<script type="text/javascript" src="js/jscalendar/calendar-setup.js"></script>

</head>
<body>
<?php
}

function displayFooterHtml()
{
?>
</body>
</html>
<?php
}

}
?>
admin
Site Admin
 
Posts: 651
Joined: Fri Jul 11, 2008 1:34 am

Re: Examples aren't working

Postby admin on Thu Feb 04, 2010 3:57 pm

amantel are you using a windows or a linux server? It seems really slow which could be causing ie to throw an error. Maybe ie times out sooner on ajax requests than other browsers?

Have you checked the mysql error logs maybe the mysql server is overloaded.

You could also uncomment line 97 in ajax_table_editor.js and it will show you exactly what is returned from the server (if anything is being returned at all).
Code: Select all
         // Un-comment to view json returned from server
         alert(transport.responseText);


Update:
I just tried your site again and I didn't get any errors.
admin
Site Admin
 
Posts: 651
Joined: Fri Jul 11, 2008 1:34 am

Re: Examples aren't working

Postby entourage on Sat Apr 10, 2010 4:44 pm

I can get Example2 to work just fine, but I cannot get Example1 to work at all and that is the one that I need for my project. It doesnt matter what browser I use I get the same error message below.

Please Help. Thnaks in advance.


There was a problem with the response text

string(402) "An error occurred in script /home/content/67/5651067/html/mate/php/AjaxTableEditor.php on line 212:
<br />There was an error executing the following query:
select id, hidden from mate_columns where mate_user_id = '4d0779f7fcf233ad97ae8d9c953d4ca3' and mate_var_prefix = 'id-employees' and mate_column = 'first_name'

mysql said:
Table 'reccheck.mate_columns' doesn't exist"
entourage
 
Posts: 5
Joined: Sat Apr 10, 2010 4:25 pm

Re: Examples aren't working

Postby admin on Sat Apr 10, 2010 5:01 pm

Run the sql that creates the mate columns table or remove the options that use the mate columns table ie ordering and hiding columns.
admin
Site Admin
 
Posts: 651
Joined: Fri Jul 11, 2008 1:34 am

Re: Examples aren't working

Postby entourage on Sat Apr 10, 2010 6:11 pm

Thank you very much, this is awsome.
entourage
 
Posts: 5
Joined: Sat Apr 10, 2010 4:25 pm

Previous

Return to Installation

Who is online

Users browsing this forum: No registered users and 1 guest