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


Groups > comp.lang.python > #47254

Re: Errin when executing a cgi script that sets a cookie in the browser

Newsgroups comp.lang.python
Date 2013-06-06 11:40 -0700
References (1 earlier) <386bdf4a-53ae-4312-af5d-e28ef10ada42@googlegroups.com> <mailman.2765.1370466218.3114.python-list@python.org> <9d8cdf1b-cc79-4266-9bf5-ce8b690ac74a@googlegroups.com> <ff4b7602-6eb5-4b05-abf6-d164f28c5225@googlegroups.com> <c7437ebf-48e4-4873-832c-ac5529568718@googlegroups.com>
Message-ID <61b47852-9e34-4d9a-9ee3-9801f4cc3065@googlegroups.com> (permalink)
Subject Re: Errin when executing a cgi script that sets a cookie in the browser
From rurpy@yahoo.com

Show all headers | View raw


On 06/06/2013 04:53 AM, Νικόλαος Κούρας wrote:> I have re-enabled 'suexec' and set cgi as default phphandler and then trying:
> 
> print( cookie )
> print( '''Content-type: text/html; charset=utf-8\n''' )
> print( message )
> 
> ---------------------------------
> nikos@superhost.gr [~/www/data/apps]# [Thu Jun 06 13:51:28 2013] [error] [client 79.103.41.173] suexec failure: could not open log file
> [Thu Jun 06 13:51:28 2013] [error] [client 79.103.41.173] fopen: Permission denied
> [Thu Jun 06 13:51:28 2013] [error] [client 79.103.41.173] Premature end of script headers: koukos.py
> 
> Even if dissable/enable suexec still this output error.

This is only a guess but...

The permissions on koukos.py have to be exactly right.
Obviously if they are too restrictive Apache won't be
able to read or execute it.  But they can't be to open 
either -- in particular the file must have execute
permission and must not have write permission for either
group or others (write for user only).

If the permissions are too open, Apache will try to write 
an error message to suexec.log.  I suspect that your 
permissions (or file owner) is wrong on your suexec.log 
file (or containing directory) and that is the cause of 
the "could not open log file " message.

So I think you have too problems: wrong permissions on
koukos.py and wrong owner or permissions on suexec.log.

For reference this is working here:
 -rw-r--r-- 1 apache apache 314 Jun  6 12:19 /var/log/httpd/suexec.log

 -rwxr-xr-x 1 me me 1113 Jun  5 14:40 koukos.py

You'll need to adjust things for your particular Apache 
environment.

As I said, this is only a guess.  Hope it helps.

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


Thread

Errin when executing a cgi script that sets a cookie in the browser Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-05 12:54 -0700
  Re: Errin when executing a cgi script that sets a cookie in the browser John Gordon <gordon@panix.com> - 2013-06-05 20:13 +0000
  Re: Errin when executing a cgi script that sets a cookie in the browser Chris Angelico <rosuav@gmail.com> - 2013-06-06 06:14 +1000
  Re: Errin when executing a cgi script that sets a cookie in the browser rurpy@yahoo.com - 2013-06-05 13:56 -0700
    Re: Errin when executing a cgi script that sets a cookie in the browser Chris Angelico <rosuav@gmail.com> - 2013-06-06 07:03 +1000
      Re: Errin when executing a cgi script that sets a cookie in the browser rurpy@yahoo.com - 2013-06-05 14:18 -0700
        Re: Errin when executing a cgi script that sets a cookie in the browser Chris Angelico <rosuav@gmail.com> - 2013-06-06 08:21 +1000
          Re: Errin when executing a cgi script that sets a cookie in the browser rurpy@yahoo.com - 2013-06-05 15:36 -0700
            Re: Errin when executing a cgi script that sets a cookie in the browser Chris Angelico <rosuav@gmail.com> - 2013-06-06 11:37 +1000
          Re: Errin when executing a cgi script that sets a cookie in the browser Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-05 20:27 -0700
            Re: Errin when executing a cgi script that sets a cookie in the browser Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-05 23:25 -0700
        Re: Errin when executing a cgi script that sets a cookie in the browser Cameron Simpson <cs@zip.com.au> - 2013-06-06 10:32 +1000
        Re: Errin when executing a cgi script that sets a cookie in the browser Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-05 20:23 -0700
          Re: Errin when executing a cgi script that sets a cookie in the browser Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-06 03:53 -0700
            Re: Errin when executing a cgi script that sets a cookie in the browser rurpy@yahoo.com - 2013-06-06 11:40 -0700
              Re: Errin when executing a cgi script that sets a cookie in the browser Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-06 12:01 -0700
                Re: Errin when executing a cgi script that sets a cookie in the browser Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-06 12:08 -0700
            Re: Errin when executing a cgi script that sets a cookie in the browser Lele Gaifax <lele@metapensiero.it> - 2013-06-06 21:26 +0200
              Re: Errin when executing a cgi script that sets a cookie in the browser Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-06 12:30 -0700
            Re: Errin when executing a cgi script that sets a cookie in the browser Skip Montanaro <skip@pobox.com> - 2013-06-06 14:35 -0500
              Re: Errin when executing a cgi script that sets a cookie in the browser Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-06 13:07 -0700
            Re: Errin when executing a cgi script that sets a cookie in the browser Lele Gaifax <lele@metapensiero.it> - 2013-06-06 22:28 +0200
              Re: Errin when executing a cgi script that sets a cookie in the browser Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-07 00:20 -0700
                Re: Errin when executing a cgi script that sets a cookie in the browser Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-07 00:51 -0700
                Re: Errin when executing a cgi script that sets a cookie in the browser MRAB <python@mrabarnett.plus.com> - 2013-06-07 15:32 +0100
                Re: Errin when executing a cgi script that sets a cookie in the browser Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-07 11:24 -0700
                Re: Errin when executing a cgi script that sets a cookie in the browser MRAB <python@mrabarnett.plus.com> - 2013-06-07 21:47 +0100
                Re: Errin when executing a cgi script that sets a cookie in the browser Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-07 23:53 -0700
                Re: Errin when executing a cgi script that sets a cookie in the browser Chris Angelico <rosuav@gmail.com> - 2013-06-08 17:01 +1000
                Re: Errin when executing a cgi script that sets a cookie in the browser Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-08 08:36 -0700
                Re: Errin when executing a cgi script that sets a cookie in the browser Chris Angelico <rosuav@gmail.com> - 2013-06-09 02:03 +1000
                Re: Errin when executing a cgi script that sets a cookie in the browser Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-08 09:56 -0700
                Re: Errin when executing a cgi script that sets a cookie in the browser Michael Torrie <torriem@gmail.com> - 2013-06-08 15:17 -0600
                Re: Errin when executing a cgi script that sets a cookie in the browser Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-08 14:33 -0700
                Re: Errin when executing a cgi script that sets a cookie in the browser nagia.retsina@gmail.com - 2013-06-08 22:27 -0700
                Re: Errin when executing a cgi script that sets a cookie in the browser Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-09 03:42 -0700
                Re: Errin when executing a cgi script that sets a cookie in the browser Chris Angelico <rosuav@gmail.com> - 2013-06-09 08:21 +1000

csiph-web