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


Groups > comp.lang.python > #47142 > unrolled thread

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

Started byΝικόλαος Κούρας <nikos.gr33k@gmail.com>
First post2013-06-05 12:54 -0700
Last post2013-06-09 08:21 +1000
Articles 17 on this page of 37 — 10 participants

Back to article view | Back to comp.lang.python


Contents

  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

Page 2 of 2 — ← Prev page 1 [2]


#47268

FromΝικόλαος Κούρας <nikos.gr33k@gmail.com>
Date2013-06-06 13:07 -0700
Message-ID<d3056599-bc74-4b06-818b-2578b8af4017@googlegroups.com>
In reply to#47265
Something else i need to try so for 'suexec' to be able to open its own lof file?

What a weird error that is. An Apache's extension that can open its own log file.....

[toc] | [prev] | [next] | [standalone]


#47271

FromLele Gaifax <lele@metapensiero.it>
Date2013-06-06 22:28 +0200
Message-ID<mailman.2826.1370550608.3114.python-list@python.org>
In reply to#47208
Skip Montanaro <skip@pobox.com> writes:

> He will get an extra blank line, since he added a newline character at
> the end of his Content-Type string.

Right, missed that, sorry for the noise.
ciao, lele.
-- 
nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia.
lele@metapensiero.it  |                 -- Fortunato Depero, 1929.

[toc] | [prev] | [next] | [standalone]


#47313

FromΝικόλαος Κούρας <nikos.gr33k@gmail.com>
Date2013-06-07 00:20 -0700
Message-ID<32cb683f-cc4b-4c05-a158-137668debb1c@googlegroups.com>
In reply to#47271
Any other ideas guys?
I can output for you any command you ask me too, so you have a better understanding about this suexec thing.


I have checked the path to the error log file too, it's not just enough 
that the file is accessible for a user, the whole path to the file needs 
to have the right permissions. 

ls -ld /var/log/httpd 
ls -ld /var/log 

both of those needs to have xr for group and others (as far as i know x allows a user to get into the directory, r gives the user the ability to list files in the directory). 

So,

---------------------------------------------------
nikos@superhost.gr [~]# ls -ld /var/log/ 
drwxr-xr-x 8 root root 4096 Jun  6 08:56 /var/log// 

root@nikos [~]# ls -ld /var/log/httpd/
drw-rw-rw- 2 root root 4096 Jun  6 22:03 /var/log/httpd//

root@nikos [~]# chmod 666 /var/log/httpd/
root@nikos [~]# ls -l /var/log/httpd/
total 8
drw-rw-rw- 2 root   root   4096 Jun  6 22:03 ./
drwxr-xr-x 8 root   root   4096 Jun  7 10:02 ../
-rwxr-xr-x 1 nobody nobody    0 Apr 14 08:57 error_log*
-rwxr-xr-x 1 nobody nobody    0 Jun  1 02:52 suexec_log*

----------------------------------------------------------

nikos@superhost.gr [~]# ls -ld /usr/local/apache/logs/ 
drwxr-xr-x 2 root root 4096 Jun  6 08:14 /usr/local/apache/logs// 

nikos@superhost.gr [~]# ls -ld /usr/local/apache/ 
drwxr-xr-x 17 root root 4096 May 16 22:46 /usr/local/apache// 

root@nikos [~]# chown nobody:nobody /usr/local/apache/logs/suexec_log

root@nikos [~]# ls -l /usr/local/apache/logs/suexec_log
-rw-rw-r-- 1 nobody nobody 678180 Jun  7 08:29 /usr/local/apache/logs/suexec_log
root@nikos [~]#

----------------------------------------------------------

Because i'm a bit confused both 'suexec' files need to change? 
And what are the differences of them? 
Why two 'suexec' logs appear? 
httpd != Apache ? 

[toc] | [prev] | [next] | [standalone]


#47317

FromΝικόλαος Κούρας <nikos.gr33k@gmail.com>
Date2013-06-07 00:51 -0700
Message-ID<9d6779ba-0810-4c48-8ba4-d997bbb16408@googlegroups.com>
In reply to#47313
Finally no suexec erros any more after chown all log files to nobody:nobody and thei corresponding paths.

