Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #47007

Re: Apache and suexec issue that wont let me run my python script

Newsgroups comp.lang.python
Date 2013-06-04 21:35 -0700
References (22 earlier) <592c84d8-2e86-4480-b784-c3ccadc8360d@googlegroups.com> <mailman.2666.1370365761.3114.python-list@python.org> <06fd6c2e-0979-4d61-b75a-6d9df7c1b624@googlegroups.com> <mailman.2688.1370383955.3114.python-list@python.org> <70390d65-5313-46bf-8110-b25f5fc9f76f@googlegroups.com>
Message-ID <56b0085f-b025-4314-b6dd-9566eba14bb4@googlegroups.com> (permalink)
Subject Re: Apache and suexec issue that wont let me run my python script
From Νικόλαος Κούρας <nikos.gr33k@gmail.com>

Show all headers | View raw


Here is the script:

================================
#!/usr/bin/python
# coding=utf-8

import cgitb; cgitb.enable()
import cgi, os, sys, locale, codecs
from http import cookies

#needed line, script does *not* work without it
sys.stdout = codecs.getwriter('utf-8')(sys.stdout.detach())

# initialize cookie
cookie = cookies.SimpleCookie( os.environ.get('HTTP_COOKIE') )
cookie.load( cookie )
nikos = cookie.get('nikos')

# if visitor cookie does exist
if nikos:
	message = "ΑΠΟ ΤΗΝ ΕΠΟΜΕΝΗ ΕΠΙΣΚΕΨΗ ΣΟΥ ΘΑ ΣΕ ΥΠΟΛΟΓΙΖΩ ΩΣ ΕΠΙΣΚΕΠΤΗ ΑΥΞΑΝΟΝΤΑΣ ΤΟΝ ΜΕΤΡΗΤΗ!"
	cookie['nikos'] = 'admin'
	cookie['nikos']['path'] = '/'
	cookie['nikos']['expires'] = -1		#this cookie will expire now
else:
	message  = "ΑΠΟ ΔΩ ΚΑΙ ΣΤΟ ΕΞΗΣ ΔΕΝ ΣΕ ΕΙΔΑ, ΔΕΝ ΣΕ ΞΕΡΩ, ΔΕΝ ΣΕ ΑΚΟΥΣΑ! ΘΑ ΕΙΣΑΙ ΠΛΕΟΝ Ο ΑΟΡΑΤΟΣ ΕΠΙΣΚΕΠΤΗΣ!!"
	cookie['nikos'] = 'admin'
	cookie['nikos']['path'] = '/'
	cookie['nikos']['expires'] = 60*60*24*30*12		#this cookie will expire in a year


print( cookie, "Content-type: text/html; charset=utf-8\n", message )

sys.exit(0)
===================================

This doesn't make sense to me at all.I'll iam tryign to set is a cookie, iwas so happy finally disablin bloody 'suexec' and now this.

