Menu

Getting Started

Help
2006-11-06
2013-04-08
  • Nobody/Anonymous

    Hi,

    Like the look of what you have done. Having trouble getting going. Copied all files to LAN-based webserver (IIS). Created a simple php file called test.php. The MySql database exists on the server. (MySql 4.021 from memory). On this server I get a blank page.

    Tried on another LAN server (running Apache, PHP 4 and MySql 5). Ran from the server PC as well as a networked PC and I get:

    "Table 'movies' does not exist!"

    I have also tried changing the host, username and password at the bottom of Sparse.php.

    What else do I need to do?

    Thanks

    John G

    Added the following and received no extra info:

    First insert the following line just before you call SparseThisPage():

    define('SPARSE_NOCACHE', 1);

    Now open up Sparse.php and insert the following lines:
    On line 78, type
    print $this->xml;

    On line 83, type
    print_r($this->templates);

    TEST.PHP

    <?php
    include('Sparse.php');

    define('SPARSE_NOCACHE', 1);

    SparseThisPage($_COOKIE['username'], $_COOKIE['password']);
    ?>
    <!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html>
    <body>
    <sqltemplate database="calendar" tables="movies" limit="10" type="display">
    <table border='1'>
    <tr>
    <th>ID</th>
    <th>Movie Title</th>
    <th>Ranking</th>
    </tr>
    <sqlrow>
    <tr>
    <td><sqlfield name="movie_id" /></td>
    <td><sqlfield name="title" /></td>
    <td><sqlfield name="ranking" /></td>
    </tr>
    </sqlrow>
    </table>
    </sqltemplate>
    </body>
    </html>

     
    • Nobody/Anonymous

      Solved it. (Maybe if I tried not reading the docs at all I could be even dumber)

      Read configure:

      <?php
         define('SPARSE_NO_AJAX', false);
         define('SPARSE_TEMP_DIR', 'tmp');
         include('Sparse.php');
         SparseThisPage('root', 'pass');
      ?>

      Problem is - must create 'tmp' folder under the folder where Sparse.php is located.

       
    • Daniel Orner

      Daniel Orner - 2006-11-06

      I think the problem was that you used $_COOKIE instead the username and password in your first piece of code. The temp directory shouldn't matter, as Sparse should simply ignore the caching if it can't write there. Try taking out both define statements and see if it still works.

      Thanks and let me know how it goes!

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.