Welcome to the Cumulus Support forum.

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Cumulus MX V4 beta test release 4.0.0 (build 4019) - 03 April 2024

Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

who's online php help

Other discussion about creating web sites for Cumulus that doesn't have a specific subforum

Moderator: daj

Post Reply
Michael_Wright
Posts: 140
Joined: Thu 30 May 2013 9:15 am
Weather Station: fine offset
Operating System: windows 7
Location: Townsville/Queensland/Australia
Contact:

who's online php help

Post by Michael_Wright »

hi I am tyring to setup who's online but getting this error code can someone help me please mike

Code: Select all

Error

SQL query: 

CREATE TABLE `whos_online` ( `session_id` varchar(128) NOT NULL default '', `ip_address` varchar(20) NOT NULL default '', `name` varchar(64) NOT NULL default '', `nickname` varchar(20) default NULL, `country_name` varchar(50) default NULL, `country_code` char(2) default NULL, `city_name` varchar(50) default NULL, `state_name` varchar(50) default NULL, `state_code` char(2) default NULL, `latitude` decimal(10,4) default '0.0000', `longitude` decimal(10,4) default '0.0000', `last_page_url` text NOT NULL, `http_referer` varchar(255) default NULL, `user_agent` varchar(255) NOT NULL default '', `hostname` varchar(255) default NULL, `provider` varchar(255) default NULL, `time_entry` int(10) unsigned NOT NULL default '0', `time_last_click` int(10) unsigned NOT NULL default '0', `num_visits` int(10) unsigned NOT NULL default '0', P[...] 

MySQL said: Documentation 
 #1064 - 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 DEFAULT CHARSET=utf8' at line 23 
Image
The Future you have Not seen but the presants shall all ways be.
User avatar
SpaceWalker
Posts: 67
Joined: Sun 04 Mar 2012 2:54 am
Weather Station: Davis Vantage
Operating System: Windows XP
Location: Eastern-Canada
Contact:

Re: who's online php help

Post by SpaceWalker »

If you are trying to setup the 'Who's Online PHP Script' designed by Mike Challis?

Well, as you might have seen, the script has not been updated since September 2009 and a lot of Internet things have changed since then, such as PHP and MySQL (two important components of the script). Unless you are quite familiar (almost an expert) with PHP and MySQL and you have a lot of free time (the script need a complete rewrite to make it compatible with both PHP and MySQL), I would strongly suggest that you look for something else - after spending hours and hours trying to modify the script to make it more up-to-date, I simply had to give up...
Karv
Posts: 40
Joined: Sun 16 Dec 2012 11:19 pm
Weather Station: WH-1080
Operating System: Windows XP / 7, Ubuntu, Centos
Location: South Gloucestershire

Re: who's online php help

Post by Karv »

The create table info is in a text file, and works ok for me directly in MySQL.

Code: Select all

CREATE TABLE `whos_online` (
  `session_id`      varchar(128) NOT NULL default '',
  `ip_address`      varchar(20) NOT NULL default '',
  `name`            varchar(64) NOT NULL default '', 
  `nickname`        varchar(20) default NULL,
  `country_name`    varchar(50) default NULL,
  `country_code`    char(2) default NULL,
  `city_name`       varchar(50) default NULL,
  `state_name`      varchar(50) default NULL,
  `state_code`      char(2) default NULL, 
  `latitude`        decimal(10,4) default '0.0000',
  `longitude`       decimal(10,4) default '0.0000',  
  `last_page_url`   text NOT NULL,
  `http_referer`    varchar(255) default NULL,
  `user_agent`      varchar(255) NOT NULL default '',
  `hostname`        varchar(255) default NULL,
  `provider`        varchar(255) default NULL, 
  `time_entry`      int(10) unsigned NOT NULL default '0',
  `time_last_click` int(10) unsigned NOT NULL default '0',
  `num_visits`      int(10) unsigned NOT NULL default '0',
  PRIMARY KEY  (`session_id`),
  KEY `nickname_time_last_click` (`nickname`,`time_last_click`)
) TYPE=MyISAM DEFAULT CHARSET=utf8;

Code: Select all

Query OK, 0 rows affected, 1 warning (0.01 sec)
mysql> show warnings;
+---------+------+--------------------------------------------------------------------------+
| Level   | Code | Message                                                                  |
+---------+------+--------------------------------------------------------------------------+
| Warning | 1287 | 'TYPE=storage_engine' is deprecated; use 'ENGINE=storage_engine' instead |
+---------+------+--------------------------------------------------------------------------+
1 row in set (0.00 sec)
Michael_Wright
Posts: 140
Joined: Thu 30 May 2013 9:15 am
Weather Station: fine offset
Operating System: windows 7
Location: Townsville/Queensland/Australia
Contact:

Re: who's online php help

Post by Michael_Wright »

Hi Karv wanted make sure if I am doing this right I am using MYphpadmin inclosed a small picture of the database mike
Karv wrote:The create table info is in a text file, and works ok for me directly in MySQL.

Code: Select all

CREATE TABLE `whos_online` (
  `session_id`      varchar(128) NOT NULL default '',
  `ip_address`      varchar(20) NOT NULL default '',
  `name`            varchar(64) NOT NULL default '', 
  `nickname`        varchar(20) default NULL,
  `country_name`    varchar(50) default NULL,
  `country_code`    char(2) default NULL,
  `city_name`       varchar(50) default NULL,
  `state_name`      varchar(50) default NULL,
  `state_code`      char(2) default NULL, 
  `latitude`        decimal(10,4) default '0.0000',
  `longitude`       decimal(10,4) default '0.0000',  
  `last_page_url`   text NOT NULL,
  `http_referer`    varchar(255) default NULL,
  `user_agent`      varchar(255) NOT NULL default '',
  `hostname`        varchar(255) default NULL,
  `provider`        varchar(255) default NULL, 
  `time_entry`      int(10) unsigned NOT NULL default '0',
  `time_last_click` int(10) unsigned NOT NULL default '0',
  `num_visits`      int(10) unsigned NOT NULL default '0',
  PRIMARY KEY  (`session_id`),
  KEY `nickname_time_last_click` (`nickname`,`time_last_click`)
) TYPE=MyISAM DEFAULT CHARSET=utf8;

Code: Select all

Query OK, 0 rows affected, 1 warning (0.01 sec)
mysql> show warnings;
+---------+------+--------------------------------------------------------------------------+
| Level   | Code | Message                                                                  |
+---------+------+--------------------------------------------------------------------------+
| Warning | 1287 | 'TYPE=storage_engine' is deprecated; use 'ENGINE=storage_engine' instead |
+---------+------+--------------------------------------------------------------------------+
1 row in set (0.00 sec)
You do not have the required permissions to view the files attached to this post.
Image
The Future you have Not seen but the presants shall all ways be.
Karv
Posts: 40
Joined: Sun 16 Dec 2012 11:19 pm
Weather Station: WH-1080
Operating System: Windows XP / 7, Ubuntu, Centos
Location: South Gloucestershire

Re: who's online php help

Post by Karv »

Hi Mike,
I don't use phpMyAdmin - but it looks as though you have to with your host.

Provided for every field you select the correct corresponding data type and length etc, the table should create correctly.

It would probably be easier to go to the import tab and import the file with all the create database info and "run" it.

K
Michael_Wright
Posts: 140
Joined: Thu 30 May 2013 9:15 am
Weather Station: fine offset
Operating System: windows 7
Location: Townsville/Queensland/Australia
Contact:

Re: who's online php help

Post by Michael_Wright »

ok so if I use import what file do I need to upload
Image
The Future you have Not seen but the presants shall all ways be.
Karv
Posts: 40
Joined: Sun 16 Dec 2012 11:19 pm
Weather Station: WH-1080
Operating System: Windows XP / 7, Ubuntu, Centos
Location: South Gloucestershire

Re: who's online php help

Post by Karv »

i'd go with the whos-online.sql.txt file in the readme-files directory.
Post Reply