[Wed Jun 05 06:49:56 2013] [error] [client 46.12.95.59] (2)No such file or directory: exec of '/home/nikos/public_html/cgi-bin/koukos.py' failed 
[Wed Jun 05 06:49:56 2013] [error] [client 46.12.95.59] Premature end of script headers: koukos.py

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Apache and suexec issue that wont let me run my python script Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-05-31 22:30 -0700
  Re: Apache and suexec issue that wont let me run my python script Chris Angelico <rosuav@gmail.com> - 2013-06-01 15:38 +1000
    Re: Apache and suexec issue that wont let me run my python script Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-01 00:49 -0700
      Re: Apache and suexec issue that wont let me run my python script Chris Angelico <rosuav@gmail.com> - 2013-06-01 17:56 +1000
        Re: Apache and suexec issue that wont let me run my python script Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-01 01:31 -0700
  Re: Apache and suexec issue that wont let me run my python script Alain Ketterlin <alain@dpt-info.u-strasbg.fr> - 2013-06-01 11:03 +0200
    Re: Apache and suexec issue that wont let me run my python script Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-01 02:19 -0700
  Re: Apache and suexec issue that wont let me run my python script Paul Kölle <paul@subsignal.org> - 2013-06-02 13:51 +0200
  Re: Apache and suexec issue that wont let me run my python script Anssi Saari <as@sci.fi> - 2013-06-03 18:20 +0300
    RE: Apache and suexec issue that wont let me run my python script Carlos Nepomuceno <carlosnepomuceno@outlook.com> - 2013-06-04 01:13 +0300
    Re: Apache and suexec issue that wont let me run my python script Michael Torrie <torriem@gmail.com> - 2013-06-03 17:23 -0600
    RE: Apache and suexec issue that wont let me run my python script Carlos Nepomuceno <carlosnepomuceno@outlook.com> - 2013-06-04 02:33 +0300
    Re: Apache and suexec issue that wont let me run my python script Michael Torrie <torriem@gmail.com> - 2013-06-03 22:45 -0600
    Re: Apache and suexec issue that wont let me run my python script Chris Angelico <rosuav@gmail.com> - 2013-06-04 17:51 +1000
      Re: Apache and suexec issue that wont let me run my python script Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-04 03:12 -0700
        Re: Apache and suexec issue that wont let me run my python script Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-04 03:17 -0700
        Re: Apache and suexec issue that wont let me run my python script Benjamin Schollnick <benjamin@schollnick.net> - 2013-06-04 06:21 -0400
          Re: Apache and suexec issue that wont let me run my python script Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-04 03:56 -0700
            RE: Apache and suexec issue that wont let me run my python script Carlos Nepomuceno <carlosnepomuceno@outlook.com> - 2013-06-04 14:04 +0300
              Re: Apache and suexec issue that wont let me run my python script Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-04 04:09 -0700
                RE: Apache and suexec issue that wont let me run my python script Carlos Nepomuceno <carlosnepomuceno@outlook.com> - 2013-06-04 14:27 +0300
                Re: Apache and suexec issue that wont let me run my python script Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-04 04:36 -0700
                Re: Apache and suexec issue that wont let me run my python script Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-04 04:38 -0700
                RE: Apache and suexec issue that wont let me run my python script Carlos Nepomuceno <carlosnepomuceno@outlook.com> - 2013-06-04 14:42 +0300
                Re: Apache and suexec issue that wont let me run my python script Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-04 04:48 -0700
                RE: Apache and suexec issue that wont let me run my python script Carlos Nepomuceno <carlosnepomuceno@outlook.com> - 2013-06-04 15:11 +0300
                Re: Apache and suexec issue that wont let me run my python script Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-04 05:54 -0700
                Re: Apache and suexec issue that wont let me run my python script Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2013-06-04 20:41 -0400
                Re: Apache and suexec issue that wont let me run my python script Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-04 05:57 -0700
                Re: Apache and suexec issue that wont let me run my python script Chris Angelico <rosuav@gmail.com> - 2013-06-04 23:10 +1000
                Re: Apache and suexec issue that wont let me run my python script Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-04 06:17 -0700
                Re: Apache and suexec issue that wont let me run my python script Chris Angelico <rosuav@gmail.com> - 2013-06-05 00:33 +1000
                Re: Apache and suexec issue that wont let me run my python script Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-04 07:40 -0700
                Re: Apache and suexec issue that wont let me run my python script Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-06-04 15:49 +0100
                Re: Apache and suexec issue that wont let me run my python script Chris “Kwpolska” Warrick <kwpolska@gmail.com> - 2013-06-04 17:06 +0200
                Re: Apache and suexec issue that wont let me run my python script Chris Angelico <rosuav@gmail.com> - 2013-06-05 01:11 +1000
                Re: Apache and suexec issue that wont let me run my python script Joel Goldstick <joel.goldstick@gmail.com> - 2013-06-04 11:29 -0400
                Re: Apache and suexec issue that wont let me run my python script Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-04 10:02 -0700
                Re: Apache and suexec issue that wont let me run my python script Chris Angelico <rosuav@gmail.com> - 2013-06-05 03:09 +1000
                Re: Apache and suexec issue that wont let me run my python script Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-04 10:12 -0700
                Re: Apache and suexec issue that wont let me run my python script Chris Angelico <rosuav@gmail.com> - 2013-06-05 08:12 +1000
                Re: Apache and suexec issue that wont let me run my python script Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-04 20:55 -0700
                Re: Apache and suexec issue that wont let me run my python script alex23 <wuwei23@gmail.com> - 2013-06-04 21:34 -0700
                Re: Apache and suexec issue that wont let me run my python script Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-04 21:40 -0700
                Re: Apache and suexec issue that wont let me run my python script alex23 <wuwei23@gmail.com> - 2013-06-04 21:59 -0700
                Re: Apache and suexec issue that wont let me run my python script Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-04 22:11 -0700
                Re: Apache and suexec issue that wont let me run my python script alex23 <wuwei23@gmail.com> - 2013-06-04 22:23 -0700
                Re: Apache and suexec issue that wont let me run my python script Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-04 22:58 -0700
                Re: Apache and suexec issue that wont let me run my python script Chris Angelico <rosuav@gmail.com> - 2013-06-05 17:01 +1000
                Re: Apache and suexec issue that wont let me run my python script Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-04 21:35 -0700
                Re: Apache and suexec issue that wont let me run my python script Chris Angelico <rosuav@gmail.com> - 2013-06-05 18:09 +1000
                Re: Apache and suexec issue that wont let me run my python script Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-05 01:26 -0700
                Re: Apache and suexec issue that wont let me run my python script Chris Angelico <rosuav@gmail.com> - 2013-06-05 18:41 +1000
                Re: Apache and suexec issue that wont let me run my python script Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-05 01:53 -0700
                Re: Apache and suexec issue that wont let me run my python script alex23 <wuwei23@gmail.com> - 2013-06-05 01:58 -0700
                Re: Apache and suexec issue that wont let me run my python script Chris Angelico <rosuav@gmail.com> - 2013-06-05 19:05 +1000
                Re: Apache and suexec issue that wont let me run my python script Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-05 02:14 -0700
                Re: Apache and suexec issue that wont let me run my python script Chris Angelico <rosuav@gmail.com> - 2013-06-05 19:27 +1000
                Re: Apache and suexec issue that wont let me run my python script Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-05 02:32 -0700
                Re: Apache and suexec issue that wont let me run my python script Chris Angelico <rosuav@gmail.com> - 2013-06-05 19:41 +1000
                Re: Apache and suexec issue that wont let me run my python script Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-05 02:46 -0700
                Re: Apache and suexec issue that wont let me run my python script alex23 <wuwei23@gmail.com> - 2013-06-05 02:49 -0700
                Re: Apache and suexec issue that wont let me run my python script Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-05 03:32 -0700
                Re: Apache and suexec issue that wont let me run my python script Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-06-05 14:23 +0100
                Re: Apache and suexec issue that wont let me run my python script Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-06-06 03:57 +0000
                Re: Apache and suexec issue that wont let me run my python script Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-05 21:08 -0700
                Re: Apache and suexec issue that wont let me run my python script Heiko Wundram <modelnine@modelnine.org> - 2013-06-05 11:04 +0200
                Re: Apache and suexec issue that wont let me run my python script Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-05 02:19 -0700
                Re: Apache and suexec issue that wont let me run my python script Chris Angelico <rosuav@gmail.com> - 2013-06-05 19:31 +1000
                Re: Apache and suexec issue that wont let me run my python script Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-05 02:37 -0700
                Re: Apache and suexec issue that wont let me run my python script Chris Angelico <rosuav@gmail.com> - 2013-06-05 19:48 +1000
                Re: Apache and suexec issue that wont let me run my python script alex23 <wuwei23@gmail.com> - 2013-06-05 02:52 -0700
                Re: Apache and suexec issue that wont let me run my python script Chris Angelico <rosuav@gmail.com> - 2013-06-05 20:12 +1000
                Re: Apache and suexec issue that wont let me run my python script Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-05 03:30 -0700
                Re: Apache and suexec issue that wont let me run my python script Heiko Wundram <modelnine@modelnine.org> - 2013-06-05 12:37 +0200
                Re: Apache and suexec issue that wont let me run my python script Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2013-06-05 12:39 +0200
                Re: Apache and suexec issue that wont let me run my python script Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-05 04:07 -0700
                Re: Apache and suexec issue that wont let me run my python script alex23 <wuwei23@gmail.com> - 2013-06-05 04:11 -0700
                Re: Apache and suexec issue that wont let me run my python script Heiko Wundram <modelnine@modelnine.org> - 2013-06-05 13:14 +0200
                Re: Apache and suexec issue that wont let me run my python script Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-05 04:19 -0700
                Re: Apache and suexec issue that wont let me run my python script Heiko Wundram <modelnine@modelnine.org> - 2013-06-05 13:37 +0200
                Re: Apache and suexec issue that wont let me run my python script Chris Angelico <rosuav@gmail.com> - 2013-06-06 02:33 +1000
                Re: Apache and suexec issue that wont let me run my python script Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-05 10:02 -0700
                Re: Apache and suexec issue that wont let me run my python script Chris Angelico <rosuav@gmail.com> - 2013-06-06 03:16 +1000
                Re: Apache and suexec issue that wont let me run my python script Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-05 10:29 -0700
                Re: Apache and suexec issue that wont let me run my python script Chris Angelico <rosuav@gmail.com> - 2013-06-06 03:47 +1000
                Re: Apache and suexec issue that wont let me run my python script Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-05 11:08 -0700
                Re: Apache and suexec issue that wont let me run my python script Chris Angelico <rosuav@gmail.com> - 2013-06-06 04:16 +1000
                Re: Apache and suexec issue that wont let me run my python script Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-05 11:22 -0700
                Re: Apache and suexec issue that wont let me run my python script Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-05 11:34 -0700
                Re: Apache and suexec issue that wont let me run my python script Chris Angelico <rosuav@gmail.com> - 2013-06-06 04:46 +1000
                Re: Apache and suexec issue that wont let me run my python script Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-05 11:53 -0700
                Re: Apache and suexec issue that wont let me run my python script Zero Piraeus <schesis@gmail.com> - 2013-06-05 14:52 -0400
                Re: Apache and suexec issue that wont let me run my python script Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-05 11:58 -0700
                Re: Apache and suexec issue that wont let me run my python script Chris Angelico <rosuav@gmail.com> - 2013-06-06 05:13 +1000
                Re: Apache and suexec issue that wont let me run my python script Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-05 12:18 -0700
                Re: Apache and suexec issue that wont let me run my python script rusi <rustompmody@gmail.com> - 2013-06-05 11:55 -0700
                Re: Apache and suexec issue that wont let me run my python script Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-05 12:03 -0700
                Re: Apache and suexec issue that wont let me run my python script Chris Angelico <rosuav@gmail.com> - 2013-06-06 05:03 +1000
                Re: Apache and suexec issue that wont let me run my python script Joel Goldstick <joel.goldstick@gmail.com> - 2013-06-05 15:29 -0400
                Re: Apache and suexec issue that wont let me run my python script Chris Angelico <rosuav@gmail.com> - 2013-06-06 04:37 +1000
                Re: Apache and suexec issue that wont let me run my python script Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2013-06-05 19:19 -0400
                Re: Apache and suexec issue that wont let me run my python script rurpy@yahoo.com - 2013-06-05 17:57 -0700
                Re: Apache and suexec issue that wont let me run my python script Tim Chase <python.list@tim.thechases.com> - 2013-06-05 21:02 -0500
                Re: Apache and suexec issue that wont let me run my python script rurpy@yahoo.com - 2013-06-06 11:03 -0700
                Re: Apache and suexec issue that wont let me run my python script Chris Angelico <rosuav@gmail.com> - 2013-06-06 02:24 +1000
                Re: Apache and suexec issue that wont let me run my python script Joel Goldstick <joel.goldstick@gmail.com> - 2013-06-05 12:35 -0400
                Re: Apache and suexec issue that wont let me run my python script Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-05 10:07 -0700
                Re: Apache and suexec issue that wont let me run my python script Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-06-05 14:25 +0100
                Re: Apache and suexec issue that wont let me run my python script Chris Angelico <rosuav@gmail.com> - 2013-06-05 19:19 +1000
                Re: Apache and suexec issue that wont let me run my python script Heiko Wundram <modelnine@modelnine.org> - 2013-06-05 11:29 +0200
                Re: Apache and suexec issue that wont let me run my python script Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-05 02:33 -0700
                Re: Apache and suexec issue that wont let me run my python script Heiko Wundram <modelnine@modelnine.org> - 2013-06-05 11:55 +0200
                Re: Apache and suexec issue that wont let me run my python script Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-05 03:21 -0700
                Re: Apache and suexec issue that wont let me run my python script Heiko Wundram <modelnine@modelnine.org> - 2013-06-05 12:33 +0200
                Re: Apache and suexec issue that wont let me run my python script alex23 <wuwei23@gmail.com> - 2013-06-05 01:59 -0700
                Re: Apache and suexec issue that wont let me run my python script Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-05 02:06 -0700
                Re: Apache and suexec issue that wont let me run my python script Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-06-05 14:16 +0100
                Re: Apache and suexec issue that wont let me run my python script Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-05 07:35 -0700
                Re: Apache and suexec issue that wont let me run my python script Serhiy Storchaka <storchaka@gmail.com> - 2013-06-05 17:46 +0300
                Re: Apache and suexec issue that wont let me run my python script Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-05 07:56 -0700
                Re: Apache and suexec issue that wont let me run my python script Chris Angelico <rosuav@gmail.com> - 2013-06-06 02:37 +1000
                Re: Apache and suexec issue that wont let me run my python script Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-05 10:05 -0700
                Re: Apache and suexec issue that wont let me run my python script Chris Angelico <rosuav@gmail.com> - 2013-06-06 03:19 +1000
                RE: Apache and suexec issue that wont let me run my python script Carlos Nepomuceno <carlosnepomuceno@outlook.com> - 2013-06-04 16:13 +0300
                RE: Apache and suexec issue that wont let me run my python script Carlos Nepomuceno <carlosnepomuceno@outlook.com> - 2013-06-04 14:58 +0300

csiph-web