Forum Search:
phpHtmlLib
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » phpHtmlLib » Widgets » Fatal error: Call to a member function on a non-object in C:\Programme\Apache Group\Apache2\htdocs\p
Fatal error: Call to a member function on a non-object in C:\Programme\Apache Group\Apache2\htdocs\p Thu, 13 February 2003 05:34 Go to next message
schdefan  is currently offline schdefan
Messages: 44
Registered: February 2003
Member

From: 212.82.103
Thank you for changing my state of age.

Starting the following script returns error message
Fatal error: Call to a member function on a non-object in C:\Programme\Apache Group\Apache2\htdocs\p




<?php

/**
* This example illustrates the use of the
* DataList object classes. This object
* can show a list of data from any data source
* and have any GUI layout and provide the
* features of:
* searching, sorting, paging of the data.
*
* This page shows the Data coming from 2 different
* types of DB objects. One from a PEAR::DB object,
* and another from a ADODB object.
*
* $Id: widget6.php,v 1.7 2002/11/22 21:51:08 hemna Exp $
*
* @author Walter A. Boring IV <waboring@buildabetterweb.com>
* @package phpHtmlLib
* @subpackage widget-examples
* @version 2.0
*
*/

/**
* Include the phphtmllib libraries
*
*/


include_once("includes.inc");

include_once("db_defines.inc");

include_once($phphtmllib."/widgets/data_list/includes.i nc");

require_once("adodb/adodb.inc.php" );

include_once($phphtmllib."/widgets/data_list/ADODBSQLDa taListSource.inc");






/**
* This is an example that shows how to use a PEAR db object
* as the source for the data to show.
*
* @author Walter A. Boring IV <waboring@buildabetterweb.com>
* @package phpHtmlLib
* @subpackage widget-examples
* @version 2.0
*/
class adodbmssqllist extends DefaultGUIDataList {
//change the # of rows to display to 20 from 10
var $_default_rows_per_page = 20;

/**
* This function is called automatically by
* the DataList constructor. It must be
* extended by the child class to actually
* set the DataListSource object.
*
*
*/
function get_data_source() {
//build the ADODB object and connect
//to the database.
$db = &ADONewConnection('mssql'); # create a connection
$db->Connect(DB_HOSTNAME,DB_USERNAME,DB_PASSWORD,DB_NAME) ;

//create the DataListSource object
//and pass in the PEAR DB object
$source = new ADODBSQLDataListSource($db);

//set the DataListSource for this DataList
//Every DataList needs a Source for it's data.
$this->set_data_source( $source );

//set the prefix for all the internal query string
//variables. You really only need to change this
//if you have more then 1 DataList object per page.
$this->set_global_prefix("adodb_");
}






/**
* This method is used to setup the options
* for the DataList object's display.
* Which columns to show, their respective
* source column name, width, etc. etc.
*
* The constructor automatically calls
* this function.
*
*/
function user_setup() {
//add the columns in the display that you want to view.
//The API is :
//Title, width, DB column name, field SORTABLE?, field SEARCHABLE?, align
$this->add_header_item("idperson", "100", "idperson", SORTABLE,
SEARCHABLE, "left");
$this->add_header_item("person", "100", "person", SORTABLE,
SEARCHABLE,"center");
// $this->add_header_item("Time", "200", "time", SORTABLE,
// NOT_SEARCHABLE,"center");



$columns = "*";
$tables = "person p";
$where_clause = "1";
$this->_datasource->setup_db_options($columns, $tables, $where_clause);
}

/**
* This is the basic function for letting us
* do a mapping between the column name in
* the header, to the value found in the DataListSource.
*
* NOTE: this function is can be overridden
* so that you can return whatever you want for
* any given column.
*
* @param array - $row_data - the entire data for the row
* @param string - $col_name - the name of the column header
* for this row to render.
* @return mixed - either a HTMLTag object, or raw text.
*/
function build_column_item($row_data, $col_name) {
switch ($col_name) {
case "Time":
$dt = $row_data["time"];
$yr=strval(substr($dt,0,4));
$mo=strval(substr($dt,4,2));
$da=strval(substr($dt,6,2));
$hr=strval(substr($dt,8,2));
$mi=strval(substr($dt,10,2));
$obj = date("m/d/Y h:i A", mktime ($hr,$mi,0,$mo,$da,$yr));
break;
default:
$obj = DefaultGUIDataList::build_column_item($row_data, $col_name);
break;
}
return $obj;
}
}



