store | blogs | forums | twitter | facebook | wiki | mailing lists | downloads | support portal
Atomic Secure Linux
It is currently Tue Jun 18, 2013 10:12 pm

» Feed - Atomicorp

All times are UTC - 5 hours [ DST ]




Post new topic Reply to topic Share/Bookmark  [ 6 posts ] 
Author Message
 Post subject: S3 Curl and ASL
Unread postPosted: Mon Apr 15, 2013 9:44 am 
Offline
Forum Regular
Forum Regular

Joined: Mon Mar 10, 2008 9:12 pm
Posts: 482
Location: Southampton, UK
Hi all,

I'm attempting to use Undesigned's PHP S3 Class (http://undesigned.org.za/2007/10/22/amazon-s3-php-class) that uses PHP 5.2.x and CURL, but keep hitting a brick wall on it. The main issue is that I'm getting this error:

Code:
curl_setopt() [<a href='function.curl-setopt'>function.curl-setopt</a>]: CURLOPT_FOLLOWLOCATION cannot be activated when safe_mode is enabled or an open_basedir is set


So I figured, ok I'll disable Safe Mode in Plesk. Erm that didn't work, ok well maybe I'll run phpinfo and see what's happening. Erm nope, ok maybe Allow PHP Info is set to No in ASL, so I switch that to Yes, and still no phpinfo. Grrr, ok so I next I turn Safe Mode off in ASL as well. Finally starting to get somewhere.

But still the issue is I just can't seem to get past this error. I'm wondering is anyone else here has used this class, or could help me with this issue.

Thanks, Matt

_________________
Matt

"Given that God is infinite, and that the universe is also infinite... would you like a toasted teacake?"

about.me/mattauckland
twitter.com/mattauckland


Top
 Profile  
 
 Post subject: Re: S3 Curl and ASL
Unread postPosted: Mon Apr 15, 2013 12:04 pm 
Offline
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin

Joined: Wed Dec 31, 1969 8:00 pm
Posts: 7454
Location: earth
Plesk is setting that open_basedir too.


Top
 Profile  
 
 Post subject: Re: S3 Curl and ASL
Unread postPosted: Mon Apr 15, 2013 12:31 pm 
Offline
Forum Regular
Forum Regular

Joined: Mon Mar 10, 2008 9:12 pm
Posts: 482
Location: Southampton, UK
Is there an option to change it in Plesk? I couldn't see anything in the CP.

_________________
Matt

"Given that God is infinite, and that the universe is also infinite... would you like a toasted teacake?"

about.me/mattauckland
twitter.com/mattauckland


Top
 Profile  
 
 Post subject: Re: S3 Curl and ASL
Unread postPosted: Mon Apr 15, 2013 12:37 pm 
Offline
Forum Regular
Forum Regular

Joined: Tue Aug 01, 2006 2:45 pm
Posts: 246
Location: Netherlands
laughingbuddha wrote:
Is there an option to change it in Plesk? I couldn't see anything in the CP.


In Plesk 11.x you can alter the open_basedir value for a specific domain via the PHP Settings page under the Subscription website settings. Alternatively (or in other cases) you can disable open_basedir via a vhost.conf.

For security reasons it is not recommended to disable open_basedir. Where possible I would suggest only disabling open_basedir for a specific directory where the PHP script that requires this is located.

_________________
Lemonbit Internet Dedicated Server Management


Top
 Profile  
 
 Post subject: Re: S3 Curl and ASL
Unread postPosted: Mon Apr 15, 2013 1:57 pm 
Offline
Forum Regular
Forum Regular

Joined: Mon Mar 10, 2008 9:12 pm
Posts: 482
Location: Southampton, UK
Ok. So if I'm running an MVC framework, and the class file that is being called to run the command is in say the libs folder, I would disable it for that folder. Is that right?

Basically how I'm using the script is to upload the file to the server, processes it, then upload it to S3 bucket. In this case it is handling an image.

So with that in mind, what is the command needed for the vhost to disable it for just one directory?

Thanks

_________________
Matt

"Given that God is infinite, and that the universe is also infinite... would you like a toasted teacake?"

about.me/mattauckland
twitter.com/mattauckland


Top
 Profile  
 
 Post subject: Re: S3 Curl and ASL
Unread postPosted: Mon Apr 15, 2013 7:34 pm 
Offline
Forum Regular
Forum Regular

Joined: Mon Mar 10, 2008 9:12 pm
Posts: 482
Location: Southampton, UK
Think I've got it to work, without having to mess about with the open_basedir. Someone made a patch to that S3 class, but it never got officially released. However I found the patch details in the gethub repo, and applied the changes. Added to that some security policy changes to the user account I created to perform these tasks, and we have a working script. YAY!

Anyone else happen to come across the same issue, drop me a message and I'll pass the script with the changes over to you.

_________________
Matt

"Given that God is infinite, and that the universe is also infinite... would you like a toasted teacake?"

about.me/mattauckland
twitter.com/mattauckland


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic Share/Bookmark  [ 6 posts ] 

» Feed - Atomicorp

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: Bing [Bot] and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group