Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't run locally #2

Open
TheOneAndOnlyGarcia opened this issue Mar 11, 2020 · 8 comments
Open

Can't run locally #2

TheOneAndOnlyGarcia opened this issue Mar 11, 2020 · 8 comments

Comments

@TheOneAndOnlyGarcia
Copy link

TheOneAndOnlyGarcia commented Mar 11, 2020

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
Copy link
Owner

wo commented Mar 12, 2020

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

@TheOneAndOnlyGarcia
Copy link
Author

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
Copy link

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

@t0s0
Copy link

t0s0 commented Jul 13, 2024

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..:

<script>
function log(str, tracelog) {
     if (!self.debugWin) debugPopup();
     <?php if ($_GET['debug'] == "trace") { ?>
     if (tracelog) {
         debugWin.document.write("<pre>"+str+"</pre>");
     }
     <?php } else { ?>
     if (!tracelog) {
         debugWin.document.write("<pre>"+str+"</pre>");
     }
     <?php } ?>
}
function debugPopup() {
    self.debugWin = self.open("about:blank","debugWin");
    if (!self.debugWin) alert("unblock popups!");
}
log("hello, this is the debugging window");
</script>
<?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 "<script type='text/javascript' src='$allscripts.js'></script>\n";
}
?>

@wo
Copy link
Owner

wo commented Jul 14, 2024

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
Copy link
Owner

wo commented Jul 14, 2024

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
Copy link

t0s0 commented Aug 19, 2024

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

@t0s0
Copy link

t0s0 commented Aug 20, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants