Jump to content

Open Source Application Problem


cmaclennan

Recommended Posts

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.