I’m trying to use curl to post data to a script which is posted on the same server however it gives me this error:
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>401 - Unauthorized</title>
</head>
<body>
<h1>401 - Unauthorized</h1>
</body>
</html>
It works fine on localhost, what settings do I need to change to make it work on the server though?
401 - unauthorizedprobably means there is a password protection in place for the path you are trying to upload to.You’ll need to remove the protection, or change your script so curl sends the correct credentials.