Installation Trouble

A place to discuss and receive support for the Web Auction application.

Postby Wade » Tue Jun 19, 2007 8:47 am

Hi there, I'm trying to install Web Auction and I keep getting an error while trying to access the web_auction\index.php

The error is:
Fatal error: Call to undefined function mysql_connect() in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\dataface\Dataface\Application.php on line 202

I've completely deleted and reinstalled dataface and webauction but no luck. Anyone have any ideas?

I need to get something working soon, we are hosting an internal auction for charity and the deadline is coming up quickly.

Thanks in advance!

Wade
Wade
 
Posts: 6
Joined: Wed Dec 31, 1969 5:00 pm

Postby shannah » Tue Jun 19, 2007 10:34 am

Hi Wade,

It looks like you need to install the mysql.dll file on your PHP install in order to work with MySQL.Ê See http://php.net/mysql for instructions on how to do this.Ê (Read the "Installation on Windows Systems" sectionÊ for "PHP 5+" for info on this.

Let me know how it goes.

-steve

--
Steve Hannah
@shannah78 (on twitter)
sjhannah.com blog
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby Wade » Tue Jun 19, 2007 11:29 am

I ended up installing the latest PHP version available for download, and it appears to solve that problem. But now I get a blank page when i try to load either the index.php or install.php

I'm going to try the manual config, and will post on how it goes.

Cheers
Wade
 
Posts: 6
Joined: Wed Dec 31, 1969 5:00 pm

Postby Wade » Tue Jun 19, 2007 11:33 am

Doing a manual config and trying to load the install.php results in:
The installer cannot be run because the application has already been installed.

