Page 1 of 1

Help error code :(

Posted: 2010-05-28 03:11:25
by Rocker
hello
i have a problem i have a windows server with xampp
i have copy the file into the htdocs and than came this error message:

Code: Select all

* @copyright Copyright © 2006-2007, Michael Shepanski * @package PK-Designs * @version Version 1.0 (2007.01.06) * =============================================================================================== */ require_once('mdb3.php'); $moviedb = new MDB3(); ?>
get_html(); ?> 
Please help me i have mysql data in the config file

Posted: 2010-05-29 14:58:35
by ElMauro
you must add the php code tag at the beginning of every php code section.

Code: Select all

<?
must be:

Code: Select all

<?php
you can do it in a second with this Search and Replace tool

As second option: use an older php version.

Posted: 2010-05-29 17:09:56
by Rocker

Posted: 2010-05-30 11:14:10
by ElMauro
can't see anything. Got timeout when trying to see your site ( http://rockerserver.hopto.org/film/ )

Posted: 2010-05-30 12:17:18
by Rocker
oh sry but is my home server
okay itwas a big php code and on the end was" can't connect database mdb3.php take line 241" but the mysql are correct

Posted: 2010-05-31 11:50:29
by ElMauro
so.. you solved it?
can't connect database
but the mysql are correct
if you are getting that error, then something is NOT correct with your mysql config :D

Posted: 2010-11-07 19:21:35
by djvaxxx
ElMauro wrote:so.. you solved it?
can't connect database
but the mysql are correct
if you are getting that error, then something is NOT correct with your mysql config :D
Der ElMauro, I change the code from ? to ?php and now I become this:

$value) pair for string replacments. var $callbacks; // ARRAY: ($variables => callback()) pair for string replacments. var $callbackobj; // CLASS: Refrence to the location of callback functions var $subtpls; // ARRAY: ARRAY(STRING starttag, STRING endtag, ARRAY templates) pair for subtemplate interpritation. # Private Variables - Used only within this class. var $curr_subtpl; // TEMAPLATE: Current subtempate var $subtpl_prefix; // STRING: Subtemplate Prefix Text var $subtpl_text; // STRING: Subtemplate Text var $subtpl_numdisp; // INTEGER: Max Number of subtemplates to cycle through. var $subtpl_seperat; // STRING: Seperator text for a subtemplate. /** ------------------------------------------------------------------------------------------- * Create a new Template instance. * @access public * ------------------------------------------------------------------------------------------*/ function Template($callbackobj=NULL, $starttag=NULL, $endtag=NULL) { $this->callbackobj = $callbackobj; $this->starttag = $starttag; $this->endtag = $starttag; $this->variables = array(); $this->callbacks = array(); $this->subtpls = array(); $this->curr_subtpl = NULL; } /** ------------------------------------------------------------------------------------------- * Add a variable for the template's string replace. The variable name should be a * fairly short string and contain no spaces. * @access public * ------------------------------------------------------------------------------------------*/ function add_var($search, $replace) { $this->variables[$search] = $replace; } /** ------------------------------------------------------------------------------------------- * Add a variable for the template's string replace. The variable name should be a * fairly short string and contain no spaces. * @access public * ------------------------------------------------------------------------------------------*/ function add_callback($search, $function, $numargs=0) { if ($this->callbackobj == NULL) { die("No $callbackobj set for this template."); } $callback = array(); $callback['search'] = $search; $callback['function'] = $function; $callback['numargs'] = $numargs; array_push($this->callbacks, $callback); } /** ------------------------------------------------------------------------------------------- * Add a subtemplate loop. You must pre-create an array of templates to loop through. * @access public * ------------------------------------------------------------------------------------------*/ function add_subtpl($tag, $templates) { $array = array(); $array['tag'] = $tag; $array['templates'] = $templates; array_push($this->subtpls, $array); } /** ------------------------------------------------------------------------------------------- * Read the template file, replace all variables, and return the resulting html. * @access public * ------------------------------------------------------------------------------------------*/ function read_template($file) { $text = ""; $lines = file($file); foreach ($lines as $line) { $text = $text.$line; } return $this->process_input($text); } /** ------------------------------------------------------------------------------------------- * Runs the sent input through the template creating process, returning the result. * @access public * ------------------------------------------------------------------------------------------*/

Do you now why?

Thanks, Vali