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

GoDaddy cgiNodeInfo.jscript not working correctly #20

Open
richm617 opened this issue Sep 19, 2015 · 42 comments
Open

GoDaddy cgiNodeInfo.jscript not working correctly #20

richm617 opened this issue Sep 19, 2015 · 42 comments

Comments

@richm617
Copy link

I right click on cgiNodeInfo.jscript from my CPanel and click View and all I see is the following:
Could you help?
1
2
3
4
5
6

@lanled
Copy link

lanled commented Sep 20, 2015

I have the same problem

Lan

@lanled
Copy link

lanled commented Sep 20, 2015

I think that the problem is i the file cgi-node.js

Lan

@lanled
Copy link

lanled commented Sep 20, 2015

BTW I use bluehost

@jaszhix
Copy link

jaszhix commented Sep 23, 2015

If you are using the version from the website, it is not as up to date as the one from this repo. cgiNodeInfo() works on the repo version, where as CgiNodeInfo() works on the version on the website. I suggest cloning this repo instead.

@richm617
Copy link
Author

Thanks but can you help me a little more? I've found cgiNodeInfo() in this repo but all it says is
1 lines (1 sloc) 20 Bytes

What do I do with that? It's from oct 15 2014

@jaszhix
Copy link

jaszhix commented Sep 23, 2015

It looks like node is not being executed and your files are being loaded as plain text. I took another look at the screenshots you posted. You need to point your cgi-node.js file directly to node. So it should look like:

#!/home/wmoralespr/bin/node

I'm assuming all of the libs node needs is in wmoralespr. Make sure your files are chmod 755. If you use the version from this repo in cgi-bin/, rename your extension JSS on files and in .htaccess, or change JSS to jscript in cgi-node.js.

@richm617
Copy link
Author

I changed the cgi-node.js to point to node. It still just showed as before
I'm not sure how to change it stop loading from plain text? I've not changed to your repo yet.

Attached is what libs I have.
capture

@jaszhix
Copy link

jaszhix commented Sep 23, 2015

This is not my repo. :) I would be pointing your browser to the public address of the jscript file on port 80. It likely will not do anything from cpanel.

@richm617
Copy link
Author

Could I give you remote access?

@jaszhix
Copy link

jaszhix commented Sep 23, 2015

SessionPath needs its own directory, create a dir like /home/wmoralespr/sessions, then point SessionPath to that. I am just helping because I like this project, and don't like seeing people get stuck, but I can't play a tech support role.

@jaszhix
Copy link

jaszhix commented Sep 23, 2015

Paste your cgi-node.js file here: http://0bin.net/ and give me the long URL in the address bar. Did you try going to your site's public address? .htaccess only works there.

@jaszhix
Copy link

jaszhix commented Sep 23, 2015

You gave me the link to your godaddy account. Paste/upload your cgi-node.js file to 0bin?

What are you trying to use cgi-node for? I wouldn't use cgi-node unless you absolutely have to. Its really just a jerry rigged version of node for CGI - not maintained, and probably not something to run in production if you're not familiar with linux.

@jaszhix
Copy link

jaszhix commented Sep 23, 2015

http://23.229.176.101/cgiNodeInfo.jscript gives a 404. You didn't give me a 0bin link, so I can't look at what you pasted or uploaded.

@jaszhix
Copy link

jaszhix commented Sep 23, 2015

Now paste the long link here it redirects to.

@richm617
Copy link
Author

@jaszhix
Copy link

jaszhix commented Sep 23, 2015

I formatted it and changed line 8. It was using JSS. Not really your fault, the documentation is completely wrong.

http://0bin.net/paste/NoKzctPiDhA0vEG6#vOPssEHewHnoG6SbZOeRRY0+zcAX+ao4LsORu7ZMu3N

@jaszhix
Copy link

jaszhix commented Sep 23, 2015

I would really suggest not using screenshots. You should try to use FTP or SSH. Nothing you view in cpanel will work with node - cgi-node only works on port 80, because that's what htaccess is configuring.

@richm617
Copy link
Author

I thought it would open up in a browser the contents of the server it's running on.

@jaszhix
Copy link

jaszhix commented Sep 23, 2015

https://p3plcpnl0462.prod.phx3.secureserver.net:2083/cpsess8901585666/frontend/gl_paper_lantern/filemanager/showfile.html?file=cgi-node.js&fileop=&dir=%2Fhome%2Fwmoralespr%2Fpublic_html%2Fcgi-bin&dirop=&charset=&file_charset=&baseurl=&basedir=

the :2083 at the end of the hostname (p3plcpnl0462.prod.phx3.secureserver.net) is the port. You gave me the server's IP, so anything in /home/wmoralespr should be available at http://23.229.176.101/ (port 80)

@richm617
Copy link
Author

correct. I thought going http://23.229.176.101/cgiNodeInfo.jscript would at least try to call up the script and make it run

