When I am trying to run shell script with exec
and shell_exe
nothing happens!
When I run with those command ls
or whoami
all work's.
What could it be?
When I am trying to run shell script with exec
and shell_exe
nothing happens!
When I run with those command ls
or whoami
all work's.
What could it be?
If you're using Apache, check to make sure that the Apache user has the required permissions to execute the php file.
Do you echo the output?
Do you have safe_mode enabled?
When yes: (from the manual)
Try to call exec with
Then
If it shows
127
it´s likely that the path is wrong.Also check the permissions. User 'nobody' is probably the apache user, which needs the rights to access and execute the script.
You can change the permissions by running
chmod 755 pathtouyourscript
This means something like 'I don't mind if other people read or run this file, but only I should be able to modify it'.
If the program is web based i.e. for linux, Try making a php file to process the shell. and a shell file to handle the php..
For instance: runAllShell.php file can contain a loop.:
make sure that all the .sh files in the directory are numericaly ordered for this to work i.e: 1.sh 2.sh 3.sh and so on.
Best regards, AT.
You can use reflection to figure out if the function has been disabled with
disable_functions
.