php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #36933 Fatal error: Function name must be a string in line no 1600 in smarty.class.ph
Submitted: 2006-03-31 16:11 UTC Modified: 2006-04-04 07:09 UTC
Votes:2
Avg. Score:5.0 ± 0.0
Reproduced:0 of 2 (0.0%)
From: sudha_seeni at yahoo dot co dot in Assigned:
Status: Not a bug Package: Unknown/Other Function
PHP Version: 5.1.2 OS: windows xp
Private report: No CVE-ID: None
 [2006-03-31 16:11 UTC] sudha_seeni at yahoo dot co dot in
Description:
------------
php 5.1.1,mysql 5.0.18,windows xp,xampp 1.5.1

see i have installed xampp 1.5.1 which itself has mysql,phpmyadmin..
i have installed smarty also.

i store my php file in c:\program files\xampp\htdocs.my friend has forwarded a php project which is in  a folder leadtrac_project.
so this one i have copied and pasted in  c:\program files\xampp\htdocs i.e it will be  as c:\program files\xampp\htdocs\leadtrac_project.

i have to open in browser as http://localhost/leadtrac_project/index.php.for this i am getting a error:-
Fatal error: Function name must be a string in line no 1600 in smarty.class.php

in leadtrac_project folder there is a include folder which has config.inc file
where the part of  coding   is:


elseif($HTTP_HOST == 'localhost')
{
    $configVars['siteBaseUrl'] = 'http://localhost/leadtrac/';
   $configVars['siteBasePath']='C:\\Program Files\\Apache Group\\Apache\\htdocs\\leadtrac\\';   
   $dbConfig['dbhost'] = 'localhost';
   $dbConfig['dbname'] = 'leadtrac_db2';
   $dbConfig['dbuser'] = 'root';
   $dbConfig['dbpass'] = '';
   $dbConfig['dbType'] = 'mysql';
   $configVars['dncCode'] ='8a8s5t6u9d6n4c8'; 
   //absolute path to smarty
   require('C:\\Satish\\PHP_DOCS\\smarty\\Smarty-2.6.10\\libs\\Smarty.class.php');

}

what i have changed is :- is sitebaseurl,sitebasepath,absolute path to smarty

elseif($HTTP_HOST == 'localhost')
{     
   $configVars['siteBaseUrl'] = 'http://localhost/leadtrac_project/';
  $configVars['siteBasePath']='C:\\Program Files\\xampp\\htdocs\\leadtrac_project\\';   
   $dbConfig['dbhost'] = 'localhost';
   $dbConfig['dbname'] = 'leadtrac_db2';
   $dbConfig['dbuser'] = 'root';
   $dbConfig['dbpass'] = '';
   $dbConfig['dbType'] = 'mysql';
   $configVars['dncCode'] ='8a8s5t6u9d6n4c8'; 
   //absolute path to smarty  
require('C:\Program Files\xampp\php\pear\PhpDocumentor\phpDocumentor\Smarty-2.5.0\libs\Smarty.class.php');

}
after changing and running this error comes what to do








Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-03-31 16:42 UTC] bjori@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc.

If possible, make the script source available online and provide
an URL to it here. Try to avoid embedding huge scripts into the report.


 [2006-03-31 16:48 UTC] tony2001@php.net
Issues of applications written in PHP are apparently not PHP bugs.
 [2006-04-03 07:39 UTC] sudha_seeni at yahoo dot co dot in
<?php
set_time_limit ( 0 );
error_reporting(E_ALL ^ E_NOTICE);
ini_set ('display_errors', true);

global $queryCount;
$queryCount = 0;

$configVars['imageCreation'] = 0;
$configVars['system_design'] = 0;
$configVars['system_configurator'] = 0;

$HTTP_HOST = $_SERVER['HTTP_HOST'];

$port = $_SERVER['SERVER_PORT'];
if($HTTP_HOST == 'localhost')
{
  // $configVars['siteBaseUrl'] = 'http://localhost/leadtrac/';
  // $configVars['siteBasePath']='C:\\Program Files\\Apache Group\\Apache\\htdocs\\leadtrac\\';
       $configVars['siteBaseUrl'] = 'http://localhost/leadtrac_project/';
   $configVars['siteBasePath']='C:\\Program Files\\xampp\\htdocs\\leadtrac_project\\';
   $dbConfig['dbhost'] = 'localhost';
   $dbConfig['dbname'] = 'leadtrac_db2';
   $dbConfig['dbuser'] = 'root';
   $dbConfig['dbpass'] = 'pass';
   $dbConfig['dbType'] = 'mysql';
   $configVars['dncCode'] ='8a8s5t6u9d6n4c8'; 
   //absolute path to smarty
   //require('C:\\Satish\\PHP_DOCS\\smarty\\Smarty-2.6.10\\libs\\Smarty.class.php');
require('C:\Program Files\xampp\php\pear\PhpDocumentor\phpDocumentor\Smarty-2.5.0\libs\Smarty.class.php');
}
$configVars['admin'] = 'admin/';
$configVars['user'] = '';
$configVars['system'] = 'system/';
$configVars['leads'] = 'leads/';
//$configVars['ecommerce'] = 'shopping/';
$configVars['magicFile'] = 'index.php';  // the file that handles all the $actions.z

