Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.os.linux.misc > #16803
| Newsgroups | comp.os.linux.misc |
|---|---|
| Date | 2016-02-18 06:49 -0800 |
| References | <9a97c0dd-f7e4-44b1-a33d-562d48631443@googlegroups.com> <na1ut2$igu$1@dont-email.me> |
| Message-ID | <7463f9d2-8be0-4b32-ba66-9bcfea397269@googlegroups.com> (permalink) |
| Subject | Re: Help me resolv this cgi:error |
| From | Nikos Gr33k <nikos.gr33k@gmail.com> |
[root@nexus cgi-bin]# head -10 ./metrites.py
#!/usr/bin/python3
# coding=utf-8
import cgitb; cgitb.enable()
import cgi, re, os, sys, socket, time, datetime, locale, codecs, random, smtplib, subprocess, pymysql, geoip2.database
from datetime import datetime, timedelta
from http import cookies
#needed line, script does *not* work without it
[root@nexus cgi-bin]# ^C
[root@nexus cgi-bin]# /usr/bin/python3
Python 3.3.2 (default, Aug 14 2014, 14:25:52)
[GCC 4.8.2 20140120 (Red Hat 4.8.2-16)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
KeyboardInterrupt
>>>
KeyboardInterrupt
>>> quit()
[root@nexus cgi-bin]#
[root@nexus cgi-bin]# /usr/bin/python3 ./metrites.py
Error in sys.excepthook:
ValueError: underlying buffer has been detached
Original exception was:
Traceback (most recent call last):
File "/opt/rh/python33/root/usr/lib64/python3.3/os.py", line 673, in __getitem__
value = self._data[self.encodekey(key)]
KeyError: b'HTTP_USER_AGENT'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "./metrites.py", line 22, in <module>
userinfo = os.environ['HTTP_USER_AGENT']
File "/opt/rh/python33/root/usr/lib64/python3.3/os.py", line 676, in __getitem__
raise KeyError(key)
KeyError: 'HTTP_USER_AGENT'
[root@nexus cgi-bin]# ^C
You want me try running the script as the owner of the cgi-bin/ folder?
Back to comp.os.linux.misc | Previous | Next — Previous in thread | Next in thread | Find similar
Help me resolv this cgi:error Nikos Gr33k <nikos.gr33k@gmail.com> - 2016-02-16 13:33 -0800
Re: Help me resolv this cgi:error Joe Beanfish <joebeanfish@nospam.duh> - 2016-02-17 14:08 +0000
Re: Help me resolv this cgi:error Nikos Gr33k <nikos.gr33k@gmail.com> - 2016-02-18 06:49 -0800
Re: Help me resolv this cgi:error Joe Beanfish <joebeanfish@nospam.duh> - 2016-02-18 15:17 +0000
Re: Help me resolv this cgi:error Nikos Gr33k <nikos.gr33k@gmail.com> - 2016-02-18 07:30 -0800
Re: Help me resolv this cgi:error Joe Beanfish <joebeanfish@nospam.duh> - 2016-02-19 19:58 +0000
Re: Help me resolv this cgi:error Robert Riches <spamtrap42@jacob21819.net> - 2016-02-20 03:44 +0000
Re: Help me resolv this cgi:error Eli the Bearded <*@eli.users.panix.com> - 2016-02-24 22:24 +0000
csiph-web