@jaszhix
Copy link

jaszhix commented Sep 23, 2015

<? CgiNodeInfo() ?>

@richm617
Copy link
Author

yes i thought it would run that and then display the contents of the machine. I tried to even put the /public_html/cginodeinfo.jscript

@jaszhix
Copy link

jaszhix commented Sep 23, 2015

I'm sorry?

@richm617
Copy link
Author

lol Ya, I'm sorry to
capture
o this thing doesn't work as it should. It's supposed to show

@jaszhix
Copy link

jaszhix commented Sep 23, 2015

That's on godaddy? That means its working.

@richm617
Copy link
Author

haha. not that's the tutorial on how to do this but it doesn't work. http://www.cgi-node.org/docs/cgi-node-on-godaddy-tutorial

@jaszhix
Copy link

jaszhix commented Sep 23, 2015

I think it was disingenuous for the author to suggest cgi-node should be installed by anyone -- and configured over web admin. Node is linux software, and you need a terminal for this stuff.

@richm617
Copy link
Author

Ya, it seems like i wasted a lot of time on it. They make it look so easy. I mean I am entering the correct navigation link right? http://23.229.176.101/cginodeinfo.jscript

@jaszhix
Copy link

jaszhix commented Sep 23, 2015

Yeah, except for the case sensitivity, cgiNodeInfo.jscript would make a difference in a nix environment.

@richm617
Copy link
Author

when I use the domainname/cgiNodeInfo.jscript
I get:
Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at [email protected] to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

@jaszhix
Copy link

jaszhix commented Sep 23, 2015

Did you install node? This is probably your only option on godaddy - https://github.com/niutech/node.php if you don't want to use SSH.

@richm617
Copy link
Author

this never ends! When I try to install it I get:
Node.php

Node.js is not yet installed. Switch to Admin Mode and Install it.

Powered by node.php

@jaszhix
Copy link

jaszhix commented Sep 23, 2015

Edit node.php https://github.com/niutech/node.php/blob/master/node.php#L13 - change it to true, then back to false after you install node.

@richm617
Copy link
Author

Thanks. Got it installed but for line two: When succeeded, install your node.js app by uploading its folder or using npm: http://example.org/node.php?npm=install jt-js-sample

I get

Node.php

Running: npm node/bin/npm install jt-js-sample
Failed. Error: 127

@jaszhix
Copy link

jaszhix commented Sep 23, 2015

niutech/node.php#4

@richm617
Copy link
Author

I don't have the SSL credentials. i'll need to call GoDaddy and do it tomorrow. Thank you for your help!

@jaszhix
Copy link

jaszhix commented Sep 23, 2015

Np, good luck!

@richm617
Copy link
Author

Can I used FTP for line 2? GoDaddy is telling me I don't have SSL

When succeeded, install your node.js app by uploading its folder or using npm: http://example.org/node.php?npm=install jt-js-sample.

@jaszhix
Copy link

jaszhix commented Sep 23, 2015

SSH.

@rokeegithub
Copy link

i am having 404 error while following all the instruction given here if you want i can post cgi-node.js file to bin can you please help me

@webtech0101
Copy link

webtech0101 commented Aug 11, 2016

After follow http://www.cgi-node.org/docs/cgi-node-on-godaddy-tutorial showing error

HOW CAN I SOLVE THAT

EXCEPTION: ENOENT: no such file or directory, open
'/home//bin/sessions/c3b705ce7c3920962bcec27021d8d3fb'
Error: ENOENT: no such file or directory, open '/home//bin/sessions/c3b705ce7c3920962bcec27021d8d3fb'
at Error (native)
at Object.fs.openSync (fs.js:549:18)
at Object.fs.writeFileSync (fs.js:1156:15)
at CgiHttpSession.create (/home//public_html/cgi-bin/cgi-node.js:343:6)
at CgiHttpSession.init (/home//public_html/cgi-bin/cgi-node.js:294:44)
at new CgiHttpSession (/home//public_html/cgi-bin/cgi-node.js:378:7)
at new CgiHttpContext (/home//public_html/cgi-bin/cgi-node.js:118:17)
at Object. (/home//public_html/cgi-bin/cgi-node.js:948:18)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)

Content-type: text/html; charset=iso-8859-1
EXCEPTION: Cannot read property 'session' of null
TypeError: Cannot read property 'session' of null
at process. (/home//public_html/cgi-bin/cgi-node.js:941:16)
at emitOne (events.js:77:13)
at process.emit (events.js:169:7)

@dotme
Copy link

dotme commented Oct 10, 2016

@webtech0101 I am not a great specialist but I want to give you a little help with your problem. It all looks like you should edit the cgi-node.js file to have the working server. Check path to sessions and replace it with yours. Look here it is short instructions to solve your problem. Sessions folder must be separated from other folders and needs to 755 permissions.
Have a nice day.

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

6 participants