$configVars['include'] = 'include/';
$configVars['includeDirectory']=$configVars['siteBasePath'].$configVars['include'];


/*
*/
include($configVars['includeDirectory'].'PHP_timer.class.php');
$leadtracTimer = new PHP_timer();
$leadtracTimer->start();



$isMobile = false;
include($configVars['includeDirectory'].'myMobile.php');

//$isMobile = true;

if($isMobile)
{
$configVars['templates'] = 'mobileTemplates/';
$configVars['templates_c'] = 'mobileTemplates_c/';
$configVars['adminTemplates_c'] = 'adminTemplates_c/';
}
else
{
$configVars['templates'] = 'templates/';
$configVars['templates_c'] = 'templates_c/';
$configVars['adminTemplates_c'] = 'adminTemplates_c/';
}


$configVars['images'] = 'images/';



$configVars['htmlAreaUrl'] = $configVars['siteBaseUrl'].'htmlarea/';

$configVars['smartyDirectory']=$configVars['siteBasePath'].'smarty/';
$configVars['pearDirectory']=$configVars['siteBasePath'].'pear/';

$configVars['compiledTemplatesDirectory'] = $configVars['siteBasePath'].$configVars['templates_c'];
$configVars['adminCompiledTemplatesDirectory'] = $configVars['siteBasePath'].$configVars['adminTemplates_c'];

$configVars['loginUrl'] = $configVars['siteBaseUrl'].'index.php?page=login';
$configVars['commonTemplates'] = $configVars['siteBasePath'].$configVars['templates'];

$configVars['adminBaseUrl'] = $configVars['siteBaseUrl'].$configVars['admin'];
$configVars['adminBasePath'] = $configVars['siteBasePath'].$configVars['admin'];
$configVars['adminTemplates'] = $configVars['siteBasePath'].$configVars['admin'].$configVars['templates'];
$configVars['adminSystemBaseUrl'] = $configVars['siteBaseUrl'].$configVars['admin'].$configVars['system'];
$configVars['adminSystemBasePath'] = $configVars['siteBasePath'].$configVars['admin'].$configVars['system'];
$configVars['adminLeadsBaseUrl'] = $configVars['siteBaseUrl'].$configVars['admin'].$configVars['leads'];
$configVars['adminLeadsBasePath'] = $configVars['siteBasePath'].$configVars['admin'].$configVars['leads'];

$configVars['userBaseUrl'] = $configVars['siteBaseUrl'].$configVars['user'];
$configVars['userBasePath'] = $configVars['siteBasePath'].$configVars['user'];
$configVars['userTemplates'] = $configVars['siteBasePath'].$configVars['user'].$configVars['templates'];

$configVars['userSystemBaseUrl'] = $configVars['siteBaseUrl'].$configVars['user'].$configVars['system'];
$configVars['userSystemBasePath'] = $configVars['siteBasePath'].$configVars['user'].$configVars['system'];
$configVars['userLeadsBaseUrl'] = $configVars['siteBaseUrl'].$configVars['user'].$configVars['leads'];
$configVars['userLeadsBasePath'] = $configVars['siteBasePath'].$configVars['user'].$configVars['leads'];
$configVars['userListingTemplates'] = $configVars['userListingBasePath'].$configVars['templates'];

$configVars['imageBaseUrl'] = $configVars['siteBaseUrl'].'images/';
$configVars['imageBasePath'] = $configVars['siteBasePath'].'images/';
$configVars['overlibPath'] = $configVars['siteBaseUrl'].'include/overlib.js';
$configVars['htmlAreaUrl'] = $configVars['siteBaseUrl'].'htmlarea/';

$configVars['propertyImportFilesPath'] = $configVars['siteBasePath'].'docs/';
$configVars['dncImportFilesPath'] = $configVars['siteBasePath'].'docs/dnc/';
$configVars['userPropertyImportFilesPath'] = $configVars['siteBasePath'].'userDocs/';

