cmaclennan Posted April 29, 2009 Share Posted April 29, 2009 Ok so I have been looking around at a number of different open source solutions to a web based service management/ticketing system and came across one that i wanted to give a go. There is next to no information whatsoever available on it and when I installed based in the readme file both on my local WAMP test site and on our hosted site both times I have come up with errors and am unable to get anywhere with it, I'm wondering if I post the screen I'm getting someone here may know what the problem is or if perhaps I have something turned of on my local installation that I should have on? ] * @since PHPbase 0.0.1 */ $_SITE_IDENTITY_CODE = "L1SMPBOD"; session_start(); //error_reporting(0); require_once _LIBPATH . "common.php"; require_once _LIBPATH . "xml.php"; require_once _LIBPATH . "template.php"; require_once _LIBPATH . "config.php"; require_once _LIBPATH . "html.php"; require_once _LIBPATH . "database.php"; require_once _LIBPATH . "vars.php"; require_once _LIBPATH . "library.php"; require_once _LIBPATH . "sqladmin.php"; require_once _LIBPATH . "forms.php"; class CBase { /** * description * * @var type * * @access type */ var $html; } class CSite { /** * description * * @var type * * @access type */ var $admin; /** * description * * @var type * * @access type */ var $html; /** * description * * @param * * @return * * @access */ function CSite($xml , $admin = false) { global $_CONF , $base; $this->admin = $admin; //loading the config $tmp_config = new CConfig($xml); $_CONF = $tmp_config->vars["config"]; //loading the templates if ($this->admin) { if (is_array($_CONF["templates"]["admin"])) { foreach ($_CONF["templates"]["admin"] as $key => $val) { if ($key != "path") $this->templates[$key] = new CTemplate($_CONF["templates"]["admin"]["path"] . $_CONF["templates"]["admin"][$key]); } } } else { if (is_array($_CONF["templates"])) { foreach ($_CONF["templates"] as $key => $val) { if (($key != "path" ) && ($key != "admin")) $this->templates[$key] = new CTemplate($_CONF["templates"]["path"] . $_CONF["templates"][$key]); } } } $base = new CBase(); $base->html = new CHtml(); $this->html = &$base->html; //make a connection to db if (is_array($_CONF["database"])) { $this->db = new CDatabase($_CONF["database"]); //vars only if needed if ($_CONF["tables"]["vars"]) { $this->vars = new CVars($this->db , $_CONF["tables"]["vars"]); $base->vars = &$this->vars; } $this->tables = &$_CONF["tables"]; } } function TableFiller($item) { if (file_exists("pb_tf.php")) { include("pb_tf.php"); } } /** * description * * @param * * @return * * @access */ function Run() { global $_TSM , $_SITE_IDENTITY_CODE ; if (file_exists("pb_events.php")) { include("pb_events.php"); $_TSM["PB_EVENTS"] = @DoEvents(&$this); } if (is_object($this->templates["layout"])) { echo $this->templates["layout"]->Replace($_TSM) . $_SITE_IDENTITY_CODE ; } } } ?> Fatal error: Class 'CSite' not found in C:\wamp\www\service\index.php on line 7 You guys have been a great help in the past so once again thanks in advance and anythign you can tell me is appreciated. ( I have tried to contact the guy who made it but am not having much luck in that dept either.) Thanks C Quote Link to comment https://forums.phpfreaks.com/topic/156147-open-source-application-problem/ Share on other sites More sharing options...
PFMaBiSmAd Posted April 29, 2009 Share Posted April 29, 2009 Post the first 7 lines of index.php exactly like they are in the file including any php tags. Quote Link to comment https://forums.phpfreaks.com/topic/156147-open-source-application-problem/#findComment-821974 Share on other sites More sharing options...
cmaclennan Posted April 29, 2009 Author Share Posted April 29, 2009 Ok here is the Index.php file exactly as it is: <?php //define("PB_CRYPT_LINKS" , 1); define("_LIBPATH","./lib/"); require_once _LIBPATH . "site.php"; $site = new CSite("./site.xml",true); $site->Run(); ?> And this is the error I got on the our hosted site. Fatal error: Cannot redeclare fputcsv() in /homepages/24/d264498493/htdocs/service1/lib/common.php on line 948 Quote Link to comment https://forums.phpfreaks.com/topic/156147-open-source-application-problem/#findComment-821980 Share on other sites More sharing options...
Mark Baker Posted April 29, 2009 Share Posted April 29, 2009 Odds are that you're running PHP 5.1.0 or higher, and that the code was written for an earlier version of PHP. Quote Link to comment https://forums.phpfreaks.com/topic/156147-open-source-application-problem/#findComment-821985 Share on other sites More sharing options...
PFMaBiSmAd Posted April 29, 2009 Share Posted April 29, 2009 For your last error posted, see Mark Baker's post. You would need to find/replace all references in the files to fputcsv with some other name that does not conflict with the php built-in function by that same name. For your previous error, post a link to the site where you got this script and/or post the site.php file. Quote Link to comment https://forums.phpfreaks.com/topic/156147-open-source-application-problem/#findComment-821989 Share on other sites More sharing options...
cmaclennan Posted April 29, 2009 Author Share Posted April 29, 2009 Attached is the site.php file and if I found all of the fputcsv tags and replaced them with an alternate name that would get around the version issue? [attachment deleted by admin] Quote Link to comment https://forums.phpfreaks.com/topic/156147-open-source-application-problem/#findComment-821993 Share on other sites More sharing options...
PFMaBiSmAd Posted April 29, 2009 Share Posted April 29, 2009 The site.php file is using lazy-way short open tags <? You need to go through all the files as well and replace <? with <?php and any <?= with <?php echo From php.net concerning using short open tags - ; NOTE: Using short tags should be avoided when developing applications or ; libraries that are meant for redistribution, or deployment on PHP ; servers which are not under your control, because short tags may not ; be supported on the target server. For portable, redistributable code, ; be sure not to use short tags. Quote Link to comment https://forums.phpfreaks.com/topic/156147-open-source-application-problem/#findComment-821996 Share on other sites More sharing options...
cmaclennan Posted April 29, 2009 Author Share Posted April 29, 2009 Thanks Again for all your help, I'll net you know if I run into any issues. Quote Link to comment https://forums.phpfreaks.com/topic/156147-open-source-application-problem/#findComment-822000 Share on other sites More sharing options...
cmaclennan Posted April 29, 2009 Author Share Posted April 29, 2009 Hey there, Ok so I went through and mad sure there were no short tags and have now come up with a new error: Warning: Call-time pass-by-reference has been deprecated in C:\wamp\www\service\lib\site.php on line 143 Warning: Call-time pass-by-reference has been deprecated in C:\wamp\www\service\lib\common.php on line 732 Fatal error: Cannot redeclare fputcsv() in C:\wamp\www\service\lib\common.php on line 948 Quote Link to comment https://forums.phpfreaks.com/topic/156147-open-source-application-problem/#findComment-822012 Share on other sites More sharing options...
PhilipXVIII18 Posted May 6, 2009 Share Posted May 6, 2009 What would be the possible solution of this problem? Quote Link to comment https://forums.phpfreaks.com/topic/156147-open-source-application-problem/#findComment-827194 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.