L
Lele Gaifax
Skip Montanaro said: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.
Skip Montanaro said:He will get an extra blank line, since he added a newline character at
the end of his Content-Type string.
It's looking for '/home/nikos/public_html/cgi-bin/koukos.py'.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:
(e-mail address removed) [~/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'.
Yes it is.Have a look in '/home/nikos/public_html/cgi-bin'. Is 'koukos.py' in
there?
The prompt says "~/www/cgi-bin".Ôç ÐáñáóêåõÞ, 7 Éïõíßïõ 2013 5:32:09 ì.ì. UTC+3, ï ÷ñÞóôçò MRAB Ýãñáøå:It's looking for '/home/nikos/public_html/cgi-bin/koukos.py'.
Its looking for its self?!?!
Yes it is.Have a look in '/home/nikos/public_html/cgi-bin'. Is 'koukos.py' in
there?
(e-mail address removed) [~/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*
(e-mail address removed) [~/www/cgi-bin]#
Ôç ÐáñáóêåõÞ, 7 Éïõíßïõ 2013 5:32:09 ì.ì. UTC+3, ï ÷ñÞóôçò MRAB Ýãñáøå:
Its looking for its self?!?!Yes it is.
(e-mail address removed) [~/www/cgi-bin]# ls -ltotal 56drwxr-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*(e-mail address removed) [~/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
Ôç ÐáñáóêåõÞ, 7 Éïõíßïõ 2013 11:47:58ì.ì. UTC+3, ï ÷ñÞóôçò MRAB Ýãñáøå:Good day MRAB, yes '~/www' its a symlink to '~/public_html'The prompt says "~/www/cgi-bin".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.
(e-mail address removed) [~/www/cgi-bin]# ls -l
-rwxr-xr-x 1 nikos nikos 1160 Jun 6 06:27 koukos.py*
Is that the same as "/home/nikos/public_html/cgi-bin"?
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
Ôç ÐáñáóêåõÞ, 7 Éïõíßïõ 2013 11:47:58 ì.ì. 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.
(e-mail address removed) [~/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.
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.
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
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.