hi i picked this script up from a site and im trying to install it in my system and i came across the error below

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TYPE=MyISAM' at line 12

The section for that error is

require("../calendar/config.php"); 
require("./lang/lang.admin." . LANGUAGE_CODE . ".php");
mysql_connect(DB_HOST, DB_USER, DB_PASS) or die(mysql_error());
mysql_select_db(DB_NAME) or die(mysql_error());
mysql_query("CREATE TABLE " . DB_TABLE_PREFIX . "mssgs (
  id mediumint(5) unsigned NOT NULL auto_increment,
  uid tinyint(3) unsigned NOT NULL default '0',
  m tinyint(2) NOT NULL default '0',
  d tinyint(2) NOT NULL default '0',
  y smallint(4) NOT NULL default '0',
  start_time time NOT NULL default '00:00:00',
  end_time time NOT NULL default '00:00:00',
  title varchar(50) NOT NULL default '',
  text text NOT NULL,
  PRIMARY KEY  (id)
) TYPE=MyISAM") or die(mysql_error());

Also i noticed another error in eventdisplay.php

*/ = $lang['deleteconfirm'] ?>"; THIS LINE HAS THE ERRORS

            if (confirm(msg)) {
                opener.location = "eventsubmit.php?flag=delete&id=" + eid + "&month=<?
/*

if anyone as a solution for this would be great :)

Recommended Answers

All 8 Replies

YES sorted that now found but found out its in foreign language is there any way i can convert to english hun

Yup, change the value of the LANGUAGE_CODE constant, this is probably set in the config file included in the top of the script.

To verify if English is supported just check the ./lang/ directory, you should find a file like lang.admin.en.php, otherwise use one of the existing files in that directory to add the support.

Note: in linux file names are case sensitive.

Sorted out language now im getting
Parse error: syntax error, unexpected '=' in /home/jktempla/public_html/calendar/templates/default.php on line 37

<table BORDER=0 CELLSPACING=0 CELLPADDING=0 COLS=1 >
<tr>
<td><img SRC="images/tit-calendario.gif" height=59 width=310></td>
</tr>
</table>
        <?
/*
    =================================================================
    # Online Calendar WESPA CALENDAR 2.0
    # Author / Coder: Weslley A. Harakawa
    # weslley@wcre8tive.com
    #
    # PHP Script and SQL source.
    # Copyright © 2014. Wcre8tive // Weslley A. Harakawa. All rights reserved.
    =================================================================
*/ = $scrollarrows ?><span class="date_header">&nbsp;<? //THIS IS FLAGGING AS ERROR LINE//
/*
    =================================================================
    # Online Calendar WESPA CALENDAR 2.0
    # Author / Coder: Weslley A. Harakawa
    # weslley@wcre8tive.com
    #
    # PHP Script and SQL source.
    # Copyright © 2014. Wcre8tive // Weslley A. Harakawa. All rights reserved.
    =================================================================
*/ = $lang['months'][$m-1] ?>&nbsp;<?
/*

This is caused by the comment between the short tag and the assignment operator =:

<?/*hi*/='hello';?>

which should look like this:

<?='hello';?>

This is the same of writing:

<?php echo 'hello'; ?>

When possible try to avoid short tags as on versions previous to PHP 5.4 are not always available: http://php.net/manual/en/language.basic-syntax.phptags.php

ive removed the short tags

now im getting the following error

Parse error: syntax error, unexpected '=' in /home/jktempla/public_html/calendar/templates/default.php on line 37

</table>
        <?php
/*
    =================================================================
    # Online Calendar WESPA CALENDAR 2.0
    # Author / Coder: Weslley A. Harakawa
    # weslley@wcre8tive.com
    #
    # PHP Script and SQL source.
    # Copyright © 2014. Wcre8tive // Weslley A. Harakawa. All rights reserved.
    =================================================================
*/ = $scrollarrows ?><span class="date_header">&nbsp;<?php THIS IS THE ERROR LINE
/*
    =================================================================
    # Online Calendar WESPA CALENDAR 2.0
    # Author / Coder: Weslley A. Harakawa
    # weslley@wcre8tive.com
    #
    # PHP Script and SQL source.
    # Copyright © 2014. Wcre8tive // Weslley A. Harakawa. All rights reserved.
    =================================================================
*/ = $lang['months'][$m-1] ?>&nbsp;<?php
/*

Solved it

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.