Now the error has been transformed to:


[Fri Jun 07 10:48:47 2013] [error] [client 79.103.41.173] (2)No such file or directory: exec of '/home/nikos/public_html/cgi-bin/koukos.py' failed
[Fri Jun 07 10:48:47 2013] [error] [client 79.103.41.173] Premature end of script headers: koukos.py
[Fri Jun 07 10:48:47 2013] [error] [client 79.103.41.173] File does not exist: /home/nikos/public_html/500.shtml


but from interpretor view:

nikos@superhost.gr [~/www/cgi-bin]# python koukos.py
Set-Cookie: nikos=admin; expires=Mon, 02 Jun 2014 07:50:18 GMT; Path=/
Content-type: text/html; charset=utf-8

ΑΠΟ ΔΩ ΚΑΙ ΣΤΟ ΕΞΗΣ ΔΕΝ ΣΕ ΕΙΔΑ, ΔΕΝ ΣΕ ΞΕΡΩ, ΔΕΝ ΣΕ ΑΚΟΥΣΑ! ΘΑ ΕΙΣΑΙ ΠΛΕΟΝ Ο ΑΟΡΑΤΟΣ ΕΠΙΣΚΕΠΤΗΣ!!



(2)No such file or directory: exec of '/home/nikos/public_html/cgi-bin/koukos.py' failed

???? Can find what? koukos.py is there inside the cg-bin dir with 755 perms.

[toc] | [prev] | [next] | [standalone]


#47331

FromMRAB <python@mrabarnett.plus.com>
Date2013-06-07 15:32 +0100
Message-ID<mailman.2853.1370615527.3114.python-list@python.org>
In reply to#47317
On 07/06/2013 08:51, Νικόλαος Κούρας wrote:
> Finally no suexec erros any more after chown all log files to nobody:nobody and thei corresponding paths.
>
> Now the error has been transformed to:
>
>
> [Fri Jun 07 10:48:47 2013] [error] [client 79.103.41.173] (2)No such file or directory: exec of '/home/nikos/public_html/cgi-bin/koukos.py' failed
> [Fri Jun 07 10:48:47 2013] [error] [client 79.103.41.173] Premature end of script headers: koukos.py
> [Fri Jun 07 10:48:47 2013] [error] [client 79.103.41.173] File does not exist: /home/nikos/public_html/500.shtml
>
>
> but from interpretor view:
>
> nikos@superhost.gr [~/www/cgi-bin]# python koukos.py
> Set-Cookie: nikos=admin; expires=Mon, 02 Jun 2014 07:50:18 GMT; Path=/
> Content-type: text/html; charset=utf-8
>
> ΑΠΟ ΔΩ ΚΑΙ ΣΤΟ ΕΞΗΣ ΔΕΝ ΣΕ ΕΙΔΑ, ΔΕΝ ΣΕ ΞΕΡΩ, ΔΕΝ ΣΕ ΑΚΟΥΣΑ! ΘΑ ΕΙΣΑΙ ΠΛΕΟΝ Ο ΑΟΡΑΤΟΣ ΕΠΙΣΚΕΠΤΗΣ!!
>
>
>
> (2)No such file or directory: exec of '/home/nikos/public_html/cgi-bin/koukos.py' failed
>
> ???? Can find what? koukos.py is there inside the cg-bin dir with 755 perms.
>
It's looking for '/home/nikos/public_html/cgi-bin/koukos.py'.

Have a look in '/home/nikos/public_html/cgi-bin'. Is 'koukos.py' in
there?

[toc] | [prev] | [next] | [standalone]


#47344

FromΝικόλαος Κούρας <nikos.gr33k@gmail.com>
Date2013-06-07 11:24 -0700
Message-ID<4cb931e0-821a-4e91-9719-2ab346dc7b72@googlegroups.com>
In reply to#47331
Τη Παρασκευή, 7 Ιουνίου 2013 5:32:09 μ.μ. UTC+3, ο χρήστης MRAB έγραψε:
>>Can find what? koukos.py is there inside the cg-bin dir with 755 perms.

