Jump to content

Category talk:J: Difference between revisions

→‎GeSHi Highlighter for J: Well, here are some troubleshooting suggestions.
(→‎GeSHi Highlighter for J: No luck so far :-()
(→‎GeSHi Highlighter for J: Well, here are some troubleshooting suggestions.)
Line 57:
:::Replace "some test code" with some test J code. (I assume you've named your language definition <code>j.php</code> and put it the directory <code>geshi</code>.) Then say <code>php testgeshi.php</code>, redirect the output to a file, and open the file in your favorite Web browser. —[[User:Underscore|Underscore]] ([[User talk:Underscore|Talk]]) 12:56, 10 November 2009 (UTC)
::::Thanks a lot for that - it would be good to make this info available somewhere more prominently. Actually I just downloaded another template from the sourceforge repository, so don't have GeSHi installed yet, but may do so now that the road doesn't look so long and dark!--[[User:Tikkanz|Tikkanz]] 22:43, 10 November 2009 (UTC)
::
::::: I don't think any of the Rosetta Code: namespace is really protected, so feel free to make any alterations that clarify things; That namespace is mostly guidelines and walkthroughs. If you're really not sure or comfortable making a change, note it in the talk page, give people about '''48 hours''' to respond, and see where things go from there. --[[User:Short Circuit|Michael Mol]] 00:27, 11 November 2009 (UTC)
:::::: When/if I get it to work I'll give it a shot, however my first try didn't work out. My understanding from the instructions above, was that I should be able to get PHP/GeSHi to process files without necessarily setting it up in conjunction with a web server. I downloaded the Windows binary for PHP, installed it using the default parameters, except I didn't pick any web server to configure it for. I downloaded GeSHi and extracted it to a folder. I created the <code>testgeshi.php</code> file in the same folder as the <code>geshi.php</code> file and copied my <code>j.php</code> file to <code>geshi\j.php</code> with the other language files. I then started a <code>cmd</code> session, made the folder containing <code>testgeshi.php</code> the current directory and then ran <code>php testgeshi.php > mytest.html</code>. The <code>mytest.html</code> is created but it is zero-length. The folder containing the php binaries (exe and dll) was added to the path by the PHP installer. Any suggestions?--[[User:Tikkanz|Tikkanz]] 21:22, 11 November 2009 (UTC)
::::::: It sounds like you did everything right; in particular, I can verify that you shouldn't need to deal with any Web servers. It's bizarre that you got no output at all, instead of, say, an error message at the very least. Possibly the culprit is that Windows doesn't have a real standard error stream; I really have no idea how <code>cmd.exe</code> works. Try a skeletal PHP script (<code>&lt;?php echo 'Hello, world!'; ?&gt;</code>) to verify that PHP is working; try highlighting a C program (with <code>$language = 'c';</code>) to verify that GeSHi is working; try running <code>php testgeshi.php</code> without redirecting to a file. Sorry if this doesn't help much; it's hard to debug this kind of thing through an asynchronous medium. Worse comes to worse, we could try meeting on IRC this weekend. —[[User:Underscore|Underscore]] ([[User talk:Underscore|Talk]]) 23:09, 11 November 2009 (UTC)
845

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.