Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

log in error

Status
Not open for further replies.

deecee

Technical User
Aug 25, 2001
1,678
US
Heres the error

Fatal error: Call to undefined function: execute() in /usr/local/psa/home/vhosts/brandsupplier.com/httpdocs/intelistaf/TMP2ixm026zit.php on line 22

heres the site
and heres the code

<?php require_once('Connections/Intelistaf.php'); ?>
<?php require_once('includes/functions.inc.php'); ?>
<?php
// begin Recordset
$query_Intelistaf = &quot;SELECT * FROM pass&quot;;
$Intelistaf = $Intelistaf->SelectLimit($query_Intelistaf) or die($Intelistaf->ErrorMsg());
$totalRows_Intelistaf = $Intelistaf->RecordCount();
// end Recordset

// *** Start the session
session_start();
// *** Validate request to log in to this site.
$KT_LoginAction = $HTTP_SERVER_VARS[&quot;REQUEST_URI&quot;];
if (isset($HTTP_POST_VARS[&quot;user&quot;])) {
$KT_valUsername = $HTTP_POST_VARS['user'];
$KT_fldUserAuthorization = &quot;&quot;;
$KT_redirectLoginSuccess = &quot;success.php&quot;;
$KT_redirectLoginFailed = &quot;fail.php&quot;;
$KT_rsUser_Source = &quot;SELECT username, password &quot;;
if ($KT_fldUserAuthorization != &quot;&quot;) $KT_rsUser_Source .= &quot;,&quot; . $KT_fldUserAuthorization;
$KT_rsUser_Source .= &quot; FROM pass WHERE username='&quot; . $KT_valUsername . &quot;' AND password='&quot; . $HTTP_POST_VARS['pass'] . &quot;'&quot;;
$KT_rsUser=$Intelistaf->Execute($KT_rsUser_Source) or DIE($Intelistaf->ErrorMsg());
if (!$KT_rsUser->EOF) {
// username and password match - this is a valid user
$KT_Username=$KT_valUsername;
session_unregister(&quot;KT_Username&quot;);
session_register(&quot;KT_Username&quot;);
if ($KT_fldUserAuthorization != &quot;&quot;) {
$KT_userAuth=$KT_rsUser->Fields($KT_fldUserAuthorization);
} else {
$KT_userAuth=&quot;&quot;;
}
session_unregister(&quot;KT_userAuth&quot;);
session_register(&quot;KT_userAuth&quot;);
if (isset($HTTP_GET_VARS['accessdenied']) && false) {
$KT_redirectLoginSuccess = $HTTP_GET_VARS['accessdenied'];
}
$KT_rsUser->Close();
session_unregister(&quot;KT_login_failed&quot;);
session_register(&quot;KT_login_failed&quot;);
$KT_login_failed = false;
// Add code here if you want to do something if login succeded

KT_redir($KT_redirectLoginSuccess);
}
$KT_rsUser->Close();
$KT_login_failed = true;
session_unregister(&quot;KT_login_failed&quot;);
session_register(&quot;KT_login_failed&quot;);
// Add code here if you want to do something if login fails

KT_redir($KT_redirectLoginFailed);
}
//PHP ADODB document - made with PHAkt 2.0.60?>


<html>
<head>
<title>Intelistaf</title>
<meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=iso-8859-1&quot;>
<style type=&quot;text/css&quot;>
<!--
body {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
color: #000000;
}
td.right {
border-left-width: 1px;
border-left-style: dashed;
border-left-color: #999999;
}
-->
</style>
</head>

