Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
php: bad interpreter: Permission denied (SOLVED)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
Fog_Watch
Apprentice
Apprentice


Joined: 24 Jul 2006
Posts: 157
Location: Australia

PostPosted: Thu Nov 16, 2006 12:09 am    Post subject: php: bad interpreter: Permission denied (SOLVED) Reply with quote

I'm attempting to install FreePBX without much luck. The following illustrates the problem that I'm having at the moment:
Code:
asterisk@mrs-silly ~/bin $ ls -la {/usr/bin/php,/usr/lib/php4/bin/php,/var/lib/asterisk/bin/retrieve_conf}
lrwxrwxrwx 1 root     root          21 Oct 31 13:55 /usr/bin/php -> /usr/lib/php4/bin/php
-rwxr-xr-x 1 root     root     2257232 Nov  2 12:38 /usr/lib/php4/bin/php
-rwxr-xr-- 1 asterisk asterisk    9521 Nov 16 10:36 /var/lib/asterisk/bin/retrieve_conf
asterisk@mrs-silly ~/bin $ whoami&&pwd
asterisk
/var/lib/asterisk/bin
asterisk@mrs-silly ~/bin $ ./retrieve_conf
bash: ./retrieve_conf: /usr/bin/php: bad interpreter: Permission denied
asterisk@mrs-silly ~/bin $ php -q retrieve_conf
Checking for PEAR DB..OK
Checking for PEAR Console::Getopt..OK
Checking for /etc/amportal.conf..OK
Reading /etc/amportal.conf..OK
Reading /etc/asterisk/asterisk.conf..OK
Connecting to database..OK
sh: /var/lib/asterisk/bin/retrieve_op_conf_from_mysql.pl: /usr/bin/perl: bad interpreter: Permission deniedsh: /var/lib/asterisk/bin/retrieve_sip_conf_from_mysql.pl: /usr/bin/perl: bad interpreter: Permission denied
sh: /var/lib/asterisk/bin/retrieve_iax_conf_from_mysql.pl: /usr/bin/perl: bad interpreter: Permission denied
sh: /var/lib/asterisk/bin/retrieve_zap_conf_from_mysql.pl: /usr/bin/perl: bad interpreter: Permission denied
sh: /var/lib/asterisk/bin/retrieve_queues_conf_from_mysql.pl: /usr/bin/perl: bad interpreter: Permission denied
Please Reload Asterisk by visiting http://freepbx:81/admin

That is, to me the permissions look OK, but the php script won't execute. I presume it should. Any clues as to why it won't?

Regards

Fog_Watch.


Last edited by Fog_Watch on Fri Nov 17, 2006 12:11 am; edited 1 time in total
Back to top
View user's profile Send private message
bin-doph
Guru
Guru


Joined: 23 May 2003
Posts: 302

PostPosted: Thu Nov 16, 2006 12:29 pm    Post subject: Reply with quote

Hi

I just noticed that it complains about a bad perl-interpreter

Quote:
sh: /var/lib/asterisk/bin/retrieve_op_conf_from_mysql.pl: /usr/bin/perl: bad interpreter: Permission denied
sh: /var/lib/asterisk/bin/retrieve_sip_conf_from_mysql.pl: /usr/bin/perl: bad interpreter: Permission denied
sh: /var/lib/asterisk/bin/retrieve_iax_conf_from_mysql.pl: /usr/bin/perl: bad interpreter: Permission denied
sh: /var/lib/asterisk/bin/retrieve_zap_conf_from_mysql.pl: /usr/bin/perl: bad interpreter: Permission denied
sh: /var/lib/asterisk/bin/retrieve_queues_conf_from_mysql.pl: /usr/bin/perl: bad interpreter: Permission denied


Maybe your perl-interpreter is broken? If so recompile it emerge dev-lang/perl or try something on the commandline like

Code:
perl -e 'print "foo\n"'


to see if it works

hth
-fe
_________________
perl -e '$_=q;4a75737420616e6f74686572205065726c204861636b65720as;;for(s;s;s;s;s;s;s;s;s;s;s;s){s;(..)s?;qq qprint chr 0x$1 and \161 ssq;excess;}'
Back to top
View user's profile Send private message
Fog_Watch
Apprentice
Apprentice


Joined: 24 Jul 2006
Posts: 157
Location: Australia

PostPosted: Fri Nov 17, 2006 12:10 am    Post subject: Reply with quote

I don't know how, bin-doph, but your post helped me towards the solution. Drum roll.

Turn off Partially restrict non-root users in the Grsecurity part of the kernel.

Thanks for the support.

Regards

Fog_Watch.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum