1
How can I execute php script as root user?
I tried:
sudo ./script.php
and in my script I've got at 1 line: #!/usr/bin/php
1
How can I execute php script as root user?
I tried:
sudo ./script.php
and in my script I've got at 1 line: #!/usr/bin/php
0
If I've understood correctly, you shouldn't need #!/usr/bin/php
in your PHP script.
Presuming you've got php
installed with the command available, try the below from command line:
sudo php path/to/script.php
...where script.php
contains only PHP code.
So, what happens when you run it like that? – Der Hochstapler – 2013-03-21T12:20:25.210