> It's looking for '/home/nikos/public_html/cgi-bin/koukos.py'.

Its looking for its self?!?!

> Have a look in '/home/nikos/public_html/cgi-bin'. Is 'koukos.py' in
> there?
Yes it is.


nikos@superhost.gr [~/www/cgi-bin]# ls -l
total 56
drwxr-xr-x 2 nikos nikos   4096 Jun  6 20:29 ./
drwxr-x--- 4 nikos nobody  4096 Jun  5 11:32 ../
-rwxr-xr-x 1 nikos nikos   1199 Apr 25 15:33 convert.py*
-rwxr-xr-x 1 nikos nikos   5434 Jun  7 14:51 files.py*
-rw-r--r-- 1 nikos nikos    170 May 30 15:18 .htaccess
-rwxr-xr-x 1 nikos nikos   1160 Jun  6 06:27 koukos.py*
-rwxr-xr-x 1 nikos nikos   9356 Jun  6 09:13 metrites.py*
-rwxr-xr-x 1 nikos nikos  13512 Jun  6 09:13 pelatologio.py*
nikos@superhost.gr [~/www/cgi-bin]#

[toc] | [prev] | [next] | [standalone]


#47353

FromMRAB <python@mrabarnett.plus.com>
Date2013-06-07 21:47 +0100
Message-ID<mailman.2865.1370638075.3114.python-list@python.org>
In reply to#47344
On 07/06/2013 19:24, Νικόλαος Κούρας wrote:
> Τη Παρασκευή, 7 Ιουνίου 2013 5:32:09 μ.μ. UTC+3, ο χρήστης MRAB έγραψε:
>>>Can find what? koukos.py is there inside the cg-bin dir with 755 perms.
>
>> It's looking for '/home/nikos/public_html/cgi-bin/koukos.py'.
>
> Its looking for its self?!?!
>
>> Have a look in '/home/nikos/public_html/cgi-bin'. Is 'koukos.py' in
>> there?
> Yes it is.
>
>
> nikos@superhost.gr [~/www/cgi-bin]# ls -l
> total 56
> drwxr-xr-x 2 nikos nikos   4096 Jun  6 20:29 ./
> drwxr-x--- 4 nikos nobody  4096 Jun  5 11:32 ../
> -rwxr-xr-x 1 nikos nikos   1199 Apr 25 15:33 convert.py*
> -rwxr-xr-x 1 nikos nikos   5434 Jun  7 14:51 files.py*
> -rw-r--r-- 1 nikos nikos    170 May 30 15:18 .htaccess
> -rwxr-xr-x 1 nikos nikos   1160 Jun  6 06:27 koukos.py*
> -rwxr-xr-x 1 nikos nikos   9356 Jun  6 09:13 metrites.py*
> -rwxr-xr-x 1 nikos nikos  13512 Jun  6 09:13 pelatologio.py*
> nikos@superhost.gr [~/www/cgi-bin]#
>
The prompt says "~/www/cgi-bin".

Is that the same as "/home/nikos/public_html/cgi-bin"?

Try:

ls -l /home/nikos/public_html/cgi-bin

[toc] | [prev] | [next] | [standalone]


#47372

