Now that I've got the server serving my python pages, I'm getting this error:
[Fri Nov 06 11:50:40 2009] [error] [client 66.248.168.98] (2)No such file or directory: exec of '/var/www/html/angrynates.com/global_solutions/index.py' failed, referer: http://angrynates.com/global_solutions/ [Fri Nov 06 11:50:40 2009] [error] [client 66.248.168.98] Premature end of script headers: index.py, referer: http://angrynates.com/global_solutions/
Now, the file does exist:
[root@13gems global_solutions]# pwd /var/www/html/angrynates.com/global_solutions [root@13gems global_solutions]# ls ... -rwxr-xr-x 1 victor victor 275 Nov 6 07:05 index.html ... and it serves just fine on another server, so there is no "premature end of script headers". Please advise. TIA, Victor
Victor Subervi schrieb:
Now that I've got the server serving my python pages, I'm getting this error:
[Fri Nov 06 11:50:40 2009] [error] [client 66.248.168.98] (2)No such file or directory: exec of '/var/www/html/angrynates.com/global_solutions/index.py' failed, referer: http://angrynates.com/global_solutions/ [Fri Nov 06 11:50:40 2009] [error] [client 66.248.168.98] Premature end of script headers: index.py, referer: http://angrynates.com/global_solutions/
Now, the file does exist:
[root@13gems global_solutions]# pwd /var/www/html/angrynates.com/global_solutions [root@13gems global_solutions]# ls ... -rwxr-xr-x 1 victor victor 275 Nov 6 07:05 index.html ... and it serves just fine on another server, so there is no "premature end of script headers". Please advise. TIA, Victor
"No such file or directory: exec of '/var/www/html/angrynates.com/global_solutions/index.py'"
and
-rwxr-xr-x 1 victor victor 275 Nov 6 07:05 index.html
Think about it.
Alexander
Victor Subervi wrote:
Now that I've got the server serving my python pages, I'm getting this error:
[Fri Nov 06 11:50:40 2009] [error] [client 66.248.168.98] (2)No such file or directory: exec of '/var/www/html/angrynates.com/global_solutions/index.py http://angrynates.com/global_solutions/index.py'
That says it's looking for 'index.py' ...
-rwxr-xr-x 1 victor victor 275 Nov 6 07:05 index.html
That says 'index.html' ... two completely different files.
On Fri, Nov 06, 2009 at 02:09:43PM -0600, Jacob P wrote:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
Could you stop posting html email? !!!! and quit top posting too.
Thx
My bad. I meant index.py and the permissions were the same. Trying to resolve the problem, I have discovered that if I create the files from the command prompt as root they work. I originally ftp'd them to the server as another user. So I chown'd to root.root and chmod to 755 and it *still* doesn't work. Only the test files I create on the server. Why would that be?
[root@13gems global_solutions]# ls -al | grep test.py -rwxr-xr-x 1 root root 298 Nov 6 12:24 test.py [root@13gems global_solutions]# ls -al | grep test2.py -rwxr-xr-x 1 root root 5716 Nov 6 12:25 test2.py [root@13gems global_solutions]# ls -al | grep index.py -rwxr-xr-x 1 root root 316 Nov 6 07:05 index.py [root@13gems global_solutions]# ls -al | grep template.py -rwxr-xr-x 1 root root 5806 Nov 6 07:06 template.py -rwxr-xr-x 1 root root 6093 Nov 6 07:06 template.pyc
where test.py is identical to index.py (other than the necessary import) and template is identical to test2.py TIA, V
On Fri, Nov 6, 2009 at 3:09 PM, Jacob P jperkins@hostgator.com wrote:
index.py and index.html are different files:
/var/www/html/angrynates.com/global_solutions [root@13gems global_solutions]# ls -rwxr-xr-x 1 victor victor 275 Nov 6 07:05 index.html
exec of '/var/www/html/angrynates.com/global_solutions/index.py' failed
Victor Subervi wrote:
Now that I've got the server serving my python pages, I'm getting this error:
[Fri Nov 06 11:50:40 2009] [error] [client 66.248.168.98] (2)No such file or directory: exec of '/var/www/html/ angrynates.com/global_solutions/index.py' failed, referer: http://angrynates.com/global_solutions/ [Fri Nov 06 11:50:40 2009] [error] [client 66.248.168.98] Premature end of script headers: index.py, referer: http://angrynates.com/global_solutions/
Now, the file does exist:
[root@13gems global_solutions]# pwd /var/www/html/angrynates.com/global_solutions [root@13gems global_solutions]# ls ... -rwxr-xr-x 1 victor victor 275 Nov 6 07:05 index.html ... and it serves just fine on another server, so there is no "premature end of script headers". Please advise. TIA, Victor
CentOS mailing listCentOS@centos.orghttp://lists.centos.org/mailman/listinfo/centos
-- Thanks!
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
On Fri, 2009-11-06 at 15:31 -0500, Victor Subervi wrote:
My bad. I meant index.py and the permissions were the same. Trying to resolve the problem, I have discovered that if I create the files from the command prompt as root they work. I originally ftp'd them to the server as another user. So I chown'd to root.root and chmod to 755 and it *still* doesn't work. Only the test files I create on the server. Why would that be?
[root@13gems global_solutions]# ls -al | grep test.py -rwxr-xr-x 1 root root 298 Nov 6 12:24 test.py [root@13gems global_solutions]# ls -al | grep test2.py -rwxr-xr-x 1 root root 5716 Nov 6 12:25 test2.py [root@13gems global_solutions]# ls -al | grep index.py -rwxr-xr-x 1 root root 316 Nov 6 07:05 index.py [root@13gems global_solutions]# ls -al | grep template.py -rwxr-xr-x 1 root root 5806 Nov 6 07:06 template.py -rwxr-xr-x 1 root root 6093 Nov 6 07:06 template.pyc
where test.py is identical to index.py (other than the necessary import) and template is identical to test2.py TIA,
---- that sounds like SELinux
ls -lZ and you will find that the files you create in place have a different security context than the ones you copied into place.
fixfiles relabel /var/www/html # might just work
touch /.autorelabel # and then reboot will relabel all copied files to the correct contexts for the location
or you could turn off SELinux and reboot
Craig
I tried all of that including
echo 0 >/selinux/enforce and no luck. Ideas? V
On Fri, Nov 6, 2009 at 3:44 PM, Craig White craigwhite@azapple.com wrote:
On Fri, 2009-11-06 at 15:31 -0500, Victor Subervi wrote:
My bad. I meant index.py and the permissions were the same. Trying to resolve the problem, I have discovered that if I create the files from the command prompt as root they work. I originally ftp'd them to the server as another user. So I chown'd to root.root and chmod to 755 and it *still* doesn't work. Only the test files I create on the server. Why would that be?
[root@13gems global_solutions]# ls -al | grep test.py -rwxr-xr-x 1 root root 298 Nov 6 12:24 test.py [root@13gems global_solutions]# ls -al | grep test2.py -rwxr-xr-x 1 root root 5716 Nov 6 12:25 test2.py [root@13gems global_solutions]# ls -al | grep index.py -rwxr-xr-x 1 root root 316 Nov 6 07:05 index.py [root@13gems global_solutions]# ls -al | grep template.py -rwxr-xr-x 1 root root 5806 Nov 6 07:06 template.py -rwxr-xr-x 1 root root 6093 Nov 6 07:06 template.pyc
where test.py is identical to index.py (other than the necessary import) and template is identical to test2.py TIA,
that sounds like SELinux
ls -lZ and you will find that the files you create in place have a different security context than the ones you copied into place.
fixfiles relabel /var/www/html # might just work
touch /.autorelabel # and then reboot will relabel all copied files to the correct contexts for the location
or you could turn off SELinux and reboot
Craig
-- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Uploading as ascii not binary?! What binary? This is text! At any rate, from the shell I deleted all the content of both files, then pasted it in, just as I had done with the test files, and still got the same errors. V
On Fri, Nov 6, 2009 at 3:51 PM, Victor Subervi victorsubervi@gmail.comwrote:
I tried all of that including
echo 0 >/selinux/enforce and no luck. Ideas? V
On Fri, Nov 6, 2009 at 3:44 PM, Craig White craigwhite@azapple.comwrote:
On Fri, 2009-11-06 at 15:31 -0500, Victor Subervi wrote:
My bad. I meant index.py and the permissions were the same. Trying to resolve the problem, I have discovered that if I create the files from the command prompt as root they work. I originally ftp'd them to the server as another user. So I chown'd to root.root and chmod to 755 and it *still* doesn't work. Only the test files I create on the server. Why would that be?
[root@13gems global_solutions]# ls -al | grep test.py -rwxr-xr-x 1 root root 298 Nov 6 12:24 test.py [root@13gems global_solutions]# ls -al | grep test2.py -rwxr-xr-x 1 root root 5716 Nov 6 12:25 test2.py [root@13gems global_solutions]# ls -al | grep index.py -rwxr-xr-x 1 root root 316 Nov 6 07:05 index.py [root@13gems global_solutions]# ls -al | grep template.py -rwxr-xr-x 1 root root 5806 Nov 6 07:06 template.py -rwxr-xr-x 1 root root 6093 Nov 6 07:06 template.pyc
where test.py is identical to index.py (other than the necessary import) and template is identical to test2.py TIA,
that sounds like SELinux
ls -lZ and you will find that the files you create in place have a different security context than the ones you copied into place.
fixfiles relabel /var/www/html # might just work
touch /.autorelabel # and then reboot will relabel all copied files to the correct contexts for the location
or you could turn off SELinux and reboot
Craig
-- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Victor Subervi wrote:
I tried all of that including echo 0 >/selinux/enforce and no luck. Ideas?
Go edit /etc/selinux/config and set it to 'DISABLED' then restart.
Not sure if that's any different, but that's how I turn it off. My /selinux folder is empty, and by doing the above, selinux IS turned off.
Victor Subervi wrote:
I tried all of that including echo 0 >/selinux/enforce and no luck. Ideas?
Go edit /etc/selinux/config and set it to 'DISABLED' then restart. Not sure if that's any different, but that's how I turn it off. My
/selinux folder is empty, and by doing the above, selinux IS turned off.
Or setenforce - see the man page
mark
[root@13gems ~]# cd /etc/ [root@13gems etc]# mv selinux/ selinux.BAK [root@13gems etc]# mkdir selinux [root@13gems etc]# echo 0>/selinux/enforce
[root@13gems etc]# tail /var/log/httpd/error_log [Fri Nov 06 12:51:49 2009] [error] [client 66.248.168.98] Premature end of script headers: index.py, referer: http://angrynates.com/global_solutions/ [Fri Nov 06 12:56:18 2009] [error] [client 66.248.168.98] (2)No such file or directory: exec of '/var/www/html/angrynates.com/global_solutions/index.py' failed, referer: http://angrynates.com/global_solutions/ [Fri Nov 06 12:56:18 2009] [error] [client 66.248.168.98] Premature end of script headers: index.py, referer: http://angrynates.com/global_solutions/ [Fri Nov 06 12:56:20 2009] [error] [client 67.96.172.81] (2)No such file or directory: exec of '/var/www/html/angrynates.com/global_solutions/index.py' failed [Fri Nov 06 12:56:20 2009] [error] [client 67.96.172.81] Premature end of script headers: index.py [Fri Nov 06 13:52:15 2009] [error] [client 66.249.67.153] File does not exist: /var/www/html/angrynates.com/robots.txt [Fri Nov 06 13:52:52 2009] [error] [client 208.84.198.58] (2)No such file or directory: exec of '/var/www/html/angrynates.com/global_solutions/index.py' failed, referer: http://angrynates.com/global_solutions/ [Fri Nov 06 13:52:52 2009] [error] [client 208.84.198.58] Premature end of script headers: index.py, referer: http://angrynates.com/global_solutions/ [Fri Nov 06 13:52:52 2009] [error] [client 208.84.198.58] File does not exist: /var/www/html/angrynates.com/favicon.ico [Fri Nov 06 13:52:53 2009] [error] [client 208.84.198.58] File does not exist: /var/www/html/angrynates.com/favicon.ico [root@13gems etc]#
Ideas? TIA, V
On Fri, Nov 6, 2009 at 4:15 PM, m.roth@5-cent.us wrote:
Victor Subervi wrote:
I tried all of that including echo 0 >/selinux/enforce and no luck. Ideas?
Go edit /etc/selinux/config and set it to 'DISABLED' then restart. Not sure if that's any different, but that's how I turn it off. My
/selinux folder is empty, and by doing the above, selinux IS turned off.
Or setenforce - see the man page
mark
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Victor Subervi wrote:
[Fri Nov 06 12:51:49 2009] [error] [client 66.248.168.98] Premature end of script headers: index.py, referer: http://angrynates.com/global_solutions/ [Fri Nov 06 12:56:18 2009] [error] [client 66.248.168.98] (2)No such file or directory: exec of '/var/www/html/angrynates.com/global_solutions/index.py'
Sounds like the interpreter referenced in the script is likely non existent or non accessible to apache.
nate
Ok. As I mentioned before, I copied the contents of these two files: index.py template.py // which is referenced by the former --into-- test.py test2.py I pasted them in through the ssh client, changing only the import statement from template to test2. *That worked.* However, the material that I uploaded through ftp doesn't render, it throws the error. The permissions are the same as the tests. So is the ownership. What gives?? V
On Fri, Nov 6, 2009 at 5:10 PM, nate centos@linuxpowered.net wrote:
Victor Subervi wrote:
[Fri Nov 06 12:51:49 2009] [error] [client 66.248.168.98] Premature end
of
script headers: index.py, referer:
http://angrynates.com/global_solutions/
[Fri Nov 06 12:56:18 2009] [error] [client 66.248.168.98] (2)No such file
or
directory: exec of '/var/www/html/
angrynates.com/global_solutions/index.py'
Sounds like the interpreter referenced in the script is likely non existent or non accessible to apache.
nate
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Victor Subervi schrieb:
Ok. As I mentioned before, I copied the contents of these two files: index.py template.py // which is referenced by the former --into-- test.py test2.py I pasted them in through the ssh client, changing only the import statement from template to test2. *That worked.* However, the material that I uploaded through ftp doesn't render, it throws the error. The permissions are the same as the tests. So is the ownership. What gives?? V
dos2unix <ftp uploaded script file>
Or use recode.
Alexander
If it were the interpreter, then my test.py and test2.py that are _word_for_word_ the _exact_same_code_ would not work, correct?
dos2unix?! Huh? Where's the dos?
recode? man recode gives nothing. V
On Fri, Nov 6, 2009 at 5:41 PM, Alexander Dalloz <ad+lists@uni-x.orgad%2Blists@uni-x.org
wrote:
Victor Subervi schrieb:
Ok. As I mentioned before, I copied the contents of these two files: index.py template.py // which is referenced by the former --into-- test.py test2.py I pasted them in through the ssh client, changing only the import
statement
from template to test2. *That worked.* However, the material that I
uploaded
through ftp doesn't render, it throws the error. The permissions are the same as the tests. So is the ownership. What gives?? V
dos2unix <ftp uploaded script file>
Or use recode.
Alexander
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Victor Subervi wrote:
If it were the interpreter, then my test.py and test2.py that are _word_for_word_ the _exact_same_code_ would not work, correct?
dos2unix?! Huh? Where's the dos?
recode? man recode gives nothing.
What he was suggesting is that you may have non-Unix end-of-lines in your file. dos2unix fixes that.
Try it rather than complaining.
Victor Subervi schrieb:
My bad. I meant index.py and the permissions were the same. Trying to resolve the problem, I have discovered that if I create the files from the command prompt as root they work. I originally ftp'd them to the server as another user. So I chown'd to root.root and chmod to 755 and it *still* doesn't work. Only the test files I create on the server. Why would that be?
[root@13gems global_solutions]# ls -al | grep test.py -rwxr-xr-x 1 root root 298 Nov 6 12:24 test.py [root@13gems global_solutions]# ls -al | grep test2.py -rwxr-xr-x 1 root root 5716 Nov 6 12:25 test2.py [root@13gems global_solutions]# ls -al | grep index.py -rwxr-xr-x 1 root root 316 Nov 6 07:05 index.py [root@13gems global_solutions]# ls -al | grep template.py -rwxr-xr-x 1 root root 5806 Nov 6 07:06 template.py -rwxr-xr-x 1 root root 6093 Nov 6 07:06 template.pyc
where test.py is identical to index.py (other than the necessary import) and template is identical to test2.py TIA, V
Your ftp'ing is not correct: ascii vs. binary transfer.
Alexander