wo / tpg

Tree Proof Generator
GNU General Public License v3.0
151 stars 20 forks source link

Can't run locally #2

Open TheOneAndOnlyGarcia opened 4 years ago

TheOneAndOnlyGarcia commented 4 years ago

Hello, after "php -S localhost:1234 router.php" I get the following error message from the browser:

JS loading error: file /Users/andrea/Downloads/tpg-master/array-formula-parser-prover-modelfinder-sentree-painter-index.js not found

js is activated, mamp is configured and running, php is installed and running succesfully

wo commented 4 years ago

Have you entered localhost:1234 as the URL in your browser?

TheOneAndOnlyGarcia commented 4 years ago

yes I did, will check it tomorrow on my office computer, just to be sure the error is not caused by my local computer.

03Farhan commented 3 years ago

I'm also getting the same issue after navigating to localhost:1234.

t0s0 commented 1 month ago

Hey. Thank you for your fantastic work!!! I like to study your program. But I'm also getting the same error massage after navigating to localhost:1234. In index.php this seems causing the trouble, but i cannot fix it..: <?php $scripts = array("array", "formula", "parser", "prover", "equality", "modelfinder", "sentree", "painter", "index");

if (isset($_GET['debug'])) { ?>

<?php
foreach ($scripts as $script) {
    if (strpos($_GET['debug'], $script) !== false || in_array($_GET['debug'], array("1", "trace"))) {
        print "<script type='text/javascript' src='$script.debug.js'></script>\n";
    }
    else {
        print "<script type='text/javascript' src='$script.js'></script>\n";
    }
}

} else { $allscripts = implode("-", $scripts); print "\n"; } ?>

wo commented 1 month ago

I'm afraid I can't offer much help with setting up php, and I only run Linux myself. But I take the point that I should perhaps remove the php dependency.

You can always save the page from your browser. This should give you a fully functioning local version that doesn't require php.

wo commented 1 month ago

I've just updated index.php so that it should work even if php is not installed (or not working). To run the page without php, you can rename index.php to index.html and simply open it with your browser.

t0s0 commented 2 weeks ago

Yes. It works!!!!! Thank you for fixing! Now I am happy!!!!!

t0s0 commented 2 weeks ago

I tested it now. Both works - with index.php (debugging working too) and with index.html. Well done!