<body bgcolor=&quot;#CCCCCC&quot; leftmargin=&quot;0&quot; topmargin=&quot;0&quot; marginwidth=&quot;0&quot; marginheight=&quot;0&quot;>
<table width=&quot;100%&quot; border=&quot;0&quot; height=&quot;100%&quot;>
<tr>
<td align=&quot;CENTER&quot; valign=&quot;MIDDLE&quot;><form METHOD=&quot;post&quot; action=&quot;<?php echo $KT_LoginAction?>&quot; name=&quot;login&quot; id=&quot;login&quot;>
<table width=&quot;300&quot; border=&quot;0&quot;>
<tr align=&quot;CENTER&quot; valign=&quot;MIDDLE&quot;>
<td>Username</td>
<td class=&quot;right&quot;><input name=&quot;user&quot; type=&quot;text&quot; id=&quot;user&quot;></td>
</tr>
<tr align=&quot;CENTER&quot; valign=&quot;MIDDLE&quot;>
<td>Password</td>
<td class=&quot;right&quot;><input name=&quot;pass&quot; type=&quot;password&quot; id=&quot;pass&quot;></td>
</tr>
<tr align=&quot;CENTER&quot; valign=&quot;MIDDLE&quot;>
<td colspan=&quot;2&quot;><input name=&quot;login&quot; type=&quot;submit&quot; value=&quot;Log In&quot; id=&quot;login&quot;></td>
</tr>
</table>
</form></td>
</tr>
</table>
</body>
</html>
<?php
$Intelistaf->Close();
?>


Just one thing I'm an Econ major and have never done this before so Im learning as I go...Thanks [rockband]
whos that behind you?
 
To clarify.

Your file (the one you posted) is called &quot;TMP2ixm026zit.php&quot;, right?

If so, which of all that you posted is line 22? ______________________________________________________________________
TANSTAAFL!
 
line 22
$KT_rsUser=$Intelistaf->Execute($KT_rsUser_Source) or DIE($Intelistaf->ErrorMsg());

and the file is index.php

so i dont know where the browser got TMP2ixm026zit.php from

the pass is intelistaf and user is medical by the way...

thanks [rockband]
whos that behind you?
 
The error I'm getting reads:

Fatal error: Call to undefined function: execute() in /usr/local/psa/home/vhosts/brandsupplier.com/httpdocs/intelistaf/index.php on line 22

which makes more sense to me.

I can at this time only suggest the simple stuff. PHP is case-specific. Could the function in line 22 be &quot;execute&quot; and not &quot;Execute&quot;? ______________________________________________________________________
TANSTAAFL!
 
The problem is in this line ...
$Intelistaf = $Intelistaf->SelectLimit($query_Intelistaf) or die($Intelistaf->ErrorMsg());


here you are changing the type of the $Intelistaf var.

This is my guess as you don't provide us the class that makes the connections to the database bank.

It says that he doesn't know an execute function in that object. Asking you if the class has the Execute function could be stupid, but it's one way to check. Another is checking what's the return of the SelectLimit function i placed above. Anikin
Hugo Alexandre Dias
Web-Programmer
anikin_jedi@hotmail.com
 
heres the code from my php connection file intelistaf.php

<?php
# PHP ADODB document - made with PHAkt
# FileName=&quot;Connection_php_adodb.htm&quot;
# Type=&quot;ADODB&quot;
# HTTP=&quot;true&quot;
# DBTYPE=&quot;mysql&quot;

$MM_Intelistaf_HOSTNAME = &quot;66.45.20.60&quot;;
$MM_Intelistaf_DATABASE = &quot;mysql:intelistaf&quot;;
$MM_Intelistaf_DBTYPE = preg_replace(&quot;/:.*$/&quot;, &quot;&quot;, $MM_Intelistaf_DATABASE);
$MM_Intelistaf_DATABASE = preg_replace(&quot;/^.*:/&quot;, &quot;&quot;, $MM_Intelistaf_DATABASE);
$MM_Intelistaf_USERNAME = &quot;dcooke&quot;;
$MM_Intelistaf_PASSWORD = &quot;sf49ers1&quot;;
$MM_Intelistaf_LOCALE = &quot;Us&quot;;
$MM_Intelistaf_MSGLOCALE = &quot;En&quot;;
$MM_Intelistaf_CTYPE = &quot;P&quot;;
$KT_locale = $MM_Intelistaf_MSGLOCALE;
$KT_dlocale = $MM_Intelistaf_LOCALE;
$KT_serverFormat = &quot;%Y-%m-%d %H:%M:%S&quot;;
$QUB_Caching = &quot;false&quot;;