FromΝικόλαος Κούρας <nikos.gr33k@gmail.com>
Date2013-06-07 23:53 -0700
Message-ID<e18cfe3e-c4ec-4f00-941b-c62f38552b35@googlegroups.com>
In reply to#47353
Τη Παρασκευή, 7 Ιουνίου 2013 11:47:58 μ.μ. UTC+3, ο χρήστης MRAB έγραψε:
> On 07/06/2013 19:24, Νικόλαος Κούρας wrote:
> 
> > Τη Παρασκευή, 7 Ιουνίου 2013 5:32:09 μ.μ. UTC+3, ο χρήστης MRAB έγραψε:
> 
> >>>Can find what? koukos.py is there inside the cg-bin dir with 755 perms.
> 
> >
> 
> >> It's looking for '/home/nikos/public_html/cgi-bin/koukos.py'.
> 
> >
> 
> > Its looking for its self?!?!
> 
> >
> 
> >> Have a look in '/home/nikos/public_html/cgi-bin'. Is 'koukos.py' in
> 
> >> there?
> 
> > Yes it is.
> 
> >
> 
> >
> 
> > nikos@superhost.gr [~/www/cgi-bin]# ls -l
> 
> > total 56
> 
> > drwxr-xr-x 2 nikos nikos   4096 Jun  6 20:29 ./
> 
> > drwxr-x--- 4 nikos nobody  4096 Jun  5 11:32 ../
> 
> > -rwxr-xr-x 1 nikos nikos   1199 Apr 25 15:33 convert.py*
> 
> > -rwxr-xr-x 1 nikos nikos   5434 Jun  7 14:51 files.py*
> 
> > -rw-r--r-- 1 nikos nikos    170 May 30 15:18 .htaccess
> 
> > -rwxr-xr-x 1 nikos nikos   1160 Jun  6 06:27 koukos.py*
> 
> > -rwxr-xr-x 1 nikos nikos   9356 Jun  6 09:13 metrites.py*
> 
> > -rwxr-xr-x 1 nikos nikos  13512 Jun  6 09:13 pelatologio.py*
> 
> > nikos@superhost.gr [~/www/cgi-bin]#
> 
> >
> 
> The prompt says "~/www/cgi-bin".
> 
> 
> 
> Is that the same as "/home/nikos/public_html/cgi-bin"?
> 
> 
> 
> Try:
> 
> 
> 
> ls -l /home/nikos/public_html/cgi-bin

Good day MRAB, yes '~/www' its a symlink to '~/public_html'

nikos@superhost.gr [~/www/data/apps]# ls -ld /home/nikos/www/
drwxr-x--- 4 nikos nobody 4096 Jun  5 11:32 /home/nikos/www//
nikos@superhost.gr [~/www/data/apps]# ls -ld /home/nikos/public_html/
drwxr-x--- 4 nikos nobody 4096 Jun  5 11:32 /home/nikos/public_html//
nikos@superhost.gr [~/www/data/apps]# ls -l /home/nikos/public_html/cgi-bin
total 56
drwxr-xr-x 2 nikos nikos   4096 Jun  6 20:29 ./
drwxr-x--- 4 nikos nobody  4096 Jun  5 11:32 ../
-rwxr-xr-x 1 nikos nikos   1199 Apr 25 15:33 convert.py*
-rwxr-xr-x 1 nikos nikos   5793 Jun  8 09:39 files.py*
-rw-r--r-- 1 nikos nikos    170 May 30 15:18 .htaccess
-rwxr-xr-x 1 nikos nikos   1160 Jun  6 06:27 koukos.py*
-rwxr-xr-x 1 nikos nikos   9356 Jun  6 09:13 metrites.py*
-rwxr-xr-x 1 nikos nikos  13512 Jun  6 09:13 pelatologio.py*
nikos@superhost.gr [~/www/data/apps]# ls -l /home/nikos/www/cgi-bin/
total 56
drwxr-xr-x 2 nikos nikos   4096 Jun  6 20:29 ./
drwxr-x--- 4 nikos nobody  4096 Jun  5 11:32 ../
-rwxr-xr-x 1 nikos nikos   1199 Apr 25 15:33 convert.py*
-rwxr-xr-x 1 nikos nikos   5793 Jun  8 09:39 files.py*
-rw-r--r-- 1 nikos nikos    170 May 30 15:18 .htaccess
-rwxr-xr-x 1 nikos nikos   1160 Jun  6 06:27 koukos.py*
-rwxr-xr-x 1 nikos nikos   9356 Jun  6 09:13 metrites.py*
-rwxr-xr-x 1 nikos nikos  13512 Jun  6 09:13 pelatologio.py*
nikos@superhost.gr [~/www/data/apps]#

[toc] | [prev] | [next] | [standalone]


#47374