loading index.php results in:
* Created: December 14, 2005 * * Description: * ------------ * A Procedural API to the Dataface framework. This is designed to same developers * time trying to figure out what all the classes are and what they do. This api * provides functions to access all importand aspects of the framework. * */ if ( !defined( 'DATAFACE_PUBLIC_API_LOADED' ) ){ define('DATAFACE_PUBLIC_API_LOADED', true); /** * Initializes the dataface framework. */ function df_init($site_path, $dataface_url, $conf=null){ require_once dirname(__FILE__).'/init.php'; init($site_path, $dataface_url); import( 'PEAR.php'); import( 'Dataface/Application.php'); $app =& Dataface_Application::getInstance($conf); } function &df_create_new_record_form($table, $fields=null){ import( 'Dataface/QuickForm.php'); $form =& Dataface_QuickForm::createNewRecordForm($table, $fields); return $form; } function &df_create_edit_record_form(&$table, $fields=null){ import('Dataface/QuickForm.php'); $form =& Dataface_QuickForm::createEditRecordForm($table, $fields); return $form; } function &df_create_new_related_record_form(&$record, $relationshipName, $fieldNames=null){ import( 'Dataface/ShortRelatedRecordForm.php'); $form =& new Dataface_ShortRelatedRecordForm($record,$relationshipName,'', $fieldNames); return $form; } function &df_create_existing_related_record_form(&$record, $relationshpName){ import( 'Dataface/ExistingRelatedRecordForm.php'); $form =& new Dataface_ExistingRelatedRecordForm($record, $relationshipName); return $form; } function &df_create_import_form(&$table, $relationshipName=null){ import( 'Dataface/ImportForm.php'); $form =& new Dataface_ExistingRelatedRecordForm($record, $relationshipName); return $form; } function &df_create_search_form($tablename, $query=array(), $fields=null){ import( 'Dataface/SearchForm.php'); $app =& Dataface_Application::getInstance(); $form =& new Dataface_SearchForm($tablename, $app->db(), $query, $fields); return $form; } function &df_get_records($table, $query=null, $start=null, $limit=null){ import( 'Dataface/QueryTool.php'); $app =& Dataface_Application::getInstance(); if ( $query === null and $start === null and $limit === null ){ $queryTool =& Dataface_QueryTool::loadResult($table); } else { if ( $query === null or !$query ) $query = array(); if ( $start !== null ) $query['-start'] = $start; if ( $limit !== null ) $query['-limit'] = $limit; $queryTool =& new Dataface_QueryTool($table, null, $query); } $queryTool->loadSet(); $it =& $queryTool->iterator(); return $it; } function &df_get_records_array($table, $query=null, $start=null, $limit=null){ $records = array(); $it = df_get_records($table,$query,$start,$limit); if ( PEAR::isError($it) )return $it; while ($it->hasNext()){ $records[] = $it->next(); } return $records; } function &df_get_table_info($tablename){ import( 'Dataface/Table.php'); $table =& Dataface_Table::loadTable($tablename); return $table; } function &df_get_record($table, $query, $io=null){ import( 'Dataface/Record.php'); import( 'Dataface/IO.php'); $record =& new Dataface_Record($table, array()); if ( !isset($io) ){ $io =& new Dataface_IO($table); } $res = $io->read($query, $record); if ( PEAR::isError($res) ) { $null = null; return $null; } return $record; } function &df_get_record_by_id($id){ list($table,$query) = explode('?', $id); if ( !isset($table) || !isset($query)) trigger_error("df_get_record_by_id expects an id of a specific form, but received ".$id); @list($table, $relationship) = explode('/', $table); $params = explode('&',$query); $params2 = array(); foreach ($params as $param){ list($key,$val) = explode('=', $param); $params2[urldecode($key)] = urldecode($val); } if ( !isset($relationship) ){ // This is just requesting a normal record. $record =& df_get_record($table, $params2); return $record; } else { $primary_params = array(); $related_params = array(); foreach ($params2 as $key=>$val){ @list($key1,$key2) = explode('::',$key); if ( !isset($key2) ){ $primary_params[$key1] = $val; } else { $related_params[$key2] = $val; } } if ( count($related_params) > 0 ){ $sql = array(); foreach ($related_params as $k=>$v){ $sql[] = "`{$k}`='{$v}'"; } $sql = implode(' and ', $sql); } $record =& df_get_record($table, $primary_params); if ( !$record ) return PEAR::raiseError("Could not find any records matching the query"); $related_records =& $record->getRelatedRecordObjects($relationship, 0,1, $sql); if ( count($related_records) == 0 ){ return PEAR::raiseError("Could not find any related records matching the query: $sql"); } return $related_records[0]; } } function df_get_selected_records($query){ if ( isset($query['--selected-ids']) ){ $selected = $query['--selected-ids']; } else if ( isset($query['-selected-ids']) ){ $selected = $query['-selected-ids']; } else { return array(); } $ids = explode("\n", $selected); $records = array(); foreach ($ids as $id){ $records[] = df_get_record_by_id($id); } return $records; } function df_save_record(&$record, $keys=null, $lang=null){ import( 'Dataface/Record.php'); import( 'Dataface/IO.php'); $io =& new Dataface_IO($record->_table->tablename); if ( isset($lang) ) $io->lang = $lang; return $io->write($record, $keys); } function &df_get_valuelist($tablename, $valuelistname){ $table =& df_get_table($tablename); $vl =& $table->getValuelist(); return $vl; } function &df_get_relationship_info($tablename, $relationshipname){ $table =& df_get_table_info($tablename); $relationship =& $table->getRelationship($relationshipname); return $relationship; } function df_register_skin($name, $template_dir){ import( 'Dataface/SkinTool.php'); $st =& Dataface_SkinTool::getInstance(); $st->register_skin($name, $template_dir); } function df_display($context, $template_name){ import( 'Dataface/SkinTool.php'); $st =& Dataface_SkinTool::getInstance(); return $st->display($context, $template_name); } function df_config_get($varname){ $app =& Dataface_Application::getInstance(); return $app->_conf[$varname]; } function df_config_set($varname, $value){ $app =& Dataface_Application::getInstance(); $app->_conf[$varname] = $value; } function df_db(){ $app =& Dataface_Application::getInstance(); return $app->_db; } function df_query($sql){ import('Dataface/DB.php'); $db =& Dataface_DB::getInstance(); return $db->query($sql); } function df_insert_id(){ import('Dataface/DB.php'); $db =& Dataface_DB::getInstance(); return $db->insert_id(); } function df_translate($id, $default=null, $params=array()){ return Dataface_LanguageTool::translate($id,$default,$params); } function df_check_permission($permission, &$object, $params=array() ){ return Dataface_PermissionsTool::checkPermission($permission, $object, $params); } function df_permission_names_as_array(&$perms){ $ptool =& Dataface_PermissionsTool::getInstance(); return $ptool->namesAsArray($perms); } function df_permission_names_as_string(&$perms){ $ptool =& Dataface_PermissionsTool::getInstance(); return $ptool->namesAsString($perms); } function df_block($params){ $app =& Dataface_Application::getInstance(); $query =& $app->getQuery(); if ( isset($params['table']) ) $table =& Dataface_Table::loadTable($params['table']); else if ( isset($params['record']) ) $table =& $params['record']->_table; else $table =& Dataface_Table::loadTable($query['-table']); if ( isset($params['name']) ) $name = $params['name']; else trigger_error('No name specified for block. '.Dataface_Error::printStackTrace(), E_USER_ERROR); unset($params['name']); unset($params['table']); return $table->displayBlock($name, $params); } function df_translation_warning(&$record, $language=null){ import('Dataface/TranslationTool.php'); $tt =& new Dataface_TranslationTool(); $tt->printTranslationStatusAlert($record, $language); } function df_editable($content, $id){ $skinTool =& Dataface_SkinTool::getInstance(); return $skinTool->editable(array('id'=>$id), $content, $skinTool); } function df_offset($date){ $date = strtotime($date); $offset = (strftime("%j")+strftime("%Y")*365)- (strftime("%j",$date)+strftime("%Y",$date)*365); if ($offset>7){ $offset = (strftime("%V")+strftime("%Y")*52)- (strftime("%V",$date)+strftime("%Y",$date)*52); $end=($offset!=0?($offset>1?$offset . " weeks ago":"a week ago"):"Today"); } else $end=($offset!=0?($offset>1?"$offset days ago":"Yesterday"):"Today"); return strftime("%A, %B %e, %Y",$date)." - ". $end; } } // end if ( !defined( DATAFACE_PUBLIC_API_LOADED ) ){ ?>
Wade
 
Posts: 6
Joined: Wed Dec 31, 1969 5:00 pm

Postby shannah » Tue Jun 19, 2007 11:50 am

Hi Wade,

OK.. one last thing that you have to do is enable the short_open_tag in your php.ini file.Ê

i.e. set

short_open_tag=1

See http://php.net/ini.core for more info about short_open_tag

-Steve

--
Steve Hannah
@shannah78 (on twitter)
sjhannah.com blog
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby Wade » Tue Jun 19, 2007 3:27 pm

Steve, got it. thanks.

One final question if I could, is there somewhere I need to configure the e-mail settings for outbid notifications? Everything is working great, just no outbid notices...

Cheers and thanks!!
Wade
 
Posts: 6
Joined: Wed Dec 31, 1969 5:00 pm

Postby Wade » Tue Jun 19, 2007 3:46 pm

Nope, never mind I see the other thread about notifications and will try that first.
Wade
 
Posts: 6
Joined: Wed Dec 31, 1969 5:00 pm

Postby Wade » Tue Jun 19, 2007 3:56 pm

Yep, that was the ticket. Setup some parameters in the php.ini (and set the name in the conf.ini)

Perfect, Thanks for sharing this awesome program Steve!!
Wade
 
Posts: 6
Joined: Wed Dec 31, 1969 5:00 pm

Postby shannah » Tue Jun 19, 2007 4:04 pm

Glad to hear you got it working!

--
Steve Hannah
@shannah78 (on twitter)
sjhannah.com blog
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm


Return to Web Auction Discussion

Who is online

Users browsing this forum: No registered users and 25 guests

Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved