I have a python script running a simple raster band analysis using GDAL library from Ubuntu. This runs perfectly when the script was executed from the command window under the same folder, but when I tried to run it from PHP it fails. Below is the error I got:
Traceback (most recent call last):
File "../SCRIPT/python/bandInfo.py", line 27, in <module>
src_ds = gdal.Open( input_file )
File "/usr/lib/python3/dist-packages/osgeo/gdal.py", line 2939, in Open
return _gdal.Open(*args)
RuntimeError: No such file or directory
Seems like my directory is invalid, but the input path is indeed the correct path, is this something to do with the permission? But I do have ownership for all the folder and sub-folders... Anyone can help me out here? TIA!