FromChris Angelico <rosuav@gmail.com>
Date2013-06-08 17:01 +1000
Message-ID<mailman.2880.1370674919.3114.python-list@python.org>
In reply to#47372
On Sat, Jun 8, 2013 at 4:53 PM, Νικόλαος Κούρας <nikos.gr33k@gmail.com> wrote:
> Τη Παρασκευή, 7 Ιουνίου 2013 11:47:58 μ.μ. UTC+3, ο χρήστης MRAB έγραψε:
>> On 07/06/2013 19:24, Νικόλαος Κούρας wrote:
\>> > Τη Παρασκευή, 7 Ιουνίου 2013 5:32:09 μ.μ. UTC+3, ο χρήστης MRAB έγραψε:
>> >> It's looking for '/home/nikos/public_html/cgi-bin/koukos.py'.
>> >> Have a look in '/home/nikos/public_html/cgi-bin'. Is 'koukos.py' in
>> >> there?
>> > Yes it is.
>> > nikos@superhost.gr [~/www/cgi-bin]# ls -l
>> > -rwxr-xr-x 1 nikos nikos   1160 Jun  6 06:27 koukos.py*
>> The prompt says "~/www/cgi-bin".
>> Is that the same as "/home/nikos/public_html/cgi-bin"?
> Good day MRAB, yes '~/www' its a symlink to '~/public_html'

More basics. When someone asks you to check something, check exactly
that. It really does not help to check something unrelated. If you'd
shown in your prompt ~/public_html/cgi-bin rather than your symlink of
www, there would have been less confusion; putting the full path in as
a parameter would eliminate all trouble. By using the symlink, you
demand that we understand or assume something about your system, and
that's unnecessary.

ChrisA

[toc] | [prev] | [next] | [standalone]


#47383

FromΝικόλαος Κούρας <nikos.gr33k@gmail.com>
Date2013-06-08 08:36 -0700
Message-ID<38d5874e-4f4f-408a-8230-3aa8dae46fa8@googlegroups.com>
In reply to#47374
Τη Σάββατο, 8 Ιουνίου 2013 10:01:51 π.μ. UTC+3, ο χρήστης Chris Angelico έγραψε:
> On Sat, Jun 8, 2013 at 4:53 PM, Νικόλαος Κούρας <nikos.gr33k@gmail.com> wrote:
> 
> > Τη Παρασκευή, 7 Ιουνίου 2013 11:47:58 μ.μ. UTC+3, ο χρήστης MRAB έγραψε:
> 
> >> On 07/06/2013 19:24, Νικόλαος Κούρας wrote:
> 
> \>> > Τη Παρασκευή, 7 Ιουνίου 2013 5:32:09 μ.μ. UTC+3, ο χρήστης MRAB έγραψε:
> 
> >> >> It's looking for '/home/nikos/public_html/cgi-bin/koukos.py'.
> 
> >> >> Have a look in '/home/nikos/public_html/cgi-bin'. Is 'koukos.py' in
> 
> >> >> there?
> 
> >> > Yes it is.
> 
> >> > nikos@superhost.gr [~/www/cgi-bin]# ls -l
> 
> >> > -rwxr-xr-x 1 nikos nikos   1160 Jun  6 06:27 koukos.py*
> 
> >> The prompt says "~/www/cgi-bin".
> 
> >> Is that the same as "/home/nikos/public_html/cgi-bin"?
> 
> > Good day MRAB, yes '~/www' its a symlink to '~/public_html'
> 
> 
> 
> More basics. When someone asks you to check something, check exactly
> 
> that. It really does not help to check something unrelated. If you'd
> 
> shown in your prompt ~/public_html/cgi-bin rather than your symlink of
> 
> www, there would have been less confusion; putting the full path in as
> 
> a parameter would eliminate all trouble. By using the symlink, you
> 
> demand that we understand or assume something about your system, and
> 
> that's unnecessary.

Well, www as symlink to public_html is always a symlink to any system i have used so its something defaulted.

[toc] | [prev] | [next] | [standalone]


#47384