switch (strtoupper ($MM_Intelistaf_LOCALE)) {
case 'EN':
$KT_localFormat = &quot;%d-%m-%Y %H:%M:%S&quot;;
break;
case 'EUS':
$KT_localFormat = &quot;%m-%d-%Y %H:%M:%S&quot;;
break;
case 'FR':
$KT_localFormat = &quot;%d-%m-%Y %H:%M:%S&quot;;
break;
case 'RO':
$KT_localFormat = &quot;%d-%m-%Y %H:%M:%S&quot;;
break;
case 'IT':
$KT_localFormat = &quot;%d-%m-%Y %H:%M:%S&quot;;
break;
case 'GE':
$KT_localFormat = &quot;%d-%m-%Y %H:%M:%S&quot;;
break;
case 'US':
$KT_localFormat = &quot;%Y-%m-%d %H:%M:%S&quot;;
break;
default :
$KT_localFormat = &quot;none&quot;;
}



if (!defined('CONN_DIR')) define('CONN_DIR',dirname(__FILE__));
require_once(CONN_DIR.&quot;/../adodb/adodb.inc.php&quot;);
ADOLoadCode($MM_Intelistaf_DBTYPE);
$Intelistaf=&ADONewConnection($MM_Intelistaf_DBTYPE);

if($MM_Intelistaf_DBTYPE == &quot;access&quot; || $MM_Intelistaf_DBTYPE == &quot;odbc&quot;){
if($MM_Intelistaf_CTYPE == &quot;P&quot;){
$Intelistaf->PConnect($MM_Intelistaf_DATABASE, $MM_Intelistaf_USERNAME,$MM_Intelistaf_PASSWORD,
$MM_Intelistaf_LOCALE);
} else $Intelistaf->Connect($MM_Intelistaf_DATABASE, $MM_Intelistaf_USERNAME,$MM_Intelistaf_PASSWORD,
$MM_Intelistaf_LOCALE);
} else if($MM_Intelistaf_DBTYPE == &quot;ibase&quot;) {
if($MM_Intelistaf_CTYPE == &quot;P&quot;){
$Intelistaf->PConnect($MM_Intelistaf_HOSTNAME.&quot;:&quot;.$MM_Intelistaf_DATABASE,$MM_Intelistaf_USERNAME,$MM_Intelistaf_PASSWORD);
} else $Intelistaf->Connect($MM_Intelistaf_HOSTNAME.&quot;:&quot;.$MM_Intelistaf_DATABASE,$MM_Intelistaf_USERNAME,$MM_Intelistaf_PASSWORD);
}else {
if($MM_Intelistaf_CTYPE == &quot;P&quot;){
$Intelistaf->PConnect($MM_Intelistaf_HOSTNAME,$MM_Intelistaf_USERNAME,$MM_Intelistaf_PASSWORD,
$MM_Intelistaf_DATABASE,$MM_Intelistaf_LOCALE);
} else $Intelistaf->Connect($MM_Intelistaf_HOSTNAME,$MM_Intelistaf_USERNAME,$MM_Intelistaf_PASSWORD,
$MM_Intelistaf_DATABASE,$MM_Intelistaf_LOCALE);
}

if (!function_exists(&quot;updateMagicQuotes&quot;)) {
function updateMagicQuotes($HTTP_VARS){
if (is_array($HTTP_VARS)) {
foreach ($HTTP_VARS as $name=>$value) {
if (!is_array($value)) {
$HTTP_VARS[$name] = addslashes($value);
} else {
foreach ($value as $name1=>$value1) {
if (!is_array($value1)) {
$HTTP_VARS[$name1][$value1] = addslashes($value1);
}
}

}
global $$name;
$$name = &$HTTP_VARS[$name];
}
}
return $HTTP_VARS;
}

if (!get_magic_quotes_gpc()) {
$HTTP_GET_VARS = updateMagicQuotes($HTTP_GET_VARS);
$HTTP_POST_VARS = updateMagicQuotes($HTTP_POST_VARS);
$HTTP_COOKIE_VARS = updateMagicQuotes($HTTP_COOKIE_VARS);
}
}
?>


is this where the problem could be?? [rockband]
whos that behind you?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top