Search found 2 matches

by nebules
Thu Aug 03, 2023 10:45 am America/New_York
Forum: Questions/Comments
Question: access denied when using netrc via php-curl on apache
Replies: 2

Re: access denied when using netrc via php-curl on apache

Solution: PHP code is run by Apache user (www-data on Ubuntu), so I had to move the netrc file to /home/www-data/, and add this curl option to my PHP code:

curl_setopt($ch, CURLOPT_NETRC_FILE, '/home/www-data/.netrc');
by nebules
Tue May 16, 2023 5:36 pm America/New_York
Forum: Questions/Comments
Question: access denied when using netrc via php-curl on apache
Replies: 2

access denied when using netrc via php-curl on apache

So I'm following your directions on this page: https://urs.earthdata.nasa.gov/documentation/for_users/data_access/php And the netrc file I created works fine via command line (ubuntu): curl -O -b <path to cookies file> -c <path to cookies file> -L -n https://opendap.earthdata.nasa.gov/collections/.....