FromChris Angelico <rosuav@gmail.com>
Date2013-06-09 02:03 +1000
Message-ID<mailman.2885.1370707447.3114.python-list@python.org>
In reply to#47383
On Sun, Jun 9, 2013 at 1:36 AM, Νικόλαος Κούρας <nikos.gr33k@gmail.com> wrote:
> Τη Σάββατο, 8 Ιουνίου 2013 10:01:51 π.μ. UTC+3, ο χρήστης Chris Angelico έγραψε:
>> On Sat, Jun 8, 2013 at 4:53 PM, Νικόλαος Κούρας <nikos.gr33k@gmail.com> wrote:
>>
>> > Τη Παρασκευή, 7 Ιουνίου 2013 11:47:58 μ.μ. UTC+3, ο χρήστης MRAB έγραψε:
>>
>> >> On 07/06/2013 19:24, Νικόλαος Κούρας wrote:
>>
>> \>> > Τη Παρασκευή, 7 Ιουνίου 2013 5:32:09 μ.μ. UTC+3, ο χρήστης MRAB έγραψε:
>>
>> >> >> It's looking for '/home/nikos/public_html/cgi-bin/koukos.py'.
>>
>> >> >> Have a look in '/home/nikos/public_html/cgi-bin'. Is 'koukos.py' in
>>
>> >> >> there?
>>
>> >> > Yes it is.
>>
>> >> > nikos@superhost.gr [~/www/cgi-bin]# ls -l
>>
>> >> > -rwxr-xr-x 1 nikos nikos   1160 Jun  6 06:27 koukos.py*
>>
>> >> The prompt says "~/www/cgi-bin".
>>
>> >> Is that the same as "/home/nikos/public_html/cgi-bin"?
>>
>> > Good day MRAB, yes '~/www' its a symlink to '~/public_html'
>>
>>
>>
>> More basics. When someone asks you to check something, check exactly
>>
>> that. It really does not help to check something unrelated. If you'd
>>
>> shown in your prompt ~/public_html/cgi-bin rather than your symlink of
>>
>> www, there would have been less confusion; putting the full path in as
>>
>> a parameter would eliminate all trouble. By using the symlink, you
>>
>> demand that we understand or assume something about your system, and
>>
>> that's unnecessary.
>
> Well, www as symlink to public_html is always a symlink to any system i have used so its something defaulted.

It's most certainly not the default, it's definitely not universal,
and that has nothing to do with what I said. Use the exact same path,
it reduces confusion. Also, I think it's time to mention again: Get
yourself off Google Groups, or start trimming out the stupid double
spacing! It's getting extremely annoying.

ChrisA

[toc] | [prev] | [next] | [standalone]


#47390

FromΝικόλαος Κούρας <nikos.gr33k@gmail.com>
Date2013-06-08 09:56 -0700
Message-ID<e5432e70-23ee-4675-ab98-9bf67647c812@googlegroups.com>
In reply to#47384
Τη Σάββατο, 8 Ιουνίου 2013 7:03:57 μ.μ. UTC+3, ο χρήστης Chris Angelico έγραψε:
> On Sun, Jun 9, 2013 at 1:36 AM, Νικόλαος Κούρας <nikos.gr33k@gmail.com> wrote:

> > Well, www as symlink to public_html is always a symlink to any system i
> > have used so its something defaulted.

> It's most certainly not the default, it's definitely not universal 
> and that has nothing to do with what I said. Use the exact same path,
> it reduces confusion. Also, I think it's time to mention again: Get
> yourself off Google Groups, or start trimming out the stupid double
> spacing! It's getting extremely annoying.


its very tedious to always triming everything for me and i know it is for you to ead it assuc. Damn google groups, why is it behaving as such?
Dont the programmers know about it?

Also everytime i post it always display to me different addresses to get responses back.

Any way what did you say and i havent understand you correctly?
What path do you want me to show to you?

What does this error means anyway?

[toc] | [prev] | [next] | [standalone]


#47407

FromMichael Torrie <torriem@gmail.com>
Date2013-06-08 15:17 -0600
Message-ID<mailman.2896.1370726250.3114.python-list@python.org>
In reply to#47390
On 06/08/2013 10:56 AM, Νικόλαος Κούρας wrote:
> its very tedious to always triming everything for me and i know it is
> for you to ead it assuc. Damn google groups, why is it behaving as
> such? Dont the programmers know about it?

