problem with shebang.

M

miraceti

Hi.

One day my shebang suddenly stopped working properly.
It doesn't complain that it can't find perl or anything.
It just doesn't do anything at all.
Can anyone guide me to what is wrong here?
Thanks a lot.


[]$ cat hello.pl
#!/usr/bin/perl -W

print "Hello, World!\n";


[]$ ./hello.pl
[]$ perl hello.pl
Hello, World!
[]$
 
A

Andrew

Hi.

One day my shebang suddenly stopped working properly.
It doesn't complain that it can't find perl or anything.
It just doesn't do anything at all.
Can anyone guide me to what is wrong here?
Thanks a lot.


[]$ cat hello.pl
#!/usr/bin/perl -W

print "Hello, World!\n";


[]$ ./hello.pl
[]$ perl hello.pl
Hello, World!
[]$

Changed/upgraded your operating system lately? Are you currently on a
unixoid OS and have new/modified selinux permissions?

I once experienced weirdness of the type you describe that stemmed from
"wrong" selinux permissions.

Andrew
 
C

Chris Johnson

Hi.

One day my shebang suddenly stopped working properly.
It doesn't complain that it can't find perl or anything.
It just doesn't do anything at all.
Can anyone guide me to what is wrong here?
Thanks a lot.


[]$ cat hello.pl
#!/usr/bin/perl -W

print "Hello, World!\n";


[]$ ./hello.pl
[]$ perl hello.pl
Hello, World!
[]$

Make sure the drive it's stored on isn't mounted as "noexec". This is
implied by the "user" mount option, but can be fixed by appending
",exec" to your mount options.
 
R

robic0

Hi.

One day my shebang suddenly stopped working properly.
It doesn't complain that it can't find perl or anything.
It just doesn't do anything at all.
Can anyone guide me to what is wrong here?
Thanks a lot.


[]$ cat hello.pl
#!/usr/bin/perl -W

print "Hello, World!\n";


[]$ ./hello.pl
[]$ perl hello.pl
Hello, World!
[]$

Make sure the drive it's stored on isn't mounted as "noexec". This is
implied by the "user" mount option, but can be fixed by appending
",exec" to your mount options.

Isin't 'shebang' a William Fong thing?
 
M

miraceti

yes i've upgraded the kernel using redhat network recently
and I remember i had problems with selinux a while ago..

could you tell me more about wrong selinux permissions?
 
M

miraceti

I don't think it is a problem with the specific script file.
All the scripts that worked before are not working now.
They only work when I specify perl explicitly in front of the filename.
Strangely they work fine when run via web.
 
M

miraceti

okay, I have turned off the selinux
and it is working.
I dont know whats wrong with it
all ive changed in the selinux option before was turning it off for
mysqld
if i use selinux it gives me errors on system calls via cgi,
and it doesnt accept shebang lines.

i do want to use selinux in the future
any suggestions?
 
B

Brian Wakem

okay, I have turned off the selinux
and it is working.
I dont know whats wrong with it
all ive changed in the selinux option before was turning it off for
mysqld
if i use selinux it gives me errors on system calls via cgi,
and it doesnt accept shebang lines.

i do want to use selinux in the future
any suggestions?


None. I've never got a machine working properly with selinux.
 
T

Tad McClellan

if i use selinux it gives me errors on system calls via cgi,
and it doesnt accept shebang lines.

any suggestions?


I suggest asking web server setup questions in a newsgroup where
they discuss web server setup, rather than in a programming
language newsgroup.
 

Ask a Question

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.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,781
Messages
2,569,616
Members
45,306
Latest member
TeddyWeath

Latest Threads

Top