//create the page object
$page = new HTMLPageClass("phpHtmlLib Widgets - DataList Example",
XHTML_TRANSITIONAL);

//enable output debugging.
$page->set_text_debug( $_GET["debug"] );

//add the css
$page->add_head_css( new DefaultGUIDataListCSS );



//build the ADODB list using the same exact table in the DB
//and sort by version by default
$adodblist = new adodbmssqllist("ADODB::MSSQL List", 600, "version", TRUE);

$page->add( $adodblist );

print $page->render();
?>
Re: Fatal error: Call to a member function on a non-object in C:\Programme\Apache Group\Apache2\htdo Thu, 13 February 2003 05:36 Go to previous messageGo to next message
schdefan  is currently offline schdefan
Messages: 44
Registered: February 2003
Member

From: 212.82.103
Sorry there was something missing...

Fatal error: Call to a member function on a non-object in C:\Programme\Apache Group\Apache2\htdocs\phphtmllib\widgets\data_list\ADODBSQLDa taListSource.inc on line 131
Re: Fatal error: Call to a member function on a non-object in C:\Programme\Apache Group\Apache2\htdo Thu, 13 February 2003 09:08 Go to previous messageGo to next message
schdefan  is currently offline schdefan
Messages: 44
Registered: February 2003
Member

From: 212.82.103
OK. Typing three times wrong column or table names y get the nice grid with the correct number of entries but i can see no data.
Re: Fatal error: Call to a member function on a non-object in C:\Programme\Apache Group\Apache2\htdo Fri, 14 February 2003 10:22 Go to previous messageGo to next message
phphtmllib  is currently offline phphtmllib
Messages: 776
Registered: September 2002
Location: Cool, CA
Senior Member
Administrator

From: us01.qualys.com
a couple things you can try. Make sure the db object is connecting to the DB, and u can also turn on debugging for the adodb object.