Most of us on the list don't use google groups. A number of us use plain
old e-mail to post to the list.  If you set up folders and rules in your
e-mail client (or labels and filter in Gmail), then messages can go into
their own folder.

> Any way what did you say and i havent understand you correctly? What
> path do you want me to show to you?

He means that you should configure apache to use the real path on your
file system, not the symlink.  IE if www is just a symlink to
public_html, reconfigure apache to not use www at all and use
public_html.  That way you can avoid these kinds of errors.

> What does this error means anyway?

It means that Apache is unable to find your cgi script.  It's turning
the url into a file path, but it can't find the file path.  Sometimes
Apache is configured to not follow symlinks.

It's confusing too because you have two apaches installed.  The system
default one and the one that comes with cPanel.

[toc] | [prev] | [next] | [standalone]


#47410

FromΝικόλαος Κούρας <nikos.gr33k@gmail.com>
Date2013-06-08 14:33 -0700
Message-ID<4a5d3941-13ee-4172-8eaa-971b4c783bac@googlegroups.com>
In reply to#47407
Τη Κυριακή, 9 Ιουνίου 2013 12:17:16 π.μ. UTC+3, ο χρήστης Michael Torrie έγραψε:

> > What does this error means anyway?

> It means that Apache is unable to find your cgi script.  It's turning 
> the url into a file path, but it can't find the file path.  Sometimes 
> Apache is configured to not follow symlinks.

Why every other python cgi script of mine that i run via browser  doesnt produce this kind of error and only 'koukos.py' does?

> It's confusing too because you have two apaches installed.  The system 
> default one and the one that comes with cPanel.

Hi Michael, indeed they are too.
I wonder why cPanel deosnt use the default apache that came with the system and isntead complied its own.

anyway httpd.conf seems correct
==========
root@nikos [~]# cat /usr/local/apache/conf/httpd.conf | grep 'www'
#   system refer to the documentation at: http://www.cpanel.net/support/docs/ea/ea3/customdirectives.html       #
#   system refer to the documentation at: http://www.cpanel.net/support/docs/ea/ea3/customdirectives.html       #
    ServerAlias www.varsa.gr
    ServerAlias www.parking-byzantio.gr
    ServerAlias www.cafebar-idea.gr
    ServerAlias www.dauwin.gr
    ServerAlias www.leonidasgkelos.com
    ServerAlias www.mythosweb.gr
    ServerAlias www.superhost.gr
    ServerAlias www.panostech.gr
    ServerAlias www.pdimou.gr
    ServerAlias www.radio-klepsydra.com
    ServerAlias www.cravendot.gr
    ServerAlias www.ypsilandio.gr
    ServerAlias www.oliveoils.mythosweb.gr
    ServerAlias www.zimotirio.pdimou.gr

root@nikos [~]# cat /usr/local/apache/conf/httpd.conf | grep 'public_html'
UserDir public_html
    DocumentRoot /home/akis/public_html
    ScriptAlias /cgi-bin/ /home/akis/public_html/cgi-bin/
    DocumentRoot /home/byzantio/public_html
    ScriptAlias /cgi-bin/ /home/byzantio/public_html/cgi-bin/
    DocumentRoot /home/cafebar/public_html
    ScriptAlias /cgi-bin/ /home/cafebar/public_html/cgi-bin/
    DocumentRoot /home/dauwin/public_html
    ScriptAlias /cgi-bin/ /home/dauwin/public_html/cgi-bin/
    DocumentRoot /home/gkelos/public_html
    ScriptAlias /cgi-bin/ /home/gkelos/public_html/cgi-bin/
    DocumentRoot /home/mythos/public_html
    ScriptAlias /cgi-bin/ /home/mythos/public_html/cgi-bin/
    DocumentRoot /home/nikos/public_html
    ScriptAlias /cgi-bin/ /home/nikos/public_html/cgi-bin/
    DocumentRoot /home/panos/public_html
    ScriptAlias /cgi-bin/ /home/panos/public_html/cgi-bin/
    DocumentRoot /home/pdimou/public_html
    ScriptAlias /cgi-bin/ /home/pdimou/public_html/cgi-bin/
    DocumentRoot /home/radio/public_html
    ScriptAlias /cgi-bin/ /home/radio/public_html/cgi-bin/
    DocumentRoot /home/tasos/public_html
    ScriptAlias /cgi-bin/ /home/tasos/public_html/cgi-bin/
    DocumentRoot /home/ypsiland/public_html
    ScriptAlias /cgi-bin/ /home/ypsiland/public_html/cgi-bin/
    DocumentRoot /home/mythos/public_html/oliveoils
    ScriptAlias /cgi-bin/ /home/mythos/public_html/oliveoils/cgi-bin/
    DocumentRoot /home/pdimou/public_html/zimotirio
    ScriptAlias /cgi-bin/ /home/pdimou/public_html/zimotirio/cgi-bin/
