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

2013-06-09 Thread Νικόλαος Κούρας
Τη Κυριακή, 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

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

2013-06-08 Thread Νικόλαος Κούρας
Τη Παρασκευή, 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

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

2013-06-08 Thread Chris Angelico
On Sat, Jun 8, 2013 at 4:53 PM, Νικόλαος Κούρας nikos.gr...@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

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

2013-06-08 Thread Νικόλαος Κούρας
Τη Σάββατο, 8 Ιουνίου 2013 10:01:51 π.μ. UTC+3, ο χρήστης Chris Angelico έγραψε: On Sat, Jun 8, 2013 at 4:53 PM, Νικόλαος Κούρας nikos.gr...@gmail.com wrote: Τη Παρασκευή, 7 Ιουνίου 2013 11:47:58 μ.μ. UTC+3, ο χρήστης MRAB έγραψε: On 07/06/2013 19:24, Νικόλαος Κούρας wrote: \ Τη

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

2013-06-08 Thread Chris Angelico
On Sun, Jun 9, 2013 at 1:36 AM, Νικόλαος Κούρας nikos.gr...@gmail.com wrote: Τη Σάββατο, 8 Ιουνίου 2013 10:01:51 π.μ. UTC+3, ο χρήστης Chris Angelico έγραψε: On Sat, Jun 8, 2013 at 4:53 PM, Νικόλαος Κούρας nikos.gr...@gmail.com wrote: Τη Παρασκευή, 7 Ιουνίου 2013 11:47:58 μ.μ. UTC+3, ο

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

2013-06-08 Thread Νικόλαος Κούρας
Τη Σάββατο, 8 Ιουνίου 2013 7:03:57 μ.μ. UTC+3, ο χρήστης Chris Angelico έγραψε: On Sun, Jun 9, 2013 at 1:36 AM, Νικόλαος Κούρας nikos.gr...@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

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

2013-06-08 Thread Michael Torrie
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

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

2013-06-08 Thread Νικόλαος Κούρας
Τη Κυριακή, 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

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

2013-06-08 Thread Chris Angelico
On Sun, Jun 9, 2013 at 2:56 AM, Νικόλαος Κούρας nikos.gr...@gmail.com wrote: Τη Σάββατο, 8 Ιουνίου 2013 7:03:57 μ.μ. UTC+3, ο χρήστης Chris Angelico έγραψε: On Sun, Jun 9, 2013 at 1:36 AM, Νικόλαος Κούρας nikos.gr...@gmail.com wrote: Well, www as symlink to public_html is always a symlink

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

2013-06-08 Thread nagia . retsina
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 :-) -- http://mail.python.org/mailman/listinfo/python-list

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

2013-06-07 Thread Νικόλαος Κούρας
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

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

2013-06-07 Thread Νικόλαος Κούρας
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

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

2013-06-07 Thread MRAB
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

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

2013-06-07 Thread Νικόλαος Κούρας
Τη Παρασκευή, 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

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

2013-06-07 Thread 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

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

2013-06-06 Thread Νικόλαος Κούρας
root@nikos [~]# chmod 755 /var/log root@nikos [~]# chmod 755 /var/log/httpd root@nikos [~]# chmod 666 /var/log/httpd/suexec.log root@nikos [~]# chmod 755 /usr/local/apache root@nikos [~]# chmod 755 /usr/local/apache/logs/ root@nikos [~]# chmod 666 /usr/local/apache/logs/error_log and then

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

2013-06-06 Thread Νικόλαος Κούρας
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 ) - ni...@superhost.gr [~/www/data/apps]# [Thu Jun 06 13:51:28 2013] [error] [client

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

2013-06-06 Thread rurpy
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 ) - ni...@superhost.gr [~/www/data/apps]#

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

