Jump to content

Scgi-Bin Problem


valkyrion123

Recommended Posts

I'm assuming you're on Johnny...the scgiwrapper has been broken Johnny's Apache was upgraded. The 500 error in cgi-bin is likely due to your script (permissions like Byron said, or possibly an incorrect shebang line).

 

@Byron: Krydos looked at the scgiwrap error for someone else...conclusion was that Apache needs to be rebuilt.

Link to comment
Share on other sites

I'm assuming you're on Johnny...the scgiwrapper has been broken Johnny's Apache was upgraded. The 500 error in cgi-bin is likely due to your script (permissions like Byron said, or possibly an incorrect shebang line). @Byron: Krydos looked at the scgiwrap error for someone else...conclusion was that Apache needs to be rebuilt.

 

aw that is unfortunate to hear that there is a problem, when it will be fixed?

 

@Byron, yes i set it to 755 even the folder itself show at 755 and still it show the error above. maybe i just need it to be fixed

 

Thank you for the answer

Link to comment
Share on other sites

Paste this code into a new file in your cgi-bin and give it permissions 755 and see if it works. If it doesn't, post back the file name:

 

#!/usr/bin/perl -w
# File: time.pl
use CGI ':standard';
$current_time = localtime;
# 
print header,
start_html('A Virtual Clock'),
h1('A Virtual Clock'),
"The current time is $current_time - EST.",
hr,
end_html;

Link to comment
Share on other sites

Paste this code into a new file in your cgi-bin and give it permissions 755 and see if it works. If it doesn't, post back the file name:
#!/usr/bin/perl -w # File: time.pl use CGI ':standard'; $current_time = localtime; # print header, start_html('A Virtual Clock'), h1('A Virtual Clock'), "The current time is $current_time - EST.", hr, end_html; 

 

no, still error 500.

 

i've paste your code and name it time.pl set permission to 755 and still get same error

 

edit: its worked, there is .htaccess and i remove it but the problem still with my script. my script is .py actually

Edited by valkyrion123
Link to comment
Share on other sites

I can't help you with python. You could post your code and see if somebody else could help you.

 

i dont think my code is not working, cause it working in my xampp on my pc

 

btw here is the code maybe i make a mistake on declare shebang or something

 

#!/usr/bin/python
import sys
import time
import cgi, cgitb
sys.path.append('/selenium')
from selenium import webdriver
print "Content-type: text/html"
print ""
# Create instance of FieldStorage
form = cgi.FieldStorage()
# Get data from fields
nisn = form.getvalue('nisn')
driver = webdriver.PhantomJS("./phantomjs-linux/bin/phantomjs")
url = "http://nisn.data.kemdikbud.go.id/page/data"
driver.get(url)
#filling form
sbox = driver.find_element_by_name("ctl00$contentCenter$edNISN")
sbox.send_keys(nisn)
driver.find_element_by_id("ctl00_contentCenter_RadButton1_input").click()
time.sleep(2)
nama = str(driver.find_element_by_id("contentCenter_lRes1Nama").text)
sex = str(driver.find_element_by_id("contentCenter_lRes1Kelamin").text)
lahir = str(driver.find_element_by_id("contentCenter_lRes1Tmptlahir").text)
tanggal = str(driver.find_element_by_id("contentCenter_lRes1TglLahir").text)

#print json_dumps(res,separators=(',', ': '))
print nama + "," + sex + "," + lahir + "," + tanggal
driver.quit()

 

edit: btw, did johnny support python 2.7.1? because in that 500 error it says Python/2.4.3

Edited by valkyrion123
Link to comment
Share on other sites

There's multiple Pythons on Johnny:

 

python: /usr/bin/python2.4 /usr/bin/python /usr/lib/python2.4 /usr/local/bin/python2.7 /usr/local/bin/python3.4m /usr/local/bin/python3.4

 

You probably want to use:

#!/usr/local/bin/python2.7

in the first line of your script.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...