What does PHP exec() return value of 5 mean?

I have been trying to know if the exec() command in php executes successfully or not so that I can print certain messages accordingly.
In the command
exec($command, $return_array, $return_value)
If you execute above command via PHP and get $return_array as empty and $return_value as 5, then that means something is wrong. If the command successfully executes, it should return a value of 0.
5 means Access denied.

Similarly, Here are list of some common return codes and what they means

0 The operation completed successfully. 
1 Incorrect function. 
2 The system cannot find the file specified. 
3 The system cannot find the path specified. 
4 The system cannot open the file. 
5 Access is denied. 
6 The handle is invalid. 
7 The storage control blocks were destroyed. 
8 Not enough storage is available to process this command. 
9 The storage control block address is invalid. 
10 The environment is incorrect. 
.
.
.

The complete list can be found @ Hikesoftware

Comments

Popular Posts