Jonob Posted February 28, 2012 Share Posted February 28, 2012 I am using a curl library to upload images to Amazon S3 using a php wrapper (http://undesigned.org.za/2007/10/22/amazon-s3-php-class). However, becuse CURLOPT_FOLLOWLOCATION is set to true on my server and open_basedir is enabled, this throws an error: CURLOPT_FOLLOWLOCATION cannot be activated when in safe_mode or an open_basedir is set I understand that I could disable open_basedir or use one of the workarounds at http://php.net/manual/en/function.curl-setopt.php. Instead, as a quick test I set CURLOPT_FOLLOWLOCATION = false. The image upload to S3 still seems to work, but I am concerned that something may break down the line. Are there any implications that I should be aware of? I am not quite if CURLOPT_FOLLOWLOCATION is it even relevant in this case? Quote Link to comment https://forums.phpfreaks.com/topic/257939-implications-of-curlopt_followlocation-for-amazon-s3/ Share on other sites More sharing options...
codebyren Posted February 28, 2012 Share Posted February 28, 2012 The CURLOPT_FOLLOWLOCATION option being set to true just tells cURL to follow redirects set by the server at the address being accessed. It's been a while since I've worked with Amazon S3 (I can barely remember it) but I'd think it's extremely unlikely that they would change the URL to which you post your data, and therefore possibly redirect you elsewhere. Also, if they were to change the URL, I don't believe the post data would carry to the new page anyway - but I may be wrong or there may be ways to configure cURL to keep the post intact. This should be easy enough to test on your own server just by uploading one file that prints the $_POST array and another that redirects to it. Then just post to the redirecting page via cURL and see what your result is. Quote Link to comment https://forums.phpfreaks.com/topic/257939-implications-of-curlopt_followlocation-for-amazon-s3/#findComment-1322099 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.