/* System Tables */
//LINES 99 AND 100 BELOW CHANGED BY SATISH
//$tableNames['system_users'] = 'system_users';
$tableNames['system_users'] = 'leadtrac_user';

$tableNames['system_preferences'] = 'system_preferences';
$tableNames['system_messages'] = 'system_messages';
$tableNames['system_emails'] = 'system_emails';
$tableNames['system_user_logs'] = 'system_user_logs';
$tableNames['system_email_bank'] = 'system_email_bank';
$tableNames['system_groups'] = 'system_groups';
$tableNames['system_groups_users'] = 'system_groups_users';
$tableNames['system_email_history'] = 'system_email_history';
$tableNames['system_blocked_ips'] = 'system_blocked_ips';
$tableNames['system_login_recorder'] = 'system_login_recorder';
$tableNames['system_login_information'] = 'system_login_information';
$tableNames['system_website_content'] = 'system_website_content';
$tableNames['system_states'] = 'system_states';
$tableNames['system_company'] = 'system_company';

/* Leads Tables */
$tableNames['lead_states'] = 'lead_states';
$tableNames['lead_cities'] = 'lead_cities';

$tableNames['lead_owner'] = 'lead_owner';
$tableNames['lead_property'] = 'lead_property';
$tableNames['lead_county'] = 'lead_county';
$tableNames['lead_county_map'] = 'lead_county_map';

//LINES 126 AND 127 BELOW CHANGED BY SATISH
//$tableNames['lead_property_type'] = 'lead_property_type';
$tableNames['lead_property_type'] = 'property_type';

$tableNames['lead_property_type_use_codes'] = 'lead_property_type_use_codes';
$tableNames['lead_tasks'] = 'lead_tasks';
$tableNames['lead_events'] = 'lead_events';
$tableNames['lead_events_deleted'] = 'lead_events_deleted';
$tableNames['lead_opportunities'] = 'lead_opportunities';
$tableNames['lead_call_history'] = 'lead_call_history';
$tableNames['lead_territory'] = 'lead_territory';
$tableNames['lead_delete_owner'] = 'lead_delete_owner';
$tableNames['lead_owner_calls'] = 'lead_owner_calls';
$tableNames['lead_territory_city'] = 'lead_territory_city';

//LINES 138 AND 139 BELOW CHANGED BY SATISH
$tableNames['lead_territory_property'] = 'view_property_type';

$tableNames['lead_activity'] = 'lead_activity';
$tableNames['lead_goal'] = 'lead_goal';

 
$tableNames['lead_upload_map'] = 'upload_map';
$tableNames['lead_upload_map_columns'] = 'upload_map_columns';
$tableNames['lead_sales_stage'] = 'sales_stage';
$tableNames['lead_personal_owner'] = 'leadtrac_personal_owner';
$tableNames['lead_personal_property'] = 'leadtrac_personal_property';
$tableNames['lead_pipeline'] = 'pipeline';
$tableNames['lead_pipeline_history'] = 'pipeline_history';
$tableNames['lead_pipeline_goal'] = 'pipeline_goal';

/* Need to be removed 
   Naming convention issue.  proper names given below this block
   still retained so that code does not break.
   Need to remove when Satish comes back from delhi.
*/
$tableNames['dnc_reason'] = 'dnc_reason';
$tableNames['call_log'] = 'call_log';
$tableNames['personal_owner'] = 'personal_owner';
$tableNames['personal_property'] = 'personal_property';
$tableNames['note'] = 'note';

$tableNames['lead_dnc_reason'] = 'dnc_reason';
$tableNames['lead_call_log'] = 'call_log';
$tableNames['lead_notes'] = 'note';

$tableNames['lead_import_programs'] = 'lead_import_programs';
$tableNames['lead_export_maps'] = 'lead_export_maps';
$tableNames['lead_export_map_fields'] = 'lead_export_map_fields';
$tableNames['lead_import_temporary'] = 'lead_import_temporary';
$tableNames['lead_import_temporary_dnc'] = 'lead_import_temporary_dnc';

/* Lead Sequences */





$tableNames['lead_owner_sequence'] = 'lead_owner_id_seq';
$tableNames['lead_property_sequence'] = 'lead_property_id_seq';
$tableNames['lead_county_sequence'] = 'lead_county_id_seq';
$tableNames['lead_cities_sequence'] = 'lead_cities_id_seq';
$tableNames['lead_task_sequence'] = 'lead_task_id_seq';
$tableNames['lead_event_sequence'] = 'lead_event_id_seq';
$tableNames['lead_opportunity_sequence'] = 'lead_opportunity_id_seq';
$tableNames['lead_call_history_sequence'] = 'lead_call_history_id_seq';
$tableNames['lead_bookmark_sequence'] = 'lead_bookmark_id_seq';
$tableNames['lead_territory_sequence'] = 'lead_territory_id_seq';
$tableNames['lead_delete_owner_sequence'] = 'lead_delete_owner_id_seq';
$tableNames['lead_territory_city_sequence'] = 'lead_territory_city_id_seq';
$tableNames['lead_territory_property_sequence'] = 'lead_territory_property_id_seq';
$tableNames['lead_activity_sequence'] = 'lead_activity_id_seq';

