• The forum software that supports hummy.tv has been upgraded to XenForo 2.3!

    Please bear with us as we continue to tweak things, and feel free to post any questions, issues or suggestions in the upgrade thread.

Getting My Own Jim Scripts To Run Without a 500 Error

jamesorlakin

New Member
Hello all,

Recently I've been toying around with the idea of creating some automated downloader for my Android phone. So far I've cobbled together a Python script (due to a lack of good understanding of TCL/Jim) to find the 5 most recent recordings in a folder and spit out the name, synopsis and DLNA address. So far so good...

The problem is trying to get a simple Jim script to execute through the web server. It works fine over the command line and I've have been baffled as to why I get a 500 Internal Server Error - and yes, I've checked the logs and they only contain "CGI died" with no explanation.

Does anyone have any suggestions why this doesn't work? It's most likely something obvious, but I'm a novice with this so please forgive me.

The basic Jim script:
Code:
#!/mod/bin/jimsh

package require cgi

puts "<p>Hello.</p>"

Command line output:
Code:
humax# jimsh /mod/webif/html/downloader/test.jim
<p>Hello.</p>
humax

500 Error screenshot attached.

Thanks in advance.
 

Attachments

  • Humax error.png
    Humax error.png
    29.1 KB · Views: 7
You need to send the headers that the web server/browser is expecting, so:

Code:
#!/mod/bin/jimsh

package require cgi

puts "Content-Type: text/plain"
puts ""
puts "Hello."
 
Back
Top