root@nikos [~]#
=======================

Why every other python cgi script of mines doesnt prodice this error
and only 'koukos.py' does?

[toc] | [prev] | [next] | [standalone]


#47425

Fromnagia.retsina@gmail.com
Date2013-06-08 22:27 -0700
Message-ID<219938b0-a869-4236-9d3c-934549f90231@googlegroups.com>
In reply to#47410
Trying 

yum install dos2unix

and 

root@nikos [/home/nikos/www/cgi-bin]# dos2unix koukos.py
dos2unix: converting file koukos.py to UNIX format ...


Then browsed to the page again in Chrome it worked as expected :-)

[toc] | [prev] | [next] | [standalone]


#47447

FromΝικόλαος Κούρας <nikos.gr33k@gmail.com>
Date2013-06-09 03:42 -0700
Message-ID<4fcd0516-2e72-4283-a4c0-872bb9663a92@googlegroups.com>
In reply to#47425
Τη Κυριακή, 9 Ιουνίου 2013 8:27:53 π.μ. UTC+3, ο χρήστης nagia....@gmail.com έγραψε:
> Trying 
> 
> 
> 
> yum install dos2unix
> 
> 
> 
> and 
> 
> 
> 
> root@nikos [/home/nikos/www/cgi-bin]# dos2unix koukos.py
> 
> dos2unix: converting file koukos.py to UNIX format ...
> 
> 
> 
> 
> 
> Then browsed to the page again in Chrome it worked as expected :-)

So how from  python koukos.py script was interpreting correctly and from browser it failed?

[toc] | [prev] | [next] | [standalone]


#47415

FromChris Angelico <rosuav@gmail.com>
Date2013-06-09 08:21 +1000
Message-ID<mailman.2902.1370730095.3114.python-list@python.org>
In reply to#47390
On Sun, Jun 9, 2013 at 2:56 AM, Νικόλαος Κούρας <nikos.gr33k@gmail.com> wrote:
> Τη Σάββατο, 8 Ιουνίου 2013 7:03:57 μ.μ. UTC+3, ο χρήστης Chris Angelico έγραψε:
>> On Sun, Jun 9, 2013 at 1:36 AM, Νικόλαος Κούρας <nikos.gr33k@gmail.com> wrote:
>
>> > Well, www as symlink to public_html is always a symlink to any system i
>> > have used so its something defaulted.
>
>> It's most certainly not the default, it's definitely not universal
>> and that has nothing to do with what I said. Use the exact same path,
>> it reduces confusion. Also, I think it's time to mention again: Get
>> yourself off Google Groups, or start trimming out the stupid double
>> spacing! It's getting extremely annoying.
>
> its very tedious to always triming everything for me and i know it is for you to ead it assuc.

Then get off Google Groups. There are alternatives. If you can't be
bothered tidying up your posts before you click send, then get
software that doesn't force you to.

ChrisA

[toc] | [prev] | [standalone]


Page 2 of 2 — ← Prev page 1 [2]

Back to top | Article view | comp.lang.python


csiph-web