/*LINES BELOW ADDED BY SATISH. 24-OCT-05*/
$tableNames['lead_subscribed_city'] = 'subscribed_city';
$tableNames['lead_company_subscribed_city'] = 'lead_company_subscribed_city';
$tableNames['lead_subscribed_product'] = 'subscribed_product';
$tableNames['lead_product'] = 'software_products';
/*LINES BELOW ADDED BY SATISH. 27-OCT-05*/
$tableNames['lead_shopping_cart_product'] = 'shopping_cart_product';
$tableNames['lead_shopping_cart_city'] = 'shopping_cart_city';
/*LINE BELOW  ADDED BY SATISH. 28-OCT-05*/
$tableNames['lead_bookmark'] = 'bookmark';
$tableNames['lead_bookmark_parameters'] = 'bookmark_parameters';
/*TWO LINES BELOW ADDED BY SATISH. 31-OCT-05*/
$tableNames['system_authorizenet_transactions'] ='system_authorizenet_transactions';
$tableNames['system_authorizenet_config'] = 'system_authorizenet_config';

/*TWO LINES BELOW ADDED BY SATISH. 13-DEC-05*/
$tableNames['system_templates'] = 'system_templates';
$tableNames['lead_user_letters'] = 'leadtrac_user_letters';


$configVars['currency']    = '$';   // Currency Sign1
$configVars['curlPath'] = "/usr/bin";
$configVars['mailOb']="E-M-A-I-L-S-E-N-T";

set_include_path($configVars['pearDirectory']);

$configVars['event_repeat'] = array(0=>'None', 2=>'Daily', 3=>'Weekly', 4=>'Monthly', 5=>'Yearly');
$configVars['event_alert'] = array(0=>'None', 1=>15, 2=>30);

$configVars['task_status'] = array('1'=>'Not Started','2'=>'In Progress','3'=>'Completed');
$configVars['goal_type'] = array('1'=>'Week','2'=>'Month','3'=>'Year');

$configVars['AmPm'] = array('0'=>'AM','1'=>'PM');
$configVars['sales_stage'] = array('1'=>'None','2'=>'Lead','3'=>'1st Appt.','4'=>'Proposal','5'=>'Listing','6'=>'Contract');

for($i=1;$i<=31;$i++)
   $configVars['dayArray'][$i] = $i;
$configVars['monthArray'] = array(1=>"Jan",2=>"Feb",3=>"March",4=>"April",5=>"May",6=>"June",7=>"July",8=>"Aug",9=>"Sep",10=>"Oct",11=>"Nov",12=>"Dec" );
for($i=2004;$i<=2050;$i++)
   $configVars['yearArray'][$i] = $i;

for($i=1;$i<=12;$i++)
   $configVars['hourArray'][$i] = $i;

for($i=1;$i<=12;$i++)
   $configVars['minArray'] = array('00'=>'00','15'=>'15','30'=>'30','45'=>'45');

$configVars['probability'] = array('15'=>'15%','30'=>'30%','45'=>'45%','60'=>'60%','75'=>'75%','90'=>'90%');

$configVars['value'] = array('0'=>'<75,000','1'=>'750,000-1,500,000','2'=>'1,500,000-3,000,000','3'=>'3,000,000-6,000,000','4'=>'>6,000,000');

$configVars['ccTypes'] = array('1'=>'Visa', '2'=>'Master Card', '3'=>'Amex');

GLOBAL $configVars, $dbConfig, $tableNames;
GLOBAL $params,$auth;

include_once($configVars['pearDirectory'].'DB.php');
include_once($configVars['includeDirectory'].'functions.inc.php');

require($configVars['pearDirectory']."Auth/Auth.php");

?>
 [2006-04-04 07:09 UTC] sudha_seeni at yahoo dot co dot in
php 5.1.1,mysql 5.0.18,windows xp,xampp 1.5.1

see i have installed xampp 1.5.1 which itself has mysql,phpmyadmin..

i have to open in browser as
http://localhost/leadtrac_project/index.php.for this i am getting a
error:-
Fatal error: Function name must be a string in line no 1600 in
smarty.class.php
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 11:01:30 2024 UTC