# Use Visualcube offline



## VP7 (Jun 6, 2011)

How does one use visualcube offline ?

I have downloaded WampServer2.1e and installed.
http://www.wampserver.com/en/download.php

Includes :
- Apache 2.2.17
- Php 5.3.3
- Mysql 5.1.53 (version 64 bits)
- Mysql 5.5.8 (version 32 bits)
- PhpMyadmin 3.2.0.1
- SQLBuddy 1.3.2

The pc is a old inspiron 1501 laptop.
Windows XP Media Center SP3
2Ghz
2 Gig ram
Net connection impossible !!!

And downloaded visualcube-src-0.5.1.tar.gz.


----------



## DavidWoner (Jun 6, 2011)

I didn't know you could use visualcube offline. Try using the contact form on Conrad's site.


----------



## Lucas Garron (Jun 6, 2011)

It's probably better to convert to Javascript. What are you doing this for? It's possible to use alg.garron.us offline, but I haven't figured out the kinks in making this possible without having you download anything manually. (Downloading manually works, of course, but you have to know the right files.)


----------



## FatBoyXPC (Jun 6, 2011)

Did you decompress the .tar.gz file after downloading it? The file(s) is/are a php script. You should be able to use the visualcube.php (or maybe index.php) script and call it just like you would a normal webpage.

Put the php script(s) into your host's document root (you can find this path in the WAMP Settings). Then open up a browser and go to http://localhost/path-to-file.php?options=here

All you needed though was just apache and PHP. You might even be able to modify the php script to save an image instead of return an image, and you might be able to use the php script via command line, which means you wouldn't need apache.

I would first suggest making sure you've got your web server working (follow the info on wamp's website / post on their forum for help), then try making the visualcube php script to work.


----------



## VP7 (Jun 7, 2011)

>Did you decompress the .tar.gz file
Yes, I did. I Put decompressed files in c:/wamp/www folder

The document root is set to c:/wamp/www

>http://localhost/path-to-file.php?options=here

In the browser:
http://localhost/visualcube.php?fmt=gif&amp;size=200&amp;alg=S2M2E2

I get this error:
Parse error: syntax error, unexpected $end in C:\wamp\www\visualcube.php on line 1280

Line 1280 is one line past the last line of visualcube.php file.

If I throw a test web page in document root that works fine.
Unless the page has the code needed for visualcube.

<html>
<head><title>Test</title></head>
<body>
<div id="examples">
<a href="visualcube.php?fmt=gif&amp;size=200&amp;alg=S2M2E2"><img src="visualcube_0.gif" alt="Example 0"/></a>
</div>
</body></html>

Will toss up the same error as above.


----------



## mcp (Jun 7, 2011)

VP7 said:


> I get this error:
> Parse error: syntax error, unexpected $end in C:\wamp\www\visualcube.php on line 1280
> 
> Line 1280 is one line past the last line of visualcube.php file.



Find php.ini in your wamp folder, find this line:

short_open_tag = Off 

and change Off to On

Restart apache http server.


----------



## VP7 (Jun 8, 2011)

Lucas Garron said:


> What are you doing this for?


My net connection may be down for some time. A few days to a month.



mcp said:


> Find php.ini in your wamp folder, find this line:
> 
> short_open_tag = Off
> 
> ...


New Error:
Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'DATABASE_USERNAME'@'localhost' (using password: YES) in C:\wamp\www\visualcube.php on line 406

I've been bucking around with is for 3 days. Screw it.

I'll try to check back in a few days.

Thanks for the help guys.

Later


----------



## hr.mohr (Jun 8, 2011)

You need to create a database using the bundled SQL script and enter credentials in the PHP script.


----------



## Lucas Garron (Jun 8, 2011)

VP7 said:


> My net connection may be down for some time. A few days to a month.


I don't think you understood what I was trying to ask.

It seems unusual that you need a server just to run VisualCube, if you've never done something like that before. Does http://alg.garron.us/files/alg.garron.us_20110608.zip satisfy your needs?


----------



## Cride5 (Jun 9, 2011)

VP7 said:


> New Error:
> Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'DATABASE_USERNAME'@'localhost' (using password: YES) in C:\wamp\www\visualcube.php on line 406


 
In visualcube.php set:
$ENABLE_CACHE = false; 

The cache allows frequently requested images to be stored in a database, reducing load on the server. Unless you're requesting 100s of images a second, you probably won't need it


----------

