Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Permission denied in Unknown on line 0

Status
Not open for further replies.

fopetesl

Programmer
Dec 14, 2002
6
GB
I have switched my OS from Mandrake 10.0CE to Ubuntu 5.10 (Breezy) and now cannot get even a simple php script to run even with exec()..

Code:
<?php
`sudo /sbin/halt`;
?>

Trying to execute the script from Opera,(I need for kiosk), I get the following:
Code:

[highlight]Warning: Unknown(/var/ failed to open stream: Permission denied in Unknown on line 0

Warning: (null)() [function.include]: Failed opening '/var/ for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in Unknown on line 0[/highlight]


I have checked permissions in /etc/sudoers so doesn't seem to be a permission problem.
Also file permission is the same as:

Code:
<?php
phpinfo();
?>
which does work.

There are no errors reported by apache.

Using exec() to run the same command gives me the same error.

I do not have either /usr/share/php -or- /usur/share/pear. Should I have?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top