2013-06-06 Thread Νικόλαος Κούρας
Τη Πέμπτη, 6 Ιουνίου 2013 9:40:04 μ.μ. UTC+3, ο χρήστης ru...@yahoo.com έγραψε: 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''' )

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

2013-06-06 Thread Νικόλαος Κούρας
Since cPanel is in charge of apache i ahve even: chown nobody:nobody to both of the suexec logs. ni...@superhost.gr [~/www/cgi-bin]# ls -l /usr/local/apache/logs/suexec_log -rw-rw-r-- 1 nobody nobody 675389 Jun 6 22:05 /usr/local/apache/logs/suexec_log ni...@superhost.gr [~/www/cgi-bin]# ls -l

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

2013-06-06 Thread Lele Gaifax
Νικόλαος Κούρας nikos.gr...@gmail.com writes: 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 ) Did you tried running that by a standalone Python interpreter? Did you notice

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

2013-06-06 Thread Νικόλαος Κούρας
Τη Πέμπτη, 6 Ιουνίου 2013 10:26:08 μ.μ. UTC+3, ο χρήστης Lele Gaifax έγραψε: Did you tried running that by a standalone Python interpreter? Did you notice something strange, something like that an empty line is missing between headers and body? No, nothing at all. Two '/n/n' are not

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

2013-06-06 Thread Skip Montanaro
Did you tried running that by a standalone Python interpreter? Did you notice something strange, something like that an empty line is missing between headers and body? He will get an extra blank line, since he added a newline character at the end of his Content-Type string. Skip --

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

2013-06-06 Thread Νικόλαος Κούρας
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. -- http://mail.python.org/mailman/listinfo/python-list

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

2013-06-06 Thread Lele Gaifax
Skip Montanaro s...@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 |

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

2013-06-05 Thread Νικόλαος Κούρας
Since the other thread gone into the wild, i choosed not to participate any longer and i state the question in this new thread. 'python files.py' interprets without an error. Problem is that when via browser - http://superhost.gr/cgi-bin/koukos.py i receive the following:

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

2013-06-05 Thread Chris Angelico
On Thu, Jun 6, 2013 at 5:54 AM, Νικόλαος Κούρας nikos.gr...@gmail.com wrote: print( cookie, Content-type: text/html; charset=utf-8\n, message ) Do you know what this does? Try it at the console. See what it outputs. ChrisA -- http://mail.python.org/mailman/listinfo/python-list

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

2013-06-05 Thread John Gordon
In 400ea041-adcf-4640-8872-f81808f7d...@googlegroups.com =?ISO-8859-7?B?zenq/Ovh7/Igyu/98eHy?= nikos.gr...@gmail.com writes: 'python files.py' interprets without an error. Problem is that when via browser - http://superhost.gr/cgi-bin/koukos.py i receive the following: Why should 'files.py'

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

2013-06-05 Thread rurpy
On Wednesday, June 5, 2013 1:54:45 PM UTC-6, Νικόλαος Κούρας wrote: ... print( cookie, Content-type: text/html; charset=utf-8\n, message ) ... If you look in the Apache error log file, you will see something like, [Wed Jun 05 16:39:14 2013] [error] [client 192.168.0.1] malformed header from

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

2013-06-05 Thread Chris Angelico
On Thu, Jun 6, 2013 at 6:56 AM, ru...@yahoo.com wrote: On Wednesday, June 5, 2013 1:54:45 PM UTC-6, Νικόλαος Κούρας wrote: ... print( cookie, Content-type: text/html; charset=utf-8\n, message ) ... If you look in the Apache error log file, you will see something like, [Wed Jun 05 16:39:14

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

2013-06-05 Thread rurpy
On Wednesday, June 5, 2013 3:03:29 PM UTC-6, Chris Angelico wrote: On Thu, Jun 6, 2013 at 6:56 AM, ru...@yahoo.com wrote: On Wednesday, June 5, 2013 1:54:45 PM UTC-6, Νικόλαος Κούρας wrote: ... print( cookie, Content-type: text/html; charset=utf-8\n, message ) ... print( cookie,

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

2013-06-05 Thread Chris Angelico
On Thu, Jun 6, 2013 at 7:18 AM, ru...@yahoo.com wrote: On Wednesday, June 5, 2013 3:03:29 PM UTC-6, Chris Angelico wrote: On Thu, Jun 6, 2013 at 6:56 AM, ru...@yahoo.com wrote: On Wednesday, June 5, 2013 1:54:45 PM UTC-6, Νικόλαος Κούρας wrote: ... print( cookie, Content-type: text/html;

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

2013-06-05 Thread rurpy
On 06/05/2013 04:21 PM, Chris Angelico wrote: On Thu, Jun 6, 2013 at 7:18 AM, ru...@yahoo.com wrote: On Wednesday, June 5, 2013 3:03:29 PM UTC-6, Chris Angelico wrote: ..[...] Ah, quite right. Something like print( cookie, \nContent-type: text/html; charset=utf-8\n\n, message ) then.

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

2013-06-05 Thread Chris Angelico
On Thu, Jun 6, 2013 at 8:36 AM, ru...@yahoo.com wrote: And it's really easy to try things out interactively to see what they'll do... Sure, once one makes the connection between Server Error and missing \n which is where Νικόλαος was stuck I'm guessing. I know that's a bit of a jump. That's

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

2013-06-05 Thread Cameron Simpson
On 05Jun2013 14:18, ru...@yahoo.com ru...@yahoo.com wrote: | On Wednesday, June 5, 2013 3:03:29 PM UTC-6, Chris Angelico wrote: | On Thu, Jun 6, 2013 at 6:56 AM, ru...@yahoo.com wrote: | On Wednesday, June 5, 2013 1:54:45 PM UTC-6, Νικόλαος Κούρας wrote: | ... | print( cookie, Content-type:

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

2013-06-05 Thread Νικόλαος Κούρας
Τη Πέμπτη, 6 Ιουνίου 2013 12:18:39 π.μ. UTC+3, ο χρήστης ru...@yahoo.com έγραψε: On Wednesday, June 5, 2013 3:03:29 PM UTC-6, Chris Angelico wrote: On Thu, Jun 6, 2013 at 6:56 AM, ru...@yahoo.com wrote: On Wednesday, June 5, 2013 1:54:45 PM UTC-6, Νικόλαος Κούρας wrote: ...

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

2013-06-05 Thread Νικόλαος Κούρας
Τη Πέμπτη, 6 Ιουνίου 2013 1:21:08 π.μ. UTC+3, ο χρήστης Chris Angelico έγραψε: On Thu, Jun 6, 2013 at 7:18 AM, ru...@yahoo.com wrote: On Wednesday, June 5, 2013 3:03:29 PM UTC-6, Chris Angelico wrote: On Thu, Jun 6, 2013 at 6:56 AM, ru...@yahoo.com wrote: On Wednesday, June 5, 2013