0

I tried running a curl command in php using exec method, it worked well in my Linux server, but not working in my Windows machine, I checked my PHP configuration file too, curl is enabled there. What could be the issue that it is not working ?

My command is (one used for Linux - this one ran succesfully there) 'curl -u admin:geoserver -XPUT -H "Content-type:image/tiff" --data-binary @/opt/lampp/htdocs/PDAN_Dev/Admin/uploads/tif/'.$data_set_name.'.tif http://localhost:8080/geoedge/rest/workspaces/geoedge/coveragestores/'.$data_set_name.'/file.geotiff'

The one I ran in Windows

exec("curl -u admin:geoserver -XPUT -H Content-type:image/tiff --data-binary C:/Users/Developer/Desktop/geoedge-test12.tif http://107.167.186.125:8080/geoedge/rest/workspaces/geoedge/coverageStores/geoedge-test13/file.geotiff")

When I ran it in the command prompt it gives me no output

Dilini Himali
  • 63
  • 1
  • 9

2 Answers2

0

It means that you have not installed curl on your windows machine. PHP curl is not same thing as machine installed curl. When you are checking php configuration, it shows modules installed for php, not for machine.

Mass
  • 545
  • 2
  • 6
  • 8
0

You shouldn't run curl using the exec function, but with the build in php functions.

It's not because the php curl extension is installled that this library is installed globaly on your windows machine.

Jerodev
  • 29,019
  • 11
  • 72
  • 94