Spreadsheet v2.0 echoing $cfg not showing spreadsheet

Just installed Spreadsheet Standard Edition v2.0. Install went fine, but the sample page didn’t load for me.

I then went to codebase/spreadsheet.php; but rather than a spreadsheet it echoes the variable “$cfg” then spits out the text of “loader.js”.

I’m just beginning to learn PHP, but I had a look at the code, and it seems this is expected behaviour:

$cfg = 'var cfg = {'.implode(",", $cfg).$ln."}".$ln; echo $cfg; echo file_get_contents("loader.js"); break;

Why? My MYSQL database connection works, have used a script to confirm PHP can connect in both cases.

I tried this on a hosted server running LAMP:
Apache ver. 2.2.19 (Unix)
PHP version 5.2.*
MySQL ver. 5.1

Then on my home server running LLMP:
Lighttpd 1.4.31
PHP 5.4.4-14
MYSQL 5.5.30-1.1

Both produced exactly the same output in exactly the same ways.

I couldn’t find anything on the forum or on google, but someone else is having the same issue - hcchandler.com/wp-content/pl … dsheet.php.

That is exactly what I get, though I’m using the full download and they are using the WP plugin.

What am I (we) doing wrong?

Hi,
please follow step-by-step tutorial to get spreadsheet working in wordpress:
docs.dhtmlx.com/doku.php?id=dhtm … the_plugin
You’re using it in wrong way.

Thanks for your reply, radnyo.

I’m not using Wordpress, so I used these instructions - docs.dhtmlx.com/doku.php?id=dhtm … installing -

Is that article out of date? Is there anything else I need to do?

Decided to try the v2.0 beta in the sticky thread you posted, hoping it might work better than the dhtmlxspreadheetv2.0.zip I used before my last post.

Deleted old installation and database, and reinstalled as per docs.dhtmlx.com/doku.php?id=dhtm … ialization.

Same error.

Any php.ini settings known to cause that? My hosting provider runs a count script at the end of each page, but that hasn’t interfered with anything before.

Hi,
please, provide a link to your page with spreadsheet.

services.repeatbusiness.co/sprea … dsheet.php

I also tried setting it up on my own server, with the exact same error :frowning:

Hi,
you was right. Hosting analitic script breaks spreadsheet.
services.repeatbusiness.co/sprea … dsheet.php
This file must include only javascript code, but hoster adds html-tag which makes this file wrong.

Thanks, radyno. I’ll try installing again on my self-hosted server on Monday and report back.

Looks like a great tool, looking forward to trying it.

Hi radyno,

Re-installed on my own server, same error. :exclamation:

No hosting provider scripts involved. :cry:

System and PHPinfo details in my first post. I’ll PM you the link if you could check what’s happening :bulb:

Getting this error in log files:

2013-09-02 03:14:45: (mod_fastcgi.c.2676) FastCGI-stderr: PHP Fatal error: Uncaught exception ‘Exception’ with message ‘MySQL operation failed
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 ‘-spreadsheet_sheet WHERE sheetid=‘1’’ at line 1’ in /media/disk/www/public_html/spreadsheet/codebase/php/db_common.php:934
Stack trace:
#0 /media/disk/www/public_html/spreadsheet/codebase/php/grid_cell_connector.php(261): MySQLDBDataWrapper->query(‘SELECT cfg FROM…’)
#1 /media/disk/www/public_html/spreadsheet/codebase/php/grid_cell_connector.php(53): GridCellConnector->get_config(false, true)
#2 /media/disk/www/public_html/spreadsheet/codebase/php/grid_cell_connector.php(39): GridCellConnector->get_data()
#3 /media/disk/www/public_html/spreadsheet/codebase/php/data.php(31): GridCellConnector->render()
#4 {main}
thrown in /media/disk/www/public_html/spreadsheet/codebase/php/db_common.php on line 934

Any idea what’s upsetting MYSQL?