so do this



 function get_data_source() {
//build the ADODB object and connect
//to the database.
$db = &ADONewConnection('mssql'); # create a connection

//TURN ON ADODB DEBUGGING
$db->debug=TRUE;

$db->Connect(DB_HOSTNAME,DB_USERNAME,DB_PASSWORD,DB_NAME) ;
...
Fatal error: Call to a member function on a non-object Tue, 29 November 2005 07:42 Go to previous messageGo to next message
ierokomos  is currently offline ierokomos
Messages: 1
Registered: November 2005
Newbie

From: host-24-149-180-138.patmedia.net
I am getting this following error ..

Fatal error: Call to a member function render() on a non-object in /usr/local/apache2/htdocs/phphtmllib/XMLTagClass.inc on line 425
with the use of the below script (apache2 and php 5.1.1)
any suggestions are greatly appreciated.
============
<?php

/**
* This example illustrates the use of the
* VerticalCSSNavTable widget.
*
*
* $Id: widget4.php,v 1.5.2.1 2005/05/12 01:24:02 hemna Exp $
*
* @author Walter A. Boring IV <waboring@newsblob.com>
* @package phpHtmlLib
* @subpackage widget-examples
* @version 2.0
*
*/

/**
* Include the phphtmllib libraries
*
*/
include_once("includes.inc");


//create the page object
$page = new HTMLPageClass("phpHtmlLib Widgets - VerticalCSSNavTable",
XHTML_TRANSITIONAL);

//enable output debugging.
if (isset($_GET['debug'])) {
$page->set_text_debug( TRUE );
}

//add the css
$page->add_css_link( "/css/defaulttheme.php" );

//create the VerticalCSSNavTable Object
//create the widget with
//Title of 'VerticalCSSNavTable' and
//subtitle of 'Widget'
//overall width of 400 pixels ( u can use % as well )
$cssnavtable = new VerticalCSSNavTable("VerticalCSSNavTable", "Widget", 400);
$cssnavtable->add("#", "Some Link", "This is title text");
$cssnavtable->add("#", "Another");
$cssnavtable->add("#", "Another", "This is title text");

$page->add( $cssnavtable );

print $page->render();
?>
Re: Fatal error: Call to a member function on a non-object Thu, 15 December 2005 09:47 Go to previous messageGo to next message
phphtmllib  is currently offline phphtmllib
Messages: 776
Registered: September 2002
Location: Cool, CA
Senior Member
Administrator

From: adsl-66-159-224-128.dslextreme.com
what version are you using?
Re: Fatal error: Call to a member function on a non-object Wed, 16 May 2012 03:08 Go to previous messageGo to next message
haorenlaobai  is currently offline haorenlaobai
Messages: 9
Registered: May 2012
Newbie

From: 175.213.229*
2WfRCHah
I guess I really could have created christian louboutin uk or perhaps caps as an alternative, however christian louboutin sale or boots in some way encapsulated nearly all of some christian louboutin shoes i possess wanted to do being a custom. cheap christian louboutin for example are a funny and fun way to express and include the involvement of the louboutin uk in promoting the spirit of their school. They are also louboutin sale bold accessories, such as extra-large colorful wooden louboutin shoes for necklaces, earrings and bracelets alike.

A cotton shirt is great for casual use but not really a good polo ralph lauren outlet if you are really active.A particularly popular in winter, because their polo ralph lauren sale are capable of keeping the body warm. Many ralph lauren clothing put their faith in some brand. The ralph lauren online swiftly told her and the ralph lauren outlet Tops are now to be found in the whole variety of ralph lauren polo outlet which includes Dark colored, Pink, Light red, Green in addition to Deep blue.Your ralph lauren polo shirts innovative utilization of normal ralph lauren shop and technology has been created with polo ralph lauren shirts the result that it is a fun filled position. You only have to have 1 or 2 ralph lauren polo fantastic stores due to the fact most thrift polo ralph lauren restock every day or at minimum ralph lauren sale.Much less expensive selling prices is what finding ralph lauren shirts superior and extravagance to make our bedrooms seem good is cheap ralph lauren currently being a savvy shopper is all about.The other polo shirts that has carved a niche for ralph lauren in the world of fashion and sportswear and casual wear is Lacoste.
wholesale nfl jerseys suppliers Sat, 02 June 2012 01:18 Go to previous message
jerseys  is currently offline jerseys
Messages: 2
Registered: June 2012
Newbie

From: *1e100.net
A Fan's Guide to Obtaining NFL Jerseys
http://www.hotzjerseys.com/
An amaranthine quantity of pro football jerseys are awash annually worldwide. Fans acquire them to abrasion to amateur themselves even though others are accustomed as gifts. Are they popular? Yield a attending inside the stands the next time you watch a bold on Television. Often it appears added humans are cutting them than are not!
http://www.hotzjerseys.com/mlb-jerseys-houston-astros-c-29_1 47/
The NFL jersey bazaar can be a bit confusing, although, acknowledgment for the array accessible and fees involved.
Previous Topic:Celebrity dresses - dresses for stars celebrity
Next Topic:What Are Full Lace Synthetic Wigs
Goto Forum:
  


Current Time: Sun May 19 05:00:25 PDT 2013

Total time taken to generate the page: 0.24961 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.0.
Copyright ©2001-2009 FUDforum Bulletin Board Software